From e3fb4c69dd3f8ebd0f2b644aa12bad57fd779541 Mon Sep 17 00:00:00 2001 From: Takumi Date: Wed, 24 Jul 2013 13:44:11 +1000 Subject: [PATCH] Begin SportsPress Add basic helpers, post types and taxonomies. --- .gitignore | 5 +- calendar.php | 77 +++++++++ defaults.php | 14 ++ event.php | 319 ++++++++++++++++++++++++++++++++++++ helpers.php | 85 ++++++++++ images/menu.png | Bin 0 -> 14090 bytes index.php | 2 + languages/sportspress-ja.mo | Bin 0 -> 2327 bytes languages/sportspress-ja.po | 205 +++++++++++++++++++++++ league.php | 17 ++ player.php | 107 ++++++++++++ position.php | 17 ++ season.php | 17 ++ settings.php | 113 +++++++++++++ sponsor.php | 17 ++ sportspress-admin.css | 103 ++++++++++++ sportspress.php | 65 ++++++++ staff.php | 93 +++++++++++ styles.php | 22 +++ table.php | 77 +++++++++ team.php | 114 +++++++++++++ tournament.php | 66 ++++++++ venue.php | 61 +++++++ 23 files changed, 1595 insertions(+), 1 deletion(-) create mode 100644 calendar.php create mode 100644 defaults.php create mode 100644 event.php create mode 100644 helpers.php create mode 100644 images/menu.png create mode 100644 index.php create mode 100644 languages/sportspress-ja.mo create mode 100644 languages/sportspress-ja.po create mode 100644 league.php create mode 100644 player.php create mode 100644 position.php create mode 100644 season.php create mode 100644 settings.php create mode 100644 sponsor.php create mode 100644 sportspress-admin.css create mode 100644 sportspress.php create mode 100644 staff.php create mode 100644 styles.php create mode 100644 table.php create mode 100644 team.php create mode 100644 tournament.php create mode 100644 venue.php diff --git a/.gitignore b/.gitignore index ffc36524..cea7b18d 100644 --- a/.gitignore +++ b/.gitignore @@ -11,4 +11,7 @@ sitemap.xml wp-content/cache/ wp-content/backups/ sitemap.xml -sitemap.xml.gz \ No newline at end of file +sitemap.xml.gz +.DS_STORE +psd/ +demo/ \ No newline at end of file diff --git a/calendar.php b/calendar.php new file mode 100644 index 00000000..09d090dc --- /dev/null +++ b/calendar.php @@ -0,0 +1,77 @@ + $name, + 'labels' => $labels, + 'public' => true, + 'hierarchical' => false, + 'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'page-attributes' ), + 'rewrite' => array( 'slug' => 'calendar' ), + ); + register_post_type( 'sp_calendar', $args ); +} +add_action( 'init', 'sp_calendar_cpt_init' ); + +function sp_calendar_edit_columns( $columns ) { + $columns = array( + 'cb' => '', + 'title' => __( 'Title' ), + 'sp_team' => __( 'Teams', 'sportspress' ), + 'sp_league' => __( 'League', 'sportspress' ), + 'sp_season' => __( 'Season', 'sportspress' ), + ); + return $columns; +} +add_filter( 'manage_edit-sp_calendar_columns', 'sp_calendar_edit_columns' ); + +function sp_calendar_custom_columns( $column ) { + global $post, $post_id, $typenow; + if ( $typenow == 'sp_calendar' ): + switch ($column): + case 'sp_team': + echo 'TEAMS'; + break; + case 'sp_league': + the_terms( $post_id, 'sp_league' ); + break; + case 'sp_season': + the_terms( $post_id, 'sp_season' ); + break; + endswitch; + endif; +} +add_action( 'manage_posts_custom_column', 'sp_calendar_custom_columns' ); + +function sp_calendar_request_filter_dropdowns() { + global $typenow, $wp_query; + if ( $typenow == 'sp_calendar' ) { + + // Leagues + $selected = isset( $_REQUEST['sp_league'] ) ? $_REQUEST['sp_league'] : null; + $args = array( + 'show_option_all' => sprintf( __( 'All %s', 'sportspress' ), __( 'Leagues', 'sportspress' ) ), + 'taxonomy' => 'sp_league', + 'name' => 'sp_league', + 'selected' => $selected + ); + sp_dropdown_taxonomies( $args ); + echo PHP_EOL; + + // Seasons + $selected = isset( $_REQUEST['sp_season'] ) ? $_REQUEST['sp_season'] : null; + $args = array( + 'show_option_all' => sprintf( __( 'All %s', 'sportspress' ), __( 'Seasons', 'sportspress' ) ), + 'taxonomy' => 'sp_season', + 'name' => 'sp_season', + 'selected' => $selected + ); + sp_dropdown_taxonomies( $args ); + echo PHP_EOL; + + } +} +add_action( 'restrict_manage_posts', 'sp_calendar_request_filter_dropdowns' ); +?> \ No newline at end of file diff --git a/defaults.php b/defaults.php new file mode 100644 index 00000000..117870a5 --- /dev/null +++ b/defaults.php @@ -0,0 +1,14 @@ + array( + 'sp_event_team_count' => 2, + ), +); + +foreach( $sp_options as $optiongroupkey => $optiongroup ) { + foreach( $optiongroup as $key => $value ) { + if ( get_option( $key ) === false ) + update_option( $key, $value ); + } +} +?> \ No newline at end of file diff --git a/event.php b/event.php new file mode 100644 index 00000000..fc201f10 --- /dev/null +++ b/event.php @@ -0,0 +1,319 @@ + $name, + 'labels' => $labels, + 'public' => true, + 'hierarchical' => false, + 'supports' => array( 'title', 'author', 'comments', 'page-attributes' ), + 'register_meta_box_cb' => 'sp_event_meta_init', + 'rewrite' => array( 'slug' => 'event' ), + ); + register_post_type( 'sp_event', $args ); +} +add_action( 'init', 'sp_event_cpt_init' ); + +function sp_event_display_scheduled( $posts ) { + global $wp_query, $wpdb; + if ( is_single() && $wp_query->post_count == 0 && isset( $wp_query->query_vars['sp_event'] )) { + $posts = $wpdb->get_results( $wp_query->request ); + } + return $posts; +} +add_filter( 'the_posts', 'sp_event_display_scheduled' ); + +function sp_event_text_replace( $input, $text, $domain ) { + global $post; + if ( is_admin() && get_post_type( $post ) == 'sp_event' ) + switch ( $text ): + case 'Scheduled for: %1$s': + return __( 'Kick-off: %1$s', 'sportspress' ); + break; + case 'Published on: %1$s': + return __( 'Kick-off: %1$s', 'sportspress' ); + break; + case 'Publish immediately': + return __( 'Kick-off: %1$s', 'sportspress' ); + break; + default: + return $input; + endswitch; + return $input; +} +add_filter( 'gettext', 'sp_event_text_replace', 20, 3 ); + +function sp_event_meta_init() { + add_meta_box( + 'sp_teamdiv', + __( 'Teams', 'sportspress' ), + 'sp_event_team_meta', + 'sp_event', + 'normal', + 'high' + ); + add_meta_box( + 'sp_articlediv', + __( 'Article', 'sportspress' ), + 'sp_event_article_meta', + 'sp_event', + 'normal', + 'high' + ); +} + +function sp_event_team_meta( $post, $metabox ) { + global $post_id; + $limit = get_option( 'sp_event_team_count' ); + for ( $i = 1; $i <= $limit; $i++ ): + $args = array( + 'post_type' => 'sp_team', + 'name' => 'sportspress[sp_team_' . $i . ']', + 'selected' => get_post_meta( $post_id, 'sp_team_' . $i, true ), + ); + echo '' . PHP_EOL; + wp_dropdown_pages( $args ); + /* + $players = unserialize( get_post_meta( $post_id, 'sp_players', true ) ); + ?> +
+ +
+ +
+ +
+
+

