Skip to content

Commit

Permalink
Hide translation events in wp-admin
Browse files Browse the repository at this point in the history
  • Loading branch information
trymebytes committed Feb 14, 2024
1 parent ed5d3e1 commit 3a76188
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions wporg-gp-translation-events.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ function register_event_post_type() {
'menu_icon' => 'dashicons-calendar',
'supports' => array( 'title', 'editor', 'thumbnail', 'revisions' ),
'rewrite' => array( 'slug' => $slug ),
'show_ui' => true,
'show_ui' => false,
);

register_post_type( 'event', $args );
Expand Down Expand Up @@ -253,11 +253,11 @@ function register_translation_event_js() {
* @return array The modified menu items.
*/
function gp_event_nav_menu_items( $items, $location ) {
$new[ esc_url( gp_url( '/events/' ) ) ] = esc_html__('Events', 'gp-translation-events' );
$new[ esc_url( gp_url( '/events/' ) ) ] = esc_html__( 'Events', 'gp-translation-events' );
return array_merge( $items, $new );
}
// Add the events link to the GlotPress main menu.
add_filter( 'gp_nav_menu_items', 'gp_event_nav_menu_items', 10, 2);
add_filter( 'gp_nav_menu_items', 'gp_event_nav_menu_items', 10, 2 );

add_action(
'gp_init',
Expand Down

0 comments on commit 3a76188

Please sign in to comment.