Exemplo n.º 1
0
/**
 * Registers a form for a option.
 *
 * @param string $form_name
 * @param string $option_group
 * @param array $form_args
 */
function register_option_form($form_name, $option_group, $form_args = array())
{
    WP_Metadata::register_form($form_name, "option:{$option_group}", $form_args);
}
Exemplo n.º 2
0
/**
 * Registers a form for a post.
 *
 * @param string $form_name
 * @param bool|string $post_type
 * @param array $form_args
 */
function register_post_form($form_name, $post_type = false, $form_args = array())
{
    WP_Metadata::register_form($form_name, wp_get_post_object_type($post_type), $form_args);
}
Exemplo n.º 3
0
/**
 * Registers a form for a user.
 *
 * @param string $form_name
 * @param bool|string $user_role
 * @param array $field_args
 */
function register_user_form($form_name, $user_role = false, $form_args = array())
{
    WP_Metadata::register_form($form_name, wp_get_user_object_type($user_role), $form_args);
}