+ +
+ +
+ +
+
+ + '; +} + +function sp_event_article_meta( $post, $metabox ) { + wp_editor( $post->post_content, 'content' ); +} + +function sp_event_save() { + global $post, $post_id, $typenow; + if ( $typenow == 'sp_event' && isset( $_POST ) ) { + if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) return $post_id; + if ( ! isset( $_POST['sp_event_team_nonce'] ) || ! wp_verify_nonce( $_POST['sp_event_team_nonce'], plugin_basename( __FILE__ ) ) ) return $post_id; + $sportspress = (array)$_POST['sportspress']; + foreach ( $sportspress as $key => $value ): + update_post_meta( $post_id, $key, $value ); + endforeach; + } +} +add_action( 'save_post', 'sp_event_save' ); + +function sp_event_edit_columns( $columns ) { + $columns = array( + 'cb' => '', + 'title' => __( 'Event', 'sportspress' ), + 'sp_team' => __( 'Teams', 'sportspress' ), + 'sp_league' => __( 'League', 'sportspress' ), + 'sp_season' => __( 'Season', 'sportspress' ), + 'sp_sponsor' => __( 'Sponsor', 'sportspress' ), + 'sp_kickoff' => __( 'Kick-off', 'sportspress' ), + 'date' => __( 'Date' ), + ); + return $columns; +} +add_filter( 'manage_edit-sp_event_columns', 'sp_event_edit_columns' ); + +function sp_event_custom_columns( $column, $post_id ) { + global $typenow; + if ( $typenow == 'sp_event' ): + switch ( $column ): + case 'sp_team': + $limit = get_option( 'sp_event_team_count' ); + for ( $i = 1; $i <= $limit; $i++ ): + $team = get_post_meta( $post_id, 'sp_team_' . $i, true ); + edit_post_link( get_the_title( $team ), '', '
', $team ); + endfor; + break; + case 'sp_league': + the_terms( $post_id, 'sp_league' ); + break; + case 'sp_season': + the_terms( $post_id, 'sp_season' ); + break; + case 'sp_sponsor': + the_terms( $post_id, 'sp_sponsor' ); + break; + case 'sp_kickoff': + echo get_the_time ( get_option ( 'time_format' ) ); + break; + case 'date': + echo get_the_date ( get_option ( 'date_format' ) ); + break; + endswitch; + endif; +} +add_action( 'manage_posts_custom_column', 'sp_event_custom_columns', 10, 2 ); + +/* +function sp_event_edit_sortable_columns( $columns ) { + $columns['sp_team'] = 'sp_team'; + return $columns; +} +add_filter( 'manage_edit-sp_event_sortable_columns', 'sp_event_edit_sortable_columns' ); + +function sp_event_column_sorting( $vars ) { + if( isset( $vars['orderby'] ) && 'sp_team' == $vars['orderby'] ){ + $vars = array_merge( $vars, array( + 'meta_key' => 'sp_team_1', + 'orderby' => 'meta_value' + ) ); + } + return $vars; +} +add_filter('requests', 'sp_event_column_sorting'); +*/ + +function sp_event_request_filter_dropdowns() { + global $typenow, $wp_query; + if ( $typenow == 'sp_event' ) { + + // Leagues + $selected = isset( $_REQUEST['sp_league'] ) ? $_REQUEST['sp_league'] : null; + $args = array( + 'show_option_all' => sprintf( __( 'All %s', 'sportspress' ), __( 'Leagues', 'sportspress' ) ), + 'taxonomy' => 'sp_league', + 'name' => 'sp_league', + 'selected' => $selected + ); + sp_dropdown_taxonomies( $args ); + echo PHP_EOL; + + // Seasons + $selected = isset( $_REQUEST['sp_season'] ) ? $_REQUEST['sp_season'] : null; + $args = array( + 'show_option_all' => sprintf( __( 'All %s', 'sportspress' ), __( 'Seasons', 'sportspress' ) ), + 'taxonomy' => 'sp_season', + 'name' => 'sp_season', + 'selected' => $selected + ); + sp_dropdown_taxonomies( $args ); + echo PHP_EOL; + + // Sponsors + $selected = isset( $_REQUEST['sp_sponsor'] ) ? $_REQUEST['sp_sponsor'] : null; + $args = array( + 'show_option_all' => sprintf( __( 'All %s', 'sportspress' ), __( 'Sponsors', 'sportspress' ) ), + 'taxonomy' => 'sp_sponsor', + 'name' => 'sp_sponsor', + 'selected' => $selected + ); + sp_dropdown_taxonomies( $args ); + + } +} +add_action( 'restrict_manage_posts', 'sp_event_request_filter_dropdowns' ); +?> \ No newline at end of file diff --git a/helpers.php b/helpers.php new file mode 100644 index 00000000..f3329ee5 --- /dev/null +++ b/helpers.php @@ -0,0 +1,85 @@ + $name, + 'singular_name' => $singular_name, + 'all_items' => sprintf( __( 'All %s', 'sportspress' ), $name ), + 'add_new_item' => sprintf( __( 'Add New %s', 'sportspress' ), $singular_name ), + 'edit_item' => sprintf( __( 'Edit %s', 'sportspress' ), $singular_name ), + 'new_item' => sprintf( __( 'New %s', 'sportspress' ), $singular_name ), + 'view_item' => sprintf( __( 'View %s', 'sportspress' ), $singular_name ), + 'search_items' => sprintf( __( 'Search %s', 'sportspress' ), $name ), + 'not_found' => sprintf( __( 'No %s found', 'sportspress' ), $name ), + 'not_found_in_trash' => sprintf( __( 'No %s found in trash', 'sportspress' ), $name ), + 'parent_item_colon' => sprintf( __( 'Parent %s:', 'sportspress' ), $singular_name ), + ); + return $labels; + } +} + +if ( ! function_exists( 'sp_get_tax_labels' ) ) { + function sp_get_tax_labels( $name, $singular_name ) { + $labels = array( + 'name' => __( $name, 'sportspress' ), + 'singular_name' => __( $singular_name, 'sportspress' ), + 'all_items' => sprintf( __( 'All %s', 'sportspress' ), __( $name, 'sportspress' ) ), + 'edit_item' => sprintf( __( 'Edit %s', 'sportspress' ), __( $singular_name, 'sportspress' ) ), + 'view_item' => sprintf( __( 'View %s', 'sportspress' ), __( $singular_name, 'sportspress' ) ), + 'update_item' => sprintf( __( 'Update %s', 'sportspress' ), __( $singular_name, 'sportspress' ) ), + 'add_new_item' => sprintf( __( 'Add New %s', 'sportspress' ), __( $singular_name, 'sportspress' ) ), + 'new_item_name' => __( $singular_name, 'sportspress' ), + 'parent_item' => sprintf( __( 'Parent %s', 'sportspress' ), __( $singular_name, 'sportspress' ) ), + 'parent_item_colon' => sprintf( __( 'Parent %s:', 'sportspress' ), __( $singular_name, 'sportspress' ) ), + 'search_items' => sprintf( __( 'Search %s', 'sportspress' ), __( $name, 'sportspress' ) ), + 'not_found' => sprintf( __( 'No %s found', 'sportspress' ), __( $name, 'sportspress' ) ), + ); + return $labels; + } +} + +if ( ! function_exists( 'sp_dropdown_taxonomies' ) ) { + function sp_dropdown_taxonomies( $args = array() ) { + $defaults = array( + 'show_option_all' => false, + 'show_option_none' => false, + 'taxonomy' => null, + 'name' => null, + 'selected' => null, + ); + $args = array_merge( $defaults, $args ); + $terms = get_terms( $args['taxonomy'] ); + $name = ( $args['name'] ) ? $args['name'] : $args['taxonomy']; + if ( $terms ) { + printf( '' ); + } + } + if ( ! function_exists( 'sp_team_logo' ) ) { + function sp_team_logo( $post_id = null ) { + if ( ! isset( $post_id ) ) + global $post_id; + if ( has_post_thumbnail( $post_id ) ): + the_post_thumbnail( 'sp_icon' ); + else: + $parents = get_post_ancestors( $post_id ); + foreach ( $parents as $parent ) { + if( has_post_thumbnail( $parent ) ) { + echo get_the_post_thumbnail( $parent, 'sp_icon'); + break; + } + } + endif; + } + } +} +?> \ No newline at end of file diff --git a/images/menu.png b/images/menu.png new file mode 100644 index 0000000000000000000000000000000000000000..da3ac76644f1a61b6faa30b5d1e51addf2014e91 GIT binary patch literal 14090 zcmbWe1yr2fvNnjjTW|}mjk`4N7PN7P;O@bKyAzzC!4upyxO;GScV{}^Ip^M4Gk5-( ze|oXteK)(dR_$HSQ`HeFO46uEgh&t&5U8>;5^4|-kfGq`00cPjZ}h5h1@IpNS4nNx zPYxEY9>&h*5I{2r6LWG|J7Y_8HFIM#FQ*}MK?n$FD{FOaS8YWFep3fK7URElSUl|< z!O{>Af+C)d#-=vruH+`>me%${l;^FTl;qZCLX=uuiU37NadRtc8E5cn3a#2eT=Fjg6d}n}v;&i<_H`iJTq4#?A@=|8O(2aq@F<^Rx4i|NBD;?#fe2V--IZwTwNXcSy??iJXkz9SR9-!S=spb`2M!R&dv<3!R+E??`rJHZ13{%KP^a@ zyO=s#JGxps*pvTl(b&Yn%~gmJJkozn!Ol@p@xL0jclq~1ftQTc)7X)fjRnAJXZLqr z|I~JIRWtwZVf>G^UDUlC%~{pVT^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E(HV4f#CaC!^@qY*at z@#*5=2US7_9~Li<6n6JB>3<^q3(_By{z-f<#i8EOi#<#R$7T4X4A07NhYW{rT8|w# zJbI~@l>&{Q8=C0rX2qj}g}pl~kiiKVhB7!MgJUw>j{wuw)BlSygwL=HPO}@e6EeuN z!rncFU3(_$ri}in;$V;T2c+L4gWb~qM*4j+_(=Lkq<=vA2azi;!-L}|&lI}flm7Al za76A1SaI+e-JfQIP59@>cJ)*s!_Q@KUIyo6cmzE`mDAUyHjE8?HlF_i$>D{&Tr4?G zUtFMr;aM4cRqpA{>)?ugC;|tLWg*?DGeur0U7R;;c-?NI5Il? aX$9q~`to>l26Lf5UqNXHvBw84vVQ>(Dwzua literal 0 HcmV?d00001 diff --git a/languages/sportspress-ja.po b/languages/sportspress-ja.po new file mode 100644 index 00000000..90645546 --- /dev/null +++ b/languages/sportspress-ja.po @@ -0,0 +1,205 @@ +msgid "" +msgstr "" +"Project-Id-Version: SportsPress 0.1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2013-07-24 00:16+1000\n" +"PO-Revision-Date: 2013-07-24 02:54+1000\n" +"Last-Translator: ThemeBoy \n" +"Language-Team: ThemeBoy \n" +"Language: ja\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-KeywordsList: _;gettext;gettext_noop;__;_e;_x;_ex\n" +"X-Poedit-Basepath: .\n" +"X-Generator: Poedit 1.5.7\n" +"X-Poedit-SourceCharset: UTF-8\n" +"X-Poedit-SearchPath-0: ..\n" + +#: ../calendar.php:3 +msgid "Calendars" +msgstr "カレンダー" + +#: ../calendar.php:4 +msgid "Calendar" +msgstr "カレンダー" + +#: ../calendar.php:21 ../table.php:21 +msgid "Title" +msgstr "タイトル" + +#: ../calendar.php:22 ../event.php:83 ../table.php:22 ../team.php:3 +msgid "Teams" +msgstr "チーム" + +#: ../calendar.php:23 ../event.php:84 ../league.php:4 ../player.php:24 +#: ../staff.php:24 ../table.php:23 ../team.php:42 +msgid "League" +msgstr "リーグ" + +#: ../calendar.php:24 ../event.php:85 ../player.php:25 ../season.php:4 +#: ../staff.php:25 ../table.php:24 ../team.php:43 +msgid "Season" +msgstr "シーズン" + +#: ../calendar.php:56 ../calendar.php:67 ../event.php:129 ../event.php:140 +#: ../event.php:151 ../helpers.php:7 ../helpers.php:26 ../player.php:61 +#: ../player.php:72 ../player.php:83 ../player.php:94 ../staff.php:57 +#: ../staff.php:68 ../staff.php:79 ../table.php:56 ../table.php:67 +#: ../team.php:76 ../team.php:87 ../team.php:98 +#, php-format +msgid "All %s" +msgstr "すべての%s" + +#: ../calendar.php:56 ../event.php:129 ../league.php:3 ../player.php:72 +#: ../staff.php:68 ../table.php:56 ../team.php:76 +msgid "Leagues" +msgstr "リーグ" + +#: ../calendar.php:67 ../event.php:140 ../player.php:83 ../season.php:3 +#: ../staff.php:79 ../table.php:67 ../team.php:87 +msgid "Seasons" +msgstr "シーズン" + +#: ../event.php:3 +msgid "Events" +msgstr "試合" + +#: ../event.php:4 ../event.php:82 +msgid "Event" +msgstr "試合" + +#: ../event.php:33 ../event.php:36 ../event.php:39 +#, php-format +msgid "Kick-off: %1$s" +msgstr "キックオフ: %1$s" + +#: ../event.php:52 ../player.php:23 ../staff.php:22 ../team.php:4 +#: ../team.php:41 +msgid "Team" +msgstr "チーム" + +#: ../event.php:62 +msgid "Article" +msgstr "記事" + +#: ../event.php:86 ../player.php:26 ../sponsor.php:4 ../team.php:44 +msgid "Sponsor" +msgstr "スポンサー" + +#: ../event.php:87 +msgid "Kick-off" +msgstr "キックオフ" + +#: ../event.php:88 +msgid "Date" +msgstr "日付" + +#: ../event.php:151 ../player.php:94 ../sponsor.php:3 ../team.php:98 +msgid "Sponsors" +msgstr "スポンサー" + +#: ../helpers.php:8 ../helpers.php:30 ../team.php:26 ../team.php:29 +#, php-format +msgid "Add New %s" +msgstr "新規%sを追加" + +#: ../helpers.php:9 ../helpers.php:27 +#, php-format +msgid "Edit %s" +msgstr "%sを編集" + +#: ../helpers.php:10 +#, php-format +msgid "New %s" +msgstr "新規%s" + +#: ../helpers.php:11 ../helpers.php:28 +#, php-format +msgid "View %s" +msgstr "%sを表示" + +#: ../helpers.php:12 ../helpers.php:34 +#, php-format +msgid "Search %s" +msgstr "%sを検索" + +#: ../helpers.php:13 ../helpers.php:35 +#, php-format +msgid "No %s found" +msgstr "%sは見つかりませんでした" + +#: ../helpers.php:14 +#, php-format +msgid "No %s found in trash" +msgstr "ゴミ箱内に%sは見つかりませんでした。" + +#: ../helpers.php:15 ../helpers.php:33 +#, php-format +msgid "Parent %s:" +msgstr "親%s:" + +#: ../helpers.php:29 +#, php-format +msgid "Update %s" +msgstr "%sを更新" + +#: ../helpers.php:32 +#, php-format +msgid "Parent %s" +msgstr "親%s" + +#: ../player.php:3 +msgid "Players" +msgstr "選手" + +#: ../player.php:4 +msgid "Player" +msgstr "選手" + +#: ../player.php:21 ../staff.php:21 +msgid "Name" +msgstr "名前" + +#: ../player.php:22 ../position.php:4 ../staff.php:23 +msgid "Position" +msgstr "ポジション" + +#: ../player.php:61 ../position.php:3 ../staff.php:57 +msgid "Positions" +msgstr "ポジション" + +#: ../staff.php:3 ../staff.php:4 +msgid "Staff" +msgstr "スタッフ" + +#: ../table.php:3 +msgid "Tables" +msgstr "順位表" + +#: ../table.php:4 +msgid "Table" +msgstr "順位表" + +#: ../team.php:23 ../team.php:26 ../team.php:29 +msgid "Logo" +msgstr "ロゴ" + +#: ../tournament.php:3 +msgid "Tournaments" +msgstr "大会" + +#: ../tournament.php:4 +msgid "Tournament" +msgstr "大会" + +#: ../venue.php:3 +msgid "Venues" +msgstr "会場" + +#: ../venue.php:4 +msgid "Venue" +msgstr "会場" + +#~ msgid "League Table" +#~ msgstr "順位表" diff --git a/league.php b/league.php new file mode 100644 index 00000000..04dd9dcb --- /dev/null +++ b/league.php @@ -0,0 +1,17 @@ + $name, + 'labels' => $labels, + 'public' => true, + 'hierarchical' => true, + 'rewrite' => array( 'slug' => 'league' ), + ); + register_taxonomy( 'sp_league', $object_type, $args ); +} +add_action( 'init', 'sp_league_tax_init' ); +?> \ No newline at end of file diff --git a/player.php b/player.php new file mode 100644 index 00000000..a56b6ab4 --- /dev/null +++ b/player.php @@ -0,0 +1,107 @@ + $name, + 'labels' => $labels, + 'public' => true, + 'hierarchical' => false, + 'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'page-attributes' ), + 'rewrite' => array( 'slug' => 'player' ), + ); + register_post_type( 'sp_player', $args ); +} +add_action( 'init', 'sp_player_cpt_init' ); + +function sp_player_edit_columns( $columns ) { + $columns = array( + 'cb' => '', + 'sp_icon' => ' ', + 'title' => __( 'Name', 'sportspress' ), + 'sp_position' => __( 'Position', 'sportspress' ), + 'sp_team' => __( 'Team', 'sportspress' ), + 'sp_league' => __( 'League', 'sportspress' ), + 'sp_season' => __( 'Season', 'sportspress' ), + 'sp_sponsor' => __( 'Sponsor', 'sportspress' ), + ); + return $columns; +} +add_filter( 'manage_edit-sp_player_columns', 'sp_player_edit_columns' ); + +function sp_player_custom_columns( $column ) { + global $post, $post_id, $typenow; + if ( $typenow == 'sp_player' ): + switch ($column): + case 'sp_icon': + if ( has_post_thumbnail() ) the_post_thumbnail( 'sp_icon' ); + break; + case 'sp_position': + the_terms( $post_id, 'sp_position' ); + break; + case 'sp_league': + the_terms( $post_id, 'sp_league' ); + break; + case 'sp_season': + the_terms( $post_id, 'sp_season' ); + break; + case 'sp_sponsor': + the_terms( $post_id, 'sp_sponsor' ); + break; + endswitch; + endif; +} +add_action( 'manage_posts_custom_column', 'sp_player_custom_columns' ); + +function sp_player_request_filter_dropdowns() { + global $typenow, $wp_query; + if ( $typenow == 'sp_player' ) { + + // Positions + $selected = isset( $_REQUEST['sp_position'] ) ? $_REQUEST['sp_position'] : null; + $args = array( + 'show_option_all' => sprintf( __( 'All %s', 'sportspress' ), __( 'Positions', 'sportspress' ) ), + 'taxonomy' => 'sp_position', + 'name' => 'sp_position', + 'selected' => $selected + ); + sp_dropdown_taxonomies( $args ); + echo PHP_EOL; + + // Leagues + $selected = isset( $_REQUEST['sp_league'] ) ? $_REQUEST['sp_league'] : null; + $args = array( + 'show_option_all' => sprintf( __( 'All %s', 'sportspress' ), __( 'Leagues', 'sportspress' ) ), + 'taxonomy' => 'sp_league', + 'name' => 'sp_league', + 'selected' => $selected + ); + sp_dropdown_taxonomies( $args ); + echo PHP_EOL; + + // Seasons + $selected = isset( $_REQUEST['sp_season'] ) ? $_REQUEST['sp_season'] : null; + $args = array( + 'show_option_all' => sprintf( __( 'All %s', 'sportspress' ), __( 'Seasons', 'sportspress' ) ), + 'taxonomy' => 'sp_season', + 'name' => 'sp_season', + 'selected' => $selected + ); + sp_dropdown_taxonomies( $args ); + echo PHP_EOL; + + // Sponsors + $selected = isset( $_REQUEST['sp_sponsor'] ) ? $_REQUEST['sp_sponsor'] : null; + $args = array( + 'show_option_all' => sprintf( __( 'All %s', 'sportspress' ), __( 'Sponsors', 'sportspress' ) ), + 'taxonomy' => 'sp_sponsor', + 'name' => 'sp_sponsor', + 'selected' => $selected + ); + sp_dropdown_taxonomies( $args ); + + } +} +add_action( 'restrict_manage_posts', 'sp_player_request_filter_dropdowns' ); +?> \ No newline at end of file diff --git a/position.php b/position.php new file mode 100644 index 00000000..b2934d00 --- /dev/null +++ b/position.php @@ -0,0 +1,17 @@ + $name, + 'labels' => $labels, + 'public' => true, + 'hierarchical' => true, + 'rewrite' => array( 'slug' => 'position' ), + ); + register_taxonomy( 'sp_position', $object_type, $args ); +} +add_action( 'init', 'sp_position_tax_init' ); +?> \ No newline at end of file diff --git a/season.php b/season.php new file mode 100644 index 00000000..790e63c0 --- /dev/null +++ b/season.php @@ -0,0 +1,17 @@ + $name, + 'labels' => $labels, + 'public' => true, + 'hierarchical' => true, + 'rewrite' => array( 'slug' => 'season' ), + ); + register_taxonomy( 'sp_season', $object_type, $args ); +} +add_action( 'init', 'sp_season_tax_init' ); +?> \ No newline at end of file diff --git a/settings.php b/settings.php new file mode 100644 index 00000000..aeb9f1c9 --- /dev/null +++ b/settings.php @@ -0,0 +1,113 @@ + +
+

+

+ $value ) { + $new_value = isset( $_POST[$option_field] ) ? $_POST[$option_field] : null; + update_option( $option_field, stripslashes( $new_value ) ); + } + ?> +

+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ + 'tb_club', + 'limit' => -1, + 'show_option_none' => __( 'None' ), + 'selected' => get_option( $option_slug ), + 'name' => $option_slug, + 'id' => $option_slug + ) ); + ?> +
+ +
+ + + 'tb_sponsor', + 'limit' => -1, + 'show_option_none' => __( 'None' ), + 'selected' => get_option( $option_slug ), + 'name' => $option_slug, + 'id' => $option_slug + ) ); + ?>
+ + + 'tb_sponsor', + 'limit' => -1, + 'show_option_none' => __( 'None' ), + 'selected' => get_option( $option_slug ), + 'name' => $option_slug, + 'id' => $option_slug + ) ); + ?> +
+ + /> + +
+ + /> + +
+ + +
+
+ \ No newline at end of file diff --git a/sponsor.php b/sponsor.php new file mode 100644 index 00000000..cc3d8256 --- /dev/null +++ b/sponsor.php @@ -0,0 +1,17 @@ + $name, + 'labels' => $labels, + 'public' => true, + 'hierarchical' => true, + 'rewrite' => array( 'slug' => 'sponsor' ), + ); + register_taxonomy( 'sp_sponsor', $object_type, $args ); +} +add_action( 'init', 'sp_sponsor_tax_init' ); +?> \ No newline at end of file diff --git a/sportspress-admin.css b/sportspress-admin.css new file mode 100644 index 00000000..f0ee922f --- /dev/null +++ b/sportspress-admin.css @@ -0,0 +1,103 @@ +#adminmenu #toplevel_page_sp_settings div.wp-menu-image, +#adminmenu #menu-posts-sp_team div.wp-menu-image, +#adminmenu #menu-posts-sp_event div.wp-menu-image, +#adminmenu #menu-posts-sp_player div.wp-menu-image, +#adminmenu #menu-posts-sp_staff div.wp-menu-image, +#adminmenu #menu-posts-sp_sponsor div.wp-menu-image, +#adminmenu #menu-posts-sp_table div.wp-menu-image, +#adminmenu #menu-posts-sp_calendar div.wp-menu-image, +#adminmenu #menu-posts-sp_tournament div.wp-menu-image, +#adminmenu #menu-posts-sp_venue div.wp-menu-image { + background-image: url(images/menu.png); + background-repeat: no-repeat; +} +#adminmenu #toplevel_page_sp_settings div.wp-menu-image { + background-position: 1px -33px; +} +#adminmenu #toplevel_page_sp_settings:hover div.wp-menu-image, +#adminmenu #toplevel_page_sp_settings.wp-has-current-submenu div.wp-menu-image, +#adminmenu #toplevel_page_sp_settings.current div.wp-menu-image { + background-position: 1px -1px; +} +#adminmenu #menu-posts-sp_team div.wp-menu-image { + background-position: 1px -97px; +} +#adminmenu #menu-posts-sp_team:hover div.wp-menu-image, +#adminmenu #menu-posts-sp_team.wp-has-current-submenu div.wp-menu-image, +#adminmenu #menu-posts-sp_team.current div.wp-menu-image { + background-position: 1px -65px; +} +#adminmenu #menu-posts-sp_event div.wp-menu-image { + background-position: -29px -33px; +} +#adminmenu #menu-posts-sp_event:hover div.wp-menu-image, +#adminmenu #menu-posts-sp_event.wp-has-current-submenu div.wp-menu-image, +#adminmenu #menu-posts-sp_event.current div.wp-menu-image { + background-position: -29px -1px; +} +#adminmenu #menu-posts-sp_player div.wp-menu-image { + background-position: -59px -33px; +} +#adminmenu #menu-posts-sp_player:hover div.wp-menu-image, +#adminmenu #menu-posts-sp_player.wp-has-current-submenu div.wp-menu-image, +#adminmenu #menu-posts-sp_player.current div.wp-menu-image { + background-position: -59px -1px; +} +#adminmenu #menu-posts-sp_staff div.wp-menu-image { + background-position: -89px -33px; +} +#adminmenu #menu-posts-sp_staff:hover div.wp-menu-image, +#adminmenu #menu-posts-sp_staff.wp-has-current-submenu div.wp-menu-image, +#adminmenu #menu-posts-sp_staff.current div.wp-menu-image { + background-position: -89px -1px; +} +#adminmenu #menu-posts-sp_table div.wp-menu-image { + background-position: -119px -33px; +} +#adminmenu #menu-posts-sp_table:hover div.wp-menu-image, +#adminmenu #menu-posts-sp_table.wp-has-current-submenu div.wp-menu-image, +#adminmenu #menu-posts-sp_table.current div.wp-menu-image { + background-position: -119px -1px; +} +#adminmenu #menu-posts-sp_calendar div.wp-menu-image { + background-position: -149px -33px; +} +#adminmenu #menu-posts-sp_calendar:hover div.wp-menu-image, +#adminmenu #menu-posts-sp_calendar.wp-has-current-submenu div.wp-menu-image, +#adminmenu #menu-posts-sp_calendar.current div.wp-menu-image { + background-position: -149px -1px; +} +#adminmenu #menu-posts-sp_tournament div.wp-menu-image { + background-position: -179px -33px; +} +#adminmenu #menu-posts-sp_tournament:hover div.wp-menu-image, +#adminmenu #menu-posts-sp_tournament.wp-has-current-submenu div.wp-menu-image, +#adminmenu #menu-posts-sp_tournament.current div.wp-menu-image { + background-position: -179px -1px; +} +#adminmenu #menu-posts-sp_venue div.wp-menu-image { + background-position: -209px -33px; +} +#adminmenu #menu-posts-sp_venue:hover div.wp-menu-image, +#adminmenu #menu-posts-sp_venue.wp-has-current-submenu div.wp-menu-image, +#adminmenu #menu-posts-sp_venue.current div.wp-menu-image { + background-position: -209px -1px; +} + +#sp_articlediv .wp-editor-container{ + background-color:#fff; +} +.widefat th.column-sp_icon, +.widefat td.column-sp_icon { + width: 32px; + text-align: center; +} + +/* admin skin */ +/* +#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu, #adminmenu li.current a.menu-top, .folded #adminmenu li.wp-has-current-submenu, .folded #adminmenu li.current.menu-top, #adminmenu li.wp-has-current-submenu .wp-menu-arrow, #adminmenu li.current .wp-menu-arrow, #adminmenu .wp-has-current-submenu .wp-submenu .wp-submenu-head, +#adminmenu li.wp-has-current-submenu .wp-menu-arrow div, #adminmenu li.current .wp-menu-arrow div { + background: #0082c2 !important; + border-color: #0082c2 !important; +} +*/ \ No newline at end of file diff --git a/sportspress.php b/sportspress.php new file mode 100644 index 00000000..8b092c28 --- /dev/null +++ b/sportspress.php @@ -0,0 +1,65 @@ + \ No newline at end of file diff --git a/staff.php b/staff.php new file mode 100644 index 00000000..5d635937 --- /dev/null +++ b/staff.php @@ -0,0 +1,93 @@ + $name, + 'labels' => $labels, + 'public' => true, + 'hierarchical' => false, + 'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'page-attributes' ), + 'rewrite' => array( 'slug' => 'staff' ), + ); + register_post_type( 'sp_staff', $args ); +} +add_action( 'init', 'sp_staff_cpt_init' ); + +function sp_staff_edit_columns( $columns ) { + $columns = array( + 'cb' => '', + 'sp_icon' => ' ', + 'title' => __( 'Name', 'sportspress' ), + 'sp_team' => __( 'Team', 'sportspress' ), + 'sp_position' => __( 'Position', 'sportspress' ), + 'sp_league' => __( 'League', 'sportspress' ), + 'sp_season' => __( 'Season', 'sportspress' ), + ); + return $columns; +} +add_filter( 'manage_edit-sp_staff_columns', 'sp_staff_edit_columns' ); + +function sp_staff_custom_columns( $column ) { + global $post, $post_id, $typenow; + if ( $typenow == 'sp_staff' ): + switch ($column): + case 'sp_icon': + if ( has_post_thumbnail() ) the_post_thumbnail( 'sp_icon' ); + break; + case 'sp_position': + the_terms( $post_id, 'sp_position' ); + break; + case 'sp_league': + the_terms( $post_id, 'sp_league' ); + break; + case 'sp_season': + the_terms( $post_id, 'sp_season' ); + break; + endswitch; + endif; +} +add_action( 'manage_posts_custom_column', 'sp_staff_custom_columns' ); + +function sp_staff_request_filter_dropdowns() { + global $typenow, $wp_query; + if ( $typenow == 'sp_staff' ) { + + // Positions + $selected = isset( $_REQUEST['sp_position'] ) ? $_REQUEST['sp_position'] : null; + $args = array( + 'show_option_all' => sprintf( __( 'All %s', 'sportspress' ), __( 'Positions', 'sportspress' ) ), + 'taxonomy' => 'sp_position', + 'name' => 'sp_position', + 'selected' => $selected + ); + sp_dropdown_taxonomies( $args ); + echo PHP_EOL; + + // Leagues + $selected = isset( $_REQUEST['sp_league'] ) ? $_REQUEST['sp_league'] : null; + $args = array( + 'show_option_all' => sprintf( __( 'All %s', 'sportspress' ), __( 'Leagues', 'sportspress' ) ), + 'taxonomy' => 'sp_league', + 'name' => 'sp_league', + 'selected' => $selected + ); + sp_dropdown_taxonomies( $args ); + echo PHP_EOL; + + // Seasons + $selected = isset( $_REQUEST['sp_season'] ) ? $_REQUEST['sp_season'] : null; + $args = array( + 'show_option_all' => sprintf( __( 'All %s', 'sportspress' ), __( 'Seasons', 'sportspress' ) ), + 'taxonomy' => 'sp_season', + 'name' => 'sp_season', + 'selected' => $selected + ); + sp_dropdown_taxonomies( $args ); + echo PHP_EOL; + + } +} +add_action( 'restrict_manage_posts', 'sp_staff_request_filter_dropdowns' ); +?> \ No newline at end of file diff --git a/styles.php b/styles.php new file mode 100644 index 00000000..d0aea719 --- /dev/null +++ b/styles.php @@ -0,0 +1,22 @@ + \ No newline at end of file diff --git a/table.php b/table.php new file mode 100644 index 00000000..80f6e6ea --- /dev/null +++ b/table.php @@ -0,0 +1,77 @@ + $name, + 'labels' => $labels, + 'public' => true, + 'hierarchical' => false, + 'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'page-attributes' ), + 'rewrite' => array( 'slug' => 'table' ), + ); + register_post_type( 'sp_table', $args ); +} +add_action( 'init', 'sp_table_cpt_init' ); + +function sp_table_edit_columns( $columns ) { + $columns = array( + 'cb' => '', + 'title' => __( 'Title' ), + 'sp_team' => __( 'Teams', 'sportspress' ), + 'sp_league' => __( 'League', 'sportspress' ), + 'sp_season' => __( 'Season', 'sportspress' ), + ); + return $columns; +} +add_filter( 'manage_edit-sp_table_columns', 'sp_table_edit_columns' ); + +function sp_table_custom_columns( $column ) { + global $post, $post_id, $typenow; + if ( $typenow == 'sp_table' ): + switch ($column): + case 'sp_team': + echo 'TEAMS'; + break; + case 'sp_league': + the_terms( $post_id, 'sp_league' ); + break; + case 'sp_season': + the_terms( $post_id, 'sp_season' ); + break; + endswitch; + endif; +} +add_action( 'manage_posts_custom_column', 'sp_table_custom_columns' ); + +function sp_table_request_filter_dropdowns() { + global $typenow, $wp_query; + if ( $typenow == 'sp_table' ) { + + // Leagues + $selected = isset( $_REQUEST['sp_league'] ) ? $_REQUEST['sp_league'] : null; + $args = array( + 'show_option_all' => sprintf( __( 'All %s', 'sportspress' ), __( 'Leagues', 'sportspress' ) ), + 'taxonomy' => 'sp_league', + 'name' => 'sp_league', + 'selected' => $selected + ); + sp_dropdown_taxonomies( $args ); + echo PHP_EOL; + + // Seasons + $selected = isset( $_REQUEST['sp_season'] ) ? $_REQUEST['sp_season'] : null; + $args = array( + 'show_option_all' => sprintf( __( 'All %s', 'sportspress' ), __( 'Seasons', 'sportspress' ) ), + 'taxonomy' => 'sp_season', + 'name' => 'sp_season', + 'selected' => $selected + ); + sp_dropdown_taxonomies( $args ); + echo PHP_EOL; + + } +} +add_action( 'restrict_manage_posts', 'sp_table_request_filter_dropdowns' ); +?> \ No newline at end of file diff --git a/team.php b/team.php new file mode 100644 index 00000000..93fa7c67 --- /dev/null +++ b/team.php @@ -0,0 +1,114 @@ + $name, + 'labels' => $labels, + 'public' => true, + 'hierarchical' => true, + 'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'page-attributes' ), + 'rewrite' => array( 'slug' => 'team' ), + ); + register_post_type( 'sp_team', $args ); +} +add_action( 'init', 'sp_team_cpt_init' ); + +function sp_team_text_replace( $input, $text, $domain ) { + global $post; + if ( is_admin() && get_post_type( $post ) == 'sp_team' ) + switch ( $text ): + case 'Featured Image': + return __( 'Logo', 'themeboy' ); + break; + default: + return $input; + endswitch; + return $input; +} +add_filter( 'gettext', 'sp_team_text_replace', 20, 3 ); + +function sp_team_edit_columns($columns) { + $columns = array( + 'cb' => '', + 'sp_icon' => ' ', + 'title' => __( 'Team', 'sportspress' ), + 'sp_league' => __( 'League', 'sportspress' ), + 'sp_season' => __( 'Season', 'sportspress' ), + 'sp_sponsor' => __( 'Sponsor', 'sportspress' ), + ); + return $columns; +} +add_filter( 'manage_edit-sp_team_columns', 'sp_team_edit_columns' ); + +function sp_team_custom_columns( $column ) { + global $post, $post_id, $typenow; + if ( $typenow == 'sp_team' ): + switch ( $column ): + case 'sp_icon': + sp_team_logo( $post_id ); + break; + case 'sp_league': + if ( get_the_terms ( $post_id, 'sp_league' ) ) + the_terms( $post_id, 'sp_league' ); + else + echo '—'; + break; + case 'sp_season': + if ( get_the_terms ( $post_id, 'sp_season' ) ) + the_terms( $post_id, 'sp_season' ); + else + echo '—'; + break; + case 'sp_sponsor': + if ( get_the_terms ( $post_id, 'sp_sponsor' ) ) + the_terms( $post_id, 'sp_sponsor' ); + else + echo '—'; + break; + endswitch; + endif; +} +add_action( 'manage_pages_custom_column', 'sp_team_custom_columns' ); + +function sp_team_request_filter_dropdowns() { + global $typenow, $wp_query; + if ( $typenow == 'sp_team' ) { + + // Leagues + $selected = isset( $_REQUEST['sp_league'] ) ? $_REQUEST['sp_league'] : null; + $args = array( + 'show_option_all' => sprintf( __( 'All %s', 'sportspress' ), __( 'Leagues', 'sportspress' ) ), + 'taxonomy' => 'sp_league', + 'name' => 'sp_league', + 'selected' => $selected + ); + sp_dropdown_taxonomies( $args ); + echo PHP_EOL; + + // Seasons + $selected = isset( $_REQUEST['sp_season'] ) ? $_REQUEST['sp_season'] : null; + $args = array( + 'show_option_all' => sprintf( __( 'All %s', 'sportspress' ), __( 'Seasons', 'sportspress' ) ), + 'taxonomy' => 'sp_season', + 'name' => 'sp_season', + 'selected' => $selected + ); + sp_dropdown_taxonomies( $args ); + echo PHP_EOL; + + // Sponsors + $selected = isset( $_REQUEST['sp_sponsor'] ) ? $_REQUEST['sp_sponsor'] : null; + $args = array( + 'show_option_all' => sprintf( __( 'All %s', 'sportspress' ), __( 'Sponsors', 'sportspress' ) ), + 'taxonomy' => 'sp_sponsor', + 'name' => 'sp_sponsor', + 'selected' => $selected + ); + sp_dropdown_taxonomies( $args ); + + } +} +add_action( 'restrict_manage_posts', 'sp_team_request_filter_dropdowns' ); +?> \ No newline at end of file diff --git a/tournament.php b/tournament.php new file mode 100644 index 00000000..38cdc117 --- /dev/null +++ b/tournament.php @@ -0,0 +1,66 @@ + $name, + 'labels' => $labels, + 'public' => true, + 'hierarchical' => true, + 'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'comments', 'page-attributes' ), + 'rewrite' => array( 'slug' => 'tournament' ), + ); + register_post_type( 'sp_tournament', $args ); +} +add_action( 'init', 'sp_tournament_cpt_init' ); + +function sp_tournament_edit_columns( $columns ) { + $columns = array( + 'cb' => '', + 'title' => __( 'Title' ), + 'sp_team' => __( 'Teams', 'sportspress' ), + 'sp_event' => __( 'Events', 'sportspress' ), + 'sp_sponsor' => __( 'Sponsor', 'sportspress' ), + ); + return $columns; +} +add_filter( 'manage_edit-sp_tournament_columns', 'sp_tournament_edit_columns' ); + +function sp_tournament_custom_columns( $column ) { + global $post, $post_id, $typenow; + if ( $typenow == 'sp_tournament' ): + switch ($column): + case 'sp_team': + echo 'TEAMS'; + break; + case 'sp_event': + the_terms( $post_id, 'sp_event' ); + break; + case 'sp_sponsor': + the_terms( $post_id, 'sp_sponsor' ); + break; + endswitch; + endif; +} +add_action( 'manage_pages_custom_column', 'sp_tournament_custom_columns' ); + +function sp_tournament_request_filter_dropdowns() { + global $typenow, $wp_query; + if ( $typenow == 'sp_tournament' ) { + + // Sponsors + $selected = isset( $_REQUEST['sp_sponsor'] ) ? $_REQUEST['sp_sponsor'] : null; + $args = array( + 'show_option_all' => sprintf( __( 'All %s', 'sportspress' ), __( 'Seasons', 'sportspress' ) ), + 'taxonomy' => 'sp_sponsor', + 'name' => 'sp_sponsor', + 'selected' => $selected + ); + sp_dropdown_taxonomies( $args ); + echo PHP_EOL; + + } +} +add_action( 'restrict_manage_posts', 'sp_tournament_request_filter_dropdowns' ); +?> \ No newline at end of file diff --git a/venue.php b/venue.php new file mode 100644 index 00000000..36c61873 --- /dev/null +++ b/venue.php @@ -0,0 +1,61 @@ + $name, + 'labels' => $labels, + 'public' => true, + 'hierarchical' => true, + 'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'page-attributes' ), + 'rewrite' => array( 'slug' => 'venue' ), + ); + register_post_type( 'sp_venue', $args ); +} +add_action( 'init', 'sp_venue_cpt_init' ); + +function sp_venue_edit_columns( $columns ) { + $columns = array( + 'cb' => '', + 'title' => __( 'Venue', 'sportspress' ), + 'sp_address' => __( 'Address', 'sportspress' ), + 'sp_sponsor' => __( 'Sponsor', 'sportspress' ), + ); + return $columns; +} +add_filter( 'manage_edit-sp_venue_columns', 'sp_venue_edit_columns' ); + +function sp_venue_custom_columns( $column, $post_id ) { + global $typenow; + if ( $typenow == 'sp_venue' ): + switch ( $column ): + case 'sp_sponsor': + the_terms( $post_id, 'sp_sponsor' ); + break; + case 'sp_address': + echo get_post_meta( $post_id, 'sp_address', true ); + break; + endswitch; + endif; +} +add_action( 'manage_posts_custom_column', 'sp_venue_custom_columns', 10, 2 ); + +function sp_venue_request_filter_dropdowns() { + global $typenow, $wp_query; + if ( $typenow == 'sp_venue' ) { + + // Sponsors + $selected = isset( $_REQUEST['sp_sponsor'] ) ? $_REQUEST['sp_sponsor'] : null; + $args = array( + 'show_option_all' => sprintf( __( 'All %s', 'sportspress' ), __( 'Sponsors', 'sportspress' ) ), + 'taxonomy' => 'sp_sponsor', + 'name' => 'sp_sponsor', + 'selected' => $selected + ); + sp_dropdown_taxonomies( $args ); + + } +} +add_action( 'restrict_manage_posts', 'sp_venue_request_filter_dropdowns' ); +?> \ No newline at end of file