From f7b9eaf14cef5d1981a6a7603ef4460516ed48de Mon Sep 17 00:00:00 2001 From: Ritika Desai Date: Wed, 13 Dec 2023 15:32:50 -0500 Subject: [PATCH 1/2] changed menu item highlighting & added sentence case --- .../admin/class-phila-gov-admin-menu.php | 33 +++--- .../class-phila-gov-custom-post-types.php | 100 +++++++++--------- .../class-phila-gov-custom-taxonomies.php | 66 ++++++------ .../class-phila-gov-cpt-departments.php | 18 ++-- .../class-phila-gov-cpt-event-spotlight.php | 22 ++-- .../guides/class-phila-gov-cpt-guides.php | 2 +- .../phila.gov-customization/admin/js/admin.js | 37 +++++++ .../class-phila-gov-cpt-programs.php | 16 +-- .../class-phila-gov-cpt-service-page.php | 18 ++-- 9 files changed, 177 insertions(+), 135 deletions(-) diff --git a/wp/wp-content/plugins/phila.gov-customization/admin/class-phila-gov-admin-menu.php b/wp/wp-content/plugins/phila.gov-customization/admin/class-phila-gov-admin-menu.php index ceee90218..2316bc3fc 100644 --- a/wp/wp-content/plugins/phila.gov-customization/admin/class-phila-gov-admin-menu.php +++ b/wp/wp-content/plugins/phila.gov-customization/admin/class-phila-gov-admin-menu.php @@ -83,8 +83,8 @@ function admin_menu_order( $menu_ord ) { function phila_change_post_label() { global $wp_post_types; $labels = &$wp_post_types['post']->labels; - $labels->name = 'The latest news + events'; - $labels->singular_name = 'Latest item'; + $labels->name = 'News'; + $labels->singular_name = 'News'; $labels->add_new = 'Add news item'; $labels->add_new_item = 'Add news item'; $labels->edit_item = 'Edit item'; @@ -101,8 +101,8 @@ function phila_change_post_label() { function phila_change_page_label() { global $wp_post_types; $labels = &$wp_post_types['page']->labels; - $labels->name = 'Top-Level Pages'; - $labels->singular_name = 'Top-Level Page'; + $labels->name = 'Top-level pages'; + $labels->singular_name = 'Top-level page'; $labels->add_new = 'Add top-level page'; $labels->add_new_item = 'Add top-level page'; $labels->edit_item = 'Edit top-level page'; @@ -112,7 +112,7 @@ function phila_change_page_label() { $labels->not_found = 'Nothing found'; $labels->not_found_in_trash = 'Nothing found in trash'; $labels->all_items = 'All top-level pages'; - $labels->menu_name = 'Top-Level Pages'; + $labels->menu_name = 'Top-level pages'; $labels->name_admin_bar = 'Top-Level Pages'; } @@ -161,10 +161,15 @@ function add_custom_menu_separator() } function change_admin_post_label(){ - - global $submenu; - $submenu['upload.php'][5][0] = 'All Media'; - $submenu['upload.php'][10][0] = 'Add New Media'; + global $menu, $submenu; + $submenu['users.php'][5] = array( __( 'All users' ), 'list_users', 'users.php' ); + if ( current_user_can( 'create_users' ) ) { + $submenu['users.php'][10] = array( _x( 'Add new user', 'user' ), 'create_users', 'user-new.php' ); + } elseif ( is_multisite() ) { + $submenu['users.php'][10] = array( _x( 'Add new user', 'user' ), 'promote_users', 'user-new.php' ); + } + $submenu['upload.php'][5][0] = 'All media'; + $submenu['upload.php'][10][0] = 'Add new media'; // Add Menus as a Department Site submenu and program pages add_menu_page('Owners', 'Owners', 'manage_categories', 'edit-tags.php?taxonomy=category', '', 'dashicons-admin-users'); @@ -173,11 +178,11 @@ function change_admin_post_label(){ add_menu_page('Tags', 'Tags', 'manage_categories', 'edit-tags.php?taxonomy=post_tag', '', 'dashicons-tag'); add_submenu_page('edit.php', 'Announcements', 'Announcements', 'edit_posts', 'edit.php?post_type=announcement'); - add_submenu_page('edit.php?post_type=service_page', 'Add Service Page', 'Add Service Page', 'manage_categories', 'post-new.php?post_type=service_page'); - add_submenu_page('edit.php?post_type=programs', 'Add Program Page', 'Add Program Page', 'manage_categories', 'post-new.php?post_type=programs'); - add_submenu_page('edit.php?post_type=programs', 'Nav Menu', 'Navigation Menu', 'edit_posts', 'nav-menus.php'); - add_submenu_page('edit.php?post_type=department_page', 'Add Department Page', 'Add Department Page', 'manage_categories', 'post-new.php?post_type=department_page'); - add_submenu_page('edit.php?post_type=department_page', 'Nav Menu', 'Navigation Menu', 'edit_posts', 'nav-menus.php'); + add_submenu_page('edit.php?post_type=service_page', 'Add Service Page', 'Add service page', 'manage_categories', 'post-new.php?post_type=service_page'); + add_submenu_page('edit.php?post_type=programs', 'Add Program Page', 'Add program page', 'manage_categories', 'post-new.php?post_type=programs'); + add_submenu_page('edit.php?post_type=programs', 'Nav Menu', 'Navigation menus', 'edit_posts', 'nav-menus.php'); + add_submenu_page('edit.php?post_type=department_page', 'Add Department Page', 'Add department page', 'manage_categories', 'post-new.php?post_type=department_page'); + add_submenu_page('edit.php?post_type=department_page', 'Nav Menu', 'Navigation menus', 'edit_posts', 'nav-menus.php'); remove_menu_page( 'edit.php?post_type=announcement' ); diff --git a/wp/wp-content/plugins/phila.gov-customization/admin/class-phila-gov-custom-post-types.php b/wp/wp-content/plugins/phila.gov-customization/admin/class-phila-gov-custom-post-types.php index 23b10d542..ba2413d4d 100644 --- a/wp/wp-content/plugins/phila.gov-customization/admin/class-phila-gov-custom-post-types.php +++ b/wp/wp-content/plugins/phila.gov-customization/admin/class-phila-gov-custom-post-types.php @@ -71,16 +71,16 @@ function create_phila_service_updates() { register_post_type( 'service_updates', array( 'labels' => array( - 'name' => __( 'Service Updates' ), - 'singular_name' => __( 'Service Update' ), - 'add_new' => __( 'Add Service Update' ), - 'all_items' => __( 'All Service Updates' ), - 'add_new_item' => __( 'Add Service Update' ), - 'edit_item' => __( 'Edit Service Update' ), - 'view_item' => __( 'View Service Update' ), - 'search_items' => __( 'Search Service Updates'), - 'not_found' => __( 'Service Update not found' ), - 'not_found_in_trash' => __( 'Service Update not found in trash' ), + 'name' => __( 'Service updates' ), + 'singular_name' => __( 'Service update' ), + 'add_new' => __( 'Add service update' ), + 'all_items' => __( 'All service updates' ), + 'add_new_item' => __( 'Add service update' ), + 'edit_item' => __( 'Edit service update' ), + 'view_item' => __( 'View service update' ), + 'search_items' => __( 'Search service updates'), + 'not_found' => __( 'Service update not found' ), + 'not_found_in_trash' => __( 'Service update not found in trash' ), ), 'taxonomies' => array('category'), 'supports' => array( @@ -183,16 +183,16 @@ function create_phila_site_wide_alert() { register_post_type( 'site_wide_alert', array( 'labels' => array( - 'name' => __( 'Site-wide Alerts' ), - 'singular_name' => __( 'Site-wide Alert' ), - 'add_new' => __( 'Add Site-wide Alert' ), - 'all_items' => __( 'All Site-wide Alerts' ), - 'add_new_item' => __( 'Add Site-wide Alerts' ), - 'edit_item' => __( 'Edit Site-wide Alerts' ), - 'view_item' => __( 'View Site-wide Alerts' ), - 'search_items' => __( 'Search Site-wide Alerts'), - 'not_found' => __( 'Site-wide Alert not found' ), - 'not_found_in_trash' => __( 'Site-wide Alert not found in trash' ), + 'name' => __( 'Site-wide alerts' ), + 'singular_name' => __( 'Site-wide alert' ), + 'add_new' => __( 'Add site-wide alert' ), + 'all_items' => __( 'All site-wide alerts' ), + 'add_new_item' => __( 'Add site-wide alert' ), + 'edit_item' => __( 'Edit site-wide alerts' ), + 'view_item' => __( 'View site-wide alerts' ), + 'search_items' => __( 'Search site-wide alerts'), + 'not_found' => __( 'Site-wide alert not found' ), + 'not_found_in_trash' => __( 'Site-wide alert not found in trash' ), ), 'exclude_from_search' => true, 'show_in_rest' => true, @@ -215,16 +215,16 @@ function create_phila_document() { register_post_type( 'document', array( 'labels' => array( - 'name' => __( 'Document Page' ), - 'singular_name' => __( 'Document Page' ), - 'add_new' => __( 'Add Document Page' ), - 'all_items' => __( 'All Document Pages' ), - 'add_new_item' => __( 'Add New Document Page' ), - 'edit_item' => __( 'Edit Document Page' ), - 'view_item' => __( 'View Document Page' ), - 'search_items' => __( 'Search Document Pages' ), - 'not_found' => __( 'Document Page Not Found' ), - 'not_found_in_trash' => __( 'Document Page not found in trash' ), + 'name' => __( 'Document pages' ), + 'singular_name' => __( 'Document page' ), + 'add_new' => __( 'Add document page' ), + 'all_items' => __( 'All document pages' ), + 'add_new_item' => __( 'Add document page' ), + 'edit_item' => __( 'Edit document page' ), + 'view_item' => __( 'View document page' ), + 'search_items' => __( 'Search document pages' ), + 'not_found' => __( 'Document page Not Found' ), + 'not_found_in_trash' => __( 'Document page not found in trash' ), ), 'taxonomies' => array( 'category', @@ -331,16 +331,16 @@ function create_phila_staff_directory() { register_post_type( 'staff_directory', array( 'labels' => array( - 'name' => __( 'Staff Members' ), - 'singular_name' => __( 'Staff Member' ), - 'add_new' => __( 'Add Staff Member' ), - 'all_items' => __( 'All Staff Members' ), - 'add_new_item' => __( 'Add Staff Member' ), - 'edit_item' => __( 'Edit Staff Members' ), - 'view_item' => __( 'View Staff Members' ), - 'search_items' => __( 'Search Staff Members'), - 'not_found' => __( 'Staff Member not found' ), - 'not_found_in_trash' => __( 'Staff Member entry not found in trash' ), + 'name' => __( 'Staff members' ), + 'singular_name' => __( 'Staff member' ), + 'add_new' => __( 'Add staff member' ), + 'all_items' => __( 'All staff' ), + 'add_new_item' => __( 'Add staff member' ), + 'edit_item' => __( 'Edit staff members' ), + 'view_item' => __( 'View staff members' ), + 'search_items' => __( 'Search staff members'), + 'not_found' => __( 'Staff member not found' ), + 'not_found_in_trash' => __( 'Staff member entry not found in trash' ), ), 'taxonomies' => array('category'), 'supports' => array( @@ -367,16 +367,16 @@ function create_phila_longform_content() { register_post_type( 'longform_content', array( 'labels' => array( - 'name' => __( 'Longform Page' ), - 'singular_name' => __( 'Longform Page' ), - 'add_new' => __( 'Add Longform Page' ), - 'all_items' => __( 'All Longform Pages' ), - 'add_new_item' => __( 'Add New Longform Page' ), - 'edit_item' => __( 'Edit Longform Page' ), - 'view_item' => __( 'View Longform Page' ), - 'search_items' => __( 'Search Longform Pages' ), - 'not_found' => __( 'Longform Page Not Found' ), - 'not_found_in_trash' => __( 'Longform Page not found in trash' ), + 'name' => __( 'Long-form page' ), + 'singular_name' => __( 'Long-form page' ), + 'add_new' => __( 'Add long-form page' ), + 'all_items' => __( 'All long-form pages' ), + 'add_new_item' => __( 'Add longform page' ), + 'edit_item' => __( 'Edit longform page' ), + 'view_item' => __( 'View longform page' ), + 'search_items' => __( 'Search longform pages' ), + 'not_found' => __( 'Longform page Not Found' ), + 'not_found_in_trash' => __( 'Longform page not found in trash' ), ), 'taxonomies' => array( 'category', diff --git a/wp/wp-content/plugins/phila.gov-customization/admin/class-phila-gov-custom-taxonomies.php b/wp/wp-content/plugins/phila.gov-customization/admin/class-phila-gov-custom-taxonomies.php index 545c498cc..bd0d349d4 100644 --- a/wp/wp-content/plugins/phila.gov-customization/admin/class-phila-gov-custom-taxonomies.php +++ b/wp/wp-content/plugins/phila.gov-customization/admin/class-phila-gov-custom-taxonomies.php @@ -66,12 +66,12 @@ function audiences() { 'labels' => array( 'name' => _x( 'Audiences', 'phila-gov'), 'singular_name' => _x( 'Audience', 'phila-gov' ), - 'search_items' => __( 'Search Audiences' ), - 'all_items' => __( 'All Audiences' ), - 'edit_item' => __( 'Edit Audience' ), - 'update_item' => __( 'Update Audience' ), - 'add_new_item' => __( 'Add New Audience' ), - 'new_item_name' => __( 'New Audience' ), + 'search_items' => __( 'Search audiences' ), + 'all_items' => __( 'All audiences' ), + 'edit_item' => __( 'Edit audience' ), + 'update_item' => __( 'Update audience' ), + 'add_new_item' => __( 'Add New audience' ), + 'new_item_name' => __( 'New audience' ), 'menu_name' => __( 'Audiences' ), ), 'public' => true, @@ -93,15 +93,15 @@ function media_type() { array( 'hierarchical' => true, 'labels' => array( - 'name' => _x( 'Media Type', 'phila-gov'), - 'singular_name' => _x( 'Media Type', 'phila-gov'), - 'search_items' => __( 'Search Media Types' ), - 'all_items' => __( 'All Media Types' ), - 'edit_item' => __( 'Edit Media Type' ), - 'update_item' => __( 'Update Media Type' ), - 'add_new_item' => __( 'Add New Media Type' ), - 'new_item_name' => __( 'New Media Type Name' ), - 'menu_name' => __( 'Media Types' ), + 'name' => _x( 'Media type', 'phila-gov'), + 'singular_name' => _x( 'Media type', 'phila-gov'), + 'search_items' => __( 'Search media types' ), + 'all_items' => __( 'All media types' ), + 'edit_item' => __( 'Edit media type' ), + 'update_item' => __( 'Update media type' ), + 'add_new_item' => __( 'Add New media type' ), + 'new_item_name' => __( 'New media type Name' ), + 'menu_name' => __( 'Media types' ), ), 'public' => true, 'show_admin_column' => true, @@ -120,15 +120,15 @@ function media_author() { array( 'hierarchical' => true, 'labels' => array( - 'name' => _x( 'Media Author', 'phila-gov'), - 'singular_name' => _x( 'Media Author', 'phila-gov'), - 'search_items' => __( 'Search Media Author' ), - 'all_items' => __( 'All Media Authors' ), - 'edit_item' => __( 'Edit Media Author' ), - 'update_item' => __( 'Update Media Author' ), - 'add_new_item' => __( 'Add New Media Author' ), - 'new_item_name' => __( 'New Media Author Name' ), - 'menu_name' => __( 'Media Author' ), + 'name' => _x( 'Media author', 'phila-gov'), + 'singular_name' => _x( 'Media author', 'phila-gov'), + 'search_items' => __( 'Search media author' ), + 'all_items' => __( 'All media authors' ), + 'edit_item' => __( 'Edit media author' ), + 'update_item' => __( 'Update media author' ), + 'add_new_item' => __( 'Add New media author' ), + 'new_item_name' => __( 'New media author Name' ), + 'menu_name' => __( 'Media author' ), ), 'public' => true, 'show_admin_column' => true, @@ -147,15 +147,15 @@ function media_category() { array( 'hierarchical' => true, 'labels' => array( - 'name' => _x( 'Media Category', 'phila-gov'), - 'singular_name' => _x( 'Media Category', 'phila-gov'), - 'search_items' => __( 'Search Media Categories' ), - 'all_items' => __( 'All Media Categories' ), - 'edit_item' => __( 'Edit Media Category' ), - 'update_item' => __( 'Update Media Category' ), - 'add_new_item' => __( 'Add New Media Category' ), - 'new_item_name' => __( 'New Media Category Name' ), - 'menu_name' => __( 'Media Categories' ), + 'name' => _x( 'Media category', 'phila-gov'), + 'singular_name' => _x( 'Media category', 'phila-gov'), + 'search_items' => __( 'Search media categories' ), + 'all_items' => __( 'All media categories' ), + 'edit_item' => __( 'Edit media category' ), + 'update_item' => __( 'Update media category' ), + 'add_new_item' => __( 'Add New media category' ), + 'new_item_name' => __( 'New media category Name' ), + 'menu_name' => __( 'Media categories' ), ), 'public' => true, 'show_admin_column' => true, diff --git a/wp/wp-content/plugins/phila.gov-customization/admin/departments/class-phila-gov-cpt-departments.php b/wp/wp-content/plugins/phila.gov-customization/admin/departments/class-phila-gov-cpt-departments.php index 0a9bb08c2..ddd1e561d 100644 --- a/wp/wp-content/plugins/phila.gov-customization/admin/departments/class-phila-gov-cpt-departments.php +++ b/wp/wp-content/plugins/phila.gov-customization/admin/departments/class-phila-gov-cpt-departments.php @@ -21,16 +21,16 @@ function create_phila_department_pages() { array( 'labels' => array( 'name' => __( 'Department page' ), - 'menu_name' => __('Department Pages'), + 'menu_name' => __('Department pages'), 'singular_name' => __( 'Department page' ), - 'add_new' => __( 'Add a Page' ), - 'all_items' => __( 'All Department Pages' ), - 'add_new_item' => __( 'Add a Department Page' ), - 'edit_item' => __( 'Edit Department Page' ), - 'view_item' => __( 'View Department Page' ), - 'search_items' => __( 'Search Department Pages' ), - 'not_found' => __( 'No Pages Found' ), - 'not_found_in_trash' => __( 'Department Page not found in trash' ), + 'add_new' => __( 'Add a page' ), + 'all_items' => __( 'All department pages' ), + 'add_new_item' => __( 'Add department page' ), + 'edit_item' => __( 'Edit department page' ), + 'view_item' => __( 'View department page' ), + 'search_items' => __( 'Search department pages' ), + 'not_found' => __( 'No pages found' ), + 'not_found_in_trash' => __( 'Department page not found in trash' ), ), 'taxonomies' => array('category'), 'supports' => array( diff --git a/wp/wp-content/plugins/phila.gov-customization/admin/event-spotlight/class-phila-gov-cpt-event-spotlight.php b/wp/wp-content/plugins/phila.gov-customization/admin/event-spotlight/class-phila-gov-cpt-event-spotlight.php index 5abb9b84d..6ea753fd4 100644 --- a/wp/wp-content/plugins/phila.gov-customization/admin/event-spotlight/class-phila-gov-cpt-event-spotlight.php +++ b/wp/wp-content/plugins/phila.gov-customization/admin/event-spotlight/class-phila-gov-cpt-event-spotlight.php @@ -20,17 +20,17 @@ function create_phila_event_spotlight() { register_post_type( 'event_spotlight', array( 'labels' => array( - 'name' => __( 'Event Spotlight page' ), - 'menu_name' => __('Event Spotlight'), - 'singular_name' => __( 'Event Spotlight page' ), - 'add_new' => __( 'Add Spotlight Page' ), - 'all_items' => __( 'All Spotlights' ), - 'add_new_item' => __( 'Add a Event Spotlight Page' ), - 'edit_item' => __( 'Edit Event Spotlight Page' ), - 'view_item' => __( 'View Event Spotlight Page' ), - 'search_items' => __( 'Search Event Spotlight Pages' ), - 'not_found' => __( 'No Pages Found' ), - 'not_found_in_trash' => __( 'Event Spotlight Page not found in trash' ), + 'name' => __( 'Event spotlight page' ), + 'menu_name' => __('Event spotlight'), + 'singular_name' => __( 'Event spotlight page' ), + 'add_new' => __( 'Add spotlight page' ), + 'all_items' => __( 'All spotlights' ), + 'add_new_item' => __( 'Add spotlight page' ), + 'edit_item' => __( 'Edit event spotlight page' ), + 'view_item' => __( 'View event spotlight page' ), + 'search_items' => __( 'Search event spotlight pages' ), + 'not_found' => __( 'No pages Found' ), + 'not_found_in_trash' => __( 'Event spotlight page not found in trash' ), ), 'taxonomies' => array('category'), 'supports' => array( diff --git a/wp/wp-content/plugins/phila.gov-customization/admin/guides/class-phila-gov-cpt-guides.php b/wp/wp-content/plugins/phila.gov-customization/admin/guides/class-phila-gov-cpt-guides.php index a026ceaa3..65b5e2437 100644 --- a/wp/wp-content/plugins/phila.gov-customization/admin/guides/class-phila-gov-cpt-guides.php +++ b/wp/wp-content/plugins/phila.gov-customization/admin/guides/class-phila-gov-cpt-guides.php @@ -23,7 +23,7 @@ function create_phila_guides() { 'name' => __( 'Guides' ), 'menu_name' => __('Guides '), 'singular_name' => __( 'Guide' ), - 'add_new' => __( 'Add Guide page' ), + 'add_new' => __( 'Add guide page' ), 'all_items' => __( 'All guides' ), 'add_new_item' => __( 'Add a Page' ), 'edit_item' => __( 'Edit a Page' ), diff --git a/wp/wp-content/plugins/phila.gov-customization/admin/js/admin.js b/wp/wp-content/plugins/phila.gov-customization/admin/js/admin.js index 3efe8d2db..c6a419616 100644 --- a/wp/wp-content/plugins/phila.gov-customization/admin/js/admin.js +++ b/wp/wp-content/plugins/phila.gov-customization/admin/js/admin.js @@ -17,6 +17,43 @@ function phila_user_read_only(){ /* For all admins */ jQuery(document).ready(function($) { + var currentURL = window.location.href; + +if (currentURL.indexOf('edit-tags.php') > -1) { + //remove news highlighting + $('.menu-icon-post').removeClass('wp-has-current-submenu wp-menu-open'); + $('.menu-icon-post').addClass('wp-not-current-submenu'); + //remove service page highlighting + $('.menu-icon-service_page').removeClass('wp-has-current-submenu wp-menu-open'); + $('.menu-icon-service_page').addClass('wp-not-current-submenu'); + + if(currentURL.indexOf('edit-tags.php?taxonomy=post_tag') > -1){ + //add tags highlighting + $('.toplevel_page_edit-tags\\?taxonomy\\=post_tag').removeClass('wp-not-current-submenu'); + $('.toplevel_page_edit-tags\\?taxonomy\\=post_tag').addClass('wp-has-current-submenu wp-menu-open'); + } + + if (currentURL.indexOf('edit-tags.php?taxonomy=service_type&post_type=service_page') > -1) { + //add categories highlighting + $('.toplevel_page_edit-tags\\?taxonomy\\=service_type\\&post_type\\=service_page').removeClass('wp-not-current-submenu'); + $('.toplevel_page_edit-tags\\?taxonomy\\=service_type\\&post_type\\=service_page').addClass('wp-has-current-submenu wp-menu-open'); + } + + if(currentURL.indexOf('edit-tags.php?taxonomy=audience') > -1){ + //add audience highlighting + $('.toplevel_page_edit-tags\\?taxonomy\\=audience').removeClass('wp-not-current-submenu'); + $('.toplevel_page_edit-tags\\?taxonomy\\=audience').addClass('wp-has-current-submenu wp-menu-open'); + } + + if(currentURL.indexOf('edit-tags.php?taxonomy=category') > -1){ + //add categories highlighting + $('.toplevel_page_edit-tags\\?taxonomy\\=category').removeClass('wp-not-current-submenu'); + $('.toplevel_page_edit-tags\\?taxonomy\\=category').addClass('wp-has-current-submenu wp-menu-open'); + } + +} + + // Set error placement, and highlights for category selection jQuery.validator.setDefaults({ errorPlacement: function( error, element ) { diff --git a/wp/wp-content/plugins/phila.gov-customization/admin/programs-initiatives/class-phila-gov-cpt-programs.php b/wp/wp-content/plugins/phila.gov-customization/admin/programs-initiatives/class-phila-gov-cpt-programs.php index af605ef5b..8d60fdce6 100644 --- a/wp/wp-content/plugins/phila.gov-customization/admin/programs-initiatives/class-phila-gov-cpt-programs.php +++ b/wp/wp-content/plugins/phila.gov-customization/admin/programs-initiatives/class-phila-gov-cpt-programs.php @@ -23,14 +23,14 @@ function create_phila_programs_initiatives() { 'name' => __( 'Programs' ), 'menu_name' => __('Programs'), 'singular_name' => __( 'Program ' ), - 'add_new' => __( 'Add a Program' ), - 'all_items' => __( 'All Programs' ), - 'add_new_item' => __( 'Add a Page' ), - 'edit_item' => __( 'Edit a Page' ), - 'view_item' => __( 'View a Page' ), - 'search_items' => __( 'Search Programs Pages' ), - 'not_found' => __( 'No Programs Found' ), - 'not_found_in_trash' => __( 'Program Page not found in trash' ), + 'add_new' => __( 'Add a program' ), + 'all_items' => __( 'All programs' ), + 'add_new_item' => __( 'Add program page' ), + 'edit_item' => __( 'Edit a page' ), + 'view_item' => __( 'View a page' ), + 'search_items' => __( 'Search programs pages' ), + 'not_found' => __( 'No programs found' ), + 'not_found_in_trash' => __( 'Program page not found in trash' ), ), 'taxonomies' => array('category'), 'supports' => array( diff --git a/wp/wp-content/plugins/phila.gov-customization/admin/service-page/class-phila-gov-cpt-service-page.php b/wp/wp-content/plugins/phila.gov-customization/admin/service-page/class-phila-gov-cpt-service-page.php index fb6c52a47..97275b270 100644 --- a/wp/wp-content/plugins/phila.gov-customization/admin/service-page/class-phila-gov-cpt-service-page.php +++ b/wp/wp-content/plugins/phila.gov-customization/admin/service-page/class-phila-gov-cpt-service-page.php @@ -22,15 +22,15 @@ function create_phila_service_pages() { 'labels' => array( 'name' => __( 'Services' ), 'menu_name' => __('Services'), - 'singular_name' => __( 'Service Page' ), - 'add_new' => __( 'Add a Service Page' ), - 'all_items' => __( 'All Service Pages' ), - 'add_new_item' => __( 'Add a Service Page' ), - 'edit_item' => __( 'Edit Service Page' ), - 'view_item' => __( 'View Service Page' ), - 'search_items' => __( 'Search Service Pages' ), - 'not_found' => __( 'No Service Pages Found' ), - 'not_found_in_trash' => __( 'Service Page not found in trash' ), + 'singular_name' => __( 'Service page' ), + 'add_new' => __( 'Add service page' ), + 'all_items' => __( 'All services' ), + 'add_new_item' => __( 'Add service page' ), + 'edit_item' => __( 'Edit service page' ), + 'view_item' => __( 'View service page' ), + 'search_items' => __( 'Search service pages' ), + 'not_found' => __( 'No service pages Found' ), + 'not_found_in_trash' => __( 'Service page not found in trash' ), ), 'taxonomies' => array('category', 'topics'), 'supports' => array( From 10b631e1a6a17aff4a5d248f400f6a85fa2f881d Mon Sep 17 00:00:00 2001 From: Ritika Desai Date: Fri, 15 Dec 2023 09:24:11 -0500 Subject: [PATCH 2/2] changed labels for calendar and text blocks --- .../plugins/phila.gov-customization/admin/js/admin.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wp/wp-content/plugins/phila.gov-customization/admin/js/admin.js b/wp/wp-content/plugins/phila.gov-customization/admin/js/admin.js index c6a419616..13ac008c4 100644 --- a/wp/wp-content/plugins/phila.gov-customization/admin/js/admin.js +++ b/wp/wp-content/plugins/phila.gov-customization/admin/js/admin.js @@ -53,6 +53,11 @@ if (currentURL.indexOf('edit-tags.php') > -1) { } +$('#menu-posts-calendar a:contains("All Calendars")').text('All calendars'); +$('#menu-posts-calendar a:contains("Add New")').text('Add calendar'); + +$('#menu-posts-text-blocks a:contains("All Text Blocks")').text('All text blocks'); +$('#menu-posts-text-blocks a:contains("Add New")').text('Add text block'); // Set error placement, and highlights for category selection jQuery.validator.setDefaults({