From 1c0bc6a468089338a0b44624f0fe068b090588e6 Mon Sep 17 00:00:00 2001 From: Brian Miyaji Date: Wed, 5 Feb 2014 19:51:28 +1100 Subject: [PATCH] Widgets added and PHP error fixed for version < 5.2 --- admin/hooks/admin-enqueue-scripts.php | 6 +- admin/hooks/admin-menu.php | 15 ++--- admin/hooks/manage-posts-columns.php | 2 +- admin/hooks/media-buttons.php | 75 ++++++++++++++++++++++++ admin/hooks/plugins-loaded.php | 8 +-- admin/hooks/pre-get-posts.php | 23 +++++--- admin/hooks/wp-enqueue-scripts.php | 4 ++ admin/post-types/list.php | 6 ++ admin/post-types/separator.php | 3 +- admin/post-types/table.php | 8 ++- admin/templates/countdown.php | 57 ++++++++++++++++++ admin/widgets/countdown-timer.php | 83 --------------------------- admin/widgets/countdown.php | 57 ++++++++++++++++++ assets/css/admin.css | 36 +++++++++++- assets/js/jquery.countdown.min.js | 22 +++++++ assets/js/sportspress.js | 12 ++++ functions.php | 75 +++++++++++++++--------- readme.txt | 6 ++ sportspress.php | 4 +- 19 files changed, 359 insertions(+), 143 deletions(-) create mode 100644 admin/hooks/media-buttons.php create mode 100644 admin/templates/countdown.php delete mode 100644 admin/widgets/countdown-timer.php create mode 100644 admin/widgets/countdown.php create mode 100755 assets/js/jquery.countdown.min.js diff --git a/admin/hooks/admin-enqueue-scripts.php b/admin/hooks/admin-enqueue-scripts.php index c08a14a5..261be2e5 100644 --- a/admin/hooks/admin-enqueue-scripts.php +++ b/admin/hooks/admin-enqueue-scripts.php @@ -10,8 +10,8 @@ function sportspress_admin_enqueue_scripts() { wp_enqueue_script( 'google-maps', 'http://maps.googleapis.com/maps/api/js?sensor=false&libraries=places' ); wp_enqueue_script( 'jquery-locationpicker', SPORTSPRESS_PLUGIN_URL .'/assets/js/locationpicker.jquery.js', array( 'jquery' ), '0.1.6', true ); wp_enqueue_script( 'sportspress-admin', SPORTSPRESS_PLUGIN_URL .'/assets/js/admin.js', array( 'jquery' ), time(), true ); - wp_localize_script( 'sportspress-admin', 'localized_strings', array( - 'remove_text' => __( 'Remove', 'sportspress' ) - ) ); + + // Localize scripts. + wp_localize_script( 'sportspress-admin', 'localized_strings', array( 'remove_text' => __( 'Remove', 'sportspress' ) ) ); } add_action( 'admin_enqueue_scripts', 'sportspress_admin_enqueue_scripts' ); diff --git a/admin/hooks/admin-menu.php b/admin/hooks/admin-menu.php index 690ed8e3..d4872485 100644 --- a/admin/hooks/admin-menu.php +++ b/admin/hooks/admin-menu.php @@ -1,20 +1,17 @@ $data ) { + foreach( $menu as $key => $data ): if ( is_array( $data ) && array_key_exists( 2, $data ) && $data[2] == 'edit.php?post_type=sp_separator' ) - $position = $key; - } + $seperator_position = $key; + endforeach; // Swap our placeholder post type with a menu separator - if ( $position ): - $menu[ $position ] = array( '', 'read', 'separator-sportspress', '', 'wp-menu-separator sportspress' ); + if ( $seperator_position ): + $menu[ $seperator_position ] = array( '', 'read', 'separator-sportspress', '', 'wp-menu-separator sportspress' ); endif; // Remove "Venues" and "Positions" links from Media submenu @@ -66,4 +63,4 @@ if ( ! function_exists( 'sportspress_admin_menu_remove_venues' ) ) { function sportspress_admin_menu_remove_venues( $arr = array() ) { return $arr[0] != __( 'Venues', 'sportspress' ); } -} \ No newline at end of file +} diff --git a/admin/hooks/manage-posts-columns.php b/admin/hooks/manage-posts-columns.php index 13a14fe4..46e122e9 100644 --- a/admin/hooks/manage-posts-columns.php +++ b/admin/hooks/manage-posts-columns.php @@ -10,7 +10,7 @@ function sportspress_manage_posts_custom_column( $column, $post_id ) { global $post; switch ( $column ): case 'sp_icon': - edit_post_link( get_the_post_thumbnail( $post_id, 'sportspress-icon' ), '', '', $post_id ); + edit_post_link( get_the_post_thumbnail( $post_id, 'sportspress-fit-icon' ), '', '', $post_id ); break; case 'sp_views': echo sportspress_get_post_views( $post_id ); diff --git a/admin/hooks/media-buttons.php b/admin/hooks/media-buttons.php new file mode 100644 index 00000000..e4a34198 --- /dev/null +++ b/admin/hooks/media-buttons.php @@ -0,0 +1,75 @@ + + + + + + + + + query['post_type']; + if ( is_admin() ): + $post_type = $query->query['post_type']; - if ( in_array( $post_type, array( 'sp_result', 'sp_outcome', 'sp_column', 'sp_statistic' ) ) ): - $query->set( 'orderby', 'menu_order' ); - $query->set( 'order', 'ASC' ); - elseif ( $post_type == 'sp_event' ): - $query->set( 'orderby', 'post_date' ); - $query->set( 'order', 'ASC' ); + if ( in_array( $post_type, array( 'sp_result', 'sp_outcome', 'sp_column', 'sp_statistic' ) ) ): + $query->set( 'orderby', 'menu_order' ); + $query->set( 'order', 'ASC' ); + elseif ( $post_type == 'sp_event' ): + $query->set( 'orderby', 'post_date' ); + $query->set( 'order', 'ASC' ); + endif; + else: + $post_type = $query->get( 'post_type' ); + if ( $query->is_post_type_archive && $post_type == 'sp_event' ): + $query->set( 'order' , 'ASC' ); + endif; endif; return $query; diff --git a/admin/hooks/wp-enqueue-scripts.php b/admin/hooks/wp-enqueue-scripts.php index 2429b756..999575bc 100644 --- a/admin/hooks/wp-enqueue-scripts.php +++ b/admin/hooks/wp-enqueue-scripts.php @@ -7,6 +7,10 @@ function sportspress_enqueue_scripts() { wp_enqueue_script( 'jquery' ); wp_enqueue_script( 'google-maps', 'https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false', array(), '3.exp', true ); wp_enqueue_script( 'jquery-datatables', SPORTSPRESS_PLUGIN_URL .'assets/js/jquery.dataTables.min.js', array( 'jquery' ), '1.9.4', true ); + wp_enqueue_script( 'jquery-countdown', SPORTSPRESS_PLUGIN_URL .'assets/js/jquery.countdown.min.js', array( 'jquery' ), '2.0.2', true ); wp_enqueue_script( 'sportspress', SPORTSPRESS_PLUGIN_URL .'assets/js/sportspress.js', array( 'jquery' ), time(), true ); + + // Localize scripts. + wp_localize_script( 'sportspress', 'localized_strings', array( 'days' => __( 'days', 'sportspress' ), 'hours' => __( 'hours', 'sportspress' ), 'mins' => __( 'mins', 'sportspress' ), 'secs' => __( 'secs', 'sportspress' ) ) ); } add_action( 'wp_enqueue_scripts', 'sportspress_enqueue_scripts' ); \ No newline at end of file diff --git a/admin/post-types/list.php b/admin/post-types/list.php index 94858dc9..4cb0c795 100644 --- a/admin/post-types/list.php +++ b/admin/post-types/list.php @@ -45,6 +45,8 @@ function sportspress_list_meta_init( $post ) { if ( $players && $players != array(0) ): add_meta_box( 'sp_statsdiv', __( 'Player List', 'sportspress' ), 'sportspress_list_stats_meta', 'sp_list', 'normal', 'high' ); endif; + + add_meta_box( 'sp_detailsdiv', __( 'Details', 'sportspress' ), 'sportspress_list_details_meta', 'sp_list', 'normal', 'high' ); } function sportspress_list_player_meta( $post ) { @@ -105,3 +107,7 @@ function sportspress_list_stats_meta( $post ) { sportspress_edit_player_list_table( $columns, $data, $placeholders ); sportspress_nonce(); } + +function sportspress_list_details_meta( $post ) { + wp_editor( $post->post_content, 'content' ); +} diff --git a/admin/post-types/separator.php b/admin/post-types/separator.php index 6f7245b5..f8dc4dd1 100644 --- a/admin/post-types/separator.php +++ b/admin/post-types/separator.php @@ -5,8 +5,7 @@ function sportspress_separator_post_init() { 'public' => false, 'show_ui' => true, 'show_in_nav_menus' => false, - 'show_in_admin_bar' => false, - 'capability_type' => 'sp_private' + 'show_in_admin_bar' => false ); register_post_type( 'sp_separator', $args ); } diff --git a/admin/post-types/table.php b/admin/post-types/table.php index 138df389..151ab4c7 100644 --- a/admin/post-types/table.php +++ b/admin/post-types/table.php @@ -10,7 +10,7 @@ function sportspress_table_post_init() { 'public' => true, 'has_archive' => false, 'hierarchical' => false, - 'supports' => array( 'title', 'author', 'thumbnail', 'excerpt' ), + 'supports' => array( 'title', 'author', 'thumbnail' ), 'register_meta_box_cb' => 'sportspress_table_meta_init', 'rewrite' => array( 'slug' => get_option( 'sp_table_slug', 'tables' ) ), 'show_in_menu' => 'edit.php?post_type=sp_team', @@ -44,6 +44,8 @@ function sportspress_table_meta_init( $post ) { if ( $teams && $teams != array(0) ): add_meta_box( 'sp_columnsdiv', __( 'League Table', 'sportspress' ), 'sportspress_table_columns_meta', 'sp_table', 'normal', 'high' ); endif; + + add_meta_box( 'sp_detailsdiv', __( 'Details', 'sportspress' ), 'sportspress_table_details_meta', 'sp_table', 'normal', 'high' ); } function sportspress_table_team_meta( $post, $test ) { @@ -93,3 +95,7 @@ function sportspress_table_columns_meta( $post ) { sportspress_nonce(); } + +function sportspress_table_details_meta( $post ) { + wp_editor( $post->post_content, 'content' ); +} diff --git a/admin/templates/countdown.php b/admin/templates/countdown.php new file mode 100644 index 00000000..45ff8e6f --- /dev/null +++ b/admin/templates/countdown.php @@ -0,0 +1,57 @@ + 'sp_event', + 'posts_per_page' => 1, + 'order' => 'ASC', + 'post_status' => 'future', + 'meta_query' => array(), + ); + if ( isset( $args['team'] ) ) + $options['meta_query'][] = array( 'key' => 'sp_team', 'value' => $args['team'] ); + + $posts = get_posts( $options ); + $post = array_pop( $posts ); + endif; + + $output = ''; + + if ( isset( $post ) ): + $output .= '
'; + $output .= '

' . $post->post_title . '

'; + + $leagues = get_the_terms( $post->ID, 'sp_league' ); + if ( $leagues ): + foreach( $leagues as $league ): + $term = get_term( $league->term_id, 'sp_league' ); + $output .= '
' . $term->name . '
'; + endforeach; + endif; + + $now = new DateTime( current_time( 'mysql', 0 ) ); + $date = new DateTime( $post->post_date ); + $interval = $date->diff( $now ); + + $output .= '

'; + + $output .= '
'; + else: + return false; + endif; + + return apply_filters( 'sportspress_countdown', $output ); + + } +} diff --git a/admin/widgets/countdown-timer.php b/admin/widgets/countdown-timer.php deleted file mode 100644 index e2f06e51..00000000 --- a/admin/widgets/countdown-timer.php +++ /dev/null @@ -1,83 +0,0 @@ - 'widget_countdown_timer widget_sp_countdown_timer', 'description' => __( 'SportsPress widget.', 'sportspress' ) ); - parent::__construct('sp_countdown_timer', __( 'Countdown Timer', 'sportspress' ), $widget_ops); - } - - function widget( $args, $instance ) { - extract($args); - $title = apply_filters('widget_title', empty($instance['title']) ? __( 'Countdown Timer', 'sportspress' ) : $instance['title'], $instance, $this->id_base); - echo $before_widget; - $id = empty($instance['id']) ? null : $instance['id']; - if ( $title ) - echo $before_title . $title . $after_title; - if ( $id ) - $post = get_post( $id ); - if ( isset( $post ) ): - echo '
'; - echo '

' . $post->post_title . '

'; - - $leagues = get_the_terms( $post->ID, 'sp_league' ); - if ( $leagues ): - foreach( $leagues as $league ): - $term = get_term( $league->term_id, 'sp_league' ); - echo '
' . $term->name . '
'; - endforeach; - endif; - - $now = new DateTime( date("Y-m-d H:i:s") ); - $date = new DateTime( $post->post_date ); - $interval = $date->diff( $now ); - - echo '

'; - - echo '
'; - endif; - echo $after_widget; - } - - function update( $new_instance, $old_instance ) { - $instance = $old_instance; - $instance['title'] = strip_tags($new_instance['title']); - $instance['id'] = intval($new_instance['id']); - - return $instance; - } - - function form( $instance ) { - $instance = wp_parse_args( (array) $instance, array( 'title' => '', 'id' => '' ) ); - $title = strip_tags($instance['title']); - $id = intval($instance['id']); -?> -

-

- -

- 'sp_event', - 'name' => $this->get_field_name('id'), - 'id' => $this->get_field_id('id'), - 'selected' => $id, - 'show_option_none' => '(' . __( 'Next Event', 'premier' ) . ')', - 'values' => 'ID', - 'class' => 'widefat', - 'show_dates' => true, - 'post_status' => 'future', - ); - if ( ! sportspress_dropdown_pages( $args ) ): - sportspress_post_adder( 'sp_event' ); - endif; - ?> -

