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

Add missing labels for post types & taxonomies #958

Merged
merged 6 commits into from
Oct 25, 2024
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
42 changes: 30 additions & 12 deletions includes/core/classes/class-event-setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,18 +96,36 @@ public function register_post_type(): void {
Event::POST_TYPE,
array(
'labels' => array(
'name' => _x( 'Events', 'Post Type General Name', 'gatherpress' ),
'singular_name' => _x( 'Event', 'Post Type Singular Name', 'gatherpress' ),
'menu_name' => __( 'Events', 'gatherpress' ),
'all_items' => __( 'All Events', 'gatherpress' ),
'view_item' => __( 'View Event', 'gatherpress' ),
'add_new_item' => __( 'Add New Event', 'gatherpress' ),
'add_new' => __( 'Add New', 'gatherpress' ),
'edit_item' => __( 'Edit Event', 'gatherpress' ),
'update_item' => __( 'Update Event', 'gatherpress' ),
'search_items' => __( 'Search Events', 'gatherpress' ),
'not_found' => __( 'Not Found', 'gatherpress' ),
'not_found_in_trash' => __( 'Not found in Trash', 'gatherpress' ),
'name' => _x( 'Events', 'Post Type General Name', 'gatherpress' ),
'singular_name' => _x( 'Event', 'Post Type Singular Name', 'gatherpress' ),
'add_new' => __( 'Add New', 'gatherpress' ),
'add_new_item' => __( 'Add New Event', 'gatherpress' ),
'edit_item' => __( 'Edit Event', 'gatherpress' ),
'new_item' => __( 'New Event', 'gatherpress' ),
'view_item' => __( 'View Event', 'gatherpress' ),
'view_items' => __( 'View Events', 'gatherpress' ),
'search_items' => __( 'Search Events', 'gatherpress' ),
'not_found' => __( 'No Events found.', 'gatherpress' ),
'not_found_in_trash' => __( 'No Events found in Trash.', 'gatherpress' ),
'parent_item_colon' => __( 'Parent Events:', 'gatherpress' ),
'all_items' => __( 'All Events', 'gatherpress' ),
'archives' => __( 'Event Archives', 'gatherpress' ),
'attributes' => __( 'Event Attributes', 'gatherpress' ),
'insert_into_item' => __( 'Insert into Event', 'gatherpress' ),
'uploaded_to_this_item' => __( 'Uploaded to this Event', 'gatherpress' ),
'menu_name' => __( 'Events', 'gatherpress' ),
'filter_items_list' => __( 'Filter Event list', 'gatherpress' ),
'filter_by_date' => __( 'Filter by date', 'gatherpress' ),
'update_item' => __( 'Update Event', 'gatherpress' ), // ??? Is not in the docs.
'items_list_navigation' => __( 'Events list navigation', 'gatherpress' ),
'items_list' => __( 'Events list', 'gatherpress' ),
'item_published' => __( 'Event published.', 'gatherpress' ),
'item_published_privately' => __( 'Event published privately.', 'gatherpress' ),
'item_reverted_to_draft' => __( 'Event reverted to draft.', 'gatherpress' ),
'item_scheduled' => __( 'Event scheduled.', 'gatherpress' ),
'item_updated' => __( 'Event updated.', 'gatherpress' ),
'item_link' => __( 'Event Link', 'gatherpress' ),
'item_link_description' => __( 'A link to an event.', 'gatherpress' ),
),
'show_in_rest' => true,
'rest_base' => 'gatherpress_events',
Expand Down
39 changes: 25 additions & 14 deletions includes/core/classes/class-topic.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,20 +79,31 @@ public function register_taxonomy(): void {
Event::POST_TYPE,
array(
'labels' => array(
'name' => _x( 'Topics', 'Taxonomy General Name', 'gatherpress' ),
'singular_name' => _x( 'Topic', 'Taxonomy Singular Name', 'gatherpress' ),
'search_items' => __( 'Search Topics', 'gatherpress' ),
'all_items' => __( 'All Topics', 'gatherpress' ),
'view_item' => __( 'View Topic', 'gatherpress' ),
'parent_item' => __( 'Parent Topic', 'gatherpress' ),
'parent_item_colon' => __( 'Parent Topic:', 'gatherpress' ),
'edit_item' => __( 'Edit Topic', 'gatherpress' ),
'update_item' => __( 'Update Topic', 'gatherpress' ),
'add_new_item' => __( 'Add New Topic', 'gatherpress' ),
'new_item_name' => __( 'New Topic Name', 'gatherpress' ),
'not_found' => __( 'No Topics Found', 'gatherpress' ),
'back_to_items' => __( 'Back to Topics', 'gatherpress' ),
'menu_name' => __( 'Topics', 'gatherpress' ),
'name' => _x( 'Topics', 'Taxonomy General Name', 'gatherpress' ),
'singular_name' => _x( 'Topic', 'Taxonomy Singular Name', 'gatherpress' ),
'search_items' => __( 'Search Topics', 'gatherpress' ),
'popular_items' => __( 'Popular Topics', 'gatherpress' ),
'all_items' => __( 'All Topics', 'gatherpress' ),
'parent_item' => __( 'Parent Topic', 'gatherpress' ),
'parent_item_colon' => __( 'Parent Topic:', 'gatherpress' ),
'edit_item' => __( 'Edit Topic', 'gatherpress' ),
'view_item' => __( 'View Topic', 'gatherpress' ),
'update_item' => __( 'Update Topic', 'gatherpress' ),
'add_new_item' => __( 'Add New Topic', 'gatherpress' ),
'new_item_name' => __( 'New Topic Name', 'gatherpress' ),
'separate_items_with_commas' => __( 'Separate topics with commas', 'gatherpress' ),
'add_or_remove_items' => __( 'Add or remove topics', 'gatherpress' ),
'choose_from_most_used' => __( 'Choose from the most used topics', 'gatherpress' ),
'not_found' => __( 'No Topics Found', 'gatherpress' ),
'no_terms' => __( 'No topics', 'gatherpress' ),
'filter_by_item' => __( 'Filter by topic', 'gatherpress' ),
'items_list_navigation' => __( 'Topics list navigation', 'gatherpress' ),
'items_list' => __( 'Topics list', 'gatherpress' ),
'back_to_items' => __( 'Back to Topics', 'gatherpress' ),
'item_link' => _x( 'Topic Link', 'navigation link block title', 'gatherpress' ),
'item_link_description' => _x( 'A link to a topic.', 'navigation link block description', 'gatherpress' ),
'menu_name' => __( 'Topics', 'gatherpress' ),

),
'hierarchical' => true,
'public' => true,
Expand Down
41 changes: 29 additions & 12 deletions includes/core/classes/class-venue.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,18 +104,35 @@ public function register_post_type(): void {
self::POST_TYPE,
array(
'labels' => array(
'name' => _x( 'Venues', 'Post Type General Name', 'gatherpress' ),
'singular_name' => _x( 'Venue', 'Post Type Singular Name', 'gatherpress' ),
'menu_name' => __( 'Venues', 'gatherpress' ),
'all_items' => __( 'Venues', 'gatherpress' ),
'view_item' => __( 'View Venue', 'gatherpress' ),
'add_new_item' => __( 'Add New Venue', 'gatherpress' ),
'add_new' => __( 'Add New', 'gatherpress' ),
'edit_item' => __( 'Edit Venue', 'gatherpress' ),
'update_item' => __( 'Update Venue', 'gatherpress' ),
'search_items' => __( 'Search Venues', 'gatherpress' ),
'not_found' => __( 'Not Found', 'gatherpress' ),
'not_found_in_trash' => __( 'Not found in Trash', 'gatherpress' ),
'name' => _x( 'Venues', 'Post Type General Name', 'gatherpress' ),
'singular_name' => _x( 'Venue', 'Post Type Singular Name', 'gatherpress' ),
'add_new' => __( 'Add New', 'gatherpress' ),
'add_new_item' => __( 'Add New Venue', 'gatherpress' ),
'edit_item' => __( 'Edit Venue', 'gatherpress' ),
'new_item' => __( 'New Venue', 'gatherpress' ),
'view_item' => __( 'View Venue', 'gatherpress' ),
'view_items' => __( 'View Venues', 'gatherpress' ),
'search_items' => __( 'Search Venues', 'gatherpress' ),
'not_found' => __( 'No Venues found.', 'gatherpress' ),
'not_found_in_trash' => __( 'No Venues found in Trash.', 'gatherpress' ),
'parent_item_colon' => __( 'Parent Venues:', 'gatherpress' ),
'all_items' => __( 'Venues', 'gatherpress' ),
'archives' => __( 'Venue Archives', 'gatherpress' ),
'attributes' => __( 'Venue Attributes', 'gatherpress' ),
'insert_into_item' => __( 'Insert into Venue', 'gatherpress' ),
'uploaded_to_this_item' => __( 'Uploaded to this Venue', 'gatherpress' ),
'filter_items_list' => __( 'Filter Venue list', 'gatherpress' ),
'filter_by_date' => __( 'Filter by date', 'gatherpress' ),
'update_item' => __( 'Update Venue', 'gatherpress' ), // ??? Is not in the docs.
'items_list_navigation' => __( 'Venues list navigation', 'gatherpress' ),
'items_list' => __( 'Venues list', 'gatherpress' ),
'item_published' => __( 'Venue published.', 'gatherpress' ),
'item_published_privately' => __( 'Venue published privately.', 'gatherpress' ),
'item_reverted_to_draft' => __( 'Venue reverted to draft.', 'gatherpress' ),
'item_scheduled' => __( 'Venue scheduled.', 'gatherpress' ),
'item_updated' => __( 'Venue updated.', 'gatherpress' ),
'item_link' => __( 'Venue Link', 'gatherpress' ),
'item_link_description' => __( 'A link to a venue.', 'gatherpress' ),
),
'show_in_rest' => true,
'rest_base' => 'gatherpress_venues',
Expand Down
42 changes: 0 additions & 42 deletions phpstan.neon

This file was deleted.

13 changes: 12 additions & 1 deletion phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,18 @@ parameters:
- includes/

ignoreErrors:
# core/classes/class-setup.php
# includes/core/classes/class-setup.php
#
# A dev-only errors, which can occur if the gatherpress is symlinked into a WP instance or called via wp-env or Playground.
- '#^Path in require_once\(\) "\./wp-admin/includes/upgrade\.php" is not a file or it does not exist\.$#'

# includes/core/classes/endpoints/class-endpoint.php
#
# A known issue, but not a problem.
# This "callable-string" is only used in a debug message and is not run.
-
# I was not able to get the escaping work for the "'", so this matches all argument.type errors in this file,
# which is not nice, but the workaround.
# message: '#Parameter #1 \$function_name of function wp_trigger_error expects callable-string, \'GatherPress\\Core\\Endpoints\\Endpoint\' given.#'
identifier: argument.type
path: includes/core/classes/endpoints/class-endpoint.php
Loading