├── includes ├── admin │ ├── views │ │ ├── html-quick-edit-club.php │ │ ├── html-notice-club-check.php │ │ ├── html-notice-update.php │ │ ├── html-notice-cricket-addon.php │ │ ├── html-notice-template-check.php │ │ ├── html-bulk-edit-match.php │ │ ├── html-admin-sidebar.php │ │ ├── html-notice-theme-support.php │ │ ├── html-notice-install.php │ │ ├── html-admin-settings.php │ │ ├── html-quick-edit-staff.php │ │ └── html-quick-edit-player.php │ ├── class-wpcm-admin-extensions.php │ ├── post-types │ │ └── meta-boxes │ │ │ ├── class-wpcm-meta-box-table-notes.php │ │ │ ├── class-wpcm-meta-box-club-staff.php │ │ │ ├── class-wpcm-meta-box-club-players.php │ │ │ ├── class-wpcm-meta-box-club-table.php │ │ │ ├── class-wpcm-meta-box-player-display.php │ │ │ ├── class-wpcm-meta-box-match-video.php │ │ │ ├── class-wpcm-meta-box-sponsor-url.php │ │ │ ├── class-wpcm-meta-box-staff-roster.php │ │ │ └── class-wpcm-meta-box-player-roster.php │ ├── settings │ │ ├── class-wpcm-settings-licenses.php │ │ └── class-wpcm-settings-page.php │ ├── class-wpcm-admin-editor.php │ ├── class-wpcm-admin-status.php │ └── wpcm-admin-functions.php ├── updates │ ├── wpclubmanager-update-1-5-5.php │ ├── wpclubmanager-update-1-5-0.php │ └── wpclubmanager-update-1-1-0.php ├── class-wpcm-cli.php ├── class-wpcm-sports.php ├── wpcm-widget-functions.php ├── class-wpcm-reset-database.php ├── wpcm-deprecated-functions.php ├── widgets │ └── class-wpcm-sponsors-widget.php ├── class-wpcm-cache-helper.php ├── class-wpcm-autoloader.php └── class-wpcm-template-loader.php ├── index.php ├── dummy-data ├── club-sample.csv ├── staff-sample.csv ├── player-sample.csv └── match-sample.csv ├── assets ├── fonts │ ├── icomoon.eot │ ├── icomoon.ttf │ └── icomoon.woff ├── images │ ├── logo.png │ ├── notes.png │ ├── flags │ │ ├── ad.png │ │ ├── ae.png │ │ ├── af.png │ │ ├── ag.png │ │ ├── ai.png │ │ ├── al.png │ │ ├── am.png │ │ ├── an.png │ │ ├── ao.png │ │ ├── aq.png │ │ ├── ar.png │ │ ├── as.png │ │ ├── at.png │ │ ├── au.png │ │ ├── aw.png │ │ ├── ax.png │ │ ├── az.png │ │ ├── ba.png │ │ ├── bb.png │ │ ├── bd.png │ │ ├── be.png │ │ ├── bf.png │ │ ├── bg.png │ │ ├── bh.png │ │ ├── bi.png │ │ ├── bj.png │ │ ├── bm.png │ │ ├── bn.png │ │ ├── bo.png │ │ ├── br.png │ │ ├── bs.png │ │ ├── bt.png │ │ ├── bv.png │ │ ├── bw.png │ │ ├── by.png │ │ ├── bz.png │ │ ├── ca.png │ │ ├── cc.png │ │ ├── cd.png │ │ ├── cf.png │ │ ├── cg.png │ │ ├── ch.png │ │ ├── ci.png │ │ ├── ck.png │ │ ├── cl.png │ │ ├── cm.png │ │ ├── cn.png │ │ ├── co.png │ │ ├── cr.png │ │ ├── cs.png │ │ ├── ct.png │ │ ├── cu.png │ │ ├── cv.png │ │ ├── cx.png │ │ ├── cy.png │ │ ├── cz.png │ │ ├── de.png │ │ ├── dj.png │ │ ├── dk.png │ │ ├── dm.png │ │ ├── do.png │ │ ├── dz.png │ │ ├── ec.png │ │ ├── ee.png │ │ ├── eg.png │ │ ├── eh.png │ │ ├── en.png │ │ ├── er.png │ │ ├── es.png │ │ ├── et.png │ │ ├── fi.png │ │ ├── fj.png │ │ ├── fk.png │ │ ├── fm.png │ │ ├── fo.png │ │ ├── fr.png │ │ ├── ga.png │ │ ├── gb.png │ │ ├── gd.png │ │ ├── ge.png │ │ ├── gf.png │ │ ├── gg.png │ │ ├── gh.png │ │ ├── gi.png │ │ ├── gl.png │ │ ├── gm.png │ │ ├── gn.png │ │ ├── gp.png │ │ ├── gq.png │ │ ├── gr.png │ │ ├── gs.png │ │ ├── gt.png │ │ ├── gu.png │ │ ├── gw.png │ │ ├── gy.png │ │ ├── hk.png │ │ ├── hm.png │ │ ├── hn.png │ │ ├── hr.png │ │ ├── ht.png │ │ ├── hu.png │ │ ├── id.png │ │ ├── ie.png │ │ ├── il.png │ │ ├── im.png │ │ ├── in.png │ │ ├── io.png │ │ ├── iq.png │ │ ├── ir.png │ │ ├── is.png │ │ ├── it.png │ │ ├── je.png │ │ ├── jm.png │ │ ├── jo.png │ │ ├── jp.png │ │ ├── ke.png │ │ ├── kg.png │ │ ├── kh.png │ │ ├── ki.png │ │ ├── km.png │ │ ├── kn.png │ │ ├── kp.png │ │ ├── kr.png │ │ ├── ks.png │ │ ├── kw.png │ │ ├── ky.png │ │ ├── kz.png │ │ ├── la.png │ │ ├── lb.png │ │ ├── lc.png │ │ ├── li.png │ │ ├── lk.png │ │ ├── lr.png │ │ ├── ls.png │ │ ├── lt.png │ │ ├── lu.png │ │ ├── lv.png │ │ ├── ly.png │ │ ├── ma.png │ │ ├── mc.png │ │ ├── md.png │ │ ├── me.png │ │ ├── mg.png │ │ ├── mh.png │ │ ├── mk.png │ │ ├── ml.png │ │ ├── mm.png │ │ ├── mn.png │ │ ├── mo.png │ │ ├── mp.png │ │ ├── mq.png │ │ ├── mr.png │ │ ├── ms.png │ │ ├── mt.png │ │ ├── mu.png │ │ ├── mv.png │ │ ├── mw.png │ │ ├── mx.png │ │ ├── my.png │ │ ├── mz.png │ │ ├── na.png │ │ ├── nc.png │ │ ├── nd.png │ │ ├── ne.png │ │ ├── nf.png │ │ ├── ng.png │ │ ├── ni.png │ │ ├── nl.png │ │ ├── no.png │ │ ├── np.png │ │ ├── nr.png │ │ ├── nu.png │ │ ├── nz.png │ │ ├── om.png │ │ ├── pa.png │ │ ├── pe.png │ │ ├── pf.png │ │ ├── pg.png │ │ ├── ph.png │ │ ├── pk.png │ │ ├── pl.png │ │ ├── pm.png │ │ ├── pn.png │ │ ├── pr.png │ │ ├── ps.png │ │ ├── pt.png │ │ ├── pw.png │ │ ├── py.png │ │ ├── qa.png │ │ ├── re.png │ │ ├── ro.png │ │ ├── rs.png │ │ ├── ru.png │ │ ├── rw.png │ │ ├── sa.png │ │ ├── sb.png │ │ ├── sc.png │ │ ├── sd.png │ │ ├── se.png │ │ ├── sf.png │ │ ├── sg.png │ │ ├── sh.png │ │ ├── si.png │ │ ├── sj.png │ │ ├── sk.png │ │ ├── sl.png │ │ ├── sm.png │ │ ├── sn.png │ │ ├── so.png │ │ ├── sr.png │ │ ├── st.png │ │ ├── sv.png │ │ ├── sy.png │ │ ├── sz.png │ │ ├── tc.png │ │ ├── td.png │ │ ├── tf.png │ │ ├── tg.png │ │ ├── th.png │ │ ├── tj.png │ │ ├── tk.png │ │ ├── tl.png │ │ ├── tm.png │ │ ├── tn.png │ │ ├── to.png │ │ ├── tr.png │ │ ├── tt.png │ │ ├── tv.png │ │ ├── tw.png │ │ ├── tz.png │ │ ├── ua.png │ │ ├── ug.png │ │ ├── um.png │ │ ├── us.png │ │ ├── uy.png │ │ ├── uz.png │ │ ├── va.png │ │ ├── vc.png │ │ ├── ve.png │ │ ├── vg.png │ │ ├── vi.png │ │ ├── vn.png │ │ ├── vu.png │ │ ├── wf.png │ │ ├── wl.png │ │ ├── ws.png │ │ ├── ye.png │ │ ├── yt.png │ │ ├── za.png │ │ ├── zm.png │ │ └── zw.png │ ├── notes@2x.png │ ├── placeholder.png │ ├── wpcm-badge.png │ ├── wpcm-logo.png │ ├── crest-placeholder.png │ ├── chosen │ │ ├── chosen-sprite.png │ │ └── chosen-sprite@2x.png │ └── admin │ │ └── wpcm-victory-preview.jpg ├── js │ ├── vendor │ │ ├── leaflet │ │ │ └── images │ │ │ │ ├── layers.png │ │ │ │ ├── layers-2x.png │ │ │ │ ├── marker-icon.png │ │ │ │ ├── marker-shadow.png │ │ │ │ └── marker-icon-2x.png │ │ ├── zeroclipboard │ │ │ └── ZeroClipboard.swf │ │ └── jquery-chosen │ │ │ ├── chosen-rtl.min.js │ │ │ ├── chosen-rtl.js │ │ │ └── ajax-chosen.jquery.min.js │ ├── admin │ │ ├── locationpicker.js │ │ ├── settings.min.js │ │ ├── wpclubmanager_tax_order.min.js │ │ ├── settings.js │ │ ├── editor.js │ │ ├── wpclubmanager_tax_order.js │ │ ├── editor-lang.php │ │ ├── wpclubmanager_admin.min.js │ │ └── wpclubmanager-tax-drag-drop.js │ └── frontend │ │ ├── wpclubmanager.min.js │ │ └── wpclubmanager.js └── css │ └── activation.css ├── languages ├── wp-club-manager-ar.mo ├── wp-club-manager-fi.mo ├── wp-club-manager-hr.mo ├── wp-club-manager-vi.mo ├── wp-club-manager-bg_BG.mo ├── wp-club-manager-cs_CZ.mo ├── wp-club-manager-da_DK.mo ├── wp-club-manager-de_DE.mo ├── wp-club-manager-el_GR.mo ├── wp-club-manager-en_GB.mo ├── wp-club-manager-es_ES.mo ├── wp-club-manager-fa_IR.mo ├── wp-club-manager-fr_FR.mo ├── wp-club-manager-he_IL.mo ├── wp-club-manager-hu_HU.mo ├── wp-club-manager-it_IT.mo ├── wp-club-manager-lt_LT.mo ├── wp-club-manager-lv_LV.mo ├── wp-club-manager-nl_NL.mo ├── wp-club-manager-pl_PL.mo ├── wp-club-manager-pt_BR.mo ├── wp-club-manager-pt_PT.mo ├── wp-club-manager-ru_RU.mo ├── wp-club-manager-sk_SK.mo ├── wp-club-manager-sv_SE.mo ├── wp-club-manager-tr_TR.mo └── wp-club-manager-zh_CN.mo ├── templates ├── single-player │ ├── title.php │ ├── bio.php │ ├── player-image.php │ └── stats-table.php ├── layout │ ├── sidebar.php │ ├── wrapper-end.php │ └── wrapper-start.php ├── single-match │ ├── away-club.php │ ├── home-club.php │ ├── comp.php │ ├── venue.php │ ├── away-badge.php │ ├── home-badge.php │ ├── team.php │ ├── video.php │ ├── referee.php │ ├── date.php │ ├── score.php │ ├── attendance.php │ ├── report.php │ ├── status.php │ └── venue-info.php ├── shortcodes │ ├── staff-gallery.php │ ├── staff.php │ ├── players-gallery.php │ ├── players.php │ ├── standings.php │ ├── matches-2.php │ ├── league-table.php │ └── map-venue.php ├── single-club.php ├── single-match.php ├── single-staff.php ├── single-player.php ├── content-widget-results.php ├── content-widget-fixtures.php ├── content-single-player.php └── content-widget-birthdays.php ├── .editorconfig ├── uninstall.php ├── wpclubmanager.php ├── .github └── workflows │ └── phpcs.yml └── phpcs.xml.dist /includes/admin/views/html-quick-edit-club.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | 13 | 14 |

