WordPress.org

Ready to get started?Download WordPress

Forums

WP Page Widget
[resolved] TURN ON WP_DEBUG (3 posts)

  1. lucasstark
    Member
    Posted 1 year ago #

    I am getting so tired of plugin authors that do not check if their plugin is generating any warnings or notices. When working locally I always have WP_DEBUG on making it a huge pain when plugin authors, like this, can't check their own work to make sure it's not generating messages.

    Please fix your warnings.

    http://wordpress.org/extend/plugins/wp-page-widget/

  2. joost de keijzer
    Member
    Posted 1 year ago #

    I agree.

    Below a patch for some Notice fixes:

    diff --git a/httpdocs/wp-content/plugins/wp-page-widget/wp-page-widgets.php b/httpdocs/wp-content/plugins/wp-page-widget/wp-page-widgets.php
    index 2c6a2cf..50c0e7d 100644
    --- a/httpdocs/wp-content/plugins/wp-page-widget/wp-page-widgets.php
    +++ b/httpdocs/wp-content/plugins/wp-page-widget/wp-page-widgets.php
    @@ -444,7 +444,7 @@ function pw_metabox_content($post) {
     	</div>
    
     	<div style="padding: 5px;">
    
    -	<!--	<a id="pw-button-customize" class="<?php echo $pw_class ?>" href="#"><span class="customize">Customize</span><span class="default">Default</span></a>-->
    
    +<?php /*		<a id="pw-button-customize" class="<?php echo $pw_class ?>" href="#"><span class="customize">Customize</span><span class="default">Default</span></a> */ ?>
    
     		<input type="radio" class="pw-toggle-customize" name="pw-customize-sidebars" value="no" <?php checked($customize, 'no') ?> /> Default (follow <a href="<?php echo admin_url('widgets.php') ?>">Widgets settings</a>)
    
     		&nbsp;&nbsp;&nbsp;<input class="pw-toggle-customize" type="radio" name="pw-customize-sidebars" value="yes" <?php checked($customize, 'yes') ?> /> Customize
    
     		<br class="clear" />
    
    @@ -776,10 +776,10 @@ function pw_ajax_toggle_customize() {
     	$status = stripslashes($_POST['pw-customize-sidebars']);
    
     	$post_id = (int) $_POST['post_id'];
    
    -	$search_page = $_POST['search_page'];
    
    +	$search_page = ( isset( $_POST['search_page'] ) ? $_POST['search_page'] : '' );
    
    -	$tag_id = (int) $_POST['tag_id'];
    
    -	$taxonomy = $_POST['taxonomy'];
    
    +	$tag_id = ( isset( $_POST['tag_id'] ) ? (int) $_POST['tag_id'] : 0 );
    
    +	$taxonomy = ( isset( $_POST['taxonomy'] ) ? $_POST['taxonomy'] : '' );
    
     	if (!in_array($status, array('yes', 'no')))
    
     		$status = 'no';
  3. NgaVuThanh
    Member
    Posted 1 year ago #

    Dear all!
    The lastest of this plugin works well when turn on WP debug now.

    Best regards,

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.