true]) as $type) { add_meta_box( 'aemi_meta_tags', __( 'Meta Tags', 'aemi' ), 'aemi_meta_tags_callback', $type ); } } } if (!function_exists('aemi_meta_tags_data')) { function aemi_meta_tags_data($post) { $data = []; if (isset($post)) { $data['author'] = [ 'value' => get_post_meta( $post->ID, 'aemi_meta_author', true ) ]; $data['description'] = [ 'value' => get_post_meta( $post->ID, 'aemi_meta_description', true ) ]; $data['keywords'] = [ 'value' => get_post_meta( $post->ID, 'aemi_meta_keywords', true ) ]; } else { $data['author'] = [ 'value' => '' ]; $data['description'] = [ 'value' => '' ]; $data['keywords'] = [ 'value' => '' ]; } if ($data['author']['value'] == '') { $data['author']['value'] = get_the_author(); } if ($data['description']['value'] == '') { $data['description']['value'] = aemi_get_meta_desc($post); } return $data; } } if (!function_exists('aemi_meta_tags_callback')) { function aemi_meta_tags_callback($post) { wp_nonce_field( 'aemi_meta_tags_nonce', 'aemi_meta_tags_nonce' ); $opt = aemi_meta_tags_data($post); ?>
$v) { if (isset($v['value']) && $v['value']!='') { ?>