-------------------------------------------------------------------------------- /templates/layout/sidebar.php: -------------------------------------------------------------------------------- 1 | 15 | 16 |
17 | 18 | 19 | 20 |
21 | 22 | 15 | 16 |
17 | 18 | ID, 'player_single' ) ); ?> 19 | 20 |
21 | -------------------------------------------------------------------------------- /templates/single-match/away-club.php: -------------------------------------------------------------------------------- 1 | ID ); ?> 17 | 18 |
19 | 20 | 21 | 22 |
23 | -------------------------------------------------------------------------------- /templates/single-match/home-club.php: -------------------------------------------------------------------------------- 1 | ID ); ?> 17 | 18 |
19 | 20 | 21 | 22 |
23 | -------------------------------------------------------------------------------- /templates/single-match/comp.php: -------------------------------------------------------------------------------- 1 | ID ); ?> 17 | 18 |
19 | 20 | 21 | 22 |
23 | -------------------------------------------------------------------------------- /templates/single-match/venue.php: -------------------------------------------------------------------------------- 1 | ID ); 17 | 18 | if ( $venue ) { ?> 19 | 20 |
21 | 22 | 23 | 24 |
25 | 26 | ID, 'crest-medium', array( 'class' => 'away-logo' ) ); ?> 17 | 18 |
19 | 20 | 21 | 22 |
23 | -------------------------------------------------------------------------------- /templates/single-match/home-badge.php: -------------------------------------------------------------------------------- 1 | ID, 'crest-medium', array( 'class' => 'home-logo' ) ); ?> 17 | 18 |
19 | 20 | 21 | 22 |
23 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # This file is for unifying the coding style for different editors and IDEs 2 | # editorconfig.org 3 | 4 | # WordPress Coding Standards 5 | # https://make.wordpress.org/core/handbook/coding-standards/ 6 | 7 | root = true 8 | 9 | [*] 10 | charset = utf-8 11 | end_of_line = lf 12 | insert_final_newline = true 13 | trim_trailing_whitespace = true 14 | indent_style = tab 15 | indent_size = 4 16 | 17 | [{.jshintrc,*.json,*.yml}] 18 | indent_style = space 19 | indent_size = 2 20 | 21 | [{*.txt,wp-config-sample.php}] 22 | end_of_line = crlf 23 | -------------------------------------------------------------------------------- /assets/js/admin/locationpicker.js: -------------------------------------------------------------------------------- 1 | jQuery(document).ready(function($){ 2 | jQuery(".wpcm-location-picker").locationpicker({ 3 | location: { 4 | latitude: Number(jQuery(".wpcm-latitude").val()), 5 | longitude: Number(jQuery(".wpcm-longitude").val()) 6 | }, 7 | radius: 0, 8 | inputBinding: { 9 | latitudeInput: jQuery(".wpcm-latitude"), 10 | longitudeInput: jQuery(".wpcm-longitude"), 11 | locationNameInput: jQuery(".wpcm-address") 12 | }, 13 | addressFormat: null, 14 | enableAutocomplete: true 15 | }); 16 | }); -------------------------------------------------------------------------------- /templates/single-match/team.php: -------------------------------------------------------------------------------- 1 | ID ); 17 | $show_team = get_option( 'wpcm_results_show_team' ); 18 | 19 | if ( 'yes' === $show_team && $team ) { ?> 20 | 21 |
22 | 23 |
24 | 25 | ID, '_wpcm_video', true ); 17 | 18 | if ( $video_url ) : 19 | ?> 20 |
21 | autoembed( $video_url ) // phpcs:ignore 24 | ?> 25 |
26 | 29 | -------------------------------------------------------------------------------- /uninstall.php: -------------------------------------------------------------------------------- 1 | remove_roles(); 23 | 24 | require_once 'includes/class-wpcm-reset-database.php'; 25 | 26 | ( new WPCM_Reset_Database() )->reset(); 27 | -------------------------------------------------------------------------------- /includes/updates/wpclubmanager-update-1-5-5.php: -------------------------------------------------------------------------------- 1 | ID, 'wpcm_referee', true ); 17 | $show_referee = get_option( 'wpcm_results_show_referee' ); 18 | 19 | if ( $referee && 'yes' === $show_referee ) { ?> 20 | 21 |
22 | 23 | : 24 | 25 |
26 | 27 | post_date ) ); 17 | $time = date_i18n( apply_filters( 'wpclubmanager_match_time_format', get_option( 'time_format' ) ), strtotime( $post->post_date ) ); ?> 18 | 19 |
20 | , 21 |
22 | -------------------------------------------------------------------------------- /assets/css/activation.css: -------------------------------------------------------------------------------- 1 | .wpclubmanager-message{position:relative;border-left-color:#113750!important;overflow:hidden}.wpclubmanager-message .twitter-share-button,p.wpclubmanager-actions .twitter-share-button{vertical-align:middle;margin-left:3px}p.wpclubmanager-actions{margin-bottom:2em}.wpclubmanager-about-text{margin-bottom:1em!important}.wp-credits-list a{font-size: 1.25em;}div.wpcm-five-star li {display:block;margin-bottom:10px;}.thankyou{float: left;color: #ffffff;-webkit-box-shadow: 0 1px 0 #256e34;box-shadow: 0 1px 0 #256e34;font-weight: normal;} 2 | .wpclubmanager-message.updated{border-left-color:#fc983b!important;}.wpclubmanager-message .dashicons{color:#d10f0f}.wpclubmanager-message.error{border-left-color:#d10f0f!important;} -------------------------------------------------------------------------------- /includes/class-wpcm-cli.php: -------------------------------------------------------------------------------- 1 | reset(); 24 | 25 | \WP_CLI::success( esc_html__( 'WP Club Manager data reset', 'wp-club-manager' ) ); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /templates/single-match/score.php: -------------------------------------------------------------------------------- 1 | ID, 'wpcm_played', true ); 17 | $score = wpcm_get_match_result( $post->ID ); ?> 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | -------------------------------------------------------------------------------- /assets/js/admin/settings.min.js: -------------------------------------------------------------------------------- 1 | jQuery(window).load(function(){jQuery(function(){var a=!1;jQuery("input, textarea, select, checkbox").change(function(){a=!0}),jQuery(".wpcm-nav-tab-wrapper a").click(function(){window.onbeforeunload=a?function(){return wpclubmanager_settings_params.i18n_nav_warning}:""}),jQuery(".submit input").click(function(){window.onbeforeunload=""})}),jQuery("button#wpcm_submit").click(function(a){return a.stopPropagation(),jQuery("#wpcm_loading").show(),jQuery("#wpcm_submit").attr("disabled",!0),data={action:"wpcm_clear_transients",wpcm_nonce:wpclubmanager_settings_params.wpcm_nonce},jQuery.post(ajaxurl,data,function(a){jQuery("#wpcm_loading").hide(),jQuery("button#wpcm_submit").attr("disabled",!1)}),!1}),jQuery(".wpcm-default-time-picker").jquery_timepicker({timeFormat:"H:i",step:"15",scrollDefault:"15:00"})}); -------------------------------------------------------------------------------- /templates/single-match/attendance.php: -------------------------------------------------------------------------------- 1 | ID, 'wpcm_attendance', true ); 17 | $show_attendance = get_option( 'wpcm_results_show_attendance' ); 18 | $played = get_post_meta( $post->ID, 'wpcm_played', true ); 19 | 20 | if ( $played ) { 21 | 22 | if ( $attendance && 'yes' === $show_attendance ) { ?> 23 | 24 |
25 | 26 | : 27 | 28 |
29 | 30 | ');var c=[];jQuery("#the-list").find("tr").each(function(){var a=jQuery(this).attr("id").replace("tag-","");c.push([a,jQuery(this).index()])});var d={action:"update_taxonomy_order",updated_array:c};jQuery.post(localized_data.ajax_url,d,function(a){jQuery(".wpcm-simple-taxonomy-preloader").remove(),jQuery(b.item[0]).find('input[type="checkbox"]').show()})}}),jQuery("#the-list").disableSelection())}); -------------------------------------------------------------------------------- /assets/js/frontend/wpclubmanager.min.js: -------------------------------------------------------------------------------- 1 | jQuery(document).ready(function(){jQuery("[data-countdown]").each(function(){var a=jQuery(this),b=jQuery(this).data("countdown");a.countdown(b,function(a){jQuery(this).html(a.strftime('
%-D '+wpclubmanager_L10n.days+'%!D
%H '+wpclubmanager_L10n.hrs+'
%M '+wpclubmanager_L10n.mins+'
%S '+wpclubmanager_L10n.secs+"
"))})})}),jQuery(function(){jQuery(".stats-tabs a").click(function(){var a=jQuery(this).attr("href");return jQuery(this).parent().addClass("tabs").siblings("li").removeClass("tabs"),jQuery(this).parent().parent().parent().find(".tabs-panel").hide(),jQuery(a).show(),!1}),jQuery(".wpcm-fixtures-shortcode tbody tr").click(function(){void 0!==jQuery(this).attr("data-url")&&(document.location=jQuery(this).attr("data-url"))})}); -------------------------------------------------------------------------------- /includes/admin/views/html-notice-club-check.php: -------------------------------------------------------------------------------- 1 | 11 | 12 |
13 |

You have not set a Default Club! Some features of WP Club Manager will not work without a default club set, please choose your default club now.', 'wp-club-manager' ); ?>

14 |

15 | 16 |

17 |
18 | -------------------------------------------------------------------------------- /wpclubmanager.php: -------------------------------------------------------------------------------- 1 | 18 | */ 19 | 20 | if ( ! function_exists( 'WPCM' ) ) : 21 | /** 22 | * Returns the main instance of WPCM to prevent the need to use globals. 23 | * 24 | * @since 1.0.0 25 | * @return WP_Club_Manager 26 | */ 27 | function WPCM() { 28 | require_once __DIR__ . '/includes/class-wp-club-manager.php'; 29 | 30 | return WP_Club_Manager::instance( __FILE__, '2.2.17' ); 31 | } 32 | endif; 33 | 34 | WPCM(); 35 | -------------------------------------------------------------------------------- /includes/admin/views/html-notice-update.php: -------------------------------------------------------------------------------- 1 | 11 | 12 |
13 |

WP Club Manager Data Update Required – We just need to update your install to the latest version', 'wp-club-manager' ); ?>

14 |

15 |
16 | 22 | -------------------------------------------------------------------------------- /templates/single-match/report.php: -------------------------------------------------------------------------------- 1 | ID, 'wpcm_played', true ); 17 | 18 | if ( $played ) { 19 | 20 | if ( get_the_content() ) { ?> 21 | 22 |
23 | 24 |

25 | 26 |
27 | 28 | 29 | 30 |
31 | 32 |
33 | 34 | 39 | 40 |
41 | 42 |

43 | 44 |
45 | 46 | 47 | 48 |
49 | 50 |
51 | 52 | 'wpcm_player', 18 | 'numberposts' => -1, 19 | ) ); 20 | 21 | $stats = array_merge( array( 'appearances' => __( 'Apps', 'wp-club-manager' ) ), wpcm_get_preset_labels() ); 22 | 23 | foreach ( $stats as $key => $val ) { 24 | if ( get_option( 'wpcm_show_stats_' . $key ) === 'yes' ) { 25 | $stats[ $key ] = ''; 26 | } 27 | } 28 | 29 | foreach ( $my_posts as $my_post ) : 30 | 31 | update_post_meta( $my_post->ID, '_wpcm_custom_player_stats', $stats ); 32 | 33 | endforeach; 34 | 35 | $stats_labels = wpcm_get_preset_labels(); 36 | 37 | foreach ( $stats_labels as $key => $value ) : 38 | 39 | update_option( 'wpcm_match_show_stats_' . $key, 'yes' ); 40 | 41 | endforeach; 42 | -------------------------------------------------------------------------------- /includes/updates/wpclubmanager-update-1-1-0.php: -------------------------------------------------------------------------------- 1 | '; 15 | get_sidebar(); 16 | echo ''; 17 | break; 18 | case 'twentytwelve': 19 | echo ''; 20 | break; 21 | case 'twentythirteen': 22 | echo ''; 23 | break; 24 | case 'twentyfourteen': 25 | echo ''; 26 | get_sidebar( 'content' ); 27 | break; 28 | case 'twentyfifteen': 29 | echo ''; 30 | break; 31 | case 'twentysixteen': 32 | echo ''; 33 | break; 34 | case 'twentyseventeen': 35 | echo ''; 36 | echo ''; 37 | get_sidebar(); 38 | echo ''; 39 | break; 40 | case 'twentynineteen': 41 | echo ''; 42 | echo ''; 46 | echo ''; 47 | break; 48 | default: 49 | // echo ''; 50 | echo ''; 51 | break; 52 | } 53 | -------------------------------------------------------------------------------- /includes/admin/views/html-notice-cricket-addon.php: -------------------------------------------------------------------------------- 1 | 9 | 10 |
11 |

