WordPress.org

Ready to get started?Download WordPress

Forums

My Content Management
[Mini-bugs+fix] undefined variables and such (1 post)

  1. jrf
    Member
    Posted 1 year ago #

    Hiya, when upgrading I did a quick check for any changes I might have made to the code myself and found that I fixed the below. I hope you'll accept these fixes for the plugin core code.

    Hope this helps,
    Smile, Juliette

    ***********

    File: mcm_view_custom_posts.php

    Find line 228:

    <div class='mcm_posts $primary $display'>
    		$front
    			$return
    		$back
    		</div>";

    Replace with:

    <div class='mcm_posts $primary $display'>
    		" . ( isset( $front ) ? $front : '' ) . "
    			$return
    		" . ( isset( $back ) ? $back : '' ) . "
    		</div>";

    *******************

    File: mcm_widgets.php

    Find line 86:

    $post_type = esc_attr($instance['mcm_posts_widget_post_type']);
    		$display = esc_attr($instance['display']);
    		$count = (int) $instance['count'];
    		$direction = esc_attr($instance['direction']);
    		$order = esc_attr($instance['order']);
    		$title = esc_attr($instance['title']);
    		$term = ( isset($instance['term']) )?esc_attr($instance['term']):'';

    Replace with:

    $post_type = isset( $instance['mcm_posts_widget_post_type'] ) ? esc_attr($instance['mcm_posts_widget_post_type']) : '';
    		$display = isset( $instance['display'] ) ? esc_attr($instance['display']) : '';
    		$count = isset( $instance['count'] ) ? (int) $instance['count'] : -1;
    		$direction = isset( $instance['direction'] ) ? esc_attr($instance['direction']) : '';
    		$order = isset( $instance['order'] )? esc_attr($instance['order']) : '';
    		$title = isset( $instance['title'] ) ? esc_attr($instance['title']) : '';
    		$term = isset($instance['term']) ? esc_attr($instance['term']) : '';

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic