diff --git a/includes/admin/class-sp-admin-post-types.php b/includes/admin/class-sp-admin-post-types.php index 4b5b6d78..4819afcf 100644 --- a/includes/admin/class-sp-admin-post-types.php +++ b/includes/admin/class-sp-admin-post-types.php @@ -30,6 +30,12 @@ class SP_Admin_Post_Types { */ public function include_post_type_handlers() { //include( 'post-types/class-sp-admin-meta-boxes.php' ); + include( 'post-types/class-sp-admin-cpt-result.php' ); + include( 'post-types/class-sp-admin-cpt-outcome.php' ); + include( 'post-types/class-sp-admin-cpt-performance.php' ); + include( 'post-types/class-sp-admin-cpt-column.php' ); + include( 'post-types/class-sp-admin-cpt-metric.php' ); + //include( 'post-types/class-sp-admin-cpt-statistic.php' ); include( 'post-types/class-sp-admin-cpt-event.php' ); include( 'post-types/class-sp-admin-cpt-calendar.php' ); include( 'post-types/class-sp-admin-cpt-team.php' ); diff --git a/includes/admin/post-types/class-sp-admin-cpt-calendar.php b/includes/admin/post-types/class-sp-admin-cpt-calendar.php index d2ef35ed..bc359cb6 100644 --- a/includes/admin/post-types/class-sp-admin-cpt-calendar.php +++ b/includes/admin/post-types/class-sp-admin-cpt-calendar.php @@ -39,23 +39,6 @@ class SP_Admin_CPT_Calendar extends SP_Admin_CPT { parent::__construct(); } - /** - * Check if we're editing or adding an event - * @return boolean - */ - private function is_editing() { - if ( ! empty( $_GET['post_type'] ) && 'sp_calendar' == $_GET['post_type'] ) { - return true; - } - if ( ! empty( $_GET['post'] ) && 'sp_calendar' == get_post_type( $_GET['post'] ) ) { - return true; - } - if ( ! empty( $_REQUEST['post_id'] ) && 'sp_calendar' == get_post_type( $_REQUEST['post_id'] ) ) { - return true; - } - return false; - } - /** * Change the columns shown in admin. */ diff --git a/includes/admin/post-types/class-sp-admin-cpt-column.php b/includes/admin/post-types/class-sp-admin-cpt-column.php new file mode 100644 index 00000000..1b50ff01 --- /dev/null +++ b/includes/admin/post-types/class-sp-admin-cpt-column.php @@ -0,0 +1,77 @@ +type = 'sp_column'; + + // Admin Columns + add_filter( 'manage_edit-sp_column_columns', array( $this, 'edit_columns' ) ); + add_action( 'manage_sp_column_posts_custom_column', array( $this, 'custom_columns' ), 2, 2 ); + + // Call SP_Admin_CPT constructor + parent::__construct(); + } + + /** + * Change the columns shown in admin. + */ + public function edit_columns( $existing_columns ) { + $columns = array( + 'cb' => '', + 'title' => __( 'Label', 'sportspress' ), + 'sp_key' => __( 'Key', 'sportspress' ), + 'sp_equation' => __( 'Equation', 'sportspress' ), + 'sp_precision' => __( 'Rounding', 'sportspress' ), + 'sp_order' => __( 'Sort Order', 'sportspress' ), + ); + return $columns; + } + + /** + * Define our custom columns shown in admin. + * @param string $column + */ + public function custom_columns( $column, $post_id ) { + switch ( $column ): + case 'sp_key': + global $post; + echo $post->post_name; + break; + case 'sp_equation': + echo sportspress_get_post_equation( $post_id ); + break; + case 'sp_precision': + echo sportspress_get_post_precision( $post_id ); + break; + case 'sp_order': + echo sportspress_get_post_order( $post_id ); + break; + endswitch; + } +} + +endif; + +return new SP_Admin_CPT_Column(); diff --git a/includes/admin/post-types/class-sp-admin-cpt-event.php b/includes/admin/post-types/class-sp-admin-cpt-event.php index 77eecc26..28ed6232 100644 --- a/includes/admin/post-types/class-sp-admin-cpt-event.php +++ b/includes/admin/post-types/class-sp-admin-cpt-event.php @@ -45,23 +45,6 @@ class SP_Admin_CPT_Event extends SP_Admin_CPT { parent::__construct(); } - /** - * Check if we're editing or adding an event - * @return boolean - */ - private function is_editing() { - if ( ! empty( $_GET['post_type'] ) && 'sp_event' == $_GET['post_type'] ) { - return true; - } - if ( ! empty( $_GET['post'] ) && 'sp_event' == get_post_type( $_GET['post'] ) ) { - return true; - } - if ( ! empty( $_REQUEST['post_id'] ) && 'sp_event' == get_post_type( $_REQUEST['post_id'] ) ) { - return true; - } - return false; - } - /** * Change title boxes in admin. * @param string $text diff --git a/includes/admin/post-types/class-sp-admin-cpt-list.php b/includes/admin/post-types/class-sp-admin-cpt-list.php index 061ea8f2..4a5c6024 100644 --- a/includes/admin/post-types/class-sp-admin-cpt-list.php +++ b/includes/admin/post-types/class-sp-admin-cpt-list.php @@ -39,23 +39,6 @@ class SP_Admin_CPT_List extends SP_Admin_CPT { parent::__construct(); } - /** - * Check if we're editing or adding an event - * @return boolean - */ - private function is_editing() { - if ( ! empty( $_GET['post_type'] ) && 'sp_list' == $_GET['post_type'] ) { - return true; - } - if ( ! empty( $_GET['post'] ) && 'sp_list' == get_post_type( $_GET['post'] ) ) { - return true; - } - if ( ! empty( $_REQUEST['post_id'] ) && 'sp_list' == get_post_type( $_REQUEST['post_id'] ) ) { - return true; - } - return false; - } - /** * Change the columns shown in admin. */ diff --git a/includes/admin/post-types/class-sp-admin-cpt-metric.php b/includes/admin/post-types/class-sp-admin-cpt-metric.php new file mode 100644 index 00000000..bb7be995 --- /dev/null +++ b/includes/admin/post-types/class-sp-admin-cpt-metric.php @@ -0,0 +1,64 @@ +type = 'sp_metric'; + + // Admin Columns + add_filter( 'manage_edit-sp_metric_columns', array( $this, 'edit_columns' ) ); + add_action( 'manage_sp_metric_posts_custom_column', array( $this, 'custom_columns' ), 2, 2 ); + + // Call SP_Admin_CPT constructor + parent::__construct(); + } + + /** + * Change the columns shown in admin. + */ + public function edit_columns( $existing_columns ) { + $columns = array( + 'cb' => '', + 'title' => __( 'Label', 'sportspress' ), + 'sp_position' => __( 'Positions', 'sportspress' ), + ); + return $columns; + } + + /** + * Define our custom columns shown in admin. + * @param string $column + */ + public function custom_columns( $column, $post_id ) { + switch ( $column ): + case 'sp_position': + echo get_the_terms( $post_id, 'sp_position' ) ? the_terms( $post_id, 'sp_position' ) : '—'; + break; + endswitch; + } +} + +endif; + +return new SP_Admin_CPT_Metric(); diff --git a/includes/admin/post-types/class-sp-admin-cpt-outcome.php b/includes/admin/post-types/class-sp-admin-cpt-outcome.php new file mode 100644 index 00000000..120b0663 --- /dev/null +++ b/includes/admin/post-types/class-sp-admin-cpt-outcome.php @@ -0,0 +1,65 @@ +type = 'sp_outcome'; + + // Admin Columns + add_filter( 'manage_edit-sp_outcome_columns', array( $this, 'edit_columns' ) ); + add_action( 'manage_sp_outcome_posts_custom_column', array( $this, 'custom_columns' ), 2, 2 ); + + // Call SP_Admin_CPT constructor + parent::__construct(); + } + + /** + * Change the columns shown in admin. + */ + public function edit_columns( $existing_columns ) { + $columns = array( + 'cb' => '', + 'title' => __( 'Label', 'sportspress' ), + 'sp_key' => __( 'Key', 'sportspress' ), + ); + return $columns; + } + + /** + * Define our custom columns shown in admin. + * @param string $column + */ + public function custom_columns( $column, $post_id ) { + switch ( $column ): + case 'sp_key': + global $post; + echo $post->post_name; + break; + endswitch; + } +} + +endif; + +return new SP_Admin_CPT_Outcome(); diff --git a/includes/admin/post-types/class-sp-admin-cpt-performance.php b/includes/admin/post-types/class-sp-admin-cpt-performance.php new file mode 100644 index 00000000..5a43a9c1 --- /dev/null +++ b/includes/admin/post-types/class-sp-admin-cpt-performance.php @@ -0,0 +1,73 @@ +type = 'sp_performance'; + + // Admin Columns + add_filter( 'manage_edit-sp_performance_columns', array( $this, 'edit_columns' ) ); + add_action( 'manage_sp_performance_posts_custom_column', array( $this, 'custom_columns' ), 2, 2 ); + + // Call SP_Admin_CPT constructor + parent::__construct(); + } + + /** + * Change the columns shown in admin. + */ + public function edit_columns( $existing_columns ) { + $columns = array( + 'cb' => '', + 'title' => __( 'Label', 'sportspress' ), + 'sp_key' => __( 'Key', 'sportspress' ), + 'sp_position' => __( 'Positions', 'sportspress' ), + 'sp_calculate' => __( 'Calculate', 'sportspress' ), + ); + return $columns; + } + + /** + * Define our custom columns shown in admin. + * @param string $column + */ + public function custom_columns( $column, $post_id ) { + switch ( $column ): + case 'sp_key': + global $post; + echo $post->post_name; + break; + case 'sp_position': + echo get_the_terms( $post_id, 'sp_position' ) ? the_terms( $post_id, 'sp_position' ) : '—'; + break; + case 'sp_calculate': + echo sportspress_get_post_calculate( $post_id ); + break; + endswitch; + } +} + +endif; + +return new SP_Admin_CPT_Performance(); diff --git a/includes/admin/post-types/class-sp-admin-cpt-player.php b/includes/admin/post-types/class-sp-admin-cpt-player.php index de561261..9749a91e 100644 --- a/includes/admin/post-types/class-sp-admin-cpt-player.php +++ b/includes/admin/post-types/class-sp-admin-cpt-player.php @@ -42,23 +42,6 @@ class SP_Admin_CPT_Player extends SP_Admin_CPT { parent::__construct(); } - /** - * Check if we're editing or adding an event - * @return boolean - */ - private function is_editing() { - if ( ! empty( $_GET['post_type'] ) && 'sp_player' == $_GET['post_type'] ) { - return true; - } - if ( ! empty( $_GET['post'] ) && 'sp_player' == get_post_type( $_GET['post'] ) ) { - return true; - } - if ( ! empty( $_REQUEST['post_id'] ) && 'sp_player' == get_post_type( $_REQUEST['post_id'] ) ) { - return true; - } - return false; - } - /** * Change title boxes in admin. * @param string $text diff --git a/includes/admin/post-types/class-sp-admin-cpt-result.php b/includes/admin/post-types/class-sp-admin-cpt-result.php new file mode 100644 index 00000000..47c5bcc5 --- /dev/null +++ b/includes/admin/post-types/class-sp-admin-cpt-result.php @@ -0,0 +1,65 @@ +type = 'sp_result'; + + // Admin Columns + add_filter( 'manage_edit-sp_result_columns', array( $this, 'edit_columns' ) ); + add_action( 'manage_sp_result_posts_custom_column', array( $this, 'custom_columns' ), 2, 2 ); + + // Call SP_Admin_CPT constructor + parent::__construct(); + } + + /** + * Change the columns shown in admin. + */ + public function edit_columns( $existing_columns ) { + $columns = array( + 'cb' => '', + 'title' => __( 'Label', 'sportspress' ), + 'sp_key' => __( 'Key', 'sportspress' ), + ); + return $columns; + } + + /** + * Define our custom columns shown in admin. + * @param string $column + */ + public function custom_columns( $column, $post_id ) { + switch ( $column ): + case 'sp_key': + global $post; + echo $post->post_name; + break; + endswitch; + } +} + +endif; + +return new SP_Admin_CPT_Result(); diff --git a/includes/admin/post-types/class-sp-admin-cpt-staff.php b/includes/admin/post-types/class-sp-admin-cpt-staff.php index 81a20c15..e21ef985 100644 --- a/includes/admin/post-types/class-sp-admin-cpt-staff.php +++ b/includes/admin/post-types/class-sp-admin-cpt-staff.php @@ -42,23 +42,6 @@ class SP_Admin_CPT_Staff extends SP_Admin_CPT { parent::__construct(); } - /** - * Check if we're editing or adding an event - * @return boolean - */ - private function is_editing() { - if ( ! empty( $_GET['post_type'] ) && 'sp_staff' == $_GET['post_type'] ) { - return true; - } - if ( ! empty( $_GET['post'] ) && 'sp_staff' == get_post_type( $_GET['post'] ) ) { - return true; - } - if ( ! empty( $_REQUEST['post_id'] ) && 'sp_staff' == get_post_type( $_REQUEST['post_id'] ) ) { - return true; - } - return false; - } - /** * Change title boxes in admin. * @param string $text diff --git a/includes/admin/post-types/class-sp-admin-cpt-table.php b/includes/admin/post-types/class-sp-admin-cpt-table.php index 71ff274e..58183a5c 100644 --- a/includes/admin/post-types/class-sp-admin-cpt-table.php +++ b/includes/admin/post-types/class-sp-admin-cpt-table.php @@ -39,23 +39,6 @@ class SP_Admin_CPT_Table extends SP_Admin_CPT { parent::__construct(); } - /** - * Check if we're editing or adding an event - * @return boolean - */ - private function is_editing() { - if ( ! empty( $_GET['post_type'] ) && 'sp_table' == $_GET['post_type'] ) { - return true; - } - if ( ! empty( $_GET['post'] ) && 'sp_table' == get_post_type( $_GET['post'] ) ) { - return true; - } - if ( ! empty( $_REQUEST['post_id'] ) && 'sp_table' == get_post_type( $_REQUEST['post_id'] ) ) { - return true; - } - return false; - } - /** * Change the columns shown in admin. */ diff --git a/includes/admin/post-types/class-sp-admin-cpt-team.php b/includes/admin/post-types/class-sp-admin-cpt-team.php index 60139a6a..15ab2811 100644 --- a/includes/admin/post-types/class-sp-admin-cpt-team.php +++ b/includes/admin/post-types/class-sp-admin-cpt-team.php @@ -41,23 +41,6 @@ class SP_Admin_CPT_Team extends SP_Admin_CPT { parent::__construct(); } - /** - * Check if we're editing or adding a team - * @return boolean - */ - private function is_editing() { - if ( ! empty( $_GET['post_type'] ) && 'sp_team' == $_GET['post_type'] ) { - return true; - } - if ( ! empty( $_GET['post'] ) && 'sp_team' == get_post_type( $_GET['post'] ) ) { - return true; - } - if ( ! empty( $_REQUEST['post_id'] ) && 'sp_team' == get_post_type( $_REQUEST['post_id'] ) ) { - return true; - } - return false; - } - /** * Change title boxes in admin. * @param string $text diff --git a/includes/admin/post-types/class-sp-admin-cpt.php b/includes/admin/post-types/class-sp-admin-cpt.php index 5a17f34a..fa6cf091 100644 --- a/includes/admin/post-types/class-sp-admin-cpt.php +++ b/includes/admin/post-types/class-sp-admin-cpt.php @@ -40,13 +40,30 @@ class SP_Admin_CPT { if ( $post_type == $this->type ) { $obj = get_post_type_object( $this->type ); - $strings['insertIntoPost'] = sprintf( __( 'Insert into %s', 'woocommerce' ), $obj->labels->singular_name ); - $strings['uploadedToThisPost'] = sprintf( __( 'Uploaded to this %s', 'woocommerce' ), $obj->labels->singular_name ); + $strings['insertIntoPost'] = sprintf( __( 'Insert into %s', 'sportspress' ), $obj->labels->singular_name ); + $strings['uploadedToThisPost'] = sprintf( __( 'Uploaded to this %s', 'sportspress' ), $obj->labels->singular_name ); } return $strings; } + /** + * Check if we're editing or adding an event + * @return boolean + */ + private function is_editing() { + if ( ! empty( $_GET['post_type'] ) && $this->type == $_GET['post_type'] ) { + return true; + } + if ( ! empty( $_GET['post'] ) && $this->type == get_post_type( $_GET['post'] ) ) { + return true; + } + if ( ! empty( $_REQUEST['post_id'] ) && $this->type == get_post_type( $_REQUEST['post_id'] ) ) { + return true; + } + return false; + } + /** * Custom column orderby * diff --git a/includes/class-sp-post-types.php b/includes/class-sp-post-types.php index b914b067..9eafe1b6 100644 --- a/includes/class-sp-post-types.php +++ b/includes/class-sp-post-types.php @@ -169,6 +169,186 @@ class SP_Post_types { do_action( 'sportspress_register_post_type' ); + register_post_type( 'sp_result', + apply_filters( 'sportspress_register_post_type_result', + array( + 'labels' => array( + 'name' => __( 'Results', 'sportspress' ), + 'singular_name' => __( 'Result', 'sportspress' ), + 'add_new_item' => __( 'Add New Result', 'sportspress' ), + 'edit_item' => __( 'Edit Result', 'sportspress' ), + 'new_item' => __( 'New', 'sportspress' ), + 'view_item' => __( 'View', 'sportspress' ), + 'search_items' => __( 'Search', 'sportspress' ), + 'not_found' => __( 'No results found.', 'sportspress' ), + 'not_found_in_trash' => __( 'No results found.', 'sportspress' ), + ), + 'public' => false, + 'show_ui' => true, + 'capability_type' => 'sp_config', + 'map_meta_cap' => true, + 'publicly_queryable' => false, + 'exclude_from_search' => true, + 'hierarchical' => false, + 'supports' => array( 'title', 'page-attributes' ), + 'has_archive' => false, + 'show_in_menu' => false, + 'show_in_nav_menus' => false, + 'can_export' => false, + ) + ) + ); + + register_post_type( 'sp_outcome', + apply_filters( 'sportspress_register_post_type_outcome', + array( + 'labels' => array( + 'name' => __( 'Outcomes', 'sportspress' ), + 'singular_name' => __( 'Outcome', 'sportspress' ), + 'add_new_item' => __( 'Add New Outcome', 'sportspress' ), + 'edit_item' => __( 'Edit Outcome', 'sportspress' ), + 'new_item' => __( 'New', 'sportspress' ), + 'view_item' => __( 'View', 'sportspress' ), + 'search_items' => __( 'Search', 'sportspress' ), + 'not_found' => __( 'No results found.', 'sportspress' ), + 'not_found_in_trash' => __( 'No results found.', 'sportspress' ), + ), + 'public' => false, + 'show_ui' => true, + 'capability_type' => 'sp_config', + 'map_meta_cap' => true, + 'publicly_queryable' => false, + 'exclude_from_search' => true, + 'hierarchical' => false, + 'supports' => array( 'title', 'page-attributes' ), + 'has_archive' => false, + 'show_in_menu' => false, + 'show_in_nav_menus' => false, + 'can_export' => false, + ) + ) + ); + + register_post_type( 'sp_performance', + apply_filters( 'sportspress_register_post_type_performance', + array( + 'labels' => array( + 'name' => __( 'Performance', 'sportspress' ), + 'singular_name' => __( 'Performance', 'sportspress' ), + 'add_new_item' => __( 'Add New Performance', 'sportspress' ), + 'edit_item' => __( 'Edit Performance', 'sportspress' ), + 'new_item' => __( 'New', 'sportspress' ), + 'view_item' => __( 'View', 'sportspress' ), + 'search_items' => __( 'Search', 'sportspress' ), + 'not_found' => __( 'No results found.', 'sportspress' ), + 'not_found_in_trash' => __( 'No results found.', 'sportspress' ), + ), + 'public' => false, + 'show_ui' => true, + 'capability_type' => 'sp_config', + 'map_meta_cap' => true, + 'publicly_queryable' => false, + 'exclude_from_search' => true, + 'hierarchical' => false, + 'supports' => array( 'title', 'page-attributes' ), + 'has_archive' => false, + 'show_in_menu' => false, + 'show_in_nav_menus' => false, + 'can_export' => false, + ) + ) + ); + + register_post_type( 'sp_column', + apply_filters( 'sportspress_register_post_type_column', + array( + 'labels' => array( + 'name' => __( 'Columns', 'sportspress' ), + 'singular_name' => __( 'Column', 'sportspress' ), + 'add_new_item' => __( 'Add New Column', 'sportspress' ), + 'edit_item' => __( 'Edit Column', 'sportspress' ), + 'new_item' => __( 'New', 'sportspress' ), + 'view_item' => __( 'View', 'sportspress' ), + 'search_items' => __( 'Search', 'sportspress' ), + 'not_found' => __( 'No results found.', 'sportspress' ), + 'not_found_in_trash' => __( 'No results found.', 'sportspress' ), + ), + 'public' => false, + 'show_ui' => true, + 'capability_type' => 'sp_config', + 'map_meta_cap' => true, + 'publicly_queryable' => false, + 'exclude_from_search' => true, + 'hierarchical' => false, + 'supports' => array( 'title', 'page-attributes' ), + 'has_archive' => false, + 'show_in_menu' => false, + 'show_in_nav_menus' => false, + 'can_export' => false, + ) + ) + ); + + register_post_type( 'sp_metric', + apply_filters( 'sportspress_register_post_type_metric', + array( + 'labels' => array( + 'name' => __( 'Metrics', 'sportspress' ), + 'singular_name' => __( 'Metric', 'sportspress' ), + 'add_new_item' => __( 'Add New Metric', 'sportspress' ), + 'edit_item' => __( 'Edit Metric', 'sportspress' ), + 'new_item' => __( 'New', 'sportspress' ), + 'view_item' => __( 'View', 'sportspress' ), + 'search_items' => __( 'Search', 'sportspress' ), + 'not_found' => __( 'No results found.', 'sportspress' ), + 'not_found_in_trash' => __( 'No results found.', 'sportspress' ), + ), + 'public' => false, + 'show_ui' => true, + 'capability_type' => 'sp_config', + 'map_meta_cap' => true, + 'publicly_queryable' => false, + 'exclude_from_search' => true, + 'hierarchical' => false, + 'supports' => array( 'title', 'page-attributes' ), + 'has_archive' => false, + 'show_in_menu' => false, + 'show_in_nav_menus' => false, + 'can_export' => false, + ) + ) + ); + + register_post_type( 'sp_statistic', + apply_filters( 'sportspress_register_post_type_statistic', + array( + 'labels' => array( + 'name' => __( 'Statistics', 'sportspress' ), + 'singular_name' => __( 'Statistic', 'sportspress' ), + 'add_new_item' => __( 'Add New Statistic', 'sportspress' ), + 'edit_item' => __( 'Edit Statistic', 'sportspress' ), + 'new_item' => __( 'New', 'sportspress' ), + 'view_item' => __( 'View', 'sportspress' ), + 'search_items' => __( 'Search', 'sportspress' ), + 'not_found' => __( 'No results found.', 'sportspress' ), + 'not_found_in_trash' => __( 'No results found.', 'sportspress' ), + ), + 'public' => false, + 'show_ui' => true, + 'capability_type' => 'sp_config', + 'map_meta_cap' => true, + 'publicly_queryable' => false, + 'exclude_from_search' => true, + 'hierarchical' => false, + 'supports' => array( 'title', 'page-attributes' ), + 'has_archive' => false, + 'show_in_menu' => false, + 'show_in_nav_menus' => false, + 'can_export' => false, + ) + ) + ); + register_post_type( 'sp_event', apply_filters( 'sportspress_register_post_type_event', array( diff --git a/sportspress.php b/sportspress.php index f16d9272..ab9546d1 100644 --- a/sportspress.php +++ b/sportspress.php @@ -209,12 +209,12 @@ final class SportsPress { // Custom post types (deprecating) //include_once( 'admin/post-types/separator.php' ); - include_once( 'admin/post-types/column.php' ); - include_once( 'admin/post-types/performance.php' ); + //include_once( 'admin/post-types/column.php' ); + //include_once( 'admin/post-types/performance.php' ); //include_once( 'admin/post-types/statistic.php' ); - include_once( 'admin/post-types/metric.php' ); - include_once( 'admin/post-types/result.php' ); - include_once( 'admin/post-types/outcome.php' ); + //include_once( 'admin/post-types/metric.php' ); + //include_once( 'admin/post-types/result.php' ); + //include_once( 'admin/post-types/outcome.php' ); //include_once( 'admin/post-types/event.php' ); //include_once( 'admin/post-types/calendar.php' ); //include_once( 'admin/post-types/team.php' ); @@ -296,7 +296,7 @@ final class SportsPress { * Include core widgets */ public function include_widgets() { - //include_once( 'includes/abstracts/abstract-wc-widget.php' ); + //include_once( 'includes/abstracts/abstract-sp-widget.php' ); include_once( 'includes/widgets/class-sp-widget-countdown.php' ); include_once( 'includes/widgets/class-sp-widget-event-calendar.php' ); include_once( 'includes/widgets/class-sp-widget-event-list.php' );