Skip to content

Commit

Permalink
Merge pull request #464 from GatherPress/mauteri-updates-4
Browse files Browse the repository at this point in the history
Add rest_base to post types so API endpoint is plural (matches posts …
  • Loading branch information
mauteri authored Dec 28, 2023
2 parents 2f14bf1 + 3b23aff commit 602c661
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions includes/core/classes/class-event.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ public static function get_post_type_registration_args(): array {
'not_found_in_trash' => __( 'Not found in Trash', 'gatherpress' ),
),
'show_in_rest' => true,
'rest_base' => 'gp_events',
'public' => true,
'hierarchical' => false,
'template' => array(
Expand Down
1 change: 1 addition & 0 deletions includes/core/classes/class-venue.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ public static function get_post_type_registration_args(): array {
'not_found_in_trash' => __( 'Not found in Trash', 'gatherpress' ),
),
'show_in_rest' => true,
'rest_base' => 'gp_venues',
'public' => true,
'hierarchical' => false,
'show_in_menu' => 'edit.php?post_type=gp_event',
Expand Down

0 comments on commit 602c661

Please sign in to comment.