12 |

13 |

14 | 15 |

16 |
17 | -------------------------------------------------------------------------------- /includes/class-wpcm-sports.php: -------------------------------------------------------------------------------- 1 | data = wpcm_get_sport_presets(); 32 | } 33 | 34 | /** 35 | * @param string $key 36 | * 37 | * @return mixed|null 38 | */ 39 | public function __get( $key ) { 40 | return ( array_key_exists( $key, $this->data ) ? $this->data[ $key ] : null ); 41 | } 42 | 43 | /** 44 | * @param string $key 45 | * @param mixed $value 46 | * 47 | * @return void 48 | */ 49 | public function __set( $key, $value ) { 50 | $this->data[ $key ] = $value; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /includes/admin/class-wpcm-admin-extensions.php: -------------------------------------------------------------------------------- 1 | 'WP Club Manager Extensions Page' ) ); 27 | if ( ! is_wp_error( $extensions_json ) ) { 28 | $extensions = json_decode( wp_remote_retrieve_body( $extensions_json ) ); 29 | if ( $extensions ) { 30 | set_transient( 'wpclubmanager_extensions_data', $extensions, 60 * 60 * 24 * 7 ); // 1 Week 31 | } 32 | } 33 | } 34 | 35 | include_once 'views/html-admin-page-extensions.php'; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /includes/admin/views/html-notice-template-check.php: -------------------------------------------------------------------------------- 1 | 11 | 12 |
13 |

14 |

learn more about WP Club Manager Template Structure here.', 'wp-club-manager' ); ?>

15 |

16 |
17 | -------------------------------------------------------------------------------- /templates/shortcodes/staff-gallery.php: -------------------------------------------------------------------------------- 1 | 13 | 14 | 52 | -------------------------------------------------------------------------------- /includes/wpcm-widget-functions.php: -------------------------------------------------------------------------------- 1 | 11 | 12 |
13 |
14 | 15 |

16 | 17 | 18 | 19 | 32 | 33 | 34 | 35 | 36 | 37 |
38 |
39 | -------------------------------------------------------------------------------- /assets/js/frontend/wpclubmanager.js: -------------------------------------------------------------------------------- 1 | /** 2 | * WPClubManager Frontend JS 3 | */ 4 | jQuery(document).ready(function() { 5 | // Next Match countdown 6 | jQuery('[data-countdown]').each(function() { 7 | var $this = jQuery(this), finalDate = jQuery(this).data('countdown'); 8 | $this.countdown(finalDate, function(event) { 9 | var $this = jQuery(this).html(event.strftime('' 10 | + '
%-D '+wpclubmanager_L10n.days+'%!D
' 11 | + '
%H '+wpclubmanager_L10n.hrs+'
' 12 | + '
%M '+wpclubmanager_L10n.mins+'
' 13 | + '
%S '+wpclubmanager_L10n.secs+'
')); 14 | }); 15 | }); 16 | }); 17 | 18 | jQuery(function(){ 19 | 20 | jQuery('.stats-tabs a').click(function(){ 21 | var t = jQuery(this).attr('href'); 22 | 23 | jQuery(this).parent().addClass('tabs').siblings('li').removeClass('tabs'); 24 | jQuery(this).parent().parent().parent().find('.tabs-panel').hide(); 25 | jQuery(t).show(); 26 | 27 | return false; 28 | }); 29 | 30 | jQuery('.wpcm-fixtures-shortcode tbody tr').click(function() { 31 | if(jQuery(this).attr('data-url') !== undefined) { 32 | document.location = jQuery(this).attr('data-url'); 33 | } 34 | }); 35 | 36 | }); 37 | -------------------------------------------------------------------------------- /assets/js/vendor/jquery-chosen/ajax-chosen.jquery.min.js: -------------------------------------------------------------------------------- 1 | // Generated by CoffeeScript 1.3.1 2 | (function(e){return e.fn.ajaxChosen=function(t,n){var r,i,s,o;t==null&&(t={});n==null&&(n=function(){});i={minTermLength:3,afterTypeDelay:500,jsonTermKey:"term"};o=this;r=null;s=e.extend({},i,t);this.chosen();return this.each(function(){return e(this).next(".chosen-container").find(".search-field > input, .chosen-search > input").bind("keyup",function(){var t,i,u,a;a=e.trim(e(this).attr("value"));i=a.length").attr("value",t).html(n).appendTo(o)});o.trigger("chosen:updated");u!=null&&u(r);t.attr("value",a);return t.css("width","auto")};return this.timer=setTimeout(function(){r&&r.abort();return r=e.ajax(s)},s.afterTypeDelay)})})}})(jQuery); -------------------------------------------------------------------------------- /assets/js/admin/settings.js: -------------------------------------------------------------------------------- 1 | jQuery(window).load(function(){ 2 | 3 | // Edit prompt 4 | jQuery(function(){ 5 | var changed = false; 6 | 7 | jQuery('input, textarea, select, checkbox').change(function(){ 8 | changed = true; 9 | }); 10 | 11 | jQuery('.wpcm-nav-tab-wrapper a').click(function(){ 12 | if (changed) { 13 | window.onbeforeunload = function() { 14 | return wpclubmanager_settings_params.i18n_nav_warning; 15 | } 16 | } else { 17 | window.onbeforeunload = ''; 18 | } 19 | }); 20 | 21 | jQuery('.submit input').click(function(){ 22 | window.onbeforeunload = ''; 23 | }); 24 | }); 25 | 26 | // Clear plugin transients button 27 | jQuery('button#wpcm_submit').click(function(e) { 28 | e.stopPropagation(); 29 | jQuery('#wpcm_loading').show(); 30 | jQuery('#wpcm_submit').attr('disabled', true); 31 | 32 | data = { 33 | action: 'wpcm_clear_transients', 34 | wpcm_nonce: wpclubmanager_settings_params.wpcm_nonce 35 | }; 36 | 37 | jQuery.post(ajaxurl, data, function (response) { 38 | jQuery('#wpcm_loading').hide(); 39 | jQuery('button#wpcm_submit').attr('disabled', false); 40 | }); 41 | 42 | return false; 43 | }); 44 | 45 | jQuery('.wpcm-default-time-picker').jquery_timepicker({ 46 | timeFormat: 'H:i', 47 | step: '15', 48 | scrollDefault: '15:00' 49 | }); 50 | 51 | }); -------------------------------------------------------------------------------- /templates/single-club.php: -------------------------------------------------------------------------------- 1 | 17 | 18 | 27 | 28 | 32 | 33 | 34 | 35 | 36 | 37 | 45 | 46 | 54 | 55 | 7 |
8 | 9 |
10 |

Victory Theme

11 |
12 | plugin_url() ) . '/assets/images/admin/wpcm-victory-preview.jpg" style="max-width:100%" />'; ?> 13 |

A clean, versatile theme, Victory integrates seamlessly with WP Club Manager to give your sports club website a fresh new look.

14 |

Check it out!

15 |

Get 25% off with this code:
25PERCENT

16 |
17 |
18 | 21 | 22 |
23 |

Do You Like WP Club Manager?

24 |
25 |

Please consider showing your appreciation by helping to spread the word.

26 | 29 |
30 |
31 | 32 |
33 | -------------------------------------------------------------------------------- /templates/single-match.php: -------------------------------------------------------------------------------- 1 | 17 | 18 | 27 | 28 | 32 | 33 | 34 | 35 | 36 | 37 | 45 | 46 | 54 | 55 | 17 | 18 | 27 | 28 | 32 | 33 | 34 | 35 | 36 | 37 | 45 | 46 | 54 | 55 | 17 | 18 | 27 | 28 | 32 | 33 | 34 | 35 | 36 | 37 | 45 | 46 | 54 | 55 | '_wpcm_table_notes', 33 | 'label' => __( 'Add notes', 'wp-club-manager' ), 34 | 'class' => 'regular-text', 35 | ) ); 36 | } 37 | 38 | /** 39 | * Save meta box data 40 | * 41 | * @param int $post_id 42 | * @param WP_Post $post 43 | */ 44 | public static function save( $post_id, $post ) { 45 | if ( ! check_admin_referer( 'wpclubmanager_save_data', 'wpclubmanager_meta_nonce' ) ) { 46 | return; 47 | } 48 | 49 | $notes = filter_input( INPUT_POST, '_wpcm_table_notes', FILTER_UNSAFE_RAW ); 50 | if ( isset( $notes ) ) { 51 | update_post_meta( $post_id, '_wpcm_table_notes', sanitize_text_field( $notes ) ); 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /templates/single-match/status.php: -------------------------------------------------------------------------------- 1 | ID, 'wpcm_overtime', true ); 17 | $shootout = get_post_meta( $post->ID, 'wpcm_shootout', true ); 18 | 19 | if ( $overtime || $shootout ) { ?> 20 | 21 |
22 | 23 | 24 | 25 | 28 | 29 | 30 | 31 | ID, '_wpcm_home_shootout_goals', true ); 37 | $away_goals = get_post_meta( $post->ID, '_wpcm_away_shootout_goals', true ); 38 | $delimiter = get_option( 'wpcm_match_goals_delimiter' ); 39 | ?> 40 | 41 | 42 | 43 | 46 | 47 | 48 | 49 |
50 | 51 | ID, 'wpcm_played', true ); 17 | $venue_info = wpcm_get_match_venue( $post->ID ); 18 | 19 | if ( ! $played ) { ?> 20 | 21 |
22 | 23 |

24 | 25 | 32 | 33 |
34 | 37 |

38 | 39 |

40 | 41 |

42 | 46 |

47 | 48 |

49 | 52 |
53 | 54 |
55 | 56 | 13 | 14 |
15 | 16 | ' . esc_html( $title ) . '' : '' ); ?> 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 0 && $count > $limit ) { 39 | break; 40 | } 41 | ?> 42 | 43 | 44 | 45 | 46 | 47 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 |
25 | 26 |
48 | 49 |
59 | 60 | 61 | 62 | 63 | 64 |
65 | -------------------------------------------------------------------------------- /includes/admin/settings/class-wpcm-settings-licenses.php: -------------------------------------------------------------------------------- 1 | id = 'licenses'; 27 | $this->label = __( 'Licenses', 'wp-club-manager' ); 28 | 29 | add_filter( 'wpclubmanager_settings_tabs_array', array( $this, 'add_settings_page' ), 20 ); 30 | add_action( 'wpclubmanager_settings_' . $this->id, array( $this, 'output' ) ); 31 | add_action( 'wpclubmanager_settings_save_' . $this->id, array( $this, 'save' ) ); 32 | } 33 | 34 | /** 35 | * Get settings array 36 | * 37 | * @return array 38 | */ 39 | public function get_settings() { 40 | 41 | return apply_filters( 'wpclubmanager_license_settings', array() ); 42 | } 43 | 44 | /** 45 | * Save settings 46 | */ 47 | public function save() { 48 | $settings = $this->get_settings(); 49 | 50 | WPCM_Admin_Settings::save_fields( $settings ); 51 | } 52 | } 53 | 54 | endif; 55 | 56 | return new WPCM_Settings_Licenses(); 57 | -------------------------------------------------------------------------------- /includes/admin/views/html-notice-theme-support.php: -------------------------------------------------------------------------------- 1 | 11 | 12 |
13 |

