WordPress.org

Ready to get started?Download WordPress

Forums

Codepress Admin Columns
[resolved] handle_requests function is interfering with Radio Button for Taxo (2 posts)

  1. helgatheviking
    Member
    Posted 1 year ago #

    Hi,

    This just came up in the support forum for my plugin, Radio Buttons for Taxonomies:

    http://wordpress.org/support/topic/plugin-radio-buttons-for-taxonomies-notice-on-activation?replies=26#post-3196331

    Basically the user is experiencing problems saving the settings on my plugin's options page. He is running the Codepress Admin Columns plugin and I have traced the issue to the following function:

    public function handle_requests()
    {
    	// settings updated
    	if ( ! empty($_REQUEST['settings-updated']) )
    		$this->store_wp_default_columns();			
    
    	// restore defaults
    	if ( ! empty($_REQUEST['cpac-restore-defaults']) )
    		$this->restore_defaults();
    
    }

    By not checking that you are on your own plugin's settings page, your "settings-updated" check is true for pretty much every plugin using the settings API and your plugin is creating unintended consequences for mine. It isn't the end of the world, but it'd be cool if you could check into that when you have a chance.

    thanks and cheers!

    -kathy

    http://wordpress.org/extend/plugins/codepress-admin-columns/

  2. Tobias Schutter
    Member
    Plugin Author

    Posted 1 year ago #

    I have a fix ready for this. I will include this in the next release v1.4.6.5.

    In the meanwhile you can change the code to:

    public function handle_requests()
    	{
    		// only handle updates from the admin columns page
    		if ( isset($_REQUEST['page']) && CPAC_SLUG == $_REQUEST['page'] ) {
    
    			// settings updated
    			if ( ! empty($_REQUEST['settings-updated']) ) {
    				$this->store_wp_default_columns();
    			}
    
    			// restore defaults
    			if ( ! empty($_REQUEST['cpac-restore-defaults']) ) {
    				$this->restore_defaults();
    			}
    		}
    	}

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic