";
$metabox_title .= esc_html__( 'ACTUS Animated Words Slider', 'actus-aaws' );
$pg_type = 'post';
if ( get_current_screen()->id == "page" ) {
$pg_type = 'page';
}
add_meta_box(
'actus-aaws-box',
$metabox_title,
'actus_aaws_box_content',
$pg_type,
'normal', // Context
'default' // Priority
);
}
/**
* Metaboxes Content
*
* Initialize and display the slider administration metaboxes.
*
* @variable string $post_images All the images of the post.
* @variable string $image Image value in iteration.
* @variable string $chkbx The checkbox icon url.
* @variable string $clss Defines the inactive class.
*
* @global array $actus_aaws_options The slider administgration options.
* @global array $actus_aaws_slider_options The options for the slider animation.
*
* @constant string ACTUS_AAWS_URL URL of the Plugin.
*/
function actus_aaws_box_content( $post ) {
global $actus_aaws_options,
$actus_aaws_slider_options;
$post_images = $actus_aaws_options[ 'images' ];
?>
SLIDER PREVIEW
SLIDER FLOW
SLIDER OPTIONS
image zoom
image rotation
words
SELECT IMAGES
attached images
";
echo "

";
echo "
";
}
foreach( $post_images[ 'uploaded' ] as $image ) {
$clss = '';
if ( $image[ 'status' ] == 0 ) {
$clss = 'inactive';
}
echo "
";
echo "

";
echo "
";
}
?>
content images
";
echo "

";
echo "
";
}
echo '
';
?>
from galleries
";
echo "

";
echo "
";
}
echo '
';
?>
WORDS TO BE ANIMATED
post content
post tags
other words
ID;
/*
// Authorization Check
if ( empty( $post ) || empty( $post_id ) || empty( $_POST ) ) return;
if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) return;
if ( is_int( wp_is_post_revision( $post ) ) ) return;
if ( is_int( wp_is_post_autosave( $post ) ) ) return;
if ( isset( $_POST['post_type'] ) && 'page' == $_POST['post_type'] ) {
if ( ! current_user_can( 'edit_page', $post_id ) ) {
return;
}
} else {
if ( ! current_user_can( 'edit_post', $post_id ) ) {
return;
}
}
*/
// Check if our nonce is set.
if ( isset( $_POST['actus_aaws_save_nonce'] ) ) {
// Verify that the nonce is valid.
if ( wp_verify_nonce( $_POST['actus_aaws_save_nonce'], 'actus_aaws_save_nonce' ) ) {
// SAVE options (actus_aaws_options)
if ( isset( $_POST['actus_aaws_options'] ) ) {
$data = sanitize_text_field( $_POST['actus_aaws_options'] );
update_post_meta( $post_id, 'actus_aaws_options', $data );
}
// SAVE slide options (actus_aaws_slider_options)
if ( isset( $_POST['actus_aaws_slider_options'] ) ) {
$data = sanitize_text_field( $_POST['actus_aaws_slider_options'] );
update_post_meta( $post_id, 'actus_aaws_slider_options', $data );
}
}
}
}