Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restructure main admin menu #2612

Merged
merged 14 commits into from
Oct 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 1 addition & 18 deletions assets/css/icons.scss
Original file line number Diff line number Diff line change
@@ -1,23 +1,6 @@
@font-face {
font-family: job-manager;
src: url(../font/job-manager.eot?4963673);
src:
url(../font/job-manager.eot?4963673#iefix) format("embedded-opentype"),
url(../font/job-manager.woff?4963673) format("woff"),
url(../font/job-manager.ttf?4963673) format("truetype"),
url(../font/job-manager.svg?4963673#job-manager) format("svg");
font-weight: normal;
font-style: normal;
}

@font-face {
font-family: jm-logo;
src: url(../font/jm-logo/jm.eot?ycsbky);
src:
url(../font/jm-logo/jm.eot?#iefixycsbky) format("embedded-opentype"),
url(../font/jm-logo/jm.woff?ycsbky) format("woff"),
url(../font/jm-logo/jm.ttf?ycsbky) format("truetype"),
url(../font/jm-logo/jm.svg?ycsbky#icomoon) format("svg");
src: url(../font/job-manager.woff2?16367094) format('woff2');
font-weight: normal;
font-style: normal;
}
Expand Down
2 changes: 1 addition & 1 deletion assets/css/menu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
.wp-menu-image::before {

@include jm-icon();
content: "\e800";
content: "\e830";
}
}

Expand Down
Binary file removed assets/font/jm-logo/jm.eot
Binary file not shown.
11 changes: 0 additions & 11 deletions assets/font/jm-logo/jm.svg

This file was deleted.

Binary file removed assets/font/jm-logo/jm.ttf
Binary file not shown.
Binary file removed assets/font/jm-logo/jm.woff
Binary file not shown.
3 changes: 2 additions & 1 deletion assets/font/job-manager-codes.css
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,5 @@
.icon-clock:before { content: '\e82c'; } /* '' */
.icon-block:before { content: '\e82d'; } /* '' */
.icon-cancel-circled:before { content: '\e82e'; } /* '' */
.icon-ok-circled:before { content: '\e82f'; } /* '' */
.icon-ok-circled:before { content: '\e82f'; } /* '' */
.icon-wpjm:before { content: '\e830'; } /* '' */
Binary file removed assets/font/job-manager.eot
Binary file not shown.
59 changes: 0 additions & 59 deletions assets/font/job-manager.svg

This file was deleted.

Binary file removed assets/font/job-manager.ttf
Binary file not shown.
Binary file removed assets/font/job-manager.woff
Binary file not shown.
Binary file added assets/font/job-manager.woff2
Binary file not shown.
2 changes: 1 addition & 1 deletion includes/admin/class-wp-job-manager-addons.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public function output() {
echo ' nav-tab-active';
}
?>
"><?php esc_html_e( 'WP Job Manager Add-ons', 'wp-job-manager' ); ?></a>
"><?php esc_html_e( 'WP Job Manager Marketplace', 'wp-job-manager' ); ?></a>
<?php if ( current_user_can( 'update_plugins' ) ) : ?>
<a href="<?php echo esc_url( admin_url( 'edit.php?post_type=job_listing&page=job-manager-addons&section=helper' ) ); ?>" class="nav-tab
<?php
Expand Down
6 changes: 5 additions & 1 deletion includes/admin/class-wp-job-manager-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,14 @@ public function admin_enqueue_scripts() {
* Adds pages to admin menu.
*/
public function admin_menu() {
remove_submenu_page( 'edit.php?post_type=job_listing', 'post-new.php?post_type=job_listing' );
$item = remove_submenu_page( 'edit.php?post_type=job_listing', 'edit.php?post_type=job_listing' );
// change item label to "Job Listings".
add_submenu_page( 'edit.php?post_type=job_listing', $item[0], __( 'Job Listings', 'wp-job-manager' ), $item[1], $item[2], '', 0 );
add_submenu_page( 'edit.php?post_type=job_listing', __( 'Settings', 'wp-job-manager' ), __( 'Settings', 'wp-job-manager' ), 'manage_options', 'job-manager-settings', [ $this->settings_page, 'output' ] );

if ( WP_Job_Manager_Helper::instance()->has_licensed_products() || apply_filters( 'job_manager_show_addons_page', true ) ) {
add_submenu_page( 'edit.php?post_type=job_listing', __( 'WP Job Manager Add-ons', 'wp-job-manager' ), __( 'Add-ons', 'wp-job-manager' ), 'manage_options', 'job-manager-addons', [ $this, 'addons_page' ] );
add_submenu_page( 'edit.php?post_type=job_listing', __( 'WP Job Manager Marketplace', 'wp-job-manager' ), __( 'Marketplace', 'wp-job-manager' ), 'manage_options', 'job-manager-addons', [ $this, 'addons_page' ] );
}
}

Expand Down
6 changes: 3 additions & 3 deletions includes/class-wp-job-manager-post-types.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ public function register_post_types() {
'labels' => [
'name' => $plural,
'singular_name' => $singular,
'menu_name' => ucwords( $plural ),
'menu_name' => __( 'Categories', 'wp-job-manager' ),
// translators: Placeholder %s is the plural label of the job listing category taxonomy type.
'search_items' => sprintf( __( 'Search %s', 'wp-job-manager' ), $plural ),
// translators: Placeholder %s is the plural label of the job listing category taxonomy type.
Expand Down Expand Up @@ -247,7 +247,7 @@ public function register_post_types() {
'labels' => [
'name' => $plural,
'singular_name' => $singular,
'menu_name' => ucwords( $plural ),
'menu_name' => __( 'Types', 'wp-job-manager' ),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also rename 'Job Categories' to 'Categories'?
image

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good question. I renamed in 2ccdcab, but then we might want to update the Job Tags addon to use only "Tags" on the menu? Not sure.

// translators: Placeholder %s is the plural label of the job listing job type taxonomy type.
'search_items' => sprintf( __( 'Search %s', 'wp-job-manager' ), $plural ),
// translators: Placeholder %s is the plural label of the job listing job type taxonomy type.
Expand Down Expand Up @@ -331,7 +331,7 @@ public function register_post_types() {
'labels' => [
'name' => $plural,
'singular_name' => $singular,
'menu_name' => __( 'Job Listings', 'wp-job-manager' ),
'menu_name' => __( 'Job Manager', 'wp-job-manager' ),
// translators: Placeholder %s is the plural label of the job listing post type.
'all_items' => sprintf( __( 'All %s', 'wp-job-manager' ), $plural ),
'add_new' => __( 'Add New', 'wp-job-manager' ),
Expand Down
Loading