WordPress.org

Ready to get started?Download WordPress

Forums

My Content Management
[Few small bugs+fixes] Undefined variables and such (3 posts)

  1. jrf
    Member
    Posted 1 year ago #

    Hiya Joe,

    When doing a version compare I noticed I made a number of small changes to the plugin code - bug fixes. I hope you'll include them in the next release. Line numbers are based on the current version 1.3.2.

    Smile, Juliette

    File: mcm-widgets.php

    Find line 26-27:

    $post_type = esc_attr($instance['mcm_widget_post_type']);
    $title = esc_attr($instance['title']);

    Replace with:

    $post_type = isset( $instance['mcm_widget_post_type'] ) ? esc_attr($instance['mcm_widget_post_type']) : '';
    $title = isset( $instance['title'] ) ? esc_attr($instance['title']) : '';

    Find line 34:

    <label for="<?php echo $this->get_field_id('mcm_widget_post_type'); ?>"><?php _e('Post type to search','my-content-management'); ?></label> <select<?php echo $disabled; ?> id="<?php echo $this->get_field_id('mcm_widget_post_type'); ?>" name="<?php echo $this->get_field_name('mcm_widget_post_type'); ?>">

    Replace with:

    <label for="<?php echo $this->get_field_id('mcm_widget_post_type'); ?>"><?php _e('Post type to search','my-content-management'); ?></label> <select<?php echo $enabled; ?> id="<?php echo $this->get_field_id('mcm_widget_post_type'); ?>" name="<?php echo $this->get_field_name('mcm_widget_post_type'); ?>">

    File: my-content-management.php

    Find line 554:

    'menu_icon' => ($ns['menu_icon']=='')?null:$ns['menu_icon'],

    Replace with:

    'menu_icon' => ( !isset($ns['menu_icon']) || $ns['menu_icon']=='')?null:$ns['menu_icon'],

    Find line 570:

    'menu_icon' => $ns['menu_icon'],

    Replace with:

    'menu_icon' => ( !isset($ns['menu_icon']) || $ns['menu_icon']=='')?null:$ns['menu_icon'],

    File: my-glossary-filter.php

    Find line 85:

    $this_letter = strtolower( substr( get_the_title( $post->ID ), 0, 1 ) );

    Replace with:

    $this_letter = ( isset( $post->ID ) ? strtolower( substr( get_the_title( $post->ID ), 0, 1 ) ) : false );

    http://wordpress.org/extend/plugins/my-content-management/

  2. Joe Dolson
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks, Juliette - I appreciate those!

  3. jrf
    Member
    Posted 1 year ago #

    You're very welcome ;-)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic