Created
March 1, 2024 11:15
-
-
Save LC43/8114af146e750cb99ccf43937bb36e9d to your computer and use it in GitHub Desktop.
meta box
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** button actions */ | |
function render_point_actions_meta_box( $post ) { | |
// Display the save button | |
$button = sprintf( | |
'<input type="submit" name="save_custom" id="save_custom" class="" value="%1$s">', | |
esc_html__( 'Save', 'iglobes' ) | |
); | |
printf( '<div class="custom-save-button">%1$s</div>', $button ); | |
} | |
add_action( 'add_meta_boxes', 'iglobes_point_meta' ); | |
function iglobes_point_meta() { | |
add_meta_box( | |
'point_actions_meta_box', // id | |
'Actions', // title | |
'render_point_actions_meta_box', // callback | |
'iglobe_points', // screen | |
'side', // context | |
'high' // priority | |
); | |
} | |
/* | |
or, to add to the settings: | |
in src/models/points.php:80 | |
'save' => array( | |
'type' => 'callback', | |
'function' => 'render_consultation_actions_meta_box', | |
), | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment