gdcet_add_metabox_to_post_editor

Developer Knowledge Level

This content is intended for WordPress developers, and it may require coding knowledge of WordPress, PHP, and JavaScript. Code examples provided here may contain errors or needs some additional coding. Make sure to test the code before using it on a live website!

Control the process of adding metabox to individual posts/pages editors. Initial determination is done by checking if the metabox is enabled for the current post post type, and if current page uses one of the templates enabled for the metabox use (this is optional, and works with page post type only).

PHP
Definition
apply_filters( gdcet_add_metabox_to_post_editor, $add, $metabox, $post_type, $post_id );
Arguments
Name
Type
Description
$add
Boolean
Determines if the metabox should be added
$metabox
Array
Array with the metabox settings
$post_type
String
Post type for the current post.
$post_id
Integer
ID of the current post.
Returns
Boolean Return TRUE or FALSE, controlling if the metabox will be added or not.

Array $metabox contains all the settings for the metabox, including all the fields linked to that metabox.

0
0
65
Rate this reference

You are not allowed to rate this post.

Leave a Comment