From 5196c4329a06ec30b45e0c39744d872beee8753f Mon Sep 17 00:00:00 2001 From: Ned Zimmerman Date: Mon, 31 Aug 2020 10:47:11 -0300 Subject: [PATCH] feat: remove guidance --- app/setup.php | 74 --------------------------------------------------- 1 file changed, 74 deletions(-) diff --git a/app/setup.php b/app/setup.php index 7478abc..5661d6e 100644 --- a/app/setup.php +++ b/app/setup.php @@ -177,80 +177,6 @@ echo template('partials.favicon'); }); -add_action('init', function () { - if (isset($_GET['post'])) { - $post_id = $_GET['post']; - } elseif (isset($_POST['post_ID'])) { - $post_id = $_POST['post_ID']; - } else { - return; - } - $template_file = get_post_meta($post_id, '_wp_page_template', true); - switch ($template_file) { - case 'views/front-page.blade.php': - case 'views/page-favorites.blade.php': - case 'views/page-my-resources.blade.php': - case 'views/page-saved-searches.blade.php': - case 'views/page-settings.blade.php': - case 'views/term-list.blade.php': - remove_post_type_support('page', 'editor'); - break; - default: - break; - } -}); - -add_action('edit_form_after_title', function () { - if (isset($_GET['post'])) { - $post_id = $_GET['post']; - } elseif (isset($_POST['post_ID'])) { - $post_id = $_POST['post_ID']; - } else { - return; - } - $template_file = get_post_meta($post_id, '_wp_page_template', true); - switch ($template_file) { - case 'views/front-page.blade.php': - echo sprintf( - '

%s

', - __('You are currently editing the front page.', 'pcc') - ); - break; - case 'views/page-favorites.blade.php': - echo sprintf( - '

%s

', - __('You are currently editing the page that displays a user’s favorites.', 'pcc') - ); - break; - case 'views/page-my-resources.blade.php': - echo sprintf( - '

%s

', - __('You are currently editing the page that displays a user’s saved resources.', 'pcc') - ); - break; - case 'views/page-saved-searches.blade.php': - echo sprintf( - '

%s

', - __('You are currently editing the page that displays a user’s saved searches.', 'pcc') - ); - break; - case 'views/page-settings.blade.php': - echo sprintf( - '

%s

', - __('You are currently editing the settings page.', 'pcc') - ); - break; - case 'views/term-list.blade.php': - echo sprintf( - '

%s

', - __('You are currently editing a page that displays a list of filter terms.', 'pcc') - ); - break; - default: - break; - } -}); - if (function_exists('\Sober\Intervention\intervention')) { \Sober\Intervention\intervention('remove-customizer-items', 'custom-css'); \Sober\Intervention\intervention('remove-dashboard-items', ['news', 'welcome']);