- 'widget_countdown widget_sp_countdown', 'description' => __( 'SportsPress widget.', 'sportspress' ) ); + parent::__construct('sp_countdown', __( 'Countdown', 'sportspress' ), $widget_ops); + } + + function widget( $args, $instance ) { + extract($args); + $title = apply_filters('widget_title', empty($instance['title']) ? __( 'Countdown', 'sportspress' ) : $instance['title'], $instance, $this->id_base); + echo $before_widget; + $id = empty($instance['id']) ? null : $instance['id']; + if ( $title ) + echo $before_title . $title . $after_title; + echo sportspress_countdown( $instance ); + echo $after_widget; + } + + function update( $new_instance, $old_instance ) { + $instance = $old_instance; + $instance['title'] = strip_tags($new_instance['title']); + $instance['id'] = intval($new_instance['id']); + + return $instance; + } + + function form( $instance ) { + $instance = wp_parse_args( (array) $instance, array( 'title' => '', 'id' => '' ) ); + $title = strip_tags($instance['title']); + $id = intval($instance['id']); +?> +

+

+ +

+ 'sp_event', + 'name' => $this->get_field_name('id'), + 'id' => $this->get_field_id('id'), + 'selected' => $id, + 'show_option_all' => '(' . __( 'Next Event', 'premier' ) . ')', + 'values' => 'ID', + 'class' => 'widefat', + 'show_dates' => true, + 'post_status' => 'future', + ); + if ( ! sportspress_dropdown_pages( $args ) ): + sportspress_post_adder( 'sp_event' ); + endif; + ?> +

