WordPress.org

Plugin Directory

Changeset 383802


Ignore:
Timestamp:
05/11/11 19:17:55 (3 years ago)
Author:
mpvanwinkle77
Message:

Fixed tinyMCE bug

Location:
simplr-registration-form/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • simplr-registration-form/trunk/readme.txt

    r344925 r383802  
    55Requires at least: 2.8 
    66Tested up to: 3.0 
    7 Stable tag: 1.7 
     7Stable tag: 1.8 
    88 
    99This plugin allows users to easily add a custom user registration form anywhere on their site using simple shortcode. 
     
    4747Allows user to set their own password. 
    4848Additional security to prevent registering administrative role via plugin. 
     49 
     50=1.8= 
     51Fixed tinyMCE button bug.  
  • simplr-registration-form/trunk/simplr_reg_options.php

    r344925 r383802  
    4040                <select name="role" id="reg-role"> 
    4141                    <option value="">Select role ... </option> 
    42                     <?php global $wp_roles; print_r($wp_roles); ?> 
     42                    <?php global $wp_roles; ?> 
    4343                    <?php foreach($wp_roles->role_names as $k => $v): ?> 
    4444                    <?php if($k != 'administrator'): ?> 
    45                     <option value="<?=$k; ?>"><?=$v; ?></option> 
     45                    <option value="<?php echo $k; ?>"><?php echo $v; ?></option> 
    4646                    <?php endif; ?> 
    4747                    <?php endforeach; ?> 
  • simplr-registration-form/trunk/simplr_reg_page.php

    r344925 r383802  
    2828add_shortcode('register', 'sreg_figure'); 
    2929add_shortcode('Register', 'sreg_figure'); 
    30 add_action('admin_init','action_admin_init'); 
     30add_action('admin_init','simplr_action_admin_init'); 
    3131add_action('admin_init','simplr_reg_scripts'); 
    3232 
     
    448448 
    449449 
    450 function action_admin_init() { 
     450function simplr_action_admin_init() { 
    451451    // only hook up these filters if we're in the admin panel, and the current user has permission 
    452452    // to edit posts and pages 
    453453    if ( current_user_can( 'edit_posts' ) && current_user_can( 'edit_pages' ) ) { 
    454         add_filter( 'mce_buttons', 'filter_mce_button' ); 
    455         add_filter( 'mce_external_plugins', 'filter_mce_plugin' ); 
    456     } 
    457 } 
    458  
    459 function filter_mce_button( $buttons ) { 
     454        add_filter( 'mce_buttons', 'simplr_filter_mce_button' ); 
     455        add_filter( 'mce_external_plugins', 'simplr_filter_mce_plugin' ); 
     456    } 
     457} 
     458 
     459function simplr_filter_mce_button( $buttons ) { 
    460460    array_push( $buttons, '|', 'simplr_reg_button' ); 
    461461    return $buttons; 
    462462} 
    463463 
    464 function filter_mce_plugin( $plugins ) { 
     464function simplr_filter_mce_plugin( $plugins ) { 
    465465    // this plugin file will work the magic of our button 
    466466    $plugins['simplr_reg'] = SIMPLR_DIR . 'simplr_reg.js'; 
Note: See TracChangeset for help on using the changeset viewer.