Plugin Directory

Changeset 588047


Ignore:
Timestamp:
08/20/2012 10:49:23 PM (14 years ago)
Author:
ejackisch
Message:

Bug fixes

Location:
profile-custom-content-type/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • profile-custom-content-type/trunk/class/display_text.php

    r544690 r588047  
    33
    44    extract( $options );
    5 
     5    //var_dump($value);
    66    $hide = ( isset($show) && !$show ? ' style="display:none;"': '');
    7     if($this->action == 'display' && empty($value) && !in_array($type, array('end_shell','shell') ) && empty($hide) ):
     7    if($this->action == 'display' && empty($value) && !in_array($type, array('end_shell','shell') ) && !empty($hide) ):
    88        echo "";
    99    return true;
     
    3636        break;
    3737    }
    38    
    39     if( $value )
     38    //var_dump( $content_filter );
     39    if( $this->action == 'display' )  //!!
    4040        $display = ( $content_filter ? apply_filters( $content_filter, $value ) : esc_html($value) );
    4141    else
  • profile-custom-content-type/trunk/profile-custom-content-type.php

    r579420 r588047  
    33Plugin Name: Profile Custom Content Type
    44Plugin URI:
    5 Version: 1.2
     5Version: 1.2.1
    66Text Domain: profile_cct
    77Domain Path: /languages
     
    745745        $mypost['post_excerpt'] = $post->post_excerpt;
    746746
     747        kses_remove_filters();
    747748        wp_update_post( $mypost );
     749        kses_init_filters();
    748750
    749751    }
     
    888890            return $data;
    889891       
     892        kses_remove_filters();
    890893       
    891894        $profile_cct_data_previous =  get_post_meta($postarr['ID'], 'profile_cct', true);
     
    946949            ( wp_set_post_terms($postarr['ID'], $first_letter, 'profile_cct_letter', false) );
    947950        //endif;
     951        kses_init_filters();
     952       
    948953        return $data;   
    949954
  • profile-custom-content-type/trunk/readme.txt

    r579420 r588047  
    44Requires at least: 3.2
    55Tested up to: 3.4.1
    6 Stable tag: 1.2
     6Stable tag: 1.2.1
    77
    88Manage and display advanced user profiles on your website.
     
    130130== Change log ==
    131131
     132= Version 1.2.1 =
     133* Fixed bug where post formatting gets mangled sometimes
     134* Fixed bug where default values sometimes show up in profile pages
     135
    132136= Version 1.2 =
    133137* added [profilesearch] shortcode
  • profile-custom-content-type/trunk/views/fields/courses.php

    r516918 r588047  
    135135    $field->display_text( array( 'field_type'=>$type,  'class'=>'course-date-month', 'default_text'=>'May','value'=>$data['course-date-month'], 'type'=>'text' ) );
    136136    $field->display_text( array( 'field_type'=>$type,  'class'=>'course-date-year', 'default_text'=>'2012','value'=>$data['course-date-year'], 'type'=>'text' ) );
    137     $field->display_text( array( 'field_type'=>$type,  'class'=>'course-summary', 'content_filter'=>'the_content', 'default_text'=>'Continuation of the examination of accounting as a means of measurement and as an information system for external reporting purposes.','value'=>$data['course-summary'], 'type'=>'text', 'tag'=>'span') );
     137    $field->display_text( array( 'field_type'=>$type,  'class'=>'course-summary', 'content_filter'=>'profile_escape_html', 'default_text'=>'Continuation of the examination of accounting as a means of measurement and as an information system for external reporting purposes.','value'=>$data['course-summary'], 'type'=>'text', 'tag'=>'span') );
    138138    $field->display_text( array( 'field_type'=>$type, 'type'=>'end_shell', 'tag'=>'div') );
    139139}
  • profile-custom-content-type/trunk/views/fields/projects.php

    r516918 r588047  
    127127   
    128128    $field->display_text( array( 'field_type'=>$type, 'class'=>'project-title','default_text'=>'Cure for Cancer', 'value'=>$data['project-title'], 'type'=>'text' ) );
    129     $field->display_text( array( 'field_type'=>$type, 'class'=>'project-description', 'content_filter'=>'the_content', 'default_text'=>'The current research at Wayne Biotech is focused on finding a cure for cancer.', 'value'=>$data['project-description'], 'type'=>'text') );
     129    $field->display_text( array( 'field_type'=>$type, 'class'=>'project-description', 'content_filter'=>'profile_escape_html', 'default_text'=>'The current research at Wayne Biotech is focused on finding a cure for cancer.', 'value'=>$data['project-description'], 'type'=>'text') );
    130130    $field->display_text( array( 'field_type'=>$type, 'class'=>'project-website','default_text'=>'http://wayneenterprises.biz', 'separator'=>'<br />'/*needs changing?*/, 'value'=>$data['project-website'], 'type'=>'text', 'show' => in_array("project-website",$show) ) );
    131131   
  • profile-custom-content-type/trunk/views/fields/textarea.php

    r516918 r588047  
    7373    $field = Profile_CCT::get_object();
    7474   
    75     $field->display_text( array( 'field_type'=>$type, 'class'=>'textarea textarea','default_text'=>'lorem ipsum', 'content_filter'=>'the_content', 'value'=>$data['textarea'], 'tag'=>'div', 'type'=>'text') );
     75    $field->display_text( array( 'field_type'=>$type, 'class'=>'textarea textarea','default_text'=>'lorem ipsum', 'content_filter'=>'profile_escape_html', 'value'=>$data['textarea'], 'tag'=>'div', 'type'=>'text') );
    7676}
    7777
     78function profile_cct_textarea_filter( $data ) {
     79    $data = wp_kses_post( $data );
     80    return apply_filters('the_content', $data);
     81}
     82
     83add_filter( 'profile_escape_html', 'profile_cct_textarea_filter');
Note: See TracChangeset for help on using the changeset viewer.