+e;++e){var g=c[e].match(/%(-|!)?([a-zA-Z]{1})(:[^;]+;)?/),i=new RegExp(g[0]),j=g[1]||"",k=g[3]||"",l=null;g=g[2],h.hasOwnProperty(g)&&(l=h[g],l=Number(a[l])),null!==l&&("!"===j&&(l=d(k,l)),""===j&&10>l&&(l="0"+l.toString()),b=b.replace(i,l.toString()))}return b=b.replace(/%%/,"%")}}function d(a,b){var c="s",d="";return a&&(a=a.replace(/(:|;|\s)/gi,"").split(/\,/),1===a.length?c=a[0]:(d=a[0],c=a[1])),1===Math.abs(b)?d:c}var e=100,f=[],g=[];g.push(/^[0-9]*$/.source),g.push(/([0-9]{1,2}\/){2}[0-9]{4}( [0-9]{1,2}(:[0-9]{2}){2})?/.source),g.push(/[0-9]{4}(\/[0-9]{1,2}){2}( [0-9]{1,2}(:[0-9]{2}){2})?/.source),g=new RegExp(g.join("|"));var h={Y:"years",m:"months",w:"weeks",d:"days",D:"totalDays",H:"hours",M:"minutes",S:"seconds"},i=function(b,c,d){this.el=b,this.$el=a(b),this.interval=null,this.offset={},this.setFinalDate(c),this.instanceNumber=f.length,f.push(this),this.$el.data("countdown-instance",this.instanceNumber),d&&(this.$el.on("update.countdown",d),this.$el.on("stoped.countdown",d),this.$el.on("finish.countdown",d)),this.start()};a.extend(i.prototype,{start:function(){if(null!==this.interval)throw new Error("Countdown is already running!");var a=this;this.update(),this.interval=setInterval(function(){a.update.call(a)},e)},stop:function(){clearInterval(this.interval),this.interval=null,this.dispatchEvent("stoped")},pause:function(){this.stop.call(this)},resume:function(){this.start.call(this)},remove:function(){this.stop(),delete f[this.instanceNumber]},setFinalDate:function(a){this.finalDate=b(a)},update:function(){return 0===this.$el.closest("html").length?(this.remove(),void 0):(this.totalSecsLeft=this.finalDate.valueOf()-(new Date).valueOf(),this.totalSecsLeft=Math.ceil(this.totalSecsLeft/1e3),this.totalSecsLeft=this.totalSecsLeft<0?0:this.totalSecsLeft,this.offset={seconds:this.totalSecsLeft%60,minutes:Math.floor(this.totalSecsLeft/60)%60,hours:Math.floor(this.totalSecsLeft/60/60)%24,days:Math.floor(this.totalSecsLeft/60/60/24)%7,totalDays:Math.floor(this.totalSecsLeft/60/60/24),weeks:Math.floor(this.totalSecsLeft/60/60/24/7),months:Math.floor(this.totalSecsLeft/60/60/24/30),years:Math.floor(this.totalSecsLeft/60/60/24/365)},0===this.totalSecsLeft?(this.stop(),this.dispatchEvent("finish")):this.dispatchEvent("update"),void 0)},dispatchEvent:function(b){var d=a.Event(b+".countdown");d.finalDate=this.finalDate,d.offset=a.extend({},this.offset),d.strftime=c(this.offset),this.$el.trigger(d)}}),a.fn.countdown=function(){var b=Array.prototype.slice.call(arguments,0);return this.each(function(){var c=a(this).data("countdown-instance");if(void 0!==c){var d=f[c],e=b[0];i.prototype.hasOwnProperty(e)?d[e].apply(d,b.slice(1)):null===String(e).match(/^[$A-Z_][0-9A-Z_$]*$/i)?d.setFinalDate.call(d,e):a.error("Method %s does not exist on jQuery.countdown".replace(/\%s/gi,e))}else new i(this,b[0],b[1])})}}); \ No newline at end of file diff --git a/assets/js/sportspress.js b/assets/js/sportspress.js index 43a1056d..80f0b546 100644 --- a/assets/js/sportspress.js +++ b/assets/js/sportspress.js @@ -9,6 +9,18 @@ function viewport() { (function($) { + /* Countdown */ + + $("[data-countdown]").each(function() { + var $this = $(this), finalDate = $(this).data('countdown'); + $this.countdown(finalDate, function(event) { + $this.html(event.strftime("%D " + localized_strings.days + " " + + "%H " + localized_strings.hours + " " + + "%M " + localized_strings.mins + " " + + "%S " + localized_strings.secs + "" )); + }); + }); + /* Data Tables */ if (viewport().width > 640) { diff --git a/functions.php b/functions.php index 8b0ceb5e..0c45fce4 100644 --- a/functions.php +++ b/functions.php @@ -539,6 +539,22 @@ if ( !function_exists( 'sportspress_equation_selector' ) ) { } } +if ( !function_exists( 'sportspress_get_term_names' ) ) { + function sportspress_get_term_names( $id = null, $post_type = null ) { + if ( ! $id || ! $post_type ) + return false; + + $terms = get_the_terms( $id, $post_type ); + + $output = array(); + foreach ( $terms as $term ): + $output[ $term->slug ] = $term->name; + endforeach; + + return $output; + } +} + if ( !function_exists( 'sportspress_get_var_labels' ) ) { function sportspress_get_var_labels( $post_type ) { $args = array( @@ -1631,7 +1647,8 @@ if ( !function_exists( 'sportspress_get_league_table_data' ) ) { $stats = get_posts( $args ); $columns = array(); - $priorities = array(); + global $sportspress_column_priorities; + $sportspress_column_priorities = array(); foreach ( $stats as $stat ): @@ -1646,8 +1663,8 @@ if ( !function_exists( 'sportspress_get_league_table_data' ) ) { // Add order to priorities if priority is set and does not exist in array already $priority = sportspress_array_value( sportspress_array_value( $meta, 'sp_priority', array() ), 0, 0 ); - if ( $priority && ! array_key_exists( $priority, $priorities ) ): - $priorities[ $priority ] = array( + if ( $priority && ! array_key_exists( $priority, $sportspress_column_priorities ) ): + $sportspress_column_priorities[ $priority ] = array( 'column' => $stat->post_name, 'order' => sportspress_array_value( sportspress_array_value( $meta, 'sp_order', array() ), 0, 'DESC' ) ); @@ -1656,7 +1673,7 @@ if ( !function_exists( 'sportspress_get_league_table_data' ) ) { endforeach; // Sort priorities in descending order - ksort( $priorities ); + ksort( $sportspress_column_priorities ); // Fill in empty placeholder values for each team foreach ( $team_ids as $team_id ): @@ -1696,29 +1713,7 @@ if ( !function_exists( 'sportspress_get_league_table_data' ) ) { endforeach; endforeach; - uasort( $merged, function( $a, $b ) use ( $priorities ) { - - // Loop through priorities - foreach( $priorities as $priority ): - - // Proceed if columns are not equal - if ( sportspress_array_value( $a, $priority['column'], 0 ) != sportspress_array_value( $b, $priority['column'], 0 ) ): - - // Compare column values - $output = sportspress_array_value( $a, $priority['column'], 0 ) - sportspress_array_value( $b, $priority['column'], 0 ); - - // Flip value if descending order - if ( $priority['order'] == 'DESC' ) $output = 0 - $output; - - return $output; - - endif; - - endforeach; - - // Default sort by alphabetical - return strcmp( sportspress_array_value( $a, 'name', '' ), sportspress_array_value( $b, 'name', '' ) ); - }); + uasort( $merged, 'sportspress_sort_table_teams' ); // Rearrange data array to reflect statistics $data = array(); @@ -1736,6 +1731,32 @@ if ( !function_exists( 'sportspress_get_league_table_data' ) ) { } } +function sportspress_sort_table_teams ( $a, $b ) { + + global $sportspress_column_priorities; + + // Loop through priorities + foreach( $sportspress_column_priorities as $priority ): + + // Proceed if columns are not equal + if ( sportspress_array_value( $a, $priority['column'], 0 ) != sportspress_array_value( $b, $priority['column'], 0 ) ): + + // Compare column values + $output = sportspress_array_value( $a, $priority['column'], 0 ) - sportspress_array_value( $b, $priority['column'], 0 ); + + // Flip value if descending order + if ( $priority['order'] == 'DESC' ) $output = 0 - $output; + + return $output; + + endif; + + endforeach; + + // Default sort by alphabetical + return strcmp( sportspress_array_value( $a, 'name', '' ), sportspress_array_value( $b, 'name', '' ) ); +} + if ( !function_exists( 'sportspress_get_player_list_data' ) ) { function sportspress_get_player_list_data( $post_id, $admin = false ) { $league_id = sportspress_get_the_term_id( $post_id, 'sp_league', 0 ); diff --git a/readme.txt b/readme.txt index fd8ba6a1..ee1d4f06 100644 --- a/readme.txt +++ b/readme.txt @@ -72,6 +72,12 @@ SportsPress is currently in beta and is undergoing testing. We are still activel == Changelog == += 0.2.2 = +* Feature - League Table widget added. +* Feature - Events widget added. +* Feature - Countdown widget added. +* Fix - Syntax error fixed for PHP version 5.2 and below. + = 0.2.1 = * Feature - Events Calendar widget added. * Fix - Player settings table markup fixed. diff --git a/sportspress.php b/sportspress.php index 1447fc2d..651f7f94 100644 --- a/sportspress.php +++ b/sportspress.php @@ -35,6 +35,7 @@ require_once dirname( __FILE__ ) . '/admin/globals/sports.php'; require_once dirname( __FILE__ ) . '/functions.php'; // Templates +require_once dirname( __FILE__ ) . '/admin/templates/countdown.php'; require_once dirname( __FILE__ ) . '/admin/templates/event-details.php'; require_once dirname( __FILE__ ) . '/admin/templates/event-players.php'; require_once dirname( __FILE__ ) . '/admin/templates/event-results.php'; @@ -75,7 +76,7 @@ require_once dirname( __FILE__ ) . '/admin/terms/position.php'; // Widgets require_once dirname( __FILE__ ) . '/admin/widgets/recent-events.php'; require_once dirname( __FILE__ ) . '/admin/widgets/future-events.php'; -require_once dirname( __FILE__ ) . '/admin/widgets/countdown-timer.php'; +require_once dirname( __FILE__ ) . '/admin/widgets/countdown.php'; require_once dirname( __FILE__ ) . '/admin/widgets/events-calendar.php'; require_once dirname( __FILE__ ) . '/admin/widgets/league-table.php'; @@ -96,6 +97,7 @@ require_once dirname( __FILE__ ) . '/admin/hooks/manage-posts-columns.php'; require_once dirname( __FILE__ ) . '/admin/hooks/post-thumbnail-html.php'; require_once dirname( __FILE__ ) . '/admin/hooks/restrict-manage-posts.php'; require_once dirname( __FILE__ ) . '/admin/hooks/parse-query.php'; +//require_once dirname( __FILE__ ) . '/admin/hooks/media-buttons.php'; require_once dirname( __FILE__ ) . '/admin/hooks/save-post.php'; // Filters