Support » Plugin: Admin Columns » [Plugin: Codepress Admin Columns] handle_requests function is interfering with Radio Button for Taxo

  • Resolved helgatheviking

    (@helgatheviking)


    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/

Viewing 1 replies (of 1 total)
  • Plugin Author Tobias Schutter

    (@tschutter)

    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();
    			}
    		}
    	}
Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Codepress Admin Columns] handle_requests function is interfering with Radio Button for Taxo’ is closed to new replies.