plugin conflict with add_action('add_meta_boxes')
-
CPT-onomies version 1.2.1
Rachel, I’m wanting to use your superb cpt-onomies plugin in combination with another plugin (WCK Post Type Creator by Madalin Ungureanu) that creates admin meta boxes, and I’m finding that the method of hooking into WordPress that he’s using appears to conflict with the one you’re using.
I’m seeing this error message:
Warning: Missing argument 2 for CPT_ONOMIES_ADMIN::add_cpt_onomy_meta_boxes() in [...]/wp-content/plugins/cpt-onomies/admin.php on line 416
Line 416 reads:
public function add_cpt_onomy_meta_boxes( $post_type, $post )
That error looks perplexing, since the above function does indeed have two arguments, but I suspect the problem lies one layer back:
// add CPT-onomy "edit" meta boxes add_action( 'add_meta_boxes', array( &$this, 'add_cpt_onomy_meta_boxes' ), 10, 2 );
Compare this to the other plugin, custom-fields-creator/wck-cfc.php:
add_action('add_meta_boxes', 'wck_cfc_add_side_boxes' );
and:
function wck_cfc_add_side_boxes()
According to the WordPress codex page, add_action() takes two required parameters and two optional ones.
Does this error result from the different number of parameters specified by the two plugins? Do you know of a way to resolve it short of persuading plugin authors to use the same number of parameters for
add_meta_boxes
[whether or not they’re needed]? Or does the true source of the conflict lie elsewhere?
- The topic ‘plugin conflict with add_action('add_meta_boxes')’ is closed to new replies.