&&
current_user_can( 'edit_theme_options'
) &&
current_theme_supports( 'menus'
) ) { $privacy_page_updated_message =
sprintf( /* translators: %s: URL to Customizer -> Menus. */
__( 'Privacy Policy page setting updated successfully. Remember to <a href="%s">update your menus</a>!'
),
esc_url( add_query_arg( 'autofocus[panel]', 'nav_menus',
admin_url( 'customize.php'
) ) ) );
} } add_settings_error( 'page_for_privacy_policy', 'page_for_privacy_policy',
$privacy_page_updated_message, 'success'
);
} elseif ( 'create-privacy-page' ===
$action ) { if ( !
class_exists( 'WP_Privacy_Policy_Content'
) ) { require_once ABSPATH . 'wp-admin/includes/class-wp-privacy-policy-content.php';
} $privacy_policy_page_content = WP_Privacy_Policy_Content::
get_default_content();
$privacy_policy_page_id =
wp_insert_post( array
( 'post_title' =>
__( 'Privacy Policy'
),
'post_status' => 'draft',