"; $metabox_title .= esc_html__( 'ACTUS MOTION', 'actus-motion' ); $pg_type = 'post'; if ( get_current_screen()->id == "page" ) { $pg_type = 'page'; } add_meta_box( 'actus-mtn-box', $metabox_title, 'actus_mtn_box_content', $pg_type, 'normal', // Context 'default' // Priority ); } /** * Metaboxes Content * * Initialize and display the ACTUS motion metaboxes. * * @global array $actus_mtn_admin_options The array of motion options. * * @constant string ACTUS_MTN_URL URL of the Plugin. */ function actus_mtn_box_content( $post ) { global $actus_mtn_admin_options; $events_str = ''; foreach ($actus_mtn_admin_options['motion-events'] as $key => $event) { $events_str .= $key . ','; } $events_str = rtrim($events_str, ','); ?>
ADD MOTION
">

move

element

on load

animate IN

ADD ITEM
ID; // Check if our nonce is set. if ( isset( $_POST['actus_mtn_save_nonce'] ) ) { // Verify that the nonce is valid. if ( wp_verify_nonce( $_POST['actus_mtn_save_nonce'], 'actus_mtn_save_nonce' ) ) { // SAVE motion array if ( isset( $_POST['actus_motion_array'] ) ) { $data = sanitize_text_field( $_POST['actus_motion_array'] ); update_post_meta( $post_id, 'actus_motion_array', $data ); } } } }