Random WordPress Function

Learn about a new WordPress function every day!


Function Signature:

link_xfn_meta_box

Function Description:

Displays XFN form fields.

Function Examples:

⚠️ Examples below are generated with GPT-3 once every hour. Do not take them too seriously.
Consider them as some extra input in your learning process - reason about them. Will it work? What could fail?
// Example 1: Adding the link_xfn_meta_box to a custom post type
add_action( 'add_meta_boxes', 'custom_post_type_meta_boxes' );
function custom_post_type_meta_boxes() {
    add_meta_box( 'linkxfn', __( 'Link Relationship (XFN)' ), 'link_xfn_meta_box', 'custom_post_type', 'normal', 'high' );
}
// Example 2: Removing the link_xfn_meta_box from the default post type
add_action( 'add_meta_boxes', 'remove_default_post_meta_boxes' );
function remove_default_post_meta_boxes() {
    remove_meta_box( 'linkxfn', 'post', 'normal' );
}
// Example 3: Modifying the priority of the link_xfn_meta_box
add_action( 'add_meta_boxes', 'modify_link_xfn_meta_box_priority' );
function modify_link_xfn_meta_box_priority() {
    remove_meta_box( 'linkxfn', 'post', 'normal' );
    add_meta_box( 'linkxfn', __( 'Link Relationship (XFN)' ), 'link_xfn_meta_box', 'post', 'side', 'low' );
}