Plugin Directory

Changeset 513137


Ignore:
Timestamp:
03/01/2012 09:21:03 PM (14 years ago)
Author:
oltdev
Message:
  • bug fix: the editor supports content being entered in it better.
  • feature: you are able to remove the editor and by adding define("PEOPLE_LIST_VISUAL_EDITOR", false); to wp-config.php
Location:
people-lists/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • people-lists/trunk/people-lists.php

    r496334 r513137  
    88 *              using the People Lists template (which can be styled using HTML) that provides codes for every field that is
    99 *              desired to be displayed.     
    10  * Author: Gagan Sandhu / Enej Bajgoric / CTLT DEV
    11  * Version: 1.3.9
     10 * Author: Gagan Sandhu , Enej Bajgoric , CTLT DEV, UBC
     11 * Version: 1.3.10
    1212 * Author URI: http://www.ctlt.ubc.ca
    1313 * 
     
    2727 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    2828 */
     29 
     30# now you can define to for people list to not include the visual editor for
     31# there are other plugins that do that quite well
     32# like http://wordpress.org/extend/plugins/visual-biography-editor/
     33
     34
     35
     36if(!defined("PEOPLE_LIST_VISUAL_EDITOR"));
     37    define("PEOPLE_LIST_VISUAL_EDITOR", true);
    2938
    3039add_action('admin_print_styles-settings_page_people_lists', 'people_list_options_init_style' );
    3140add_action('admin_print_scripts-settings_page_people_lists', 'people_list_options_init_script' );
    3241
    33 add_action('admin_print_scripts-user-edit.php', 'people_lists_tinymce_init_script');
    34 add_action('admin_print_scripts-profile.php', 'people_lists_tinymce_init_script');
    35 
    36 add_action('admin_print_styles-user-edit.php', 'people_lists_tinymce_init_style');
    37 add_action('admin_print_styles-profile.php', 'people_lists_tinymce_init_style');
    38 
     42if(PEOPLE_LIST_VISUAL_EDITOR):
     43    add_action('admin_print_scripts-user-edit.php', 'people_lists_tinymce_init_script');
     44    add_action('admin_print_scripts-profile.php', 'people_lists_tinymce_init_script');
     45   
     46    add_action('admin_print_styles-user-edit.php', 'people_lists_tinymce_init_style');
     47    add_action('admin_print_styles-profile.php', 'people_lists_tinymce_init_style');
     48   
     49    // add wysiwig textarea to  to
     50    add_action('show_user_profile', 'people_list_edit_user_profile_bio_field', 10, 1);
     51    add_action('edit_user_profile', 'people_list_edit_user_profile_bio_field', 10 ,1);
     52   
     53    add_action("admin_init",'people_list_edit_user_profile_bio_init');
     54    add_filter( 'get_the_author_description', 'people_list_edit_user_profile_bio_filter' );
     55   
     56   
     57    // for the media buttons - I think this could probably be removed
     58    add_action('admin_footer-user-edit.php', 'people_lists_media_buttons', 40 );
     59    add_action('admin_footer-profile.php', 'people_lists_media_buttons', 40 );
     60
     61endif;
    3962
    4063add_action('admin_footer-user-edit.php', 'wp_preload_dialogs', 30 );
    4164add_action('admin_footer-profile.php', 'wp_preload_dialogs', 30 );
    4265
    43 // for the media buttons
    44 add_action('admin_footer-user-edit.php', 'people_lists_media_buttons', 40 );
    45 add_action('admin_footer-profile.php', 'people_lists_media_buttons', 40 );
    4666
    4767
     
    5979
    6080
    61 // add wysiwig textarea to  to
    62 add_action('show_user_profile', 'people_list_edit_user_profile_bio_field', 10, 1);
    63 add_action('edit_user_profile', 'people_list_edit_user_profile_bio_field', 10 ,1);
     81
     82
    6483
    6584
     
    7796}
    7897// a better way to filter the description
    79 remove_filter('pre_user_description', 'wp_filter_kses');
    80 add_filter( 'pre_user_description', 'wp_filter_post_kses' );
     98// remove_filter('pre_user_description', 'wp_filter_kses');
     99// add_filter( 'pre_user_description', 'wp_filter_post_kses' );
     100
     101
     102
     103function people_list_edit_user_profile_bio_init() {
     104    remove_all_filters('pre_user_description');
     105}
     106function people_list_edit_user_profile_bio_filter($bio){
     107    return apply_filters('the_content', $bio);
     108}
    81109
    82110/**
  • people-lists/trunk/readme.txt

    r496334 r513137  
    11=== People Lists ===
    2 Contributors: sgagan, enej, ctlt-dev
     2Contributors: sgagan, enej, ctlt-dev, ubcdev
    33Tags: people lists, people, list, form, user profile, user avatar, thumbnail, upload photo, user, users, profile, biography, profile biography, user profile, description, profile description, rich text, wysiwyg, tinyMCE, photos, images,  members, directory, profiles, jQuery, sortable, tabbable, thickbox, overlay, media button, Your Profile
    44Requires at least: 3.3
     
    9696
    9797== Changelog ==
     98
     99= 1.3.10 =
     100* bug fix: the editor supports content being entered in it better.
     101* feature: you are able to remove the editor and by adding `define("PEOPLE_LIST_VISUAL_EDITOR", false);` to wp-config.php
     102
    98103= 1.3.9 =
    99104* bug fix: The editor converted was escaping the html string
Note: See TracChangeset for help on using the changeset viewer.