Use all singular slugs for consistency with WP
This commit is contained in:
@@ -22,14 +22,14 @@ class SP_Admin_Permalink_Settings {
|
|||||||
*/
|
*/
|
||||||
public function __construct() {
|
public function __construct() {
|
||||||
$this->slugs = array(
|
$this->slugs = array(
|
||||||
array( 'events', __( 'Events', 'sportspress' ) ),
|
array( 'event', __( 'Events', 'sportspress' ) ),
|
||||||
array( 'venue', __( 'Venues', 'sportspress' ) ),
|
array( 'venue', __( 'Venues', 'sportspress' ) ),
|
||||||
array( 'calendar', __( 'Calendars', 'sportspress' ) ),
|
array( 'calendar', __( 'Calendars', 'sportspress' ) ),
|
||||||
array( 'teams', __( 'Teams', 'sportspress' ) ),
|
array( 'team', __( 'Teams', 'sportspress' ) ),
|
||||||
array( 'league', __( 'Leagues', 'sportspress' ) ),
|
array( 'league', __( 'Leagues', 'sportspress' ) ),
|
||||||
array( 'season', __( 'Seasons', 'sportspress' ) ),
|
array( 'season', __( 'Seasons', 'sportspress' ) ),
|
||||||
array( 'table', __( 'League Tables', 'sportspress' ) ),
|
array( 'table', __( 'League Tables', 'sportspress' ) ),
|
||||||
array( 'players', __( 'Players', 'sportspress' ) ),
|
array( 'player', __( 'Players', 'sportspress' ) ),
|
||||||
array( 'position', __( 'Positions', 'sportspress' ) ),
|
array( 'position', __( 'Positions', 'sportspress' ) ),
|
||||||
array( 'list', __( 'Player Lists', 'sportspress' ) ),
|
array( 'list', __( 'Player Lists', 'sportspress' ) ),
|
||||||
array( 'staff', __( 'Staff', 'sportspress' ) ),
|
array( 'staff', __( 'Staff', 'sportspress' ) ),
|
||||||
@@ -82,7 +82,7 @@ class SP_Admin_Permalink_Settings {
|
|||||||
if ( ! is_admin() )
|
if ( ! is_admin() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if ( isset( $_POST['permalink_structure'] ) || isset( $_POST['sportspress_events_slug'] ) ):
|
if ( isset( $_POST['permalink_structure'] ) || isset( $_POST['sportspress_event_slug'] ) ):
|
||||||
foreach ( $this->slugs as $slug ):
|
foreach ( $this->slugs as $slug ):
|
||||||
$key = 'sportspress_' . $slug[0] . '_slug';
|
$key = 'sportspress_' . $slug[0] . '_slug';
|
||||||
$value = null;
|
$value = null;
|
||||||
|
|||||||
@@ -355,8 +355,8 @@ class SP_Post_types {
|
|||||||
'publicly_queryable' => true,
|
'publicly_queryable' => true,
|
||||||
'exclude_from_search' => false,
|
'exclude_from_search' => false,
|
||||||
'hierarchical' => false,
|
'hierarchical' => false,
|
||||||
'rewrite' => array( 'slug' => get_option( 'sportspress_events_slug', 'events' ) ),
|
'rewrite' => array( 'slug' => get_option( 'sportspress_event_slug', 'event' ) ),
|
||||||
'supports' => array( 'title', 'author', 'thumbnail', 'comments' ),
|
'supports' => array( 'title', 'author', 'thumbnail', 'excerpt', 'comments' ),
|
||||||
'has_archive' => true,
|
'has_archive' => true,
|
||||||
'show_in_nav_menus' => true,
|
'show_in_nav_menus' => true,
|
||||||
'menu_icon' => 'dashicons-calendar',
|
'menu_icon' => 'dashicons-calendar',
|
||||||
@@ -416,8 +416,8 @@ class SP_Post_types {
|
|||||||
'publicly_queryable' => true,
|
'publicly_queryable' => true,
|
||||||
'exclude_from_search' => false,
|
'exclude_from_search' => false,
|
||||||
'hierarchical' => true,
|
'hierarchical' => true,
|
||||||
'rewrite' => array( 'slug' => get_option( 'sportspress_teams_slug', 'teams' ) ),
|
'rewrite' => array( 'slug' => get_option( 'sportspress_team_slug', 'team' ) ),
|
||||||
'supports' => array( 'title', 'author', 'thumbnail', 'page-attributes' ),
|
'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'page-attributes', 'excerpt' ),
|
||||||
'has_archive' => true,
|
'has_archive' => true,
|
||||||
'show_in_nav_menus' => true,
|
'show_in_nav_menus' => true,
|
||||||
'menu_icon' => 'dashicons-shield-alt',
|
'menu_icon' => 'dashicons-shield-alt',
|
||||||
@@ -477,7 +477,7 @@ class SP_Post_types {
|
|||||||
'publicly_queryable' => true,
|
'publicly_queryable' => true,
|
||||||
'exclude_from_search' => false,
|
'exclude_from_search' => false,
|
||||||
'hierarchical' => false,
|
'hierarchical' => false,
|
||||||
'rewrite' => array( 'slug' => get_option( 'sportspress_players_slug', 'players' ) ),
|
'rewrite' => array( 'slug' => get_option( 'sportspress_player_slug', 'player' ) ),
|
||||||
'supports' => array( 'title', 'author', 'thumbnail', 'excerpt', 'page-attributes' ),
|
'supports' => array( 'title', 'author', 'thumbnail', 'excerpt', 'page-attributes' ),
|
||||||
'has_archive' => true,
|
'has_archive' => true,
|
||||||
'show_in_nav_menus' => true,
|
'show_in_nav_menus' => true,
|
||||||
@@ -539,7 +539,7 @@ class SP_Post_types {
|
|||||||
'exclude_from_search' => false,
|
'exclude_from_search' => false,
|
||||||
'hierarchical' => false,
|
'hierarchical' => false,
|
||||||
'rewrite' => array( 'slug' => get_option( 'sportspress_staff_slug', 'staff' ) ),
|
'rewrite' => array( 'slug' => get_option( 'sportspress_staff_slug', 'staff' ) ),
|
||||||
'supports' => array( 'title', 'author', 'thumbnail' ),
|
'supports' => array( 'title', 'author', 'thumbnail', 'excerpt' ),
|
||||||
'has_archive' => true,
|
'has_archive' => true,
|
||||||
'show_in_nav_menus' => true,
|
'show_in_nav_menus' => true,
|
||||||
'menu_icon' => 'dashicons-businessman',
|
'menu_icon' => 'dashicons-businessman',
|
||||||
|
|||||||
Reference in New Issue
Block a user