diff --git a/includes/admin/class-sp-admin-permalink-settings.php b/includes/admin/class-sp-admin-permalink-settings.php index 0a3d29b7..8510bfbc 100644 --- a/includes/admin/class-sp-admin-permalink-settings.php +++ b/includes/admin/class-sp-admin-permalink-settings.php @@ -22,14 +22,14 @@ class SP_Admin_Permalink_Settings { */ public function __construct() { $this->slugs = array( - array( 'events', __( 'Events', 'sportspress' ) ), + array( 'event', __( 'Events', 'sportspress' ) ), array( 'venue', __( 'Venues', 'sportspress' ) ), array( 'calendar', __( 'Calendars', 'sportspress' ) ), - array( 'teams', __( 'Teams', 'sportspress' ) ), + array( 'team', __( 'Teams', 'sportspress' ) ), array( 'league', __( 'Leagues', 'sportspress' ) ), array( 'season', __( 'Seasons', 'sportspress' ) ), array( 'table', __( 'League Tables', 'sportspress' ) ), - array( 'players', __( 'Players', 'sportspress' ) ), + array( 'player', __( 'Players', 'sportspress' ) ), array( 'position', __( 'Positions', 'sportspress' ) ), array( 'list', __( 'Player Lists', 'sportspress' ) ), array( 'staff', __( 'Staff', 'sportspress' ) ), @@ -82,7 +82,7 @@ class SP_Admin_Permalink_Settings { if ( ! is_admin() ) 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 ): $key = 'sportspress_' . $slug[0] . '_slug'; $value = null; diff --git a/includes/class-sp-post-types.php b/includes/class-sp-post-types.php index b326cb4f..e8891c08 100644 --- a/includes/class-sp-post-types.php +++ b/includes/class-sp-post-types.php @@ -355,8 +355,8 @@ class SP_Post_types { 'publicly_queryable' => true, 'exclude_from_search' => false, 'hierarchical' => false, - 'rewrite' => array( 'slug' => get_option( 'sportspress_events_slug', 'events' ) ), - 'supports' => array( 'title', 'author', 'thumbnail', 'comments' ), + 'rewrite' => array( 'slug' => get_option( 'sportspress_event_slug', 'event' ) ), + 'supports' => array( 'title', 'author', 'thumbnail', 'excerpt', 'comments' ), 'has_archive' => true, 'show_in_nav_menus' => true, 'menu_icon' => 'dashicons-calendar', @@ -416,8 +416,8 @@ class SP_Post_types { 'publicly_queryable' => true, 'exclude_from_search' => false, 'hierarchical' => true, - 'rewrite' => array( 'slug' => get_option( 'sportspress_teams_slug', 'teams' ) ), - 'supports' => array( 'title', 'author', 'thumbnail', 'page-attributes' ), + 'rewrite' => array( 'slug' => get_option( 'sportspress_team_slug', 'team' ) ), + 'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'page-attributes', 'excerpt' ), 'has_archive' => true, 'show_in_nav_menus' => true, 'menu_icon' => 'dashicons-shield-alt', @@ -477,7 +477,7 @@ class SP_Post_types { 'publicly_queryable' => true, 'exclude_from_search' => 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' ), 'has_archive' => true, 'show_in_nav_menus' => true, @@ -539,7 +539,7 @@ class SP_Post_types { 'exclude_from_search' => false, 'hierarchical' => false, 'rewrite' => array( 'slug' => get_option( 'sportspress_staff_slug', 'staff' ) ), - 'supports' => array( 'title', 'author', 'thumbnail' ), + 'supports' => array( 'title', 'author', 'thumbnail', 'excerpt' ), 'has_archive' => true, 'show_in_nav_menus' => true, 'menu_icon' => 'dashicons-businessman',