ID, '_is_advertisement', true); wp_nonce_field('advertisement_nonce', 'advertisement_nonce_field'); echo ''; }, ['anew', 'yellow', 'profile_article'], 'side', 'low' ); }); add_action('save_post', function($post_id) { if (!isset($_POST['advertisement_nonce_field']) || !wp_verify_nonce($_POST['advertisement_nonce_field'], 'advertisement_nonce')) return; if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) return; if (!current_user_can('edit_post', $post_id)) return; update_post_meta($post_id, '_is_advertisement', isset($_POST['is_advertisement']) ? '1' : '0'); }); add_action('admin_head', function() { echo ''; });