vendredi 17 avril 2015

Cant add a meta box to a comment editor

I'm trying to add metabox on comment editor page to upload a custom avatar and my metabox doesn't showing. I added this standart WP code in function.php with screen parameter 'comment', witch I found in annotation to function



@param string|WP_Screen $screen Optional. The screen on which to show the box (like a post type, 'link', or 'comment'). Default is the current screen.




function myplugin_add_meta_box() {

$screens = array( 'post', 'comment', 'page' );

foreach ( $screens as $screen ) {

add_meta_box(
'myplugin_sectionid',
__( 'My Post Section Title', 'myplugin_textdomain' ),
'myplugin_meta_box_callback',
$screen
);
}
}


Generaly I have metabox on post-editor screen, page-editor screen, and haven't on comment-editor screen.


Aucun commentaire:

Enregistrer un commentaire