14 |
15 | 16 |

17 |

18 | 19 | 20 | 21 |

22 |
23 | -------------------------------------------------------------------------------- /includes/admin/views/html-notice-install.php: -------------------------------------------------------------------------------- 1 | 10 | 11 |
12 | 13 |

14 | 15 | 19 | 20 |

21 |

22 | 23 |

24 | 25 | 26 | 27 |

28 | 29 |

30 | 31 |
32 | -------------------------------------------------------------------------------- /assets/js/admin/editor.js: -------------------------------------------------------------------------------- 1 | /* global tinymce */ 2 | ( function () { 3 | tinymce.PluginManager.add( 'wpcm_shortcodes_button', function( editor, url ) { 4 | var ed = tinymce.activeEditor; 5 | 6 | var groups = ed.getLang( 'wpclubmanager.shortcodes' ).split("]"); 7 | var menu = new Array(); 8 | 9 | groups.forEach(function(g) { 10 | if ( "" == g ) return; 11 | var p = g.split("["); 12 | var label = p.shift(); 13 | var variations = p.shift(); 14 | var shortcodes = variations.split("|"); 15 | var submenu = new Array(); 16 | shortcodes.forEach(function(s) { 17 | submenu.push({ 18 | text: ed.getLang( 'wpclubmanager.' + s ), 19 | onclick: function() { 20 | // triggers the thickbox 21 | var width = jQuery(window).width(), H = jQuery(window).height(), W = ( 720 < width ) ? 720 : width; 22 | W = W - 10; 23 | H = H - 84; 24 | tb_show( ed.getLang( 'wpclubmanager.' + s ), 'admin-ajax.php?action=wpclubmanager_' + s + '_shortcode&width=' + W + '&height=' + H ); 25 | } 26 | }); 27 | }); 28 | menu.push({ 29 | text: ed.getLang( 'wpclubmanager.' + label ), 30 | menu: submenu 31 | }); 32 | }); 33 | 34 | editor.addButton( 'wpcm_shortcodes_button', { 35 | title: ed.getLang('wpclubmanager.insert'), 36 | text: false, 37 | icon: false, 38 | type: 'menubutton', 39 | menu: menu 40 | }); 41 | }); 42 | })(); 43 | -------------------------------------------------------------------------------- /templates/shortcodes/players-gallery.php: -------------------------------------------------------------------------------- 1 | 13 | 14 | 66 | -------------------------------------------------------------------------------- /templates/shortcodes/players.php: -------------------------------------------------------------------------------- 1 | 13 | 14 |
15 | 16 | ' . wp_kses_post( $title ) . '' : '' ); ?> 17 | 18 | 19 | 20 | 21 | 22 | 26 | 27 | 28 | 29 | 33 | 34 | 35 | 36 | 37 | 38 | 0 && $count > $limit ) { 43 | break; 44 | } 45 | ?> 46 | 47 | 48 | 49 | 53 | 54 | 59 | 60 | 64 | 65 | 66 | 67 | 68 | 69 | 70 |
55 | 56 | 57 | 58 |
71 | 72 | 73 | 74 | 75 | 76 |
77 | -------------------------------------------------------------------------------- /includes/admin/settings/class-wpcm-settings-page.php: -------------------------------------------------------------------------------- 1 | id ] = $this->label; 41 | 42 | return $pages; 43 | } 44 | 45 | /** 46 | * Get settings array 47 | * 48 | * @return array 49 | */ 50 | public function get_settings() { 51 | return array(); 52 | } 53 | 54 | /** 55 | * Output the settings 56 | */ 57 | public function output() { 58 | $settings = $this->get_settings(); 59 | 60 | WPCM_Admin_Settings::output_fields( $settings ); 61 | } 62 | 63 | /** 64 | * Save settings 65 | */ 66 | public function save() { 67 | global $current_section; 68 | 69 | $settings = $this->get_settings(); 70 | WPCM_Admin_Settings::save_fields( $settings ); 71 | 72 | if ( $current_section ) { 73 | do_action( 'wpclubmanager_update_options_' . $this->id . '_' . $current_section ); 74 | } 75 | } 76 | } 77 | 78 | endif; 79 | -------------------------------------------------------------------------------- /includes/admin/views/html-admin-settings.php: -------------------------------------------------------------------------------- 1 | 7 |
8 |

9 |
10 | 19 | 20 |
21 | 22 |
23 | 24 |
25 | 26 | 33 | 34 |

35 | 36 | 37 | 38 | 39 | 40 |

41 | 42 |
43 | 44 | 45 | 46 |
47 | 48 |
49 | 50 |
51 |
52 | -------------------------------------------------------------------------------- /includes/admin/post-types/meta-boxes/class-wpcm-meta-box-club-staff.php: -------------------------------------------------------------------------------- 1 | 'wpcm_staff', 31 | 'posts_per_page' => -1, 32 | 'meta_query' => array( 33 | array( 34 | 'key' => '_wpcm_staff_club', 35 | 'value' => $post->ID, 36 | ), 37 | ), 38 | ); 39 | 40 | $players = get_posts( $args ); 41 | ?> 42 | 43 |
44 | 45 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 57 | 58 | 59 | 62 | 63 | 64 | 65 | 68 | 71 | 72 | 73 | 74 | 75 | 76 |
66 | post_title ); ?> 67 | 69 | 70 |
77 |
78 | 79 |
'; 19 | break; 20 | case 'twentytwelve': 21 | echo '
'; 22 | break; 23 | case 'twentythirteen': 24 | echo '
'; 25 | break; 26 | case 'twentyfourteen': 27 | echo '
'; 28 | break; 29 | case 'twentyfifteen': 30 | echo '
'; 31 | break; 32 | case 'twentysixteen': 33 | echo '
'; 34 | break; 35 | case 'twentyseventeen': 36 | echo '
'; 37 | echo '
'; 38 | echo '
'; 39 | break; 40 | case 'twentynineteen': 41 | echo '
'; 42 | echo '
'; 43 | break; 44 | case 'twentytwenty': 45 | echo '
'; 46 | echo '
'; 47 | break; 48 | default: 49 | echo '
'; 50 | break; 51 | } 52 | -------------------------------------------------------------------------------- /includes/admin/post-types/meta-boxes/class-wpcm-meta-box-club-players.php: -------------------------------------------------------------------------------- 1 | 'wpcm_player', 31 | 'posts_per_page' => -1, 32 | 'meta_query' => array( 33 | array( 34 | 'key' => '_wpcm_player_club', 35 | 'value' => $post->ID, 36 | ), 37 | ), 38 | ); 39 | 40 | $players = get_posts( $args ); 41 | ?> 42 | 43 |
44 | 45 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 57 | 58 | 59 | 62 | 63 | 64 | 65 | 68 | 71 | 72 | 73 | 74 | 75 | 76 |
66 | post_title ); ?> 67 | 69 | 70 |
77 |
78 | 79 | ' ); 24 | 25 | // empty array 26 | var updated_array = []; 27 | 28 | // store the updated tax ID 29 | jQuery( '#the-list' ).find( 'tr' ).each( function() { 30 | var tax_id = jQuery( this ).attr( 'id' ).replace( 'tag-', '' ); 31 | updated_array.push( [ tax_id, jQuery( this ).index() ] ); 32 | }); 33 | 34 | // build the ajax data 35 | var data = { 36 | 'action': 'update_taxonomy_order', 37 | 'updated_array': updated_array 38 | }; 39 | // Run the ajax request 40 | jQuery.post( localized_data.ajax_url, data, function( response ) { 41 | jQuery( '.wpcm-simple-taxonomy-preloader' ).remove(); 42 | jQuery( ui.item[0] ).find( 'input[type="checkbox"]' ).show(); 43 | }); 44 | }, 45 | }); 46 | 47 | jQuery( "#the-list" ).disableSelection(); 48 | 49 | } 50 | 51 | }); -------------------------------------------------------------------------------- /templates/content-widget-results.php: -------------------------------------------------------------------------------- 1 | post_date ); ?> 16 | 17 |
  • 18 |
    19 | 20 |
    21 | 22 |
    23 | 27 |
    28 |   29 |
    30 | 31 |
    32 | 33 |
    34 |

    35 | 36 | 37 |
    38 |

    39 |

    40 | 41 | 42 |
    43 |

    44 |
    45 |
    46 |
    47 |
    48 | 53 |
    54 |
    55 |
  • 56 | -------------------------------------------------------------------------------- /templates/content-widget-fixtures.php: -------------------------------------------------------------------------------- 1 | post_date ); ?> 16 | 17 |
  • 18 |
    19 | 20 |
    21 | 22 |
    23 | 27 |
    28 |   29 |
    30 | 31 |
    32 | 33 |
    34 |

    35 | 36 | 37 |

    38 |

    39 | 40 | 41 |

    42 |
    43 |
    44 |
    45 |
    46 | 51 |
    52 | 53 |
    54 |
    55 |
    56 | 57 |
    58 |
  • 59 | -------------------------------------------------------------------------------- /templates/content-single-player.php: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 |
    > 20 | 21 |
    22 | 23 | 31 | 32 |
    33 | 34 | 43 | 44 |
    45 | 46 |
    47 | 48 |
    49 | 50 | 58 | 59 |
    60 | 61 |
    62 | 63 | 71 | 72 |
    73 | 74 | 75 | 76 |
    77 | -------------------------------------------------------------------------------- /includes/admin/post-types/meta-boxes/class-wpcm-meta-box-club-table.php: -------------------------------------------------------------------------------- 1 | 30 | 31 |

    32 | 'add_to_table', 35 | 'id' => 'add_to_table', 36 | 'post_type' => 'wpcm_table', 37 | 'limit' => -1, 38 | 'show_option_none' => __( 'None', 'wp-club-manager' ), 39 | 'class' => 'chosen_select', 40 | 'order' => 'DESC', 41 | 'orderby' => 'date', 42 | 'echo' => false, 43 | )); 44 | ?> 45 |

    46 | 47 | 13 | 14 |
    15 | 16 | ' . esc_html( $title ) . '' : '' ); ?> 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | wpcm_stats; 38 | ?> 39 | 40 | 41 | 42 | 45 | 46 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 |
    43 | place ); ?> 44 | 47 | thumb ); 49 | echo ( 1 === $link_club ? '' : '' ); 50 | echo esc_html( $club->post_title ); 51 | echo ( 1 === $link_club ? '' : '' ); 52 | ?> 53 |
    67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 |
    75 | -------------------------------------------------------------------------------- /assets/js/admin/editor-lang.php: -------------------------------------------------------------------------------- 1 | array( 7 | 'player_list', 'player_gallery' 8 | ), 9 | 'staff' => array( 10 | 'staff_list', 'staff_gallery' 11 | ), 12 | 'match' => array( 13 | 'match_opponents', 'match_list' 14 | ), 15 | 'league' => array( 16 | 'league_table' 17 | ), 18 | 'maps' => array( 19 | 'map_venue' 20 | ), 21 | ); 22 | 23 | $options = apply_filters( 'wpclubmanager_shortcodes', $options ); 24 | 25 | foreach ( $options as $name => $group ) { 26 | if ( empty( $group ) ) continue; 27 | $shortcodes .= $name . '[' . implode( '|', $group ) . ']'; 28 | } 29 | 30 | $raw = apply_filters( 'wpclubmanager_tinymce_strings', array( 31 | 'shortcodes' => $shortcodes, 32 | 'insert' => __( 'WP Club Manager Shortcodes', 'wp-club-manager' ), 33 | 'match' => __( 'Matches', 'wp-club-manager' ), 34 | 'player' => __( 'Players', 'wp-club-manager' ), 35 | 'staff' => __( 'Staff', 'wp-club-manager' ), 36 | 'league' => __( 'Standings', 'wp-club-manager' ), 37 | 'maps' => __( 'Maps', 'wp-club-manager' ), 38 | 'match_opponents' => __( 'Match Opponents', 'wp-club-manager' ), 39 | 'match_list' => __( 'Match List', 'wp-club-manager' ), 40 | 'player_list' => __( 'Player List', 'wp-club-manager' ), 41 | 'player_gallery' => __( 'Player Gallery', 'wp-club-manager' ), 42 | 'staff_list' => __( 'Staff List', 'wp-club-manager' ), 43 | 'staff_gallery' => __( 'Staff Gallery', 'wp-club-manager' ), 44 | 'league_table' => __( 'League Table', 'wp-club-manager' ), 45 | 'map_venue' => __( 'Venue Map', 'wp-club-manager' ), 46 | )); 47 | 48 | $formatted = array(); 49 | 50 | foreach ( $raw as $key => $value ) { 51 | $formatted[] = $key . ': "' . esc_js( $value ) . '"'; 52 | } 53 | 54 | $strings = 'tinyMCE.addI18n({' . _WP_Editors::$mce_locale . ':{ 55 | wpclubmanager:{ 56 | ' . implode( ', ', $formatted ) . ' 57 | } 58 | }})'; 59 | -------------------------------------------------------------------------------- /includes/admin/views/html-quick-edit-staff.php: -------------------------------------------------------------------------------- 1 | 11 | 12 |
    13 | 14 | 15 | 16 |
    17 | 18 | 19 | 20 |
    21 | 22 | 28 | 29 | 35 |
    36 | 37 | 38 | 50 |
    51 | 52 | 53 |
    54 | 55 | 56 | 57 | 58 | 59 |
    60 |
    61 | -------------------------------------------------------------------------------- /includes/admin/views/html-quick-edit-player.php: -------------------------------------------------------------------------------- 1 | 11 | 12 |
    13 | 14 | 15 | 16 |
    17 | 18 | 19 | 20 |
    21 | 22 | 28 | 29 | 35 |
    36 | 37 | 38 | 50 |
    51 | 52 | 53 |
    54 | 55 | 56 | 57 | 58 | 59 |
    60 |
    61 | -------------------------------------------------------------------------------- /includes/class-wpcm-reset-database.php: -------------------------------------------------------------------------------- 1 | query( "DELETE FROM $wpdb->options WHERE option_name LIKE 'wpcm_%';" ); 28 | $wpdb->query( "DELETE FROM $wpdb->options WHERE option_name LIKE 'wpclubmanager_%';" ); 29 | $wpdb->query( "DELETE FROM $wpdb->options WHERE option_name LIKE '_wpcm_%';" ); 30 | 31 | $this->delete_terms( 'wpcm_comp' ); 32 | $this->delete_terms( 'wpcm_jobs' ); 33 | $this->delete_terms( 'wpcm_position' ); 34 | $this->delete_terms( 'wpcm_season' ); 35 | $this->delete_terms( 'wpcm_team' ); 36 | $this->delete_terms( 'wpcm_venue' ); 37 | 38 | $wpdb->query( "DELETE meta FROM {$wpdb->postmeta} meta INNER JOIN {$wpdb->posts} posts ON posts.ID = meta.post_id WHERE posts.post_type IN ( 'wpcm_player', 'wpcm_staff', 'wpcm_club', 'wpcm_match', 'wpcm_sponsor', 'wpcm_roster', 'wpcm_table' );" ); 39 | $wpdb->query( "DELETE FROM {$wpdb->posts} WHERE post_type IN ( 'wpcm_player', 'wpcm_staff', 'wpcm_club', 'wpcm_match', 'wpcm_sponsor', 'wpcm_roster', 'wpcm_table' );" ); 40 | 41 | delete_option( 'wpclubmanager_installed' ); 42 | } 43 | 44 | /** 45 | * @param string $taxonomy 46 | * 47 | * @return void 48 | */ 49 | protected function delete_terms( $taxonomy ) { 50 | $terms = get_terms( array( 51 | 'taxonomy' => $taxonomy, 52 | 'hide_empty' => false, 53 | ) ); 54 | 55 | if ( empty( $terms ) || is_wp_error( $terms ) ) { 56 | return; 57 | } 58 | 59 | foreach ( $terms as $term ) { 60 | if ( $term && $term->term_id ) { 61 | wp_delete_term( $term->term_id, $taxonomy ); 62 | } 63 | } 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /templates/content-widget-birthdays.php: -------------------------------------------------------------------------------- 1 | 13 | 14 |
      15 | 16 | $value ) { 18 | 19 | $dob = get_post_meta( $this_post_id, 'wpcm_dob', true ); 20 | $date = gmdate( 'F j', strtotime( $dob ) ); 21 | $age = ''; 22 | if ( $show_age ) { 23 | $age = get_age( $dob ); 24 | if ( gmdate( 'm-d' ) !== $value ) { 25 | $age = get_age( $dob ) + 1; 26 | } 27 | } 28 | 29 | // Today 30 | if ( gmdate( 'm-d' ) == $value ) { 31 | ?> 32 | 33 |
    • 34 |

      35 |
      36 | 37 | 38 | 39 |
      40 |

      41 |

      42 |
      43 |
      44 |
    • 45 | 46 | 50 | 51 |
    • 52 |
      53 | 54 | 55 | 56 |
      57 |

      58 |

      59 |
      60 |
      61 |
    • 62 | 63 | 67 | 68 |
    69 | -------------------------------------------------------------------------------- /includes/wpcm-deprecated-functions.php: -------------------------------------------------------------------------------- 1 | $key, 58 | 'value' => $value, 59 | 'count' => $count, 60 | ) ); 61 | } 62 | 63 | /** 64 | * @param array $stats 65 | * @param int $team 66 | * @param int $season 67 | * 68 | * @return null 69 | */ 70 | function wpcm_profile_stats_table( $stats = array(), $team = 0, $season = 0 ) { 71 | _deprecated_function( 'wpcm_profile_stats_table', '1.4.0', '' ); 72 | return wpclubmanager_get_template( 'single-player/stats-table.php', array( 73 | 'stats' => $stats, 74 | 'team' => $team, 75 | 'season' => $season, 76 | ) ); 77 | } 78 | 79 | /** 80 | * @param WP_Post|int|null $post 81 | * 82 | * @return array 83 | */ 84 | function get_wpcm_player_stats_from_post( $post = null ) { 85 | _deprecated_function( 'get_wpcm_player_stats_from_post', '1.4.0', '' ); 86 | return get_wpcm_player_stats( $post ); 87 | } 88 | -------------------------------------------------------------------------------- /includes/admin/post-types/meta-boxes/class-wpcm-meta-box-player-display.php: -------------------------------------------------------------------------------- 1 | ID, '_wpcm_custom_player_stats', true )?> 33 | 34 |
    35 | $val ) : 37 | if ( 'yes' === get_option( 'wpcm_show_stats_' . $key ) ) : 38 | ?> 39 | 40 | 44 | 45 | 49 |
    50 | 51 | $value ) { 68 | $player_stats[ sanitize_text_field( $key ) ] = ''; 69 | } 70 | update_post_meta( $post_id, '_wpcm_custom_player_stats', $player_stats ); 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /assets/js/admin/wpclubmanager_admin.min.js: -------------------------------------------------------------------------------- 1 | jQuery(function(a){if(jQuery("body").click(function(){jQuery(".wpcm_error_tip").fadeOut("100",function(){jQuery(this).remove()})}),jQuery("select.chosen_select").chosen({width:"220px",disable_search_threshold:18}),jQuery("select.wpcm-chosen-multiple").chosen({width:"90%"}),jQuery("#input-order").length){jQuery("select.wpcm-chosen-multiple").on("change",function(a){var b=jQuery(this).get(0);setTimeout(function(){var a=ChosenOrder.getSelectionOrder(b);jQuery("#input-order").val(a).toString().split(",")})});var b=jQuery("select.wpcm-chosen-multiple").get(0);ChosenOrder.setSelectionOrder(b,jQuery("#input-order").val().split(","),!0)}jQuery(".wpcm_stats-tabs a").click(function(){var a=jQuery(this).attr("href");return jQuery(this).parent().addClass("tabs").siblings("li").removeClass("tabs"),jQuery(this).parent().parent().parent().find(".tabs-panel").hide(),jQuery(a).show(),!1}),jQuery(".wpcm-address").keypress(function(a){return 13!=a.keyCode});var c=jQuery('input[type="radio"][name="wpcm_map_select"]:checked').val(),d=jQuery('input[type="radio"][name="wpcm_osm_layer"]:checked').val();"osm"==c&&(jQuery("#wpcm_osm_layer-row").show(),jQuery("#wpcm_google_map_api-row").hide(),jQuery("#wpcm_map_type-row").hide(),"mapbox"==d&&(jQuery("#wpcm_mapbox_api-row").show(),jQuery("#wpcm_mapbox_type-row").show())),"google"==c&&jQuery("#wpcm_google_map_api-row").show(),jQuery('input[type="radio"][name="wpcm_map_select"]').on("change",function(){switch(jQuery(this).val()){case"osm":jQuery("#wpcm_osm_layer-row").show(),jQuery("#wpcm_google_map_api-row").hide(),jQuery("#wpcm_map_type-row").hide(),"mapbox"==d&&(jQuery("#wpcm_mapbox_api-row").show(),jQuery("#wpcm_mapbox_type-row").show());break;case"google":jQuery("#wpcm_osm_layer-row").hide(),jQuery("#wpcm_mapbox_api-row").hide(),jQuery("#wpcm_mapbox_type-row").hide(),jQuery("#wpcm_google_map_api-row").show(),jQuery("#wpcm_map_type-row").show()}}),jQuery('input[type="radio"][name="wpcm_osm_layer"]').on("change",function(){switch(jQuery(this).val()){case"mapbox":jQuery("#wpcm_mapbox_api-row").show(),jQuery("#wpcm_mapbox_type-row").show();break;case"standard":jQuery("#wpcm_mapbox_api-row").hide(),jQuery("#wpcm_mapbox_type-row").hide()}})}); -------------------------------------------------------------------------------- /includes/admin/post-types/meta-boxes/class-wpcm-meta-box-match-video.php: -------------------------------------------------------------------------------- 1 | ID, '_wpcm_video', true ); 30 | 31 | if ( $video ) : ?> 32 |
    33 | 34 |

    35 |
    36 | 37 | 42 |
    47 |

    48 |
    49 | ID, 'wpcm_link_nw', true ); 32 | 33 | do_action( 'wpclubmanager_before_admin_sponsors_meta', $post->ID ); 34 | 35 | wpclubmanager_wp_text_input( array( 36 | 'id' => 'wpcm_link_url', 37 | 'label' => __( 'Link URL', 'wp-club-manager' ), 38 | 'class' => 'regular-text', 39 | ) ); ?> 40 | 41 | 45 | 46 | 30 | 31 |

    32 | 'add_to_roster', 35 | 'id' => 'add_to_roster', 36 | 'post_type' => 'wpcm_roster', 37 | 'limit' => -1, 38 | 'show_option_none' => __( 'None', 'wp-club-manager' ), 39 | 'class' => 'chosen_select', 40 | 'order' => 'DESC', 41 | 'orderby' => 'date', 42 | 'echo' => false, 43 | )); 44 | ?> 45 |

    46 | 47 | term_id; 72 | wp_set_post_terms( $post_id, $season, 'wpcm_season', true ); 73 | 74 | $teams = wp_get_post_terms( $staff_id, 'wpcm_team' ); 75 | $team = $teams[0]->term_id; 76 | wp_set_post_terms( $post_id, $team, 'wpcm_team', true ); 77 | } 78 | } 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /phpcs.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 3 | . 4 | includes/WPCM_Plugin_Updater 5 | includes/libraries/tgm-plugin-activation/ 6 | vendor 7 | bin 8 | release 9 | languages 10 | dist 11 | tests 12 | config 13 | build 14 | assets 15 | src 16 | static 17 | Gruntfile.js 18 | .sass-cache 19 | scoper.inc.php 20 | includes/functions-scoped.php 21 | node_modules/ 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /includes/admin/class-wpcm-admin-editor.php: -------------------------------------------------------------------------------- 1 | plugin_path() . '/assets/js/admin/editor-lang.php'; 53 | return $arr; 54 | } 55 | 56 | /** 57 | * Register the shortcode buttons. 58 | * 59 | * @param array $buttons 60 | * @return array 61 | */ 62 | public function register_shortcode_button( $buttons ) { 63 | array_push( $buttons, 'wpcm_shortcodes_button' ); 64 | return $buttons; 65 | } 66 | 67 | /** 68 | * Add the shortcode buttons to TinyMCE. 69 | * 70 | * @param array $plugin_array 71 | * @return array 72 | */ 73 | public function add_shortcode_tinymce_plugin( $plugin_array ) { 74 | $plugin_array['wpcm_shortcodes_button'] = WPCM()->plugin_url() . '/assets/js/admin/editor.js'; 75 | return $plugin_array; 76 | } 77 | 78 | /** 79 | * Force TinyMCE to refresh. 80 | * 81 | * @param int $ver 82 | * @return int 83 | */ 84 | public function refresh_mce( $ver ) { 85 | 86 | $ver += 3; 87 | return $ver; 88 | } 89 | } 90 | 91 | new WPCM_Admin_Editor(); 92 | -------------------------------------------------------------------------------- /includes/widgets/class-wpcm-sponsors-widget.php: -------------------------------------------------------------------------------- 1 | widget_cssclass = 'wpcm-widget widget-sponsors'; 31 | $this->widget_description = __( 'Display a sponsors logo.', 'wp-club-manager' ); 32 | $this->widget_idbase = 'wpcm-sponsors-widget'; 33 | $this->widget_name = __( 'WPCM Sponsors', 'wp-club-manager' ); 34 | $this->settings = array( 35 | 'title' => array( 36 | 'type' => 'text', 37 | 'std' => __( 'Sponsors', 'wp-club-manager' ), 38 | 'label' => __( 'Title', 'wp-club-manager' ), 39 | ), 40 | 'id' => array( 41 | 'type' => 'posts_select', 42 | 'post_type' => 'wpcm_sponsor', 43 | 'show_option_none' => false, 44 | 'label' => __( 'Choose a sponsor', 'wp-club-manager' ), 45 | 'orderby' => 'post_date', 46 | 'order' => 'DESC', 47 | 'limit' => -1, 48 | 'std' => null, 49 | ), 50 | ); 51 | parent::__construct(); 52 | } 53 | 54 | /** 55 | * widget function. 56 | * 57 | * @param array $args 58 | * @param array $instance 59 | * 60 | * @return void 61 | * @see WP_Widget 62 | * @access public 63 | */ 64 | public function widget( $args, $instance ) { 65 | 66 | $this->widget_start( $args, $instance ); 67 | 68 | $link_url = get_post_meta( $instance['id'], 'wpcm_link_url', true ); 69 | $link_new_window = get_post_meta( $instance['id'], 'wpcm_link_nw', true ); 70 | $nw = ( $link_new_window ) ? ' target="_blank"' : ''; ?> 71 | 72 | > 73 | 74 | 75 | 76 | widget_end( $args ); 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /includes/admin/post-types/meta-boxes/class-wpcm-meta-box-player-roster.php: -------------------------------------------------------------------------------- 1 | 30 | 31 |

    32 | 'add_to_roster', 35 | 'id' => 'add_to_roster', 36 | 'post_type' => 'wpcm_roster', 37 | 'limit' => -1, 38 | 'show_option_none' => __( 'None', 'wp-club-manager' ), 39 | 'class' => 'chosen_select', 40 | 'order' => 'DESC', 41 | 'orderby' => 'date', 42 | 'echo' => false, 43 | )); 44 | ?> 45 |

    46 | 47 | term_id; 72 | wp_set_post_terms( $post_id, $season, 'wpcm_season', true ); 73 | 74 | $teams = wp_get_post_terms( $player_id, 'wpcm_team' ); 75 | $team = $teams[0]->term_id; 76 | wp_set_post_terms( $post_id, $team, 'wpcm_team', true ); 77 | } 78 | } 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /templates/shortcodes/matches-2.php: -------------------------------------------------------------------------------- 1 | 13 | 14 |
    15 | 16 | ' . esc_html( $title ) . '' : '' ); ?> 17 | 18 |
      19 | 20 | ID, 'wpcm_played', true ); 24 | $timestamp = strtotime( $match->post_date ); 25 | $time_format = get_option( 'time_format' ); 26 | $class = wpcm_get_match_outcome( $match->ID ); 27 | $comp = wpcm_get_match_comp( $match->ID ); 28 | $sides = wpcm_get_match_clubs( $match->ID ); 29 | $side1 = $sides[0]; 30 | $side2 = $sides[1]; 31 | $result = wpcm_get_match_result( $match->ID ); 32 | ?> 33 | 34 |
    • 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 |
    • 55 | 56 | 57 | 58 |
    59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 |
    67 | -------------------------------------------------------------------------------- /includes/class-wpcm-cache-helper.php: -------------------------------------------------------------------------------- 1 | 0 ? ( parseInt( wpcm_taxonomy_ordering_data.paged ) - 1 ) * parseInt( $( '#' + wpcm_taxonomy_ordering_data.per_page_id ).val() ) : 0; 8 | const tax_table = $( '#the-list' ); 9 | 10 | // If the tax table contains items. 11 | if ( ! tax_table.find( 'tr:first-child' ).hasClass( 'no-items' ) ) { 12 | 13 | tax_table.sortable({ 14 | placeholder: "wpcm-drag-drop-tax-placeholder", 15 | axis: "y", 16 | 17 | // On start, set a height for the placeholder to prevent table jumps. 18 | start: function( event, ui ) { 19 | const item = $( ui.item[0] ); 20 | const index = item.index(); 21 | $( '.wpcm-drag-drop-tax-placeholder' ).css( 'height', item.css( 'height' ) ); 22 | }, 23 | // Update callback. 24 | update: function( event, ui ) { 25 | const item = $( ui.item[0] ); 26 | 27 | // Hide checkbox, append a preloader. 28 | item.find( 'input[type="checkbox"]' ).hide().after( '' ); 29 | 30 | const taxonomy_ordering_data = []; 31 | 32 | tax_table.find( 'tr.ui-sortable-handle' ).each( function() { 33 | const ele = $( this ); 34 | const term_data = { 35 | term_id: ele.attr( 'id' ).replace( 'tag-', '' ), 36 | order: parseInt( ele.index() ) + 1 37 | } 38 | taxonomy_ordering_data.push( term_data ); 39 | }); 40 | 41 | // AJAX Data. 42 | const data = { 43 | 'action': 'wpcm_update_taxonomy_order', 44 | 'taxonomy_ordering_data': taxonomy_ordering_data, 45 | 'base_index': base_index, 46 | 'term_order_nonce': wpcm_taxonomy_ordering_data.term_order_nonce 47 | }; 48 | 49 | // Run the ajax request. 50 | $.ajax({ 51 | type: 'POST', 52 | url: window.ajaxurl, 53 | data: data, 54 | dataType: 'JSON', 55 | success: function( response ) { 56 | console.log( response ); 57 | $( '.wpcm-taxonomy-preloader' ).remove(); 58 | item.find( 'input[type="checkbox"]' ).show(); 59 | } 60 | }); 61 | } 62 | }); 63 | } 64 | }); 65 | })( jQuery ); 66 | -------------------------------------------------------------------------------- /includes/class-wpcm-autoloader.php: -------------------------------------------------------------------------------- 1 | include_path = untrailingslashit( plugin_dir_path( WPCM_PLUGIN_FILE ) ) . '/includes/'; 39 | } 40 | 41 | /** 42 | * Take a class name and turn it into a file name 43 | * 44 | * @param string $class 45 | * @return string 46 | */ 47 | private function get_file_name_from_class( $class ) { 48 | return 'class-' . str_replace( '_', '-', strtolower( $class ) ) . '.php'; 49 | } 50 | 51 | /** 52 | * Include a class file 53 | * 54 | * @param string $path 55 | * @return bool successful or not 56 | */ 57 | private function load_file( $path ) { 58 | if ( $path && is_readable( $path ) ) { 59 | include_once $path; 60 | return true; 61 | } 62 | return false; 63 | } 64 | 65 | /** 66 | * Auto-load WC classes on demand to reduce memory consumption. 67 | * 68 | * @param string $class 69 | */ 70 | public function autoload( $class ) { 71 | $class = strtolower( $class ); 72 | $file = $this->get_file_name_from_class( $class ); 73 | $path = ''; 74 | 75 | if ( strpos( $class, 'wpcm_shortcode_' ) === 0 ) { 76 | $path = $this->include_path . 'shortcodes/'; 77 | } elseif ( strpos( $class, 'wpcm_meta_box' ) === 0 ) { 78 | $path = $this->include_path . 'admin/post-types/meta-boxes/'; 79 | } elseif ( strpos( $class, 'wpcm_admin' ) === 0 ) { 80 | $path = $this->include_path . 'admin/'; 81 | } 82 | 83 | if ( empty( $path ) || ( ! $this->load_file( $path . $file ) && strpos( $class, 'wpcm_' ) === 0 ) ) { 84 | $this->load_file( $this->include_path . $file ); 85 | } 86 | } 87 | } 88 | 89 | new WPCM_Autoloader(); 90 | -------------------------------------------------------------------------------- /includes/admin/class-wpcm-admin-status.php: -------------------------------------------------------------------------------- 1 | $value ) { 76 | 77 | if ( ! in_array( $value, array( '.', '..' ) ) ) { 78 | 79 | if ( is_dir( $template_path . DIRECTORY_SEPARATOR . $value ) ) { 80 | $sub_files = self::scan_template_files( $template_path . DIRECTORY_SEPARATOR . $value ); 81 | foreach ( $sub_files as $sub_file ) { 82 | $result[] = $value . DIRECTORY_SEPARATOR . $sub_file; 83 | } 84 | } else { 85 | $result[] = $value; 86 | } 87 | } 88 | } 89 | } 90 | return $result; 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /templates/shortcodes/league-table.php: -------------------------------------------------------------------------------- 1 | 13 | 14 |
    15 | 16 | ' . esc_html( $title ) . '' : '' ); ?> 17 | 18 | 19 | 20 | 21 | 22 | 23 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | wpcm_stats; 39 | ?> 40 | 41 | 42 | 43 | 46 | 47 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 |
    44 | place ); ?> 45 | 48 | thumb ); 50 | if ( $default_club == $club->ID ) { 51 | if ( 1 == $abbr ) { 52 | $club_abbr = get_club_abbreviation( $club->ID ); 53 | echo esc_html( $club_abbr ); 54 | } elseif ( $team_label ) { 55 | echo esc_html( $team_label ); 56 | } else { 57 | echo esc_html( $club->post_title ); 58 | } 59 | } elseif ( 1 == $abbr ) { 60 | echo ( 1 == $link_club ? '' : '' ); 61 | $club_abbr = get_club_abbreviation( $club->ID ); 62 | echo esc_html( $club_abbr ); 63 | echo ( 1 == $link_club ? '' : '' ); 64 | } else { 65 | echo ( 1 == $link_club ? '' : '' ); 66 | echo esc_html( $club->post_title ); 67 | echo ( 1 == $link_club ? '' : '' ); 68 | } 69 | ?> 70 |
    84 | 85 | 86 | 87 | 88 | 89 |
    90 | -------------------------------------------------------------------------------- /includes/admin/wpcm-admin-functions.php: -------------------------------------------------------------------------------- 1 | plugin_path() . '/templates/' . $file; 93 | } 94 | } 95 | 96 | return $template; 97 | } 98 | } 99 | 100 | new WPCM_Template_Loader(); 101 | -------------------------------------------------------------------------------- /templates/shortcodes/map-venue.php: -------------------------------------------------------------------------------- 1 | 14 | 15 |
    16 | 17 | ' . esc_html( $title ) . '' : '' ); 19 | 20 | if ( 'osm' === $service ) { 21 | ?> 22 | 23 |
    24 | 25 | 65 | 66 | 69 | 70 | 71 | 72 | 75 | 76 |
    77 | -------------------------------------------------------------------------------- /templates/single-player/stats-table.php: -------------------------------------------------------------------------------- 1 | ID, '_wpcm_custom_player_stats', true ); ?> 24 | 25 | 26 | 27 | 28 | $val ) { 30 | 31 | if ( get_option( 'wpcm_show_stats_' . $key ) == 'yes' && array_key_exists( $key, $custom_stats ) ) { 32 | ?> 33 | 34 | 35 | 36 | 40 | 41 | 42 | 43 | 44 | $val ) { 46 | 47 | if ( 'appearances' === $key ) { 48 | 49 | if ( get_option( 'wpcm_show_stats_appearances' ) == 'yes' && array_key_exists( 'appearances', $custom_stats ) ) { 50 | 51 | if ( get_option( 'wpcm_show_stats_subs' ) == 'yes' ) { 52 | $subs = get_player_subs_total( $post->ID, $season, $team ); 53 | if ( $subs > 0 ) { 54 | $sub = ' (' . $subs . ')'; 55 | } else { 56 | $sub = ''; 57 | } 58 | } 59 | ?> 60 | 61 | 62 | 63 | 73 | 74 | 75 | 76 | 81 | 82 | 83 | 84 | 89 | 90 | 91 | 92 |
    93 | --------------------------------------------------------------------------------