Version Description
- Tweak - Expand event title section for team logos in countdown widget.
- Tweak - Center align team logo images in event.
- Tweak - Add iCal feed venue name and description.
- Fix - Escape address, summary, and description in iCal feed.
- Preset - Add ties and defense/offense definition to baseball preset.
- Localization - Add West Indies to nationality options.
- Localization - Update strings.
Download this release
Release Info
Developer | brianmiyaji |
Plugin | SportsPress – Sports Club & League Manager |
Version | 1.9.20 |
Comparing to | |
See all releases |
Code changes from version 1.8.9 to 1.9.20
- assets/css/activation.css +1 -0
- assets/css/admin.css +35 -3
- assets/css/icons.css +50 -0
- assets/css/menu.css +58 -6
- assets/css/sportspress-rtl.css +8 -2
- assets/css/sportspress.css +80 -10
- assets/fonts/sportspress.eot +0 -0
- assets/fonts/sportspress.svg +14 -0
- assets/fonts/sportspress.ttf +0 -0
- assets/fonts/sportspress.woff +0 -0
- assets/fonts/sportspress.woff2 +0 -0
- assets/images/flags/wif.png +0 -0
- assets/js/admin/editor-lang.php +1 -1
- assets/js/admin/iconpicker.js +37 -0
- assets/js/admin/settings.js +1 -1
- assets/js/admin/sportspress-admin.js +133 -10
- assets/js/sp-maps.js +1 -1
- assets/js/sportspress.js +2 -2
- dummy-data/events-sample.csv +1 -1
- dummy-data/players-sample.csv +4 -4
- dummy-data/staff-sample.csv +5 -5
- dummy-data/teams-sample.csv +3 -3
- feeds/ical.php +3 -2
- includes/admin/class-sp-admin-assets.php +5 -5
- includes/admin/class-sp-admin-menus.php +2 -1
- includes/admin/class-sp-admin-sample-data.php +7 -9
- includes/admin/class-sp-admin-sports.php +16 -1
- includes/admin/class-sp-admin-taxonomies.php +3 -3
- includes/admin/class-sp-admin-welcome.php +33 -21
- includes/admin/class-sp-admin.php +1 -1
- includes/admin/importers/class-sp-event-importer.php +6 -6
- includes/admin/importers/class-sp-importer.php +1 -1
- includes/admin/importers/class-sp-player-importer.php +3 -3
- includes/admin/importers/class-sp-staff-importer.php +3 -3
- includes/admin/importers/class-sp-team-importer.php +1 -1
- includes/admin/post-types/class-sp-admin-cpt-event.php +1 -1
- includes/admin/post-types/class-sp-admin-cpt-list.php +7 -2
- includes/admin/post-types/class-sp-admin-cpt-performance.php +10 -0
- includes/admin/post-types/class-sp-admin-cpt-player.php +32 -26
- includes/admin/post-types/class-sp-admin-cpt-table.php +7 -2
- includes/admin/post-types/class-sp-admin-cpt-team.php +3 -3
- includes/admin/post-types/class-sp-admin-meta-boxes.php +29 -3
- includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-data.php +1 -0
- includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-details.php +6 -1
- includes/admin/post-types/meta-boxes/class-sp-meta-box-column-equation.php +2 -2
- includes/admin/post-types/meta-boxes/class-sp-meta-box-equation.php +10 -7
- includes/admin/post-types/meta-boxes/class-sp-meta-box-event-details.php +4 -3
- includes/admin/post-types/meta-boxes/class-sp-meta-box-event-performance.php +320 -170
- includes/admin/post-types/meta-boxes/class-sp-meta-box-event-results.php +145 -34
- includes/admin/post-types/meta-boxes/class-sp-meta-box-event-shortcode.php +2 -2
- includes/admin/post-types/meta-boxes/class-sp-meta-box-event-teams.php +120 -56
- includes/admin/post-types/meta-boxes/class-sp-meta-box-list-columns.php +31 -2
- includes/admin/post-types/meta-boxes/class-sp-meta-box-list-data.php +63 -41
- includes/admin/post-types/meta-boxes/class-sp-meta-box-list-details.php +10 -3
- includes/admin/post-types/meta-boxes/class-sp-meta-box-outcome-details.php +9 -2
- includes/admin/post-types/meta-boxes/class-sp-meta-box-performance-details.php +47 -2
- includes/admin/post-types/meta-boxes/class-sp-meta-box-player-details.php +46 -34
- includes/admin/post-types/meta-boxes/class-sp-meta-box-player-metrics.php +3 -2
- includes/admin/post-types/meta-boxes/class-sp-meta-box-player-statistics.php +2 -2
- includes/admin/post-types/meta-boxes/class-sp-meta-box-result-details.php +21 -2
- includes/admin/post-types/meta-boxes/class-sp-meta-box-result-equation.php +29 -0
- includes/admin/post-types/meta-boxes/class-sp-meta-box-statistic-equation.php +2 -2
- includes/admin/post-types/meta-boxes/class-sp-meta-box-table-data.php +4 -4
- includes/admin/post-types/meta-boxes/class-sp-meta-box-table-details.php +10 -3
- includes/admin/post-types/meta-boxes/class-sp-meta-box-team-details.php +37 -23
- includes/admin/post-types/meta-boxes/class-sp-meta-box-team-staff.php +116 -0
- includes/admin/settings/class-sp-settings-events.php +87 -44
- includes/admin/settings/class-sp-settings-general.php +19 -5
- includes/admin/settings/class-sp-settings-modules.php +63 -55
- includes/admin/settings/class-sp-settings-players.php +18 -2
- includes/admin/settings/class-sp-settings-staff.php +2 -2
- includes/admin/settings/class-sp-settings-teams.php +2 -2
- includes/admin/views/html-admin-config.php +20 -16
- includes/api/class-sp-rest-teams-controller.php +301 -0
- includes/class-sp-ajax.php +1 -8
- includes/class-sp-calendar.php +26 -7
- includes/class-sp-countries.php +2 -0
- includes/class-sp-event.php +64 -20
- includes/class-sp-frontend-scripts.php +11 -7
- includes/class-sp-install.php +8 -1
- includes/class-sp-league-table.php +74 -3
- includes/class-sp-modules.php +15 -15
- includes/class-sp-player-list.php +123 -55
- includes/class-sp-player.php +118 -52
- includes/class-sp-post-types.php +151 -141
- includes/class-sp-rest-api.php +42 -0
- includes/class-sp-team.php +155 -6
- includes/class-sp-template-loader.php +21 -8
- includes/libraries/class-eqeos.php +3 -1
- includes/libraries/class-tgm-plugin-activation.php +3618 -0
- includes/sp-api-functions.php +67 -1
- includes/sp-core-functions.php +117 -34
- includes/sp-formatting-functions.php +4 -1
- includes/sp-template-functions.php +61 -1
- includes/sp-template-hooks.php +42 -20
- includes/widgets/class-sp-widget-birthdays.php +72 -0
- includes/widgets/class-sp-widget-event-blocks.php +7 -1
- includes/widgets/class-sp-widget-event-calendar.php +7 -1
- includes/widgets/class-sp-widget-event-list.php +7 -1
- includes/widgets/class-sp-widget-league-table.php +5 -0
- includes/widgets/class-sp-widget-player-gallery.php +10 -8
- includes/widgets/class-sp-widget-player-list.php +19 -0
- languages/sportspress-ar.mo +0 -0
- languages/sportspress-az.mo +0 -0
- languages/sportspress-be_BY.mo +0 -0
- languages/sportspress-bg_BG.mo +0 -0
- languages/sportspress-bn_BD.mo +0 -0
- languages/sportspress-bs_BA.mo +0 -0
- languages/sportspress-ca.mo +0 -0
- languages/sportspress-cs_CZ.mo +0 -0
- languages/sportspress-cy.mo +0 -0
- languages/sportspress-da_DK.mo +0 -0
- languages/sportspress-de_DE.mo +0 -0
- languages/sportspress-el.mo +0 -0
- languages/sportspress-es_CL.mo +0 -0
- languages/sportspress-es_ES.mo +0 -0
- languages/sportspress-et.mo +0 -0
- languages/sportspress-eu.mo +0 -0
- languages/sportspress-fa_IR.mo +0 -0
- languages/sportspress-fi.mo +0 -0
- languages/sportspress-fr_FR.mo +0 -0
- languages/sportspress-gl_ES.mo +0 -0
- languages/sportspress-he_IL.mo +0 -0
- languages/sportspress-hi_IN.mo +0 -0
- languages/sportspress-hr.mo +0 -0
- languages/sportspress-hu_HU.mo +0 -0
- languages/sportspress-hy.mo +0 -0
- languages/sportspress-id_ID.mo +0 -0
- languages/sportspress-is_IS.mo +0 -0
- languages/sportspress-it_IT.mo +0 -0
- languages/sportspress-ja.mo +0 -0
- languages/sportspress-kk.mo +0 -0
- languages/sportspress-kn.mo +0 -0
- languages/sportspress-ko_KR.mo +0 -0
- languages/sportspress-lt_LT.mo +0 -0
- languages/sportspress-mk_MK.mo +0 -0
- languages/sportspress-ms_MY.mo +0 -0
- languages/sportspress-nb_NO.mo +0 -0
- languages/sportspress-nl_NL.mo +0 -0
- languages/sportspress-nn_NO.mo +0 -0
- languages/sportspress-pl_PL.mo +0 -0
- languages/sportspress-pt_BR.mo +0 -0
- languages/sportspress-pt_PT.mo +0 -0
- languages/sportspress-ro_RO.mo +0 -0
- languages/sportspress-ru_RU.mo +0 -0
- languages/sportspress-sk_SK.mo +0 -0
- languages/sportspress-sl_SI.mo +0 -0
- languages/sportspress-sq.mo +0 -0
- languages/sportspress-sr_RS.mo +0 -0
- languages/sportspress-sv_SE.mo +0 -0
- languages/sportspress-ta_IN.mo +0 -0
- languages/sportspress-te.mo +0 -0
- languages/sportspress-th.mo +0 -0
- languages/sportspress-tl.mo +0 -0
- languages/sportspress-tr_TR.mo +0 -0
- languages/sportspress-uk.mo +0 -0
- languages/sportspress-ur.mo +0 -0
- languages/sportspress-vi.mo +0 -0
- languages/sportspress-zh_CN.mo +0 -0
- languages/sportspress-zh_HK.mo +0 -0
- languages/sportspress-zh_TW.mo +0 -0
- languages/sportspress.pot +1476 -1337
- license.txt +4 -3
- modules/sportspress-admin-bar.php +65 -0
- modules/sportspress-birthdays.php +198 -0
- modules/sportspress-icons.php +168 -0
- modules/sportspress-individual-mode.php +60 -29
- modules/sportspress-lazy-loading.php +234 -0
- modules/sportspress-player-lists.php +13 -3
- modules/sportspress-template-selector.php +191 -0
- modules/sportspress-tutorials.php +7 -7
- presets/racket-sports/squash.json +2 -2
- presets/target-sports/golf.json +65 -0
- presets/team-sports/baseball.json +22 -21
- presets/team-sports/cricket.json +29 -24
- presets/team-sports/ice-hockey.json +0 -1
- presets/team-sports/soccer.json +23 -13
- presets/team-sports/softball.json +0 -1
- readme.txt +173 -5
- sportspress.php +61 -4
- templates/birthdays.php +76 -0
- templates/countdown.php +10 -8
- templates/event-blocks.php +23 -29
- templates/event-calendar.php +7 -1
- templates/event-details.php +16 -4
- templates/event-list.php +19 -8
- templates/event-logos.php +15 -8
- templates/event-overview.php +14 -0
- templates/event-performance-table-combined.php +32 -13
- templates/event-performance-table.php +67 -103
- templates/event-performance.php +172 -158
- templates/event-venue.php +2 -2
- templates/league-table.php +10 -5
- templates/player-details.php +22 -7
- templates/player-gallery-thumbnail.php +2 -6
- templates/player-gallery.php +6 -3
- templates/player-list.php +33 -5
- templates/player-photo.php +1 -1
- templates/post-excerpt.php +19 -0
- templates/staff-photo.php +1 -1
- templates/team-staff.php +32 -0
- wpml-config.xml +1 -0
assets/css/activation.css
CHANGED
@@ -15,6 +15,7 @@ p.sportspress-actions a.button-primary:active {
|
|
15 |
box-shadow: inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 rgba(0,0,0,.1);
|
16 |
color: #fff;
|
17 |
text-decoration: none;
|
|
|
18 |
}
|
19 |
|
20 |
div.sportspress-message a.button-primary:hover,
|
15 |
box-shadow: inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 rgba(0,0,0,.1);
|
16 |
color: #fff;
|
17 |
text-decoration: none;
|
18 |
+
text-shadow: 0 -1px 1px #15a29a,1px 0 1px #15a29a,0 1px 1px #15a29a,-1px 0 1px #15a29a;
|
19 |
}
|
20 |
|
21 |
div.sportspress-message a.button-primary:hover,
|
assets/css/admin.css
CHANGED
@@ -8,7 +8,7 @@
|
|
8 |
}
|
9 |
|
10 |
.post-state-format.post-format-league:before, .post-format-icon.post-format-league:before, a.post-state-format.format-league:before {
|
11 |
-
content: "\
|
12 |
}
|
13 |
|
14 |
.post-state-format.post-format-friendly:before, .post-format-icon.post-format-friendly:before, a.post-state-format.format-friendly:before {
|
@@ -48,6 +48,11 @@
|
|
48 |
background: #fdfdfd;
|
49 |
}
|
50 |
|
|
|
|
|
|
|
|
|
|
|
51 |
.sp-link:before {
|
52 |
font: normal 20px/1 dashicons;
|
53 |
speak: none;
|
@@ -257,6 +262,8 @@ table.widefat.sp-data-table input[type="text"],
|
|
257 |
table.widefat.sp-data-table input[type="number"] {
|
258 |
min-width: 1.25em;
|
259 |
width: 100%;
|
|
|
|
|
260 |
}
|
261 |
|
262 |
table.widefat.sp-data-table input.small-text {
|
@@ -287,6 +294,10 @@ table.widefat.sp-data-table tr:hover a.sp-edit {
|
|
287 |
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
|
288 |
}
|
289 |
|
|
|
|
|
|
|
|
|
290 |
table.widefat.sp-data-table th:not(.check-column) input[type=checkbox] {
|
291 |
margin: -4px 1px 0;
|
292 |
vertical-align: middle;
|
@@ -318,6 +329,10 @@ table.widefat.sp-sortable-table tbody tr .icon {
|
|
318 |
cursor: move;
|
319 |
}
|
320 |
|
|
|
|
|
|
|
|
|
321 |
.sp-settings-bar {
|
322 |
float: none;
|
323 |
clear: both;
|
@@ -462,6 +477,11 @@ table.widefat.sp-sortable-table tbody tr .icon {
|
|
462 |
-webkit-transition: none;
|
463 |
}
|
464 |
|
|
|
|
|
|
|
|
|
|
|
465 |
/* TipTip */
|
466 |
.sp-tip,
|
467 |
.sp-desc-tip {
|
@@ -852,6 +872,10 @@ table.sp-status-table td mark.yes {
|
|
852 |
.about-sportspress-wrap .form-table th {
|
853 |
width: auto;
|
854 |
}
|
|
|
|
|
|
|
|
|
855 |
.about-sportspress-wrap .sp-top-translations .hndle {
|
856 |
font-size: 14px;
|
857 |
padding: 8px 12px;
|
@@ -961,8 +985,15 @@ table.sp-status-table td mark.yes {
|
|
961 |
margin: -3px -7px -3px 10px;
|
962 |
}
|
963 |
|
964 |
-
.
|
965 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
966 |
}
|
967 |
}
|
968 |
|
@@ -974,6 +1005,7 @@ table.sp-status-table td mark.yes {
|
|
974 |
margin-right: 0;
|
975 |
padding-right: 0;
|
976 |
}
|
|
|
977 |
.about-sportspress-wrap .sp-badge {
|
978 |
float: none;
|
979 |
margin: 20px auto 10px;
|
8 |
}
|
9 |
|
10 |
.post-state-format.post-format-league:before, .post-format-icon.post-format-league:before, a.post-state-format.format-league:before {
|
11 |
+
content: "\f332";
|
12 |
}
|
13 |
|
14 |
.post-state-format.post-format-friendly:before, .post-format-icon.post-format-friendly:before, a.post-state-format.format-friendly:before {
|
48 |
background: #fdfdfd;
|
49 |
}
|
50 |
|
51 |
+
.post-type-sp_player .curtime #timestamp:before {
|
52 |
+
font-family: sportspress, dashicons;
|
53 |
+
content: "\f453";
|
54 |
+
}
|
55 |
+
|
56 |
.sp-link:before {
|
57 |
font: normal 20px/1 dashicons;
|
58 |
speak: none;
|
262 |
table.widefat.sp-data-table input[type="number"] {
|
263 |
min-width: 1.25em;
|
264 |
width: 100%;
|
265 |
+
margin: 1px;
|
266 |
+
padding: 3px 5px;
|
267 |
}
|
268 |
|
269 |
table.widefat.sp-data-table input.small-text {
|
294 |
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
|
295 |
}
|
296 |
|
297 |
+
table.widefat.sp-data-table th.check-column {
|
298 |
+
padding: 10px 0 6px 2px;
|
299 |
+
}
|
300 |
+
|
301 |
table.widefat.sp-data-table th:not(.check-column) input[type=checkbox] {
|
302 |
margin: -4px 1px 0;
|
303 |
vertical-align: middle;
|
329 |
cursor: move;
|
330 |
}
|
331 |
|
332 |
+
.sp-not-found-container {
|
333 |
+
display: none;
|
334 |
+
}
|
335 |
+
|
336 |
.sp-settings-bar {
|
337 |
float: none;
|
338 |
clear: both;
|
477 |
-webkit-transition: none;
|
478 |
}
|
479 |
|
480 |
+
/* Paragraph */
|
481 |
+
.sp-para {
|
482 |
+
margin: 1em 0;
|
483 |
+
}
|
484 |
+
|
485 |
/* TipTip */
|
486 |
.sp-tip,
|
487 |
.sp-desc-tip {
|
872 |
.about-sportspress-wrap .form-table th {
|
873 |
width: auto;
|
874 |
}
|
875 |
+
.about-sportspress-wrap .sp-top-translations {
|
876 |
+
float: right;
|
877 |
+
margin-left: 20px;
|
878 |
+
}
|
879 |
.about-sportspress-wrap .sp-top-translations .hndle {
|
880 |
font-size: 14px;
|
881 |
padding: 8px 12px;
|
985 |
margin: -3px -7px -3px 10px;
|
986 |
}
|
987 |
|
988 |
+
.about-sportspress-wrap .sp-top-translations {
|
989 |
+
float: none;
|
990 |
+
margin-left: 0;
|
991 |
+
}
|
992 |
+
|
993 |
+
.wp-list-table tr:not(.inline-edit-row):not(.no-items) td.column-sp_format,
|
994 |
+
.wp-list-table tr:not(.inline-edit-row):not(.no-items) td.column-sp_icon,
|
995 |
+
.wp-list-table tr:not(.inline-edit-row):not(.no-items) td.column-sp_number {
|
996 |
+
display: table-cell!important;
|
997 |
}
|
998 |
}
|
999 |
|
1005 |
margin-right: 0;
|
1006 |
padding-right: 0;
|
1007 |
}
|
1008 |
+
|
1009 |
.about-sportspress-wrap .sp-badge {
|
1010 |
float: none;
|
1011 |
margin: 20px auto 10px;
|
assets/css/icons.css
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* SportsPress icons */
|
2 |
+
@font-face {
|
3 |
+
font-family: 'sportspress';
|
4 |
+
src:url('../fonts/sportspress.eot?-76nsup');
|
5 |
+
src:url('../fonts/sportspress.eot?#iefix-76nsup') format('embedded-opentype'),
|
6 |
+
url('../fonts/sportspress.woff2?-76nsup') format('woff2'),
|
7 |
+
url('../fonts/sportspress.ttf?-76nsup') format('truetype'),
|
8 |
+
url('../fonts/sportspress.woff?-76nsup') format('woff'),
|
9 |
+
url('../fonts/sportspress.svg?-76nsup#sportspress') format('svg');
|
10 |
+
font-weight: normal;
|
11 |
+
font-style: normal;
|
12 |
+
}
|
13 |
+
|
14 |
+
[class^="sp-icon-"], [class*=" sp-icon-"] {
|
15 |
+
font-family: sportspress, dashicons;
|
16 |
+
speak: none;
|
17 |
+
font-style: normal;
|
18 |
+
font-weight: normal;
|
19 |
+
font-variant: normal;
|
20 |
+
text-transform: none;
|
21 |
+
line-height: 1;
|
22 |
+
display: inline-block;
|
23 |
+
width: 20px;
|
24 |
+
height: 20px;
|
25 |
+
font-size: 20px;
|
26 |
+
vertical-align: top;
|
27 |
+
|
28 |
+
/* Better Font Rendering =========== */
|
29 |
+
-webkit-font-smoothing: antialiased;
|
30 |
+
-moz-osx-font-smoothing: grayscale;
|
31 |
+
}
|
32 |
+
|
33 |
+
.sp-icon-baseball:before {
|
34 |
+
content: "\e701";
|
35 |
+
}
|
36 |
+
.sp-icon-basketball:before {
|
37 |
+
content: "\e602";
|
38 |
+
}
|
39 |
+
.sp-icon-cricketball:before {
|
40 |
+
content: "\e604";
|
41 |
+
}
|
42 |
+
.sp-icon-soccerball:before {
|
43 |
+
content: "\e700";
|
44 |
+
}
|
45 |
+
.sp-icon-shoe:before {
|
46 |
+
content: "\e800";
|
47 |
+
}
|
48 |
+
.sp-icon-card:before {
|
49 |
+
content: "\e801";
|
50 |
+
}
|
assets/css/menu.css
CHANGED
@@ -1,12 +1,12 @@
|
|
1 |
/* SportsPress menu styles */
|
2 |
@font-face {
|
3 |
font-family: 'sportspress';
|
4 |
-
src:url('../fonts/sportspress.eot?
|
5 |
-
src:url('../fonts/sportspress.eot?#
|
6 |
-
url('../fonts/sportspress.woff2?
|
7 |
-
url('../fonts/sportspress.ttf?
|
8 |
-
url('../fonts/sportspress.woff?
|
9 |
-
url('../fonts/sportspress.svg?
|
10 |
font-weight: normal;
|
11 |
font-style: normal;
|
12 |
}
|
@@ -138,6 +138,33 @@
|
|
138 |
.sp-icon-whistle:before {
|
139 |
content: "\f227";
|
140 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
141 |
|
142 |
#adminmenu #toplevel_page_sportspress .toplevel_page_sportspress div.wp-menu-image:before,
|
143 |
#adminmenu #toplevel_page_themeboy .toplevel_page_themeboy div.wp-menu-image:before,
|
@@ -152,6 +179,7 @@
|
|
152 |
}
|
153 |
|
154 |
/* Widgets */
|
|
|
155 |
[id*="sportspress-"] .widget-title h4:before {
|
156 |
font-family: sportspress, dashicons;
|
157 |
color: #aaa;
|
@@ -202,6 +230,30 @@
|
|
202 |
color: #ccc;
|
203 |
}
|
204 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
205 |
/* TinyMCE */
|
206 |
.mce-toolbar i.mce-i-sp_shortcodes_button, .mce-toolbar span.mce_sp_shortcodes_button {
|
207 |
margin-right: -5px;
|
1 |
/* SportsPress menu styles */
|
2 |
@font-face {
|
3 |
font-family: 'sportspress';
|
4 |
+
src:url('../fonts/sportspress.eot?med5x8');
|
5 |
+
src:url('../fonts/sportspress.eot?#iefixmed5x8') format('embedded-opentype'),
|
6 |
+
url('../fonts/sportspress.woff2?med5x8') format('woff2'),
|
7 |
+
url('../fonts/sportspress.ttf?med5x8') format('truetype'),
|
8 |
+
url('../fonts/sportspress.woff?med5x8') format('woff'),
|
9 |
+
url('../fonts/sportspress.svg?med5x8#sportspress') format('svg');
|
10 |
font-weight: normal;
|
11 |
font-style: normal;
|
12 |
}
|
138 |
.sp-icon-whistle:before {
|
139 |
content: "\f227";
|
140 |
}
|
141 |
+
.sp-icon-key:before {
|
142 |
+
content: "\f112";
|
143 |
+
}
|
144 |
+
.sp-icon-moon:before {
|
145 |
+
content: "\f503";
|
146 |
+
}
|
147 |
+
.sp-icon-baseball:before {
|
148 |
+
content: "\e701";
|
149 |
+
}
|
150 |
+
.sp-icon-basketball:before {
|
151 |
+
content: "\e602";
|
152 |
+
}
|
153 |
+
.sp-icon-golfball:before {
|
154 |
+
content: "\e603";
|
155 |
+
}
|
156 |
+
.sp-icon-cricketball:before {
|
157 |
+
content: "\e604";
|
158 |
+
}
|
159 |
+
.sp-icon-soccerball:before {
|
160 |
+
content: "\e700";
|
161 |
+
}
|
162 |
+
.sp-icon-shoe:before {
|
163 |
+
content: "\e800";
|
164 |
+
}
|
165 |
+
.sp-icon-card:before {
|
166 |
+
content: "\e801";
|
167 |
+
}
|
168 |
|
169 |
#adminmenu #toplevel_page_sportspress .toplevel_page_sportspress div.wp-menu-image:before,
|
170 |
#adminmenu #toplevel_page_themeboy .toplevel_page_themeboy div.wp-menu-image:before,
|
179 |
}
|
180 |
|
181 |
/* Widgets */
|
182 |
+
[id*="sportspress-"] .widget-title h3:before,
|
183 |
[id*="sportspress-"] .widget-title h4:before {
|
184 |
font-family: sportspress, dashicons;
|
185 |
color: #aaa;
|
230 |
color: #ccc;
|
231 |
}
|
232 |
|
233 |
+
/* Icons */
|
234 |
+
.sp-icons .button {
|
235 |
+
margin: 0 3px 4px 0;
|
236 |
+
padding: 0 7px 1px 5px;
|
237 |
+
}
|
238 |
+
|
239 |
+
.sp-icons .button i {
|
240 |
+
margin: 3px 0;
|
241 |
+
}
|
242 |
+
|
243 |
+
.sp-icon-color-box input[type=text] {
|
244 |
+
color: #fff;
|
245 |
+
}
|
246 |
+
|
247 |
+
.wp-admin .sp-icons label input[type=radio] {
|
248 |
+
margin-top: -3px;
|
249 |
+
}
|
250 |
+
|
251 |
+
@media screen and (max-width: 782px) {
|
252 |
+
.wp-admin .sp-icons label input[type=radio] {
|
253 |
+
margin-top: 1px;
|
254 |
+
}
|
255 |
+
}
|
256 |
+
|
257 |
/* TinyMCE */
|
258 |
.mce-toolbar i.mce-i-sp_shortcodes_button, .mce-toolbar span.mce_sp_shortcodes_button {
|
259 |
margin-right: -5px;
|
assets/css/sportspress-rtl.css
CHANGED
@@ -8,6 +8,11 @@
|
|
8 |
margin-left: 2em;
|
9 |
}
|
10 |
|
|
|
|
|
|
|
|
|
|
|
11 |
/* Pagination */
|
12 |
.sp-table-wrapper .dataTables_paginate .previous {
|
13 |
float: right;
|
@@ -22,9 +27,10 @@
|
|
22 |
|
23 |
/* League Table and Player List */
|
24 |
.sp-league-table .data-name .team-logo,
|
25 |
-
.sp-player-list .data-name .player-photo
|
|
|
26 |
margin-right: 0;
|
27 |
-
margin-left: 0.
|
28 |
float: right;
|
29 |
}
|
30 |
|
8 |
margin-left: 2em;
|
9 |
}
|
10 |
|
11 |
+
/* Data Tables */
|
12 |
+
.sp-data-table .data-name {
|
13 |
+
text-align: right;
|
14 |
+
}
|
15 |
+
|
16 |
/* Pagination */
|
17 |
.sp-table-wrapper .dataTables_paginate .previous {
|
18 |
float: right;
|
27 |
|
28 |
/* League Table and Player List */
|
29 |
.sp-league-table .data-name .team-logo,
|
30 |
+
.sp-player-list .data-name .player-photo,
|
31 |
+
.sp-player-list .data-name .player-flag {
|
32 |
margin-right: 0;
|
33 |
+
margin-left: 0.5em;
|
34 |
float: right;
|
35 |
}
|
36 |
|
assets/css/sportspress.css
CHANGED
@@ -1,5 +1,17 @@
|
|
1 |
/* SportsPress */
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
/* Header */
|
4 |
.sp-header {
|
5 |
position: relative;
|
@@ -30,7 +42,8 @@
|
|
30 |
/* Data Tables */
|
31 |
.sp-scrollable-table-wrapper {
|
32 |
width: 100%;
|
33 |
-
overflow:
|
|
|
34 |
}
|
35 |
.sp-data-table {
|
36 |
width: 100%;
|
@@ -71,6 +84,9 @@
|
|
71 |
content: "\f140";
|
72 |
position: absolute;
|
73 |
}
|
|
|
|
|
|
|
74 |
.sp-data-table .data-number,
|
75 |
.sp-data-table .data-rank {
|
76 |
width: 1px;
|
@@ -103,6 +119,12 @@
|
|
103 |
cursor: default;
|
104 |
}
|
105 |
|
|
|
|
|
|
|
|
|
|
|
|
|
106 |
/* League Table */
|
107 |
.sp-league-table td.has-logo {
|
108 |
line-height: 2em;
|
@@ -110,7 +132,7 @@
|
|
110 |
.sp-league-table .data-name .team-logo {
|
111 |
width: 2em;
|
112 |
height: 2em;
|
113 |
-
margin-right: 0.
|
114 |
display: block;
|
115 |
float: left;
|
116 |
text-align: center;
|
@@ -126,15 +148,17 @@
|
|
126 |
.sp-player-list td {
|
127 |
line-height: 2em;
|
128 |
}
|
129 |
-
.sp-player-list .data-name .player-photo
|
|
|
130 |
width: 2em;
|
131 |
height: 2em;
|
132 |
-
margin-right: 0.
|
133 |
display: block;
|
134 |
float: left;
|
135 |
text-align: center;
|
136 |
}
|
137 |
-
.sp-player-list .data-name .player-photo img
|
|
|
138 |
width: auto;
|
139 |
height: auto;
|
140 |
max-width: 2em;
|
@@ -157,12 +181,33 @@
|
|
157 |
vertical-align: middle;
|
158 |
}
|
159 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
160 |
/* Event Venue */
|
161 |
.sp-event-venue thead th {
|
162 |
white-space: normal;
|
163 |
}
|
164 |
|
165 |
/* Event Performance */
|
|
|
|
|
|
|
166 |
.sp-event-performance .sub-in,
|
167 |
.sp-event-performance .sub-out {
|
168 |
cursor: default;
|
@@ -244,8 +289,7 @@
|
|
244 |
.sp-event-blocks .sp-event-title {
|
245 |
text-align: center;
|
246 |
display: block;
|
247 |
-
margin: 10px
|
248 |
-
padding: 0 20px;
|
249 |
clear: none;
|
250 |
}
|
251 |
.sp-event-blocks .sp-event-league,
|
@@ -256,10 +300,11 @@
|
|
256 |
padding: 0 20px;
|
257 |
}
|
258 |
.sp-event-blocks .team-logo {
|
259 |
-
width: 20%;
|
260 |
-
height: auto;
|
261 |
margin: 10px;
|
|
|
|
|
262 |
max-width: 6em;
|
|
|
263 |
}
|
264 |
.sp-event-blocks .logo-odd {
|
265 |
float: left;
|
@@ -281,7 +326,7 @@
|
|
281 |
|
282 |
/* Countdowns */
|
283 |
.sp-template-countdown .event-name {
|
284 |
-
overflow:
|
285 |
}
|
286 |
.sp-template-countdown .team-logo {
|
287 |
width: 20%;
|
@@ -339,6 +384,16 @@
|
|
339 |
display: none;
|
340 |
}
|
341 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
342 |
/* Media Queries */
|
343 |
@media screen and (min-width: 801px) {
|
344 |
/* Widget Alignment */
|
@@ -368,3 +423,18 @@
|
|
368 |
display: none;
|
369 |
}
|
370 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
/* SportsPress */
|
2 |
|
3 |
+
.sp-align-left {
|
4 |
+
text-align: left;
|
5 |
+
}
|
6 |
+
|
7 |
+
.sp-align-right {
|
8 |
+
text-align: right;
|
9 |
+
}
|
10 |
+
|
11 |
+
.sp-align-center {
|
12 |
+
text-align: center;
|
13 |
+
}
|
14 |
+
|
15 |
/* Header */
|
16 |
.sp-header {
|
17 |
position: relative;
|
42 |
/* Data Tables */
|
43 |
.sp-scrollable-table-wrapper {
|
44 |
width: 100%;
|
45 |
+
overflow: hidden;
|
46 |
+
overflow-x: auto;
|
47 |
}
|
48 |
.sp-data-table {
|
49 |
width: 100%;
|
84 |
content: "\f140";
|
85 |
position: absolute;
|
86 |
}
|
87 |
+
.sp-data-table .data-name {
|
88 |
+
text-align: left;
|
89 |
+
}
|
90 |
.sp-data-table .data-number,
|
91 |
.sp-data-table .data-rank {
|
92 |
width: 1px;
|
119 |
cursor: default;
|
120 |
}
|
121 |
|
122 |
+
/* Post Excerpt */
|
123 |
+
.sp-excerpt {
|
124 |
+
display: block;
|
125 |
+
margin-bottom: 1em;
|
126 |
+
}
|
127 |
+
|
128 |
/* League Table */
|
129 |
.sp-league-table td.has-logo {
|
130 |
line-height: 2em;
|
132 |
.sp-league-table .data-name .team-logo {
|
133 |
width: 2em;
|
134 |
height: 2em;
|
135 |
+
margin-right: 0.5em;
|
136 |
display: block;
|
137 |
float: left;
|
138 |
text-align: center;
|
148 |
.sp-player-list td {
|
149 |
line-height: 2em;
|
150 |
}
|
151 |
+
.sp-player-list .data-name .player-photo,
|
152 |
+
.sp-player-list .data-name .player-flag {
|
153 |
width: 2em;
|
154 |
height: 2em;
|
155 |
+
margin-right: 0.5em;
|
156 |
display: block;
|
157 |
float: left;
|
158 |
text-align: center;
|
159 |
}
|
160 |
+
.sp-player-list .data-name .player-photo img,
|
161 |
+
.sp-player-list .data-name .player-flag img {
|
162 |
width: auto;
|
163 |
height: auto;
|
164 |
max-width: 2em;
|
181 |
vertical-align: middle;
|
182 |
}
|
183 |
|
184 |
+
/* Events */
|
185 |
+
.sp-event-overview,
|
186 |
+
.sp-event-performance-tables {
|
187 |
+
overflow: hidden;
|
188 |
+
clear: both;
|
189 |
+
}
|
190 |
+
|
191 |
+
/* Event Logos */
|
192 |
+
.sp-event-logos .sp-team-logo {
|
193 |
+
white-space: nowrap;
|
194 |
+
display: block;
|
195 |
+
}
|
196 |
+
|
197 |
+
.sp-event-logos .sp-team-logo .sp-team-result {
|
198 |
+
display: block;
|
199 |
+
margin: 0.5em 0;
|
200 |
+
}
|
201 |
+
|
202 |
/* Event Venue */
|
203 |
.sp-event-venue thead th {
|
204 |
white-space: normal;
|
205 |
}
|
206 |
|
207 |
/* Event Performance */
|
208 |
+
.sp-event-performance .sub {
|
209 |
+
background: rgba(0,0,0,0.05);
|
210 |
+
}
|
211 |
.sp-event-performance .sub-in,
|
212 |
.sp-event-performance .sub-out {
|
213 |
cursor: default;
|
289 |
.sp-event-blocks .sp-event-title {
|
290 |
text-align: center;
|
291 |
display: block;
|
292 |
+
margin: 10px 0;
|
|
|
293 |
clear: none;
|
294 |
}
|
295 |
.sp-event-blocks .sp-event-league,
|
300 |
padding: 0 20px;
|
301 |
}
|
302 |
.sp-event-blocks .team-logo {
|
|
|
|
|
303 |
margin: 10px;
|
304 |
+
width: 20%;
|
305 |
+
height: 4em;
|
306 |
max-width: 6em;
|
307 |
+
text-align: center;
|
308 |
}
|
309 |
.sp-event-blocks .logo-odd {
|
310 |
float: left;
|
326 |
|
327 |
/* Countdowns */
|
328 |
.sp-template-countdown .event-name {
|
329 |
+
overflow: hidden;
|
330 |
}
|
331 |
.sp-template-countdown .team-logo {
|
332 |
width: 20%;
|
384 |
display: none;
|
385 |
}
|
386 |
|
387 |
+
/* Admin Bar */
|
388 |
+
#wpadminbar #wp-admin-bar-sportspress>.ab-item:before {
|
389 |
+
font-family: sportspress, dashicons;
|
390 |
+
}
|
391 |
+
|
392 |
+
#wpadminbar #wp-admin-bar-sportspress>.ab-item:before {
|
393 |
+
content: "\f111";
|
394 |
+
top: 2px;
|
395 |
+
}
|
396 |
+
|
397 |
/* Media Queries */
|
398 |
@media screen and (min-width: 801px) {
|
399 |
/* Widget Alignment */
|
423 |
display: none;
|
424 |
}
|
425 |
}
|
426 |
+
|
427 |
+
@media screen and (min-width: 601px) {
|
428 |
+
.sp-event-logos .sp-team-logo {
|
429 |
+
display: inline-block;
|
430 |
+
}
|
431 |
+
|
432 |
+
.sp-event-logos-2 .sp-team-logo {
|
433 |
+
display: inline;
|
434 |
+
}
|
435 |
+
|
436 |
+
.sp-event-logos-2 .sp-team-logo .sp-team-result {
|
437 |
+
display: inline-block;
|
438 |
+
margin: 0 0.25em;
|
439 |
+
}
|
440 |
+
}
|
assets/fonts/sportspress.eot
CHANGED
Binary file
|
assets/fonts/sportspress.svg
CHANGED
@@ -7,9 +7,22 @@
|
|
7 |
<font-face units-per-em="512" ascent="480" descent="-32" />
|
8 |
<missing-glyph horiz-adv-x="512" />
|
9 |
<glyph unicode=" " horiz-adv-x="256" d="" />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
<glyph unicode="" glyph-name="copy" d="M179.2 205.2h-76.8v204.8h153.6v-77.6h51.2v111.2c0 6.16-11.44 17.6-25.6 17.6h-204.8c-14.16 0-25.6-11.44-25.6-25.6v-256c0-14.16 11.44-25.6 25.6-25.6h102.4v51.2zM256 50.8h153.6v204.8h-153.6v-204.8zM435.2 306.8c14.16 0 25.6-11.44 25.6-25.6v-256c0-14.16-11.44-25.6-25.6-25.6h-204.8c-14.16 0-25.6 11.44-25.6 25.6v256c0 14.16 11.44 25.6 25.6 25.6h204.8z" />
|
11 |
<glyph unicode="" glyph-name="calculator" d="M409.6 435.2h-307.2c-14.16 0-25.6-11.44-25.6-25.6v-358.4c0-14.16 11.44-25.6 25.6-25.6h307.2c14.16 0 25.6 11.44 25.6 25.6v358.4c0 14.16-11.44 25.6-25.6 25.6zM179.2 76.8h-51.2v51.2h51.2v-51.2zM179.2 153.6h-51.2v51.2h51.2v-51.2zM179.2 230.4h-51.2v51.2h51.2v-51.2zM281.6 76.8h-51.2v51.2h51.2v-51.2zM281.6 153.6h-51.2v51.2h51.2v-51.2zM281.6 230.4h-51.2v51.2h51.2v-51.2zM384 76.8h-51.2v51.2h51.2v-51.2zM384 153.6h-51.2v51.2h51.2v-51.2zM384 230.4h-51.2v51.2h51.2v-51.2zM384 332.8h-256v51.2h256v-51.2z" />
|
12 |
<glyph unicode="" glyph-name="sportspress" d="M484.88 328.96l-30.72-222.64c-7.68-54.32-36.72-80.64-92.72-80.64h-264.32c-55.92 0-77.84 26.32-70.16 80.64l30.72 222.64c8.24 54.32 37.28 80.64 93.2 80.64h264.32c56-0.080 77.92-26.4 69.68-80.64zM206.88 359.040c-42.88 0-67.44-30.080-73.28-74.48l-4.88-36c-6.32-44.4 10.4-69.68 53.36-69.68h100.16c13.52 0 11.2-11.84 11.2-11.84-1.44-8.8-6.32-13.2-15.12-13.2h-166.96l-10.080-76.96h201.6c42.88 0 65.84 20.48 72.16 64.88l7.28 49.6c6.32 44.4-10.72 64.88-53.6 64.88h-100.72c-8.8 0-12.64 4.4-11.68 13.2 0 0-0.56 11.84 14.8 11.84h166.4l10.88 77.76h-201.52z" />
|
|
|
13 |
<glyph unicode="" glyph-name="menu" d="M435.2 25.6h-358.4c-14.16 0-25.6 11.44-25.6 25.6v358.4c0 14.16 11.44 25.6 25.6 25.6h358.4c14.16 0 25.6-11.44 25.6-25.6v-358.4c0-14.16-11.44-25.6-25.6-25.6zM409.6 384h-307.2v-76.8h307.2v76.8zM409.6 256h-307.2v-179.2h307.2v179.2zM179.2 332.8h-51.2v25.6h51.2v-25.6zM230.4 332.8h-25.6v25.6h25.6v-25.6zM281.6 332.8h-25.6v25.6h25.6v-25.6zM332.8 332.8h-25.6v25.6h25.6v-25.6zM384 332.8h-25.6v25.6h25.6v-25.6z" />
|
14 |
<glyph unicode="" glyph-name="calendar" d="M384 435.2h-51.2v-51.2h51.2v51.2zM435.2 435.2h-25.6v-76.8h-102.4v76.8h-102.4v-76.8h-102.4v76.8h-25.6c-14.16 0-25.6-11.44-25.6-25.6v-358.4c0-14.16 11.44-25.6 25.6-25.6h358.4c14.16 0 25.6 11.44 25.6 25.6v358.4c0 14.16-11.44 25.6-25.6 25.6zM409.6 76.8h-307.2v230.4h307.2v-230.4zM179.2 435.2h-51.2v-51.2h51.2v51.2zM281.6 256h-51.2v-51.2h51.2v51.2zM358.4 256h-51.2v-51.2h51.2v51.2zM204.8 179.2h-51.2v-51.2h51.2v51.2zM204.8 256h-51.2v-51.2h51.2v51.2zM281.6 179.2h-51.2v-51.2h51.2v51.2zM358.4 179.2h-51.2v-51.2h51.2v51.2z" />
|
15 |
<glyph unicode="" glyph-name="eye" d="M256 426.667c-92.805 0-185.597-66.375-256-199.111 70.403-132.736 163.195-199.111 256-199.111s185.597 66.375 256 199.111c-70.403 132.736-163.195 199.111-256 199.111zM256 85.334c-67.486 0-135.945 51.43-190.667 142.222 54.722 90.792 123.18 142.222 190.667 142.222s135.945-51.43 190.667-142.222c-54.722-90.792-123.18-142.222-190.667-142.222zM312.889 227.556c0-31.417-25.472-56.889-56.889-56.889s-56.889 25.472-56.889 56.889 25.472 56.889 56.889 56.889 56.889-25.472 56.889-56.889z" />
|
@@ -39,6 +52,7 @@
|
|
39 |
<glyph unicode="" glyph-name="clipboard" d="M376.16 25.6h-238.080c-20.48 0-35.84 15.36-35.84 35.84v312.32c0 10.24 5.12 20.48 12.8 28.16l28.16-66.56h225.28l28.16 69.12c7.68-5.12 12.8-15.36 12.8-28.16v-312.32c2.56-23.040-15.36-38.4-33.28-38.4zM358.24 307.2h-204.8v-230.4h204.8v230.4zM332.64 230.4h-153.6v25.6h153.6v-25.6zM332.64 179.2h-153.6v25.6h153.6v-25.6zM332.64 128h-153.6v25.6h153.6v-25.6zM163.68 358.4l-23.040 51.2h56.32l7.68 20.48 10.24 30.72h81.92l10.24-30.72 10.24-20.48h56.32l-23.040-51.2h-186.88z" />
|
40 |
<glyph unicode="" glyph-name="sponsor" d="M405.2 82.080l-91.2 71.6h-134.8v-76.8c0-7.2-2.56-13.28-7.6-18.24s-11.040-7.36-18-7.36h-25.6c-7.2 0-13.28 2.48-18.24 7.36s-7.36 11.040-7.36 18.24v76.8c-7.2 0-13.28 2.48-18.24 7.36s-7.36 11.040-7.36 18.24v102.4c0 7.2 2.48 13.28 7.36 18.24s11.040 7.36 18.24 7.36h211.6l91.2 71.6c2.96 3.2 6.88 4.88 11.84 4.96s9.2-0.88 12.8-3.040c3.6-2.16 5.44-4.8 5.44-8v-285.2c0-3.2-1.76-5.84-5.44-8s-7.84-3.040-12.8-2.8c-5.040 0.4-8.88 2.080-11.84 5.28v0zM268.8 307.28h-51.2c3.44 0 6.48-1.28 8.96-3.84s3.84-5.52 3.84-8.96v-128c0-3.44-1.28-6.48-3.84-8.96s-5.52-3.84-8.96-3.84h51.2c-3.76 0-6.8 1.28-9.2 3.84s-3.6 5.52-3.6 8.96v128c0 3.44 1.2 6.48 3.6 8.96s5.36 3.84 9.2 3.84v0 0 0z" />
|
41 |
<glyph unicode="" glyph-name="statistics" d="M153.6 333.2h128v-51.2h-128v51.2zM153.6 256.4h51.2v-51.2h-51.2v51.2zM153.6 179.6h102.4v-51.2h-102.4v51.2zM281.6 179.6h76.8v-51.2h-76.8v51.2zM435.2 435.6h-358.4c-14.16 0-25.6-11.44-25.6-25.6v-358.4c0-14.16 11.44-25.6 25.6-25.6h358.4c14.16 0 25.6 11.44 25.6 25.6v358.4c0 14.16-11.44 25.6-25.6 25.6zM409.6 77.2h-307.2v307.2h307.2v-307.2zM230.4 256.4h128v-51.2h-128v51.2zM307.2 333.2h51.2v-51.2h-51.2v51.2z" />
|
|
|
42 |
<glyph unicode="" glyph-name="popup" d="M435.2 435.2h-204.8c-14.16 0-25.6-11.44-25.6-25.6v-204.8c0-14.16 11.44-25.6 25.6-25.6h204.8c14.16 0 25.6 11.44 25.6 25.6v204.8c0 14.16-11.44 25.6-25.6 25.6zM409.6 230.4h-153.6v153.6h153.6v-153.6zM256 76.8h-153.6v153.6h51.2v51.2h-76.8c-14.16 0-25.6-11.44-25.6-25.6v-204.8c0-14.16 11.44-25.6 25.6-25.6h204.8c14.16 0 25.6 11.44 25.6 25.6v76.8h-51.2v-51.2z" />
|
43 |
<glyph unicode="" glyph-name="availability" d="M384 435.2h-51.2v-51.2h51.2v51.2zM435.2 435.2h-25.6v-76.8h-102.4v76.8h-102.4v-76.8h-102.4v76.8h-25.6c-14.16 0-25.6-11.44-25.6-25.6v-358.4c0-14.16 11.44-25.6 25.6-25.6h358.4c14.16 0 25.6 11.44 25.6 25.6v358.4c0 14.16-11.44 25.6-25.6 25.6zM409.6 76.8h-307.2v230.4h307.2v-230.4zM179.2 435.2h-51.2v-51.2h51.2v51.2zM230.4 115.2l-76.4 76.4 29.12 29.12 47.28-47.28 98.8 98.8 29.2-29.040-128-128z" />
|
44 |
<glyph unicode="" glyph-name="ticket" d="M125.6 190.96l90.96-90.96 166.8 166.88-90.96 90.88-166.8-166.8zM489.12 315.84l-38.72 38.64c-7.36-4-15.76-6.32-24.8-6.32-28.56 0-51.76 23.2-51.76 51.84 0 8.96 2.24 17.44 6.32 24.8l-38.72 38.72c-10.080 10.080-26.56 10.080-36.64 0l-281.92-281.84c-10.080-10.080-10.080-26.56 0-36.64l38.72-38.72c7.36 4 15.84 6.32 24.8 6.32 28.64 0 51.84-23.2 51.84-51.76 0-8.96-2.24-17.44-6.32-24.8l38.72-38.72c10.080-10.080 26.56-10.080 36.64 0l281.84 281.76c10 10.16 10 26.64 0 36.72v0zM216.56 58.4l-132.56 132.56 208.48 208.4 132.48-132.48-208.4-208.48z" />
|
7 |
<font-face units-per-em="512" ascent="480" descent="-32" />
|
8 |
<missing-glyph horiz-adv-x="512" />
|
9 |
<glyph unicode=" " horiz-adv-x="256" d="" />
|
10 |
+
<glyph unicode="" glyph-name="soccer" d="M256 6.4c-127.28 0-230.4 103.12-230.4 230.4s103.12 230.4 230.4 230.4 230.4-103.12 230.4-230.4-103.12-230.4-230.4-230.4zM401.040 381.84c-18.32 18.24-40.080 32.88-65.44 43.6s-51.84 16.16-79.6 16.16-54.24-5.36-79.6-16.16-47.2-25.28-65.44-43.6-32.88-40.080-43.6-65.44-16.16-51.84-16.16-79.6 5.36-54.24 16.16-79.6 25.28-47.2 43.6-65.44c18.32-18.24 40.080-32.88 65.44-43.6s51.84-16.16 79.6-16.16 54.24 5.36 79.6 16.16 47.2 25.36 65.44 43.6c18.24 18.32 32.88 40.080 43.6 65.44s16.16 51.84 16.16 79.6-5.36 54.24-16.16 79.6-25.36 47.2-43.6 65.44zM332.8 134.4l-25.6-64v-5.2c-16.8-5.040-33.84-7.6-51.2-7.6s-34.4 2.56-51.2 7.6v5.2l-25.6 64h-70c-18.96 27.2-29.44 57.2-31.6 90l50.4 38v76.8l-14 6.8c18.64 24 42.16 42.24 70.4 54.8l71.6-36 71.6 36c28.24-12.56 51.6-30.8 70-54.8l-13.6-6.8v-76.8l50.4-38c-2.16-32.8-12.64-62.8-31.6-90h-70zM256 300.8l-64-44 24.4-70.8h79.2l24.4 70.8-64 44z" />
|
11 |
+
<glyph unicode="" glyph-name="baseball" d="M371.52 96.32c0 0 0 0 0 0s-0.080 0.080-0.080 0.080c0 0 0 0 0 0-0.080 0.080-0.16 0.24-0.32 0.32 0 0 0 0 0 0s-0.080 0.080-0.080 0.080c0 0 0 0 0 0-0.080 0.080-0.16 0.16-0.16 0.24 0 0 0 0 0 0s-0.080 0.080-0.080 0.080c0 0 0 0 0 0s-0.080 0.080-0.080 0.080c0 0 0 0 0 0s-0.080 0.080-0.080 0.080c0 0 0 0 0 0s-0.080 0.080-0.080 0.080c0 0 0 0 0 0s-0.080 0.080-0.080 0.080c0 0 0 0 0 0s-0.080 0.080-0.080 0.080v0c0 0-0.080 0.080-0.080 0.080s0 0 0 0-0.080 0.080-0.080 0.080c0 0 0 0 0 0s-0.080 0.080-0.080 0.080c0 0 0 0 0 0s-0.080 0.080-0.080 0.080c0 0 0 0 0 0s-0.080 0.080-0.080 0.080c0 0 0 0 0 0s0 0-0.080 0.080c0 0 0 0 0 0.080 0 0 0 0.080-0.080 0.080 0 0 0 0 0 0s-0.080 0.080-0.080 0.080c0 0 0 0-0.080 0.080 0 0 0 0-0.080 0.080 0 0 0 0-0.080 0.080 0 0 0 0-0.080 0.080 0 0 0 0-0.080 0.080 0 0 0 0-0.080 0.080 0 0-0.080 0.080-0.080 0.080s0 0 0 0 0 0.080-0.080 0.080c0 0 0 0 0 0s0 0-0.080 0.080c0 0 0 0 0 0-0.080 0.080-0.16 0.16-0.16 0.24 0 0 0 0 0 0s0 0.080-0.080 0.080c0 0 0 0 0 0s0 0.080-0.080 0.080-0.080 0.080-0.16 0.16v0c0 0-0.080 0.080-0.080 0.080s0 0 0 0-0.080 0.080-0.080 0.080v0c-0.080 0.080-0.16 0.16-0.24 0.24 0 0 0 0 0 0s-0.080 0.080-0.080 0.080c0 0 0 0 0 0-0.080 0.080-0.16 0.24-0.32 0.32v0c-0.88 0.96-1.76 2-2.56 2.96l5.36 4.48c-4.96 6-9.6 12.32-13.76 18.88l-6.48-4.32c-1.36 2-2.64 4.080-3.92 6.16v0c0 0 0 0.080-0.080 0.080 0 0 0 0 0 0-0.080 0.080-0.16 0.24-0.24 0.32 0 0 0 0 0 0s0 0.080-0.080 0.080c0 0 0 0 0 0 0 0.080-0.080 0.080-0.080 0.16 0 0 0 0 0 0s0 0.080 0 0.080c0 0 0 0 0 0.080 0 0 0 0.080 0 0.080s0 0 0 0.080c0 0 0 0 0 0.080 0 0 0 0.080-0.080 0.080 0 0 0 0.080-0.080 0.080 0 0 0 0.080 0 0.080s0 0 0 0.080c0 0 0 0 0 0.080 0 0 0 0 0 0.080 0 0 0 0.080-0.080 0.080 0 0 0 0 0 0s-0.080 0.080-0.080 0.080c0 0 0 0 0 0s0 0.080-0.080 0.080c0 0 0 0 0 0s0 0.080-0.080 0.080c0 0 0 0 0 0s-0.080 0.080-0.080 0.080c0 0 0 0 0 0s-0.080 0.080-0.080 0.080c0 0 0 0 0 0s0 0.080-0.080 0.080c0 0 0 0 0 0s-0.080 0.080-0.080 0.080c0 0.080-0.080 0.080-0.080 0.16 0 0 0 0 0 0s-0.080 0.080-0.080 0.080c0 0 0 0 0 0-0.080 0.080-0.16 0.24-0.24 0.4 0 0 0 0 0 0 0 0.080-0.080 0.080-0.080 0.080s0 0 0 0c-0.080 0.16-0.16 0.24-0.24 0.4 0 0 0 0 0 0-2.96 4.96-5.68 10.080-8.16 15.36l7.52 3.6c-2.8 6.24-5.36 12.64-7.52 19.2l-7.92-2.72c-1.68 4.96-3.2 10-4.56 15.040 0 0 0 0 0 0 0 0.16-0.080 0.32-0.080 0.4 0 0 0 0 0 0 0 0.16-0.080 0.32-0.080 0.4 0 0 0 0 0 0 0 0.16-0.080 0.24-0.080 0.4 0 0 0 0 0 0 0 0.16-0.080 0.32-0.080 0.4 0 0 0 0 0 0 0 0.080 0 0.080 0 0.16 0 0 0 0 0 0 0 0.080-0.080 0.16-0.080 0.32 0 0 0 0 0 0 0 0.080 0 0.080 0 0.16 0 0 0 0 0 0 0 0.080-0.080 0.16-0.080 0.32 0 0 0 0 0 0 0 0.080 0 0.080 0 0.16 0 0 0 0 0 0 0 0.16-0.080 0.24-0.080 0.4 0 0 0 0 0 0 0 0.16-0.080 0.32-0.080 0.4 0 0 0 0 0 0 0 0.16-0.080 0.32-0.080 0.4 0 0 0 0 0 0 0 0.16-0.080 0.32-0.080 0.4 0 0 0 0 0 0 0 0.16-0.080 0.32-0.080 0.4 0 0 0 0 0 0-0.56 2.56-1.12 5.2-1.6 7.84l8.56 1.6c-1.12 6.48-1.92 13.040-2.4 19.68l-6.88-0.48v28.48l6.88-0.48c0.48 6.64 1.28 13.2 2.4 19.68l-8.56 1.6c0.48 2.64 1.040 5.28 1.6 7.84 0 0 0 0 0 0 0 0.16 0.080 0.32 0.080 0.4 0 0 0 0 0 0 0 0.16 0.080 0.32 0.080 0.4 0 0 0 0 0 0 0 0.16 0.080 0.32 0.080 0.4 0 0 0 0 0 0 0 0.16 0.080 0.32 0.080 0.4 0 0 0 0 0 0 0 0.16 0.080 0.24 0.080 0.4 0 0 0 0 0 0 0 0.080 0 0.080 0 0.16 0 0 0 0 0 0 0 0.080 0.080 0.16 0.080 0.32 0 0 0 0 0 0 0 0.080 0 0.080 0 0.16v0c0 0.080 0.080 0.16 0.080 0.32 0 0 0 0 0 0 0 0.080 0 0.080 0 0.16 0 0 0 0 0 0 0 0.16 0.080 0.32 0.080 0.4 0 0 0 0 0 0 0 0.16 0.080 0.24 0.080 0.4 0 0 0 0 0 0 0 0.16 0.080 0.32 0.080 0.4 0 0 0 0 0 0 0 0.16 0.080 0.32 0.080 0.4 0 0 0 0 0 0 1.28 5.12 2.8 10.16 4.56 15.040l7.92-2.72c2.16 6.56 4.64 12.96 7.52 19.2l-7.52 3.6c2.48 5.28 5.2 10.4 8.16 15.36 0 0 0 0 0 0 0.080 0.16 0.16 0.24 0.24 0.4 0 0 0 0 0 0 0 0.080 0.080 0.080 0.080 0.080s0 0 0 0c0.080 0.080 0.16 0.24 0.24 0.4 0 0 0 0 0 0s0.080 0.080 0.080 0.080c0 0 0 0 0 0 0 0.080 0.080 0.080 0.080 0.16v0c0 0 0.080 0.080 0.080 0.080s0 0 0 0 0 0.080 0.080 0.080c0 0 0 0 0 0s0.080 0.080 0.080 0.080c0 0 0 0 0 0s0.080 0.080 0.080 0.080c0 0 0 0 0 0s0 0.080 0.080 0.080c0 0 0 0 0 0s0 0.080 0.080 0.080c0 0 0 0 0 0s0.080 0.080 0.080 0.080c0 0 0 0 0 0s0 0.080 0.080 0.080c0 0 0 0 0 0.080 0 0 0 0.080 0 0.080s0 0 0 0.080c0 0 0 0.080 0 0.080s0 0.080 0.080 0.080c0 0 0 0.080 0.080 0.080 0 0 0 0 0 0.080 0 0 0 0 0 0.080 0 0 0 0.080 0 0.080s0 0 0 0.080c0 0 0 0.080 0 0.080s0 0 0 0c0 0.080 0.080 0.080 0.080 0.16 0 0 0 0 0 0s0 0.080 0.080 0.080c0 0 0 0 0 0 0.080 0.080 0.16 0.24 0.24 0.32 0 0 0 0 0 0s0 0.080 0.080 0.080v0c1.28 2.080 2.56 4.080 3.92 6.16l6.48-4.32c4.24 6.56 8.8 12.88 13.76 18.88l-5.36 4.48c0.88 1.040 1.68 2 2.56 2.96v0c0.080 0.080 0.16 0.24 0.32 0.32 0 0 0 0 0 0s0.080 0.080 0.080 0.080c0 0 0 0 0 0 0.080 0.080 0.16 0.16 0.24 0.24v0c0 0 0.080 0.080 0.080 0.080s0 0 0 0 0.080 0.080 0.080 0.080v0c0.080 0.080 0.080 0.080 0.16 0.16 0 0 0 0.080 0.080 0.080 0 0 0 0 0 0s0 0.080 0.080 0.080c0 0 0 0 0 0 0.080 0.080 0.16 0.16 0.16 0.24 0 0 0 0 0 0s0 0.080 0.080 0.080c0 0 0 0 0 0s0 0.080 0.080 0.080c0 0 0 0 0 0s0.080 0.080 0.080 0.080c0 0 0 0 0.080 0.080 0 0 0 0 0.080 0.080 0 0 0 0 0.080 0.080 0 0 0 0 0.080 0.080 0 0 0 0 0.080 0.080 0 0 0 0 0.080 0.080 0 0 0.080 0.080 0.080 0.080s0 0 0 0 0.080 0.080 0.080 0.080c0 0 0 0 0 0.080 0 0 0 0.080 0.080 0.080 0 0 0 0 0 0s0.080 0.080 0.080 0.080c0 0 0 0 0 0s0.080 0.080 0.080 0.080c0 0 0 0 0 0s0.080 0.080 0.080 0.080c0 0 0 0 0 0s0.080 0.080 0.080 0.080c0 0 0 0 0 0s0.080 0.080 0.080 0.080v0c0 0 0.080 0.080 0.080 0.080s0 0 0 0 0.080 0.080 0.080 0.080c0 0 0 0 0 0s0.080 0.080 0.080 0.080c0 0 0 0 0 0s0.080 0.080 0.080 0.080c0 0 0 0 0 0s0.080 0.080 0.080 0.080c0 0 0 0 0 0s0.080 0.080 0.080 0.080c0 0 0 0 0 0 0.080 0.080 0.16 0.16 0.16 0.24 0 0 0 0 0 0s0.080 0.080 0.080 0.080c0 0 0 0 0 0 0.080 0.080 0.16 0.24 0.32 0.32 0 0 0 0 0 0s0.080 0.080 0.080 0.080c0 0 0 0 0 0 3.44 3.68 7.040 7.2 10.72 10.64-33.76 30.56-77.92 48.4-126.24 48.4s-92.48-17.84-126.24-47.28c3.68-3.36 7.28-6.96 10.72-10.64 0 0 0 0 0 0s0.080-0.080 0.080-0.080c0 0 0 0 0 0 0.080-0.080 0.16-0.24 0.32-0.32 0 0 0 0 0 0s0.080-0.080 0.080-0.080c0 0 0 0 0 0 0.080-0.080 0.16-0.16 0.16-0.24 0 0 0 0 0 0s0.080-0.080 0.080-0.080c0 0 0 0 0 0s0.080-0.080 0.080-0.080c0 0 0 0 0 0s0.080-0.080 0.080-0.080c0 0 0 0 0 0s0.080-0.080 0.080-0.080c0 0 0 0 0 0s0.080-0.080 0.080-0.080c0 0 0 0 0 0s0.080-0.080 0.080-0.080v0c0 0 0.080-0.080 0.080-0.080s0 0 0 0 0.080-0.080 0.080-0.080c0 0 0 0 0 0s0.080-0.080 0.080-0.080c0 0 0 0 0 0s0.080-0.080 0.080-0.080c0 0 0 0 0 0s0.080-0.080 0.080-0.080c0 0 0 0 0 0s0-0.080 0.080-0.080c0 0 0 0 0-0.080 0 0 0.080-0.080 0.080-0.080s0 0 0 0 0.080-0.080 0.080-0.080c0 0 0 0 0.080-0.080 0 0 0 0 0.080-0.080 0 0 0 0 0.080-0.080 0 0 0 0 0.080-0.080 0 0 0 0 0.080-0.080 0 0 0 0 0.080-0.080 0 0 0.080-0.080 0.080-0.080s0 0 0 0 0-0.080 0.080-0.080c0 0 0 0 0 0s0-0.080 0.080-0.080c0 0 0 0 0 0 0.080-0.080 0.16-0.16 0.16-0.24 0 0 0 0 0 0s0-0.080 0.080-0.080c0 0 0 0 0 0s0-0.080 0.080-0.080v0c0.080-0.080 0.080-0.080 0.16-0.16v0c0 0 0.080-0.080 0.080-0.080s0 0 0 0 0.080-0.080 0.080-0.080v0c0.080-0.080 0.16-0.16 0.24-0.24 0 0 0 0 0 0s0.080-0.080 0.080-0.080c0 0 0 0 0 0 0.080-0.080 0.16-0.24 0.32-0.32v0c0.88-0.96 1.76-2 2.56-2.96l-5.36-4.48c4.96-6 9.6-12.32 13.76-18.88l6.48 4.32c1.36-2 2.64-4.080 3.92-6.16v0c0 0 0-0.080 0.080-0.080 0 0 0 0 0 0 0.080-0.080 0.16-0.24 0.24-0.32 0 0 0 0 0 0s0-0.080 0.080-0.080c0 0 0 0 0 0 0-0.080 0.080-0.080 0.080-0.16 0 0 0 0 0 0s0-0.080 0.080-0.080c0 0 0 0 0-0.080 0 0 0-0.080 0-0.080s0 0 0-0.080c0 0 0 0 0-0.080 0 0 0-0.080 0.080-0.080 0 0 0-0.080 0.080-0.080 0 0 0-0.080 0-0.080s0 0 0-0.080c0 0 0-0.080 0-0.080s0 0 0-0.080c0 0 0-0.080 0.080-0.080 0 0 0 0 0 0s0.080-0.080 0.080-0.080c0 0 0 0 0 0s0-0.080 0.080-0.080c0 0 0 0 0 0s0-0.080 0.080-0.080c0 0 0 0 0 0s0.080-0.080 0.080-0.080c0 0 0 0 0 0s0.080-0.080 0.080-0.080c0 0 0 0 0 0s0-0.080 0.080-0.080c0 0 0 0 0 0s0.080-0.080 0.080-0.080v0c0-0.080 0.080-0.080 0.080-0.16 0 0 0 0 0 0s0.080-0.080 0.080-0.080c0 0 0 0 0 0 0.080-0.080 0.16-0.24 0.24-0.4 0 0 0 0 0 0 0-0.080 0.080-0.080 0.080-0.080s0 0 0 0c0.080-0.16 0.16-0.24 0.24-0.4 0 0 0 0 0 0 2.96-4.96 5.68-10.080 8.16-15.36l-7.52-3.6c2.8-6.24 5.36-12.64 7.52-19.2l7.92 2.72c1.68-4.96 3.2-10 4.56-15.040 0 0 0 0 0 0 0-0.16 0.080-0.32 0.080-0.4 0 0 0 0 0 0 0-0.16 0.080-0.32 0.080-0.4 0 0 0 0 0 0 0-0.16 0.080-0.24 0.080-0.4 0 0 0 0 0 0 0-0.16 0.080-0.32 0.080-0.4 0 0 0 0 0 0 0-0.080 0-0.080 0-0.16 0 0 0 0 0 0 0-0.080 0.080-0.16 0.080-0.32v0c0-0.080 0-0.080 0-0.16 0 0 0 0 0 0 0-0.080 0.080-0.16 0.080-0.32 0 0 0 0 0 0 0-0.080 0-0.080 0-0.16 0 0 0 0 0 0 0-0.16 0.080-0.24 0.080-0.4 0 0 0 0 0 0 0-0.16 0.080-0.32 0.080-0.4 0 0 0 0 0 0 0-0.16 0.080-0.32 0.080-0.4 0 0 0 0 0 0 0-0.16 0.080-0.32 0.080-0.4 0 0 0 0 0 0 0-0.16 0.080-0.32 0.080-0.4 0 0 0 0 0 0 0.56-2.56 1.12-5.2 1.6-7.84l-8.56-1.6c1.12-6.48 1.92-13.040 2.4-19.68l6.88 0.48v-28.48l-6.88 0.48c-0.48-6.64-1.28-13.2-2.4-19.68l8.56-1.6c-0.48-2.64-1.040-5.28-1.6-7.84 0 0 0 0 0 0 0-0.16-0.080-0.32-0.080-0.4 0 0 0 0 0 0 0-0.16-0.080-0.32-0.080-0.4 0 0 0 0 0 0 0-0.16-0.080-0.32-0.080-0.4 0 0 0 0 0 0 0-0.16-0.080-0.32-0.080-0.4 0 0 0 0 0 0 0-0.16-0.080-0.32-0.080-0.4 0 0 0 0 0 0 0-0.080 0-0.080 0-0.16 0 0 0 0 0 0 0-0.080-0.080-0.16-0.080-0.32 0 0 0 0 0 0 0-0.080 0-0.080 0-0.16 0 0 0 0 0 0 0-0.080-0.080-0.16-0.080-0.32 0 0 0 0 0 0 0-0.080 0-0.080 0-0.16 0 0 0 0 0 0 0-0.16-0.080-0.32-0.080-0.4 0 0 0 0 0 0 0-0.16-0.080-0.32-0.080-0.4 0 0 0 0 0 0 0-0.16-0.080-0.32-0.080-0.4 0 0 0 0 0 0 0-0.16-0.080-0.32-0.080-0.4 0 0 0 0 0 0-1.28-5.12-2.8-10.16-4.56-15.040l-7.92 2.72c-2.16-6.56-4.64-12.96-7.52-19.2l7.52-3.6c-2.48-5.28-5.2-10.4-8.16-15.36 0 0 0 0 0 0-0.080-0.16-0.16-0.24-0.24-0.4 0 0 0 0 0 0 0-0.080-0.080-0.080-0.080-0.080s0 0 0 0c-0.080-0.080-0.16-0.24-0.24-0.4 0 0 0 0 0 0s-0.080-0.080-0.080-0.080c0 0 0 0 0 0 0-0.080-0.080-0.080-0.080-0.16 0 0-0.080-0.080-0.080-0.080s0 0 0 0 0-0.080-0.080-0.080c0 0 0 0 0 0s-0.080-0.080-0.080-0.080c0 0 0 0 0 0s-0.080-0.080-0.080-0.080c0 0 0 0 0 0s0-0.080-0.080-0.080c0 0 0 0 0 0s0-0.080-0.080-0.080c0 0 0 0 0 0s-0.080-0.080-0.080-0.080c0 0 0 0 0 0s0-0.080-0.080-0.080c0 0 0 0 0-0.080 0 0 0 0 0-0.080 0 0 0 0 0-0.080 0 0 0-0.080 0-0.080s0-0.080-0.080-0.080c0 0 0-0.080-0.080-0.080 0 0 0 0 0-0.080 0 0 0 0 0-0.080 0 0 0-0.080 0-0.080s0 0 0-0.080c0 0 0-0.080-0.080-0.080 0 0 0 0 0 0 0-0.080-0.080-0.080-0.080-0.16 0 0 0 0 0 0s0-0.080-0.080-0.080c0 0 0 0 0 0-0.080-0.080-0.16-0.24-0.24-0.32 0 0 0 0 0 0s0-0.080-0.080-0.080v0c-1.28-2.080-2.56-4.080-3.92-6.16l-6.48 4.32c-4.24-6.56-8.8-12.88-13.76-18.88l5.36-4.48c-0.88-1.040-1.68-2-2.56-2.96v0c-0.080-0.080-0.16-0.24-0.32-0.32 0 0 0 0 0 0s-0.080-0.080-0.080-0.080c0 0 0 0 0 0-0.080-0.080-0.16-0.16-0.24-0.24v0c0 0-0.080-0.080-0.080-0.080s0 0 0 0-0.080-0.080-0.080-0.080v0c-0.080-0.080-0.080-0.080-0.16-0.16v0c0 0-0.080-0.080-0.080-0.080s0 0 0 0 0-0.080-0.080-0.080c0 0 0 0 0 0-0.080-0.080-0.16-0.16-0.16-0.24 0 0 0 0 0 0s0 0-0.080-0.080c0 0 0 0 0 0s0-0.080-0.080-0.080c0 0 0 0 0 0s-0.080-0.080-0.080-0.080c0 0 0 0-0.080-0.080 0 0 0 0-0.080-0.080 0 0 0 0-0.080-0.080 0 0 0 0-0.080-0.080 0 0 0 0-0.080-0.080 0 0 0 0-0.080-0.080 0 0-0.080-0.080-0.080-0.080s0 0 0 0-0.080-0.080-0.080-0.080c0 0 0 0 0-0.080 0 0 0 0-0.080-0.080 0 0 0 0 0 0s-0.080-0.080-0.080-0.080c0 0 0 0 0 0s-0.080-0.080-0.080-0.080c0 0 0 0 0 0s-0.080-0.080-0.080-0.080c0 0 0 0 0 0s-0.080-0.080-0.080-0.080c0 0 0 0 0 0s-0.080-0.080-0.080-0.080v0c0 0-0.080-0.080-0.080-0.080s0 0 0 0-0.080-0.080-0.080-0.080c0 0 0 0 0 0s-0.080-0.080-0.080-0.080c0 0 0 0 0 0s-0.080-0.080-0.080-0.080c0 0 0 0 0 0s-0.080-0.080-0.080-0.080c0 0 0 0 0 0s-0.080-0.080-0.080-0.080c0 0 0 0 0 0-0.080-0.080-0.16-0.16-0.16-0.24 0 0 0 0 0 0s-0.080-0.080-0.080-0.080c0 0 0 0 0 0-0.080-0.080-0.16-0.24-0.32-0.32 0 0 0 0 0 0s-0.080-0.080-0.080-0.080c0 0 0 0 0 0-3.44-3.68-7.040-7.2-10.72-10.64 33.76-30.56 77.92-48.4 126.24-48.4s92.48 17.84 126.24 47.28c-3.76 3.44-7.28 6.96-10.72 10.64v0zM144.72 134l-6.8 4.56c4.56 6.72 8.64 13.92 12.080 21.28l6.96-3.28c0.64 1.36 1.2 2.72 1.76 4.080 1.92 4.56 3.68 9.2 5.2 13.84l-7.2 2.48c2.64 7.68 4.72 15.6 6.24 23.6l7.2-1.36c1.040 6.080 1.76 12.16 2.24 18.32l-7.2 0.56c0.32 4.080 0.4 8.16 0.4 12.24s-0.16 8.16-0.4 12.24l7.2 0.56c-0.4 6.16-1.2 12.32-2.24 18.32l-7.2-1.36c-1.44 8-3.6 15.92-6.24 23.6l7.2 2.48c-1.52 4.64-3.28 9.28-5.2 13.84-0.56 1.36-1.2 2.72-1.76 4.080l-6.96-3.28c-3.44 7.36-7.52 14.48-12.080 21.28l6.8 4.56c-3.92 6.16-8.24 12.080-12.96 17.76l-6.88-5.84c-4.72 5.6-9.84 10.96-15.28 15.84-28.48-33.28-45.6-76.64-45.6-124s17.12-90.72 45.52-124.16c5.44 4.96 10.56 10.24 15.28 15.84l6.88-5.84c4.8 5.68 9.12 11.6 13.040 17.76v0zM402.48 354.56c-5.44-4.96-10.56-10.24-15.28-15.84l-6.88 5.84c-4.72-5.68-9.040-11.6-12.96-17.76l6.8-4.56c-4.56-6.72-8.64-13.92-12.080-21.28l-6.96 3.28c-0.64-1.36-1.2-2.72-1.76-4.080-1.92-4.56-3.68-9.2-5.2-13.84l7.2-2.48c-2.64-7.68-4.72-15.6-6.24-23.6l-7.2 1.36c-1.040-6.080-1.76-12.16-2.24-18.32l7.2-0.56c-0.32-4.080-0.4-8.16-0.4-12.24s0.16-8.16 0.4-12.24l-7.2-0.56c0.4-6.16 1.2-12.32 2.24-18.32l7.2 1.36c1.44-8 3.6-15.92 6.24-23.6l-7.2-2.48c1.52-4.64 3.28-9.28 5.2-13.84 0.56-1.36 1.2-2.72 1.76-4.080l6.96 3.28c3.44-7.36 7.52-14.48 12.080-21.28l-6.8-4.56c3.92-6.16 8.24-12.080 12.96-17.76l6.88 5.84c4.72-5.6 9.84-10.96 15.28-15.84 28.4 33.44 45.52 76.8 45.52 124.16s-17.12 90.56-45.52 124z" />
|
12 |
+
<glyph unicode="" glyph-name="basketball" d="M460.4 256c-2.8 42.080-19.12 80.4-44.64 110.72-3.040-2.56-5.92-5.28-8.72-8.16-27.76-27.76-44.32-63.84-47.28-102.56h100.64zM395.6 387.36c-30.8 27.12-70.4 44.56-114 47.44v-178.8h49.2c3.44 52.24 27.84 98.8 64.8 131.36zM130.64 358.56c-2.8 2.8-5.76 5.52-8.72 8.16-25.6-30.32-41.92-68.64-44.72-110.72h100.64c-2.96 38.8-19.44 74.8-47.2 102.56zM206.8 256h49.2v178.8c-43.6-2.88-83.2-20.24-114-47.44 36.96-32.56 61.36-79.12 64.8-131.36zM407.040 127.76c2.8-2.8 5.76-5.52 8.72-8.16 25.52 30.32 41.84 68.72 44.64 110.72h-100.72c3.040-38.72 19.52-74.72 47.36-102.56zM330.8 230.4h-49.2v-178.8c43.6 2.88 83.2 20.24 114 47.44-36.96 32.56-61.36 79.12-64.8 131.36zM77.2 230.4c2.8-42.080 19.040-80.4 44.64-110.72 3.040 2.56 5.92 5.28 8.72 8.16 27.76 27.76 44.32 63.84 47.28 102.64 0.080-0.080-100.64-0.080-100.64-0.080zM142 99.040c30.8-27.12 70.4-44.56 114-47.44v178.8h-49.2c-3.44-52.24-27.84-98.8-64.8-131.36z" />
|
13 |
+
<glyph unicode="" glyph-name="golf" d="M383.6 282c0-14.080 11.52-25.6 25.6-25.6 0 0 0 0 0 0-8-19.12-19.44-36.48-33.6-51.2h-43.28c0-10.4 6.32-19.44 15.28-23.44-26.4-17.52-58-27.76-92.080-27.76s-65.68 10.24-92.080 27.76c8.96 4 15.28 12.96 15.28 23.44h-43.28c-14.16 14.72-25.6 32.080-33.6 51.2 0 0 0 0 0 0 14.080 0 25.6 11.52 25.6 25.6h-33.92c-2.88 12.32-4.48 25.2-4.48 38.4 0 91.92 74.48 166.4 166.4 166.4s166.4-74.48 166.4-166.4c0-13.2-1.52-26.080-4.48-38.4h-33.76zM306.8 256.4c14.080 0 25.6 11.52 25.6 25.6h-51.2c0-14.080 11.52-25.6 25.6-25.6zM255.6 179.6c14.080 0 25.6 11.52 25.6 25.6h-51.2c0-14.080 11.52-25.6 25.6-25.6zM204.4 256.4c14.080 0 25.6 11.52 25.6 25.6h-51.2c0-14.080 11.52-25.6 25.6-25.6zM153.2 333.2c14.080 0 25.6 11.52 25.6 25.6h-51.2c0-14.080 11.52-25.6 25.6-25.6zM178.8 435.6c0-14.080 11.52-25.6 25.6-25.6s25.6 11.52 25.6 25.6h-51.2zM230 358.8c0-14.080 11.52-25.6 25.6-25.6s25.6 11.52 25.6 25.6h-51.2zM281.2 435.6c0-14.080 11.52-25.6 25.6-25.6s25.6 11.52 25.6 25.6h-51.2zM332.4 358.8c0-14.080 11.52-25.6 25.6-25.6s25.6 11.52 25.6 25.6h-51.2zM310.88 136.48l-29.68-59.28v-102.4h-51.2v102.4l-29.68 59.28c17.52-5.28 36.080-8.080 55.28-8.080s37.76 2.88 55.28 8.080z" />
|
14 |
+
<glyph unicode="" glyph-name="cricket" d="M233.44 26.88l226.080 226.080c6.56-59.68-13.040-121.6-58.72-167.36s-107.68-65.28-167.36-58.72zM151.92 53.92c-14.56 8.56-28.24 19.12-40.8 31.68-12.48 12.48-23.040 26.24-31.68 40.8l280.64 280.48c14.56-8.56 28.24-19.12 40.8-31.68 12.48-12.48 23.040-26.24 31.68-40.8l-280.64-280.48zM52.48 207.84c-6.56 59.68 12.96 121.68 58.72 167.36s107.68 65.28 167.36 58.72l-226.080-226.080zM309.040 428.24c9.12-2.48 18.16-5.52 26.96-9.28l-268.56-268.56c-3.76 8.8-6.8 17.84-9.28 26.96l250.88 250.88zM444.56 310.4c3.76-8.8 6.8-17.84 9.28-26.96l-250.88-250.88c-9.12 2.48-18.16 5.52-26.96 9.28l268.56 268.56z" />
|
15 |
+
<glyph unicode="" glyph-name="bowling" d="M368.4 332.8c-6.64 10.64-10 23.44-10 38.4 0 12.24 3.36 21.76 10.24 28.4s16.16 10 28.16 10 21.44-3.36 28.16-10 10.24-16.16 10.24-28.4c0-14.96-3.36-27.76-10-38.4h-56.8zM382 281.6c1.36 4.8 2 9.040 2 12.8 0 4.56-0.56 8.8-1.6 12.8h28.8c-1.040-4-1.6-8.24-1.6-12.8 0-3.44 0.64-7.76 2-12.8h-29.6zM371.6 256h50.4c2.16-4.24 7.36-14 15.6-29.2s14.24-27.36 17.76-36.4 5.44-17.040 5.44-24c0-12-0.16-21.84-0.4-29.6s-0.96-18-2.24-30.8-3.36-23.84-6.56-32.96-7.2-16.48-12-21.76h-85.2c2.64 27.44 4 63.2 4 107.2 0 20.56-2.4 40.16-7.2 58.8 0.56 1.040 3.44 6.56 8.8 16.4 5.36 9.76 9.2 17.28 11.6 22.32zM204.8 25.6c-5.84 5.84-10.72 14.56-14.56 26.24s-6.48 25.36-7.84 41.2-2.24 28.56-2.56 38-0.64 21.2-0.64 35.36c0 8 1.84 16.64 5.6 26s9.76 21.040 18 35.2c8.24 14.16 13.6 23.6 16 28.4h74.4c2.4-4.56 7.76-13.92 16-28.16s14.24-26.080 18-35.36 5.6-18 5.6-26c0-14.16-0.16-25.92-0.64-35.36s-1.28-22.16-2.56-38-3.92-29.6-7.84-41.2-8.72-20.48-14.56-26.32h-102.4zM218.4 332.8c-2.96 5.040-5.2 9.36-6.8 12.8s-3.12 8.64-4.64 15.6-2.16 14.56-2.16 22.8c0 14.16 4.96 26.24 15.040 36.16s22 15.040 36.16 15.040c14.16 0 26.24-4.96 36.16-15.040s15.040-22 15.040-36.16c0-8.24-0.72-15.84-2.24-22.8s-3.040-12.16-4.64-15.6-3.84-7.76-6.8-12.8h-75.12zM157.6 51.2h-85.2c-4.8 5.36-8.8 12.64-12 21.76s-5.44 20.16-6.56 32.96-1.92 23.040-2.24 30.8-0.4 17.68-0.4 29.68c0 6.96 1.76 14.96 5.44 24s9.52 21.2 17.76 36.4 13.44 24.96 15.6 29.2h50.4c1.84-3.76 3.92-7.76 6.24-12s4.8-9.040 7.6-14.4c2.8-5.36 4.96-9.44 6.56-12.4-4.8-18.64-7.2-38.24-7.2-58.8 0-44.24 1.36-80 4-107.2zM100.4 281.6c1.36 4.8 2 9.040 2 12.8 0 4.56-0.56 8.8-1.6 12.8h28.8c-1.040-4-1.6-8.24-1.6-12.8 0-3.76 0.64-8 2-12.8h-29.6zM86.8 332.8c-6.64 10.64-10 23.44-10 38.4 0 12.24 3.36 21.76 10.24 28.4s16.16 10 28.16 10 21.44-3.36 28.16-10 10.24-16.16 10.24-28.4c0-14.96-3.36-27.76-10-38.4h-56.8zM228.8 281.6c1.040 4.8 1.6 9.040 1.6 12.8 0 4.56-0.4 8.8-1.2 12.8h53.6c-0.8-4-1.2-8.24-1.2-12.8 0-3.76 0.56-8 1.6-12.8h-54.4z" />
|
16 |
+
<glyph unicode="" glyph-name="ice-hockey" d="M397.2 284.64l-104.24-210.56c-6.16-12.4-22.8-22.88-36.88-22.88h-153.76c-13.92 0-25.52 11.44-25.52 25.6v25.68c0 14.24 11.36 25.6 25.36 25.6h128.24l96.64 192.4 70.16-35.84zM408.56 307.52l38.080 76.64c6.96 14.080 1.44 31.12-12.56 38.16l-19.44 9.76c-13.92 7.040-30.88 1.52-37.76-12.24l-38.4-76.56 70.080-35.76zM166.4 179.2c21.2 0 38.4 17.2 38.4 38.4s-17.2 38.4-38.4 38.4-38.4-17.2-38.4-38.4c0-21.2 17.2-38.4 38.4-38.4v0z" />
|
17 |
+
<glyph unicode="" glyph-name="football" d="M458.48 371.6c-3.36 30.48-30.8 57.92-61.28 61.28-82.8 9.12-190.080-6.32-263.68-80-73.6-73.6-89.040-180.96-79.92-263.68 3.36-30.48 30.8-57.92 61.28-61.28 82.72-9.12 190.080 6.32 263.68 79.92 73.6 73.68 89.040 180.96 79.92 263.76v0zM181.28 202.72c5.92 5.92 15.52 5.92 21.52 0l25.6-25.6c5.92-5.92 5.92-15.52 0-21.52-2.96-2.96-6.88-4.48-10.72-4.48s-7.76 1.52-10.72 4.48l-25.6 25.6c-6.080 6-6.080 15.6-0.080 21.52zM187.92 52.48c-23.2 11.76-44.64 27.28-63.6 46.24s-34.48 40.48-46.32 63.68c1.44 17.52 4.32 36.32 9.28 55.68 1.68 6.56 3.6 13.040 5.68 19.36 7.52-42.080 27.68-80.72 58.48-111.6 30.8-30.8 69.52-50.96 111.52-58.48-26.8-8.8-52.88-13.040-75.040-14.88zM279.52 206.88c-2.96-2.96-6.88-4.48-10.72-4.48s-7.76 1.52-10.72 4.48l-25.6 25.6c-5.92 5.92-5.92 15.52 0 21.52 5.92 5.92 15.6 5.92 21.52 0l25.6-25.6c5.92-6 5.92-15.6-0.080-21.52zM330.72 258.080c-2.96-2.96-6.88-4.48-10.72-4.48s-7.76 1.52-10.72 4.48l-25.6 25.6c-5.92 5.92-5.92 15.52 0 21.52s15.52 5.92 21.52 0l25.6-25.6c5.92-6 5.92-15.6-0.080-21.52zM424.72 242.72c-1.68-6.56-3.6-13.040-5.68-19.36-7.52 42.080-27.68 80.72-58.48 111.6-30.8 30.8-69.52 50.96-111.52 58.48 26.8 8.8 52.88 13.040 75.040 14.88 23.2-11.76 44.64-27.28 63.6-46.24s34.48-40.48 46.32-63.68c-1.44-17.52-4.32-36.32-9.28-55.68v0z" />
|
18 |
+
<glyph unicode="" glyph-name="goal" d="M335.6 419.040c25.36-10.72 47.12-25.36 65.44-43.6 18.24-18.24 32.8-40.080 43.6-65.44s16.16-51.84 16.16-79.6-5.44-54.24-16.16-79.6c-10.72-25.36-25.36-47.12-43.6-65.44-18.24-18.24-40.080-32.8-65.44-43.6s-51.84-16.16-79.6-16.16-54.24 5.44-79.6 16.16-47.12 25.36-65.44 43.6c-18.32 18.24-32.8 40.080-43.6 65.44s-16.16 51.84-16.16 79.6 5.44 54.24 16.16 79.6 25.36 47.12 43.6 65.44 40.080 32.8 65.44 43.6 51.84 16.16 79.6 16.16 54.24-5.44 79.6-16.16zM114 339.6l14-6.8v-76.8l-50.4-38c2.16-32.8 12.64-62.8 31.6-90h70l25.6-64v-5.2c16.8-5.040 33.84-7.6 51.2-7.6s34.4 2.56 51.2 7.6v5.2l25.6 64h70c18.96 27.2 29.44 57.2 31.6 90l-50.4 38v76.8l13.6 6.8c-18.4 24-41.76 42.24-70 54.8l-71.6-36-71.6 36c-28.24-12.56-51.76-30.8-70.4-54.8zM320 250.4l-24.4-70.8h-79.2l-24.4 70.8 64 44 64-44z" />
|
19 |
+
<glyph unicode="" glyph-name="baseball-icon" d="M256 25.6c-113.12 0-204.8 91.68-204.8 204.8s91.68 204.8 204.8 204.8 204.8-91.68 204.8-204.8-91.68-204.8-204.8-204.8zM76.8 230.4c0-48.8 19.52-93.040 51.12-125.28 31.68 32.32 51.28 76.48 51.28 125.28s-19.6 93.040-51.28 125.28c-31.6-32.24-51.12-76.48-51.12-125.28zM147.2 372.72c35.68-36.88 57.6-87.040 57.6-142.32s-22-105.52-57.6-142.32c30.16-23.12 67.92-36.88 108.8-36.88s78.64 13.76 108.8 36.88c-35.68 36.88-57.6 87.040-57.6 142.32s22 105.52 57.6 142.32c-30.16 23.12-67.84 36.88-108.8 36.88s-78.64-13.76-108.8-36.88zM384.080 355.68c-31.68-32.24-51.28-76.48-51.28-125.28s19.6-93.040 51.28-125.28c31.6 32.32 51.12 76.56 51.12 125.28s-19.52 93.040-51.12 125.28z" />
|
20 |
+
<glyph unicode="" glyph-name="shoe" d="M461.52 280.88l-21.2-20c-0.96-0.96-2.56-1.12-3.68-0.24l-27.040 19.84c4.080 4.24 8.4 8.48 13.36 13.2 3.36 3.2 6.4 6.080 9.6 8.88 2.8 2.56 5.36 4.88 7.76 7.28 1.28 1.2 2.56 2.4 3.84 3.6l17.84-28.96c0.72-1.2 0.48-2.72-0.48-3.6zM432.64 318.080c-5.040-4.8-10.96-10-17.36-16.080-4.56-4.24-9.28-8.88-14.16-14-22.8-24.080-189.76-191.36-224-223.6-34.24-32.4-94.64-54.96-120.32-27.68-25.68 27.2 24.080 72.24 39.84 119.44 15.76 47.28 59.36 108.4 59.36 108.4-6.64 13.92 5.2 26.88 9.84 31.28 1.040 1.040 1.76 1.52 1.76 1.52-8.16 16.16 13.44 36.56 13.44 36.56l17.36 94.88c0.32 1.76 1.12 3.28 2.32 4.32 1.76 1.68 4.32 2.48 6.88 2l38.16-6.72c25.12-4.56-9.92-70.56 0.96-70.72 6.96-0.16 20.24 5.28 32.96 17.28 7.12 6.72 14.080 15.6 19.6 26.64 11.44 22.88-12.72 46.96-4.56 54.72 2.72 2.64 9.44 3.36 22.48 1.6 51.6-7.76 92.8-59.040 121.44-90.24 19.44-21.2 12.24-32.4-6-49.6zM165.28 232.16l-16-26c-1.2-1.84 0.16-4.32 2.48-4.32l114.72 1.6c0.64 0.080 1.36 0.24 1.92 0.8l28.32 26.72c1.92 1.84 0.56 5.040-1.92 4.96l-127.2-2.48c-0.88 0.080-1.76-0.48-2.32-1.28zM351.84 290l-156-4.64c-0.96-0.080-1.84-0.56-2.32-1.36l-15.92-25.92c-1.2-2 0.24-4.4 2.56-4.4l141.68 2.64c0.64 0.080 1.36 0.24 1.92 0.8l30.24 27.76c1.76 1.92 0.4 5.12-2.16 5.12zM195.52 26.32c0.72-1.2 0.48-2.72-0.48-3.6l-21.2-20c-0.96-0.96-2.56-1.12-3.68-0.24l-29.28 21.52c-0.56 0.48-0.96 1.12-1.040 2.080 14.32 6.64 28.16 15.52 40 25.68l15.68-25.44zM228 98.24l16.16-26.080c0.72-1.2 0.48-2.72-0.48-3.6l-21.2-20c-0.96-0.96-2.56-1.12-3.68-0.24l-23.76 17.6c8.48 8.16 19.84 19.36 32.96 32.32zM405.68 230.72c0.72-1.2 0.48-2.72-0.48-3.6l-21.2-20.080c-0.96-0.96-2.56-1.12-3.68-0.24l-25.040 18.56c12.56 12.56 23.92 24 33.040 33.28l17.36-27.92z" />
|
21 |
+
<glyph unicode="" glyph-name="card" d="M153.6 435.2h204.8c14.16 0 25.6-11.44 25.6-25.6v-358.4c0-14.16-11.44-25.6-25.6-25.6h-204.8c-14.16 0-25.6 11.44-25.6 25.6v358.4c0 14.16 11.44 25.6 25.6 25.6z" />
|
22 |
<glyph unicode="" glyph-name="copy" d="M179.2 205.2h-76.8v204.8h153.6v-77.6h51.2v111.2c0 6.16-11.44 17.6-25.6 17.6h-204.8c-14.16 0-25.6-11.44-25.6-25.6v-256c0-14.16 11.44-25.6 25.6-25.6h102.4v51.2zM256 50.8h153.6v204.8h-153.6v-204.8zM435.2 306.8c14.16 0 25.6-11.44 25.6-25.6v-256c0-14.16-11.44-25.6-25.6-25.6h-204.8c-14.16 0-25.6 11.44-25.6 25.6v256c0 14.16 11.44 25.6 25.6 25.6h204.8z" />
|
23 |
<glyph unicode="" glyph-name="calculator" d="M409.6 435.2h-307.2c-14.16 0-25.6-11.44-25.6-25.6v-358.4c0-14.16 11.44-25.6 25.6-25.6h307.2c14.16 0 25.6 11.44 25.6 25.6v358.4c0 14.16-11.44 25.6-25.6 25.6zM179.2 76.8h-51.2v51.2h51.2v-51.2zM179.2 153.6h-51.2v51.2h51.2v-51.2zM179.2 230.4h-51.2v51.2h51.2v-51.2zM281.6 76.8h-51.2v51.2h51.2v-51.2zM281.6 153.6h-51.2v51.2h51.2v-51.2zM281.6 230.4h-51.2v51.2h51.2v-51.2zM384 76.8h-51.2v51.2h51.2v-51.2zM384 153.6h-51.2v51.2h51.2v-51.2zM384 230.4h-51.2v51.2h51.2v-51.2zM384 332.8h-256v51.2h256v-51.2z" />
|
24 |
<glyph unicode="" glyph-name="sportspress" d="M484.88 328.96l-30.72-222.64c-7.68-54.32-36.72-80.64-92.72-80.64h-264.32c-55.92 0-77.84 26.32-70.16 80.64l30.72 222.64c8.24 54.32 37.28 80.64 93.2 80.64h264.32c56-0.080 77.92-26.4 69.68-80.64zM206.88 359.040c-42.88 0-67.44-30.080-73.28-74.48l-4.88-36c-6.32-44.4 10.4-69.68 53.36-69.68h100.16c13.52 0 11.2-11.84 11.2-11.84-1.44-8.8-6.32-13.2-15.12-13.2h-166.96l-10.080-76.96h201.6c42.88 0 65.84 20.48 72.16 64.88l7.28 49.6c6.32 44.4-10.72 64.88-53.6 64.88h-100.72c-8.8 0-12.64 4.4-11.68 13.2 0 0-0.56 11.84 14.8 11.84h166.4l10.88 77.76h-201.52z" />
|
25 |
+
<glyph unicode="" glyph-name="key" d="M460.8 332.8l-25.6 25.6-26.4-25.6v-51.2l-24.8-25.6-25.6 25.6-25.6-25.6v-51.2l-29.84-29.84c2.72-10.96 4.24-22.4 4.24-34.16 0-77.76-63.040-140.8-140.8-140.8s-140.8 63.040-140.8 140.8 63.040 140.8 140.8 140.8c18.88 0 36.96-3.76 53.44-10.48l188.96 189.68h77.6v-102.4l-25.6-25.6zM128 153.6c-28.24 0-51.2-22.96-51.2-51.2s22.96-51.2 51.2-51.2 51.2 22.96 51.2 51.2-22.96 51.2-51.2 51.2zM422.4 435.2c-4 0-7.52-1.84-9.92-4.72l-151.76-151.76c-2.88-2.32-4.72-5.92-4.72-9.92 0-7.040 5.76-12.8 12.8-12.8 3.52 0 6.72 1.44 9.040 3.76l0.080-0.080 153.6 153.6-0.080 0.080c2.32 2.32 3.76 5.52 3.76 9.12 0 6.96-5.68 12.72-12.8 12.72z" />
|
26 |
<glyph unicode="" glyph-name="menu" d="M435.2 25.6h-358.4c-14.16 0-25.6 11.44-25.6 25.6v358.4c0 14.16 11.44 25.6 25.6 25.6h358.4c14.16 0 25.6-11.44 25.6-25.6v-358.4c0-14.16-11.44-25.6-25.6-25.6zM409.6 384h-307.2v-76.8h307.2v76.8zM409.6 256h-307.2v-179.2h307.2v179.2zM179.2 332.8h-51.2v25.6h51.2v-25.6zM230.4 332.8h-25.6v25.6h25.6v-25.6zM281.6 332.8h-25.6v25.6h25.6v-25.6zM332.8 332.8h-25.6v25.6h25.6v-25.6zM384 332.8h-25.6v25.6h25.6v-25.6z" />
|
27 |
<glyph unicode="" glyph-name="calendar" d="M384 435.2h-51.2v-51.2h51.2v51.2zM435.2 435.2h-25.6v-76.8h-102.4v76.8h-102.4v-76.8h-102.4v76.8h-25.6c-14.16 0-25.6-11.44-25.6-25.6v-358.4c0-14.16 11.44-25.6 25.6-25.6h358.4c14.16 0 25.6 11.44 25.6 25.6v358.4c0 14.16-11.44 25.6-25.6 25.6zM409.6 76.8h-307.2v230.4h307.2v-230.4zM179.2 435.2h-51.2v-51.2h51.2v51.2zM281.6 256h-51.2v-51.2h51.2v51.2zM358.4 256h-51.2v-51.2h51.2v51.2zM204.8 179.2h-51.2v-51.2h51.2v51.2zM204.8 256h-51.2v-51.2h51.2v51.2zM281.6 179.2h-51.2v-51.2h51.2v51.2zM358.4 179.2h-51.2v-51.2h51.2v51.2z" />
|
28 |
<glyph unicode="" glyph-name="eye" d="M256 426.667c-92.805 0-185.597-66.375-256-199.111 70.403-132.736 163.195-199.111 256-199.111s185.597 66.375 256 199.111c-70.403 132.736-163.195 199.111-256 199.111zM256 85.334c-67.486 0-135.945 51.43-190.667 142.222 54.722 90.792 123.18 142.222 190.667 142.222s135.945-51.43 190.667-142.222c-54.722-90.792-123.18-142.222-190.667-142.222zM312.889 227.556c0-31.417-25.472-56.889-56.889-56.889s-56.889 25.472-56.889 56.889 25.472 56.889 56.889 56.889 56.889-25.472 56.889-56.889z" />
|
52 |
<glyph unicode="" glyph-name="clipboard" d="M376.16 25.6h-238.080c-20.48 0-35.84 15.36-35.84 35.84v312.32c0 10.24 5.12 20.48 12.8 28.16l28.16-66.56h225.28l28.16 69.12c7.68-5.12 12.8-15.36 12.8-28.16v-312.32c2.56-23.040-15.36-38.4-33.28-38.4zM358.24 307.2h-204.8v-230.4h204.8v230.4zM332.64 230.4h-153.6v25.6h153.6v-25.6zM332.64 179.2h-153.6v25.6h153.6v-25.6zM332.64 128h-153.6v25.6h153.6v-25.6zM163.68 358.4l-23.040 51.2h56.32l7.68 20.48 10.24 30.72h81.92l10.24-30.72 10.24-20.48h56.32l-23.040-51.2h-186.88z" />
|
53 |
<glyph unicode="" glyph-name="sponsor" d="M405.2 82.080l-91.2 71.6h-134.8v-76.8c0-7.2-2.56-13.28-7.6-18.24s-11.040-7.36-18-7.36h-25.6c-7.2 0-13.28 2.48-18.24 7.36s-7.36 11.040-7.36 18.24v76.8c-7.2 0-13.28 2.48-18.24 7.36s-7.36 11.040-7.36 18.24v102.4c0 7.2 2.48 13.28 7.36 18.24s11.040 7.36 18.24 7.36h211.6l91.2 71.6c2.96 3.2 6.88 4.88 11.84 4.96s9.2-0.88 12.8-3.040c3.6-2.16 5.44-4.8 5.44-8v-285.2c0-3.2-1.76-5.84-5.44-8s-7.84-3.040-12.8-2.8c-5.040 0.4-8.88 2.080-11.84 5.28v0zM268.8 307.28h-51.2c3.44 0 6.48-1.28 8.96-3.84s3.84-5.52 3.84-8.96v-128c0-3.44-1.28-6.48-3.84-8.96s-5.52-3.84-8.96-3.84h51.2c-3.76 0-6.8 1.28-9.2 3.84s-3.6 5.52-3.6 8.96v128c0 3.44 1.2 6.48 3.6 8.96s5.36 3.84 9.2 3.84v0 0 0z" />
|
54 |
<glyph unicode="" glyph-name="statistics" d="M153.6 333.2h128v-51.2h-128v51.2zM153.6 256.4h51.2v-51.2h-51.2v51.2zM153.6 179.6h102.4v-51.2h-102.4v51.2zM281.6 179.6h76.8v-51.2h-76.8v51.2zM435.2 435.6h-358.4c-14.16 0-25.6-11.44-25.6-25.6v-358.4c0-14.16 11.44-25.6 25.6-25.6h358.4c14.16 0 25.6 11.44 25.6 25.6v358.4c0 14.16-11.44 25.6-25.6 25.6zM409.6 77.2h-307.2v307.2h307.2v-307.2zM230.4 256.4h128v-51.2h-128v51.2zM307.2 333.2h51.2v-51.2h-51.2v51.2z" />
|
55 |
+
<glyph unicode="" glyph-name="moon" d="M351.207 440.32c17.562-9.856 34.099-22.195 49.050-37.094 87.552-87.603 87.552-229.53 0-317.082s-229.504-87.552-317.082 0c-14.925 14.95-27.264 31.514-37.094 49.050 85.376-47.795 195.405-35.507 268.007 37.094 72.627 72.627 84.941 182.631 37.12 268.032z" />
|
56 |
<glyph unicode="" glyph-name="popup" d="M435.2 435.2h-204.8c-14.16 0-25.6-11.44-25.6-25.6v-204.8c0-14.16 11.44-25.6 25.6-25.6h204.8c14.16 0 25.6 11.44 25.6 25.6v204.8c0 14.16-11.44 25.6-25.6 25.6zM409.6 230.4h-153.6v153.6h153.6v-153.6zM256 76.8h-153.6v153.6h51.2v51.2h-76.8c-14.16 0-25.6-11.44-25.6-25.6v-204.8c0-14.16 11.44-25.6 25.6-25.6h204.8c14.16 0 25.6 11.44 25.6 25.6v76.8h-51.2v-51.2z" />
|
57 |
<glyph unicode="" glyph-name="availability" d="M384 435.2h-51.2v-51.2h51.2v51.2zM435.2 435.2h-25.6v-76.8h-102.4v76.8h-102.4v-76.8h-102.4v76.8h-25.6c-14.16 0-25.6-11.44-25.6-25.6v-358.4c0-14.16 11.44-25.6 25.6-25.6h358.4c14.16 0 25.6 11.44 25.6 25.6v358.4c0 14.16-11.44 25.6-25.6 25.6zM409.6 76.8h-307.2v230.4h307.2v-230.4zM179.2 435.2h-51.2v-51.2h51.2v51.2zM230.4 115.2l-76.4 76.4 29.12 29.12 47.28-47.28 98.8 98.8 29.2-29.040-128-128z" />
|
58 |
<glyph unicode="" glyph-name="ticket" d="M125.6 190.96l90.96-90.96 166.8 166.88-90.96 90.88-166.8-166.8zM489.12 315.84l-38.72 38.64c-7.36-4-15.76-6.32-24.8-6.32-28.56 0-51.76 23.2-51.76 51.84 0 8.96 2.24 17.44 6.32 24.8l-38.72 38.72c-10.080 10.080-26.56 10.080-36.64 0l-281.92-281.84c-10.080-10.080-10.080-26.56 0-36.64l38.72-38.72c7.36 4 15.84 6.32 24.8 6.32 28.64 0 51.84-23.2 51.84-51.76 0-8.96-2.24-17.44-6.32-24.8l38.72-38.72c10.080-10.080 26.56-10.080 36.64 0l281.84 281.76c10 10.16 10 26.64 0 36.72v0zM216.56 58.4l-132.56 132.56 208.48 208.4 132.48-132.48-208.4-208.48z" />
|
assets/fonts/sportspress.ttf
CHANGED
Binary file
|
assets/fonts/sportspress.woff
CHANGED
Binary file
|
assets/fonts/sportspress.woff2
CHANGED
Binary file
|
assets/images/flags/wif.png
ADDED
Binary file
|
assets/js/admin/editor-lang.php
CHANGED
@@ -27,7 +27,7 @@ $raw = apply_filters( 'sportspress_tinymce_strings', array(
|
|
27 |
'details' => __( 'Details', 'sportspress' ),
|
28 |
'results' => __( 'Results', 'sportspress' ),
|
29 |
'countdown' => __( 'Countdown', 'sportspress' ),
|
30 |
-
'performance' => __( '
|
31 |
'calendar' => __( 'Calendar', 'sportspress' ),
|
32 |
'statistics' => __( 'Statistics', 'sportspress' ),
|
33 |
'table' => __( 'League Table', 'sportspress' ),
|
27 |
'details' => __( 'Details', 'sportspress' ),
|
28 |
'results' => __( 'Results', 'sportspress' ),
|
29 |
'countdown' => __( 'Countdown', 'sportspress' ),
|
30 |
+
'performance' => __( 'Scorecard', 'sportspress' ),
|
31 |
'calendar' => __( 'Calendar', 'sportspress' ),
|
32 |
'statistics' => __( 'Statistics', 'sportspress' ),
|
33 |
'table' => __( 'League Table', 'sportspress' ),
|
assets/js/admin/iconpicker.js
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery(document).ready(function($){
|
2 |
+
|
3 |
+
// Icon picker
|
4 |
+
$('.sp-icons input').on('change', function() {
|
5 |
+
if ('' == $(this).val()) {
|
6 |
+
$('.sp-custom-colors').hide();
|
7 |
+
$('.sp-custom-thumbnail').show();
|
8 |
+
} else {
|
9 |
+
$('.sp-custom-thumbnail').hide();
|
10 |
+
$('.sp-custom-colors').show();
|
11 |
+
}
|
12 |
+
});
|
13 |
+
|
14 |
+
// Color picker
|
15 |
+
$('.colorpick').iris( {
|
16 |
+
change: function(event, ui){
|
17 |
+
$(this).css( { backgroundColor: ui.color.toString() } );
|
18 |
+
},
|
19 |
+
hide: true,
|
20 |
+
border: true
|
21 |
+
} ).each( function() {
|
22 |
+
$(this).css( { backgroundColor: $(this).val() } );
|
23 |
+
})
|
24 |
+
.click(function(){
|
25 |
+
$('.iris-picker').hide();
|
26 |
+
$(this).closest('.sp-icon-color-box, td').find('.iris-picker').show();
|
27 |
+
});
|
28 |
+
|
29 |
+
$('body').click(function() {
|
30 |
+
$('.iris-picker').hide();
|
31 |
+
});
|
32 |
+
|
33 |
+
$('.sp-icon-color-box, .colorpick').click(function(event){
|
34 |
+
event.stopPropagation();
|
35 |
+
});
|
36 |
+
|
37 |
+
});
|
assets/js/admin/settings.js
CHANGED
@@ -57,7 +57,7 @@ jQuery(document).ready(function($){
|
|
57 |
val = $(this).val();
|
58 |
if ( val === undefined ) return true;
|
59 |
format = $(this).attr("data-example-format");
|
60 |
-
example = format.replace(
|
61 |
$(this).siblings(".example").html(example);
|
62 |
});
|
63 |
|
57 |
val = $(this).val();
|
58 |
if ( val === undefined ) return true;
|
59 |
format = $(this).attr("data-example-format");
|
60 |
+
example = format.replace(/__val__/g, val);
|
61 |
$(this).siblings(".example").html(example);
|
62 |
});
|
63 |
|
assets/js/admin/sportspress-admin.js
CHANGED
@@ -16,6 +16,7 @@ jQuery(document).ready(function($){
|
|
16 |
// Chosen select
|
17 |
$(".chosen-select, #poststuff #post_author_override").chosen({
|
18 |
allow_single_deselect: true,
|
|
|
19 |
single_backstroke_delete: false,
|
20 |
disable_search_threshold: 10,
|
21 |
placeholder_text_multiple: localized_strings.none
|
@@ -54,7 +55,7 @@ jQuery(document).ready(function($){
|
|
54 |
});
|
55 |
|
56 |
// Tab filter
|
57 |
-
$(".sp-tab-panel").siblings(".sp-tab-select").find("select").change(function() {
|
58 |
var val = $(this).val();
|
59 |
var filter = ".sp-filter-"+val;
|
60 |
var $filters = $(this).closest(".sp-tab-select").siblings(".sp-tab-select");
|
@@ -86,7 +87,7 @@ jQuery(document).ready(function($){
|
|
86 |
});
|
87 |
|
88 |
// Trigger tab filter
|
89 |
-
$(".sp-tab-panel").siblings(".sp-tab-select").find("select").change();
|
90 |
|
91 |
// Dropdown filter
|
92 |
$(".sp-dropdown-target").siblings(".sp-dropdown-filter").find("select").change(function() {
|
@@ -236,7 +237,7 @@ jQuery(document).ready(function($){
|
|
236 |
});
|
237 |
|
238 |
// Total stats calculator
|
239 |
-
$(".sp-data-table .sp-total input").on("updateTotal", function() {
|
240 |
index = $(this).parent().index();
|
241 |
var sum = 0;
|
242 |
$(this).closest(".sp-data-table").find(".sp-post").each(function() {
|
@@ -262,7 +263,7 @@ jQuery(document).ready(function($){
|
|
262 |
$(".sp-data-table .sp-total input").trigger("updateTotal");
|
263 |
|
264 |
// Select all checkboxes
|
265 |
-
$(".sp-select-all").change
|
266 |
$range = $(this).closest(".sp-select-all-range");
|
267 |
$range.find("input[type=checkbox]").prop("checked", $(this).prop("checked"));
|
268 |
});
|
@@ -457,12 +458,6 @@ jQuery(document).ready(function($){
|
|
457 |
// Trigger player list layout change
|
458 |
$(".post-type-sp_list #post-formats-select input.post-format").trigger("change");
|
459 |
|
460 |
-
// Auto-select hides options
|
461 |
-
$(".sp-select-setting").find("select").change(function() {
|
462 |
-
$(".sp-select-all-range").toggle("manual"==$(this).val());
|
463 |
-
$(this).closest(".sp-select-setting").siblings(".sp-tab-select").find("select").change()
|
464 |
-
});
|
465 |
-
|
466 |
// Configure primary result option (Ajax)
|
467 |
$(".sp-admin-config-table").on("click", ".sp-primary-result-option", function() {
|
468 |
$.post( ajaxurl, {
|
@@ -625,4 +620,132 @@ jQuery(document).ready(function($){
|
|
625 |
$(".sp-select-sport").change(function() {
|
626 |
$(".sp-configure-sport").hide();
|
627 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
628 |
});
|
16 |
// Chosen select
|
17 |
$(".chosen-select, #poststuff #post_author_override").chosen({
|
18 |
allow_single_deselect: true,
|
19 |
+
search_contains: true,
|
20 |
single_backstroke_delete: false,
|
21 |
disable_search_threshold: 10,
|
22 |
placeholder_text_multiple: localized_strings.none
|
55 |
});
|
56 |
|
57 |
// Tab filter
|
58 |
+
$(".sp-tab-filter-panel").siblings(".sp-tab-select").find("select").change(function() {
|
59 |
var val = $(this).val();
|
60 |
var filter = ".sp-filter-"+val;
|
61 |
var $filters = $(this).closest(".sp-tab-select").siblings(".sp-tab-select");
|
87 |
});
|
88 |
|
89 |
// Trigger tab filter
|
90 |
+
$(".sp-tab-filter-panel").siblings(".sp-tab-select").find("select").change();
|
91 |
|
92 |
// Dropdown filter
|
93 |
$(".sp-dropdown-target").siblings(".sp-dropdown-filter").find("select").change(function() {
|
237 |
});
|
238 |
|
239 |
// Total stats calculator
|
240 |
+
$(".sp-data-table .sp-total input[data-sp-format=number]").on("updateTotal", function() {
|
241 |
index = $(this).parent().index();
|
242 |
var sum = 0;
|
243 |
$(this).closest(".sp-data-table").find(".sp-post").each(function() {
|
263 |
$(".sp-data-table .sp-total input").trigger("updateTotal");
|
264 |
|
265 |
// Select all checkboxes
|
266 |
+
$(".sp-select-all-range").on("change", ".sp-select-all", function() {
|
267 |
$range = $(this).closest(".sp-select-all-range");
|
268 |
$range.find("input[type=checkbox]").prop("checked", $(this).prop("checked"));
|
269 |
});
|
458 |
// Trigger player list layout change
|
459 |
$(".post-type-sp_list #post-formats-select input.post-format").trigger("change");
|
460 |
|
|
|
|
|
|
|
|
|
|
|
|
|
461 |
// Configure primary result option (Ajax)
|
462 |
$(".sp-admin-config-table").on("click", ".sp-primary-result-option", function() {
|
463 |
$.post( ajaxurl, {
|
620 |
$(".sp-select-sport").change(function() {
|
621 |
$(".sp-configure-sport").hide();
|
622 |
});
|
623 |
+
|
624 |
+
// Ajax checklist
|
625 |
+
$(".sp-ajax-checklist").siblings(".sp-tab-select").find("select").change(function() {
|
626 |
+
$(this).closest(".sp-tab-select").siblings(".sp-ajax-checklist").find("ul").html("<li>" + localized_strings.loading + "</li>");
|
627 |
+
$.post( ajaxurl, {
|
628 |
+
action: "sp-get-players",
|
629 |
+
team: $(this).val(),
|
630 |
+
league: ('yes' == localized_strings.option_filter_by_league) ? $("select[name=\"tax_input[sp_league][]\"]").val() : null,
|
631 |
+
season: ('yes' == localized_strings.option_filter_by_season) ? $("select[name=\"tax_input[sp_season][]\"]").val() : null,
|
632 |
+
index: $(this).closest(".sp-instance").index(),
|
633 |
+
nonce: $("#sp-get-players-nonce").val()
|
634 |
+
}).done(function( response ) {
|
635 |
+
index = response.data.index;
|
636 |
+
$target = $(".sp-instance").eq(index).find(".sp-ajax-checklist ul");
|
637 |
+
if ( response.success ) {
|
638 |
+
$target.html("");
|
639 |
+
i = 0;
|
640 |
+
if(-1 == response.data.sections) {
|
641 |
+
if(response.data.players.length) {
|
642 |
+
$target.eq(0).append("<li class=\"sp-select-all-container\"><label class=\"selectit\"><input type=\"checkbox\" class=\"sp-select-all\"><strong>" + localized_strings.select_all + "</strong></li>");
|
643 |
+
$(response.data.players).each(function( key, value ) {
|
644 |
+
$target.eq(0).append("<li><label class=\"selectit\"><input type=\"checkbox\" value=\"" + value.ID + "\" name=\"sp_player[" + index + "][]\">" + value.post_title + "</li>");
|
645 |
+
});
|
646 |
+
$target.eq(0).append("<li class=\"sp-ajax-show-all-container\"><a class=\"sp-ajax-show-all\" href=\"#show-all-sp_players\">" + localized_strings.show_all + "</a></li>");
|
647 |
+
} else {
|
648 |
+
$target.eq(0).html("<li>" + localized_strings.no_results_found + " <a class=\"sp-ajax-show-all\" href=\"#show-all-sp_players\">" + localized_strings.show_all + "</a></li>");
|
649 |
+
}
|
650 |
+
} else {
|
651 |
+
if ( 1 == response.data.sections ) {
|
652 |
+
defense = i;
|
653 |
+
offense = i+1;
|
654 |
+
} else {
|
655 |
+
offense = i;
|
656 |
+
defense = i+1;
|
657 |
+
}
|
658 |
+
if(response.data.players.length) {
|
659 |
+
$target.eq(offense).append("<li class=\"sp-select-all-container\"><label class=\"selectit\"><input type=\"checkbox\" class=\"sp-select-all\"><strong>" + localized_strings.select_all + "</strong></li>");
|
660 |
+
$target.eq(defense).append("<li class=\"sp-select-all-container\"><label class=\"selectit\"><input type=\"checkbox\" class=\"sp-select-all\"><strong>" + localized_strings.select_all + "</strong></li>");
|
661 |
+
$(response.data.players).each(function( key, value ) {
|
662 |
+
$target.eq(offense).append("<li><label class=\"selectit\"><input type=\"checkbox\" value=\"" + value.ID + "\" name=\"sp_offense[" + index + "][]\">" + value.post_title + "</li>");
|
663 |
+
$target.eq(defense).append("<li><label class=\"selectit\"><input type=\"checkbox\" value=\"" + value.ID + "\" name=\"sp_defense[" + index + "][]\">" + value.post_title + "</li>");
|
664 |
+
});
|
665 |
+
$target.eq(offense).append("<li class=\"sp-ajax-show-all-container\"><a class=\"sp-ajax-show-all\" href=\"#show-all-sp_offense\">" + localized_strings.show_all + "</a></li>");
|
666 |
+
$target.eq(defense).append("<li class=\"sp-ajax-show-all-container\"><a class=\"sp-ajax-show-all\" href=\"#show-all-sp_defense\">" + localized_strings.show_all + "</a></li>");
|
667 |
+
} else {
|
668 |
+
$target.eq(offense).html("<li>" + localized_strings.no_results_found + " <a class=\"sp-ajax-show-all\" href=\"#show-all-sp_offense\">" + localized_strings.show_all + "</a></li>");
|
669 |
+
$target.eq(defense).html("<li>" + localized_strings.no_results_found + " <a class=\"sp-ajax-show-all\" href=\"#show-all-sp_defense\">" + localized_strings.show_all + "</a></li>");
|
670 |
+
}
|
671 |
+
i++;
|
672 |
+
}
|
673 |
+
i++;
|
674 |
+
if(response.data.staff.length) {
|
675 |
+
$target.eq(i).append("<li class=\"sp-select-all-container\"><label class=\"selectit\"><input type=\"checkbox\" class=\"sp-select-all\"><strong>" + localized_strings.select_all + "</strong></li>");
|
676 |
+
$(response.data.staff).each(function( key, value ) {
|
677 |
+
$target.eq(i).append("<li><label class=\"selectit\"><input type=\"checkbox\" value=\"" + value.ID + "\" name=\"sp_staff[" + index + "][]\">" + value.post_title + "</li>");
|
678 |
+
});
|
679 |
+
$target.eq(i).append("<li class=\"sp-ajax-show-all-container\"><a class=\"sp-ajax-show-all\" href=\"#show-all-sp_staffs\">" + localized_strings.show_all + "</a></li>");
|
680 |
+
} else {
|
681 |
+
$target.eq(i).html("<li>" + localized_strings.no_results_found + " <a class=\"sp-ajax-show-all\" href=\"#show-all-sp_staffs\">" + localized_strings.show_all + "</a></li>");
|
682 |
+
}
|
683 |
+
} else {
|
684 |
+
$target.html("<li>" + localized_strings.no_results_found + "</li>");
|
685 |
+
}
|
686 |
+
});
|
687 |
+
});
|
688 |
+
|
689 |
+
// Activate Ajax trigger
|
690 |
+
$(".sp-ajax-trigger").change(function() {
|
691 |
+
$(".sp-ajax-checklist").siblings(".sp-tab-select").find("select").change();
|
692 |
+
});
|
693 |
+
|
694 |
+
// Ajax show all filter
|
695 |
+
$(".sp-tab-panel").on("click", ".sp-ajax-show-all", function() {
|
696 |
+
index = $(this).closest(".sp-instance").index();
|
697 |
+
$(this).parent().html(localized_strings.loading);
|
698 |
+
$.post( ajaxurl, {
|
699 |
+
action: "sp-get-players",
|
700 |
+
index: index,
|
701 |
+
nonce: $("#sp-get-players-nonce").val()
|
702 |
+
}).done(function( response ) {
|
703 |
+
index = response.data.index;
|
704 |
+
console.log(index);
|
705 |
+
$target = $(".sp-instance").eq(index).find(".sp-ajax-checklist ul");
|
706 |
+
$target.find(".sp-ajax-show-all-container").hide();
|
707 |
+
if ( response.success ) {
|
708 |
+
i = 0;
|
709 |
+
console.log(response.data.sections);
|
710 |
+
if ( -1 == response.data.sections ) {
|
711 |
+
if(response.data.players.length) {
|
712 |
+
$(response.data.players).each(function( key, value ) {
|
713 |
+
//if($target.eq(i).find("input[value=" + value.ID + "]").length) return true;
|
714 |
+
$target.eq(i).append("<li><label class=\"selectit\"><input type=\"checkbox\" value=\"" + value.ID + "\" name=\"sp_player[" + index + "][]\">" + value.post_title + "</li>");
|
715 |
+
});
|
716 |
+
} else {
|
717 |
+
$target.eq(i).html("<li>" + localized_strings.no_results_found + "</li>");
|
718 |
+
}
|
719 |
+
} else {
|
720 |
+
if(response.data.players.length) {
|
721 |
+
if ( 1 == response.data.sections ) {
|
722 |
+
defense = i;
|
723 |
+
offense = i+1;
|
724 |
+
} else {
|
725 |
+
offense = i;
|
726 |
+
defense = i+1;
|
727 |
+
}
|
728 |
+
$(response.data.players).each(function( key, value ) {
|
729 |
+
$target.eq(offense).append("<li><label class=\"selectit\"><input type=\"checkbox\" value=\"" + value.ID + "\" name=\"sp_offense[" + index + "][]\">" + value.post_title + "</li>");
|
730 |
+
$target.eq(defense).append("<li><label class=\"selectit\"><input type=\"checkbox\" value=\"" + value.ID + "\" name=\"sp_defense[" + index + "][]\">" + value.post_title + "</li>");
|
731 |
+
});
|
732 |
+
} else {
|
733 |
+
$target.eq(offense).html("<li>" + localized_strings.no_results_found + "</li>");
|
734 |
+
$target.eq(defense).html("<li>" + localized_strings.no_results_found + "</li>");
|
735 |
+
}
|
736 |
+
i++;
|
737 |
+
}
|
738 |
+
i++;
|
739 |
+
if(response.data.staff.length) {
|
740 |
+
$(response.data.staff).each(function( key, value ) {
|
741 |
+
$target.eq(i).append("<li><label class=\"selectit\"><input type=\"checkbox\" value=\"" + value.ID + "\" name=\"sp_staff[" + index + "][]\">" + value.post_title + "</li>");
|
742 |
+
});
|
743 |
+
} else {
|
744 |
+
$target.eq(i).html("<li>" + localized_strings.no_results_found + "</li>");
|
745 |
+
}
|
746 |
+
} else {
|
747 |
+
$target.html("<li>" + localized_strings.no_results_found + "</li>");
|
748 |
+
}
|
749 |
+
});
|
750 |
+
});
|
751 |
});
|
assets/js/sp-maps.js
CHANGED
@@ -9,7 +9,7 @@
|
|
9 |
var ll = new google.maps.LatLng(latitude,longitude);
|
10 |
var mapOptions = {
|
11 |
scrollwheel: false,
|
12 |
-
zoom:
|
13 |
center: ll,
|
14 |
mapTypeId: google.maps.MapTypeId[vars.map_type]
|
15 |
};
|
9 |
var ll = new google.maps.LatLng(latitude,longitude);
|
10 |
var mapOptions = {
|
11 |
scrollwheel: false,
|
12 |
+
zoom: parseInt(vars.zoom),
|
13 |
center: ll,
|
14 |
mapTypeId: google.maps.MapTypeId[vars.map_type]
|
15 |
};
|
assets/js/sportspress.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
function
|
2 |
var e = window, a = 'inner';
|
3 |
if (!('innerWidth' in window )) {
|
4 |
a = 'client';
|
@@ -43,7 +43,7 @@ function viewport() {
|
|
43 |
|
44 |
/* Data Tables */
|
45 |
$(".sp-data-table").each(function() {
|
46 |
-
sortable =
|
47 |
paginated = $(this).hasClass("sp-paginated-table");
|
48 |
display_length = parseInt($(this).attr("data-sp-rows"));
|
49 |
if ( display_length == undefined || isNaN( display_length ) ) display_length = 10;
|
1 |
+
function sp_viewport() {
|
2 |
var e = window, a = 'inner';
|
3 |
if (!('innerWidth' in window )) {
|
4 |
a = 'client';
|
43 |
|
44 |
/* Data Tables */
|
45 |
$(".sp-data-table").each(function() {
|
46 |
+
sortable = sp_viewport().width > 640 && $(this).hasClass("sp-sortable-table");
|
47 |
paginated = $(this).hasClass("sp-paginated-table");
|
48 |
display_length = parseInt($(this).attr("data-sp-rows"));
|
49 |
if ( display_length == undefined || isNaN( display_length ) ) display_length = 10;
|
dummy-data/events-sample.csv
CHANGED
@@ -1 +1 @@
|
|
1 |
-
Date,Time,Venue,Teams,Results,Outcome,Players,Goals,Assists,Yellow Cards,Red Cards
|
1 |
+
Date,Time,Venue,Teams,Results,Outcome,Players,Goals,Assists,Yellow Cards,Red Cards
|
dummy-data/players-sample.csv
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
Number,Name,Positions,Teams,Competitions,Seasons,Nationality
|
2 |
-
1,Joe Allen,Goalkeeper,
|
3 |
-
3,Steven Gerrard,Defender,
|
4 |
-
5,Daniel Sturridge,Midfielder|Forward,
|
5 |
-
6,Gabrielle Gonzalez,Forward,
|
1 |
Number,Name,Positions,Teams,Competitions,Seasons,Nationality
|
2 |
+
1,Joe Allen,Goalkeeper,Eagles,Primary League|Secondary League,2014,aus
|
3 |
+
3,Steven Gerrard,Defender,Kangaroos,Primary League,2014|2013,usa
|
4 |
+
5,Daniel Sturridge,Midfielder|Forward,Sharks,Primary League|Secondary League,2014|2013,eng
|
5 |
+
6,Gabrielle Gonzalez,Forward,Kangaroos|Sharks,Primary League,2014,esp
|
dummy-data/staff-sample.csv
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
Name,Jobs,Teams,Competitions,Seasons,Nationality
|
2 |
-
Bobby Brown,Coach,
|
3 |
-
Charles Johnson,Assistant Coach,
|
4 |
-
Matt Smith,Waterboy,
|
5 |
-
Derrick Dawson,Manager,
|
6 |
-
John Allen,Investor,
|
1 |
Name,Jobs,Teams,Competitions,Seasons,Nationality
|
2 |
+
Bobby Brown,Coach,Eagles,Primary League|Secondary League,2014,aus
|
3 |
+
Charles Johnson,Assistant Coach,Kangaroos,Primary League,2014,eng
|
4 |
+
Matt Smith,Waterboy,Sharks,Primary League|Secondary League,2013|2014,aus
|
5 |
+
Derrick Dawson,Manager,Tigers,Primary League,2014,usa
|
6 |
+
John Allen,Investor,Foxes,Primary League|Secondary League,2014,esp
|
dummy-data/teams-sample.csv
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
Name,Competitions,Seasons,Site URL,Abbreviation,Home
|
2 |
-
|
3 |
-
|
4 |
-
|
1 |
Name,Competitions,Seasons,Site URL,Abbreviation,Home
|
2 |
+
Eagles,Primary League|Secondary League,2014,http://tboy.co/eagles,EAGLES,Little Park
|
3 |
+
Sharks,Primary League|Secondary League,2014|2013,http://tboy.co/sharks,SHARKS
|
4 |
+
Kangaroos,Primary League,2014|2013,http://tboy.co/roos,ROOS,Big Stadium
|
feeds/ical.php
CHANGED
@@ -77,7 +77,7 @@ foreach ( $events as $event):
|
|
77 |
// Add details to location
|
78 |
$address = sp_array_value( $meta, 'sp_address', false );
|
79 |
if ( false !== $address ) {
|
80 |
-
$location = $address;
|
81 |
}
|
82 |
|
83 |
// Generate geo tag
|
@@ -130,7 +130,8 @@ foreach ( $events as $event):
|
|
130 |
// Append to output string
|
131 |
$output .=
|
132 |
"BEGIN:VEVENT\n" .
|
133 |
-
"SUMMARY:" . $summary . "\n" .
|
|
|
134 |
"UID:$event->ID\n" .
|
135 |
"STATUS:CONFIRMED\n" .
|
136 |
"DTSTART:" . mysql2date( $date_format, $event->post_date ) . "\n" .
|
77 |
// Add details to location
|
78 |
$address = sp_array_value( $meta, 'sp_address', false );
|
79 |
if ( false !== $address ) {
|
80 |
+
$location = $venue->name . '\, ' . preg_replace('/([\,;])/','\\\$1', $address);
|
81 |
}
|
82 |
|
83 |
// Generate geo tag
|
130 |
// Append to output string
|
131 |
$output .=
|
132 |
"BEGIN:VEVENT\n" .
|
133 |
+
"SUMMARY:" . preg_replace('/([\,;])/','\\\$1', $summary) . "\n" .
|
134 |
+
"DESCRIPTION:" . preg_replace('/([\,;])/','\\\$1', $event->post_content) . "\n" .
|
135 |
"UID:$event->ID\n" .
|
136 |
"STATUS:CONFIRMED\n" .
|
137 |
"DTSTART:" . mysql2date( $date_format, $event->post_date ) . "\n" .
|
includes/admin/class-sp-admin-assets.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @author ThemeBoy
|
6 |
* @category Admin
|
7 |
* @package SportsPress/Admin
|
8 |
-
* @version 1.
|
9 |
*/
|
10 |
|
11 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
@@ -55,7 +55,7 @@ class SP_Admin_Assets {
|
|
55 |
wp_enqueue_style( 'sportspress-admin-customize-styles', SP()->plugin_url() . '/assets/css/customize.css', array(), SP_VERSION );
|
56 |
}
|
57 |
|
58 |
-
if ( in_array( $screen->id, array( 'sp_column', 'sp_statistic' ) ) ) {
|
59 |
wp_enqueue_style( 'sportspress-admin-equation-styles', SP()->plugin_url() . '/assets/css/equation.css', array(), SP_VERSION );
|
60 |
}
|
61 |
|
@@ -110,7 +110,7 @@ class SP_Admin_Assets {
|
|
110 |
wp_enqueue_script( 'jquery-fitvids' );
|
111 |
wp_enqueue_script( 'sportspress-admin', SP()->plugin_url() . '/assets/js/admin/sportspress-admin.js', array( 'jquery', 'chosen', 'jquery-ui-core', 'jquery-ui-datepicker', 'jquery-ui-draggable', 'jquery-ui-droppable', 'jquery-ui-sortable', 'jquery-tiptip', 'jquery-caret', 'jquery-countdown', 'jquery-fitvids' ), SP_VERSION, true );
|
112 |
|
113 |
-
$strings = array(
|
114 |
'none' => __( 'None', 'sportspress' ),
|
115 |
'remove_text' => __( '— Remove —', 'sportspress' ),
|
116 |
'days' => __( 'days', 'sportspress' ),
|
@@ -118,7 +118,7 @@ class SP_Admin_Assets {
|
|
118 |
'mins' => __( 'mins', 'sportspress' ),
|
119 |
'secs' => __( 'secs', 'sportspress' ),
|
120 |
'displaying_posts' => html_entity_decode( __( 'Displaying %s–%s of %s', 'sportspress' ) ),
|
121 |
-
);
|
122 |
|
123 |
// Localize scripts
|
124 |
wp_localize_script( 'sportspress-admin', 'localized_strings', $strings );
|
@@ -136,7 +136,7 @@ class SP_Admin_Assets {
|
|
136 |
}
|
137 |
|
138 |
// Edit equation
|
139 |
-
if ( in_array( $screen->id, array( 'sp_column', 'sp_statistic' ) ) ) {
|
140 |
wp_enqueue_script( 'sportspress-admin-equationbuilder' );
|
141 |
}
|
142 |
}
|
5 |
* @author ThemeBoy
|
6 |
* @category Admin
|
7 |
* @package SportsPress/Admin
|
8 |
+
* @version 1.9
|
9 |
*/
|
10 |
|
11 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
55 |
wp_enqueue_style( 'sportspress-admin-customize-styles', SP()->plugin_url() . '/assets/css/customize.css', array(), SP_VERSION );
|
56 |
}
|
57 |
|
58 |
+
if ( in_array( $screen->id, array( 'sp_result', 'sp_column', 'sp_statistic' ) ) ) {
|
59 |
wp_enqueue_style( 'sportspress-admin-equation-styles', SP()->plugin_url() . '/assets/css/equation.css', array(), SP_VERSION );
|
60 |
}
|
61 |
|
110 |
wp_enqueue_script( 'jquery-fitvids' );
|
111 |
wp_enqueue_script( 'sportspress-admin', SP()->plugin_url() . '/assets/js/admin/sportspress-admin.js', array( 'jquery', 'chosen', 'jquery-ui-core', 'jquery-ui-datepicker', 'jquery-ui-draggable', 'jquery-ui-droppable', 'jquery-ui-sortable', 'jquery-tiptip', 'jquery-caret', 'jquery-countdown', 'jquery-fitvids' ), SP_VERSION, true );
|
112 |
|
113 |
+
$strings = apply_filters( 'sportspress_localized_strings', array(
|
114 |
'none' => __( 'None', 'sportspress' ),
|
115 |
'remove_text' => __( '— Remove —', 'sportspress' ),
|
116 |
'days' => __( 'days', 'sportspress' ),
|
118 |
'mins' => __( 'mins', 'sportspress' ),
|
119 |
'secs' => __( 'secs', 'sportspress' ),
|
120 |
'displaying_posts' => html_entity_decode( __( 'Displaying %s–%s of %s', 'sportspress' ) ),
|
121 |
+
) );
|
122 |
|
123 |
// Localize scripts
|
124 |
wp_localize_script( 'sportspress-admin', 'localized_strings', $strings );
|
136 |
}
|
137 |
|
138 |
// Edit equation
|
139 |
+
if ( in_array( $screen->id, array( 'sp_result', 'sp_column', 'sp_statistic' ) ) ) {
|
140 |
wp_enqueue_script( 'sportspress-admin-equationbuilder' );
|
141 |
}
|
142 |
}
|
includes/admin/class-sp-admin-menus.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @author ThemeBoy
|
6 |
* @category Admin
|
7 |
* @package SportsPress/Admin
|
8 |
-
* @version 1.
|
9 |
*/
|
10 |
|
11 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
@@ -77,6 +77,7 @@ class SP_Admin_Menus {
|
|
77 |
public function menu_highlight() {
|
78 |
global $typenow;
|
79 |
$screen = get_current_screen();
|
|
|
80 |
if ( $screen->id == 'sp_role' ) {
|
81 |
$this->highlight_admin_menu( 'edit.php?post_type=sp_staff', 'edit-tags.php?taxonomy=sp_role&post_type=sp_staff' );
|
82 |
} elseif ( is_sp_config_type( $typenow ) ) {
|
5 |
* @author ThemeBoy
|
6 |
* @category Admin
|
7 |
* @package SportsPress/Admin
|
8 |
+
* @version 1.9.12
|
9 |
*/
|
10 |
|
11 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
77 |
public function menu_highlight() {
|
78 |
global $typenow;
|
79 |
$screen = get_current_screen();
|
80 |
+
if ( ! is_object( $screen ) ) return;
|
81 |
if ( $screen->id == 'sp_role' ) {
|
82 |
$this->highlight_admin_menu( 'edit.php?post_type=sp_staff', 'edit-tags.php?taxonomy=sp_role&post_type=sp_staff' );
|
83 |
} elseif ( is_sp_config_type( $typenow ) ) {
|
includes/admin/class-sp-admin-sample-data.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* The SportsPress admin sample data class stores demo content.
|
6 |
*
|
7 |
* @class SP_Admin_Sample_Data
|
8 |
-
* @version 1.
|
9 |
* @package SportsPress/Admin
|
10 |
* @category Class
|
11 |
* @author ThemeBoy
|
@@ -112,18 +112,15 @@ class SP_Admin_Sample_Data {
|
|
112 |
// Define teams
|
113 |
$teams = array(
|
114 |
array(
|
115 |
-
'name' => '
|
116 |
-
'abbreviation' => 'BENT',
|
117 |
'url' => 'http://tboy.co/bluebirds',
|
118 |
),
|
119 |
array(
|
120 |
-
'name' => '
|
121 |
-
'abbreviation' => 'ESS',
|
122 |
'url' => 'http://tboy.co/eagles',
|
123 |
),
|
124 |
array(
|
125 |
-
'name' => '
|
126 |
-
'abbreviation' => 'KENS',
|
127 |
'url' => 'http://tboy.co/kangaroos',
|
128 |
),
|
129 |
);
|
@@ -187,7 +184,6 @@ class SP_Admin_Sample_Data {
|
|
187 |
update_post_meta( $id, '_sp_sample', 1 );
|
188 |
|
189 |
// Update meta
|
190 |
-
update_post_meta( $id, 'sp_abbreviation', $team['abbreviation'] );
|
191 |
update_post_meta( $id, 'sp_url', $team['url'] );
|
192 |
}
|
193 |
|
@@ -222,7 +218,9 @@ class SP_Admin_Sample_Data {
|
|
222 |
$taxonomies = array( 'sp_position' );
|
223 |
foreach ( $taxonomies as $taxonomy ) {
|
224 |
$terms = get_terms( $taxonomy, array( 'hide_empty' => 0, 'fields' => 'ids', 'orderby' => 'slug', 'number' => 1, 'offset' => $index % 4 ) );
|
225 |
-
|
|
|
|
|
226 |
};
|
227 |
|
228 |
// Insert post
|
5 |
* The SportsPress admin sample data class stores demo content.
|
6 |
*
|
7 |
* @class SP_Admin_Sample_Data
|
8 |
+
* @version 1.9
|
9 |
* @package SportsPress/Admin
|
10 |
* @category Class
|
11 |
* @author ThemeBoy
|
112 |
// Define teams
|
113 |
$teams = array(
|
114 |
array(
|
115 |
+
'name' => 'Bluebirds',
|
|
|
116 |
'url' => 'http://tboy.co/bluebirds',
|
117 |
),
|
118 |
array(
|
119 |
+
'name' => 'Eagles',
|
|
|
120 |
'url' => 'http://tboy.co/eagles',
|
121 |
),
|
122 |
array(
|
123 |
+
'name' => 'Kangaroos',
|
|
|
124 |
'url' => 'http://tboy.co/kangaroos',
|
125 |
),
|
126 |
);
|
184 |
update_post_meta( $id, '_sp_sample', 1 );
|
185 |
|
186 |
// Update meta
|
|
|
187 |
update_post_meta( $id, 'sp_url', $team['url'] );
|
188 |
}
|
189 |
|
218 |
$taxonomies = array( 'sp_position' );
|
219 |
foreach ( $taxonomies as $taxonomy ) {
|
220 |
$terms = get_terms( $taxonomy, array( 'hide_empty' => 0, 'fields' => 'ids', 'orderby' => 'slug', 'number' => 1, 'offset' => $index % 4 ) );
|
221 |
+
if ( $terms && ! is_wp_error( $terms ) ) {
|
222 |
+
$post['tax_input'][ $taxonomy ] = $terms;
|
223 |
+
}
|
224 |
};
|
225 |
|
226 |
// Insert post
|
includes/admin/class-sp-admin-sports.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* The SportsPress admin sports class stores preset sport data.
|
6 |
*
|
7 |
* @class SP_Admin_Sports
|
8 |
-
* @version 1.
|
9 |
* @package SportsPress/Admin
|
10 |
* @category Class
|
11 |
* @author ThemeBoy
|
@@ -47,6 +47,16 @@ class SP_Admin_Sports {
|
|
47 |
$id = preg_replace('/\\.[^.\\s]{3,4}$/', '', $file );
|
48 |
$presets[ $id ] = $data;
|
49 |
$name = array_key_exists( 'name', $data ) ? __( $data['name'], 'sportspress' ) : $id;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
self::$options[ $slug ][ $id ] = $name;
|
51 |
}
|
52 |
asort( self::$options[ $slug ] );
|
@@ -137,6 +147,7 @@ class SP_Admin_Sports {
|
|
137 |
if ( empty( $post ) ) continue;
|
138 |
$id = self::insert_preset_post( $post, $index );
|
139 |
if ( is_array( $result ) && array_key_exists( 'primary', $result ) ) $primary_result = $post['post_name'];
|
|
|
140 |
}
|
141 |
|
142 |
// Make sure statistics and metrics have greater menu order than performance
|
@@ -153,6 +164,10 @@ class SP_Admin_Sports {
|
|
153 |
if ( isset( $performance['position'] ) ) {
|
154 |
wp_set_object_terms( $id, $performance['position'], 'sp_position', false );
|
155 |
}
|
|
|
|
|
|
|
|
|
156 |
$i ++;
|
157 |
}
|
158 |
|
5 |
* The SportsPress admin sports class stores preset sport data.
|
6 |
*
|
7 |
* @class SP_Admin_Sports
|
8 |
+
* @version 1.9.19
|
9 |
* @package SportsPress/Admin
|
10 |
* @category Class
|
11 |
* @author ThemeBoy
|
47 |
$id = preg_replace('/\\.[^.\\s]{3,4}$/', '', $file );
|
48 |
$presets[ $id ] = $data;
|
49 |
$name = array_key_exists( 'name', $data ) ? __( $data['name'], 'sportspress' ) : $id;
|
50 |
+
|
51 |
+
// Conditionally append filename in parentheses for clarity
|
52 |
+
if ( false === strpos( str_replace( ' ', '', strtolower( $data['name'] ) ), str_replace( '-', '', $id ) ) ) {
|
53 |
+
if ( 4 < strlen( $id ) ) {
|
54 |
+
$name .= ' (' . ucfirst( $id ) . ')';
|
55 |
+
} else {
|
56 |
+
$name .= ' (' . strtoupper( $id ) . ')';
|
57 |
+
}
|
58 |
+
}
|
59 |
+
|
60 |
self::$options[ $slug ][ $id ] = $name;
|
61 |
}
|
62 |
asort( self::$options[ $slug ] );
|
147 |
if ( empty( $post ) ) continue;
|
148 |
$id = self::insert_preset_post( $post, $index );
|
149 |
if ( is_array( $result ) && array_key_exists( 'primary', $result ) ) $primary_result = $post['post_name'];
|
150 |
+
update_post_meta( $id, 'sp_equation', sp_array_value( $result, 'equation', null ) );
|
151 |
}
|
152 |
|
153 |
// Make sure statistics and metrics have greater menu order than performance
|
164 |
if ( isset( $performance['position'] ) ) {
|
165 |
wp_set_object_terms( $id, $performance['position'], 'sp_position', false );
|
166 |
}
|
167 |
+
update_post_meta( $id, 'sp_icon', sp_array_value( $performance, 'icon', null ) );
|
168 |
+
update_post_meta( $id, 'sp_color', sp_array_value( $performance, 'color', null ) );
|
169 |
+
update_post_meta( $id, 'sp_section', sp_array_value( $performance, 'section', -1 ) );
|
170 |
+
update_post_meta( $id, 'sp_format', sp_array_value( $performance, 'format', 'number' ) );
|
171 |
$i ++;
|
172 |
}
|
173 |
|
includes/admin/class-sp-admin-taxonomies.php
CHANGED
@@ -7,7 +7,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
7 |
* Handles taxonomies in admin
|
8 |
*
|
9 |
* @class SP_Admin_Taxonomies
|
10 |
-
* @version 1.
|
11 |
* @package SportsPress/Admin
|
12 |
* @category Class
|
13 |
* @author ThemeBoy
|
@@ -82,11 +82,11 @@ class SP_Admin_Taxonomies {
|
|
82 |
</div>
|
83 |
<div class="form-field">
|
84 |
<label for="term_meta[sp_latitude]"><?php _e( 'Latitude', 'sportspress' ); ?></label>
|
85 |
-
<input type="text" class="sp-latitude" name="term_meta[sp_latitude]" id="term_meta[sp_latitude]" value="<?php echo $latitude; ?>">
|
86 |
</div>
|
87 |
<div class="form-field">
|
88 |
<label for="term_meta[sp_longitude]"><?php _e( 'Longitude', 'sportspress' ); ?></label>
|
89 |
-
<input type="text" class="sp-longitude" name="term_meta[sp_longitude]" id="term_meta[sp_longitude]" value="<?php echo $longitude; ?>">
|
90 |
</div>
|
91 |
<?php
|
92 |
}
|
7 |
* Handles taxonomies in admin
|
8 |
*
|
9 |
* @class SP_Admin_Taxonomies
|
10 |
+
* @version 1.9.7
|
11 |
* @package SportsPress/Admin
|
12 |
* @category Class
|
13 |
* @author ThemeBoy
|
82 |
</div>
|
83 |
<div class="form-field">
|
84 |
<label for="term_meta[sp_latitude]"><?php _e( 'Latitude', 'sportspress' ); ?></label>
|
85 |
+
<input type="text" class="sp-latitude" name="term_meta[sp_latitude]" id="term_meta[sp_latitude]" value="<?php echo esc_attr( $latitude ); ?>">
|
86 |
</div>
|
87 |
<div class="form-field">
|
88 |
<label for="term_meta[sp_longitude]"><?php _e( 'Longitude', 'sportspress' ); ?></label>
|
89 |
+
<input type="text" class="sp-longitude" name="term_meta[sp_longitude]" id="term_meta[sp_longitude]" value="<?php echo esc_attr( $longitude ); ?>">
|
90 |
</div>
|
91 |
<?php
|
92 |
}
|
includes/admin/class-sp-admin-welcome.php
CHANGED
@@ -9,7 +9,7 @@
|
|
9 |
* @author ThemeBoy
|
10 |
* @category Admin
|
11 |
* @package SportsPress/Admin
|
12 |
-
* @version 1.
|
13 |
*/
|
14 |
|
15 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
@@ -346,6 +346,12 @@ class SP_Admin_Welcome {
|
|
346 |
<?php $this->intro(); ?>
|
347 |
|
348 |
<p class="about-description"><?php printf( __( 'SportsPress has been kindly translated into several other languages thanks to our translation team. Want to see your name? <a href="%s">Translate SportsPress</a>.', 'sportspress' ), 'https://www.transifex.com/projects/p/sportspress/' ); ?></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
349 |
<p class="wp-credits-list">
|
350 |
<?php
|
351 |
$translators = array(
|
@@ -388,16 +394,17 @@ class SP_Admin_Welcome {
|
|
388 |
'thegreat',
|
389 |
),
|
390 |
'Nederlands' => array(
|
391 |
-
'
|
392 |
'paulcoppen',
|
393 |
'poelie',
|
|
|
394 |
'valentijnreza',
|
395 |
),
|
396 |
'Suomi' => array(
|
397 |
-
'
|
398 |
'Hermanni',
|
399 |
'JuKi',
|
400 |
-
'
|
401 |
),
|
402 |
'Français' => array(
|
403 |
'francois53',
|
@@ -415,6 +422,8 @@ class SP_Admin_Welcome {
|
|
415 |
'FollowCandyPanda',
|
416 |
'green_big_frog',
|
417 |
'King3R',
|
|
|
|
|
418 |
),
|
419 |
'Ελληνικά' => array(
|
420 |
'filippos.sdr',
|
@@ -424,9 +433,9 @@ class SP_Admin_Welcome {
|
|
424 |
'ValliFudd',
|
425 |
),
|
426 |
'Italiano' => array(
|
|
|
427 |
'Flubber89',
|
428 |
'GhiMax',
|
429 |
-
'eNnvi',
|
430 |
'joegalaxy66',
|
431 |
'massimo.marra',
|
432 |
'sododesign',
|
@@ -444,22 +453,26 @@ class SP_Admin_Welcome {
|
|
444 |
'doncer',
|
445 |
),
|
446 |
'Norsk bokmål' => array(
|
447 |
-
'sijo',
|
448 |
-
'Laislebai',
|
449 |
'jenymoen',
|
|
|
450 |
'm4rsal',
|
|
|
451 |
'slappfiskene.no',
|
452 |
'vetsmi',
|
453 |
),
|
|
|
|
|
|
|
454 |
'Polski' => array(
|
|
|
455 |
'karimjarro',
|
456 |
'krisop',
|
457 |
),
|
458 |
'Português do Brasil' => array(
|
459 |
-
'Ferenan',
|
460 |
'AugustoNeto',
|
461 |
-
'
|
462 |
'lfrodines',
|
|
|
463 |
'pgbenini',
|
464 |
'rochester',
|
465 |
),
|
@@ -482,32 +495,37 @@ class SP_Admin_Welcome {
|
|
482 |
'Српски језик' => array(
|
483 |
'etcloki',
|
484 |
),
|
485 |
-
'Slovenčina' => array(
|
486 |
-
'matiqos',
|
487 |
-
),
|
488 |
'Slovenščina' => array(
|
|
|
489 |
'BOCo',
|
490 |
'cofeman.sl',
|
|
|
491 |
),
|
492 |
'Español' => array(
|
493 |
'albertone',
|
|
|
|
|
494 |
'EmiDelCaz',
|
495 |
-
'GonerSTUDIO',
|
496 |
'edesl',
|
497 |
'fernandori',
|
|
|
498 |
'i1m3a7n92',
|
499 |
'latixns',
|
500 |
'opticadeharo',
|
501 |
'popeosorio',
|
502 |
),
|
503 |
'Svenska' => array(
|
504 |
-
'JensZ',
|
505 |
'fiiz',
|
|
|
|
|
|
|
|
|
506 |
),
|
507 |
'Türkçe' => array(
|
508 |
'ALooNeBoy87',
|
509 |
-
'GuneshGamza95',
|
510 |
'ceyhunulas',
|
|
|
|
|
511 |
'overbite',
|
512 |
),
|
513 |
'Українська' => array(
|
@@ -541,12 +559,6 @@ class SP_Admin_Welcome {
|
|
541 |
echo implode( '<br>', $translation_teams );
|
542 |
?>
|
543 |
</p>
|
544 |
-
<div class="postbox sp-top-translations">
|
545 |
-
<h3 class="hndle"><span><?php _e( 'Top Translations', 'sportspress' ); ?></span></h3>
|
546 |
-
<p class="sp-transifex-chart">
|
547 |
-
<a target="_blank" href="https://www.transifex.com/projects/p/sportspress"><img border="0" src="https://www.transifex.com/projects/p/sportspress/resource/sportspress/chart/image_png"/></a>
|
548 |
-
</p>
|
549 |
-
</div>
|
550 |
</div>
|
551 |
<?php
|
552 |
}
|
9 |
* @author ThemeBoy
|
10 |
* @category Admin
|
11 |
* @package SportsPress/Admin
|
12 |
+
* @version 1.9.13
|
13 |
*/
|
14 |
|
15 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
346 |
<?php $this->intro(); ?>
|
347 |
|
348 |
<p class="about-description"><?php printf( __( 'SportsPress has been kindly translated into several other languages thanks to our translation team. Want to see your name? <a href="%s">Translate SportsPress</a>.', 'sportspress' ), 'https://www.transifex.com/projects/p/sportspress/' ); ?></p>
|
349 |
+
<div class="postbox sp-top-translations">
|
350 |
+
<h3 class="hndle"><span><?php _e( 'Top Translations', 'sportspress' ); ?></span></h3>
|
351 |
+
<p class="sp-transifex-chart">
|
352 |
+
<a target="_blank" href="https://www.transifex.com/projects/p/sportspress"><img border="0" src="https://www.transifex.com/projects/p/sportspress/resource/sportspress/chart/image_png"/></a>
|
353 |
+
</p>
|
354 |
+
</div>
|
355 |
<p class="wp-credits-list">
|
356 |
<?php
|
357 |
$translators = array(
|
394 |
'thegreat',
|
395 |
),
|
396 |
'Nederlands' => array(
|
397 |
+
'demoyer',
|
398 |
'paulcoppen',
|
399 |
'poelie',
|
400 |
+
'SilverXp',
|
401 |
'valentijnreza',
|
402 |
),
|
403 |
'Suomi' => array(
|
404 |
+
'hanro',
|
405 |
'Hermanni',
|
406 |
'JuKi',
|
407 |
+
'Taurus',
|
408 |
),
|
409 |
'Français' => array(
|
410 |
'francois53',
|
422 |
'FollowCandyPanda',
|
423 |
'green_big_frog',
|
424 |
'King3R',
|
425 |
+
'Tandor',
|
426 |
+
'tkausch',
|
427 |
),
|
428 |
'Ελληνικά' => array(
|
429 |
'filippos.sdr',
|
433 |
'ValliFudd',
|
434 |
),
|
435 |
'Italiano' => array(
|
436 |
+
'eNnvi',
|
437 |
'Flubber89',
|
438 |
'GhiMax',
|
|
|
439 |
'joegalaxy66',
|
440 |
'massimo.marra',
|
441 |
'sododesign',
|
453 |
'doncer',
|
454 |
),
|
455 |
'Norsk bokmål' => array(
|
|
|
|
|
456 |
'jenymoen',
|
457 |
+
'Laislebai',
|
458 |
'm4rsal',
|
459 |
+
'sijo',
|
460 |
'slappfiskene.no',
|
461 |
'vetsmi',
|
462 |
),
|
463 |
+
'فارسی' => array(
|
464 |
+
'mahdi12',
|
465 |
+
),
|
466 |
'Polski' => array(
|
467 |
+
'Elmister',
|
468 |
'karimjarro',
|
469 |
'krisop',
|
470 |
),
|
471 |
'Português do Brasil' => array(
|
|
|
472 |
'AugustoNeto',
|
473 |
+
'Ferenan',
|
474 |
'lfrodines',
|
475 |
+
'Ozias',
|
476 |
'pgbenini',
|
477 |
'rochester',
|
478 |
),
|
495 |
'Српски језик' => array(
|
496 |
'etcloki',
|
497 |
),
|
|
|
|
|
|
|
498 |
'Slovenščina' => array(
|
499 |
+
'Ales70',
|
500 |
'BOCo',
|
501 |
'cofeman.sl',
|
502 |
+
'matiqos',
|
503 |
),
|
504 |
'Español' => array(
|
505 |
'albertone',
|
506 |
+
'diego.battistella',
|
507 |
+
'elarequi',
|
508 |
'EmiDelCaz',
|
|
|
509 |
'edesl',
|
510 |
'fernandori',
|
511 |
+
'GonerSTUDIO',
|
512 |
'i1m3a7n92',
|
513 |
'latixns',
|
514 |
'opticadeharo',
|
515 |
'popeosorio',
|
516 |
),
|
517 |
'Svenska' => array(
|
|
|
518 |
'fiiz',
|
519 |
+
'JensZ',
|
520 |
+
),
|
521 |
+
'தமிழ்' => array(
|
522 |
+
'chinnz25',
|
523 |
),
|
524 |
'Türkçe' => array(
|
525 |
'ALooNeBoy87',
|
|
|
526 |
'ceyhunulas',
|
527 |
+
'GuneshGamza95',
|
528 |
+
'muhahmetkara',
|
529 |
'overbite',
|
530 |
),
|
531 |
'Українська' => array(
|
559 |
echo implode( '<br>', $translation_teams );
|
560 |
?>
|
561 |
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
562 |
</div>
|
563 |
<?php
|
564 |
}
|
includes/admin/class-sp-admin.php
CHANGED
@@ -51,7 +51,7 @@ class SP_Admin {
|
|
51 |
include( 'class-sp-admin-assets.php' );
|
52 |
include( 'class-sp-admin-permalink-settings.php' );
|
53 |
|
54 |
-
if ( get_option( 'sportspress_rich_editing',
|
55 |
include( 'class-sp-admin-editor.php' );
|
56 |
endif;
|
57 |
}
|
51 |
include( 'class-sp-admin-assets.php' );
|
52 |
include( 'class-sp-admin-permalink-settings.php' );
|
53 |
|
54 |
+
if ( 'yes' == get_option( 'sportspress_rich_editing', 'yes' ) ):
|
55 |
include( 'class-sp-admin-editor.php' );
|
56 |
endif;
|
57 |
}
|
includes/admin/importers/class-sp-event-importer.php
CHANGED
@@ -188,7 +188,7 @@ if ( class_exists( 'WP_Importer' ) ) {
|
|
188 |
list( $team_name, $result, $outcome ) = $team;
|
189 |
|
190 |
// Find out if team exists
|
191 |
-
$team_object = get_page_by_title( $team_name, OBJECT, 'sp_team' );
|
192 |
|
193 |
// Get or insert team
|
194 |
if ( $team_object ):
|
@@ -204,7 +204,7 @@ if ( class_exists( 'WP_Importer' ) ) {
|
|
204 |
else:
|
205 |
|
206 |
// Insert team
|
207 |
-
$team_id = wp_insert_post( array( 'post_type' => 'sp_team', 'post_status' => 'publish', 'post_title' => $team_name ) );
|
208 |
|
209 |
// Flag as import
|
210 |
update_post_meta( $team_id, '_sp_import', 1 );
|
@@ -257,7 +257,7 @@ if ( class_exists( 'WP_Importer' ) ) {
|
|
257 |
$outcome = trim( $outcome );
|
258 |
|
259 |
// Get or insert outcome
|
260 |
-
$outcome_object = get_page_by_title( $outcome, OBJECT, 'sp_outcome' );
|
261 |
|
262 |
if ( $outcome_object ):
|
263 |
|
@@ -272,7 +272,7 @@ if ( class_exists( 'WP_Importer' ) ) {
|
|
272 |
else:
|
273 |
|
274 |
// Insert outcome
|
275 |
-
$outcome_id = wp_insert_post( array( 'post_type' => 'sp_outcome', 'post_status' => 'publish', 'post_title' => $outcome ) );
|
276 |
|
277 |
// Get outcome slug
|
278 |
$post_data = get_post( $outcome_id, ARRAY_A );
|
@@ -332,7 +332,7 @@ if ( class_exists( 'WP_Importer' ) ) {
|
|
332 |
unset( $player[0] );
|
333 |
|
334 |
// Find out if player exists
|
335 |
-
$player_object = get_page_by_title( $player_name, OBJECT, 'sp_player' );
|
336 |
|
337 |
// Get or insert player
|
338 |
if ( $player_object ):
|
@@ -351,7 +351,7 @@ if ( class_exists( 'WP_Importer' ) ) {
|
|
351 |
else:
|
352 |
|
353 |
// Insert player
|
354 |
-
$player_id = wp_insert_post( array( 'post_type' => 'sp_player', 'post_status' => 'publish', 'post_title' => $player_name ) );
|
355 |
|
356 |
// Flag as import
|
357 |
update_post_meta( $player_id, '_sp_import', 1 );
|
188 |
list( $team_name, $result, $outcome ) = $team;
|
189 |
|
190 |
// Find out if team exists
|
191 |
+
$team_object = get_page_by_title( stripslashes( $team_name ), OBJECT, 'sp_team' );
|
192 |
|
193 |
// Get or insert team
|
194 |
if ( $team_object ):
|
204 |
else:
|
205 |
|
206 |
// Insert team
|
207 |
+
$team_id = wp_insert_post( array( 'post_type' => 'sp_team', 'post_status' => 'publish', 'post_title' => wp_strip_all_tags( $team_name ) ) );
|
208 |
|
209 |
// Flag as import
|
210 |
update_post_meta( $team_id, '_sp_import', 1 );
|
257 |
$outcome = trim( $outcome );
|
258 |
|
259 |
// Get or insert outcome
|
260 |
+
$outcome_object = get_page_by_title( stripslashes( $outcome ), OBJECT, 'sp_outcome' );
|
261 |
|
262 |
if ( $outcome_object ):
|
263 |
|
272 |
else:
|
273 |
|
274 |
// Insert outcome
|
275 |
+
$outcome_id = wp_insert_post( array( 'post_type' => 'sp_outcome', 'post_status' => 'publish', 'post_title' => wp_strip_all_tags( $outcome ) ) );
|
276 |
|
277 |
// Get outcome slug
|
278 |
$post_data = get_post( $outcome_id, ARRAY_A );
|
332 |
unset( $player[0] );
|
333 |
|
334 |
// Find out if player exists
|
335 |
+
$player_object = get_page_by_title( stripslashes( $player_name ), OBJECT, 'sp_player' );
|
336 |
|
337 |
// Get or insert player
|
338 |
if ( $player_object ):
|
351 |
else:
|
352 |
|
353 |
// Insert player
|
354 |
+
$player_id = wp_insert_post( array( 'post_type' => 'sp_player', 'post_status' => 'publish', 'post_title' => wp_strip_all_tags( $player_name ) ) );
|
355 |
|
356 |
// Flag as import
|
357 |
update_post_meta( $player_id, '_sp_import', 1 );
|
includes/admin/importers/class-sp-importer.php
CHANGED
@@ -152,7 +152,7 @@ if ( class_exists( 'WP_Importer' ) ) {
|
|
152 |
<tr>
|
153 |
<?php $index = 0; foreach ( $this->columns as $key => $label ): $value = sp_array_value( $row, $index ); ?>
|
154 |
<td>
|
155 |
-
<input type="text" class="widefat" value="<?php echo $value; ?>" name="sp_import[]">
|
156 |
</td>
|
157 |
<?php $index ++; endforeach; ?>
|
158 |
<td class="sp-actions-column">
|
152 |
<tr>
|
153 |
<?php $index = 0; foreach ( $this->columns as $key => $label ): $value = sp_array_value( $row, $index ); ?>
|
154 |
<td>
|
155 |
+
<input type="text" class="widefat" value="<?php echo esc_attr( $value ); ?>" name="sp_import[]">
|
156 |
</td>
|
157 |
<?php $index ++; endforeach; ?>
|
158 |
<td class="sp-actions-column">
|
includes/admin/importers/class-sp-player-importer.php
CHANGED
@@ -71,7 +71,7 @@ if ( class_exists( 'WP_Importer' ) ) {
|
|
71 |
continue;
|
72 |
endif;
|
73 |
|
74 |
-
$args = array( 'post_type' => 'sp_player', 'post_status' => 'publish', 'post_title' => $name );
|
75 |
|
76 |
$id = wp_insert_post( $args );
|
77 |
|
@@ -98,14 +98,14 @@ if ( class_exists( 'WP_Importer' ) ) {
|
|
98 |
$i = 0;
|
99 |
foreach ( $teams as $team ):
|
100 |
// Get or insert team
|
101 |
-
$team_object = get_page_by_title( $team, OBJECT, 'sp_team' );
|
102 |
if ( $team_object ):
|
103 |
if ( $team_object->post_status != 'publish' ):
|
104 |
wp_update_post( array( 'ID' => $team_object->ID, 'post_status' => 'publish' ) );
|
105 |
endif;
|
106 |
$team_id = $team_object->ID;
|
107 |
else:
|
108 |
-
$team_id = wp_insert_post( array( 'post_type' => 'sp_team', 'post_status' => 'publish', 'post_title' => $team ) );
|
109 |
// Flag as import
|
110 |
update_post_meta( $team_id, '_sp_import', 1 );
|
111 |
wp_set_object_terms( $team_id, $leagues, 'sp_league', false );
|
71 |
continue;
|
72 |
endif;
|
73 |
|
74 |
+
$args = array( 'post_type' => 'sp_player', 'post_status' => 'publish', 'post_title' => wp_strip_all_tags( $name ) );
|
75 |
|
76 |
$id = wp_insert_post( $args );
|
77 |
|
98 |
$i = 0;
|
99 |
foreach ( $teams as $team ):
|
100 |
// Get or insert team
|
101 |
+
$team_object = get_page_by_title( stripslashes( $team ), OBJECT, 'sp_team' );
|
102 |
if ( $team_object ):
|
103 |
if ( $team_object->post_status != 'publish' ):
|
104 |
wp_update_post( array( 'ID' => $team_object->ID, 'post_status' => 'publish' ) );
|
105 |
endif;
|
106 |
$team_id = $team_object->ID;
|
107 |
else:
|
108 |
+
$team_id = wp_insert_post( array( 'post_type' => 'sp_team', 'post_status' => 'publish', 'post_title' => wp_strip_all_tags( $team ) ) );
|
109 |
// Flag as import
|
110 |
update_post_meta( $team_id, '_sp_import', 1 );
|
111 |
wp_set_object_terms( $team_id, $leagues, 'sp_league', false );
|
includes/admin/importers/class-sp-staff-importer.php
CHANGED
@@ -70,7 +70,7 @@ if ( class_exists( 'WP_Importer' ) ) {
|
|
70 |
continue;
|
71 |
endif;
|
72 |
|
73 |
-
$args = array( 'post_type' => 'sp_staff', 'post_status' => 'publish', 'post_title' => $name );
|
74 |
|
75 |
$id = wp_insert_post( $args );
|
76 |
|
@@ -94,14 +94,14 @@ if ( class_exists( 'WP_Importer' ) ) {
|
|
94 |
$i = 0;
|
95 |
foreach ( $teams as $team ):
|
96 |
// Get or insert team
|
97 |
-
$team_object = get_page_by_title( $team, OBJECT, 'sp_team' );
|
98 |
if ( $team_object ):
|
99 |
if ( $team_object->post_status != 'publish' ):
|
100 |
wp_update_post( array( 'ID' => $team_object->ID, 'post_status' => 'publish' ) );
|
101 |
endif;
|
102 |
$team_id = $team_object->ID;
|
103 |
else:
|
104 |
-
$team_id = wp_insert_post( array( 'post_type' => 'sp_team', 'post_status' => 'publish', 'post_title' => $team ) );
|
105 |
// Flag as import
|
106 |
update_post_meta( $team_id, '_sp_import', 1 );
|
107 |
wp_set_object_terms( $team_id, $leagues, 'sp_league', false );
|
70 |
continue;
|
71 |
endif;
|
72 |
|
73 |
+
$args = array( 'post_type' => 'sp_staff', 'post_status' => 'publish', 'post_title' => wp_strip_all_tags( $name ) );
|
74 |
|
75 |
$id = wp_insert_post( $args );
|
76 |
|
94 |
$i = 0;
|
95 |
foreach ( $teams as $team ):
|
96 |
// Get or insert team
|
97 |
+
$team_object = get_page_by_title( stripslashes( $team ), OBJECT, 'sp_team' );
|
98 |
if ( $team_object ):
|
99 |
if ( $team_object->post_status != 'publish' ):
|
100 |
wp_update_post( array( 'ID' => $team_object->ID, 'post_status' => 'publish' ) );
|
101 |
endif;
|
102 |
$team_id = $team_object->ID;
|
103 |
else:
|
104 |
+
$team_id = wp_insert_post( array( 'post_type' => 'sp_team', 'post_status' => 'publish', 'post_title' => wp_strip_all_tags( $team ) ) );
|
105 |
// Flag as import
|
106 |
update_post_meta( $team_id, '_sp_import', 1 );
|
107 |
wp_set_object_terms( $team_id, $leagues, 'sp_league', false );
|
includes/admin/importers/class-sp-team-importer.php
CHANGED
@@ -70,7 +70,7 @@ if ( class_exists( 'WP_Importer' ) ) {
|
|
70 |
continue;
|
71 |
endif;
|
72 |
|
73 |
-
$args = array( 'post_type' => 'sp_team', 'post_status' => 'publish', 'post_title' => $name );
|
74 |
|
75 |
$id = wp_insert_post( $args );
|
76 |
|
70 |
continue;
|
71 |
endif;
|
72 |
|
73 |
+
$args = array( 'post_type' => 'sp_team', 'post_status' => 'publish', 'post_title' => wp_strip_all_tags( $name ) );
|
74 |
|
75 |
$id = wp_insert_post( $args );
|
76 |
|
includes/admin/post-types/class-sp-admin-cpt-event.php
CHANGED
@@ -160,7 +160,7 @@ class SP_Admin_CPT_Event extends SP_Admin_CPT {
|
|
160 |
$team_results = implode( ' | ', $team_results );
|
161 |
endif;
|
162 |
|
163 |
-
echo '<a class="sp-result sp-tip" tabindex="10" title="' . $team_results . '" data-team="' . $team_id . '" href="#">' . ( $team_result == '' ? '-' : $team_result ) . '</a>';
|
164 |
echo '<input type="text" tabindex="10" class="sp-edit-result hidden small-text" data-team="' . $team_id . '" data-key="' . $main_result . '" value="' . $team_result . '"> ';
|
165 |
echo $team->post_title;
|
166 |
echo '<br>';
|
160 |
$team_results = implode( ' | ', $team_results );
|
161 |
endif;
|
162 |
|
163 |
+
echo '<a class="sp-result sp-tip" tabindex="10" title="' . $team_results . '" data-team="' . $team_id . '" href="#">' . ( $team_result == '' ? '-' : apply_filters( 'sportspress_event_team_result_admin', $team_result, $post_id, $team_id ) ) . '</a>';
|
164 |
echo '<input type="text" tabindex="10" class="sp-edit-result hidden small-text" data-team="' . $team_id . '" data-key="' . $main_result . '" value="' . $team_result . '"> ';
|
165 |
echo $team->post_title;
|
166 |
echo '<br>';
|
includes/admin/post-types/class-sp-admin-cpt-list.php
CHANGED
@@ -62,8 +62,13 @@ class SP_Admin_CPT_List extends SP_Admin_CPT {
|
|
62 |
public function custom_columns( $column, $post_id ) {
|
63 |
switch ( $column ):
|
64 |
case 'sp_player':
|
65 |
-
$
|
66 |
-
|
|
|
|
|
|
|
|
|
|
|
67 |
break;
|
68 |
case 'sp_league':
|
69 |
echo get_the_terms ( $post_id, 'sp_league' ) ? the_terms( $post_id, 'sp_league' ) : __( 'All', 'sportspress' );
|
62 |
public function custom_columns( $column, $post_id ) {
|
63 |
switch ( $column ):
|
64 |
case 'sp_player':
|
65 |
+
$select = get_post_meta( $post_id, 'sp_select', true );
|
66 |
+
if ( 'manual' == $select ):
|
67 |
+
$players = array_filter( get_post_meta( $post_id, 'sp_player' ) );
|
68 |
+
echo sizeof( $players );
|
69 |
+
else:
|
70 |
+
_e( 'Auto', 'sportspress' );
|
71 |
+
endif;
|
72 |
break;
|
73 |
case 'sp_league':
|
74 |
echo get_the_terms ( $post_id, 'sp_league' ) ? the_terms( $post_id, 'sp_league' ) : __( 'All', 'sportspress' );
|
includes/admin/post-types/class-sp-admin-cpt-performance.php
CHANGED
@@ -43,6 +43,8 @@ class SP_Admin_CPT_Performance extends SP_Admin_CPT {
|
|
43 |
'sp_icon' => __( 'Icon', 'sportspress' ),
|
44 |
'title' => __( 'Label', 'sportspress' ),
|
45 |
'sp_key' => __( 'Variable', 'sportspress' ),
|
|
|
|
|
46 |
'sp_description' => __( 'Description', 'sportspress' ),
|
47 |
);
|
48 |
return apply_filters( 'sportspress_performance_admin_columns', $columns );
|
@@ -61,6 +63,14 @@ class SP_Admin_CPT_Performance extends SP_Admin_CPT {
|
|
61 |
global $post;
|
62 |
echo $post->post_name;
|
63 |
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
case 'sp_description':
|
65 |
global $post;
|
66 |
echo '<span class="description">' . $post->post_excerpt . '</span>';
|
43 |
'sp_icon' => __( 'Icon', 'sportspress' ),
|
44 |
'title' => __( 'Label', 'sportspress' ),
|
45 |
'sp_key' => __( 'Variable', 'sportspress' ),
|
46 |
+
'sp_section' => __( 'Category', 'sportspress' ),
|
47 |
+
'sp_config_format' => __( 'Format', 'sportspress' ),
|
48 |
'sp_description' => __( 'Description', 'sportspress' ),
|
49 |
);
|
50 |
return apply_filters( 'sportspress_performance_admin_columns', $columns );
|
63 |
global $post;
|
64 |
echo $post->post_name;
|
65 |
break;
|
66 |
+
case 'sp_section':
|
67 |
+
global $post;
|
68 |
+
echo sp_get_post_section( $post->ID );
|
69 |
+
break;
|
70 |
+
case 'sp_config_format':
|
71 |
+
global $post;
|
72 |
+
echo sp_get_post_format( $post->ID );
|
73 |
+
break;
|
74 |
case 'sp_description':
|
75 |
global $post;
|
76 |
echo '<span class="description">' . $post->post_excerpt . '</span>';
|
includes/admin/post-types/class-sp-admin-cpt-player.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @author ThemeBoy
|
6 |
* @category Admin
|
7 |
* @package SportsPress/Admin/Post_Types
|
8 |
-
* @version 1.
|
9 |
*/
|
10 |
|
11 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
@@ -126,14 +126,16 @@ class SP_Admin_CPT_Player extends SP_Admin_CPT {
|
|
126 |
if ( $typenow != 'sp_player' )
|
127 |
return;
|
128 |
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
|
|
|
|
137 |
|
138 |
$selected = isset( $_REQUEST['team'] ) ? $_REQUEST['team'] : null;
|
139 |
$args = array(
|
@@ -145,23 +147,27 @@ class SP_Admin_CPT_Player extends SP_Admin_CPT {
|
|
145 |
);
|
146 |
wp_dropdown_pages( $args );
|
147 |
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
'
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
|
|
|
|
|
|
|
|
165 |
}
|
166 |
|
167 |
/**
|
5 |
* @author ThemeBoy
|
6 |
* @category Admin
|
7 |
* @package SportsPress/Admin/Post_Types
|
8 |
+
* @version 1.9
|
9 |
*/
|
10 |
|
11 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
126 |
if ( $typenow != 'sp_player' )
|
127 |
return;
|
128 |
|
129 |
+
if ( taxonomy_exists( 'sp_position' ) ):
|
130 |
+
$selected = isset( $_REQUEST['sp_position'] ) ? $_REQUEST['sp_position'] : null;
|
131 |
+
$args = array(
|
132 |
+
'show_option_all' => __( 'Show all positions', 'sportspress' ),
|
133 |
+
'taxonomy' => 'sp_position',
|
134 |
+
'name' => 'sp_position',
|
135 |
+
'selected' => $selected
|
136 |
+
);
|
137 |
+
sp_dropdown_taxonomies( $args );
|
138 |
+
endif;
|
139 |
|
140 |
$selected = isset( $_REQUEST['team'] ) ? $_REQUEST['team'] : null;
|
141 |
$args = array(
|
147 |
);
|
148 |
wp_dropdown_pages( $args );
|
149 |
|
150 |
+
if ( taxonomy_exists( 'sp_league' ) ):
|
151 |
+
$selected = isset( $_REQUEST['sp_league'] ) ? $_REQUEST['sp_league'] : null;
|
152 |
+
$args = array(
|
153 |
+
'show_option_all' => __( 'Show all competitions', 'sportspress' ),
|
154 |
+
'taxonomy' => 'sp_league',
|
155 |
+
'name' => 'sp_league',
|
156 |
+
'selected' => $selected
|
157 |
+
);
|
158 |
+
sp_dropdown_taxonomies( $args );
|
159 |
+
endif;
|
160 |
+
|
161 |
+
if ( taxonomy_exists( 'sp_season' ) ):
|
162 |
+
$selected = isset( $_REQUEST['sp_season'] ) ? $_REQUEST['sp_season'] : null;
|
163 |
+
$args = array(
|
164 |
+
'show_option_all' => __( 'Show all seasons', 'sportspress' ),
|
165 |
+
'taxonomy' => 'sp_season',
|
166 |
+
'name' => 'sp_season',
|
167 |
+
'selected' => $selected
|
168 |
+
);
|
169 |
+
sp_dropdown_taxonomies( $args );
|
170 |
+
endif;
|
171 |
}
|
172 |
|
173 |
/**
|
includes/admin/post-types/class-sp-admin-cpt-table.php
CHANGED
@@ -66,8 +66,13 @@ class SP_Admin_CPT_Table extends SP_Admin_CPT {
|
|
66 |
echo get_the_terms ( $post_id, 'sp_season' ) ? the_terms( $post_id, 'sp_season' ) : '—';
|
67 |
break;
|
68 |
case 'sp_team':
|
69 |
-
$
|
70 |
-
|
|
|
|
|
|
|
|
|
|
|
71 |
break;
|
72 |
endswitch;
|
73 |
}
|
66 |
echo get_the_terms ( $post_id, 'sp_season' ) ? the_terms( $post_id, 'sp_season' ) : '—';
|
67 |
break;
|
68 |
case 'sp_team':
|
69 |
+
$select = get_post_meta( $post_id, 'sp_select', true );
|
70 |
+
if ( 'manual' == $select ):
|
71 |
+
$teams = array_filter( get_post_meta( $post_id, 'sp_team' ) );
|
72 |
+
echo sizeof( $teams );
|
73 |
+
else:
|
74 |
+
_e( 'Auto', 'sportspress' );
|
75 |
+
endif;
|
76 |
break;
|
77 |
endswitch;
|
78 |
}
|
includes/admin/post-types/class-sp-admin-cpt-team.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @author ThemeBoy
|
6 |
* @category Admin
|
7 |
* @package SportsPress/Admin/Post_Types
|
8 |
-
* @version 1.
|
9 |
*/
|
10 |
|
11 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
@@ -82,11 +82,11 @@ class SP_Admin_CPT_Team extends SP_Admin_CPT {
|
|
82 |
echo has_post_thumbnail( $post_id ) ? edit_post_link( get_the_post_thumbnail( $post_id, 'sportspress-fit-mini' ), '', '', $post_id ) : '';
|
83 |
break;
|
84 |
case 'sp_url':
|
85 |
-
echo sp_get_url( $post_id );
|
86 |
break;
|
87 |
case 'sp_abbreviation':
|
88 |
$abbreviation = get_post_meta ( $post_id, 'sp_abbreviation', true );
|
89 |
-
echo $abbreviation ? $abbreviation : '—';
|
90 |
break;
|
91 |
case 'sp_league':
|
92 |
echo get_the_terms ( $post_id, 'sp_league' ) ? the_terms( $post_id, 'sp_league' ) : '—';
|
5 |
* @author ThemeBoy
|
6 |
* @category Admin
|
7 |
* @package SportsPress/Admin/Post_Types
|
8 |
+
* @version 1.9.8
|
9 |
*/
|
10 |
|
11 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
82 |
echo has_post_thumbnail( $post_id ) ? edit_post_link( get_the_post_thumbnail( $post_id, 'sportspress-fit-mini' ), '', '', $post_id ) : '';
|
83 |
break;
|
84 |
case 'sp_url':
|
85 |
+
echo strip_tags( sp_get_url( $post_id ), '<a>' );
|
86 |
break;
|
87 |
case 'sp_abbreviation':
|
88 |
$abbreviation = get_post_meta ( $post_id, 'sp_abbreviation', true );
|
89 |
+
echo $abbreviation ? esc_html( $abbreviation ) : '—';
|
90 |
break;
|
91 |
case 'sp_league':
|
92 |
echo get_the_terms ( $post_id, 'sp_league' ) ? the_terms( $post_id, 'sp_league' ) : '—';
|
includes/admin/post-types/class-sp-admin-meta-boxes.php
CHANGED
@@ -7,7 +7,7 @@
|
|
7 |
* @author ThemeBoy
|
8 |
* @category Admin
|
9 |
* @package SportsPress/Admin/Meta_Boxes
|
10 |
-
* @version 1.
|
11 |
*/
|
12 |
|
13 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
@@ -41,6 +41,13 @@ class SP_Admin_Meta_Boxes {
|
|
41 |
'title' => __( 'Details', 'sportspress' ),
|
42 |
'save' => 'SP_Meta_Box_Result_Details::save',
|
43 |
'output' => 'SP_Meta_Box_Result_Details::output',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
'context' => 'normal',
|
45 |
'priority' => 'high',
|
46 |
),
|
@@ -131,7 +138,7 @@ class SP_Admin_Meta_Boxes {
|
|
131 |
'priority' => 'high',
|
132 |
),
|
133 |
'performance' => array(
|
134 |
-
'title' => __( '
|
135 |
'save' => 'SP_Meta_Box_Event_Performance::save',
|
136 |
'output' => 'SP_Meta_Box_Event_Performance::output',
|
137 |
'context' => 'normal',
|
@@ -158,6 +165,13 @@ class SP_Admin_Meta_Boxes {
|
|
158 |
'context' => 'normal',
|
159 |
'priority' => 'low',
|
160 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
161 |
),
|
162 |
'sp_player' => array(
|
163 |
'shortcode' => array(
|
@@ -287,6 +301,18 @@ class SP_Admin_Meta_Boxes {
|
|
287 |
public function rename_meta_boxes() {
|
288 |
remove_meta_box( 'submitdiv', 'sp_event', 'side' );
|
289 |
add_meta_box( 'submitdiv', __( 'Event', 'sportspress' ), 'post_submit_meta_box', 'sp_event', 'side', 'high' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
290 |
}
|
291 |
|
292 |
/**
|
@@ -301,7 +327,7 @@ class SP_Admin_Meta_Boxes {
|
|
301 |
if ( is_int( wp_is_post_revision( $post ) ) ) return;
|
302 |
if ( is_int( wp_is_post_autosave( $post ) ) ) return;
|
303 |
if ( empty( $_POST['sportspress_meta_nonce'] ) || ! wp_verify_nonce( $_POST['sportspress_meta_nonce'], 'sportspress_save_data' ) ) return;
|
304 |
-
if ( ! current_user_can( 'edit_post', $post_id ) ) return;
|
305 |
if ( ! is_sp_post_type( $post->post_type ) && ! is_sp_config_type( $post->post_type ) ) return;
|
306 |
|
307 |
do_action( 'sportspress_process_' . $post->post_type . '_meta', $post_id, $post );
|
7 |
* @author ThemeBoy
|
8 |
* @category Admin
|
9 |
* @package SportsPress/Admin/Meta_Boxes
|
10 |
+
* @version 1.9.13
|
11 |
*/
|
12 |
|
13 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
41 |
'title' => __( 'Details', 'sportspress' ),
|
42 |
'save' => 'SP_Meta_Box_Result_Details::save',
|
43 |
'output' => 'SP_Meta_Box_Result_Details::output',
|
44 |
+
'context' => 'side',
|
45 |
+
'priority' => 'default',
|
46 |
+
),
|
47 |
+
'equation' => array(
|
48 |
+
'title' => __( 'Equation', 'sportspress' ),
|
49 |
+
'save' => 'SP_Meta_Box_Result_Equation::save',
|
50 |
+
'output' => 'SP_Meta_Box_Result_Equation::output',
|
51 |
'context' => 'normal',
|
52 |
'priority' => 'high',
|
53 |
),
|
138 |
'priority' => 'high',
|
139 |
),
|
140 |
'performance' => array(
|
141 |
+
'title' => __( 'Scorecard', 'sportspress' ),
|
142 |
'save' => 'SP_Meta_Box_Event_Performance::save',
|
143 |
'output' => 'SP_Meta_Box_Event_Performance::output',
|
144 |
'context' => 'normal',
|
165 |
'context' => 'normal',
|
166 |
'priority' => 'low',
|
167 |
),
|
168 |
+
'staff' => array(
|
169 |
+
'title' => __( 'Staff', 'sportspress' ),
|
170 |
+
'save' => 'SP_Meta_Box_Team_Staff::save',
|
171 |
+
'output' => 'SP_Meta_Box_Team_Staff::output',
|
172 |
+
'context' => 'normal',
|
173 |
+
'priority' => 'high',
|
174 |
+
),
|
175 |
),
|
176 |
'sp_player' => array(
|
177 |
'shortcode' => array(
|
301 |
public function rename_meta_boxes() {
|
302 |
remove_meta_box( 'submitdiv', 'sp_event', 'side' );
|
303 |
add_meta_box( 'submitdiv', __( 'Event', 'sportspress' ), 'post_submit_meta_box', 'sp_event', 'side', 'high' );
|
304 |
+
|
305 |
+
remove_meta_box( 'postimagediv', 'sp_team', 'side' );
|
306 |
+
add_meta_box( 'postimagediv', __( 'Logo', 'sportspress' ), 'post_thumbnail_meta_box', 'sp_team', 'side', 'low' );
|
307 |
+
|
308 |
+
remove_meta_box( 'postimagediv', 'sp_player', 'side' );
|
309 |
+
add_meta_box( 'postimagediv', __( 'Photo', 'sportspress' ), 'post_thumbnail_meta_box', 'sp_player', 'side', 'low' );
|
310 |
+
|
311 |
+
remove_meta_box( 'postimagediv', 'sp_staff', 'side' );
|
312 |
+
add_meta_box( 'postimagediv', __( 'Photo', 'sportspress' ), 'post_thumbnail_meta_box', 'sp_staff', 'side', 'low' );
|
313 |
+
|
314 |
+
remove_meta_box( 'postimagediv', 'sp_performance', 'side' );
|
315 |
+
add_meta_box( 'postimagediv', __( 'Icon', 'sportspress' ), 'post_thumbnail_meta_box', 'sp_performance', 'side', 'low' );
|
316 |
}
|
317 |
|
318 |
/**
|
327 |
if ( is_int( wp_is_post_revision( $post ) ) ) return;
|
328 |
if ( is_int( wp_is_post_autosave( $post ) ) ) return;
|
329 |
if ( empty( $_POST['sportspress_meta_nonce'] ) || ! wp_verify_nonce( $_POST['sportspress_meta_nonce'], 'sportspress_save_data' ) ) return;
|
330 |
+
if ( ! apply_filters( 'sportspress_user_can', current_user_can( 'edit_post', $post_id ), $post_id ) ) return;
|
331 |
if ( ! is_sp_post_type( $post->post_type ) && ! is_sp_config_type( $post->post_type ) ) return;
|
332 |
|
333 |
do_action( 'sportspress_process_' . $post->post_type . '_meta', $post_id, $post );
|
includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-data.php
CHANGED
@@ -146,6 +146,7 @@ class SP_Meta_Box_Calendar_Data {
|
|
146 |
endif;
|
147 |
|
148 |
if ( $team_result != null ):
|
|
|
149 |
$main_results[] = $team_result;
|
150 |
unset( $team_results['outcome'] );
|
151 |
$team_results = implode( ' | ', $team_results );
|
146 |
endif;
|
147 |
|
148 |
if ( $team_result != null ):
|
149 |
+
$team_result = apply_filters( 'sportspress_calendar_team_result_admin', $team_result, $event->ID, $team );
|
150 |
$main_results[] = $team_result;
|
151 |
unset( $team_results['outcome'] );
|
152 |
$team_results = implode( ' | ', $team_results );
|
includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-details.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @author ThemeBoy
|
6 |
* @category Admin
|
7 |
* @package SportsPress/Admin/Meta_Boxes
|
8 |
-
* @version 1.
|
9 |
*/
|
10 |
|
11 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
@@ -20,6 +20,7 @@ class SP_Meta_Box_Calendar_Details {
|
|
20 |
*/
|
21 |
public static function output( $post ) {
|
22 |
$taxonomies = get_object_taxonomies( 'sp_calendar' );
|
|
|
23 |
$status = get_post_meta( $post->ID, 'sp_status', true );
|
24 |
$date = get_post_meta( $post->ID, 'sp_date', true );
|
25 |
$date_from = get_post_meta( $post->ID, 'sp_date_from', true );
|
@@ -29,6 +30,9 @@ class SP_Meta_Box_Calendar_Details {
|
|
29 |
$order = get_post_meta( $post->ID, 'sp_order', true );
|
30 |
?>
|
31 |
<div>
|
|
|
|
|
|
|
32 |
<p><strong><?php _e( 'Status', 'sportspress' ); ?></strong></p>
|
33 |
<p>
|
34 |
<?php
|
@@ -96,6 +100,7 @@ class SP_Meta_Box_Calendar_Details {
|
|
96 |
* Save meta box data
|
97 |
*/
|
98 |
public static function save( $post_id, $post ) {
|
|
|
99 |
update_post_meta( $post_id, 'sp_status', sp_array_value( $_POST, 'sp_status', 0 ) );
|
100 |
update_post_meta( $post_id, 'sp_date', sp_array_value( $_POST, 'sp_date', 0 ) );
|
101 |
update_post_meta( $post_id, 'sp_date_from', sp_array_value( $_POST, 'sp_date_from', null ) );
|
5 |
* @author ThemeBoy
|
6 |
* @category Admin
|
7 |
* @package SportsPress/Admin/Meta_Boxes
|
8 |
+
* @version 1.9.8
|
9 |
*/
|
10 |
|
11 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
20 |
*/
|
21 |
public static function output( $post ) {
|
22 |
$taxonomies = get_object_taxonomies( 'sp_calendar' );
|
23 |
+
$caption = get_post_meta( $post->ID, 'sp_caption', true );
|
24 |
$status = get_post_meta( $post->ID, 'sp_status', true );
|
25 |
$date = get_post_meta( $post->ID, 'sp_date', true );
|
26 |
$date_from = get_post_meta( $post->ID, 'sp_date_from', true );
|
30 |
$order = get_post_meta( $post->ID, 'sp_order', true );
|
31 |
?>
|
32 |
<div>
|
33 |
+
<p><strong><?php _e( 'Heading', 'sportspress' ); ?></strong></p>
|
34 |
+
<p><input type="text" id="sp_caption" name="sp_caption" value="<?php echo esc_attr( $caption ); ?>" placeholder="<?php echo esc_attr( get_the_title() ); ?>"></p>
|
35 |
+
|
36 |
<p><strong><?php _e( 'Status', 'sportspress' ); ?></strong></p>
|
37 |
<p>
|
38 |
<?php
|
100 |
* Save meta box data
|
101 |
*/
|
102 |
public static function save( $post_id, $post ) {
|
103 |
+
update_post_meta( $post_id, 'sp_caption', esc_attr( sp_array_value( $_POST, 'sp_caption', 0 ) ) );
|
104 |
update_post_meta( $post_id, 'sp_status', sp_array_value( $_POST, 'sp_status', 0 ) );
|
105 |
update_post_meta( $post_id, 'sp_date', sp_array_value( $_POST, 'sp_date', 0 ) );
|
106 |
update_post_meta( $post_id, 'sp_date_from', sp_array_value( $_POST, 'sp_date_from', null ) );
|
includes/admin/post-types/meta-boxes/class-sp-meta-box-column-equation.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @author ThemeBoy
|
6 |
* @category Admin
|
7 |
* @package SportsPress/Admin/Meta_Boxes
|
8 |
-
* @version 1.
|
9 |
*/
|
10 |
|
11 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
@@ -23,6 +23,6 @@ class SP_Meta_Box_Column_Equation extends SP_Meta_Box_Equation {
|
|
23 |
*/
|
24 |
public static function output( $post ) {
|
25 |
$equation = get_post_meta( $post->ID, 'sp_equation', true );
|
26 |
-
self::builder( $post->post_title, $equation, array( 'team_event', 'outcome', 'result' ) );
|
27 |
}
|
28 |
}
|
5 |
* @author ThemeBoy
|
6 |
* @category Admin
|
7 |
* @package SportsPress/Admin/Meta_Boxes
|
8 |
+
* @version 1.9.4
|
9 |
*/
|
10 |
|
11 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
23 |
*/
|
24 |
public static function output( $post ) {
|
25 |
$equation = get_post_meta( $post->ID, 'sp_equation', true );
|
26 |
+
self::builder( $post->post_title, $equation, array( 'team_event', 'outcome', 'result', 'subset', 'preset' ) );
|
27 |
}
|
28 |
}
|
includes/admin/post-types/meta-boxes/class-sp-meta-box-equation.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @author ThemeBoy
|
6 |
* @category Admin
|
7 |
* @package SportsPress/Admin/Meta_Boxes
|
8 |
-
* @version 1.
|
9 |
*/
|
10 |
|
11 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
@@ -41,12 +41,12 @@ class SP_Meta_Box_Equation {
|
|
41 |
break;
|
42 |
case 'outcome':
|
43 |
$options[ 'Outcomes' ] = self::optgroup( 'sp_outcome' );
|
44 |
-
|
45 |
-
|
46 |
-
$options[ '
|
47 |
-
|
48 |
-
|
49 |
-
$options[ '
|
50 |
break;
|
51 |
case 'performance':
|
52 |
$options[ 'Performance' ] = self::optgroup( 'sp_performance' );
|
@@ -93,6 +93,7 @@ class SP_Meta_Box_Equation {
|
|
93 |
<div class="sp-equation">
|
94 |
<span class="sp-equation-variable"><?php echo $title; ?> = </span>
|
95 |
<span class="sp-equation-formula"><?php
|
|
|
96 |
if ( $equation !== '' ):
|
97 |
$equation = explode( ' ', $equation );
|
98 |
foreach ( $equation as $part ):
|
@@ -151,7 +152,9 @@ class SP_Meta_Box_Equation {
|
|
151 |
* @return null
|
152 |
*/
|
153 |
public static function equation_part_labels() {
|
|
|
154 |
__( 'Operators', 'sportspress' );
|
|
|
155 |
__( 'Constants', 'sportspress' );
|
156 |
}
|
157 |
}
|
5 |
* @author ThemeBoy
|
6 |
* @category Admin
|
7 |
* @package SportsPress/Admin/Meta_Boxes
|
8 |
+
* @version 1.9.19
|
9 |
*/
|
10 |
|
11 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
41 |
break;
|
42 |
case 'outcome':
|
43 |
$options[ 'Outcomes' ] = self::optgroup( 'sp_outcome' );
|
44 |
+
break;
|
45 |
+
case 'preset':
|
46 |
+
$options[ 'Presets' ] = array( '$gamesback' => __( 'Games Back', 'sportspress' ), '$homerecord' => __( 'Home Record', 'sportspress' ), '$awayrecord' => __( 'Away Record', 'sportspress' ), '$streak' => __( 'Streak', 'sportspress' ), '$last5' => __( 'Last 5', 'sportspress' ), '$last10' => __( 'Last 10', 'sportspress' ) );
|
47 |
+
break;
|
48 |
+
case 'subset':
|
49 |
+
$options[ 'Subsets' ] = array( '_home' => '@' . __( 'Home', 'sportspress' ), '_away' => '@' . __( 'Away', 'sportspress' ), '_venue' => '@' . __( 'Venue', 'sportspress' ) );
|
50 |
break;
|
51 |
case 'performance':
|
52 |
$options[ 'Performance' ] = self::optgroup( 'sp_performance' );
|
93 |
<div class="sp-equation">
|
94 |
<span class="sp-equation-variable"><?php echo $title; ?> = </span>
|
95 |
<span class="sp-equation-formula"><?php
|
96 |
+
$equation = trim( $equation );
|
97 |
if ( $equation !== '' ):
|
98 |
$equation = explode( ' ', $equation );
|
99 |
foreach ( $equation as $part ):
|
152 |
* @return null
|
153 |
*/
|
154 |
public static function equation_part_labels() {
|
155 |
+
__( 'Presets', 'sportspress' );
|
156 |
__( 'Operators', 'sportspress' );
|
157 |
+
__( 'Subsets', 'sportspress' );
|
158 |
__( 'Constants', 'sportspress' );
|
159 |
}
|
160 |
}
|
includes/admin/post-types/meta-boxes/class-sp-meta-box-event-details.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @author ThemeBoy
|
6 |
* @category Admin
|
7 |
* @package SportsPress/Admin/Meta_Boxes
|
8 |
-
* @version 1.7
|
9 |
*/
|
10 |
|
11 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
@@ -22,17 +22,18 @@ class SP_Meta_Box_Event_Details {
|
|
22 |
$taxonomies = get_object_taxonomies( 'sp_event' );
|
23 |
$minutes = get_post_meta( $post->ID, 'sp_minutes', true );
|
24 |
?>
|
|
|
25 |
<div class="sp-event-minutes-field">
|
26 |
<p><strong><?php _e( 'Full Time', 'sportspress' ); ?></strong></p>
|
27 |
<p>
|
28 |
-
<input name="sp_minutes" type="number" step="1" min="0" class="small-text" placeholder="<?php echo get_option( 'sportspress_event_minutes', 90 ); ?>" value="<?php echo $minutes; ?>">
|
29 |
<?php _e( 'mins', 'sportspress' ); ?>
|
30 |
</p>
|
31 |
</div>
|
32 |
<?php
|
33 |
foreach ( $taxonomies as $taxonomy ) {
|
34 |
if ( 'sp_venue' == $taxonomy ) continue;
|
35 |
-
sp_taxonomy_field( $taxonomy, $post, true );
|
36 |
}
|
37 |
?>
|
38 |
<div class="sp-event-sp_venue-field">
|
5 |
* @author ThemeBoy
|
6 |
* @category Admin
|
7 |
* @package SportsPress/Admin/Meta_Boxes
|
8 |
+
* @version 1.9.7
|
9 |
*/
|
10 |
|
11 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
22 |
$taxonomies = get_object_taxonomies( 'sp_event' );
|
23 |
$minutes = get_post_meta( $post->ID, 'sp_minutes', true );
|
24 |
?>
|
25 |
+
<?php do_action( 'sportspress_event_details_meta_box', $post ); ?>
|
26 |
<div class="sp-event-minutes-field">
|
27 |
<p><strong><?php _e( 'Full Time', 'sportspress' ); ?></strong></p>
|
28 |
<p>
|
29 |
+
<input name="sp_minutes" type="number" step="1" min="0" class="small-text" placeholder="<?php echo get_option( 'sportspress_event_minutes', 90 ); ?>" value="<?php echo esc_attr( $minutes ); ?>">
|
30 |
<?php _e( 'mins', 'sportspress' ); ?>
|
31 |
</p>
|
32 |
</div>
|
33 |
<?php
|
34 |
foreach ( $taxonomies as $taxonomy ) {
|
35 |
if ( 'sp_venue' == $taxonomy ) continue;
|
36 |
+
sp_taxonomy_field( $taxonomy, $post, true, true );
|
37 |
}
|
38 |
?>
|
39 |
<div class="sp-event-sp_venue-field">
|
includes/admin/post-types/meta-boxes/class-sp-meta-box-event-performance.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @author ThemeBoy
|
6 |
* @category Admin
|
7 |
* @package SportsPress/Admin/Meta_Boxes
|
8 |
-
* @version 1.
|
9 |
*/
|
10 |
|
11 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
@@ -20,48 +20,47 @@ class SP_Meta_Box_Event_Performance {
|
|
20 |
*/
|
21 |
public static function output( $post ) {
|
22 |
$event = new SP_Event( $post );
|
23 |
-
list( $labels, $columns, $stats, $teams ) = $event->performance( true );
|
24 |
|
25 |
-
|
|
|
|
|
|
|
|
|
26 |
|
27 |
-
|
28 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
|
47 |
-
|
48 |
-
if ( 'yes' == get_option( 'sportspress_event_split_players_by_position', 'no' ) )
|
49 |
-
$split_positions = true;
|
50 |
-
else
|
51 |
-
$split_positions = false;
|
52 |
-
|
53 |
-
?>
|
54 |
-
<div>
|
55 |
-
<?php if ( $team_id ): ?>
|
56 |
-
<p><strong><?php echo get_the_title( $team_id ); ?></strong></p>
|
57 |
-
<?php elseif ( $i ): ?>
|
58 |
-
<br>
|
59 |
-
<?php endif; ?>
|
60 |
-
<?php self::table( $labels, $columns, $data, $team_id, $has_checkboxes, $show_extras, $split_positions ); ?>
|
61 |
-
</div>
|
62 |
-
<?php
|
63 |
-
$i ++;
|
64 |
-
endforeach;
|
65 |
}
|
66 |
|
67 |
/**
|
@@ -70,148 +69,157 @@ class SP_Meta_Box_Event_Performance {
|
|
70 |
public static function save( $post_id, $post ) {
|
71 |
update_post_meta( $post_id, 'sp_players', sp_array_value( $_POST, 'sp_players', array() ) );
|
72 |
update_post_meta( $post_id, 'sp_columns', sp_array_value( $_POST, 'sp_columns', array() ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
}
|
74 |
|
75 |
/**
|
76 |
* Admin edit table
|
77 |
*/
|
78 |
-
public static function table( $labels = array(), $columns = array(), $data = array(), $team_id, $has_checkboxes = false, $
|
79 |
?>
|
80 |
<div class="sp-data-table-container">
|
81 |
<table class="widefat sp-data-table sp-performance-table sp-sortable-table">
|
82 |
-
|
83 |
-
|
84 |
-
<th class="icon"> </th>
|
85 |
-
<th>#</th>
|
86 |
-
<th><?php _e( 'Player', 'sportspress' ); ?></th>
|
87 |
-
<th class="column-position">
|
88 |
-
<?php _e( 'Position', 'sportspress' ); ?>
|
89 |
-
</th>
|
90 |
-
<?php foreach ( $labels as $key => $label ): ?>
|
91 |
-
<th>
|
92 |
-
<?php if ( $has_checkboxes ): ?>
|
93 |
-
<label for="sp_columns_<?php echo $key; ?>">
|
94 |
-
<input type="checkbox" name="sp_columns[]" value="<?php echo $key; ?>" id="sp_columns_<?php echo $key; ?>" <?php checked( ! is_array( $columns ) || in_array( $key, $columns ) ); ?>>
|
95 |
-
<?php echo $label; ?>
|
96 |
-
</label>
|
97 |
-
<?php else: ?>
|
98 |
-
<?php echo $label; ?>
|
99 |
-
<?php endif; ?>
|
100 |
-
</th>
|
101 |
-
<?php endforeach; ?>
|
102 |
-
<?php if ( $team_id ): ?>
|
103 |
-
<th>
|
104 |
-
<?php _e( 'Status', 'sportspress' ); ?>
|
105 |
-
</th>
|
106 |
-
<?php else: ?>
|
107 |
-
<th>
|
108 |
-
<?php _e( 'Outcome', 'sportspress' ); ?>
|
109 |
-
</th>
|
110 |
-
<?php endif; ?>
|
111 |
-
</tr>
|
112 |
-
</thead>
|
113 |
-
<tfoot>
|
114 |
-
<?php if ( $show_extras ) { ?>
|
115 |
-
<tr class="sp-row sp-post sp-extras">
|
116 |
-
<td> </td>
|
117 |
-
<td> </td>
|
118 |
-
<td><strong><?php _e( 'Extras', 'sportspress' ); ?></strong></td>
|
119 |
-
<td> </td>
|
120 |
-
<?php foreach( $labels as $column => $label ):
|
121 |
-
$player_id = -1;
|
122 |
-
$player_performance = sp_array_value( $data, $player_id, array() );
|
123 |
-
$value = sp_array_value( $player_performance, $column, '' );
|
124 |
-
?>
|
125 |
-
<td><input type="text" name="sp_players[<?php echo $team_id; ?>][<?php echo $player_id; ?>][<?php echo $column; ?>]" value="<?php echo $value; ?>" /></td>
|
126 |
-
<?php endforeach; ?>
|
127 |
-
<td> </td>
|
128 |
-
</tr>
|
129 |
-
<?php } ?>
|
130 |
-
<tr class="sp-row sp-total">
|
131 |
-
<td> </td>
|
132 |
-
<td> </td>
|
133 |
-
<td><strong><?php _e( 'Total', 'sportspress' ); ?></strong></td>
|
134 |
-
<td> </td>
|
135 |
-
<?php foreach( $labels as $column => $label ):
|
136 |
-
$player_id = 0;
|
137 |
-
$player_performance = sp_array_value( $data, $player_id, array() );
|
138 |
-
$value = sp_array_value( $player_performance, $column, '' );
|
139 |
-
?>
|
140 |
-
<td><input type="text" name="sp_players[<?php echo $team_id; ?>][<?php echo $player_id; ?>][<?php echo $column; ?>]" placeholder="0" <?php if ( $split_positions ) { ?>readonly="readonly"<?php } else { ?>value="<?php echo $value; ?>"<?php } ?> /></td>
|
141 |
-
<?php endforeach; ?>
|
142 |
-
<td> </td>
|
143 |
-
</tr>
|
144 |
-
</tfoot>
|
145 |
<tbody>
|
146 |
<?php
|
147 |
-
|
148 |
-
|
149 |
-
$
|
150 |
-
$
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
<td>
|
155 |
-
<input class="small-text sp-player-number-input" type="text" name="sp_players[<?php echo $team_id; ?>][<?php echo $player_id; ?>][number]" value="<?php echo $value; ?>" />
|
156 |
-
</td>
|
157 |
-
<td><?php echo get_the_title( $player_id ); ?></td>
|
158 |
-
<td>
|
159 |
-
<?php
|
160 |
-
$selected = (array) sp_array_value( $player_performance, 'position', null );
|
161 |
-
if ( $selected == null ):
|
162 |
-
$selected = (array) sp_get_the_term_id( $player_id, 'sp_position', 0 );
|
163 |
endif;
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
sp_dropdown_taxonomies( $args );
|
176 |
-
?>
|
177 |
-
</td>
|
178 |
-
<?php foreach( $labels as $column => $label ):
|
179 |
-
$value = sp_array_value( $player_performance, $column, '' );
|
180 |
-
?>
|
181 |
-
<td>
|
182 |
-
<input class="sp-player-<?php echo $column; ?>-input" type="text" name="sp_players[<?php echo $team_id; ?>][<?php echo $player_id; ?>][<?php echo $column; ?>]" value="<?php echo $value; ?>" placeholder="0" />
|
183 |
-
</td>
|
184 |
-
<?php endforeach; ?>
|
185 |
-
<?php if ( $team_id ): ?>
|
186 |
-
<td class="sp-status-selector">
|
187 |
-
<?php echo self::status_select( $team_id, $player_id, sp_array_value( $player_performance, 'status', null ) ); ?>
|
188 |
-
<?php echo self::sub_select( $team_id, $player_id, sp_array_value( $player_performance, 'sub', null ), $data ); ?>
|
189 |
-
</td>
|
190 |
-
<?php else: ?>
|
191 |
-
<td>
|
192 |
-
<?php
|
193 |
-
$values = sp_array_value( $player_performance, 'outcome', '' );
|
194 |
-
if ( ! is_array( $values ) )
|
195 |
-
$values = array( $values );
|
196 |
-
|
197 |
-
$args = array(
|
198 |
-
'post_type' => 'sp_outcome',
|
199 |
-
'name' => 'sp_players[' . $team_id . '][' . $player_id . '][outcome][]',
|
200 |
-
'option_none_value' => '',
|
201 |
-
'sort_order' => 'ASC',
|
202 |
-
'sort_column' => 'menu_order',
|
203 |
-
'selected' => $values,
|
204 |
-
'class' => 'sp-outcome',
|
205 |
-
'property' => 'multiple',
|
206 |
-
'chosen' => true,
|
207 |
-
'placeholder' => __( 'None', 'sportspress' ),
|
208 |
-
);
|
209 |
-
sp_dropdown_pages( $args );
|
210 |
-
?>
|
211 |
-
</td>
|
212 |
-
<?php endif; ?>
|
213 |
-
</tr>
|
214 |
-
<?php
|
215 |
endforeach;
|
216 |
?>
|
217 |
</tbody>
|
@@ -220,6 +228,148 @@ class SP_Meta_Box_Event_Performance {
|
|
220 |
<?php
|
221 |
}
|
222 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
223 |
/**
|
224 |
* Status selector
|
225 |
*/
|
@@ -228,10 +378,10 @@ class SP_Meta_Box_Event_Performance {
|
|
228 |
if ( ! $team_id || ! $player_id )
|
229 |
return '—';
|
230 |
|
231 |
-
$options = array(
|
232 |
'lineup' => __( 'Starting Lineup', 'sportspress' ),
|
233 |
'sub' => __( 'Substitute', 'sportspress' ),
|
234 |
-
);
|
235 |
|
236 |
$output = '<select name="sp_players[' . $team_id . '][' . $player_id . '][status]">';
|
237 |
|
5 |
* @author ThemeBoy
|
6 |
* @category Admin
|
7 |
* @package SportsPress/Admin/Meta_Boxes
|
8 |
+
* @version 1.9.19
|
9 |
*/
|
10 |
|
11 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
20 |
*/
|
21 |
public static function output( $post ) {
|
22 |
$event = new SP_Event( $post );
|
23 |
+
list( $labels, $columns, $stats, $teams, $formats, $order ) = $event->performance( true );
|
24 |
|
25 |
+
// Determine if columns are auto or manual
|
26 |
+
if ( 'manual' == get_option( 'sportspress_event_performance_columns', 'auto' ) )
|
27 |
+
$manual = true;
|
28 |
+
else
|
29 |
+
$manual = false;
|
30 |
|
31 |
+
// Determine if we need checkboxes
|
32 |
+
if ( $manual && $i == 0 )
|
33 |
+
$has_checkboxes = true;
|
34 |
+
else
|
35 |
+
$has_checkboxes = false;
|
36 |
+
|
37 |
+
// Get player number option
|
38 |
+
$numbers = 'yes' == get_option( 'sportspress_event_show_player_numbers', 'yes' ) ? true : false;
|
39 |
|
40 |
+
// Get positions
|
41 |
+
$positions = array();
|
42 |
+
if ( 'yes' == get_option( 'sportspress_event_show_position', 'yes' ) && taxonomy_exists( 'sp_position' ) ):
|
43 |
+
$args = array(
|
44 |
+
'hide_empty' => false,
|
45 |
+
'parent' => 0,
|
46 |
+
'include_children' => true,
|
47 |
+
);
|
48 |
+
$positions = get_terms( 'sp_position', $args );
|
49 |
+
endif;
|
50 |
|
51 |
+
// Get status option
|
52 |
+
if ( 'yes' == get_option( 'sportspress_event_show_status', 'yes' ) )
|
53 |
+
$status = true;
|
54 |
+
else
|
55 |
+
$status = false;
|
56 |
|
57 |
+
// Apply filters to labels
|
58 |
+
$labels = apply_filters( 'sportspress_event_performance_labels_admin', $labels );
|
59 |
+
|
60 |
+
// Check if individual mode
|
61 |
+
$is_individual = get_option( 'sportspress_load_individual_mode_module', 'no' ) === 'yes' ? true : false;
|
62 |
|
63 |
+
self::tables( $post->ID, $stats, $labels, $columns, $teams, $has_checkboxes, $positions, $status, $formats, $order, $numbers, $is_individual );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
}
|
65 |
|
66 |
/**
|
69 |
public static function save( $post_id, $post ) {
|
70 |
update_post_meta( $post_id, 'sp_players', sp_array_value( $_POST, 'sp_players', array() ) );
|
71 |
update_post_meta( $post_id, 'sp_columns', sp_array_value( $_POST, 'sp_columns', array() ) );
|
72 |
+
update_post_meta( $post_id, 'sp_order', sp_array_value( $_POST, 'sp_order', array() ) );
|
73 |
+
}
|
74 |
+
|
75 |
+
/**
|
76 |
+
* Admin edit tables
|
77 |
+
*/
|
78 |
+
public static function tables( $post_id, $stats = array(), $labels = array(), $columns = array(), $teams = array(), $has_checkboxes = false, $positions = array(), $status = true, $formats = array(), $order = array(), $numbers = true, $is_individual = false ) {
|
79 |
+
$sections = get_option( 'sportspress_event_performance_sections', -1 );
|
80 |
+
|
81 |
+
if ( $is_individual ) {
|
82 |
+
?>
|
83 |
+
<div class="sp-data-table-container">
|
84 |
+
<table class="widefat sp-data-table sp-performance-table sp-sortable-table">
|
85 |
+
<?php self::header( $columns, $labels, $positions, $has_checkboxes, $status, false, $numbers, -1, $formats ); ?>
|
86 |
+
<?php self::footer( sp_array_value( $stats, -1 ), $labels, 0, $positions, $status, false, $numbers, -1, $formats ); ?>
|
87 |
+
<tbody>
|
88 |
+
<?php
|
89 |
+
foreach ( $teams as $key => $team_id ):
|
90 |
+
if ( -1 == $team_id ) continue;
|
91 |
+
|
92 |
+
// Get results for players in the team
|
93 |
+
$players = sp_array_between( (array)get_post_meta( $post_id, 'sp_player', false ), 0, $key );
|
94 |
+
$players[] = -1;
|
95 |
+
$data = sp_array_combine( $players, sp_array_value( $stats, $team_id, array() ) );
|
96 |
+
|
97 |
+
foreach ( $data as $player_id => $player_performance ):
|
98 |
+
self::row( $labels, $player_id, $player_performance, $team_id, $data, ! empty( $positions ), $status, false, $numbers, -1, $formats );
|
99 |
+
endforeach;
|
100 |
+
endforeach;
|
101 |
+
?>
|
102 |
+
</tbody>
|
103 |
+
</table>
|
104 |
+
</div>
|
105 |
+
<?php
|
106 |
+
} else {
|
107 |
+
$i = 0;
|
108 |
+
|
109 |
+
foreach ( $teams as $key => $team_id ):
|
110 |
+
if ( -1 == $team_id ) continue;
|
111 |
+
|
112 |
+
if ( -1 == $sections ) {
|
113 |
+
// Get results for players in the team
|
114 |
+
$players = sp_array_between( (array)get_post_meta( $post_id, 'sp_player', false ), 0, $key );
|
115 |
+
$players[] = -1;
|
116 |
+
$data = sp_array_combine( $players, sp_array_value( $stats, $team_id, array() ) );
|
117 |
+
?>
|
118 |
+
<div>
|
119 |
+
<p><strong><?php echo get_the_title( $team_id ); ?></strong></p>
|
120 |
+
<?php self::table( $labels, $columns, $data, $team_id, $has_checkboxes, $positions, $status, -1, $formats, $order, $numbers ); ?>
|
121 |
+
<?php do_action( 'sportspress_after_event_performance_table_admin', $labels, $columns, $data, $team_id ); ?>
|
122 |
+
</div>
|
123 |
+
<?php } else { ?>
|
124 |
+
<?php
|
125 |
+
// Get labels by section
|
126 |
+
$args = array(
|
127 |
+
'post_type' => 'sp_performance',
|
128 |
+
'numberposts' => 100,
|
129 |
+
'posts_per_page' => 100,
|
130 |
+
'orderby' => 'menu_order',
|
131 |
+
'order' => 'ASC',
|
132 |
+
);
|
133 |
+
|
134 |
+
$columns = get_posts( $args );
|
135 |
+
|
136 |
+
$labels = array( array(), array() );
|
137 |
+
foreach ( $columns as $column ):
|
138 |
+
$section = get_post_meta( $column->ID, 'sp_section', true );
|
139 |
+
if ( '' === $section ) {
|
140 |
+
$section = -1;
|
141 |
+
}
|
142 |
+
switch ( $section ):
|
143 |
+
case 1:
|
144 |
+
$labels[1][ $column->post_name ] = $column->post_title;
|
145 |
+
break;
|
146 |
+
default:
|
147 |
+
$labels[0][ $column->post_name ] = $column->post_title;
|
148 |
+
endswitch;
|
149 |
+
endforeach;
|
150 |
+
|
151 |
+
$offense = (array)get_post_meta( $post_id, 'sp_offense', false );
|
152 |
+
$defense = (array)get_post_meta( $post_id, 'sp_defense', false );
|
153 |
+
$data = array();
|
154 |
+
if ( sizeof( $offense ) || sizeof( $defense ) ) {
|
155 |
+
// Get results for offensive players in the team
|
156 |
+
$offense = sp_array_between( $offense, 0, $key );
|
157 |
+
$offense[] = -1;
|
158 |
+
$data[0] = sp_array_combine( $offense, sp_array_value( $stats, $team_id, array() ) );
|
159 |
+
|
160 |
+
// Get results for defensive players in the team
|
161 |
+
$defense = sp_array_between( $defense, 0, $key );
|
162 |
+
$defense[] = -1;
|
163 |
+
$data[1] = sp_array_combine( $defense, sp_array_value( $stats, $team_id, array() ) );
|
164 |
+
} else {
|
165 |
+
// Get results for all players in the team
|
166 |
+
$players = sp_array_between( (array)get_post_meta( $post_id, 'sp_player', false ), 0, $key );
|
167 |
+
$players[] = -1;
|
168 |
+
$data[0] = $data[1] = sp_array_combine( $players, sp_array_value( $stats, $team_id, array() ) );
|
169 |
+
}
|
170 |
+
|
171 |
+
// Determine order of sections
|
172 |
+
if ( 1 == $sections ) {
|
173 |
+
$section_order = array( 1 => __( 'Defense', 'sportspress' ), 0 => __( 'Offense', 'sportspress' ) );
|
174 |
+
} else {
|
175 |
+
$section_order = array( __( 'Offense', 'sportspress' ), __( 'Defense', 'sportspress' ) );
|
176 |
+
}
|
177 |
+
|
178 |
+
foreach ( $section_order as $section_id => $section_label ) {
|
179 |
+
?>
|
180 |
+
<div>
|
181 |
+
<p><strong><?php echo get_the_title( $team_id ); ?> — <?php echo $section_label; ?></strong></p>
|
182 |
+
<?php self::table( $labels[ $section_id ], $columns, $data[ $section_id ], $team_id, $has_checkboxes, $positions, $status, $section_id, $formats, $order, $numbers ); ?>
|
183 |
+
<?php do_action( 'sportspress_after_event_performance_table_admin', $labels[ $section_id ], $columns, $data[ $section_id ], $team_id ); ?>
|
184 |
+
</div>
|
185 |
+
<?php
|
186 |
+
}
|
187 |
+
}
|
188 |
+
$i ++;
|
189 |
+
endforeach;
|
190 |
+
}
|
191 |
}
|
192 |
|
193 |
/**
|
194 |
* Admin edit table
|
195 |
*/
|
196 |
+
public static function table( $labels = array(), $columns = array(), $data = array(), $team_id, $has_checkboxes = false, $positions = array(), $status = true, $section = -1, $formats = array(), $order = array(), $numbers = true ) {
|
197 |
?>
|
198 |
<div class="sp-data-table-container">
|
199 |
<table class="widefat sp-data-table sp-performance-table sp-sortable-table">
|
200 |
+
<?php self::header( $columns, $labels, $positions, $has_checkboxes, $status, true, $numbers, $section, $formats ); ?>
|
201 |
+
<?php self::footer( $data, $labels, $team_id, $positions, $status, true, $numbers, $section, $formats ); ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
202 |
<tbody>
|
203 |
<?php
|
204 |
+
if ( 1 == $section && is_array( $order ) && sizeof( $order ) ) {
|
205 |
+
$players = array();
|
206 |
+
$player_order = sp_array_value( $order, $team_id, array() );
|
207 |
+
if ( is_array( $player_order ) && sizeof( $player_order ) ) {
|
208 |
+
foreach ( $player_order as $key ) {
|
209 |
+
if ( array_key_exists( $key, $data ) ):
|
210 |
+
$players[ $key ] = $data[ $key ];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
211 |
endif;
|
212 |
+
}
|
213 |
+
}
|
214 |
+
foreach ( $data as $key => $player ) {
|
215 |
+
if ( ! array_key_exists( $key, $players ) ) {
|
216 |
+
$players[ $key ] = $player;
|
217 |
+
}
|
218 |
+
}
|
219 |
+
$data = $players;
|
220 |
+
}
|
221 |
+
foreach ( $data as $player_id => $player_performance ):
|
222 |
+
self::row( $labels, $player_id, $player_performance, $team_id, $data, ! empty( $positions ), $status, true, $numbers, $section, $formats );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
223 |
endforeach;
|
224 |
?>
|
225 |
</tbody>
|
228 |
<?php
|
229 |
}
|
230 |
|
231 |
+
/**
|
232 |
+
* Admin edit table header
|
233 |
+
*/
|
234 |
+
public static function header( $columns = array(), $labels = array(), $positions = array(), $has_checkboxes = false, $status = true, $sortable = true, $numbers = true, $section = -1, $formats = array() ) {
|
235 |
+
?>
|
236 |
+
<thead>
|
237 |
+
<tr>
|
238 |
+
<?php if ( $sortable ) { ?>
|
239 |
+
<th class="icon"> </th>
|
240 |
+
<?php } ?>
|
241 |
+
<?php if ( $numbers ) { ?>
|
242 |
+
<th>#</th>
|
243 |
+
<?php } ?>
|
244 |
+
<th><?php _e( 'Player', 'sportspress' ); ?></th>
|
245 |
+
<?php if ( ! empty( $positions ) ) { ?>
|
246 |
+
<th class="column-position">
|
247 |
+
<?php _e( 'Position', 'sportspress' ); ?>
|
248 |
+
</th>
|
249 |
+
<?php } ?>
|
250 |
+
<?php foreach ( $labels as $key => $label ): ?>
|
251 |
+
<th>
|
252 |
+
<?php if ( $has_checkboxes ): ?>
|
253 |
+
<label for="sp_columns_<?php echo $key; ?>">
|
254 |
+
<input type="checkbox" name="sp_columns[]" value="<?php echo $key; ?>" id="sp_columns_<?php echo $key; ?>" <?php checked( ! is_array( $columns ) || in_array( $key, $columns ) ); ?>>
|
255 |
+
<?php echo $label; ?>
|
256 |
+
</label>
|
257 |
+
<?php else: ?>
|
258 |
+
<?php echo $label; ?>
|
259 |
+
<?php endif; ?>
|
260 |
+
</th>
|
261 |
+
<?php endforeach; ?>
|
262 |
+
<?php if ( $status && 1 !== $section ) { ?>
|
263 |
+
<th>
|
264 |
+
<?php _e( 'Status', 'sportspress' ); ?>
|
265 |
+
</th>
|
266 |
+
<?php } ?>
|
267 |
+
</tr>
|
268 |
+
</thead>
|
269 |
+
<?php
|
270 |
+
}
|
271 |
+
|
272 |
+
/**
|
273 |
+
* Admin edit table footer
|
274 |
+
*/
|
275 |
+
public static function footer( $data = array(), $labels = array(), $team_id = 0, $positions = array(), $status = true, $sortable = true, $numbers = true, $section = -1, $formats = array() ) {
|
276 |
+
?>
|
277 |
+
<tfoot>
|
278 |
+
<?php do_action( 'sportspress_event_performance_meta_box_table_footer', $data, $labels, $team_id, $positions, $status, $sortable, $numbers, $section ); ?>
|
279 |
+
<?php if ( $team_id ) { ?>
|
280 |
+
<tr class="sp-row sp-total">
|
281 |
+
<?php if ( $sortable ) { ?>
|
282 |
+
<td> </td>
|
283 |
+
<?php } ?>
|
284 |
+
<?php if ( $numbers ) { ?>
|
285 |
+
<td> </td>
|
286 |
+
<?php } ?>
|
287 |
+
<td><strong><?php _e( 'Total', 'sportspress' ); ?></strong></td>
|
288 |
+
<?php if ( ! empty( $positions ) ) { ?>
|
289 |
+
<td> </td>
|
290 |
+
<?php } ?>
|
291 |
+
<?php foreach( $labels as $column => $label ):
|
292 |
+
$player_id = 0;
|
293 |
+
$player_performance = sp_array_value( $data, $player_id, array() );
|
294 |
+
$value = sp_array_value( $player_performance, $column, '' );
|
295 |
+
$format = sp_array_value( $formats, $column, 'number' );
|
296 |
+
$placeholder = sp_get_format_placeholder( $format );
|
297 |
+
?>
|
298 |
+
<td><input type="text" name="sp_players[<?php echo $team_id; ?>][<?php echo $player_id; ?>][<?php echo $column; ?>]" placeholder="<?php echo trim( $placeholder ); ?>" value="<?php echo esc_attr( $value ); ?>" data-sp-format="<?php echo $format; ?>" /></td>
|
299 |
+
<?php endforeach; ?>
|
300 |
+
<?php if ( $status && 1 !== $section ) { ?>
|
301 |
+
<td> </td>
|
302 |
+
<?php } ?>
|
303 |
+
</tr>
|
304 |
+
<?php } ?>
|
305 |
+
</tfoot>
|
306 |
+
<?php
|
307 |
+
}
|
308 |
+
|
309 |
+
/**
|
310 |
+
* Admin edit table row
|
311 |
+
*/
|
312 |
+
public static function row( $labels = array(), $player_id = 0, $player_performance = array(), $team_id = 0, $data = array(), $positions = true, $status = true, $sortable = true, $numbers = true, $section = -1, $formats = array() ) {
|
313 |
+
if ( $player_id <= 0 ) return;
|
314 |
+
|
315 |
+
$number = get_post_meta( $player_id, 'sp_number', true );
|
316 |
+
$value = sp_array_value( $player_performance, 'number', '' );
|
317 |
+
?>
|
318 |
+
<tr class="sp-row sp-post" data-player="<?php echo $player_id; ?>">
|
319 |
+
<?php if ( $sortable ) { ?>
|
320 |
+
<td class="icon"><span class="dashicons dashicons-menu post-state-format"></span></td>
|
321 |
+
<?php } ?>
|
322 |
+
<?php if ( $numbers ) { ?>
|
323 |
+
<td>
|
324 |
+
<input class="small-text sp-player-number-input" type="text" name="sp_players[<?php echo $team_id; ?>][<?php echo $player_id; ?>][number]" value="<?php echo esc_attr( $value ); ?>" />
|
325 |
+
</td>
|
326 |
+
<?php } ?>
|
327 |
+
<td>
|
328 |
+
<?php echo get_the_title( $player_id ); ?>
|
329 |
+
<?php if ( 1 == $section ) { ?>
|
330 |
+
<input type="hidden" name="sp_order[<?php echo $team_id; ?>][]" value="<?php echo $player_id; ?>">
|
331 |
+
<?php } ?>
|
332 |
+
</td>
|
333 |
+
<?php if ( $positions ) { ?>
|
334 |
+
<td>
|
335 |
+
<?php
|
336 |
+
$selected = (array) sp_array_value( $player_performance, 'position', null );
|
337 |
+
if ( $selected == null ):
|
338 |
+
$selected = (array) sp_get_the_term_id( $player_id, 'sp_position', 0 );
|
339 |
+
endif;
|
340 |
+
$args = array(
|
341 |
+
'taxonomy' => 'sp_position',
|
342 |
+
'name' => 'sp_players[' . $team_id . '][' . $player_id . '][position][]',
|
343 |
+
'values' => 'term_id',
|
344 |
+
'orderby' => 'slug',
|
345 |
+
'selected' => $selected,
|
346 |
+
'class' => 'sp-position',
|
347 |
+
'property' => 'multiple',
|
348 |
+
'chosen' => true,
|
349 |
+
'include_children' => ( 'no' == get_option( 'sportspress_event_hide_child_positions', 'no' ) ),
|
350 |
+
);
|
351 |
+
sp_dropdown_taxonomies( $args );
|
352 |
+
?>
|
353 |
+
</td>
|
354 |
+
<?php } ?>
|
355 |
+
<?php foreach( $labels as $column => $label ):
|
356 |
+
$value = sp_array_value( $player_performance, $column, '' );
|
357 |
+
$placeholder = sp_get_format_placeholder( sp_array_value( $formats, $column, 'number' ) );
|
358 |
+
?>
|
359 |
+
<td>
|
360 |
+
<input class="sp-player-<?php echo $column; ?>-input" type="text" name="sp_players[<?php echo $team_id; ?>][<?php echo $player_id; ?>][<?php echo $column; ?>]" value="<?php echo esc_attr( $value ); ?>" placeholder="<?php echo $placeholder; ?>" />
|
361 |
+
</td>
|
362 |
+
<?php endforeach; ?>
|
363 |
+
<?php if ( $status && 1 !== $section ) { ?>
|
364 |
+
<td class="sp-status-selector">
|
365 |
+
<?php echo self::status_select( $team_id, $player_id, sp_array_value( $player_performance, 'status', null ) ); ?>
|
366 |
+
<?php echo self::sub_select( $team_id, $player_id, sp_array_value( $player_performance, 'sub', null ), $data ); ?>
|
367 |
+
</td>
|
368 |
+
<?php } ?>
|
369 |
+
</tr>
|
370 |
+
<?php
|
371 |
+
}
|
372 |
+
|
373 |
/**
|
374 |
* Status selector
|
375 |
*/
|
378 |
if ( ! $team_id || ! $player_id )
|
379 |
return '—';
|
380 |
|
381 |
+
$options = apply_filters( 'sportspress_event_performance_status_options', array(
|
382 |
'lineup' => __( 'Starting Lineup', 'sportspress' ),
|
383 |
'sub' => __( 'Substitute', 'sportspress' ),
|
384 |
+
) );
|
385 |
|
386 |
$output = '<select name="sp_players[' . $team_id . '][' . $player_id . '][status]">';
|
387 |
|
includes/admin/post-types/meta-boxes/class-sp-meta-box-event-results.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @author ThemeBoy
|
6 |
* @category Admin
|
7 |
* @package SportsPress/Admin/Meta_Boxes
|
8 |
-
* @version 1.7
|
9 |
*/
|
10 |
|
11 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
@@ -37,6 +37,88 @@ class SP_Meta_Box_Event_Results {
|
|
37 |
$results = (array)sp_array_value( $_POST, 'sp_results', array() );
|
38 |
$main_result = get_option( 'sportspress_primary_result', null );
|
39 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
// Auto outcome
|
41 |
$primary_results = array();
|
42 |
foreach ( $results as $team => $team_results ) {
|
@@ -74,40 +156,54 @@ class SP_Meta_Box_Event_Results {
|
|
74 |
}
|
75 |
}
|
76 |
} else {
|
77 |
-
|
78 |
-
$
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
);
|
87 |
-
$outcomes = get_posts( $args );
|
88 |
-
if ( $outcomes ) {
|
89 |
-
$results[ $max ][ 'outcome' ] = array();
|
90 |
-
foreach ( $outcomes as $outcome ) {
|
91 |
-
$results[ $max ][ 'outcome' ][] = $outcome->post_name;
|
92 |
-
}
|
93 |
-
}
|
94 |
-
}
|
95 |
|
96 |
-
|
97 |
-
$
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
109 |
foreach ( $outcomes as $outcome ) {
|
110 |
-
$results[ $
|
111 |
}
|
112 |
}
|
113 |
}
|
@@ -123,6 +219,21 @@ class SP_Meta_Box_Event_Results {
|
|
123 |
* Admin edit table
|
124 |
*/
|
125 |
public static function table( $columns = array(), $usecolumns = array(), $data = array(), $has_checkboxes = false ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
126 |
?>
|
127 |
<div class="sp-data-table-container">
|
128 |
<table class="widefat sp-data-table">
|
@@ -161,7 +272,7 @@ class SP_Meta_Box_Event_Results {
|
|
161 |
<?php foreach( $columns as $column => $label ):
|
162 |
$value = sp_array_value( $team_results, $column, '' );
|
163 |
?>
|
164 |
-
<td><input type="text" name="sp_results[<?php echo $team_id; ?>][<?php echo $column; ?>]" value="<?php echo $value; ?>" /></td>
|
165 |
<?php endforeach; ?>
|
166 |
<td>
|
167 |
<?php
|
5 |
* @author ThemeBoy
|
6 |
* @category Admin
|
7 |
* @package SportsPress/Admin/Meta_Boxes
|
8 |
+
* @version 1.9.7
|
9 |
*/
|
10 |
|
11 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
37 |
$results = (array)sp_array_value( $_POST, 'sp_results', array() );
|
38 |
$main_result = get_option( 'sportspress_primary_result', null );
|
39 |
|
40 |
+
// Get player performance
|
41 |
+
$performance = sp_array_value( $_POST, 'sp_players', array() );
|
42 |
+
|
43 |
+
// Initialize finished
|
44 |
+
$finished = false;
|
45 |
+
|
46 |
+
// Check if any results are recorded
|
47 |
+
foreach ( $results as $team => $team_results ) {
|
48 |
+
foreach ( $team_results as $result ) {
|
49 |
+
if ( '' !== $result ) {
|
50 |
+
$finished = true;
|
51 |
+
break;
|
52 |
+
}
|
53 |
+
}
|
54 |
+
}
|
55 |
+
|
56 |
+
// Check if any performance is recorded
|
57 |
+
if ( ! $finished ) {
|
58 |
+
foreach ( $performance as $team => $players ) {
|
59 |
+
foreach ( $players as $player => $pp ) {
|
60 |
+
if ( 0 >= $player ) continue;
|
61 |
+
foreach ( $pp as $pk => $pv ) {
|
62 |
+
if ( in_array( $pk, apply_filters( 'sportspress_event_auto_result_bypass_keys', array( 'number', 'status', 'sub' ) ) ) ) continue;
|
63 |
+
|
64 |
+
if ( is_array( $pv ) ) continue;
|
65 |
+
|
66 |
+
$pv = trim( $pv );
|
67 |
+
if ( '' == $pv ) continue;
|
68 |
+
if ( ! ctype_digit( $pv ) ) continue;
|
69 |
+
|
70 |
+
$finished = true;
|
71 |
+
break;
|
72 |
+
}
|
73 |
+
}
|
74 |
+
}
|
75 |
+
}
|
76 |
+
|
77 |
+
if ( $finished ) {
|
78 |
+
// Get results with equations
|
79 |
+
$args = array(
|
80 |
+
'post_type' => 'sp_result',
|
81 |
+
'numberposts' => -1,
|
82 |
+
'posts_per_page' => -1,
|
83 |
+
'meta_query' => array(
|
84 |
+
array(
|
85 |
+
'key' => 'sp_equation',
|
86 |
+
'compare' => 'EXISTS',
|
87 |
+
),
|
88 |
+
),
|
89 |
+
);
|
90 |
+
$dynamic_results = get_posts( $args );
|
91 |
+
|
92 |
+
$equations = array();
|
93 |
+
$precision = array();
|
94 |
+
foreach ( $dynamic_results as $result ) {
|
95 |
+
$equations[ $result->post_name ] = get_post_meta( $result->ID, 'sp_equation', true );
|
96 |
+
$precision[ $result->post_name ] = (int) get_post_meta( $result->ID, 'sp_precision', true );
|
97 |
+
}
|
98 |
+
|
99 |
+
|
100 |
+
// Apply equations to empty results
|
101 |
+
foreach ( $equations as $key => $equation ) {
|
102 |
+
if ( '' == $equation ) continue;
|
103 |
+
foreach ( $results as $team => $team_results ) {
|
104 |
+
if ( '' === sp_array_value( $team_results, $key, '' ) ) {
|
105 |
+
$totals = array();
|
106 |
+
$players = sp_array_value( $performance, $team, array() );
|
107 |
+
foreach ( $players as $player => $pp ) {
|
108 |
+
foreach ( $pp as $pk => $pv ) {
|
109 |
+
$value = sp_array_value( $totals, $pk, 0 );
|
110 |
+
$value += floatval( $pv );
|
111 |
+
$totals[ $pk ] = $value;
|
112 |
+
}
|
113 |
+
}
|
114 |
+
$totals[ 'eventsplayed' ] = 1;
|
115 |
+
$totals = apply_filters( 'sportspress_event_result_equation_vars', $totals, $performance, $team );
|
116 |
+
$results[ $team ][ $key ] = sp_solve( $equation, $totals, sp_array_value( $precision, $key, 0 ), '' );
|
117 |
+
}
|
118 |
+
}
|
119 |
+
}
|
120 |
+
}
|
121 |
+
|
122 |
// Auto outcome
|
123 |
$primary_results = array();
|
124 |
foreach ( $results as $team => $team_results ) {
|
156 |
}
|
157 |
}
|
158 |
} else {
|
159 |
+
// Get default outcomes
|
160 |
+
$args = array(
|
161 |
+
'post_type' => 'sp_outcome',
|
162 |
+
'numberposts' => -1,
|
163 |
+
'posts_per_page' => -1,
|
164 |
+
'meta_key' => 'sp_condition',
|
165 |
+
'meta_value' => 'else',
|
166 |
+
);
|
167 |
+
$default_outcomes = get_posts( $args );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
168 |
|
169 |
+
// Get greater than outcomes
|
170 |
+
$args = array(
|
171 |
+
'post_type' => 'sp_outcome',
|
172 |
+
'numberposts' => -1,
|
173 |
+
'posts_per_page' => -1,
|
174 |
+
'meta_key' => 'sp_condition',
|
175 |
+
'meta_value' => '>',
|
176 |
+
);
|
177 |
+
$gt_outcomes = get_posts( $args );
|
178 |
+
if ( empty ( $gt_outcomes ) ) $gt_outcomes = $default_outcomes;
|
179 |
+
|
180 |
+
// Get less than outcomes
|
181 |
+
$args = array(
|
182 |
+
'post_type' => 'sp_outcome',
|
183 |
+
'numberposts' => -1,
|
184 |
+
'posts_per_page' => -1,
|
185 |
+
'meta_key' => 'sp_condition',
|
186 |
+
'meta_value' => '<',
|
187 |
+
);
|
188 |
+
$lt_outcomes = get_posts( $args );
|
189 |
+
if ( empty ( $lt_outcomes ) ) $lt_outcomes = $default_outcomes;
|
190 |
+
|
191 |
+
// Get min and max values
|
192 |
+
$min = min( $primary_results );
|
193 |
+
$max = max( $primary_results );
|
194 |
+
|
195 |
+
foreach ( $primary_results as $key => $value ) {
|
196 |
+
if ( ! array_key_exists( 'outcome', $results[ $key ] ) ) {
|
197 |
+
if ( $min == $value ) {
|
198 |
+
$outcomes = $lt_outcomes;
|
199 |
+
} elseif ( $max == $value ) {
|
200 |
+
$outcomes = $gt_outcomes;
|
201 |
+
} else {
|
202 |
+
$outcomes = $default_outcomes;
|
203 |
+
}
|
204 |
+
$results[ $key ][ 'outcome' ] = array();
|
205 |
foreach ( $outcomes as $outcome ) {
|
206 |
+
$results[ $key ][ 'outcome' ][] = $outcome->post_name;
|
207 |
}
|
208 |
}
|
209 |
}
|
219 |
* Admin edit table
|
220 |
*/
|
221 |
public static function table( $columns = array(), $usecolumns = array(), $data = array(), $has_checkboxes = false ) {
|
222 |
+
// Get results with equations
|
223 |
+
$args = array(
|
224 |
+
'post_type' => 'sp_result',
|
225 |
+
'numberposts' => -1,
|
226 |
+
'posts_per_page' => -1,
|
227 |
+
'meta_query' => array(
|
228 |
+
array(
|
229 |
+
'key' => 'sp_equation',
|
230 |
+
'compare' => 'NOT IN',
|
231 |
+
'value' => null
|
232 |
+
),
|
233 |
+
),
|
234 |
+
);
|
235 |
+
$dynamic_results = get_posts( $args );
|
236 |
+
$auto_columns = wp_list_pluck( $dynamic_results, 'post_name' );
|
237 |
?>
|
238 |
<div class="sp-data-table-container">
|
239 |
<table class="widefat sp-data-table">
|
272 |
<?php foreach( $columns as $column => $label ):
|
273 |
$value = sp_array_value( $team_results, $column, '' );
|
274 |
?>
|
275 |
+
<td><input type="text" name="sp_results[<?php echo $team_id; ?>][<?php echo $column; ?>]" value="<?php echo esc_attr( $value ); ?>"<?php if ( in_array( $column, $auto_columns ) ) { ?> placeholder="<?php _e( '(Auto)', 'sportspress' ); ?>"<?php } ?> /></td>
|
276 |
<?php endforeach; ?>
|
277 |
<td>
|
278 |
<?php
|
includes/admin/post-types/meta-boxes/class-sp-meta-box-event-shortcode.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @author ThemeBoy
|
6 |
* @category Admin
|
7 |
* @package SportsPress/Admin/Meta_Boxes
|
8 |
-
* @version 1.6
|
9 |
*/
|
10 |
|
11 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
@@ -22,7 +22,7 @@ class SP_Meta_Box_Event_Shortcode {
|
|
22 |
$shortcodes = apply_filters( 'sportspress_event_shortcodes', array(
|
23 |
'event_results' => __( 'Results', 'sportspress' ),
|
24 |
'event_details' => __( 'Details', 'sportspress' ),
|
25 |
-
'event_performance' => __( '
|
26 |
) );
|
27 |
if ( $shortcodes ) {
|
28 |
?>
|
5 |
* @author ThemeBoy
|
6 |
* @category Admin
|
7 |
* @package SportsPress/Admin/Meta_Boxes
|
8 |
+
* @version 1.9.6
|
9 |
*/
|
10 |
|
11 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
22 |
$shortcodes = apply_filters( 'sportspress_event_shortcodes', array(
|
23 |
'event_results' => __( 'Results', 'sportspress' ),
|
24 |
'event_details' => __( 'Details', 'sportspress' ),
|
25 |
+
'event_performance' => __( 'Scorecard', 'sportspress' ),
|
26 |
) );
|
27 |
if ( $shortcodes ) {
|
28 |
?>
|
includes/admin/post-types/meta-boxes/class-sp-meta-box-event-teams.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @author ThemeBoy
|
6 |
* @category Admin
|
7 |
* @package SportsPress/Admin/Meta_Boxes
|
8 |
-
* @version 1.
|
9 |
*/
|
10 |
|
11 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
@@ -21,62 +21,121 @@ class SP_Meta_Box_Event_Teams {
|
|
21 |
public static function output( $post ) {
|
22 |
$limit = get_option( 'sportspress_event_teams', 2 );
|
23 |
$teams = (array) get_post_meta( $post->ID, 'sp_team', false );
|
24 |
-
|
25 |
-
$
|
26 |
-
|
27 |
-
|
28 |
-
<
|
29 |
-
|
30 |
-
|
31 |
-
|
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 |
-
|
68 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
<?php } ?>
|
70 |
-
</
|
71 |
<?php
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
<?php } ?>
|
77 |
-
</div>
|
78 |
<?php
|
79 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
}
|
81 |
|
82 |
/**
|
@@ -84,11 +143,16 @@ class SP_Meta_Box_Event_Teams {
|
|
84 |
*/
|
85 |
public static function save( $post_id, $post ) {
|
86 |
sp_update_post_meta_recursive( $post_id, 'sp_team', sp_array_value( $_POST, 'sp_team', array() ) );
|
87 |
-
$tabs =
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
|
|
|
|
|
|
|
|
92 |
}
|
|
|
93 |
}
|
94 |
}
|
5 |
* @author ThemeBoy
|
6 |
* @category Admin
|
7 |
* @package SportsPress/Admin/Meta_Boxes
|
8 |
+
* @version 1.9.19
|
9 |
*/
|
10 |
|
11 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
21 |
public static function output( $post ) {
|
22 |
$limit = get_option( 'sportspress_event_teams', 2 );
|
23 |
$teams = (array) get_post_meta( $post->ID, 'sp_team', false );
|
24 |
+
if ( $limit ) {
|
25 |
+
for ( $i = 0; $i < $limit; $i ++ ):
|
26 |
+
$team = array_shift( $teams );
|
27 |
+
?>
|
28 |
+
<div class="sp-instance">
|
29 |
+
<p class="sp-tab-select sp-title-generator">
|
30 |
+
<?php
|
31 |
+
$args = array(
|
32 |
+
'post_type' => 'sp_team',
|
33 |
+
'name' => 'sp_team[]',
|
34 |
+
'class' => 'sportspress-pages',
|
35 |
+
'show_option_none' => __( '— None —', 'sportspress' ),
|
36 |
+
'values' => 'ID',
|
37 |
+
'selected' => $team,
|
38 |
+
'chosen' => true,
|
39 |
+
'tax_query' => array(),
|
40 |
+
);
|
41 |
+
if ( 'yes' == get_option( 'sportspress_event_filter_teams_by_league', 'no' ) ) {
|
42 |
+
$league_id = sp_get_the_term_id( $post->ID, 'sp_league', 0 );
|
43 |
+
if ( $league_id ) {
|
44 |
+
$args['tax_query'][] = array(
|
45 |
+
'taxonomy' => 'sp_league',
|
46 |
+
'terms' => $league_id,
|
47 |
+
);
|
48 |
+
}
|
49 |
}
|
50 |
+
if ( 'yes' == get_option( 'sportspress_event_filter_teams_by_season', 'no' ) ) {
|
51 |
+
$season_id = sp_get_the_term_id( $post->ID, 'sp_season', 0 );
|
52 |
+
if ( $season_id ) {
|
53 |
+
$args['tax_query'][] = array(
|
54 |
+
'taxonomy' => 'sp_season',
|
55 |
+
'terms' => $season_id,
|
56 |
+
);
|
57 |
+
}
|
58 |
+
}
|
59 |
+
if ( ! sp_dropdown_pages( $args ) ) {
|
60 |
+
unset( $args['tax_query'] );
|
61 |
+
sp_dropdown_pages( $args );
|
62 |
+
}
|
63 |
+
?>
|
64 |
+
</p>
|
65 |
+
<?php
|
66 |
+
$tabs = array();
|
67 |
+
$sections = get_option( 'sportspress_event_performance_sections', -1 );
|
68 |
+
if ( 0 == $sections ) {
|
69 |
+
$tabs['sp_offense'] = array(
|
70 |
+
'label' => __( 'Offense', 'sportspress' ),
|
71 |
+
'post_type' => 'sp_player',
|
72 |
+
);
|
73 |
+
$tabs['sp_defense'] = array(
|
74 |
+
'label' => __( 'Defense', 'sportspress' ),
|
75 |
+
'post_type' => 'sp_player',
|
76 |
+
);
|
77 |
+
} elseif ( 1 == $sections ) {
|
78 |
+
$tabs['sp_defense'] = array(
|
79 |
+
'label' => __( 'Defense', 'sportspress' ),
|
80 |
+
'post_type' => 'sp_player',
|
81 |
+
);
|
82 |
+
$tabs['sp_offense'] = array(
|
83 |
+
'label' => __( 'Offense', 'sportspress' ),
|
84 |
+
'post_type' => 'sp_player',
|
85 |
+
);
|
86 |
+
} else {
|
87 |
+
$tabs['sp_player'] = array(
|
88 |
+
'label' => __( 'Players', 'sportspress' ),
|
89 |
+
'post_type' => 'sp_player',
|
90 |
);
|
91 |
}
|
92 |
+
$tabs['sp_staff'] = array(
|
93 |
+
'label' => __( 'Staff', 'sportspress' ),
|
94 |
+
'post_type' => 'sp_staff',
|
95 |
+
);
|
96 |
+
?>
|
97 |
+
<?php if ( $tabs ) { ?>
|
98 |
+
<ul id="sp_team-tabs" class="wp-tab-bar sp-tab-bar">
|
99 |
+
<?php
|
100 |
+
$j = 0;
|
101 |
+
foreach ( $tabs as $slug => $tab ) {
|
102 |
+
?>
|
103 |
+
<li class="wp-tab<?php if ( 0 == $j ) { ?>-active<?php } ?>"><a href="#<?php echo $slug; ?>-all"><?php echo $tab['label']; ?></a></li>
|
104 |
+
<?php
|
105 |
+
$j++;
|
106 |
+
}
|
107 |
+
?>
|
108 |
+
</ul>
|
109 |
+
<?php
|
110 |
+
$j = 0;
|
111 |
+
foreach ( $tabs as $slug => $tab ) {
|
112 |
+
do_action( 'sportspress_event_teams_meta_box_checklist', $post->ID, $tab['post_type'], ( 0 == $j ? 'block' : 'none' ), $team, $i, $slug );
|
113 |
+
$j++;
|
114 |
+
}
|
115 |
+
?>
|
116 |
<?php } ?>
|
117 |
+
</div>
|
118 |
<?php
|
119 |
+
endfor;
|
120 |
+
} else {
|
121 |
+
?>
|
122 |
+
<p><strong><?php printf( __( 'Select %s:', 'sportspress' ), __( 'Teams', 'sportspress' ) ); ?></strong></p>
|
|
|
|
|
123 |
<?php
|
124 |
+
$args = array(
|
125 |
+
'post_type' => 'sp_team',
|
126 |
+
'name' => 'sp_team[]',
|
127 |
+
'selected' => $teams,
|
128 |
+
'values' => 'ID',
|
129 |
+
'class' => 'widefat',
|
130 |
+
'property' => 'multiple',
|
131 |
+
'chosen' => true,
|
132 |
+
'placeholder' => __( 'None', 'sportspress' ),
|
133 |
+
);
|
134 |
+
if ( ! sp_dropdown_pages( $args ) ):
|
135 |
+
sp_post_adder( 'sp_team', __( 'Add New', 'sportspress' ) );
|
136 |
+
endif;
|
137 |
+
}
|
138 |
+
wp_nonce_field( 'sp-get-players', 'sp-get-players-nonce', false );
|
139 |
}
|
140 |
|
141 |
/**
|
143 |
*/
|
144 |
public static function save( $post_id, $post ) {
|
145 |
sp_update_post_meta_recursive( $post_id, 'sp_team', sp_array_value( $_POST, 'sp_team', array() ) );
|
146 |
+
$tabs = array();
|
147 |
+
$sections = get_option( 'sportspress_event_performance_sections', -1 );
|
148 |
+
if ( -1 == $sections ) {
|
149 |
+
sp_update_post_meta_recursive( $post_id, 'sp_player', sp_array_value( $_POST, 'sp_player', array() ) );
|
150 |
+
} else {
|
151 |
+
$players = array_merge( sp_array_value( $_POST, 'sp_offense', array() ), sp_array_value( $_POST, 'sp_defense', array() ) );
|
152 |
+
sp_update_post_meta_recursive( $post_id, 'sp_offense', sp_array_value( $_POST, 'sp_offense', array() ) );
|
153 |
+
sp_update_post_meta_recursive( $post_id, 'sp_defense', sp_array_value( $_POST, 'sp_defense', array() ) );
|
154 |
+
sp_update_post_meta_recursive( $post_id, 'sp_player', $players );
|
155 |
}
|
156 |
+
sp_update_post_meta_recursive( $post_id, 'sp_staff', sp_array_value( $_POST, 'sp_staff', array() ) );
|
157 |
}
|
158 |
}
|
includes/admin/post-types/meta-boxes/class-sp-meta-box-list-columns.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @author ThemeBoy
|
6 |
* @category Admin
|
7 |
* @package SportsPress/Admin/Meta_Boxes
|
8 |
-
* @version 1.
|
9 |
*/
|
10 |
|
11 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
@@ -19,7 +19,37 @@ class SP_Meta_Box_List_Columns {
|
|
19 |
* Output the metabox
|
20 |
*/
|
21 |
public static function output( $post ) {
|
|
|
|
|
22 |
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
<div class="sp-instance">
|
24 |
<ul id="sp_column-tabs" class="wp-tab-bar sp-tab-bar">
|
25 |
<li class="wp-tab-active"><a href="#sp_performance-all"><?php _e( 'Performance', 'sportspress' ); ?></a></li>
|
@@ -27,7 +57,6 @@ class SP_Meta_Box_List_Columns {
|
|
27 |
<li class="wp-tab"><a href="#sp_statistic-all"><?php _e( 'Statistics', 'sportspress' ); ?></a></li>
|
28 |
</ul>
|
29 |
<?php
|
30 |
-
$selected = (array)get_post_meta( $post->ID, 'sp_columns', true );
|
31 |
sp_column_checklist( $post->ID, 'sp_performance', 'block', $selected );
|
32 |
sp_column_checklist( $post->ID, 'sp_metric', 'none', $selected );
|
33 |
sp_column_checklist( $post->ID, 'sp_statistic', 'none', $selected );
|
5 |
* @author ThemeBoy
|
6 |
* @category Admin
|
7 |
* @package SportsPress/Admin/Meta_Boxes
|
8 |
+
* @version 1.9.13
|
9 |
*/
|
10 |
|
11 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
19 |
* Output the metabox
|
20 |
*/
|
21 |
public static function output( $post ) {
|
22 |
+
$selected = (array)get_post_meta( $post->ID, 'sp_columns', true );
|
23 |
+
$orderby = get_post_meta( $post->ID, 'sp_orderby', true );
|
24 |
?>
|
25 |
+
<p><strong><?php _e( 'General', 'sportspress' ); ?></strong></p>
|
26 |
+
<ul class="categorychecklist form-no-clear">
|
27 |
+
<li>
|
28 |
+
<label class="selectit">
|
29 |
+
<input value="number" type="checkbox" name="sp_columns[]" id="sp_columns_number" <?php checked( in_array( 'number', $selected ) ); ?>>
|
30 |
+
<?php
|
31 |
+
if ( in_array( $orderby, array( 'number', 'name' ) ) ) {
|
32 |
+
_e( 'Squad Number', 'sportspress' );
|
33 |
+
} else {
|
34 |
+
_e( 'Rank', 'sportspress' );
|
35 |
+
}
|
36 |
+
?>
|
37 |
+
</label>
|
38 |
+
</li>
|
39 |
+
<li>
|
40 |
+
<label class="selectit">
|
41 |
+
<input value="team" type="checkbox" name="sp_columns[]" id="sp_columns_team" <?php checked( in_array( 'team', $selected ) ); ?>>
|
42 |
+
<?php _e( 'Team', 'sportspress' ); ?>
|
43 |
+
</label>
|
44 |
+
</li>
|
45 |
+
<li>
|
46 |
+
<label class="selectit">
|
47 |
+
<input value="position" type="checkbox" name="sp_columns[]" id="sp_columns_position" <?php checked( in_array( 'position', $selected ) ); ?>>
|
48 |
+
<?php _e( 'Position', 'sportspress' ); ?>
|
49 |
+
</label>
|
50 |
+
</li>
|
51 |
+
</ul>
|
52 |
+
<p><strong><?php _e( 'Data', 'sportspress' ); ?></strong></p>
|
53 |
<div class="sp-instance">
|
54 |
<ul id="sp_column-tabs" class="wp-tab-bar sp-tab-bar">
|
55 |
<li class="wp-tab-active"><a href="#sp_performance-all"><?php _e( 'Performance', 'sportspress' ); ?></a></li>
|
57 |
<li class="wp-tab"><a href="#sp_statistic-all"><?php _e( 'Statistics', 'sportspress' ); ?></a></li>
|
58 |
</ul>
|
59 |
<?php
|
|
|
60 |
sp_column_checklist( $post->ID, 'sp_performance', 'block', $selected );
|
61 |
sp_column_checklist( $post->ID, 'sp_metric', 'none', $selected );
|
62 |
sp_column_checklist( $post->ID, 'sp_statistic', 'none', $selected );
|
includes/admin/post-types/meta-boxes/class-sp-meta-box-list-data.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @author ThemeBoy
|
6 |
* @category Admin
|
7 |
* @package SportsPress/Admin/Meta_Boxes
|
8 |
-
* @version 1.
|
9 |
*/
|
10 |
|
11 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
@@ -47,17 +47,18 @@ class SP_Meta_Box_List_Data {
|
|
47 |
<table class="widefat sp-data-table sp-player-list-table">
|
48 |
<thead>
|
49 |
<tr>
|
50 |
-
|
51 |
-
<
|
52 |
-
|
53 |
-
</label></th>
|
54 |
<th><?php _e( 'Player', 'sportspress' ); ?></th>
|
55 |
-
|
56 |
-
<
|
57 |
-
|
58 |
-
|
|
|
|
|
59 |
<?php foreach ( $columns as $key => $label ): ?>
|
60 |
-
<?php if ( in_array( $key, array( 'number', 'team' ) ) ) continue; ?>
|
61 |
<th><label for="sp_columns_<?php echo $key; ?>">
|
62 |
<?php echo $label; ?>
|
63 |
</label></th>
|
@@ -79,15 +80,17 @@ class SP_Meta_Box_List_Data {
|
|
79 |
$default_name = get_the_title( $player_id );
|
80 |
?>
|
81 |
<tr class="sp-row sp-post<?php if ( $i % 2 == 0 ) echo ' alternate'; ?>">
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
|
|
|
|
91 |
<td>
|
92 |
<?php if ( $show_player_photo ) echo get_the_post_thumbnail( $player_id, 'sportspress-fit-mini' ); ?>
|
93 |
<span class="sp-default-value">
|
@@ -95,32 +98,51 @@ class SP_Meta_Box_List_Data {
|
|
95 |
<a class="dashicons dashicons-edit sp-edit" title="<?php _e( 'Edit', 'sportspress' ); ?>"></a>
|
96 |
</span>
|
97 |
<span class="hidden sp-custom-value">
|
98 |
-
<input type="text" name="sp_players[<?php echo $player_id; ?>][name]" class="name sp-custom-value-input" value="<?php echo sp_array_value( $player_stats, 'name', '' ); ?>" placeholder="<?php echo get_the_title( $player_id ); ?>" size="6">
|
99 |
<a class="button button-secondary sp-cancel"><?php _e( 'Cancel', 'sportspress' ); ?></a>
|
100 |
<a class="button button-primary sp-save"><?php _e( 'Save', 'sportspress' ); ?></a>
|
101 |
</span>
|
102 |
</td>
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
118 |
<?php foreach( $columns as $column => $label ):
|
119 |
-
if ( in_array( $column, array( 'number', 'team' ) ) ) continue;
|
120 |
$value = sp_array_value( $player_stats, $column, '' );
|
121 |
$placeholder = sp_array_value( sp_array_value( $placeholders, $player_id, array() ), $column, 0 );
|
122 |
?>
|
123 |
-
<td><input type="text" name="sp_players[<?php echo $player_id; ?>][<?php echo $column; ?>]" value="<?php echo $value; ?>" placeholder="<?php echo $placeholder; ?>" data-placeholder="<?php echo $placeholder; ?>" data-matrix="<?php echo $player_id; ?>_<?php echo $column; ?>" data-adjustment="<?php echo sp_array_value( sp_array_value( $adjustments, $player_id, array() ), $column, 0 ); ?>" /></td>
|
124 |
<?php endforeach; ?>
|
125 |
</tr>
|
126 |
<?php
|
@@ -129,7 +151,7 @@ class SP_Meta_Box_List_Data {
|
|
129 |
else:
|
130 |
?>
|
131 |
<tr class="sp-row alternate">
|
132 |
-
<td colspan="<?php $colspan = sizeof( $columns ) + 3; echo $colspan; ?>">
|
133 |
<?php printf( __( 'Select %s', 'sportspress' ), __( 'Data', 'sportspress' ) ); ?>
|
134 |
</td>
|
135 |
</tr>
|
@@ -145,7 +167,7 @@ class SP_Meta_Box_List_Data {
|
|
145 |
<tr>
|
146 |
<th>#</th>
|
147 |
<th><?php _e( 'Player', 'sportspress' ); ?></th>
|
148 |
-
<?php foreach ( $columns as $key => $label ): if ( $key
|
149 |
<th><?php echo $label; ?></th>
|
150 |
<?php endforeach; ?>
|
151 |
</tr>
|
@@ -165,10 +187,10 @@ class SP_Meta_Box_List_Data {
|
|
165 |
<?php echo get_the_title( $player_id ); ?>
|
166 |
</td>
|
167 |
<?php foreach( $columns as $column => $label ):
|
168 |
-
if ( $column
|
169 |
$value = sp_array_value( sp_array_value( $adjustments, $player_id, array() ), $column, '' );
|
170 |
?>
|
171 |
-
<td><input type="text" name="sp_adjustments[<?php echo $player_id; ?>][<?php echo $column; ?>]" value="<?php echo $value; ?>" placeholder="0" data-matrix="<?php echo $player_id; ?>_<?php echo $column; ?>" /></td>
|
172 |
<?php endforeach; ?>
|
173 |
</tr>
|
174 |
<?php
|
5 |
* @author ThemeBoy
|
6 |
* @category Admin
|
7 |
* @package SportsPress/Admin/Meta_Boxes
|
8 |
+
* @version 1.9.13
|
9 |
*/
|
10 |
|
11 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
47 |
<table class="widefat sp-data-table sp-player-list-table">
|
48 |
<thead>
|
49 |
<tr>
|
50 |
+
<?php if ( array_key_exists( 'number', $columns ) ) { ?>
|
51 |
+
<th><?php echo in_array( $orderby, array( 'number', 'name' ) ) ? '#' : __( 'Rank', 'sportspress' ); ?></th>
|
52 |
+
<?php } ?>
|
|
|
53 |
<th><?php _e( 'Player', 'sportspress' ); ?></th>
|
54 |
+
<?php if ( array_key_exists( 'team', $columns ) && apply_filters( 'sportspress_has_teams', true ) ) { ?>
|
55 |
+
<th><?php _e( 'Team', 'sportspress' ); ?></th>
|
56 |
+
<?php } ?>
|
57 |
+
<?php if ( array_key_exists( 'position', $columns ) ) { ?>
|
58 |
+
<th><?php _e( 'Position', 'sportspress' ); ?></th>
|
59 |
+
<?php } ?>
|
60 |
<?php foreach ( $columns as $key => $label ): ?>
|
61 |
+
<?php if ( in_array( $key, array( 'number', 'team', 'position' ) ) ) continue; ?>
|
62 |
<th><label for="sp_columns_<?php echo $key; ?>">
|
63 |
<?php echo $label; ?>
|
64 |
</label></th>
|
80 |
$default_name = get_the_title( $player_id );
|
81 |
?>
|
82 |
<tr class="sp-row sp-post<?php if ( $i % 2 == 0 ) echo ' alternate'; ?>">
|
83 |
+
<?php if ( array_key_exists( 'number', $columns ) ) { ?>
|
84 |
+
<td>
|
85 |
+
<?php
|
86 |
+
if ( 'number' == $orderby ) {
|
87 |
+
echo ( $number ? $number : ' ' );
|
88 |
+
} else {
|
89 |
+
echo $i + 1;
|
90 |
+
}
|
91 |
+
?>
|
92 |
+
</td>
|
93 |
+
<?php } ?>
|
94 |
<td>
|
95 |
<?php if ( $show_player_photo ) echo get_the_post_thumbnail( $player_id, 'sportspress-fit-mini' ); ?>
|
96 |
<span class="sp-default-value">
|
98 |
<a class="dashicons dashicons-edit sp-edit" title="<?php _e( 'Edit', 'sportspress' ); ?>"></a>
|
99 |
</span>
|
100 |
<span class="hidden sp-custom-value">
|
101 |
+
<input type="text" name="sp_players[<?php echo $player_id; ?>][name]" class="name sp-custom-value-input" value="<?php echo esc_attr( sp_array_value( $player_stats, 'name', '' ) ); ?>" placeholder="<?php echo esc_attr( get_the_title( $player_id ) ); ?>" size="6">
|
102 |
<a class="button button-secondary sp-cancel"><?php _e( 'Cancel', 'sportspress' ); ?></a>
|
103 |
<a class="button button-primary sp-save"><?php _e( 'Save', 'sportspress' ); ?></a>
|
104 |
</span>
|
105 |
</td>
|
106 |
+
<?php if ( array_key_exists( 'team', $columns ) && apply_filters( 'sportspress_has_teams', true ) ) { ?>
|
107 |
+
<td>
|
108 |
+
<?php
|
109 |
+
$selected = sp_array_value( $player_stats, 'team', get_post_meta( get_the_ID(), 'sp_team', true ) );
|
110 |
+
if ( ! $selected ) $selected = get_post_meta( $player_id, 'sp_team', true );
|
111 |
+
$include = get_post_meta( $player_id, 'sp_team' );
|
112 |
+
$args = array(
|
113 |
+
'post_type' => 'sp_team',
|
114 |
+
'name' => 'sp_players[' . $player_id . '][team]',
|
115 |
+
'include' => $include,
|
116 |
+
'selected' => $selected,
|
117 |
+
'values' => 'ID',
|
118 |
+
);
|
119 |
+
wp_dropdown_pages( $args );
|
120 |
+
?>
|
121 |
+
</td>
|
122 |
+
<?php } ?>
|
123 |
+
<?php if ( array_key_exists( 'position', $columns ) ) { ?>
|
124 |
+
<td>
|
125 |
+
<?php
|
126 |
+
$selected = sp_array_value( $player_stats, 'position', null );
|
127 |
+
$args = array(
|
128 |
+
'taxonomy' => 'sp_position',
|
129 |
+
'name' => 'sp_players[' . $player_id . '][position]',
|
130 |
+
'show_option_blank' => __( '(Auto)', 'sportspress' ),
|
131 |
+
'values' => 'term_id',
|
132 |
+
'orderby' => 'slug',
|
133 |
+
'selected' => $selected,
|
134 |
+
'include_children' => ( 'no' == get_option( 'sportspress_event_hide_child_positions', 'no' ) ),
|
135 |
+
);
|
136 |
+
sp_dropdown_taxonomies( $args );
|
137 |
+
?>
|
138 |
+
</td>
|
139 |
+
<?php } ?>
|
140 |
<?php foreach( $columns as $column => $label ):
|
141 |
+
if ( in_array( $column, array( 'number', 'team', 'position' ) ) ) continue;
|
142 |
$value = sp_array_value( $player_stats, $column, '' );
|
143 |
$placeholder = sp_array_value( sp_array_value( $placeholders, $player_id, array() ), $column, 0 );
|
144 |
?>
|
145 |
+
<td><input type="text" name="sp_players[<?php echo $player_id; ?>][<?php echo $column; ?>]" value="<?php echo esc_attr( $value ); ?>" placeholder="<?php echo esc_attr( $placeholder ); ?>" data-placeholder="<?php echo esc_attr( $placeholder ); ?>" data-matrix="<?php echo $player_id; ?>_<?php echo $column; ?>" data-adjustment="<?php echo sp_array_value( sp_array_value( $adjustments, $player_id, array() ), $column, 0 ); ?>" /></td>
|
146 |
<?php endforeach; ?>
|
147 |
</tr>
|
148 |
<?php
|
151 |
else:
|
152 |
?>
|
153 |
<tr class="sp-row alternate">
|
154 |
+
<td colspan="<?php $colspan = sizeof( $columns ) + ( apply_filters( 'sportspress_has_teams', true ) ? 3 : 2 ); echo $colspan; ?>">
|
155 |
<?php printf( __( 'Select %s', 'sportspress' ), __( 'Data', 'sportspress' ) ); ?>
|
156 |
</td>
|
157 |
</tr>
|
167 |
<tr>
|
168 |
<th>#</th>
|
169 |
<th><?php _e( 'Player', 'sportspress' ); ?></th>
|
170 |
+
<?php foreach ( $columns as $key => $label ): if ( in_array( $key, array( 'number', 'team', 'position' ) ) ) continue; ?>
|
171 |
<th><?php echo $label; ?></th>
|
172 |
<?php endforeach; ?>
|
173 |
</tr>
|
187 |
<?php echo get_the_title( $player_id ); ?>
|
188 |
</td>
|
189 |
<?php foreach( $columns as $column => $label ):
|
190 |
+
if ( in_array( $column, array( 'number', 'team', 'position' ) ) ) continue;
|
191 |
$value = sp_array_value( sp_array_value( $adjustments, $player_id, array() ), $column, '' );
|
192 |
?>
|
193 |
+
<td><input type="text" name="sp_adjustments[<?php echo $player_id; ?>][<?php echo $column; ?>]" value="<?php echo esc_attr( $value ); ?>" placeholder="0" data-matrix="<?php echo $player_id; ?>_<?php echo $column; ?>" /></td>
|
194 |
<?php endforeach; ?>
|
195 |
</tr>
|
196 |
<?php
|
includes/admin/post-types/meta-boxes/class-sp-meta-box-list-details.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @author ThemeBoy
|
6 |
* @category Admin
|
7 |
* @package SportsPress/Admin/Meta_Boxes
|
8 |
-
* @version 1.
|
9 |
*/
|
10 |
|
11 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
@@ -20,6 +20,7 @@ class SP_Meta_Box_List_Details {
|
|
20 |
*/
|
21 |
public static function output( $post ) {
|
22 |
$taxonomies = get_object_taxonomies( 'sp_list' );
|
|
|
23 |
$team_id = get_post_meta( $post->ID, 'sp_team', true );
|
24 |
$grouping = get_post_meta( $post->ID, 'sp_grouping', true );
|
25 |
$orderby = get_post_meta( $post->ID, 'sp_orderby', true );
|
@@ -31,6 +32,9 @@ class SP_Meta_Box_List_Details {
|
|
31 |
}
|
32 |
?>
|
33 |
<div>
|
|
|
|
|
|
|
34 |
<?php
|
35 |
foreach ( $taxonomies as $taxonomy ) {
|
36 |
sp_taxonomy_field( $taxonomy, $post, true );
|
@@ -91,8 +95,10 @@ class SP_Meta_Box_List_Details {
|
|
91 |
</select>
|
92 |
</p>
|
93 |
<?php
|
94 |
-
|
95 |
-
|
|
|
|
|
96 |
?>
|
97 |
</div>
|
98 |
<?php
|
@@ -102,6 +108,7 @@ class SP_Meta_Box_List_Details {
|
|
102 |
* Save meta box data
|
103 |
*/
|
104 |
public static function save( $post_id, $post ) {
|
|
|
105 |
update_post_meta( $post_id, 'sp_team', sp_array_value( $_POST, 'sp_team', array() ) );
|
106 |
update_post_meta( $post_id, 'sp_grouping', sp_array_value( $_POST, 'sp_grouping', array() ) );
|
107 |
update_post_meta( $post_id, 'sp_orderby', sp_array_value( $_POST, 'sp_orderby', array() ) );
|
5 |
* @author ThemeBoy
|
6 |
* @category Admin
|
7 |
* @package SportsPress/Admin/Meta_Boxes
|
8 |
+
* @version 1.9.8
|
9 |
*/
|
10 |
|
11 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
20 |
*/
|
21 |
public static function output( $post ) {
|
22 |
$taxonomies = get_object_taxonomies( 'sp_list' );
|
23 |
+
$caption = get_post_meta( $post->ID, 'sp_caption', true );
|
24 |
$team_id = get_post_meta( $post->ID, 'sp_team', true );
|
25 |
$grouping = get_post_meta( $post->ID, 'sp_grouping', true );
|
26 |
$orderby = get_post_meta( $post->ID, 'sp_orderby', true );
|
32 |
}
|
33 |
?>
|
34 |
<div>
|
35 |
+
<p><strong><?php _e( 'Heading', 'sportspress' ); ?></strong></p>
|
36 |
+
<p><input type="text" id="sp_caption" name="sp_caption" value="<?php echo esc_attr( $caption ); ?>" placeholder="<?php echo esc_attr( get_the_title() ); ?>"></p>
|
37 |
+
|
38 |
<?php
|
39 |
foreach ( $taxonomies as $taxonomy ) {
|
40 |
sp_taxonomy_field( $taxonomy, $post, true );
|
95 |
</select>
|
96 |
</p>
|
97 |
<?php
|
98 |
+
if ( 'manual' == $select ) {
|
99 |
+
sp_post_checklist( $post->ID, 'sp_player', ( 'auto' == $select ? 'none' : 'block' ), array( 'sp_league', 'sp_season', 'sp_current_team' ) );
|
100 |
+
sp_post_adder( 'sp_player', __( 'Add New', 'sportspress' ) );
|
101 |
+
}
|
102 |
?>
|
103 |
</div>
|
104 |
<?php
|
108 |
* Save meta box data
|
109 |
*/
|
110 |
public static function save( $post_id, $post ) {
|
111 |
+
update_post_meta( $post_id, 'sp_caption', esc_attr( sp_array_value( $_POST, 'sp_caption', 0 ) ) );
|
112 |
update_post_meta( $post_id, 'sp_team', sp_array_value( $_POST, 'sp_team', array() ) );
|
113 |
update_post_meta( $post_id, 'sp_grouping', sp_array_value( $_POST, 'sp_grouping', array() ) );
|
114 |
update_post_meta( $post_id, 'sp_orderby', sp_array_value( $_POST, 'sp_orderby', array() ) );
|
includes/admin/post-types/meta-boxes/class-sp-meta-box-outcome-details.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @author ThemeBoy
|
6 |
* @category Admin
|
7 |
* @package SportsPress/Admin/Meta_Boxes
|
8 |
-
* @version 1.
|
9 |
*/
|
10 |
|
11 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
@@ -23,6 +23,12 @@ class SP_Meta_Box_Outcome_Details extends SP_Meta_Box_Config {
|
|
23 |
*/
|
24 |
public static function output( $post ) {
|
25 |
wp_nonce_field( 'sportspress_save_data', 'sportspress_meta_nonce' );
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
$abbreviation = get_post_meta( $post->ID, 'sp_abbreviation', true );
|
27 |
$condition = get_post_meta( $post->ID, 'sp_condition', true );
|
28 |
$main_result = get_option( 'sportspress_primary_result', null );
|
@@ -32,7 +38,7 @@ class SP_Meta_Box_Outcome_Details extends SP_Meta_Box_Config {
|
|
32 |
<p><strong><?php _e( 'Variable', 'sportspress' ); ?></strong></p>
|
33 |
<p>
|
34 |
<input name="sp_default_key" type="hidden" id="sp_default_key" value="<?php echo $post->post_name; ?>">
|
35 |
-
<input name="sp_key" type="text" id="sp_key" value="<?php echo $post->post_name; ?>"
|
36 |
</p>
|
37 |
<p><strong><?php _e( 'Abbreviation', 'sportspress' ); ?></strong></p>
|
38 |
<p>
|
@@ -47,6 +53,7 @@ class SP_Meta_Box_Outcome_Details extends SP_Meta_Box_Config {
|
|
47 |
'>' => sprintf( __( 'Most %s', 'sportspress' ), $label ),
|
48 |
'<' => sprintf( __( 'Least %s', 'sportspress' ), $label ),
|
49 |
'=' => sprintf( __( 'Equal %s', 'sportspress' ), $label ),
|
|
|
50 |
);
|
51 |
for( $i = 1; $i <= $count->publish; $i++ ):
|
52 |
$options[ $i ] = $i;
|
5 |
* @author ThemeBoy
|
6 |
* @category Admin
|
7 |
* @package SportsPress/Admin/Meta_Boxes
|
8 |
+
* @version 1.9
|
9 |
*/
|
10 |
|
11 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
23 |
*/
|
24 |
public static function output( $post ) {
|
25 |
wp_nonce_field( 'sportspress_save_data', 'sportspress_meta_nonce' );
|
26 |
+
global $pagenow;
|
27 |
+
if ( 'post.php' == $pagenow && 'draft' !== get_post_status() ) {
|
28 |
+
$readonly = true;
|
29 |
+
} else {
|
30 |
+
$readonly = false;
|
31 |
+
}
|
32 |
$abbreviation = get_post_meta( $post->ID, 'sp_abbreviation', true );
|
33 |
$condition = get_post_meta( $post->ID, 'sp_condition', true );
|
34 |
$main_result = get_option( 'sportspress_primary_result', null );
|
38 |
<p><strong><?php _e( 'Variable', 'sportspress' ); ?></strong></p>
|
39 |
<p>
|
40 |
<input name="sp_default_key" type="hidden" id="sp_default_key" value="<?php echo $post->post_name; ?>">
|
41 |
+
<input name="sp_key" type="text" id="sp_key" value="<?php echo $post->post_name; ?>"<?php if ( $readonly ) { ?> readonly="readonly"<?php } ?>>
|
42 |
</p>
|
43 |
<p><strong><?php _e( 'Abbreviation', 'sportspress' ); ?></strong></p>
|
44 |
<p>
|
53 |
'>' => sprintf( __( 'Most %s', 'sportspress' ), $label ),
|
54 |
'<' => sprintf( __( 'Least %s', 'sportspress' ), $label ),
|
55 |
'=' => sprintf( __( 'Equal %s', 'sportspress' ), $label ),
|
56 |
+
'else' => sprintf( __( 'Default', 'sportspress' ), $label ),
|
57 |
);
|
58 |
for( $i = 1; $i <= $count->publish; $i++ ):
|
59 |
$options[ $i ] = $i;
|
includes/admin/post-types/meta-boxes/class-sp-meta-box-performance-details.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @author ThemeBoy
|
6 |
* @category Admin
|
7 |
* @package SportsPress/Admin/Meta_Boxes
|
8 |
-
* @version
|
9 |
*/
|
10 |
|
11 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
@@ -23,12 +23,57 @@ class SP_Meta_Box_Performance_Details extends SP_Meta_Box_Config {
|
|
23 |
*/
|
24 |
public static function output( $post ) {
|
25 |
wp_nonce_field( 'sportspress_save_data', 'sportspress_meta_nonce' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
?>
|
27 |
<p><strong><?php _e( 'Variable', 'sportspress' ); ?></strong></p>
|
28 |
<p>
|
29 |
<input name="sp_default_key" type="hidden" id="sp_default_key" value="<?php echo $post->post_name; ?>">
|
30 |
-
<input name="sp_key" type="text" id="sp_key" value="<?php echo $post->post_name; ?>"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
</p>
|
32 |
<?php
|
33 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
}
|
5 |
* @author ThemeBoy
|
6 |
* @category Admin
|
7 |
* @package SportsPress/Admin/Meta_Boxes
|
8 |
+
* @version 1.9.19
|
9 |
*/
|
10 |
|
11 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
23 |
*/
|
24 |
public static function output( $post ) {
|
25 |
wp_nonce_field( 'sportspress_save_data', 'sportspress_meta_nonce' );
|
26 |
+
global $pagenow;
|
27 |
+
if ( 'post.php' == $pagenow && 'draft' !== get_post_status() ) {
|
28 |
+
$readonly = true;
|
29 |
+
} else {
|
30 |
+
$readonly = false;
|
31 |
+
}
|
32 |
+
$section = get_post_meta( $post->ID, 'sp_section', true );
|
33 |
+
if ( '' === $section ) {
|
34 |
+
$section = -1;
|
35 |
+
}
|
36 |
+
$format = get_post_meta( $post->ID, 'sp_format', true );
|
37 |
+
if ( '' === $format ) {
|
38 |
+
$format = 'number';
|
39 |
+
}
|
40 |
?>
|
41 |
<p><strong><?php _e( 'Variable', 'sportspress' ); ?></strong></p>
|
42 |
<p>
|
43 |
<input name="sp_default_key" type="hidden" id="sp_default_key" value="<?php echo $post->post_name; ?>">
|
44 |
+
<input name="sp_key" type="text" id="sp_key" value="<?php echo $post->post_name; ?>"<?php if ( $readonly ) { ?> readonly="readonly"<?php } ?>>
|
45 |
+
</p>
|
46 |
+
<p><strong><?php _e( 'Category', 'sportspress' ); ?></strong></p>
|
47 |
+
<p class="sp-section-selector">
|
48 |
+
<select name="sp_section">
|
49 |
+
<?php
|
50 |
+
$options = apply_filters( 'sportspress_performance_sections', array( -1 => __( 'All', 'sportspress' ), 0 => __( 'Offense', 'sportspress' ), 1 => __( 'Defense', 'sportspress' ) ) );
|
51 |
+
foreach ( $options as $key => $value ):
|
52 |
+
printf( '<option value="%s" %s>%s</option>', $key, selected( $key == $section, true, false ), $value );
|
53 |
+
endforeach;
|
54 |
+
?>
|
55 |
+
</select>
|
56 |
+
</p>
|
57 |
+
<p><strong><?php _e( 'Format', 'sportspress' ); ?></strong></p>
|
58 |
+
<p class="sp-format-selector">
|
59 |
+
<select name="sp_format">
|
60 |
+
<?php
|
61 |
+
$options = apply_filters( 'sportspress_performance_formats', array( 'number' => __( 'Number', 'sportspress' ), 'text' => __( 'Text', 'sportspress' ) ) );
|
62 |
+
foreach ( $options as $key => $value ):
|
63 |
+
printf( '<option value="%s" %s>%s</option>', $key, selected( $key == $format, true, false ), $value );
|
64 |
+
endforeach;
|
65 |
+
?>
|
66 |
+
</select>
|
67 |
</p>
|
68 |
<?php
|
69 |
}
|
70 |
+
|
71 |
+
/**
|
72 |
+
* Save meta box data
|
73 |
+
*/
|
74 |
+
public static function save( $post_id, $post ) {
|
75 |
+
self::delete_duplicate( $_POST );
|
76 |
+
update_post_meta( $post_id, 'sp_section', (int) sp_array_value( $_POST, 'sp_section', -1 ) );
|
77 |
+
update_post_meta( $post_id, 'sp_format', sp_array_value( $_POST, 'sp_format', 'number' ) );
|
78 |
+
}
|
79 |
}
|
includes/admin/post-types/meta-boxes/class-sp-meta-box-player-details.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @author ThemeBoy
|
6 |
* @category Admin
|
7 |
* @package SportsPress/Admin/Meta_Boxes
|
8 |
-
* @version 1.
|
9 |
*/
|
10 |
|
11 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
@@ -33,28 +33,34 @@ class SP_Meta_Box_Player_Details {
|
|
33 |
endif;
|
34 |
endforeach;
|
35 |
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
$
|
41 |
-
|
|
|
|
|
42 |
endif;
|
43 |
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
$
|
49 |
-
|
|
|
|
|
50 |
endif;
|
51 |
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
$
|
57 |
-
|
|
|
|
|
58 |
endif;
|
59 |
|
60 |
$teams = get_posts( array( 'post_type' => 'sp_team', 'posts_per_page' => -1 ) );
|
@@ -76,20 +82,22 @@ class SP_Meta_Box_Player_Details {
|
|
76 |
<?php endforeach; ?>
|
77 |
</select></p>
|
78 |
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
|
|
|
|
93 |
|
94 |
<?php if ( apply_filters( 'sportspress_player_teams', true ) ) { ?>
|
95 |
<p><strong><?php _e( 'Current Teams', 'sportspress' ); ?></strong></p>
|
@@ -123,6 +131,7 @@ class SP_Meta_Box_Player_Details {
|
|
123 |
?></p>
|
124 |
<?php } ?>
|
125 |
|
|
|
126 |
<p><strong><?php _e( 'Competitions', 'sportspress' ); ?></strong></p>
|
127 |
<p><?php
|
128 |
$args = array(
|
@@ -137,7 +146,9 @@ class SP_Meta_Box_Player_Details {
|
|
137 |
);
|
138 |
sp_dropdown_taxonomies( $args );
|
139 |
?></p>
|
|
|
140 |
|
|
|
141 |
<p><strong><?php _e( 'Seasons', 'sportspress' ); ?></strong></p>
|
142 |
<p><?php
|
143 |
$args = array(
|
@@ -152,6 +163,7 @@ class SP_Meta_Box_Player_Details {
|
|
152 |
);
|
153 |
sp_dropdown_taxonomies( $args );
|
154 |
?></p>
|
|
|
155 |
<?php
|
156 |
}
|
157 |
|
@@ -159,7 +171,7 @@ class SP_Meta_Box_Player_Details {
|
|
159 |
* Save meta box data
|
160 |
*/
|
161 |
public static function save( $post_id, $post ) {
|
162 |
-
update_post_meta( $post_id, 'sp_number', sp_array_value( $_POST, 'sp_number', '' ) );
|
163 |
sp_update_post_meta_recursive( $post_id, 'sp_nationality', sp_array_value( $_POST, 'sp_nationality', array() ) );
|
164 |
sp_update_post_meta_recursive( $post_id, 'sp_current_team', sp_array_value( $_POST, 'sp_current_team', array() ) );
|
165 |
sp_update_post_meta_recursive( $post_id, 'sp_past_team', sp_array_value( $_POST, 'sp_past_team', array() ) );
|
5 |
* @author ThemeBoy
|
6 |
* @category Admin
|
7 |
* @package SportsPress/Admin/Meta_Boxes
|
8 |
+
* @version 1.9.7
|
9 |
*/
|
10 |
|
11 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
33 |
endif;
|
34 |
endforeach;
|
35 |
|
36 |
+
if ( taxonomy_exists( 'sp_league' ) ):
|
37 |
+
$leagues = get_the_terms( $post->ID, 'sp_league' );
|
38 |
+
$league_ids = array();
|
39 |
+
if ( $leagues ):
|
40 |
+
foreach ( $leagues as $league ):
|
41 |
+
$league_ids[] = $league->term_id;
|
42 |
+
endforeach;
|
43 |
+
endif;
|
44 |
endif;
|
45 |
|
46 |
+
if ( taxonomy_exists( 'sp_season' ) ):
|
47 |
+
$seasons = get_the_terms( $post->ID, 'sp_season' );
|
48 |
+
$season_ids = array();
|
49 |
+
if ( $seasons ):
|
50 |
+
foreach ( $seasons as $season ):
|
51 |
+
$season_ids[] = $season->term_id;
|
52 |
+
endforeach;
|
53 |
+
endif;
|
54 |
endif;
|
55 |
|
56 |
+
if ( taxonomy_exists( 'sp_position' ) ):
|
57 |
+
$positions = get_the_terms( $post->ID, 'sp_position' );
|
58 |
+
$position_ids = array();
|
59 |
+
if ( $positions ):
|
60 |
+
foreach ( $positions as $position ):
|
61 |
+
$position_ids[] = $position->term_id;
|
62 |
+
endforeach;
|
63 |
+
endif;
|
64 |
endif;
|
65 |
|
66 |
$teams = get_posts( array( 'post_type' => 'sp_team', 'posts_per_page' => -1 ) );
|
82 |
<?php endforeach; ?>
|
83 |
</select></p>
|
84 |
|
85 |
+
<?php if ( taxonomy_exists( 'sp_position' ) ) { ?>
|
86 |
+
<p><strong><?php _e( 'Positions', 'sportspress' ); ?></strong></p>
|
87 |
+
<p><?php
|
88 |
+
$args = array(
|
89 |
+
'taxonomy' => 'sp_position',
|
90 |
+
'name' => 'tax_input[sp_position][]',
|
91 |
+
'selected' => $position_ids,
|
92 |
+
'values' => 'term_id',
|
93 |
+
'placeholder' => sprintf( __( 'Select %s', 'sportspress' ), __( 'Positions', 'sportspress' ) ),
|
94 |
+
'class' => 'widefat',
|
95 |
+
'property' => 'multiple',
|
96 |
+
'chosen' => true,
|
97 |
+
);
|
98 |
+
sp_dropdown_taxonomies( $args );
|
99 |
+
?></p>
|
100 |
+
<?php } ?>
|
101 |
|
102 |
<?php if ( apply_filters( 'sportspress_player_teams', true ) ) { ?>
|
103 |
<p><strong><?php _e( 'Current Teams', 'sportspress' ); ?></strong></p>
|
131 |
?></p>
|
132 |
<?php } ?>
|
133 |
|
134 |
+
<?php if ( taxonomy_exists( 'sp_league' ) ) { ?>
|
135 |
<p><strong><?php _e( 'Competitions', 'sportspress' ); ?></strong></p>
|
136 |
<p><?php
|
137 |
$args = array(
|
146 |
);
|
147 |
sp_dropdown_taxonomies( $args );
|
148 |
?></p>
|
149 |
+
<?php } ?>
|
150 |
|
151 |
+
<?php if ( taxonomy_exists( 'sp_season' ) ) { ?>
|
152 |
<p><strong><?php _e( 'Seasons', 'sportspress' ); ?></strong></p>
|
153 |
<p><?php
|
154 |
$args = array(
|
163 |
);
|
164 |
sp_dropdown_taxonomies( $args );
|
165 |
?></p>
|
166 |
+
<?php } ?>
|
167 |
<?php
|
168 |
}
|
169 |
|
171 |
* Save meta box data
|
172 |
*/
|
173 |
public static function save( $post_id, $post ) {
|
174 |
+
update_post_meta( $post_id, 'sp_number', esc_attr( sp_array_value( $_POST, 'sp_number', '' ) ) );
|
175 |
sp_update_post_meta_recursive( $post_id, 'sp_nationality', sp_array_value( $_POST, 'sp_nationality', array() ) );
|
176 |
sp_update_post_meta_recursive( $post_id, 'sp_current_team', sp_array_value( $_POST, 'sp_current_team', array() ) );
|
177 |
sp_update_post_meta_recursive( $post_id, 'sp_past_team', sp_array_value( $_POST, 'sp_past_team', array() ) );
|
includes/admin/post-types/meta-boxes/class-sp-meta-box-player-metrics.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @author ThemeBoy
|
6 |
* @category Admin
|
7 |
* @package SportsPress/Admin/Meta_Boxes
|
8 |
-
* @version
|
9 |
*/
|
10 |
|
11 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
@@ -19,6 +19,7 @@ class SP_Meta_Box_Player_Metrics {
|
|
19 |
* Output the metabox
|
20 |
*/
|
21 |
public static function output( $post ) {
|
|
|
22 |
$metrics = get_post_meta( $post->ID, 'sp_metrics', true );
|
23 |
|
24 |
$args = array(
|
@@ -35,7 +36,7 @@ class SP_Meta_Box_Player_Metrics {
|
|
35 |
foreach ( $vars as $var ):
|
36 |
?>
|
37 |
<p><strong><?php echo $var->post_title; ?></strong></p>
|
38 |
-
<p><input type="text" name="sp_metrics[<?php echo $var->post_name; ?>]" value="<?php echo sp_array_value( $metrics, $var->post_name, '' ); ?>" /></p>
|
39 |
<?php
|
40 |
endforeach;
|
41 |
else:
|
5 |
* @author ThemeBoy
|
6 |
* @category Admin
|
7 |
* @package SportsPress/Admin/Meta_Boxes
|
8 |
+
* @version 1.9.7
|
9 |
*/
|
10 |
|
11 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
19 |
* Output the metabox
|
20 |
*/
|
21 |
public static function output( $post ) {
|
22 |
+
|
23 |
$metrics = get_post_meta( $post->ID, 'sp_metrics', true );
|
24 |
|
25 |
$args = array(
|
36 |
foreach ( $vars as $var ):
|
37 |
?>
|
38 |
<p><strong><?php echo $var->post_title; ?></strong></p>
|
39 |
+
<p><input type="text" name="sp_metrics[<?php echo $var->post_name; ?>]" value="<?php echo esc_attr( sp_array_value( $metrics, $var->post_name, '' ) ); ?>" /></p>
|
40 |
<?php
|
41 |
endforeach;
|
42 |
else:
|
includes/admin/post-types/meta-boxes/class-sp-meta-box-player-statistics.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @author ThemeBoy
|
6 |
* @category Admin
|
7 |
* @package SportsPress/Admin/Meta_Boxes
|
8 |
-
* @version 1.
|
9 |
*/
|
10 |
|
11 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
@@ -151,7 +151,7 @@ class SP_Meta_Box_Player_Statistics {
|
|
151 |
if ( $readonly )
|
152 |
echo $value ? $value : $placeholder;
|
153 |
else
|
154 |
-
echo '<input type="text" name="sp_statistics[' . $league_id . '][' . $div_id . '][' . $column . ']" value="' . $value . '" placeholder="' . $placeholder . '"' . ( $readonly ? ' disabled="disabled"' : '' ) . ' />';
|
155 |
?></td>
|
156 |
<?php endforeach; ?>
|
157 |
</tr>
|
5 |
* @author ThemeBoy
|
6 |
* @category Admin
|
7 |
* @package SportsPress/Admin/Meta_Boxes
|
8 |
+
* @version 1.9.7
|
9 |
*/
|
10 |
|
11 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
151 |
if ( $readonly )
|
152 |
echo $value ? $value : $placeholder;
|
153 |
else
|
154 |
+
echo '<input type="text" name="sp_statistics[' . $league_id . '][' . $div_id . '][' . $column . ']" value="' . esc_attr( $value ) . '" placeholder="' . esc_attr( $placeholder ) . '"' . ( $readonly ? ' disabled="disabled"' : '' ) . ' />';
|
155 |
?></td>
|
156 |
<?php endforeach; ?>
|
157 |
</tr>
|
includes/admin/post-types/meta-boxes/class-sp-meta-box-result-details.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @author ThemeBoy
|
6 |
* @category Admin
|
7 |
* @package SportsPress/Admin/Meta_Boxes
|
8 |
-
* @version
|
9 |
*/
|
10 |
|
11 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
@@ -23,12 +23,31 @@ class SP_Meta_Box_Result_Details extends SP_Meta_Box_Config {
|
|
23 |
*/
|
24 |
public static function output( $post ) {
|
25 |
wp_nonce_field( 'sportspress_save_data', 'sportspress_meta_nonce' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
?>
|
27 |
<p><strong><?php _e( 'Variable', 'sportspress' ); ?></strong></p>
|
28 |
<p>
|
29 |
<input name="sp_default_key" type="hidden" id="sp_default_key" value="<?php echo $post->post_name; ?>">
|
30 |
-
<input name="sp_key" type="text" id="sp_key" value="<?php echo $post->post_name; ?>">
|
|
|
|
|
|
|
|
|
31 |
</p>
|
32 |
<?php
|
33 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
}
|
5 |
* @author ThemeBoy
|
6 |
* @category Admin
|
7 |
* @package SportsPress/Admin/Meta_Boxes
|
8 |
+
* @version 1.9
|
9 |
*/
|
10 |
|
11 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
23 |
*/
|
24 |
public static function output( $post ) {
|
25 |
wp_nonce_field( 'sportspress_save_data', 'sportspress_meta_nonce' );
|
26 |
+
$precision = get_post_meta( $post->ID, 'sp_precision', true );
|
27 |
+
global $pagenow;
|
28 |
+
if ( 'post.php' == $pagenow && 'draft' !== get_post_status() ) {
|
29 |
+
$readonly = true;
|
30 |
+
} else {
|
31 |
+
$readonly = false;
|
32 |
+
}
|
33 |
?>
|
34 |
<p><strong><?php _e( 'Variable', 'sportspress' ); ?></strong></p>
|
35 |
<p>
|
36 |
<input name="sp_default_key" type="hidden" id="sp_default_key" value="<?php echo $post->post_name; ?>">
|
37 |
+
<input name="sp_key" type="text" id="sp_key" value="<?php echo $post->post_name; ?>"<?php if ( $readonly ) { ?> readonly="readonly"<?php } ?>> <span class="description">(for, against)</span>
|
38 |
+
</p>
|
39 |
+
<p><strong><?php _e( 'Decimal Places', 'sportspress' ); ?></strong></p>
|
40 |
+
<p class="sp-precision-selector">
|
41 |
+
<input name="sp_precision" type="text" size="4" id="sp_precision" value="<?php echo $precision; ?>" placeholder="0">
|
42 |
</p>
|
43 |
<?php
|
44 |
}
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Save meta box data
|
48 |
+
*/
|
49 |
+
public static function save( $post_id, $post ) {
|
50 |
+
self::delete_duplicate( $_POST );
|
51 |
+
update_post_meta( $post_id, 'sp_precision', (int) sp_array_value( $_POST, 'sp_precision', 1 ) );
|
52 |
+
}
|
53 |
}
|
includes/admin/post-types/meta-boxes/class-sp-meta-box-result-equation.php
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Result Equation
|
4 |
+
*
|
5 |
+
* @author ThemeBoy
|
6 |
+
* @category Admin
|
7 |
+
* @package SportsPress/Admin/Meta_Boxes
|
8 |
+
* @version 1.9
|
9 |
+
*/
|
10 |
+
|
11 |
+
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
12 |
+
|
13 |
+
if ( ! class_exists( 'SP_Meta_Box_Equation' ) )
|
14 |
+
include( 'class-sp-meta-box-equation.php' );
|
15 |
+
|
16 |
+
/**
|
17 |
+
* SP_Meta_Box_Result_Equation
|
18 |
+
*/
|
19 |
+
class SP_Meta_Box_Result_Equation extends SP_Meta_Box_Equation {
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Output the metabox
|
23 |
+
*/
|
24 |
+
public static function output( $post ) {
|
25 |
+
$equation = get_post_meta( $post->ID, 'sp_equation', true );
|
26 |
+
$groups = array( 'performance' );
|
27 |
+
self::builder( $post->post_title, $equation, $groups );
|
28 |
+
}
|
29 |
+
}
|
includes/admin/post-types/meta-boxes/class-sp-meta-box-statistic-equation.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @author ThemeBoy
|
6 |
* @category Admin
|
7 |
* @package SportsPress/Admin/Meta_Boxes
|
8 |
-
* @version 1.
|
9 |
*/
|
10 |
|
11 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
@@ -23,7 +23,7 @@ class SP_Meta_Box_Statistic_Equation extends SP_Meta_Box_Equation {
|
|
23 |
*/
|
24 |
public static function output( $post ) {
|
25 |
$equation = get_post_meta( $post->ID, 'sp_equation', true );
|
26 |
-
$groups = array( 'player_event', 'outcome', 'performance', 'metric' );
|
27 |
self::builder( $post->post_title, $equation, $groups );
|
28 |
}
|
29 |
}
|
5 |
* @author ThemeBoy
|
6 |
* @category Admin
|
7 |
* @package SportsPress/Admin/Meta_Boxes
|
8 |
+
* @version 1.9
|
9 |
*/
|
10 |
|
11 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
23 |
*/
|
24 |
public static function output( $post ) {
|
25 |
$equation = get_post_meta( $post->ID, 'sp_equation', true );
|
26 |
+
$groups = array( 'player_event', 'outcome', 'result', 'performance', 'metric' );
|
27 |
self::builder( $post->post_title, $equation, $groups );
|
28 |
}
|
29 |
}
|
includes/admin/post-types/meta-boxes/class-sp-meta-box-table-data.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @author ThemeBoy
|
6 |
* @category Admin
|
7 |
* @package SportsPress/Admin/Meta_Boxes
|
8 |
-
* @version 1.
|
9 |
*/
|
10 |
|
11 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
@@ -84,7 +84,7 @@ class SP_Meta_Box_Table_Data {
|
|
84 |
<a class="dashicons dashicons-edit sp-edit" title="<?php _e( 'Edit', 'sportspress' ); ?>"></a>
|
85 |
</span>
|
86 |
<span class="hidden sp-custom-value">
|
87 |
-
<input type="text" name="sp_teams[<?php echo $team_id; ?>][name]" class="name sp-custom-value-input" value="<?php echo sp_array_value( $team_stats, 'name', '' ); ?>" placeholder="<?php echo get_the_title( $team_id ); ?>" size="6">
|
88 |
<a class="button button-secondary sp-cancel"><?php _e( 'Cancel', 'sportspress' ); ?></a>
|
89 |
<a class="button button-primary sp-save"><?php _e( 'Save', 'sportspress' ); ?></a>
|
90 |
</span>
|
@@ -93,7 +93,7 @@ class SP_Meta_Box_Table_Data {
|
|
93 |
$value = sp_array_value( $team_stats, $column, '' );
|
94 |
$placeholder = sp_array_value( sp_array_value( $placeholders, $team_id, array() ), $column, 0 );
|
95 |
?>
|
96 |
-
<td><input type="text" name="sp_teams[<?php echo $team_id; ?>][<?php echo $column; ?>]" value="<?php echo $value; ?>" placeholder="<?php echo $placeholder; ?>" data-placeholder="<?php echo $placeholder; ?>" data-matrix="<?php echo $team_id; ?>_<?php echo $column; ?>" data-adjustment="<?php echo sp_array_value( sp_array_value( $adjustments, $team_id, array() ), $column, 0 ); ?>" /></td>
|
97 |
<?php endforeach; ?>
|
98 |
</tr>
|
99 |
<?php
|
@@ -137,7 +137,7 @@ class SP_Meta_Box_Table_Data {
|
|
137 |
<?php foreach( $columns as $column => $label ):
|
138 |
$value = sp_array_value( sp_array_value( $adjustments, $team_id, array() ), $column, '' );
|
139 |
?>
|
140 |
-
<td><input type="text" name="sp_adjustments[<?php echo $team_id; ?>][<?php echo $column; ?>]" value="<?php echo $value; ?>" placeholder="0" data-matrix="<?php echo $team_id; ?>_<?php echo $column; ?>" /></td>
|
141 |
<?php endforeach; ?>
|
142 |
</tr>
|
143 |
<?php
|
5 |
* @author ThemeBoy
|
6 |
* @category Admin
|
7 |
* @package SportsPress/Admin/Meta_Boxes
|
8 |
+
* @version 1.9.7
|
9 |
*/
|
10 |
|
11 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
84 |
<a class="dashicons dashicons-edit sp-edit" title="<?php _e( 'Edit', 'sportspress' ); ?>"></a>
|
85 |
</span>
|
86 |
<span class="hidden sp-custom-value">
|
87 |
+
<input type="text" name="sp_teams[<?php echo $team_id; ?>][name]" class="name sp-custom-value-input" value="<?php echo esc_attr( sp_array_value( $team_stats, 'name', '' ) ); ?>" placeholder="<?php echo esc_attr( get_the_title( $team_id ) ); ?>" size="6">
|
88 |
<a class="button button-secondary sp-cancel"><?php _e( 'Cancel', 'sportspress' ); ?></a>
|
89 |
<a class="button button-primary sp-save"><?php _e( 'Save', 'sportspress' ); ?></a>
|
90 |
</span>
|
93 |
$value = sp_array_value( $team_stats, $column, '' );
|
94 |
$placeholder = sp_array_value( sp_array_value( $placeholders, $team_id, array() ), $column, 0 );
|
95 |
?>
|
96 |
+
<td><input type="text" name="sp_teams[<?php echo $team_id; ?>][<?php echo $column; ?>]" value="<?php echo esc_attr( $value ); ?>" placeholder="<?php echo esc_attr( $placeholder ); ?>" data-placeholder="<?php echo esc_attr( $placeholder ); ?>" data-matrix="<?php echo $team_id; ?>_<?php echo $column; ?>" data-adjustment="<?php echo esc_attr( sp_array_value( sp_array_value( $adjustments, $team_id, array() ), $column, 0 ) ); ?>" /></td>
|
97 |
<?php endforeach; ?>
|
98 |
</tr>
|
99 |
<?php
|
137 |
<?php foreach( $columns as $column => $label ):
|
138 |
$value = sp_array_value( sp_array_value( $adjustments, $team_id, array() ), $column, '' );
|
139 |
?>
|
140 |
+
<td><input type="text" name="sp_adjustments[<?php echo $team_id; ?>][<?php echo $column; ?>]" value="<?php echo esc_attr( $value ); ?>" placeholder="0" data-matrix="<?php echo $team_id; ?>_<?php echo $column; ?>" /></td>
|
141 |
<?php endforeach; ?>
|
142 |
</tr>
|
143 |
<?php
|
includes/admin/post-types/meta-boxes/class-sp-meta-box-table-details.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @author ThemeBoy
|
6 |
* @category Admin
|
7 |
* @package SportsPress/Admin/Meta_Boxes
|
8 |
-
* @version 1.
|
9 |
*/
|
10 |
|
11 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
@@ -21,6 +21,7 @@ class SP_Meta_Box_Table_Details {
|
|
21 |
public static function output( $post ) {
|
22 |
wp_nonce_field( 'sportspress_save_data', 'sportspress_meta_nonce' );
|
23 |
$taxonomies = get_object_taxonomies( 'sp_table' );
|
|
|
24 |
$select = get_post_meta( $post->ID, 'sp_select', true );
|
25 |
if ( ! $select ) {
|
26 |
global $pagenow;
|
@@ -28,6 +29,9 @@ class SP_Meta_Box_Table_Details {
|
|
28 |
}
|
29 |
?>
|
30 |
<div>
|
|
|
|
|
|
|
31 |
<?php
|
32 |
foreach ( $taxonomies as $taxonomy ) {
|
33 |
sp_taxonomy_field( $taxonomy, $post, true );
|
@@ -43,8 +47,10 @@ class SP_Meta_Box_Table_Details {
|
|
43 |
</select>
|
44 |
</p>
|
45 |
<?php
|
46 |
-
|
47 |
-
|
|
|
|
|
48 |
?>
|
49 |
</div>
|
50 |
<?php
|
@@ -54,6 +60,7 @@ class SP_Meta_Box_Table_Details {
|
|
54 |
* Save meta box data
|
55 |
*/
|
56 |
public static function save( $post_id, $post ) {
|
|
|
57 |
update_post_meta( $post_id, 'sp_select', sp_array_value( $_POST, 'sp_select', array() ) );
|
58 |
sp_update_post_meta_recursive( $post_id, 'sp_team', sp_array_value( $_POST, 'sp_team', array() ) );
|
59 |
}
|
5 |
* @author ThemeBoy
|
6 |
* @category Admin
|
7 |
* @package SportsPress/Admin/Meta_Boxes
|
8 |
+
* @version 1.9.8
|
9 |
*/
|
10 |
|
11 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
21 |
public static function output( $post ) {
|
22 |
wp_nonce_field( 'sportspress_save_data', 'sportspress_meta_nonce' );
|
23 |
$taxonomies = get_object_taxonomies( 'sp_table' );
|
24 |
+
$caption = get_post_meta( $post->ID, 'sp_caption', true );
|
25 |
$select = get_post_meta( $post->ID, 'sp_select', true );
|
26 |
if ( ! $select ) {
|
27 |
global $pagenow;
|
29 |
}
|
30 |
?>
|
31 |
<div>
|
32 |
+
<p><strong><?php _e( 'Heading', 'sportspress' ); ?></strong></p>
|
33 |
+
<p><input type="text" id="sp_caption" name="sp_caption" value="<?php echo esc_attr( $caption ); ?>" placeholder="<?php echo esc_attr( get_the_title() ); ?>"></p>
|
34 |
+
|
35 |
<?php
|
36 |
foreach ( $taxonomies as $taxonomy ) {
|
37 |
sp_taxonomy_field( $taxonomy, $post, true );
|
47 |
</select>
|
48 |
</p>
|
49 |
<?php
|
50 |
+
if ( 'manual' == $select ) {
|
51 |
+
sp_post_checklist( $post->ID, 'sp_team', ( 'auto' == $select ? 'none' : 'block' ), array( 'sp_league', 'sp_season' ) );
|
52 |
+
sp_post_adder( 'sp_team', __( 'Add New', 'sportspress' ) );
|
53 |
+
}
|
54 |
?>
|
55 |
</div>
|
56 |
<?php
|
60 |
* Save meta box data
|
61 |
*/
|
62 |
public static function save( $post_id, $post ) {
|
63 |
+
update_post_meta( $post_id, 'sp_caption', esc_attr( sp_array_value( $_POST, 'sp_caption', 0 ) ) );
|
64 |
update_post_meta( $post_id, 'sp_select', sp_array_value( $_POST, 'sp_select', array() ) );
|
65 |
sp_update_post_meta_recursive( $post_id, 'sp_team', sp_array_value( $_POST, 'sp_team', array() ) );
|
66 |
}
|
includes/admin/post-types/meta-boxes/class-sp-meta-box-team-details.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @author ThemeBoy
|
6 |
* @category Admin
|
7 |
* @package SportsPress/Admin/Meta_Boxes
|
8 |
-
* @version 1.
|
9 |
*/
|
10 |
|
11 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
@@ -20,33 +20,42 @@ class SP_Meta_Box_Team_Details {
|
|
20 |
*/
|
21 |
public static function output( $post ) {
|
22 |
wp_nonce_field( 'sportspress_save_data', 'sportspress_meta_nonce' );
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
|
|
|
|
|
|
29 |
endif;
|
30 |
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
$
|
36 |
-
|
|
|
|
|
37 |
endif;
|
38 |
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
$
|
44 |
-
|
|
|
|
|
45 |
endif;
|
46 |
|
47 |
$abbreviation = get_post_meta( $post->ID, 'sp_abbreviation', true );
|
48 |
$url = get_post_meta( $post->ID, 'sp_url', true );
|
49 |
?>
|
|
|
|
|
50 |
<p><strong><?php _e( 'Competitions', 'sportspress' ); ?></strong></p>
|
51 |
<p><?php
|
52 |
$args = array(
|
@@ -61,7 +70,9 @@ class SP_Meta_Box_Team_Details {
|
|
61 |
);
|
62 |
sp_dropdown_taxonomies( $args );
|
63 |
?></p>
|
|
|
64 |
|
|
|
65 |
<p><strong><?php _e( 'Seasons', 'sportspress' ); ?></strong></p>
|
66 |
<p><?php
|
67 |
$args = array(
|
@@ -76,7 +87,9 @@ class SP_Meta_Box_Team_Details {
|
|
76 |
);
|
77 |
sp_dropdown_taxonomies( $args );
|
78 |
?></p>
|
|
|
79 |
|
|
|
80 |
<p><strong><?php _e( 'Home', 'sportspress' ); ?></strong></p>
|
81 |
<p><?php
|
82 |
$args = array(
|
@@ -91,15 +104,16 @@ class SP_Meta_Box_Team_Details {
|
|
91 |
);
|
92 |
sp_dropdown_taxonomies( $args );
|
93 |
?></p>
|
|
|
94 |
|
95 |
<p><strong><?php _e( 'Site URL', 'sportspress' ); ?></strong></p>
|
96 |
-
<p><input type="text" class="widefat" id="sp_url" name="sp_url" value="<?php echo $url; ?>"></p>
|
97 |
<?php if ( $url ): ?>
|
98 |
<p><a class="sp-link" title="<?php _e( 'Visit Site', 'sportspress' ); ?>" href="<?php echo $url; ?>" target="_blank"><?php _e( 'Visit Site', 'sportspress' ); ?></a></p>
|
99 |
<?php endif; ?>
|
100 |
|
101 |
<p><strong><?php _e( 'Abbreviation', 'sportspress' ); ?></strong></p>
|
102 |
-
<p><input type="text" id="sp_abbreviation" name="sp_abbreviation" value="<?php echo $abbreviation; ?>"></p>
|
103 |
<?php
|
104 |
}
|
105 |
|
@@ -107,7 +121,7 @@ class SP_Meta_Box_Team_Details {
|
|
107 |
* Save meta box data
|
108 |
*/
|
109 |
public static function save( $post_id, $post ) {
|
110 |
-
update_post_meta( $post_id, 'sp_url', sp_array_value( $_POST, 'sp_url', '' ) );
|
111 |
-
update_post_meta( $post_id, 'sp_abbreviation', sp_array_value( $_POST, 'sp_abbreviation', '' ) );
|
112 |
}
|
113 |
}
|
5 |
* @author ThemeBoy
|
6 |
* @category Admin
|
7 |
* @package SportsPress/Admin/Meta_Boxes
|
8 |
+
* @version 1.9.7
|
9 |
*/
|
10 |
|
11 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
20 |
*/
|
21 |
public static function output( $post ) {
|
22 |
wp_nonce_field( 'sportspress_save_data', 'sportspress_meta_nonce' );
|
23 |
+
|
24 |
+
if ( taxonomy_exists( 'sp_league' ) ):
|
25 |
+
$leagues = get_the_terms( $post->ID, 'sp_league' );
|
26 |
+
$league_ids = array();
|
27 |
+
if ( $leagues ):
|
28 |
+
foreach ( $leagues as $league ):
|
29 |
+
$league_ids[] = $league->term_id;
|
30 |
+
endforeach;
|
31 |
+
endif;
|
32 |
endif;
|
33 |
|
34 |
+
if ( taxonomy_exists( 'sp_season' ) ):
|
35 |
+
$seasons = get_the_terms( $post->ID, 'sp_season' );
|
36 |
+
$season_ids = array();
|
37 |
+
if ( $seasons ):
|
38 |
+
foreach ( $seasons as $season ):
|
39 |
+
$season_ids[] = $season->term_id;
|
40 |
+
endforeach;
|
41 |
+
endif;
|
42 |
endif;
|
43 |
|
44 |
+
if ( taxonomy_exists( 'sp_venue' ) ):
|
45 |
+
$venues = get_the_terms( $post->ID, 'sp_venue' );
|
46 |
+
$venue_ids = array();
|
47 |
+
if ( $venues ):
|
48 |
+
foreach ( $venues as $venue ):
|
49 |
+
$venue_ids[] = $venue->term_id;
|
50 |
+
endforeach;
|
51 |
+
endif;
|
52 |
endif;
|
53 |
|
54 |
$abbreviation = get_post_meta( $post->ID, 'sp_abbreviation', true );
|
55 |
$url = get_post_meta( $post->ID, 'sp_url', true );
|
56 |
?>
|
57 |
+
|
58 |
+
<?php if ( taxonomy_exists( 'sp_league' ) ) { ?>
|
59 |
<p><strong><?php _e( 'Competitions', 'sportspress' ); ?></strong></p>
|
60 |
<p><?php
|
61 |
$args = array(
|
70 |
);
|
71 |
sp_dropdown_taxonomies( $args );
|
72 |
?></p>
|
73 |
+
<?php } ?>
|
74 |
|
75 |
+
<?php if ( taxonomy_exists( 'sp_season' ) ) { ?>
|
76 |
<p><strong><?php _e( 'Seasons', 'sportspress' ); ?></strong></p>
|
77 |
<p><?php
|
78 |
$args = array(
|
87 |
);
|
88 |
sp_dropdown_taxonomies( $args );
|
89 |
?></p>
|
90 |
+
<?php } ?>
|
91 |
|
92 |
+
<?php if ( taxonomy_exists( 'sp_venue' ) ) { ?>
|
93 |
<p><strong><?php _e( 'Home', 'sportspress' ); ?></strong></p>
|
94 |
<p><?php
|
95 |
$args = array(
|
104 |
);
|
105 |
sp_dropdown_taxonomies( $args );
|
106 |
?></p>
|
107 |
+
<?php } ?>
|
108 |
|
109 |
<p><strong><?php _e( 'Site URL', 'sportspress' ); ?></strong></p>
|
110 |
+
<p><input type="text" class="widefat" id="sp_url" name="sp_url" value="<?php echo esc_url( $url ); ?>"></p>
|
111 |
<?php if ( $url ): ?>
|
112 |
<p><a class="sp-link" title="<?php _e( 'Visit Site', 'sportspress' ); ?>" href="<?php echo $url; ?>" target="_blank"><?php _e( 'Visit Site', 'sportspress' ); ?></a></p>
|
113 |
<?php endif; ?>
|
114 |
|
115 |
<p><strong><?php _e( 'Abbreviation', 'sportspress' ); ?></strong></p>
|
116 |
+
<p><input type="text" id="sp_abbreviation" name="sp_abbreviation" value="<?php echo esc_attr( $abbreviation ); ?>"></p>
|
117 |
<?php
|
118 |
}
|
119 |
|
121 |
* Save meta box data
|
122 |
*/
|
123 |
public static function save( $post_id, $post ) {
|
124 |
+
update_post_meta( $post_id, 'sp_url', esc_url( sp_array_value( $_POST, 'sp_url', '' ) ) );
|
125 |
+
update_post_meta( $post_id, 'sp_abbreviation', esc_attr( sp_array_value( $_POST, 'sp_abbreviation', '' ) ) );
|
126 |
}
|
127 |
}
|
includes/admin/post-types/meta-boxes/class-sp-meta-box-team-staff.php
ADDED
@@ -0,0 +1,116 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Team Player Staff
|
4 |
+
*
|
5 |
+
* @author ThemeBoy
|
6 |
+
* @category Admin
|
7 |
+
* @package SportsPress/Admin/Meta_Boxes
|
8 |
+
* @version 1.9.13
|
9 |
+
*/
|
10 |
+
|
11 |
+
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
12 |
+
|
13 |
+
/**
|
14 |
+
* SP_Meta_Box_Team_Staff
|
15 |
+
*/
|
16 |
+
class SP_Meta_Box_Team_Staff {
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Output the metabox
|
20 |
+
*/
|
21 |
+
public static function output( $post ) {
|
22 |
+
global $pagenow;
|
23 |
+
|
24 |
+
if ( $pagenow != 'post-new.php' ):
|
25 |
+
|
26 |
+
$team = new SP_Team( $post );
|
27 |
+
list( $data, $checked ) = $team->staff( true );
|
28 |
+
self::table( $data, $checked );
|
29 |
+
|
30 |
+
else:
|
31 |
+
|
32 |
+
printf( __( 'No results found.', 'sportspress' ) );
|
33 |
+
|
34 |
+
endif;
|
35 |
+
}
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Save meta box data
|
39 |
+
*/
|
40 |
+
public static function save( $post_id, $post ) {
|
41 |
+
sp_update_post_meta_recursive( $post_id, 'sp_staff', sp_array_value( $_POST, 'sp_staff', array() ) );
|
42 |
+
}
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Admin edit table
|
46 |
+
*/
|
47 |
+
public static function table( $data = array(), $checked = array() ) {
|
48 |
+
?>
|
49 |
+
<div class="sp-data-table-container">
|
50 |
+
<table class="widefat sp-data-table sp-team-staff-table sp-select-all-range">
|
51 |
+
<thead>
|
52 |
+
<tr>
|
53 |
+
<th class="check-column"><input class="sp-select-all" type="checkbox"></th>
|
54 |
+
<th class="column-staff">
|
55 |
+
<?php _e( 'Staff', 'sportspress' ); ?>
|
56 |
+
</th>
|
57 |
+
<th class="column-role">
|
58 |
+
<?php _e( 'Job', 'sportspress' ); ?>
|
59 |
+
</th>
|
60 |
+
<th class="column-league">
|
61 |
+
<?php _e( 'Competition', 'sportspress' ); ?>
|
62 |
+
</th>
|
63 |
+
<th class="column-season">
|
64 |
+
<?php _e( 'Season', 'sportspress' ); ?>
|
65 |
+
</th>
|
66 |
+
</tr>
|
67 |
+
</thead>
|
68 |
+
<tbody>
|
69 |
+
<?php
|
70 |
+
if ( is_array( $data ) ):
|
71 |
+
if ( sizeof( $data ) > 0 ):
|
72 |
+
$i = 0;
|
73 |
+
foreach ( $data as $staff ):
|
74 |
+
$role = get_post_meta( $staff->ID, 'sp_role', true );
|
75 |
+
?>
|
76 |
+
<tr class="sp-row sp-post<?php if ( $i % 2 == 0 ) echo ' alternate'; ?>">
|
77 |
+
<td>
|
78 |
+
<input type="checkbox" name="sp_staff[]" id="sp_staff_<?php echo $staff->ID; ?>" value="<?php echo $staff->ID; ?>" <?php checked( in_array( $staff->ID, $checked ) ); ?>>
|
79 |
+
</td>
|
80 |
+
<td>
|
81 |
+
<a href="<?php echo get_edit_post_link( $staff->ID ); ?>">
|
82 |
+
<?php echo $staff->post_title; ?>
|
83 |
+
</a>
|
84 |
+
</td>
|
85 |
+
<td><?php echo get_the_terms ( $staff->ID, 'sp_role' ) ? the_terms( $staff->ID, 'sp_role' ) : '—'; ?></td>
|
86 |
+
<td><?php echo get_the_terms ( $staff->ID, 'sp_league' ) ? the_terms( $staff->ID, 'sp_league' ) : '—'; ?></td>
|
87 |
+
<td><?php echo get_the_terms ( $staff->ID, 'sp_season' ) ? the_terms( $staff->ID, 'sp_season' ) : '—'; ?></td>
|
88 |
+
</tr>
|
89 |
+
<?php
|
90 |
+
$i++;
|
91 |
+
endforeach;
|
92 |
+
else:
|
93 |
+
?>
|
94 |
+
<tr class="sp-row alternate">
|
95 |
+
<td colspan="4">
|
96 |
+
<?php _e( 'No results found.', 'sportspress' ); ?>
|
97 |
+
</td>
|
98 |
+
</tr>
|
99 |
+
<?php
|
100 |
+
endif;
|
101 |
+
else:
|
102 |
+
?>
|
103 |
+
<tr class="sp-row alternate">
|
104 |
+
<td colspan="4">
|
105 |
+
<?php printf( __( 'Select %s', 'sportspress' ), __( 'Details', 'sportspress' ) ); ?>
|
106 |
+
</td>
|
107 |
+
</tr>
|
108 |
+
<?php
|
109 |
+
endif;
|
110 |
+
?>
|
111 |
+
</tbody>
|
112 |
+
</table>
|
113 |
+
</div>
|
114 |
+
<?php
|
115 |
+
}
|
116 |
+
}
|
includes/admin/settings/class-sp-settings-events.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @author ThemeBoy
|
6 |
* @category Admin
|
7 |
* @package SportsPress/Admin
|
8 |
-
* @version 1.
|
9 |
*/
|
10 |
|
11 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
@@ -56,13 +56,27 @@ class SP_Settings_Events extends SP_Settings_Page {
|
|
56 |
|
57 |
apply_filters( 'sportspress_event_template_options', array(
|
58 |
array(
|
59 |
-
'title' => __( '
|
60 |
'desc' => __( 'Logos', 'sportspress' ),
|
61 |
'id' => 'sportspress_event_show_logos',
|
62 |
'default' => 'yes',
|
63 |
'type' => 'checkbox',
|
64 |
'checkboxgroup' => 'start',
|
65 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
array(
|
67 |
'desc' => __( 'Results', 'sportspress' ),
|
68 |
'id' => 'sportspress_event_show_results',
|
@@ -85,7 +99,7 @@ class SP_Settings_Events extends SP_Settings_Page {
|
|
85 |
'checkboxgroup' => '',
|
86 |
),
|
87 |
array(
|
88 |
-
'desc' => __( '
|
89 |
'id' => 'sportspress_event_show_performance',
|
90 |
'default' => 'yes',
|
91 |
'type' => 'checkbox',
|
@@ -116,30 +130,13 @@ class SP_Settings_Events extends SP_Settings_Page {
|
|
116 |
'desc' => __( 'teams', 'sportspress' ),
|
117 |
'type' => 'number',
|
118 |
'custom_attributes' => array(
|
119 |
-
'min' =>
|
120 |
'step' => 1
|
121 |
),
|
122 |
),
|
123 |
|
124 |
array( 'type' => 'delimiter' ),
|
125 |
|
126 |
-
array(
|
127 |
-
'title' => __( 'Logos', 'sportspress' ),
|
128 |
-
'desc' => __( 'Display team names', 'sportspress' ),
|
129 |
-
'id' => 'sportspress_event_logos_show_team_names',
|
130 |
-
'default' => 'no',
|
131 |
-
'type' => 'checkbox',
|
132 |
-
'checkboxgroup' => 'start',
|
133 |
-
),
|
134 |
-
|
135 |
-
array(
|
136 |
-
'desc' => __( 'Display results', 'sportspress' ),
|
137 |
-
'id' => 'sportspress_event_logos_show_results',
|
138 |
-
'default' => 'no',
|
139 |
-
'type' => 'checkbox',
|
140 |
-
'checkboxgroup' => 'end',
|
141 |
-
),
|
142 |
-
|
143 |
array(
|
144 |
'title' => __( 'Teams', 'sportspress' ),
|
145 |
'desc' => __( 'Filter by competition', 'sportspress' ),
|
@@ -214,6 +211,57 @@ class SP_Settings_Events extends SP_Settings_Page {
|
|
214 |
array( 'type' => 'sectionend', 'id' => 'event_options' ),
|
215 |
),
|
216 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
217 |
array(
|
218 |
array( 'title' => __( 'Event Results', 'sportspress' ), 'type' => 'title', 'desc' => '', 'id' => 'result_options' ),
|
219 |
),
|
@@ -252,7 +300,7 @@ class SP_Settings_Events extends SP_Settings_Page {
|
|
252 |
),
|
253 |
|
254 |
array(
|
255 |
-
array( 'title' => __( '
|
256 |
),
|
257 |
|
258 |
apply_filters( 'sportspress_performance_options', array(
|
@@ -273,14 +321,6 @@ class SP_Settings_Events extends SP_Settings_Page {
|
|
273 |
'checkboxgroup' => '',
|
274 |
),
|
275 |
|
276 |
-
array(
|
277 |
-
'desc' => __( 'Extras', 'sportspress' ),
|
278 |
-
'id' => 'sportspress_event_show_extras',
|
279 |
-
'default' => 'no',
|
280 |
-
'type' => 'checkbox',
|
281 |
-
'checkboxgroup' => '',
|
282 |
-
),
|
283 |
-
|
284 |
array(
|
285 |
'desc' => __( 'Total', 'sportspress' ),
|
286 |
'id' => 'sportspress_event_show_total',
|
@@ -345,19 +385,15 @@ class SP_Settings_Events extends SP_Settings_Page {
|
|
345 |
),
|
346 |
|
347 |
array(
|
348 |
-
'
|
349 |
-
'id' => '
|
350 |
-
'default' =>
|
351 |
-
'type' => '
|
352 |
-
'
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
'id' => 'sportspress_event_split_players_by_position',
|
358 |
-
'default' => 'no',
|
359 |
-
'type' => 'checkbox',
|
360 |
-
'checkboxgroup' => 'end',
|
361 |
),
|
362 |
|
363 |
array(
|
@@ -401,7 +437,14 @@ class SP_Settings_Events extends SP_Settings_Page {
|
|
401 |
public function delimiter_setting() {
|
402 |
$selection = get_option( 'sportspress_event_teams_delimiter', 'vs' );
|
403 |
$limit = get_option( 'sportspress_event_teams', 2 );
|
404 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
405 |
$example = rtrim( $example, ' %1$s ' );
|
406 |
?>
|
407 |
<tr valign="top">
|
5 |
* @author ThemeBoy
|
6 |
* @category Admin
|
7 |
* @package SportsPress/Admin
|
8 |
+
* @version 1.9.19
|
9 |
*/
|
10 |
|
11 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
56 |
|
57 |
apply_filters( 'sportspress_event_template_options', array(
|
58 |
array(
|
59 |
+
'title' => __( 'Display', 'sportspress' ),
|
60 |
'desc' => __( 'Logos', 'sportspress' ),
|
61 |
'id' => 'sportspress_event_show_logos',
|
62 |
'default' => 'yes',
|
63 |
'type' => 'checkbox',
|
64 |
'checkboxgroup' => 'start',
|
65 |
),
|
66 |
+
array(
|
67 |
+
'desc' => __( 'Date', 'sportspress' ),
|
68 |
+
'id' => 'sportspress_event_show_date',
|
69 |
+
'default' => 'yes',
|
70 |
+
'type' => 'checkbox',
|
71 |
+
'checkboxgroup' => '',
|
72 |
+
),
|
73 |
+
array(
|
74 |
+
'desc' => __( 'Time', 'sportspress' ),
|
75 |
+
'id' => 'sportspress_event_show_time',
|
76 |
+
'default' => 'yes',
|
77 |
+
'type' => 'checkbox',
|
78 |
+
'checkboxgroup' => '',
|
79 |
+
),
|
80 |
array(
|
81 |
'desc' => __( 'Results', 'sportspress' ),
|
82 |
'id' => 'sportspress_event_show_results',
|
99 |
'checkboxgroup' => '',
|
100 |
),
|
101 |
array(
|
102 |
+
'desc' => __( 'Scorecard', 'sportspress' ),
|
103 |
'id' => 'sportspress_event_show_performance',
|
104 |
'default' => 'yes',
|
105 |
'type' => 'checkbox',
|
130 |
'desc' => __( 'teams', 'sportspress' ),
|
131 |
'type' => 'number',
|
132 |
'custom_attributes' => array(
|
133 |
+
'min' => 0,
|
134 |
'step' => 1
|
135 |
),
|
136 |
),
|
137 |
|
138 |
array( 'type' => 'delimiter' ),
|
139 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
140 |
array(
|
141 |
'title' => __( 'Teams', 'sportspress' ),
|
142 |
'desc' => __( 'Filter by competition', 'sportspress' ),
|
211 |
array( 'type' => 'sectionend', 'id' => 'event_options' ),
|
212 |
),
|
213 |
|
214 |
+
array(
|
215 |
+
array( 'title' => __( 'Venues', 'sportspress' ), 'type' => 'title', 'desc' => '', 'id' => 'venue_options' ),
|
216 |
+
),
|
217 |
+
|
218 |
+
apply_filters( 'sportspress_venue_options', array(
|
219 |
+
array(
|
220 |
+
'title' => __( 'Zoom', 'sportspress' ),
|
221 |
+
'id' => 'sportspress_map_zoom',
|
222 |
+
'class' => 'small-text',
|
223 |
+
'default' => '15',
|
224 |
+
'desc' => '0 - 21',
|
225 |
+
'type' => 'number',
|
226 |
+
'custom_attributes' => array(
|
227 |
+
'min' => 0,
|
228 |
+
'max' => 21,
|
229 |
+
'step' => 1
|
230 |
+
),
|
231 |
+
),
|
232 |
+
) ),
|
233 |
+
|
234 |
+
array(
|
235 |
+
array( 'type' => 'sectionend', 'id' => 'venue_options' ),
|
236 |
+
),
|
237 |
+
|
238 |
+
array(
|
239 |
+
array( 'title' => __( 'Logos', 'sportspress' ), 'type' => 'title', 'desc' => '', 'id' => 'event_logo_options' ),
|
240 |
+
),
|
241 |
+
|
242 |
+
apply_filters( 'sportspress_event_logo_options', array(
|
243 |
+
array(
|
244 |
+
'title' => __( 'Display', 'sportspress' ),
|
245 |
+
'desc' => __( 'Display team names', 'sportspress' ),
|
246 |
+
'id' => 'sportspress_event_logos_show_team_names',
|
247 |
+
'default' => 'no',
|
248 |
+
'type' => 'checkbox',
|
249 |
+
'checkboxgroup' => 'start',
|
250 |
+
),
|
251 |
+
|
252 |
+
array(
|
253 |
+
'desc' => __( 'Display results', 'sportspress' ),
|
254 |
+
'id' => 'sportspress_event_logos_show_results',
|
255 |
+
'default' => 'no',
|
256 |
+
'type' => 'checkbox',
|
257 |
+
'checkboxgroup' => 'end',
|
258 |
+
),
|
259 |
+
) ),
|
260 |
+
|
261 |
+
array(
|
262 |
+
array( 'type' => 'sectionend', 'id' => 'event_logo_options' ),
|
263 |
+
),
|
264 |
+
|
265 |
array(
|
266 |
array( 'title' => __( 'Event Results', 'sportspress' ), 'type' => 'title', 'desc' => '', 'id' => 'result_options' ),
|
267 |
),
|
300 |
),
|
301 |
|
302 |
array(
|
303 |
+
array( 'title' => __( 'Scorecard', 'sportspress' ), 'type' => 'title', 'desc' => '', 'id' => 'performance_options' ),
|
304 |
),
|
305 |
|
306 |
apply_filters( 'sportspress_performance_options', array(
|
321 |
'checkboxgroup' => '',
|
322 |
),
|
323 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
324 |
array(
|
325 |
'desc' => __( 'Total', 'sportspress' ),
|
326 |
'id' => 'sportspress_event_show_total',
|
385 |
),
|
386 |
|
387 |
array(
|
388 |
+
'title' => __( 'Performance', 'sportspress' ),
|
389 |
+
'id' => 'sportspress_event_performance_sections',
|
390 |
+
'default' => -1,
|
391 |
+
'type' => 'radio',
|
392 |
+
'options' => array(
|
393 |
+
-1 => __( 'Combined', 'sportspress' ),
|
394 |
+
0 => __( 'Offense', 'sportspress' ) . ' → ' . __( 'Defense', 'sportspress' ),
|
395 |
+
1 => __( 'Defense', 'sportspress' ) . ' → ' . __( 'Offense', 'sportspress' ),
|
396 |
+
),
|
|
|
|
|
|
|
|
|
397 |
),
|
398 |
|
399 |
array(
|
437 |
public function delimiter_setting() {
|
438 |
$selection = get_option( 'sportspress_event_teams_delimiter', 'vs' );
|
439 |
$limit = get_option( 'sportspress_event_teams', 2 );
|
440 |
+
if ( 0 == $limit ) {
|
441 |
+
$limit = 2;
|
442 |
+
}
|
443 |
+
if ( 3 >= $limit ) {
|
444 |
+
$example = str_repeat( __( 'Team', 'sportspress' ) . ' %1$s ', $limit );
|
445 |
+
} else {
|
446 |
+
$example = str_repeat( __( 'Team', 'sportspress' ) . ' %1$s ', 3 ) . '…';
|
447 |
+
}
|
448 |
$example = rtrim( $example, ' %1$s ' );
|
449 |
?>
|
450 |
<tr valign="top">
|
includes/admin/settings/class-sp-settings-general.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @author ThemeBoy
|
6 |
* @category Admin
|
7 |
* @package SportsPress/Admin
|
8 |
-
* @version 1.
|
9 |
*/
|
10 |
|
11 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
@@ -149,6 +149,15 @@ class SP_Settings_General extends SP_Settings_Page {
|
|
149 |
'type' => 'checkbox',
|
150 |
'checkboxgroup' => 'end',
|
151 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
152 |
));
|
153 |
|
154 |
if ( apply_filters( 'sportspress_enable_header', false ) ) {
|
@@ -204,8 +213,6 @@ class SP_Settings_General extends SP_Settings_Page {
|
|
204 |
if ( isset( $_POST['gmt_offset'] ) )
|
205 |
update_option( 'gmt_offset', $_POST['gmt_offset'] );
|
206 |
|
207 |
-
update_option( 'sportspress_enable_frontend_css', isset( $_POST['sportspress_enable_frontend_css'] ) ? 'yes' : 'no' );
|
208 |
-
|
209 |
if ( isset( $_POST['sportspress_frontend_css_primary'] ) ) {
|
210 |
|
211 |
// Save settings
|
@@ -214,6 +221,7 @@ class SP_Settings_General extends SP_Settings_Page {
|
|
214 |
$text = ( ! empty( $_POST['sportspress_frontend_css_text'] ) ) ? sp_format_hex( $_POST['sportspress_frontend_css_text'] ) : '';
|
215 |
$heading = ( ! empty( $_POST['sportspress_frontend_css_heading'] ) ) ? sp_format_hex( $_POST['sportspress_frontend_css_heading'] ) : '';
|
216 |
$link = ( ! empty( $_POST['sportspress_frontend_css_link'] ) ) ? sp_format_hex( $_POST['sportspress_frontend_css_link'] ) : '';
|
|
|
217 |
|
218 |
$colors = array(
|
219 |
'primary' => $primary,
|
@@ -221,6 +229,7 @@ class SP_Settings_General extends SP_Settings_Page {
|
|
221 |
'text' => $text,
|
222 |
'heading' => $heading,
|
223 |
'link' => $link,
|
|
|
224 |
);
|
225 |
|
226 |
// Merge with existing options if available
|
@@ -321,6 +330,11 @@ class SP_Settings_General extends SP_Settings_Page {
|
|
321 |
$colors = array_map( 'esc_attr', (array) get_option( 'themeboy', array() ) );
|
322 |
if ( empty( $colors ) ) $colors = array_map( 'esc_attr', (array) get_option( 'sportspress_frontend_css_colors', array() ) );
|
323 |
|
|
|
|
|
|
|
|
|
|
|
324 |
// Defaults
|
325 |
if ( empty( $colors['primary'] ) ) $colors['primary'] = '#2b353e';
|
326 |
if ( empty( $colors['background'] ) ) $colors['background'] = '#f4f4f4';
|
@@ -337,8 +351,8 @@ class SP_Settings_General extends SP_Settings_Page {
|
|
337 |
|
338 |
if ( ( $styles = SP_Frontend_Scripts::get_styles() ) && array_key_exists( 'sportspress-general', $styles ) ):
|
339 |
?><br>
|
340 |
-
<label for="
|
341 |
-
<input name="
|
342 |
<?php _e( 'Enable', 'sportspress' ); ?>
|
343 |
</label>
|
344 |
<?php endif; ?>
|
5 |
* @author ThemeBoy
|
6 |
* @category Admin
|
7 |
* @package SportsPress/Admin
|
8 |
+
* @version 1.9.17
|
9 |
*/
|
10 |
|
11 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
149 |
'type' => 'checkbox',
|
150 |
'checkboxgroup' => 'end',
|
151 |
),
|
152 |
+
|
153 |
+
array(
|
154 |
+
'title' => __( 'Widgets', 'sportspress' ),
|
155 |
+
'desc' => __( 'Unique', 'sportspress' ),
|
156 |
+
'id' => 'sportspress_widget_unique',
|
157 |
+
'default' => 'no',
|
158 |
+
'type' => 'checkbox',
|
159 |
+
'desc_tip' => __( 'Hide widget when same as content.', 'sportspress' ),
|
160 |
+
),
|
161 |
));
|
162 |
|
163 |
if ( apply_filters( 'sportspress_enable_header', false ) ) {
|
213 |
if ( isset( $_POST['gmt_offset'] ) )
|
214 |
update_option( 'gmt_offset', $_POST['gmt_offset'] );
|
215 |
|
|
|
|
|
216 |
if ( isset( $_POST['sportspress_frontend_css_primary'] ) ) {
|
217 |
|
218 |
// Save settings
|
221 |
$text = ( ! empty( $_POST['sportspress_frontend_css_text'] ) ) ? sp_format_hex( $_POST['sportspress_frontend_css_text'] ) : '';
|
222 |
$heading = ( ! empty( $_POST['sportspress_frontend_css_heading'] ) ) ? sp_format_hex( $_POST['sportspress_frontend_css_heading'] ) : '';
|
223 |
$link = ( ! empty( $_POST['sportspress_frontend_css_link'] ) ) ? sp_format_hex( $_POST['sportspress_frontend_css_link'] ) : '';
|
224 |
+
$customize = ( ! empty( $_POST['sportspress_frontend_css_customize'] ) ) ? 1 : '';
|
225 |
|
226 |
$colors = array(
|
227 |
'primary' => $primary,
|
229 |
'text' => $text,
|
230 |
'heading' => $heading,
|
231 |
'link' => $link,
|
232 |
+
'customize' => $customize,
|
233 |
);
|
234 |
|
235 |
// Merge with existing options if available
|
330 |
$colors = array_map( 'esc_attr', (array) get_option( 'themeboy', array() ) );
|
331 |
if ( empty( $colors ) ) $colors = array_map( 'esc_attr', (array) get_option( 'sportspress_frontend_css_colors', array() ) );
|
332 |
|
333 |
+
// Fallback
|
334 |
+
if ( ! isset( $colors['customize'] ) ) {
|
335 |
+
$colors['customize'] = ( 'yes' == get_option( 'sportspress_enable_frontend_css', 'no' ) );
|
336 |
+
}
|
337 |
+
|
338 |
// Defaults
|
339 |
if ( empty( $colors['primary'] ) ) $colors['primary'] = '#2b353e';
|
340 |
if ( empty( $colors['background'] ) ) $colors['background'] = '#f4f4f4';
|
351 |
|
352 |
if ( ( $styles = SP_Frontend_Scripts::get_styles() ) && array_key_exists( 'sportspress-general', $styles ) ):
|
353 |
?><br>
|
354 |
+
<label for="sportspress_frontend_css_customize">
|
355 |
+
<input name="sportspress_frontend_css_customize" id="sportspress_frontend_css_customize" type="checkbox" value="1" <?php checked( $colors['customize'] ); ?>>
|
356 |
<?php _e( 'Enable', 'sportspress' ); ?>
|
357 |
</label>
|
358 |
<?php endif; ?>
|
includes/admin/settings/class-sp-settings-modules.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @author ThemeBoy
|
6 |
* @category Admin
|
7 |
* @package SportsPress/Admin
|
8 |
-
* @version 1.
|
9 |
*/
|
10 |
|
11 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
@@ -74,25 +74,6 @@ class SP_Settings_Modules extends SP_Settings_Page {
|
|
74 |
</table>
|
75 |
<?php } ?>
|
76 |
|
77 |
-
<?php if ( current_user_can( 'install_plugins' ) && ! class_exists( 'SportsPress_TV' ) ) { ?>
|
78 |
-
<table class="widefat" cellspacing="0">
|
79 |
-
<thead>
|
80 |
-
<tr><th>
|
81 |
-
<img src="<?php echo plugin_dir_url( SP_PLUGIN_FILE ); ?>/assets/images/modules/sportspress-tv-sidebar.png" alt="<?php _e( 'SportsPress TV', 'sportspress' ); ?>">
|
82 |
-
</th></tr>
|
83 |
-
</thead>
|
84 |
-
<tbody>
|
85 |
-
<tr><td>
|
86 |
-
<p><?php _e( 'Offer premium news & highlights from leading global sports. SportsPress TV will keep your visitors entertained for hours.','sportspress' ); ?></p>
|
87 |
-
<p class="sp-module-actions">
|
88 |
-
<span><?php _e( 'Free', 'sportspress' ); ?></span>
|
89 |
-
<a class="button thickbox" href="<?php echo add_query_arg( array( 'tab' => 'plugin-information', 'plugin' => 'sportspress-tv', 'TB_iframe' => 'true', 'width' => '80%', 'height' => '500' ), network_admin_url( 'plugin-install.php' ) ); ?>"><?php _e( 'Install Now', 'sportspress' ); ?></a>
|
90 |
-
</p>
|
91 |
-
</td></tr>
|
92 |
-
</tbody>
|
93 |
-
</table>
|
94 |
-
<?php } ?>
|
95 |
-
|
96 |
<?php if ( ! class_exists( 'SportsPress_Twitter' ) ) { ?>
|
97 |
<table class="widefat" cellspacing="0">
|
98 |
<thead>
|
@@ -167,42 +148,69 @@ class SP_Settings_Modules extends SP_Settings_Page {
|
|
167 |
<?php } ?>
|
168 |
<?php } ?>
|
169 |
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
194 |
<?php } ?>
|
195 |
-
</
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
<li><a href="http://tboy.co/facebook" target="_blank"><?php _e( 'Facebook', 'sportspress' ); ?></a></li>
|
200 |
-
<li><a href="http://tboy.co/youtube" target="_blank"><?php _e( 'YouTube', 'sportspress' ); ?></a></li>
|
201 |
-
<li><a href="http://tboy.co/gplus" target="_blank"><?php _e( 'Google+', 'sportspress' ); ?></a></li>
|
202 |
-
</ul>
|
203 |
-
</td></tr>
|
204 |
-
</tbody>
|
205 |
-
</table>
|
206 |
|
207 |
<?php do_action( 'sportspress_modules_after_sidebar' ); ?>
|
208 |
</div>
|
5 |
* @author ThemeBoy
|
6 |
* @category Admin
|
7 |
* @package SportsPress/Admin
|
8 |
+
* @version 1.9.17
|
9 |
*/
|
10 |
|
11 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
74 |
</table>
|
75 |
<?php } ?>
|
76 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
<?php if ( ! class_exists( 'SportsPress_Twitter' ) ) { ?>
|
78 |
<table class="widefat" cellspacing="0">
|
79 |
<thead>
|
148 |
<?php } ?>
|
149 |
<?php } ?>
|
150 |
|
151 |
+
<?php
|
152 |
+
$categories = array(
|
153 |
+
'documentation' => array(
|
154 |
+
'icon' => 'sp-icon-book',
|
155 |
+
'label' => __( 'Documentation', 'sportspress' ),
|
156 |
+
'links' => array(
|
157 |
+
'http://tboy.co/installation' => __( 'Getting Started', 'sportspress' ),
|
158 |
+
'http://tboy.co/manuals' => __( 'Manuals', 'sportspress' ),
|
159 |
+
'http://tboy.co/videos' => __( 'Videos', 'sportspress' ),
|
160 |
+
'http://tboy.co/developers' => __( 'Developers', 'sportspress' ),
|
161 |
+
'http://tboy.co/integration' => __( 'Theme Integration Guide', 'sportspress' ),
|
162 |
+
),
|
163 |
+
),
|
164 |
+
'help' => array(
|
165 |
+
'icon' => 'dashicons dashicons-heart',
|
166 |
+
'label' => __( 'Help', 'sportspress' ),
|
167 |
+
'links' => array(
|
168 |
+
'http://tboy.co/forums' => __( 'Support Forums', 'sportspress' ),
|
169 |
+
'http://tboy.co/ideas' => __( 'Feature Requests', 'sportspress' ),
|
170 |
+
),
|
171 |
+
),
|
172 |
+
'social' => array(
|
173 |
+
'icon' => 'dashicons dashicons-share',
|
174 |
+
'label' => __( 'Connect', 'sportspress' ),
|
175 |
+
'links' => array(
|
176 |
+
'http://tboy.co/twitter' => __( 'Twitter', 'sportspress' ),
|
177 |
+
'http://tboy.co/facebook' => __( 'Facebook', 'sportspress' ),
|
178 |
+
'http://tboy.co/youtube' => __( 'YouTube', 'sportspress' ),
|
179 |
+
'http://tboy.co/gplus' => __( 'Google+', 'sportspress' ),
|
180 |
+
),
|
181 |
+
),
|
182 |
+
);
|
183 |
+
|
184 |
+
if ( class_exists( 'SportsPress_Pro' ) ) {
|
185 |
+
$categories['help']['links']['http://support.themeboy.com/'] = __( 'Premium Support', 'sportspress' );
|
186 |
+
} else {
|
187 |
+
$categories['help']['links']['http://tboy.co/pro'] = '<span class="sp-desc-tip" title="' . __( 'Upgrade to Pro', 'sportspress' ) . '">' . __( 'Premium Support', 'sportspress' ) . '</span>';
|
188 |
+
}
|
189 |
+
|
190 |
+
$categories = apply_filters( 'sportspress_modules_welcome_links', $categories );
|
191 |
+
|
192 |
+
if ( sizeof( $categories ) ) {
|
193 |
+
?>
|
194 |
+
<table class="widefat" cellspacing="0">
|
195 |
+
<thead>
|
196 |
+
<tr><th>
|
197 |
+
<strong><?php _e( 'Welcome to SportsPress', 'sportspress' ); ?></strong>
|
198 |
+
</th></tr>
|
199 |
+
</thead>
|
200 |
+
<tbody>
|
201 |
+
<tr><td>
|
202 |
+
<?php foreach ( $categories as $slug => $category ) { ?>
|
203 |
+
<p><strong><i class="<?php echo $category['icon']; ?>"></i> <?php echo $category['label']; ?></strong></p>
|
204 |
+
<ul class="sp-<?php echo $slug; ?>-links">
|
205 |
+
<?php foreach ( $category['links'] as $url => $text ) { ?>
|
206 |
+
<li><a href="<?php echo $url; ?>" target="_blank"><?php echo $text; ?></a></li>
|
207 |
+
<?php } ?>
|
208 |
+
</ul>
|
209 |
<?php } ?>
|
210 |
+
</td></tr>
|
211 |
+
</tbody>
|
212 |
+
</table>
|
213 |
+
<?php } ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
214 |
|
215 |
<?php do_action( 'sportspress_modules_after_sidebar' ); ?>
|
216 |
</div>
|
includes/admin/settings/class-sp-settings-players.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @author ThemeBoy
|
6 |
* @category Admin
|
7 |
* @package SportsPress/Admin
|
8 |
-
* @version 1.
|
9 |
*/
|
10 |
|
11 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
@@ -52,7 +52,7 @@ class SP_Settings_Players extends SP_Settings_Page {
|
|
52 |
),
|
53 |
|
54 |
array(
|
55 |
-
'title' => __( '
|
56 |
'desc' => __( 'Photo', 'sportspress' ),
|
57 |
'id' => 'sportspress_player_show_photo',
|
58 |
'default' => 'yes',
|
@@ -106,6 +106,22 @@ class SP_Settings_Players extends SP_Settings_Page {
|
|
106 |
'id' => 'sportspress_player_show_past_teams',
|
107 |
'default' => 'yes',
|
108 |
'type' => 'checkbox',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
109 |
'checkboxgroup' => 'end',
|
110 |
),
|
111 |
|
5 |
* @author ThemeBoy
|
6 |
* @category Admin
|
7 |
* @package SportsPress/Admin
|
8 |
+
* @version 1.9
|
9 |
*/
|
10 |
|
11 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
52 |
),
|
53 |
|
54 |
array(
|
55 |
+
'title' => __( 'Display', 'sportspress' ),
|
56 |
'desc' => __( 'Photo', 'sportspress' ),
|
57 |
'id' => 'sportspress_player_show_photo',
|
58 |
'default' => 'yes',
|
106 |
'id' => 'sportspress_player_show_past_teams',
|
107 |
'default' => 'yes',
|
108 |
'type' => 'checkbox',
|
109 |
+
'checkboxgroup' => '',
|
110 |
+
),
|
111 |
+
|
112 |
+
array(
|
113 |
+
'desc' => __( 'Competitions', 'sportspress' ),
|
114 |
+
'id' => 'sportspress_player_show_leagues',
|
115 |
+
'default' => 'no',
|
116 |
+
'type' => 'checkbox',
|
117 |
+
'checkboxgroup' => '',
|
118 |
+
),
|
119 |
+
|
120 |
+
array(
|
121 |
+
'desc' => __( 'Seasons', 'sportspress' ),
|
122 |
+
'id' => 'sportspress_player_show_seasons',
|
123 |
+
'default' => 'no',
|
124 |
+
'type' => 'checkbox',
|
125 |
'checkboxgroup' => 'end',
|
126 |
),
|
127 |
|
includes/admin/settings/class-sp-settings-staff.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @author ThemeBoy
|
6 |
* @category Admin
|
7 |
* @package SportsPress/Admin
|
8 |
-
* @version 1.
|
9 |
*/
|
10 |
|
11 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
@@ -51,7 +51,7 @@ class SP_Settings_Staff extends SP_Settings_Page {
|
|
51 |
),
|
52 |
|
53 |
array(
|
54 |
-
'title' => __( '
|
55 |
'desc' => __( 'Photo', 'sportspress' ),
|
56 |
'id' => 'sportspress_staff_show_photo',
|
57 |
'default' => 'yes',
|
5 |
* @author ThemeBoy
|
6 |
* @category Admin
|
7 |
* @package SportsPress/Admin
|
8 |
+
* @version 1.9
|
9 |
*/
|
10 |
|
11 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
51 |
),
|
52 |
|
53 |
array(
|
54 |
+
'title' => __( 'Display', 'sportspress' ),
|
55 |
'desc' => __( 'Photo', 'sportspress' ),
|
56 |
'id' => 'sportspress_staff_show_photo',
|
57 |
'default' => 'yes',
|
includes/admin/settings/class-sp-settings-teams.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @author ThemeBoy
|
6 |
* @category Admin
|
7 |
* @package SportsPress/Admin
|
8 |
-
* @version 1.
|
9 |
*/
|
10 |
|
11 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
@@ -52,7 +52,7 @@ class SP_Settings_Teams extends SP_Settings_Page {
|
|
52 |
),
|
53 |
|
54 |
array(
|
55 |
-
'title' => __( '
|
56 |
'desc' => __( 'Logo', 'sportspress' ),
|
57 |
'id' => 'sportspress_team_show_logo',
|
58 |
'default' => 'yes',
|
5 |
* @author ThemeBoy
|
6 |
* @category Admin
|
7 |
* @package SportsPress/Admin
|
8 |
+
* @version 1.9
|
9 |
*/
|
10 |
|
11 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
52 |
),
|
53 |
|
54 |
array(
|
55 |
+
'title' => __( 'Display', 'sportspress' ),
|
56 |
'desc' => __( 'Logo', 'sportspress' ),
|
57 |
'id' => 'sportspress_team_show_logo',
|
58 |
'default' => 'yes',
|
includes/admin/views/html-admin-config.php
CHANGED
@@ -34,7 +34,7 @@
|
|
34 |
<?php if ( $data ): $i = 0; foreach ( $data as $row ): ?>
|
35 |
<tr<?php if ( $i % 2 == 0 ) echo ' class="alternate"'; ?>>
|
36 |
<td class="row-title"><?php echo $row->post_title; ?></td>
|
37 |
-
<td><?php echo $row->post_name; ?></td>
|
38 |
<td><?php echo sp_get_post_abbreviation( $row->ID ); ?></td>
|
39 |
<td><?php echo sp_get_post_condition( $row->ID ); ?></td>
|
40 |
<td><p class="description"><?php echo $row->post_excerpt; ?></p></td>
|
@@ -84,6 +84,8 @@
|
|
84 |
<th class="radio" scope="col"><?php _e( 'Primary', 'sportspress' ); ?></th>
|
85 |
<th scope="col"><?php _e( 'Label', 'sportspress' ); ?></th>
|
86 |
<th scope="col"><?php _e( 'Variables', 'sportspress' ); ?></th>
|
|
|
|
|
87 |
<th scope="col"><?php _e( 'Description', 'sportspress' ); ?></th>
|
88 |
<th scope="col" class="edit"></th>
|
89 |
</tr>
|
@@ -91,7 +93,7 @@
|
|
91 |
<tfoot>
|
92 |
<tr>
|
93 |
<th class="radio"><input type="radio" class="sp-primary-result-option" id="sportspress_primary_result_0" name="sportspress_primary_result" value="0" <?php checked( $selection, 0 ); ?>></th>
|
94 |
-
<th colspan="
|
95 |
<?php
|
96 |
if ( sizeof( $data ) > 0 ):
|
97 |
$default = end( $data );
|
@@ -108,13 +110,15 @@
|
|
108 |
<tr<?php if ( $i % 2 == 0 ) echo ' class="alternate"'; ?>>
|
109 |
<td class="radio"><input type="radio" class="sp-primary-result-option" id="sportspress_primary_result_<?php echo $row->post_name; ?>" name="sportspress_primary_result" value="<?php echo $row->post_name; ?>" <?php checked( $selection, $row->post_name ); ?>></td>
|
110 |
<td class="row-title"><label for="sportspress_primary_result_<?php echo $row->post_name; ?>"><?php echo $row->post_title; ?></label></td>
|
111 |
-
<td><?php echo $row->post_name; ?>for
|
|
|
|
|
112 |
<td><p class="description"><?php echo $row->post_excerpt; ?></p></td>
|
113 |
<td class="edit"><a class="button" href="<?php echo get_edit_post_link( $row->ID ); ?>"><?php _e( 'Edit', 'sportspress' ); ?></s></td>
|
114 |
</tr>
|
115 |
<?php $i++; endforeach; else: ?>
|
116 |
<tr class="alternate">
|
117 |
-
<td colspan="
|
118 |
</tr>
|
119 |
<?php endif; ?>
|
120 |
</table>
|
@@ -158,7 +162,8 @@
|
|
158 |
<th class="icon" scope="col"><?php _e( 'Icon', 'sportspress' ); ?></th>
|
159 |
<th scope="col"><?php _e( 'Label', 'sportspress' ); ?></th>
|
160 |
<th scope="col"><?php _e( 'Variable', 'sportspress' ); ?></th>
|
161 |
-
<th scope="col"><?php _e( '
|
|
|
162 |
<th scope="col"><?php _e( 'Description', 'sportspress' ); ?></th>
|
163 |
<th scope="col" class="edit"></th>
|
164 |
</tr>
|
@@ -167,7 +172,7 @@
|
|
167 |
<tr>
|
168 |
<th class="radio"><input type="radio" class="sp-primary-performance-option" id="sportspress_primary_performance_0" name="sportspress_primary_performance" value="0" <?php checked( $selection, 0 ); ?>></th>
|
169 |
<th class="icon"> </td>
|
170 |
-
<th colspan="
|
171 |
<?php
|
172 |
if ( sizeof( $data ) > 0 ):
|
173 |
$default = reset( $data );
|
@@ -185,20 +190,23 @@
|
|
185 |
<td class="icon">
|
186 |
<?php
|
187 |
if ( has_post_thumbnail( $row->ID ) )
|
188 |
-
|
189 |
else
|
190 |
-
|
|
|
|
|
191 |
?>
|
192 |
</td>
|
193 |
<td class="row-title"><?php echo $row->post_title; ?></td>
|
194 |
-
<td><?php echo $row->post_name; ?></td>
|
195 |
-
<td><?php echo
|
|
|
196 |
<td><p class="description"><?php echo $row->post_excerpt; ?></p></td>
|
197 |
<td class="edit"><a class="button" href="<?php echo get_edit_post_link( $row->ID ); ?>"><?php _e( 'Edit', 'sportspress' ); ?></s></td>
|
198 |
</tr>
|
199 |
<?php $i++; endforeach; else: ?>
|
200 |
<tr class="alternate">
|
201 |
-
<td colspan="
|
202 |
</tr>
|
203 |
<?php endif; ?>
|
204 |
</table>
|
@@ -234,7 +242,6 @@
|
|
234 |
<thead>
|
235 |
<tr>
|
236 |
<th scope="col"><?php _e( 'Label', 'sportspress' ); ?></th>
|
237 |
-
<th scope="col"><?php _e( 'Key', 'sportspress' ); ?></th>
|
238 |
<th scope="col"><?php _e( 'Equation', 'sportspress' ); ?></th>
|
239 |
<th scope="col"><?php _e( 'Decimal Places', 'sportspress' ); ?></th>
|
240 |
<th scope="col"><?php _e( 'Sort Order', 'sportspress' ); ?></th>
|
@@ -245,7 +252,6 @@
|
|
245 |
<?php if ( $data ): $i = 0; foreach ( $data as $row ): ?>
|
246 |
<tr<?php if ( $i % 2 == 0 ) echo ' class="alternate"'; ?>>
|
247 |
<td class="row-title"><?php echo $row->post_title; ?></td>
|
248 |
-
<td><?php echo $row->post_name; ?></td>
|
249 |
<td><?php echo sp_get_post_equation( $row->ID ); ?></td>
|
250 |
<td><?php echo sp_get_post_precision( $row->ID ); ?></td>
|
251 |
<td><?php echo sp_get_post_order( $row->ID ); ?></td>
|
@@ -298,7 +304,7 @@
|
|
298 |
<?php if ( $data ): $i = 0; foreach ( $data as $row ): ?>
|
299 |
<tr<?php if ( $i % 2 == 0 ) echo ' class="alternate"'; ?>>
|
300 |
<td class="row-title"><?php echo $row->post_title; ?></td>
|
301 |
-
<td><?php echo $row->post_name; ?></td>
|
302 |
<td><p class="description"><?php echo $row->post_excerpt; ?></p></td>
|
303 |
<td class="edit"><a class="button" href="<?php echo get_edit_post_link( $row->ID ); ?>"><?php _e( 'Edit', 'sportspress' ); ?></s></td>
|
304 |
</tr>
|
@@ -339,7 +345,6 @@
|
|
339 |
<thead>
|
340 |
<tr>
|
341 |
<th scope="col"><?php _e( 'Label', 'sportspress' ); ?></th>
|
342 |
-
<th scope="col"><?php _e( 'Key', 'sportspress' ); ?></th>
|
343 |
<th scope="col"><?php _e( 'Equation', 'sportspress' ); ?></th>
|
344 |
<th scope="col"><?php _e( 'Decimal Places', 'sportspress' ); ?></th>
|
345 |
<th scope="col"><?php _e( 'Description', 'sportspress' ); ?></th>
|
@@ -349,7 +354,6 @@
|
|
349 |
<?php if ( $data ): $i = 0; foreach ( $data as $row ): ?>
|
350 |
<tr<?php if ( $i % 2 == 0 ) echo ' class="alternate"'; ?>>
|
351 |
<td class="row-title"><?php echo $row->post_title; ?></td>
|
352 |
-
<td><?php echo $row->post_name; ?></td>
|
353 |
<td><?php echo sp_get_post_equation( $row->ID ); ?></td>
|
354 |
<td><?php echo sp_get_post_precision( $row->ID ); ?></td>
|
355 |
<td><p class="description"><?php echo $row->post_excerpt; ?></p></td>
|
34 |
<?php if ( $data ): $i = 0; foreach ( $data as $row ): ?>
|
35 |
<tr<?php if ( $i % 2 == 0 ) echo ' class="alternate"'; ?>>
|
36 |
<td class="row-title"><?php echo $row->post_title; ?></td>
|
37 |
+
<td><code><?php echo $row->post_name; ?></code></td>
|
38 |
<td><?php echo sp_get_post_abbreviation( $row->ID ); ?></td>
|
39 |
<td><?php echo sp_get_post_condition( $row->ID ); ?></td>
|
40 |
<td><p class="description"><?php echo $row->post_excerpt; ?></p></td>
|
84 |
<th class="radio" scope="col"><?php _e( 'Primary', 'sportspress' ); ?></th>
|
85 |
<th scope="col"><?php _e( 'Label', 'sportspress' ); ?></th>
|
86 |
<th scope="col"><?php _e( 'Variables', 'sportspress' ); ?></th>
|
87 |
+
<th scope="col"><?php _e( 'Equation', 'sportspress' ); ?></th>
|
88 |
+
<th scope="col"><?php _e( 'Decimal Places', 'sportspress' ); ?></th>
|
89 |
<th scope="col"><?php _e( 'Description', 'sportspress' ); ?></th>
|
90 |
<th scope="col" class="edit"></th>
|
91 |
</tr>
|
93 |
<tfoot>
|
94 |
<tr>
|
95 |
<th class="radio"><input type="radio" class="sp-primary-result-option" id="sportspress_primary_result_0" name="sportspress_primary_result" value="0" <?php checked( $selection, 0 ); ?>></th>
|
96 |
+
<th colspan="6"><label for="sportspress_primary_result_0">
|
97 |
<?php
|
98 |
if ( sizeof( $data ) > 0 ):
|
99 |
$default = end( $data );
|
110 |
<tr<?php if ( $i % 2 == 0 ) echo ' class="alternate"'; ?>>
|
111 |
<td class="radio"><input type="radio" class="sp-primary-result-option" id="sportspress_primary_result_<?php echo $row->post_name; ?>" name="sportspress_primary_result" value="<?php echo $row->post_name; ?>" <?php checked( $selection, $row->post_name ); ?>></td>
|
112 |
<td class="row-title"><label for="sportspress_primary_result_<?php echo $row->post_name; ?>"><?php echo $row->post_title; ?></label></td>
|
113 |
+
<td><code><?php echo $row->post_name; ?>for</code>, <code><?php echo $row->post_name; ?>against</code></td>
|
114 |
+
<td><?php echo sp_get_post_equation( $row->ID ); ?></td>
|
115 |
+
<td><?php echo sp_get_post_precision( $row->ID ); ?></td>
|
116 |
<td><p class="description"><?php echo $row->post_excerpt; ?></p></td>
|
117 |
<td class="edit"><a class="button" href="<?php echo get_edit_post_link( $row->ID ); ?>"><?php _e( 'Edit', 'sportspress' ); ?></s></td>
|
118 |
</tr>
|
119 |
<?php $i++; endforeach; else: ?>
|
120 |
<tr class="alternate">
|
121 |
+
<td colspan="7"><?php _e( 'No results found.', 'sportspress' ); ?></td>
|
122 |
</tr>
|
123 |
<?php endif; ?>
|
124 |
</table>
|
162 |
<th class="icon" scope="col"><?php _e( 'Icon', 'sportspress' ); ?></th>
|
163 |
<th scope="col"><?php _e( 'Label', 'sportspress' ); ?></th>
|
164 |
<th scope="col"><?php _e( 'Variable', 'sportspress' ); ?></th>
|
165 |
+
<th scope="col"><?php _e( 'Category', 'sportspress' ); ?></th>
|
166 |
+
<th scope="col"><?php _e( 'Format', 'sportspress' ); ?></th>
|
167 |
<th scope="col"><?php _e( 'Description', 'sportspress' ); ?></th>
|
168 |
<th scope="col" class="edit"></th>
|
169 |
</tr>
|
172 |
<tr>
|
173 |
<th class="radio"><input type="radio" class="sp-primary-performance-option" id="sportspress_primary_performance_0" name="sportspress_primary_performance" value="0" <?php checked( $selection, 0 ); ?>></th>
|
174 |
<th class="icon"> </td>
|
175 |
+
<th colspan="6"><label for="sportspress_primary_performance_0">
|
176 |
<?php
|
177 |
if ( sizeof( $data ) > 0 ):
|
178 |
$default = reset( $data );
|
190 |
<td class="icon">
|
191 |
<?php
|
192 |
if ( has_post_thumbnail( $row->ID ) )
|
193 |
+
$icon = get_the_post_thumbnail( $row->ID, 'sportspress-fit-mini' );
|
194 |
else
|
195 |
+
$icon = ' ';
|
196 |
+
|
197 |
+
echo apply_filters( 'sportspress_performance_icon', $icon, $row->ID );
|
198 |
?>
|
199 |
</td>
|
200 |
<td class="row-title"><?php echo $row->post_title; ?></td>
|
201 |
+
<td><code><?php echo $row->post_name; ?></code></td>
|
202 |
+
<td><?php echo sp_get_post_section( $row->ID ); ?></td>
|
203 |
+
<td><?php echo sp_get_post_format( $row->ID ); ?></td>
|
204 |
<td><p class="description"><?php echo $row->post_excerpt; ?></p></td>
|
205 |
<td class="edit"><a class="button" href="<?php echo get_edit_post_link( $row->ID ); ?>"><?php _e( 'Edit', 'sportspress' ); ?></s></td>
|
206 |
</tr>
|
207 |
<?php $i++; endforeach; else: ?>
|
208 |
<tr class="alternate">
|
209 |
+
<td colspan="8"><?php _e( 'No results found.', 'sportspress' ); ?></td>
|
210 |
</tr>
|
211 |
<?php endif; ?>
|
212 |
</table>
|
242 |
<thead>
|
243 |
<tr>
|
244 |
<th scope="col"><?php _e( 'Label', 'sportspress' ); ?></th>
|
|
|
245 |
<th scope="col"><?php _e( 'Equation', 'sportspress' ); ?></th>
|
246 |
<th scope="col"><?php _e( 'Decimal Places', 'sportspress' ); ?></th>
|
247 |
<th scope="col"><?php _e( 'Sort Order', 'sportspress' ); ?></th>
|
252 |
<?php if ( $data ): $i = 0; foreach ( $data as $row ): ?>
|
253 |
<tr<?php if ( $i % 2 == 0 ) echo ' class="alternate"'; ?>>
|
254 |
<td class="row-title"><?php echo $row->post_title; ?></td>
|
|
|
255 |
<td><?php echo sp_get_post_equation( $row->ID ); ?></td>
|
256 |
<td><?php echo sp_get_post_precision( $row->ID ); ?></td>
|
257 |
<td><?php echo sp_get_post_order( $row->ID ); ?></td>
|
304 |
<?php if ( $data ): $i = 0; foreach ( $data as $row ): ?>
|
305 |
<tr<?php if ( $i % 2 == 0 ) echo ' class="alternate"'; ?>>
|
306 |
<td class="row-title"><?php echo $row->post_title; ?></td>
|
307 |
+
<td><code><?php echo $row->post_name; ?></code></td>
|
308 |
<td><p class="description"><?php echo $row->post_excerpt; ?></p></td>
|
309 |
<td class="edit"><a class="button" href="<?php echo get_edit_post_link( $row->ID ); ?>"><?php _e( 'Edit', 'sportspress' ); ?></s></td>
|
310 |
</tr>
|
345 |
<thead>
|
346 |
<tr>
|
347 |
<th scope="col"><?php _e( 'Label', 'sportspress' ); ?></th>
|
|
|
348 |
<th scope="col"><?php _e( 'Equation', 'sportspress' ); ?></th>
|
349 |
<th scope="col"><?php _e( 'Decimal Places', 'sportspress' ); ?></th>
|
350 |
<th scope="col"><?php _e( 'Description', 'sportspress' ); ?></th>
|
354 |
<?php if ( $data ): $i = 0; foreach ( $data as $row ): ?>
|
355 |
<tr<?php if ( $i % 2 == 0 ) echo ' class="alternate"'; ?>>
|
356 |
<td class="row-title"><?php echo $row->post_title; ?></td>
|
|
|
357 |
<td><?php echo sp_get_post_equation( $row->ID ); ?></td>
|
358 |
<td><?php echo sp_get_post_precision( $row->ID ); ?></td>
|
359 |
<td><p class="description"><?php echo $row->post_excerpt; ?></p></td>
|
includes/api/class-sp-rest-teams-controller.php
ADDED
@@ -0,0 +1,301 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class SP_REST_Teams_Controller extends WP_REST_Posts_Controller {
|
4 |
+
|
5 |
+
/**
|
6 |
+
* @var string
|
7 |
+
*/
|
8 |
+
public $namespace = 'sportspress/v2';
|
9 |
+
|
10 |
+
/**
|
11 |
+
* @var string
|
12 |
+
*/
|
13 |
+
public $route = 'teams';
|
14 |
+
|
15 |
+
public function __construct() {
|
16 |
+
add_action( 'rest_api_init', array( $this, 'register_routes' ) );
|
17 |
+
}
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Register the routes for the objects of the controller.
|
21 |
+
*/
|
22 |
+
public function register_routes() {
|
23 |
+
register_rest_route( $this->namespace, '/' . $this->route, array(
|
24 |
+
array(
|
25 |
+
'methods' => WP_REST_Server::READABLE,
|
26 |
+
'callback' => array( $this, 'get_items' ),
|
27 |
+
'permission_callback' => array( $this, 'get_items_permissions_check' ),
|
28 |
+
'args' => array(),
|
29 |
+
),
|
30 |
+
/*
|
31 |
+
array(
|
32 |
+
'methods' => WP_REST_Server::CREATABLE,
|
33 |
+
'callback' => array( $this, 'create_item' ),
|
34 |
+
'permission_callback' => array( $this, 'create_item_permissions_check' ),
|
35 |
+
'args' => $this->get_endpoint_args_for_item_schema( true ),
|
36 |
+
),
|
37 |
+
*/
|
38 |
+
) );
|
39 |
+
|
40 |
+
register_rest_route( $this->namespace, '/' . $this->route . '/(?P<id>[\d]+)', array(
|
41 |
+
array(
|
42 |
+
'methods' => WP_REST_Server::READABLE,
|
43 |
+
'callback' => array( $this, 'get_item' ),
|
44 |
+
'permission_callback' => array( $this, 'get_item_permissions_check' ),
|
45 |
+
'args' => array(
|
46 |
+
'context' => array(
|
47 |
+
'default' => 'view',
|
48 |
+
),
|
49 |
+
),
|
50 |
+
),
|
51 |
+
/*
|
52 |
+
array(
|
53 |
+
'methods' => WP_REST_Server::EDITABLE,
|
54 |
+
'callback' => array( $this, 'update_item' ),
|
55 |
+
'permission_callback' => array( $this, 'update_item_permissions_check' ),
|
56 |
+
'args' => $this->get_endpoint_args_for_item_schema( false ),
|
57 |
+
),
|
58 |
+
array(
|
59 |
+
'methods' => WP_REST_Server::DELETABLE,
|
60 |
+
'callback' => array( $this, 'delete_item' ),
|
61 |
+
'permission_callback' => array( $this, 'delete_item_permissions_check' ),
|
62 |
+
'args' => array(
|
63 |
+
'force' => array(
|
64 |
+
'default' => false,
|
65 |
+
),
|
66 |
+
),
|
67 |
+
),
|
68 |
+
*/
|
69 |
+
) );
|
70 |
+
register_rest_route( $this->namespace, '/' . $this->route . '/schema', array(
|
71 |
+
'methods' => WP_REST_Server::READABLE,
|
72 |
+
'callback' => array( $this, 'get_public_item_schema' ),
|
73 |
+
) );
|
74 |
+
}
|
75 |
+
|
76 |
+
/**
|
77 |
+
* Get a collection of items
|
78 |
+
*
|
79 |
+
* @param WP_REST_Request $request Full data about the request.
|
80 |
+
* @return WP_Error|WP_REST_Response
|
81 |
+
*/
|
82 |
+
public function get_items( $request ) {
|
83 |
+
$args = array(
|
84 |
+
'post_type' => 'sp_team',
|
85 |
+
'posts_per_page' => 500,
|
86 |
+
);
|
87 |
+
$items = get_posts( $args );
|
88 |
+
$data = array();
|
89 |
+
foreach( $items as $item ) {
|
90 |
+
$itemdata = $this->prepare_item_for_response( $item, $request );
|
91 |
+
$data[] = $this->prepare_response_for_collection( $itemdata );
|
92 |
+
}
|
93 |
+
|
94 |
+
return new WP_REST_Response( $data, 200 );
|
95 |
+
}
|
96 |
+
|
97 |
+
/**
|
98 |
+
* Get one item from the collection
|
99 |
+
*
|
100 |
+
* @param WP_REST_Request $request Full data about the request.
|
101 |
+
* @return WP_Error|WP_REST_Response
|
102 |
+
*/
|
103 |
+
public function get_item( $request ) {
|
104 |
+
//get parameters from request
|
105 |
+
$params = $request->get_params();
|
106 |
+
$item = get_post( $params['id'] );//do a query, call another class, etc
|
107 |
+
$data = $this->prepare_item_for_response( $item, $request );
|
108 |
+
|
109 |
+
//return a response or error based on some conditional
|
110 |
+
if ( 1 == 1 ) {
|
111 |
+
return new WP_REST_Response( $data, 200 );
|
112 |
+
}else{
|
113 |
+
return new WP_Error( 'code', __( 'message', 'text-domain' ) );
|
114 |
+
}
|
115 |
+
}
|
116 |
+
|
117 |
+
/**
|
118 |
+
* Create one item from the collection
|
119 |
+
*
|
120 |
+
* @param WP_REST_Request $request Full data about the request.
|
121 |
+
* @return WP_Error|WP_REST_Request
|
122 |
+
*/
|
123 |
+
public function create_item( $request ) {
|
124 |
+
|
125 |
+
$item = $this->prepare_item_for_database( $request );
|
126 |
+
|
127 |
+
if ( function_exists( 'slug_some_function_to_create_item') ) {
|
128 |
+
$data = slug_some_function_to_create_item( $item );
|
129 |
+
if ( is_array( $data ) ) {
|
130 |
+
return new WP_REST_Response( $data, 200 );
|
131 |
+
}
|
132 |
+
}
|
133 |
+
|
134 |
+
return new WP_Error( 'cant-create', __( 'message', 'text-domain'), array( 'status' => 500 ) );
|
135 |
+
|
136 |
+
|
137 |
+
}
|
138 |
+
|
139 |
+
/**
|
140 |
+
* Update one item from the collection
|
141 |
+
*
|
142 |
+
* @param WP_REST_Request $request Full data about the request.
|
143 |
+
* @return WP_Error|WP_REST_Request
|
144 |
+
*/
|
145 |
+
public function update_item( $request ) {
|
146 |
+
$item = $this->prepare_item_for_database( $request );
|
147 |
+
|
148 |
+
if ( function_exists( 'slug_some_function_to_update_item') ) {
|
149 |
+
$data = slug_some_function_to_update_item( $item );
|
150 |
+
if ( is_array( $data ) ) {
|
151 |
+
return new WP_REST_Response( $data, 200 );
|
152 |
+
}
|
153 |
+
}
|
154 |
+
|
155 |
+
return new WP_Error( 'cant-update', __( 'message', 'text-domain'), array( 'status' => 500 ) );
|
156 |
+
|
157 |
+
}
|
158 |
+
|
159 |
+
/**
|
160 |
+
* Delete one item from the collection
|
161 |
+
*
|
162 |
+
* @param WP_REST_Request $request Full data about the request.
|
163 |
+
* @return WP_Error|WP_REST_Request
|
164 |
+
*/
|
165 |
+
public function delete_item( $request ) {
|
166 |
+
$item = $this->prepare_item_for_database( $request );
|
167 |
+
|
168 |
+
if ( function_exists( 'slug_some_function_to_delete_item') ) {
|
169 |
+
$deleted = slug_some_function_to_delete_item( $item );
|
170 |
+
if ( $deleted ) {
|
171 |
+
return new WP_REST_Response( true, 200 );
|
172 |
+
}
|
173 |
+
}
|
174 |
+
|
175 |
+
return new WP_Error( 'cant-delete', __( 'message', 'text-domain'), array( 'status' => 500 ) );
|
176 |
+
}
|
177 |
+
|
178 |
+
/**
|
179 |
+
* Check if a given request has access to get items
|
180 |
+
*
|
181 |
+
* @param WP_REST_Request $request Full data about the request.
|
182 |
+
* @return WP_Error|bool
|
183 |
+
*/
|
184 |
+
public function get_items_permissions_check( $request ) {
|
185 |
+
return true;
|
186 |
+
//return current_user_can( 'edit_something' );
|
187 |
+
}
|
188 |
+
|
189 |
+
/**
|
190 |
+
* Check if a given request has access to get a specific item
|
191 |
+
*
|
192 |
+
* @param WP_REST_Request $request Full data about the request.
|
193 |
+
* @return WP_Error|bool
|
194 |
+
*/
|
195 |
+
public function get_item_permissions_check( $request ) {
|
196 |
+
return $this->get_items_permissions_check( $request );
|
197 |
+
}
|
198 |
+
|
199 |
+
/**
|
200 |
+
* Check if a given request has access to create items
|
201 |
+
*
|
202 |
+
* @param WP_REST_Request $request Full data about the request.
|
203 |
+
* @return WP_Error|bool
|
204 |
+
*/
|
205 |
+
public function create_item_permissions_check( $request ) {
|
206 |
+
return current_user_can( 'edit_something' );
|
207 |
+
}
|
208 |
+
|
209 |
+
/**
|
210 |
+
* Check if a given request has access to update a specific item
|
211 |
+
*
|
212 |
+
* @param WP_REST_Request $request Full data about the request.
|
213 |
+
* @return WP_Error|bool
|
214 |
+
*/
|
215 |
+
public function update_item_permissions_check( $request ) {
|
216 |
+
return $this->create_item_permissions_check( $request );
|
217 |
+
}
|
218 |
+
|
219 |
+
/**
|
220 |
+
* Check if a given request has access to delete a specific item
|
221 |
+
*
|
222 |
+
* @param WP_REST_Request $request Full data about the request.
|
223 |
+
* @return WP_Error|bool
|
224 |
+
*/
|
225 |
+
public function delete_item_permissions_check( $request ) {
|
226 |
+
return $this->create_item_permissions_check( $request );
|
227 |
+
}
|
228 |
+
|
229 |
+
/**
|
230 |
+
* Prepare the item for create or update operation
|
231 |
+
*
|
232 |
+
* @param WP_REST_Request $request Request object
|
233 |
+
* @return WP_Error|object $prepared_item
|
234 |
+
*/
|
235 |
+
protected function prepare_item_for_database( $request ) {
|
236 |
+
return array();
|
237 |
+
}
|
238 |
+
|
239 |
+
/**
|
240 |
+
* Prepare the item for the REST response
|
241 |
+
*
|
242 |
+
* @param mixed $item WordPress representation of the item.
|
243 |
+
* @param WP_REST_Request $request Request object.
|
244 |
+
* @return mixed
|
245 |
+
*/
|
246 |
+
public function prepare_item_for_response( $post, $request ) {
|
247 |
+
$data = array(
|
248 |
+
'id' => $post->ID,
|
249 |
+
'guid' => array(
|
250 |
+
'raw' => $post->guid,
|
251 |
+
'rendered' => apply_filters( 'get_the_guid', $post->guid ),
|
252 |
+
),
|
253 |
+
'slug' => $post->post_name,
|
254 |
+
'link' => get_permalink( $post->ID ),
|
255 |
+
'title' => array(
|
256 |
+
'raw' => $post->post_title,
|
257 |
+
'rendered' => get_the_title( $post->ID ),
|
258 |
+
),
|
259 |
+
'content' => array(
|
260 |
+
'raw' => $post->post_content,
|
261 |
+
'rendered' => apply_filters( 'the_content', $post->post_content ),
|
262 |
+
),
|
263 |
+
'featured_media' => (int) get_post_thumbnail_id( $post->ID ),
|
264 |
+
'abbreviation' => sp_get_abbreviation( $post->ID ),
|
265 |
+
'leagues' => sp_get_leagues( $post->ID ),
|
266 |
+
'seasons' => sp_get_seasons( $post->ID ),
|
267 |
+
'venues' => sp_get_venues( $post->ID ),
|
268 |
+
);
|
269 |
+
|
270 |
+
return $data;
|
271 |
+
}
|
272 |
+
|
273 |
+
/**
|
274 |
+
* Get the query params for collections
|
275 |
+
*
|
276 |
+
* @return array
|
277 |
+
*/
|
278 |
+
public function get_collection_params() {
|
279 |
+
return array(
|
280 |
+
'page' => array(
|
281 |
+
'description' => 'Current page of the collection.',
|
282 |
+
'type' => 'integer',
|
283 |
+
'default' => 1,
|
284 |
+
'sanitize_callback' => 'absint',
|
285 |
+
),
|
286 |
+
'per_page' => array(
|
287 |
+
'description' => 'Maximum number of items to be returned in result set.',
|
288 |
+
'type' => 'integer',
|
289 |
+
'default' => 10,
|
290 |
+
'sanitize_callback' => 'absint',
|
291 |
+
),
|
292 |
+
'search' => array(
|
293 |
+
'description' => 'Limit results to those matching a string.',
|
294 |
+
'type' => 'string',
|
295 |
+
'sanitize_callback' => 'sanitize_text_field',
|
296 |
+
),
|
297 |
+
);
|
298 |
+
}
|
299 |
+
}
|
300 |
+
|
301 |
+
new SP_REST_Teams_Controller();
|
includes/class-sp-ajax.php
CHANGED
@@ -8,7 +8,7 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
|
8 |
* AJAX Event Handler
|
9 |
*
|
10 |
* @class SP_AJAX
|
11 |
-
* @version 1.
|
12 |
* @package SportsPress/Classes
|
13 |
* @category Class
|
14 |
* @author ThemeBoy
|
@@ -706,12 +706,6 @@ class SP_AJAX {
|
|
706 |
<?php _e( 'Display link to view all players', 'sportspress' ); ?>
|
707 |
</label>
|
708 |
</p>
|
709 |
-
<p>
|
710 |
-
<label>
|
711 |
-
<input type="checkbox" name="show_names_on_hover" id="show_names_on_hover">
|
712 |
-
<?php _e( 'Display player names on hover', 'sportspress' ); ?>
|
713 |
-
</label>
|
714 |
-
</p>
|
715 |
<?php do_action( 'sportspress_ajax_shortcode_form', 'player-gallery' ); ?>
|
716 |
<p class="submit">
|
717 |
<input type="button" class="button-primary" value="<?php _e( 'Insert Shortcode', 'sportspress' ); ?>" onclick="insertSportsPress('player_gallery');" />
|
@@ -777,7 +771,6 @@ class SP_AJAX {
|
|
777 |
args.orderby = $div.find('[name=orderby]').val();
|
778 |
args.order = $div.find('[name=order]').val();
|
779 |
args.show_all_players_link = $div.find('[name=show_all_players_link]:checked').length;
|
780 |
-
args.show_names_on_hover = $div.find('[name=show_names_on_hover]:checked').length;
|
781 |
}
|
782 |
|
783 |
<?php do_action( 'sportspress_ajax_scripts_before_shortcode' ); ?>
|
8 |
* AJAX Event Handler
|
9 |
*
|
10 |
* @class SP_AJAX
|
11 |
+
* @version 1.9.13
|
12 |
* @package SportsPress/Classes
|
13 |
* @category Class
|
14 |
* @author ThemeBoy
|
706 |
<?php _e( 'Display link to view all players', 'sportspress' ); ?>
|
707 |
</label>
|
708 |
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
709 |
<?php do_action( 'sportspress_ajax_shortcode_form', 'player-gallery' ); ?>
|
710 |
<p class="submit">
|
711 |
<input type="button" class="button-primary" value="<?php _e( 'Insert Shortcode', 'sportspress' ); ?>" onclick="insertSportsPress('player_gallery');" />
|
771 |
args.orderby = $div.find('[name=orderby]').val();
|
772 |
args.order = $div.find('[name=order]').val();
|
773 |
args.show_all_players_link = $div.find('[name=show_all_players_link]:checked').length;
|
|
|
774 |
}
|
775 |
|
776 |
<?php do_action( 'sportspress_ajax_scripts_before_shortcode' ); ?>
|
includes/class-sp-calendar.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* The SportsPress calendar class handles individual calendar data.
|
6 |
*
|
7 |
* @class SP_Calendar
|
8 |
-
* @version 1.
|
9 |
* @package SportsPress/Classes
|
10 |
* @category Class
|
11 |
* @author ThemeBoy
|
@@ -28,6 +28,12 @@ class SP_Calendar extends SP_Custom_Post {
|
|
28 |
/** @var string The date to range to. */
|
29 |
public $to;
|
30 |
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
/**
|
32 |
* __construct function.
|
33 |
*
|
@@ -59,9 +65,8 @@ class SP_Calendar extends SP_Custom_Post {
|
|
59 |
if ( ! $this->from )
|
60 |
$this->from = get_post_meta( $this->ID, 'sp_date_from', true );
|
61 |
|
62 |
-
if ( ! $this->to )
|
63 |
$this->to = get_post_meta( $this->ID, 'sp_date_to', true );
|
64 |
-
endif;
|
65 |
}
|
66 |
|
67 |
/**
|
@@ -98,6 +103,14 @@ class SP_Calendar extends SP_Custom_Post {
|
|
98 |
endif;
|
99 |
endif;
|
100 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
if ( $pagenow != 'post-new.php' ):
|
102 |
if ( $this->ID ):
|
103 |
$leagues = get_the_terms( $this->ID, 'sp_league' );
|
@@ -106,29 +119,35 @@ class SP_Calendar extends SP_Custom_Post {
|
|
106 |
$teams = array_filter( get_post_meta( $this->ID, 'sp_team', false ) );
|
107 |
$table = get_post_meta( $this->ID, 'sp_table', true );
|
108 |
|
109 |
-
if ( $leagues ):
|
110 |
$league_ids = array();
|
111 |
foreach( $leagues as $league ):
|
112 |
$league_ids[] = $league->term_id;
|
113 |
endforeach;
|
|
|
|
|
|
|
114 |
$args['tax_query'][] = array(
|
115 |
'taxonomy' => 'sp_league',
|
116 |
'field' => 'id',
|
117 |
'terms' => $league_ids
|
118 |
);
|
119 |
-
|
120 |
|
121 |
-
if ( $seasons ):
|
122 |
$season_ids = array();
|
123 |
foreach( $seasons as $season ):
|
124 |
$season_ids[] = $season->term_id;
|
125 |
endforeach;
|
|
|
|
|
|
|
126 |
$args['tax_query'][] = array(
|
127 |
'taxonomy' => 'sp_season',
|
128 |
'field' => 'id',
|
129 |
'terms' => $season_ids
|
130 |
);
|
131 |
-
|
132 |
|
133 |
if ( $venues ):
|
134 |
$venue_ids = array();
|
5 |
* The SportsPress calendar class handles individual calendar data.
|
6 |
*
|
7 |
* @class SP_Calendar
|
8 |
+
* @version 1.9
|
9 |
* @package SportsPress/Classes
|
10 |
* @category Class
|
11 |
* @author ThemeBoy
|
28 |
/** @var string The date to range to. */
|
29 |
public $to;
|
30 |
|
31 |
+
/** @var int The competition ID. */
|
32 |
+
public $league;
|
33 |
+
|
34 |
+
/** @var int The season ID. */
|
35 |
+
public $season;
|
36 |
+
|
37 |
/**
|
38 |
* __construct function.
|
39 |
*
|
65 |
if ( ! $this->from )
|
66 |
$this->from = get_post_meta( $this->ID, 'sp_date_from', true );
|
67 |
|
68 |
+
if ( ! $this->to )
|
69 |
$this->to = get_post_meta( $this->ID, 'sp_date_to', true );
|
|
|
70 |
}
|
71 |
|
72 |
/**
|
103 |
endif;
|
104 |
endif;
|
105 |
|
106 |
+
if ( $this->league ):
|
107 |
+
$league_ids = array( $this->league );
|
108 |
+
endif;
|
109 |
+
|
110 |
+
if ( $this->season ):
|
111 |
+
$season_ids = array( $this->season );
|
112 |
+
endif;
|
113 |
+
|
114 |
if ( $pagenow != 'post-new.php' ):
|
115 |
if ( $this->ID ):
|
116 |
$leagues = get_the_terms( $this->ID, 'sp_league' );
|
119 |
$teams = array_filter( get_post_meta( $this->ID, 'sp_team', false ) );
|
120 |
$table = get_post_meta( $this->ID, 'sp_table', true );
|
121 |
|
122 |
+
if ( ! isset( $league_ids ) && $leagues ):
|
123 |
$league_ids = array();
|
124 |
foreach( $leagues as $league ):
|
125 |
$league_ids[] = $league->term_id;
|
126 |
endforeach;
|
127 |
+
endif;
|
128 |
+
|
129 |
+
if ( isset( $league_ids ) ) {
|
130 |
$args['tax_query'][] = array(
|
131 |
'taxonomy' => 'sp_league',
|
132 |
'field' => 'id',
|
133 |
'terms' => $league_ids
|
134 |
);
|
135 |
+
}
|
136 |
|
137 |
+
if ( ! isset( $season_ids ) && $seasons ):
|
138 |
$season_ids = array();
|
139 |
foreach( $seasons as $season ):
|
140 |
$season_ids[] = $season->term_id;
|
141 |
endforeach;
|
142 |
+
endif;
|
143 |
+
|
144 |
+
if ( isset( $season_ids ) ) {
|
145 |
$args['tax_query'][] = array(
|
146 |
'taxonomy' => 'sp_season',
|
147 |
'field' => 'id',
|
148 |
'terms' => $season_ids
|
149 |
);
|
150 |
+
}
|
151 |
|
152 |
if ( $venues ):
|
153 |
$venue_ids = array();
|
includes/class-sp-countries.php
CHANGED
@@ -224,6 +224,7 @@ class SP_Countries {
|
|
224 |
'vgb',
|
225 |
'vin',
|
226 |
'vir',
|
|
|
227 |
),
|
228 |
__( 'Oceania', 'sportspress' ) => array(
|
229 |
'asa',
|
@@ -483,6 +484,7 @@ class SP_Countries {
|
|
483 |
'vin' => __( "Saint Vincent and the Grenadines", 'sportspress' ),
|
484 |
'vir' => __( "US Virgin Islands", 'sportspress' ),
|
485 |
'wal' => __( "Wales", 'sportspress' ),
|
|
|
486 |
'yem' => __( "Yemen", 'sportspress' ),
|
487 |
'zam' => __( "Zambia", 'sportspress' ),
|
488 |
'zim' => __( "Zimbabwe", 'sportspress' ),
|
224 |
'vgb',
|
225 |
'vin',
|
226 |
'vir',
|
227 |
+
'wif',
|
228 |
),
|
229 |
__( 'Oceania', 'sportspress' ) => array(
|
230 |
'asa',
|
484 |
'vin' => __( "Saint Vincent and the Grenadines", 'sportspress' ),
|
485 |
'vir' => __( "US Virgin Islands", 'sportspress' ),
|
486 |
'wal' => __( "Wales", 'sportspress' ),
|
487 |
+
'wif' => __( "West Indies", 'sportspress' ),
|
488 |
'yem' => __( "Yemen", 'sportspress' ),
|
489 |
'zam' => __( "Zambia", 'sportspress' ),
|
490 |
'zim' => __( "Zimbabwe", 'sportspress' ),
|
includes/class-sp-event.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* The SportsPress event class handles individual event data.
|
6 |
*
|
7 |
* @class SP_Event
|
8 |
-
* @version 1.
|
9 |
* @package SportsPress/Classes
|
10 |
* @category Class
|
11 |
* @author ThemeBoy
|
@@ -75,7 +75,30 @@ class SP_Event extends SP_Custom_Post{
|
|
75 |
public function performance( $admin = false ) {
|
76 |
$teams = get_post_meta( $this->ID, 'sp_team', false );
|
77 |
$performance = (array)get_post_meta( $this->ID, 'sp_players', true );
|
78 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
$columns = get_post_meta( $this->ID, 'sp_columns', true );
|
80 |
if ( is_array( $teams ) ):
|
81 |
foreach( $teams as $i => $team_id ):
|
@@ -111,10 +134,12 @@ class SP_Event extends SP_Custom_Post{
|
|
111 |
endif;
|
112 |
|
113 |
if ( $admin ):
|
114 |
-
return array( $labels, $columns, $performance, $teams );
|
115 |
else:
|
116 |
// Add position to performance labels
|
117 |
-
|
|
|
|
|
118 |
if ( 'manual' == get_option( 'sportspress_event_performance_columns', 'auto' ) && is_array( $columns ) ):
|
119 |
foreach ( $labels as $key => $label ):
|
120 |
if ( ! in_array( $key, $columns ) ):
|
@@ -126,8 +151,11 @@ class SP_Event extends SP_Custom_Post{
|
|
126 |
if ( 'no' == get_option( 'sportspress_event_show_position', 'yes' ) ):
|
127 |
unset( $labels['position'] );
|
128 |
endif;
|
|
|
|
|
|
|
129 |
$performance[0] = $labels;
|
130 |
-
return $performance;
|
131 |
endif;
|
132 |
}
|
133 |
|
@@ -296,8 +324,17 @@ class SP_Event extends SP_Custom_Post{
|
|
296 |
}
|
297 |
}
|
298 |
} else {
|
299 |
-
|
300 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
301 |
$args = array(
|
302 |
'post_type' => 'sp_outcome',
|
303 |
'numberposts' => -1,
|
@@ -305,16 +342,10 @@ class SP_Event extends SP_Custom_Post{
|
|
305 |
'meta_key' => 'sp_condition',
|
306 |
'meta_value' => '>',
|
307 |
);
|
308 |
-
$
|
309 |
-
if ( $
|
310 |
-
$meta[ $max ][ 'outcome' ] = array();
|
311 |
-
foreach ( $outcomes as $outcome ) {
|
312 |
-
$meta[ $max ][ 'outcome' ][] = $outcome->post_name;
|
313 |
-
}
|
314 |
-
}
|
315 |
|
316 |
-
|
317 |
-
$min = key( $primary_results );
|
318 |
$args = array(
|
319 |
'post_type' => 'sp_outcome',
|
320 |
'numberposts' => -1,
|
@@ -322,11 +353,24 @@ class SP_Event extends SP_Custom_Post{
|
|
322 |
'meta_key' => 'sp_condition',
|
323 |
'meta_value' => '<',
|
324 |
);
|
325 |
-
$
|
326 |
-
if ( $
|
327 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
328 |
foreach ( $outcomes as $outcome ) {
|
329 |
-
$meta[ $
|
330 |
}
|
331 |
}
|
332 |
}
|
5 |
* The SportsPress event class handles individual event data.
|
6 |
*
|
7 |
* @class SP_Event
|
8 |
+
* @version 1.9.19
|
9 |
* @package SportsPress/Classes
|
10 |
* @category Class
|
11 |
* @author ThemeBoy
|
75 |
public function performance( $admin = false ) {
|
76 |
$teams = get_post_meta( $this->ID, 'sp_team', false );
|
77 |
$performance = (array)get_post_meta( $this->ID, 'sp_players', true );
|
78 |
+
|
79 |
+
$args = array(
|
80 |
+
'post_type' => 'sp_performance',
|
81 |
+
'numberposts' => 100,
|
82 |
+
'posts_per_page' => 100,
|
83 |
+
'orderby' => 'menu_order',
|
84 |
+
'order' => 'ASC',
|
85 |
+
);
|
86 |
+
|
87 |
+
$vars = get_posts( $args );
|
88 |
+
|
89 |
+
$labels = array();
|
90 |
+
foreach ( $vars as $var ) {
|
91 |
+
$labels[ $var->post_name ] = $var->post_title;
|
92 |
+
$format = get_post_meta( $var->ID, 'sp_format', true );
|
93 |
+
if ( '' === $format ) {
|
94 |
+
$format = 'number';
|
95 |
+
}
|
96 |
+
$formats[ $var->post_name ] = $format;
|
97 |
+
}
|
98 |
+
|
99 |
+
$order = (array)get_post_meta( $this->ID, 'sp_order', true );
|
100 |
+
|
101 |
+
$labels = apply_filters( 'sportspress_event_performance_labels', $labels, $this );
|
102 |
$columns = get_post_meta( $this->ID, 'sp_columns', true );
|
103 |
if ( is_array( $teams ) ):
|
104 |
foreach( $teams as $i => $team_id ):
|
134 |
endif;
|
135 |
|
136 |
if ( $admin ):
|
137 |
+
return array( $labels, $columns, $performance, $teams, $formats, $order );
|
138 |
else:
|
139 |
// Add position to performance labels
|
140 |
+
if ( taxonomy_exists( 'sp_position' ) ):
|
141 |
+
$labels = array_merge( array( 'position' => __( 'Position', 'sportspress' ) ), $labels );
|
142 |
+
endif;
|
143 |
if ( 'manual' == get_option( 'sportspress_event_performance_columns', 'auto' ) && is_array( $columns ) ):
|
144 |
foreach ( $labels as $key => $label ):
|
145 |
if ( ! in_array( $key, $columns ) ):
|
151 |
if ( 'no' == get_option( 'sportspress_event_show_position', 'yes' ) ):
|
152 |
unset( $labels['position'] );
|
153 |
endif;
|
154 |
+
if ( 'no' == get_option( 'sportspress_event_show_player_numbers', 'yes' ) ):
|
155 |
+
unset( $labels['number'] );
|
156 |
+
endif;
|
157 |
$performance[0] = $labels;
|
158 |
+
return apply_filters( 'sportspress_get_event_performance', $performance );
|
159 |
endif;
|
160 |
}
|
161 |
|
324 |
}
|
325 |
}
|
326 |
} else {
|
327 |
+
// Get default outcomes
|
328 |
+
$args = array(
|
329 |
+
'post_type' => 'sp_outcome',
|
330 |
+
'numberposts' => -1,
|
331 |
+
'posts_per_page' => -1,
|
332 |
+
'meta_key' => 'sp_condition',
|
333 |
+
'meta_value' => 'else',
|
334 |
+
);
|
335 |
+
$default_outcomes = get_posts( $args );
|
336 |
+
|
337 |
+
// Get greater than outcomes
|
338 |
$args = array(
|
339 |
'post_type' => 'sp_outcome',
|
340 |
'numberposts' => -1,
|
342 |
'meta_key' => 'sp_condition',
|
343 |
'meta_value' => '>',
|
344 |
);
|
345 |
+
$gt_outcomes = get_posts( $args );
|
346 |
+
if ( empty ( $gt_outcomes ) ) $gt_outcomes = $default_outcomes;
|
|
|
|
|
|
|
|
|
|
|
347 |
|
348 |
+
// Get less than outcomes
|
|
|
349 |
$args = array(
|
350 |
'post_type' => 'sp_outcome',
|
351 |
'numberposts' => -1,
|
353 |
'meta_key' => 'sp_condition',
|
354 |
'meta_value' => '<',
|
355 |
);
|
356 |
+
$lt_outcomes = get_posts( $args );
|
357 |
+
if ( empty ( $lt_outcomes ) ) $lt_outcomes = $default_outcomes;
|
358 |
+
|
359 |
+
// Get min and max values
|
360 |
+
$min = min( $primary_results );
|
361 |
+
$max = max( $primary_results );
|
362 |
+
|
363 |
+
foreach ( $primary_results as $key => $value ) {
|
364 |
+
if ( $min == $value ) {
|
365 |
+
$outcomes = $lt_outcomes;
|
366 |
+
} elseif ( $max == $value ) {
|
367 |
+
$outcomes = $gt_outcomes;
|
368 |
+
} else {
|
369 |
+
$outcomes = $default_outcomes;
|
370 |
+
}
|
371 |
+
$meta[ $key ][ 'outcome' ] = array();
|
372 |
foreach ( $outcomes as $outcome ) {
|
373 |
+
$meta[ $key ][ 'outcome' ][] = $outcome->post_name;
|
374 |
}
|
375 |
}
|
376 |
}
|
includes/class-sp-frontend-scripts.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Handle frontend forms
|
4 |
*
|
5 |
* @class SP_Frontend_Scripts
|
6 |
-
* @version 1.
|
7 |
* @package SportsPress/Classes
|
8 |
* @category Class
|
9 |
* @author ThemeBoy
|
@@ -73,12 +73,12 @@ class SP_Frontend_Scripts {
|
|
73 |
wp_enqueue_script( 'jquery' );
|
74 |
wp_enqueue_script( 'jquery-datatables', plugin_dir_url( SP_PLUGIN_FILE ) .'assets/js/jquery.dataTables.min.js', array( 'jquery' ), '1.10.4', true );
|
75 |
wp_enqueue_script( 'jquery-countdown', plugin_dir_url( SP_PLUGIN_FILE ) .'assets/js/jquery.countdown.min.js', array( 'jquery' ), '2.0.2', true );
|
76 |
-
wp_enqueue_script( 'sportspress', plugin_dir_url( SP_PLUGIN_FILE ) .'assets/js/sportspress.js', array( 'jquery' ),
|
77 |
|
78 |
if ( is_singular( 'sp_event' ) || is_tax( 'sp_venue' ) ):
|
79 |
wp_enqueue_script( 'google-maps', 'https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false', array(), '3.exp', true );
|
80 |
wp_enqueue_script( 'sp-maps', plugin_dir_url( SP_PLUGIN_FILE ) .'assets/js/sp-maps.js', array( 'jquery', 'google-maps' ), time(), true );
|
81 |
-
wp_localize_script( 'sp-maps', 'vars', array( 'map_type' => strtoupper( get_option( 'sportspress_map_type', 'ROADMAP' ) ) ) );
|
82 |
endif;
|
83 |
|
84 |
// Localize scripts
|
@@ -136,9 +136,9 @@ class SP_Frontend_Scripts {
|
|
136 |
* @return void
|
137 |
*/
|
138 |
public function custom_css() {
|
139 |
-
$
|
140 |
-
$custom = get_option( 'sportspress_custom_css', null );
|
141 |
|
|
|
142 |
$align = get_option( 'sportspress_table_text_align', 'default' );
|
143 |
$padding = get_option( 'sportspress_table_padding', null );
|
144 |
|
@@ -148,9 +148,13 @@ class SP_Frontend_Scripts {
|
|
148 |
$offset = ( 'twentyfourteen' == $template ? 48 : 0 );
|
149 |
}
|
150 |
|
151 |
-
$colors = array_map( 'esc_attr', (array) get_option( 'themeboy', array() ) );
|
152 |
if ( empty( $colors ) ) $colors = array_map( 'esc_attr', (array) get_option( 'sportspress_frontend_css_colors', array() ) );
|
153 |
|
|
|
|
|
|
|
|
|
|
|
154 |
// Defaults
|
155 |
if ( empty( $colors['primary'] ) ) $colors['primary'] = '#2b353e';
|
156 |
if ( empty( $colors['background'] ) ) $colors['background'] = '#f4f4f4';
|
@@ -163,7 +167,7 @@ class SP_Frontend_Scripts {
|
|
163 |
|
164 |
echo '<style type="text/css">';
|
165 |
|
166 |
-
if ( $
|
167 |
echo ' /* SportsPress Frontend CSS */ ';
|
168 |
|
169 |
echo '.sp-event-calendar tbody td a,.sp-event-calendar tbody td a:hover{background: none;}';
|
3 |
* Handle frontend forms
|
4 |
*
|
5 |
* @class SP_Frontend_Scripts
|
6 |
+
* @version 1.9.17
|
7 |
* @package SportsPress/Classes
|
8 |
* @category Class
|
9 |
* @author ThemeBoy
|
73 |
wp_enqueue_script( 'jquery' );
|
74 |
wp_enqueue_script( 'jquery-datatables', plugin_dir_url( SP_PLUGIN_FILE ) .'assets/js/jquery.dataTables.min.js', array( 'jquery' ), '1.10.4', true );
|
75 |
wp_enqueue_script( 'jquery-countdown', plugin_dir_url( SP_PLUGIN_FILE ) .'assets/js/jquery.countdown.min.js', array( 'jquery' ), '2.0.2', true );
|
76 |
+
wp_enqueue_script( 'sportspress', plugin_dir_url( SP_PLUGIN_FILE ) .'assets/js/sportspress.js', array( 'jquery' ), SP()->version, true );
|
77 |
|
78 |
if ( is_singular( 'sp_event' ) || is_tax( 'sp_venue' ) ):
|
79 |
wp_enqueue_script( 'google-maps', 'https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false', array(), '3.exp', true );
|
80 |
wp_enqueue_script( 'sp-maps', plugin_dir_url( SP_PLUGIN_FILE ) .'assets/js/sp-maps.js', array( 'jquery', 'google-maps' ), time(), true );
|
81 |
+
wp_localize_script( 'sp-maps', 'vars', array( 'map_type' => strtoupper( get_option( 'sportspress_map_type', 'ROADMAP' ) ), 'zoom' => get_option( 'sportspress_map_zoom', 15 ) ) );
|
82 |
endif;
|
83 |
|
84 |
// Localize scripts
|
136 |
* @return void
|
137 |
*/
|
138 |
public function custom_css() {
|
139 |
+
$colors = array_map( 'esc_attr', (array) get_option( 'themeboy', array() ) );
|
|
|
140 |
|
141 |
+
$custom = get_option( 'sportspress_custom_css', null );
|
142 |
$align = get_option( 'sportspress_table_text_align', 'default' );
|
143 |
$padding = get_option( 'sportspress_table_padding', null );
|
144 |
|
148 |
$offset = ( 'twentyfourteen' == $template ? 48 : 0 );
|
149 |
}
|
150 |
|
|
|
151 |
if ( empty( $colors ) ) $colors = array_map( 'esc_attr', (array) get_option( 'sportspress_frontend_css_colors', array() ) );
|
152 |
|
153 |
+
// Fallback
|
154 |
+
if ( ! isset( $colors['customize'] ) ) {
|
155 |
+
$colors['customize'] = ( 'yes' == get_option( 'sportspress_enable_frontend_css', 'no' ) );
|
156 |
+
}
|
157 |
+
|
158 |
// Defaults
|
159 |
if ( empty( $colors['primary'] ) ) $colors['primary'] = '#2b353e';
|
160 |
if ( empty( $colors['background'] ) ) $colors['background'] = '#f4f4f4';
|
167 |
|
168 |
echo '<style type="text/css">';
|
169 |
|
170 |
+
if ( $colors['customize'] && ! current_theme_supports( 'sportspress' ) && sizeof( $colors ) > 0 ) {
|
171 |
echo ' /* SportsPress Frontend CSS */ ';
|
172 |
|
173 |
echo '.sp-event-calendar tbody td a,.sp-event-calendar tbody td a:hover{background: none;}';
|
includes/class-sp-install.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @author ThemeBoy
|
6 |
* @category Admin
|
7 |
* @package SportsPress/Classes
|
8 |
-
* @version 1.
|
9 |
*/
|
10 |
|
11 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
@@ -237,6 +237,7 @@ class SP_Install {
|
|
237 |
'delete_posts' => true,
|
238 |
'edit_posts' => true,
|
239 |
'upload_files' => true,
|
|
|
240 |
|
241 |
'edit_sp_event' => true,
|
242 |
'read_sp_event' => true,
|
@@ -247,6 +248,9 @@ class SP_Install {
|
|
247 |
'delete_sp_events' => true,
|
248 |
'delete_published_sp_events' => true,
|
249 |
'edit_published_sp_events' => true,
|
|
|
|
|
|
|
250 |
'assign_sp_event_terms' => true,
|
251 |
|
252 |
'edit_sp_team' => true,
|
@@ -316,6 +320,9 @@ class SP_Install {
|
|
316 |
'delete_sp_events' => true,
|
317 |
'delete_published_sp_events' => true,
|
318 |
'edit_published_sp_events' => true,
|
|
|
|
|
|
|
319 |
'assign_sp_event_terms' => true,
|
320 |
|
321 |
'edit_sp_team' => true,
|
5 |
* @author ThemeBoy
|
6 |
* @category Admin
|
7 |
* @package SportsPress/Classes
|
8 |
+
* @version 1.9.13
|
9 |
*/
|
10 |
|
11 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
237 |
'delete_posts' => true,
|
238 |
'edit_posts' => true,
|
239 |
'upload_files' => true,
|
240 |
+
'manage_categories' => true,
|
241 |
|
242 |
'edit_sp_event' => true,
|
243 |
'read_sp_event' => true,
|
248 |
'delete_sp_events' => true,
|
249 |
'delete_published_sp_events' => true,
|
250 |
'edit_published_sp_events' => true,
|
251 |
+
'manage_sp_event_terms' => true,
|
252 |
+
'edit_sp_event_terms' => true,
|
253 |
+
'delete_sp_event_terms' => true,
|
254 |
'assign_sp_event_terms' => true,
|
255 |
|
256 |
'edit_sp_team' => true,
|
320 |
'delete_sp_events' => true,
|
321 |
'delete_published_sp_events' => true,
|
322 |
'edit_published_sp_events' => true,
|
323 |
+
'manage_sp_event_terms' => true,
|
324 |
+
'edit_sp_event_terms' => true,
|
325 |
+
'delete_sp_event_terms' => true,
|
326 |
'assign_sp_event_terms' => true,
|
327 |
|
328 |
'edit_sp_team' => true,
|
includes/class-sp-league-table.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* The SportsPress league table class handles individual league table data.
|
6 |
*
|
7 |
* @class SP_League_Table
|
8 |
-
* @version 1.8
|
9 |
* @package SportsPress/Classes
|
10 |
* @category Class
|
11 |
* @author ThemeBoy
|
@@ -132,15 +132,37 @@ class SP_League_Table extends SP_Custom_Post{
|
|
132 |
endforeach;
|
133 |
|
134 |
// Initialize team totals
|
135 |
-
$totals[ $team_id ] = array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
136 |
|
137 |
foreach ( $result_labels as $key => $value ):
|
138 |
$totals[ $team_id ][ $key . 'for' ] = 0;
|
|
|
|
|
|
|
139 |
$totals[ $team_id ][ $key . 'against' ] = 0;
|
|
|
|
|
|
|
140 |
endforeach;
|
141 |
|
142 |
foreach ( $outcome_labels as $key => $value ):
|
143 |
$totals[ $team_id ][ $key ] = 0;
|
|
|
|
|
|
|
144 |
endforeach;
|
145 |
|
146 |
// Get static stats
|
@@ -196,6 +218,8 @@ class SP_League_Table extends SP_Custom_Post{
|
|
196 |
|
197 |
$events = get_posts( $args );
|
198 |
|
|
|
|
|
199 |
// Event loop
|
200 |
foreach ( $events as $event ):
|
201 |
|
@@ -225,6 +249,24 @@ class SP_League_Table extends SP_Custom_Post{
|
|
225 |
$totals[ $team_id ]['eventsplayed'] ++;
|
226 |
$totals[ $team_id ]['eventminutes'] += $minutes;
|
227 |
$totals[ $team_id ][ $outcome ] ++;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
228 |
endif;
|
229 |
|
230 |
if ( $outcome && $outcome != '-1' ):
|
@@ -265,9 +307,36 @@ class SP_League_Table extends SP_Custom_Post{
|
|
265 |
else:
|
266 |
if ( array_key_exists( $team_id, $totals ) && is_array( $totals[ $team_id ] ) && array_key_exists( $key . 'for', $totals[ $team_id ] ) ):
|
267 |
$totals[ $team_id ][ $key . 'for' ] += $value;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
268 |
foreach( $results as $other_team_id => $other_result ):
|
269 |
if ( $other_team_id != $team_id && array_key_exists( $key . 'against', $totals[ $team_id ] ) ):
|
270 |
$totals[ $team_id ][ $key . 'against' ] += sp_array_value( $other_result, $key, 0 );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
271 |
endif;
|
272 |
endforeach;
|
273 |
endif;
|
@@ -279,6 +348,8 @@ class SP_League_Table extends SP_Custom_Post{
|
|
279 |
|
280 |
endforeach;
|
281 |
|
|
|
|
|
282 |
endforeach;
|
283 |
|
284 |
foreach ( $streaks as $team_id => $streak ):
|
@@ -375,7 +446,7 @@ class SP_League_Table extends SP_Custom_Post{
|
|
375 |
continue;
|
376 |
|
377 |
foreach ( $stats as $stat ):
|
378 |
-
if ( sp_array_value( $placeholders
|
379 |
|
380 |
if ( $stat->equation == null ):
|
381 |
$placeholder += sp_array_value( sp_array_value( $adjustments, $team_id, array() ), $stat->post_name, null );
|
5 |
* The SportsPress league table class handles individual league table data.
|
6 |
*
|
7 |
* @class SP_League_Table
|
8 |
+
* @version 1.9.8
|
9 |
* @package SportsPress/Classes
|
10 |
* @category Class
|
11 |
* @author ThemeBoy
|
132 |
endforeach;
|
133 |
|
134 |
// Initialize team totals
|
135 |
+
$totals[ $team_id ] = array(
|
136 |
+
'eventsplayed' => 0,
|
137 |
+
'eventsplayed_home' => 0,
|
138 |
+
'eventsplayed_away' => 0,
|
139 |
+
'eventsplayed_venue' => 0,
|
140 |
+
'eventminutes' => 0,
|
141 |
+
'eventminutes_home' => 0,
|
142 |
+
'eventminutes_away' => 0,
|
143 |
+
'eventminutes_venue' => 0,
|
144 |
+
'streak' => 0,
|
145 |
+
'streak_home' => 0,
|
146 |
+
'streak_away' => 0,
|
147 |
+
'streak_venue' => 0,
|
148 |
+
);
|
149 |
|
150 |
foreach ( $result_labels as $key => $value ):
|
151 |
$totals[ $team_id ][ $key . 'for' ] = 0;
|
152 |
+
$totals[ $team_id ][ $key . 'for_home' ] = 0;
|
153 |
+
$totals[ $team_id ][ $key . 'for_away' ] = 0;
|
154 |
+
$totals[ $team_id ][ $key . 'for_venue' ] = 0;
|
155 |
$totals[ $team_id ][ $key . 'against' ] = 0;
|
156 |
+
$totals[ $team_id ][ $key . 'against_home' ] = 0;
|
157 |
+
$totals[ $team_id ][ $key . 'against_away' ] = 0;
|
158 |
+
$totals[ $team_id ][ $key . 'against_venue' ] = 0;
|
159 |
endforeach;
|
160 |
|
161 |
foreach ( $outcome_labels as $key => $value ):
|
162 |
$totals[ $team_id ][ $key ] = 0;
|
163 |
+
$totals[ $team_id ][ $key . '_home' ] = 0;
|
164 |
+
$totals[ $team_id ][ $key . '_away' ] = 0;
|
165 |
+
$totals[ $team_id ][ $key . '_venue' ] = 0;
|
166 |
endforeach;
|
167 |
|
168 |
// Get static stats
|
218 |
|
219 |
$events = get_posts( $args );
|
220 |
|
221 |
+
$e = 0;
|
222 |
+
|
223 |
// Event loop
|
224 |
foreach ( $events as $event ):
|
225 |
|
249 |
$totals[ $team_id ]['eventsplayed'] ++;
|
250 |
$totals[ $team_id ]['eventminutes'] += $minutes;
|
251 |
$totals[ $team_id ][ $outcome ] ++;
|
252 |
+
|
253 |
+
// Add to home or away stats
|
254 |
+
if ( 0 === $i ):
|
255 |
+
$totals[ $team_id ]['eventsplayed_home'] ++;
|
256 |
+
$totals[ $team_id ]['eventminutes_home'] += $minutes;
|
257 |
+
$totals[ $team_id ][ $outcome . '_home' ] ++;
|
258 |
+
else:
|
259 |
+
$totals[ $team_id ]['eventsplayed_away'] ++;
|
260 |
+
$totals[ $team_id ]['eventminutes_away'] += $minutes;
|
261 |
+
$totals[ $team_id ][ $outcome . '_away' ] ++;
|
262 |
+
endif;
|
263 |
+
|
264 |
+
// Add to venue stats
|
265 |
+
if ( sp_is_home_venue( $team_id, $event->ID ) ):
|
266 |
+
$totals[ $team_id ]['eventsplayed_venue'] ++;
|
267 |
+
$totals[ $team_id ]['eventminutes_venue'] += $minutes;
|
268 |
+
$totals[ $team_id ][ $outcome . '_venue' ] ++;
|
269 |
+
endif;
|
270 |
endif;
|
271 |
|
272 |
if ( $outcome && $outcome != '-1' ):
|
307 |
else:
|
308 |
if ( array_key_exists( $team_id, $totals ) && is_array( $totals[ $team_id ] ) && array_key_exists( $key . 'for', $totals[ $team_id ] ) ):
|
309 |
$totals[ $team_id ][ $key . 'for' ] += $value;
|
310 |
+
$totals[ $team_id ][ $key . 'for' . ( $e + 1 ) ] = $value;
|
311 |
+
|
312 |
+
// Add to home or away stats
|
313 |
+
if ( 0 === $i ):
|
314 |
+
$totals[ $team_id ][ $key . 'for_home' ] += $value;
|
315 |
+
else:
|
316 |
+
$totals[ $team_id ][ $key . 'for_away' ] += $value;
|
317 |
+
endif;
|
318 |
+
|
319 |
+
// Add to venue stats
|
320 |
+
if ( sp_is_home_venue( $team_id, $event->ID ) ):
|
321 |
+
$totals[ $team_id ][ $key . 'for_venue' ] += $value;
|
322 |
+
endif;
|
323 |
+
|
324 |
foreach( $results as $other_team_id => $other_result ):
|
325 |
if ( $other_team_id != $team_id && array_key_exists( $key . 'against', $totals[ $team_id ] ) ):
|
326 |
$totals[ $team_id ][ $key . 'against' ] += sp_array_value( $other_result, $key, 0 );
|
327 |
+
$totals[ $team_id ][ $key . 'against' . ( $e + 1 ) ] = sp_array_value( $other_result, $key, 0 );
|
328 |
+
|
329 |
+
// Add to home or away stats
|
330 |
+
if ( 0 === $i ):
|
331 |
+
$totals[ $team_id ][ $key . 'against_home' ] += sp_array_value( $other_result, $key, 0 );
|
332 |
+
else:
|
333 |
+
$totals[ $team_id ][ $key . 'against_away' ] += sp_array_value( $other_result, $key, 0 );
|
334 |
+
endif;
|
335 |
+
|
336 |
+
// Add to venue stats
|
337 |
+
if ( sp_is_home_venue( $team_id, $event->ID ) ):
|
338 |
+
$totals[ $team_id ][ $key . 'against_venue' ] += sp_array_value( $other_result, $key, 0 );
|
339 |
+
endif;
|
340 |
endif;
|
341 |
endforeach;
|
342 |
endif;
|
348 |
|
349 |
endforeach;
|
350 |
|
351 |
+
$e++;
|
352 |
+
|
353 |
endforeach;
|
354 |
|
355 |
foreach ( $streaks as $team_id => $streak ):
|
446 |
continue;
|
447 |
|
448 |
foreach ( $stats as $stat ):
|
449 |
+
if ( sp_array_value( sp_array_value( $placeholders, $team_id, array() ), $stat->post_name, '' ) == '' ):
|
450 |
|
451 |
if ( $stat->equation == null ):
|
452 |
$placeholder += sp_array_value( sp_array_value( $adjustments, $team_id, array() ), $stat->post_name, null );
|
includes/class-sp-modules.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* The SportsPress modules class stores available modules.
|
6 |
*
|
7 |
* @class SP_Modules
|
8 |
-
* @version 1.
|
9 |
* @package SportsPress/Classes
|
10 |
* @category Class
|
11 |
* @author ThemeBoy
|
@@ -50,6 +50,13 @@ class SP_Modules {
|
|
50 |
'icon' => 'sp-icon-chart',
|
51 |
'desc' => __( 'Create automated league tables to keep track of team standings.', 'sportspress' ),
|
52 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
'team_colors' => array(
|
54 |
'label' => __( 'Team Colors', 'sportspress' ),
|
55 |
'class' => 'SportsPress_Team_Colors',
|
@@ -57,6 +64,13 @@ class SP_Modules {
|
|
57 |
'link' => 'http://tboy.co/pro',
|
58 |
'desc' => __( 'Create a custom color palette for each team.', 'sportspress' ),
|
59 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
),
|
61 |
'player_staff' => array(
|
62 |
'player_lists' => array(
|
@@ -64,13 +78,6 @@ class SP_Modules {
|
|
64 |
'icon' => 'sp-icon-list',
|
65 |
'desc' => __( 'Create team rosters, player galleries, and ranking charts.', 'sportspress' ),
|
66 |
),
|
67 |
-
'birthdays' => array(
|
68 |
-
'label' => __( 'Birthdays', 'sportspress' ),
|
69 |
-
'class' => 'SportsPress_Birthdays',
|
70 |
-
'icon' => 'sp-icon-cake',
|
71 |
-
'link' => 'http://tboy.co/pro',
|
72 |
-
'desc' => __( "Display each player's birthday and their current age.", 'sportspress' ),
|
73 |
-
),
|
74 |
'staff_directories' => array(
|
75 |
'label' => __( 'Directories', 'sportspress' ),
|
76 |
'class' => 'SportsPress_Staff_Directories',
|
@@ -110,13 +117,6 @@ class SP_Modules {
|
|
110 |
'icon' => 'dashicons dashicons-twitter',
|
111 |
'desc' => __( 'Add a Twitter feed to team, player, and staff pages.', 'sportspress' ),
|
112 |
),
|
113 |
-
'league_menu' => array(
|
114 |
-
'label' => __( 'League Menu', 'sportspress' ),
|
115 |
-
'class' => 'SportsPress_League_Menu',
|
116 |
-
'icon' => 'sp-icon-menu',
|
117 |
-
'link' => 'http://tboy.co/pro',
|
118 |
-
'desc' => __( 'Add a global navigation bar to display logos that link to each team.', 'sportspress' ),
|
119 |
-
),
|
120 |
'sponsors' => array(
|
121 |
'label' => __( 'Sponsors', 'sportspress' ),
|
122 |
'class' => 'SportsPress_Sponsors',
|
5 |
* The SportsPress modules class stores available modules.
|
6 |
*
|
7 |
* @class SP_Modules
|
8 |
+
* @version 1.9
|
9 |
* @package SportsPress/Classes
|
10 |
* @category Class
|
11 |
* @author ThemeBoy
|
50 |
'icon' => 'sp-icon-chart',
|
51 |
'desc' => __( 'Create automated league tables to keep track of team standings.', 'sportspress' ),
|
52 |
),
|
53 |
+
'league_menu' => array(
|
54 |
+
'label' => __( 'League Menu', 'sportspress' ),
|
55 |
+
'class' => 'SportsPress_League_Menu',
|
56 |
+
'icon' => 'sp-icon-menu',
|
57 |
+
'link' => 'http://tboy.co/pro',
|
58 |
+
'desc' => __( 'Add a global navigation bar to display logos that link to each team.', 'sportspress' ),
|
59 |
+
),
|
60 |
'team_colors' => array(
|
61 |
'label' => __( 'Team Colors', 'sportspress' ),
|
62 |
'class' => 'SportsPress_Team_Colors',
|
64 |
'link' => 'http://tboy.co/pro',
|
65 |
'desc' => __( 'Create a custom color palette for each team.', 'sportspress' ),
|
66 |
),
|
67 |
+
'team_access' => array(
|
68 |
+
'label' => __( 'Team Access', 'sportspress' ),
|
69 |
+
'class' => 'SportsPress_Team_Access',
|
70 |
+
'icon' => 'sp-icon-key',
|
71 |
+
'link' => 'http://tboy.co/pro',
|
72 |
+
'desc' => __( 'Limit user access to data that is related to their team.', 'sportspress' ),
|
73 |
+
),
|
74 |
),
|
75 |
'player_staff' => array(
|
76 |
'player_lists' => array(
|
78 |
'icon' => 'sp-icon-list',
|
79 |
'desc' => __( 'Create team rosters, player galleries, and ranking charts.', 'sportspress' ),
|
80 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
'staff_directories' => array(
|
82 |
'label' => __( 'Directories', 'sportspress' ),
|
83 |
'class' => 'SportsPress_Staff_Directories',
|
117 |
'icon' => 'dashicons dashicons-twitter',
|
118 |
'desc' => __( 'Add a Twitter feed to team, player, and staff pages.', 'sportspress' ),
|
119 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
'sponsors' => array(
|
121 |
'label' => __( 'Sponsors', 'sportspress' ),
|
122 |
'class' => 'SportsPress_Sponsors',
|
includes/class-sp-player-list.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* The SportsPress player list class handles individual player list data.
|
6 |
*
|
7 |
* @class SP_Player_List
|
8 |
-
* @version 1.
|
9 |
* @package SportsPress/Classes
|
10 |
* @category Class
|
11 |
* @author ThemeBoy
|
@@ -51,6 +51,9 @@ class SP_Player_List extends SP_Custom_Post {
|
|
51 |
// Get labels from outcome variables
|
52 |
$outcome_labels = (array)sp_get_var_labels( 'sp_outcome' );
|
53 |
|
|
|
|
|
|
|
54 |
// Get players automatically if set to auto
|
55 |
if ( 'auto' == $select ) {
|
56 |
$player_ids = array();
|
@@ -59,6 +62,8 @@ class SP_Player_List extends SP_Custom_Post {
|
|
59 |
'post_type' => 'sp_player',
|
60 |
'numberposts' => -1,
|
61 |
'posts_per_page' => -1,
|
|
|
|
|
62 |
'order' => 'ASC',
|
63 |
'tax_query' => array(
|
64 |
'relation' => 'AND',
|
@@ -89,7 +94,7 @@ class SP_Player_List extends SP_Custom_Post {
|
|
89 |
);
|
90 |
endif;
|
91 |
|
92 |
-
if ( $team ):
|
93 |
$args['meta_query'] = array(
|
94 |
array(
|
95 |
'key' => 'sp_team',
|
@@ -148,13 +153,16 @@ class SP_Player_List extends SP_Custom_Post {
|
|
148 |
|
149 |
foreach ( $performance_labels as $key => $value ):
|
150 |
$totals[ $player_id ][ $key ] = 0;
|
151 |
-
$totals[ $player_id ][ $key ] = 0;
|
152 |
endforeach;
|
153 |
|
154 |
foreach ( $outcome_labels as $key => $value ):
|
155 |
$totals[ $player_id ][ $key ] = 0;
|
156 |
endforeach;
|
157 |
|
|
|
|
|
|
|
|
|
158 |
// Get metrics
|
159 |
$metrics = (array) get_post_meta( $player_id, 'sp_metrics', true );
|
160 |
foreach ( $metrics as $key => $value ):
|
@@ -166,21 +174,36 @@ class SP_Player_List extends SP_Custom_Post {
|
|
166 |
// Get static stats
|
167 |
$static = get_post_meta( $player_id, 'sp_statistics', true );
|
168 |
|
169 |
-
//
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
174 |
endforeach;
|
175 |
endforeach;
|
|
|
|
|
176 |
endif;
|
|
|
|
|
|
|
177 |
endforeach;
|
178 |
|
179 |
$args = array(
|
180 |
'post_type' => 'sp_event',
|
181 |
'numberposts' => -1,
|
182 |
'posts_per_page' => -1,
|
183 |
-
'order' => '
|
184 |
'meta_query' => array(
|
185 |
array(
|
186 |
'key' => 'sp_format',
|
@@ -214,7 +237,7 @@ class SP_Player_List extends SP_Custom_Post {
|
|
214 |
$events = get_posts( $args );
|
215 |
|
216 |
// Event loop
|
217 |
-
foreach ( $events as $event ):
|
218 |
$results = (array)get_post_meta( $event->ID, 'sp_results', true );
|
219 |
$team_performance = get_post_meta( $event->ID, 'sp_players', true );
|
220 |
$minutes = get_post_meta( $event->ID, 'sp_minutes', true );
|
@@ -275,63 +298,93 @@ class SP_Player_List extends SP_Custom_Post {
|
|
275 |
|
276 |
$team_results = sp_array_value( $results, $team_id, array() );
|
277 |
|
278 |
-
//
|
279 |
-
|
|
|
280 |
|
281 |
-
|
282 |
-
|
283 |
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
|
295 |
-
|
296 |
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
|
302 |
-
|
303 |
|
304 |
-
|
305 |
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
|
324 |
-
|
325 |
-
|
326 |
-
|
|
|
327 |
endif;
|
328 |
-
|
329 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
330 |
endif;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
331 |
endif;
|
332 |
endif;
|
333 |
endforeach; endif;
|
334 |
endforeach; endif;
|
|
|
335 |
endforeach;
|
336 |
|
337 |
foreach ( $streaks as $player_id => $streak ):
|
@@ -347,7 +400,9 @@ class SP_Player_List extends SP_Custom_Post {
|
|
347 |
|
348 |
if ( $outcomes ):
|
349 |
$outcome = reset( $outcomes );
|
350 |
-
$
|
|
|
|
|
351 |
else:
|
352 |
$totals[ $player_id ]['streak'] = null;
|
353 |
endif;
|
@@ -436,9 +491,19 @@ class SP_Player_List extends SP_Custom_Post {
|
|
436 |
|
437 |
// Add player number and name to row
|
438 |
$merged[ $player_id ] = array();
|
439 |
-
|
|
|
|
|
|
|
440 |
$player_data['name'] = get_the_title( $player_id );
|
441 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
442 |
|
443 |
foreach( $player_data as $key => $value ):
|
444 |
|
@@ -473,8 +538,10 @@ class SP_Player_List extends SP_Custom_Post {
|
|
473 |
foreach( $this->columns as $key ):
|
474 |
if ( $key == 'number' ):
|
475 |
$labels[ $key ] = '#';
|
476 |
-
elseif ( $key == 'team' ):
|
477 |
$labels[ $key ] = __( 'Team', 'sportspress' );
|
|
|
|
|
478 |
elseif ( array_key_exists( $key, $columns ) ):
|
479 |
$labels[ $key ] = $columns[ $key ];
|
480 |
endif;
|
@@ -492,7 +559,8 @@ class SP_Player_List extends SP_Custom_Post {
|
|
492 |
$labels = array();
|
493 |
if ( in_array( 'number', $this->columns ) ) $labels['number'] = '#';
|
494 |
$labels['name'] = __( 'Player', 'sportspress' );
|
495 |
-
if ( in_array( 'team', $this->columns ) ) $labels['team'] = __( 'Team', 'sportspress' );
|
|
|
496 |
|
497 |
$merged[0] = array_merge( $labels, $columns );
|
498 |
return $merged;
|
5 |
* The SportsPress player list class handles individual player list data.
|
6 |
*
|
7 |
* @class SP_Player_List
|
8 |
+
* @version 1.9.13
|
9 |
* @package SportsPress/Classes
|
10 |
* @category Class
|
11 |
* @author ThemeBoy
|
51 |
// Get labels from outcome variables
|
52 |
$outcome_labels = (array)sp_get_var_labels( 'sp_outcome' );
|
53 |
|
54 |
+
// Get labels from result variables
|
55 |
+
$result_labels = (array)sp_get_var_labels( 'sp_result' );
|
56 |
+
|
57 |
// Get players automatically if set to auto
|
58 |
if ( 'auto' == $select ) {
|
59 |
$player_ids = array();
|
62 |
'post_type' => 'sp_player',
|
63 |
'numberposts' => -1,
|
64 |
'posts_per_page' => -1,
|
65 |
+
'meta_key' => 'sp_number',
|
66 |
+
'orderby' => 'meta_value_num',
|
67 |
'order' => 'ASC',
|
68 |
'tax_query' => array(
|
69 |
'relation' => 'AND',
|
94 |
);
|
95 |
endif;
|
96 |
|
97 |
+
if ( $team && apply_filters( 'sportspress_has_teams', true ) ):
|
98 |
$args['meta_query'] = array(
|
99 |
array(
|
100 |
'key' => 'sp_team',
|
153 |
|
154 |
foreach ( $performance_labels as $key => $value ):
|
155 |
$totals[ $player_id ][ $key ] = 0;
|
|
|
156 |
endforeach;
|
157 |
|
158 |
foreach ( $outcome_labels as $key => $value ):
|
159 |
$totals[ $player_id ][ $key ] = 0;
|
160 |
endforeach;
|
161 |
|
162 |
+
foreach ( $result_labels as $key => $value ):
|
163 |
+
$totals[ $player_id ][ $key . 'for' ] = $totals[ $player_id ][ $key . 'against' ] = 0;
|
164 |
+
endforeach;
|
165 |
+
|
166 |
// Get metrics
|
167 |
$metrics = (array) get_post_meta( $player_id, 'sp_metrics', true );
|
168 |
foreach ( $metrics as $key => $value ):
|
174 |
// Get static stats
|
175 |
$static = get_post_meta( $player_id, 'sp_statistics', true );
|
176 |
|
177 |
+
// Get league and season arrays for static stats
|
178 |
+
$static_league_ids = ( empty( $league_ids ) ? array( 0 ) : $league_ids );
|
179 |
+
$static_season_ids = ( empty( $season_ids ) ? array( 0 ) : $season_ids );
|
180 |
+
|
181 |
+
// Add static stats to placeholders
|
182 |
+
if ( $static_league_ids && $static_season_ids ):
|
183 |
+
foreach ( $static_league_ids as $league_id ):
|
184 |
+
foreach ( $static_season_ids as $season_id ):
|
185 |
+
$player_league_season_stats = sp_array_value( sp_array_value( $static, $league_id, array() ), $season_id, array() );
|
186 |
+
if ( is_array( $player_league_season_stats ) ):
|
187 |
+
foreach ( $player_league_season_stats as $key => $value ):
|
188 |
+
$current_value = sp_array_value( sp_array_value( $placeholders, $player_id, array() ), $key, 0 );
|
189 |
+
$placeholders[ $player_id ][ $key ] = $current_value + $value;
|
190 |
+
endforeach;
|
191 |
+
endif;
|
192 |
endforeach;
|
193 |
endforeach;
|
194 |
+
else:
|
195 |
+
$placeholders[ $player_id ] = sp_array_value( sp_array_value( $static, 0, array() ), 0, array() );
|
196 |
endif;
|
197 |
+
|
198 |
+
// Add metrics to placeholders
|
199 |
+
$placeholders[ $player_id ] = array_merge( $metrics, sp_array_value( $placeholders, $player_id, array() ) );
|
200 |
endforeach;
|
201 |
|
202 |
$args = array(
|
203 |
'post_type' => 'sp_event',
|
204 |
'numberposts' => -1,
|
205 |
'posts_per_page' => -1,
|
206 |
+
'order' => 'DESC',
|
207 |
'meta_query' => array(
|
208 |
array(
|
209 |
'key' => 'sp_format',
|
237 |
$events = get_posts( $args );
|
238 |
|
239 |
// Event loop
|
240 |
+
foreach ( $events as $i => $event ):
|
241 |
$results = (array)get_post_meta( $event->ID, 'sp_results', true );
|
242 |
$team_performance = get_post_meta( $event->ID, 'sp_players', true );
|
243 |
$minutes = get_post_meta( $event->ID, 'sp_minutes', true );
|
298 |
|
299 |
$team_results = sp_array_value( $results, $team_id, array() );
|
300 |
|
301 |
+
// Loop through home team
|
302 |
+
foreach ( $team_results as $result_slug => $team_result ):
|
303 |
+
if ( 'outcome' == $result_slug ):
|
304 |
|
305 |
+
// Increment events attended
|
306 |
+
$totals[ $player_id ]['eventsattended'] ++;
|
307 |
|
308 |
+
// Continue with incrementing values if active in event
|
309 |
+
if ( sp_array_value( $player_performance, 'status' ) != 'sub' || sp_array_value( $player_performance, 'sub', 0 ) ):
|
310 |
+
$totals[ $player_id ]['eventsplayed'] ++;
|
311 |
+
$totals[ $player_id ]['eventminutes'] += $minutes;
|
312 |
|
313 |
+
if ( sp_array_value( $player_performance, 'status' ) == 'lineup' ):
|
314 |
+
$totals[ $player_id ]['eventsstarted'] ++;
|
315 |
+
elseif ( sp_array_value( $player_performance, 'status' ) == 'sub' && sp_array_value( $player_performance, 'sub', 0 ) ):
|
316 |
+
$totals[ $player_id ]['eventssubbed'] ++;
|
317 |
+
endif;
|
318 |
|
319 |
+
$value = $team_result;
|
320 |
|
321 |
+
// Convert to array
|
322 |
+
if ( ! is_array( $value ) ):
|
323 |
+
$value = array( $value );
|
324 |
+
endif;
|
325 |
|
326 |
+
foreach ( $value as $outcome ):
|
327 |
|
328 |
+
if ( $outcome && $outcome != '-1' ):
|
329 |
|
330 |
+
// Increment events attended and outcome count
|
331 |
+
if ( array_key_exists( $outcome, $totals[ $player_id ] ) ):
|
332 |
+
$totals[ $player_id ][ $outcome ] ++;
|
333 |
+
endif;
|
334 |
|
335 |
+
// Add to streak counter
|
336 |
+
if ( $streaks[ $player_id ]['fire'] && ( $streaks[ $player_id ]['name'] == '' || $streaks[ $player_id ]['name'] == $outcome ) ):
|
337 |
+
$streaks[ $player_id ]['name'] = $outcome;
|
338 |
+
$streaks[ $player_id ]['count'] ++;
|
339 |
+
else:
|
340 |
+
$streaks[ $player_id ]['fire'] = 0;
|
341 |
+
endif;
|
342 |
|
343 |
+
// Add to last 5 counter if sum is less than 5
|
344 |
+
if ( array_key_exists( $player_id, $last5s ) && array_key_exists( $outcome, $last5s[ $player_id ] ) && array_sum( $last5s[ $player_id ] ) < 5 ):
|
345 |
+
$last5s[ $player_id ][ $outcome ] ++;
|
346 |
+
endif;
|
347 |
|
348 |
+
// Add to last 10 counter if sum is less than 10
|
349 |
+
if ( array_key_exists( $player_id, $last10s ) && array_key_exists( $outcome, $last10s[ $player_id ] ) && array_sum( $last10s[ $player_id ] ) < 10 ):
|
350 |
+
$last10s[ $player_id ][ $outcome ] ++;
|
351 |
+
endif;
|
352 |
endif;
|
353 |
+
endforeach;
|
354 |
+
endif;
|
355 |
+
else:
|
356 |
+
|
357 |
+
// Add to total
|
358 |
+
$value = sp_array_value( $totals[ $player_id ], $result_slug . 'for', 0 );
|
359 |
+
$value += $team_result;
|
360 |
+
$totals[ $player_id ][ $result_slug . 'for' ] = $value;
|
361 |
+
|
362 |
+
// Add subset
|
363 |
+
$totals[ $player_id ][ $result_slug . 'for' . ( $i + 1 ) ] = $team_result;
|
364 |
endif;
|
365 |
+
endforeach;
|
366 |
+
|
367 |
+
// Loop through away teams
|
368 |
+
if ( sizeof( $results ) ):
|
369 |
+
foreach ( $results as $id => $team_results ):
|
370 |
+
if ( $team_id == $id ) continue;
|
371 |
+
unset( $team_results['outcome'] );
|
372 |
+
foreach ( $team_results as $result_slug => $team_result ):
|
373 |
+
|
374 |
+
// Add to total
|
375 |
+
$value = sp_array_value( $totals[ $player_id ], $result_slug . 'against', 0 );
|
376 |
+
$value += $team_result;
|
377 |
+
$totals[ $player_id ][ $result_slug . 'against' ] = $value;
|
378 |
+
|
379 |
+
// Add subset
|
380 |
+
$totals[ $player_id ][ $result_slug . 'against' . ( $i + 1 ) ] = $team_result;
|
381 |
+
endforeach;
|
382 |
+
endforeach;
|
383 |
endif;
|
384 |
endif;
|
385 |
endforeach; endif;
|
386 |
endforeach; endif;
|
387 |
+
$i++;
|
388 |
endforeach;
|
389 |
|
390 |
foreach ( $streaks as $player_id => $streak ):
|
400 |
|
401 |
if ( $outcomes ):
|
402 |
$outcome = reset( $outcomes );
|
403 |
+
$abbreviation = sp_get_abbreviation( $outcome->ID );
|
404 |
+
if ( empty( $abbreviation ) ) $abbreviation = strtoupper( substr( $outcome->post_title, 0, 1 ) );
|
405 |
+
$totals[ $player_id ]['streak'] = $abbreviation . $streak['count'];
|
406 |
else:
|
407 |
$totals[ $player_id ]['streak'] = null;
|
408 |
endif;
|
491 |
|
492 |
// Add player number and name to row
|
493 |
$merged[ $player_id ] = array();
|
494 |
+
if ( in_array( 'number', $this->columns ) ):
|
495 |
+
$player_data['number'] = get_post_meta( $player_id, 'sp_number', true );
|
496 |
+
endif;
|
497 |
+
|
498 |
$player_data['name'] = get_the_title( $player_id );
|
499 |
+
|
500 |
+
if ( in_array( 'team', $this->columns ) ):
|
501 |
+
$player_data['team'] = get_post_meta( $player_id, 'sp_team', true );
|
502 |
+
endif;
|
503 |
+
|
504 |
+
if ( in_array( 'position', $this->columns ) ):
|
505 |
+
$player_data['position'] = null;
|
506 |
+
endif;
|
507 |
|
508 |
foreach( $player_data as $key => $value ):
|
509 |
|
538 |
foreach( $this->columns as $key ):
|
539 |
if ( $key == 'number' ):
|
540 |
$labels[ $key ] = '#';
|
541 |
+
elseif ( $key == 'team' && apply_filters( 'sportspress_has_teams', true ) ):
|
542 |
$labels[ $key ] = __( 'Team', 'sportspress' );
|
543 |
+
elseif ( $key == 'position' ):
|
544 |
+
$labels[ $key ] = __( 'Position', 'sportspress' );
|
545 |
elseif ( array_key_exists( $key, $columns ) ):
|
546 |
$labels[ $key ] = $columns[ $key ];
|
547 |
endif;
|
559 |
$labels = array();
|
560 |
if ( in_array( 'number', $this->columns ) ) $labels['number'] = '#';
|
561 |
$labels['name'] = __( 'Player', 'sportspress' );
|
562 |
+
if ( in_array( 'team', $this->columns ) && apply_filters( 'sportspress_has_teams', true ) ) $labels['team'] = __( 'Team', 'sportspress' );
|
563 |
+
if ( in_array( 'position', $this->columns ) ) $labels['position'] = __( 'Position', 'sportspress' );
|
564 |
|
565 |
$merged[0] = array_merge( $labels, $columns );
|
566 |
return $merged;
|
includes/class-sp-player.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* The SportsPress player class handles individual player data.
|
6 |
*
|
7 |
* @class SP_Player
|
8 |
-
* @version 1.
|
9 |
* @package SportsPress/Classes
|
10 |
* @category Class
|
11 |
* @author ThemeBoy
|
@@ -22,6 +22,26 @@ class SP_Player extends SP_Custom_Post {
|
|
22 |
return get_the_terms( $this->ID, 'sp_position' );
|
23 |
}
|
24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
/**
|
26 |
* Returns current teams
|
27 |
*
|
@@ -49,7 +69,16 @@ class SP_Player extends SP_Custom_Post {
|
|
49 |
* @return array
|
50 |
*/
|
51 |
public function nationalities() {
|
52 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
}
|
54 |
|
55 |
/**
|
@@ -62,7 +91,8 @@ class SP_Player extends SP_Custom_Post {
|
|
62 |
$metrics = (array)get_post_meta( $this->ID, 'sp_metrics', true );
|
63 |
$metric_labels = (array)sp_get_var_labels( 'sp_metric', $neg );
|
64 |
$data = array();
|
65 |
-
|
|
|
66 |
$metric = sp_array_value( $metrics, $key, null );
|
67 |
if ( $metric == null )
|
68 |
continue;
|
@@ -93,6 +123,9 @@ class SP_Player extends SP_Custom_Post {
|
|
93 |
// Get labels from outcome variables
|
94 |
$outcome_labels = (array)sp_get_var_labels( 'sp_outcome' );
|
95 |
|
|
|
|
|
|
|
96 |
// Generate array of all season ids and season names
|
97 |
$div_ids = array();
|
98 |
$season_names = array();
|
@@ -129,6 +162,10 @@ class SP_Player extends SP_Custom_Post {
|
|
129 |
$totals[ $key ] = 0;
|
130 |
endforeach;
|
131 |
|
|
|
|
|
|
|
|
|
132 |
// Initialize streaks counter
|
133 |
$streak = array( 'name' => '', 'count' => 0, 'fire' => 1 );
|
134 |
|
@@ -147,7 +184,7 @@ class SP_Player extends SP_Custom_Post {
|
|
147 |
'post_type' => 'sp_event',
|
148 |
'numberposts' => -1,
|
149 |
'posts_per_page' => -1,
|
150 |
-
'order' => '
|
151 |
'meta_query' => array(
|
152 |
'relation' => 'AND',
|
153 |
array(
|
@@ -186,7 +223,7 @@ class SP_Player extends SP_Custom_Post {
|
|
186 |
$events = get_posts( $args );
|
187 |
|
188 |
// Event loop
|
189 |
-
foreach( $events as $event ):
|
190 |
$results = (array)get_post_meta( $event->ID, 'sp_results', true );
|
191 |
$team_performance = (array)get_post_meta( $event->ID, 'sp_players', true );
|
192 |
$minutes = get_post_meta( $event->ID, 'sp_minutes', true );
|
@@ -244,62 +281,92 @@ class SP_Player extends SP_Custom_Post {
|
|
244 |
endforeach;
|
245 |
|
246 |
$team_results = sp_array_value( $results, $team_id, array() );
|
|
|
247 |
|
248 |
-
//
|
249 |
-
|
|
|
250 |
|
251 |
-
|
252 |
-
|
253 |
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
|
265 |
-
|
266 |
|
267 |
-
|
268 |
-
|
269 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
270 |
endif;
|
|
|
271 |
|
272 |
-
|
273 |
-
|
|
|
|
|
274 |
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
$streak['fire'] = 0;
|
286 |
-
endif;
|
287 |
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
|
293 |
-
|
294 |
-
|
295 |
-
$last10[ $outcome ] ++;
|
296 |
-
endif;
|
297 |
-
endif;
|
298 |
endforeach;
|
299 |
-
|
300 |
endif;
|
301 |
endif;
|
302 |
endforeach;
|
|
|
303 |
endforeach;
|
304 |
|
305 |
// Compile streaks counter and add to totals
|
@@ -313,7 +380,9 @@ class SP_Player extends SP_Custom_Post {
|
|
313 |
|
314 |
if ( $outcomes ):
|
315 |
$outcome = reset( $outcomes );
|
316 |
-
$
|
|
|
|
|
317 |
endif;
|
318 |
|
319 |
// Add last counters to totals
|
@@ -343,16 +412,13 @@ class SP_Player extends SP_Custom_Post {
|
|
343 |
|
344 |
foreach( $placeholders as $season_id => $season_data ):
|
345 |
|
346 |
-
|
347 |
-
continue;
|
348 |
-
|
349 |
-
$season_name = sp_array_value( $season_names, $season_id, ' ' );
|
350 |
-
|
351 |
-
$team_id = sp_array_value( $leagues, $season_id, array() );
|
352 |
|
353 |
if ( -1 == $team_id )
|
354 |
continue;
|
355 |
|
|
|
|
|
356 |
if ( $team_id ):
|
357 |
$team_name = get_the_title( $team_id );
|
358 |
|
5 |
* The SportsPress player class handles individual player data.
|
6 |
*
|
7 |
* @class SP_Player
|
8 |
+
* @version 1.9.13
|
9 |
* @package SportsPress/Classes
|
10 |
* @category Class
|
11 |
* @author ThemeBoy
|
22 |
return get_the_terms( $this->ID, 'sp_position' );
|
23 |
}
|
24 |
|
25 |
+
/**
|
26 |
+
* Returns leagues
|
27 |
+
*
|
28 |
+
* @access public
|
29 |
+
* @return array
|
30 |
+
*/
|
31 |
+
public function leagues() {
|
32 |
+
return get_the_terms( $this->ID, 'sp_league' );
|
33 |
+
}
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Returns seasons
|
37 |
+
*
|
38 |
+
* @access public
|
39 |
+
* @return array
|
40 |
+
*/
|
41 |
+
public function seasons() {
|
42 |
+
return get_the_terms( $this->ID, 'sp_season' );
|
43 |
+
}
|
44 |
+
|
45 |
/**
|
46 |
* Returns current teams
|
47 |
*
|
69 |
* @return array
|
70 |
*/
|
71 |
public function nationalities() {
|
72 |
+
$nationalities = get_post_meta( $this->ID, 'sp_nationality', false );
|
73 |
+
if ( empty ( $nationalities ) ) return array();
|
74 |
+
foreach ( $nationalities as $nationality ):
|
75 |
+
if ( 2 == strlen( $nationality ) ):
|
76 |
+
$legacy = SP()->countries->legacy;
|
77 |
+
$nationality = strtolower( $nationality );
|
78 |
+
$nationality = sp_array_value( $legacy, $nationality, null );
|
79 |
+
endif;
|
80 |
+
endforeach;
|
81 |
+
return $nationalities;
|
82 |
}
|
83 |
|
84 |
/**
|
91 |
$metrics = (array)get_post_meta( $this->ID, 'sp_metrics', true );
|
92 |
$metric_labels = (array)sp_get_var_labels( 'sp_metric', $neg );
|
93 |
$data = array();
|
94 |
+
|
95 |
+
foreach ( $metric_labels as $key => $value ):
|
96 |
$metric = sp_array_value( $metrics, $key, null );
|
97 |
if ( $metric == null )
|
98 |
continue;
|
123 |
// Get labels from outcome variables
|
124 |
$outcome_labels = (array)sp_get_var_labels( 'sp_outcome' );
|
125 |
|
126 |
+
// Get labels from result variables
|
127 |
+
$result_labels = (array)sp_get_var_labels( 'sp_result' );
|
128 |
+
|
129 |
// Generate array of all season ids and season names
|
130 |
$div_ids = array();
|
131 |
$season_names = array();
|
162 |
$totals[ $key ] = 0;
|
163 |
endforeach;
|
164 |
|
165 |
+
foreach ( $result_labels as $key => $value ):
|
166 |
+
$totals[ $key . 'for' ] = $totals[ $key . 'against' ] = 0;
|
167 |
+
endforeach;
|
168 |
+
|
169 |
// Initialize streaks counter
|
170 |
$streak = array( 'name' => '', 'count' => 0, 'fire' => 1 );
|
171 |
|
184 |
'post_type' => 'sp_event',
|
185 |
'numberposts' => -1,
|
186 |
'posts_per_page' => -1,
|
187 |
+
'order' => 'DESC',
|
188 |
'meta_query' => array(
|
189 |
'relation' => 'AND',
|
190 |
array(
|
223 |
$events = get_posts( $args );
|
224 |
|
225 |
// Event loop
|
226 |
+
foreach( $events as $i => $event ):
|
227 |
$results = (array)get_post_meta( $event->ID, 'sp_results', true );
|
228 |
$team_performance = (array)get_post_meta( $event->ID, 'sp_players', true );
|
229 |
$minutes = get_post_meta( $event->ID, 'sp_minutes', true );
|
281 |
endforeach;
|
282 |
|
283 |
$team_results = sp_array_value( $results, $team_id, array() );
|
284 |
+
unset( $results[ $team_id ] );
|
285 |
|
286 |
+
// Loop through home team
|
287 |
+
foreach ( $team_results as $result_slug => $team_result ):
|
288 |
+
if ( 'outcome' == $result_slug ):
|
289 |
|
290 |
+
// Increment events attended
|
291 |
+
$totals['eventsattended'] ++;
|
292 |
|
293 |
+
// Continue with incrementing values if active in event
|
294 |
+
if ( sp_array_value( $player_performance, 'status' ) != 'sub' || sp_array_value( $player_performance, 'sub', 0 ) ):
|
295 |
+
$totals['eventsplayed'] ++;
|
296 |
+
$totals['eventminutes'] += $minutes;
|
297 |
|
298 |
+
if ( sp_array_value( $player_performance, 'status' ) == 'lineup' ):
|
299 |
+
$totals['eventsstarted'] ++;
|
300 |
+
elseif ( sp_array_value( $player_performance, 'status' ) == 'sub' && sp_array_value( $player_performance, 'sub', 0 ) ):
|
301 |
+
$totals['eventssubbed'] ++;
|
302 |
+
endif;
|
303 |
|
304 |
+
$value = $team_result;
|
305 |
|
306 |
+
// Convert to array
|
307 |
+
if ( ! is_array( $value ) ):
|
308 |
+
$value = array( $value );
|
309 |
+
endif;
|
310 |
+
|
311 |
+
foreach ( $value as $outcome ):
|
312 |
+
if ( $outcome && $outcome != '-1' ):
|
313 |
+
|
314 |
+
// Increment outcome count
|
315 |
+
if ( array_key_exists( $outcome, $totals ) ):
|
316 |
+
$totals[ $outcome ] ++;
|
317 |
+
endif;
|
318 |
+
|
319 |
+
// Add to streak counter
|
320 |
+
if ( $streak['fire'] && ( $streak['name'] == '' || $streak['name'] == $outcome ) ):
|
321 |
+
$streak['name'] = $outcome;
|
322 |
+
$streak['count'] ++;
|
323 |
+
else:
|
324 |
+
$streak['fire'] = 0;
|
325 |
+
endif;
|
326 |
+
|
327 |
+
// Add to last 5 counter if sum is less than 5
|
328 |
+
if ( array_key_exists( $outcome, $last5 ) && array_sum( $last5 ) < 5 ):
|
329 |
+
$last5[ $outcome ] ++;
|
330 |
+
endif;
|
331 |
+
|
332 |
+
// Add to last 10 counter if sum is less than 10
|
333 |
+
if ( array_key_exists( $outcome, $last10 ) && array_sum( $last10 ) < 10 ):
|
334 |
+
$last10[ $outcome ] ++;
|
335 |
+
endif;
|
336 |
+
endif;
|
337 |
+
endforeach;
|
338 |
endif;
|
339 |
+
else:
|
340 |
|
341 |
+
// Add to total
|
342 |
+
$value = sp_array_value( $totals, $result_slug . 'for', 0 );
|
343 |
+
$value += $team_result;
|
344 |
+
$totals[ $result_slug . 'for' ] = $value;
|
345 |
|
346 |
+
// Add subset
|
347 |
+
$totals[ $result_slug . 'for' . ( $i + 1 ) ] = $team_result;
|
348 |
+
endif;
|
349 |
+
endforeach;
|
350 |
|
351 |
+
// Loop through away teams
|
352 |
+
if ( sizeof( $results ) ):
|
353 |
+
foreach ( $results as $team_results ):
|
354 |
+
unset( $team_results['outcome'] );
|
355 |
+
foreach ( $team_results as $result_slug => $team_result ):
|
|
|
|
|
356 |
|
357 |
+
// Add to total
|
358 |
+
$value = sp_array_value( $totals, $result_slug . 'against', 0 );
|
359 |
+
$value += $team_result;
|
360 |
+
$totals[ $result_slug . 'against' ] = $value;
|
361 |
|
362 |
+
// Add subset
|
363 |
+
$totals[ $result_slug . 'against' . ( $i + 1 ) ] = $team_result;
|
|
|
|
|
|
|
364 |
endforeach;
|
365 |
+
endforeach;
|
366 |
endif;
|
367 |
endif;
|
368 |
endforeach;
|
369 |
+
$i++;
|
370 |
endforeach;
|
371 |
|
372 |
// Compile streaks counter and add to totals
|
380 |
|
381 |
if ( $outcomes ):
|
382 |
$outcome = reset( $outcomes );
|
383 |
+
$abbreviation = sp_get_abbreviation( $outcome->ID );
|
384 |
+
if ( empty( $abbreviation ) ) $abbreviation = strtoupper( substr( $outcome->post_title, 0, 1 ) );
|
385 |
+
$totals['streak'] = $abbreviation . $streak['count'];
|
386 |
endif;
|
387 |
|
388 |
// Add last counters to totals
|
412 |
|
413 |
foreach( $placeholders as $season_id => $season_data ):
|
414 |
|
415 |
+
$team_id = sp_array_value( $leagues, $season_id, -1 );
|
|
|
|
|
|
|
|
|
|
|
416 |
|
417 |
if ( -1 == $team_id )
|
418 |
continue;
|
419 |
|
420 |
+
$season_name = sp_array_value( $season_names, $season_id, ' ' );
|
421 |
+
|
422 |
if ( $team_id ):
|
423 |
$team_name = get_the_title( $team_id );
|
424 |
|
includes/class-sp-post-types.php
CHANGED
@@ -9,7 +9,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
9 |
* Registers post types and taxonomies
|
10 |
*
|
11 |
* @class SP_Post_types
|
12 |
-
* @version 1.
|
13 |
* @package SportsPress/Classes
|
14 |
* @category Class
|
15 |
* @author ThemeBoy
|
@@ -32,150 +32,160 @@ class SP_Post_types {
|
|
32 |
public static function register_taxonomies() {
|
33 |
do_action( 'sportspress_register_taxonomy' );
|
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 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
|
|
|
|
92 |
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
|
|
|
|
121 |
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
|
|
|
|
150 |
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
|
|
|
|
179 |
|
180 |
do_action( 'sportspress_after_register_taxonomy' );
|
181 |
}
|
9 |
* Registers post types and taxonomies
|
10 |
*
|
11 |
* @class SP_Post_types
|
12 |
+
* @version 1.9
|
13 |
* @package SportsPress/Classes
|
14 |
* @category Class
|
15 |
* @author ThemeBoy
|
32 |
public static function register_taxonomies() {
|
33 |
do_action( 'sportspress_register_taxonomy' );
|
34 |
|
35 |
+
if ( apply_filters( 'sportspress_has_leagues', true ) ):
|
36 |
+
$labels = array(
|
37 |
+
'name' => __( 'Competitions', 'sportspress' ),
|
38 |
+
'singular_name' => __( 'Competition', 'sportspress' ),
|
39 |
+
'all_items' => __( 'All', 'sportspress' ),
|
40 |
+
'edit_item' => __( 'Edit Competition', 'sportspress' ),
|
41 |
+
'view_item' => __( 'View', 'sportspress' ),
|
42 |
+
'update_item' => __( 'Update', 'sportspress' ),
|
43 |
+
'add_new_item' => __( 'Add New', 'sportspress' ),
|
44 |
+
'new_item_name' => __( 'Name', 'sportspress' ),
|
45 |
+
'parent_item' => __( 'Parent', 'sportspress' ),
|
46 |
+
'parent_item_colon' => __( 'Parent:', 'sportspress' ),
|
47 |
+
'search_items' => __( 'Search', 'sportspress' ),
|
48 |
+
'not_found' => __( 'No results found.', 'sportspress' ),
|
49 |
+
);
|
50 |
+
$args = array(
|
51 |
+
'label' => __( 'Competitions', 'sportspress' ),
|
52 |
+
'labels' => $labels,
|
53 |
+
'public' => true,
|
54 |
+
'show_in_nav_menus' => false,
|
55 |
+
'show_tagcloud' => false,
|
56 |
+
'hierarchical' => true,
|
57 |
+
'rewrite' => array( 'slug' => get_option( 'sportspress_league_slug', 'league' ) ),
|
58 |
+
);
|
59 |
+
$object_types = apply_filters( 'sportspress_league_object_types', array( 'sp_event', 'sp_calendar', 'sp_team', 'sp_table', 'sp_player', 'sp_list', 'sp_staff' ) );
|
60 |
+
register_taxonomy( 'sp_league', $object_types, $args );
|
61 |
+
foreach ( $object_types as $object_type ):
|
62 |
+
register_taxonomy_for_object_type( 'sp_league', $object_type );
|
63 |
+
endforeach;
|
64 |
+
endif;
|
65 |
|
66 |
+
if ( apply_filters( 'sportspress_has_seasons', true ) ):
|
67 |
+
$labels = array(
|
68 |
+
'name' => __( 'Seasons', 'sportspress' ),
|
69 |
+
'singular_name' => __( 'Season', 'sportspress' ),
|
70 |
+
'all_items' => __( 'All', 'sportspress' ),
|
71 |
+
'edit_item' => __( 'Edit Season', 'sportspress' ),
|
72 |
+
'view_item' => __( 'View', 'sportspress' ),
|
73 |
+
'update_item' => __( 'Update', 'sportspress' ),
|
74 |
+
'add_new_item' => __( 'Add New', 'sportspress' ),
|
75 |
+
'new_item_name' => __( 'Name', 'sportspress' ),
|
76 |
+
'parent_item' => __( 'Parent', 'sportspress' ),
|
77 |
+
'parent_item_colon' => __( 'Parent:', 'sportspress' ),
|
78 |
+
'search_items' => __( 'Search', 'sportspress' ),
|
79 |
+
'not_found' => __( 'No results found.', 'sportspress' ),
|
80 |
+
);
|
81 |
+
$args = array(
|
82 |
+
'label' => __( 'Seasons', 'sportspress' ),
|
83 |
+
'labels' => $labels,
|
84 |
+
'public' => true,
|
85 |
+
'show_in_nav_menus' => false,
|
86 |
+
'show_tagcloud' => false,
|
87 |
+
'hierarchical' => true,
|
88 |
+
'rewrite' => array( 'slug' => get_option( 'sportspress_season_slug', 'season' ) ),
|
89 |
+
);
|
90 |
+
$object_types = apply_filters( 'sportspress_season_object_types', array( 'sp_event', 'sp_calendar', 'sp_team', 'sp_table', 'sp_player', 'sp_list', 'sp_staff' ) );
|
91 |
+
register_taxonomy( 'sp_season', $object_types, $args );
|
92 |
+
foreach ( $object_types as $object_type ):
|
93 |
+
register_taxonomy_for_object_type( 'sp_season', $object_type );
|
94 |
+
endforeach;
|
95 |
+
endif;
|
96 |
|
97 |
+
if ( apply_filters( 'sportspress_has_venues', true ) ):
|
98 |
+
$labels = array(
|
99 |
+
'name' => __( 'Venues', 'sportspress' ),
|
100 |
+
'singular_name' => __( 'Venue', 'sportspress' ),
|
101 |
+
'all_items' => __( 'All', 'sportspress' ),
|
102 |
+
'edit_item' => __( 'Edit Venue', 'sportspress' ),
|
103 |
+
'view_item' => __( 'View', 'sportspress' ),
|
104 |
+
'update_item' => __( 'Update', 'sportspress' ),
|
105 |
+
'add_new_item' => __( 'Add New', 'sportspress' ),
|
106 |
+
'new_item_name' => __( 'Name', 'sportspress' ),
|
107 |
+
'parent_item' => __( 'Parent', 'sportspress' ),
|
108 |
+
'parent_item_colon' => __( 'Parent:', 'sportspress' ),
|
109 |
+
'search_items' => __( 'Search', 'sportspress' ),
|
110 |
+
'not_found' => __( 'No results found.', 'sportspress' ),
|
111 |
+
);
|
112 |
+
$args = array(
|
113 |
+
'label' => __( 'Venues', 'sportspress' ),
|
114 |
+
'labels' => $labels,
|
115 |
+
'public' => true,
|
116 |
+
'show_in_nav_menus' => false,
|
117 |
+
'show_tagcloud' => false,
|
118 |
+
'hierarchical' => true,
|
119 |
+
'rewrite' => array( 'slug' => get_option( 'sportspress_venue_slug', 'venue' ) ),
|
120 |
+
);
|
121 |
+
$object_types = apply_filters( 'sportspress_event_object_types', array( 'sp_event', 'sp_calendar', 'sp_team' ) );
|
122 |
+
register_taxonomy( 'sp_venue', $object_types, $args );
|
123 |
+
foreach ( $object_types as $object_type ):
|
124 |
+
register_taxonomy_for_object_type( 'sp_venue', $object_type );
|
125 |
+
endforeach;
|
126 |
+
endif;
|
127 |
|
128 |
+
if ( apply_filters( 'sportspress_has_positions', true ) ):
|
129 |
+
$labels = array(
|
130 |
+
'name' => __( 'Positions', 'sportspress' ),
|
131 |
+
'singular_name' => __( 'Position', 'sportspress' ),
|
132 |
+
'all_items' => __( 'All', 'sportspress' ),
|
133 |
+
'edit_item' => __( 'Edit Position', 'sportspress' ),
|
134 |
+
'view_item' => __( 'View', 'sportspress' ),
|
135 |
+
'update_item' => __( 'Update', 'sportspress' ),
|
136 |
+
'add_new_item' => __( 'Add New', 'sportspress' ),
|
137 |
+
'new_item_name' => __( 'Name', 'sportspress' ),
|
138 |
+
'parent_item' => __( 'Parent', 'sportspress' ),
|
139 |
+
'parent_item_colon' => __( 'Parent:', 'sportspress' ),
|
140 |
+
'search_items' => __( 'Search', 'sportspress' ),
|
141 |
+
'not_found' => __( 'No results found.', 'sportspress' ),
|
142 |
+
);
|
143 |
+
$args = array(
|
144 |
+
'label' => __( 'Positions', 'sportspress' ),
|
145 |
+
'labels' => $labels,
|
146 |
+
'public' => true,
|
147 |
+
'show_in_nav_menus' => false,
|
148 |
+
'show_tagcloud' => false,
|
149 |
+
'hierarchical' => true,
|
150 |
+
'rewrite' => array( 'slug' => get_option( 'sportspress_position_slug', 'position' ) ),
|
151 |
+
);
|
152 |
+
$object_types = apply_filters( 'sportspress_position_object_types', array( 'sp_player', 'sp_list' ) );
|
153 |
+
register_taxonomy( 'sp_position', $object_types, $args );
|
154 |
+
foreach ( $object_types as $object_type ):
|
155 |
+
register_taxonomy_for_object_type( 'sp_position', $object_type );
|
156 |
+
endforeach;
|
157 |
+
endif;
|
158 |
|
159 |
+
if ( apply_filters( 'sportspress_has_roles', true ) ):
|
160 |
+
$labels = array(
|
161 |
+
'name' => __( 'Jobs', 'sportspress' ),
|
162 |
+
'singular_name' => __( 'Job', 'sportspress' ),
|
163 |
+
'all_items' => __( 'All', 'sportspress' ),
|
164 |
+
'edit_item' => __( 'Edit Job', 'sportspress' ),
|
165 |
+
'view_item' => __( 'View', 'sportspress' ),
|
166 |
+
'update_item' => __( 'Update', 'sportspress' ),
|
167 |
+
'add_new_item' => __( 'Add New', 'sportspress' ),
|
168 |
+
'new_item_name' => __( 'Name', 'sportspress' ),
|
169 |
+
'parent_item' => __( 'Parent', 'sportspress' ),
|
170 |
+
'parent_item_colon' => __( 'Parent:', 'sportspress' ),
|
171 |
+
'search_items' => __( 'Search', 'sportspress' ),
|
172 |
+
'not_found' => __( 'No results found.', 'sportspress' ),
|
173 |
+
);
|
174 |
+
$args = array(
|
175 |
+
'label' => __( 'Jobs', 'sportspress' ),
|
176 |
+
'labels' => $labels,
|
177 |
+
'public' => true,
|
178 |
+
'show_in_nav_menus' => false,
|
179 |
+
'show_tagcloud' => false,
|
180 |
+
'hierarchical' => true,
|
181 |
+
'rewrite' => array( 'slug' => get_option( 'sportspress_role_slug', 'role' ) ),
|
182 |
+
);
|
183 |
+
$object_types = apply_filters( 'sportspress_role_object_types', array( 'sp_staff' ) );
|
184 |
+
register_taxonomy( 'sp_role', $object_types, $args );
|
185 |
+
foreach ( $object_types as $object_type ):
|
186 |
+
register_taxonomy_for_object_type( 'sp_role', $object_type );
|
187 |
+
endforeach;
|
188 |
+
endif;
|
189 |
|
190 |
do_action( 'sportspress_after_register_taxonomy' );
|
191 |
}
|
includes/class-sp-rest-api.php
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* REST API Class
|
4 |
+
*
|
5 |
+
* The SportsPress REST API class handles all API-related hooks.
|
6 |
+
*
|
7 |
+
* @class SP_REST_API
|
8 |
+
* @version 1.9.19
|
9 |
+
* @package SportsPress/Classes
|
10 |
+
* @category Class
|
11 |
+
* @package SportsPress/API
|
12 |
+
* @author ThemeBoy
|
13 |
+
*/
|
14 |
+
|
15 |
+
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
16 |
+
|
17 |
+
if ( ! class_exists( 'SP_REST_API' ) ) :
|
18 |
+
|
19 |
+
/**
|
20 |
+
* SP_REST_API Class
|
21 |
+
*/
|
22 |
+
class SP_REST_API {
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Constructor.
|
26 |
+
*/
|
27 |
+
public function __construct() {
|
28 |
+
// Include required files
|
29 |
+
$this->includes();
|
30 |
+
}
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Include required files.
|
34 |
+
*/
|
35 |
+
private function includes() {
|
36 |
+
require_once dirname( __FILE__ ) . '/api/class-sp-rest-teams-controller.php';
|
37 |
+
}
|
38 |
+
}
|
39 |
+
|
40 |
+
endif;
|
41 |
+
|
42 |
+
return new SP_REST_API();
|
includes/class-sp-team.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* The SportsPress team class handles individual team data.
|
6 |
*
|
7 |
* @class SP_Team
|
8 |
-
* @version 1.
|
9 |
* @package SportsPress/Classes
|
10 |
* @category Class
|
11 |
* @author ThemeBoy
|
@@ -17,7 +17,7 @@ class SP_Team extends SP_Custom_Post {
|
|
17 |
'post_type' => 'sp_event',
|
18 |
'numberposts' => 1,
|
19 |
'posts_per_page' => 1,
|
20 |
-
'order' => '
|
21 |
'post_status' => 'future',
|
22 |
'meta_query' => array(
|
23 |
array(
|
@@ -77,15 +77,41 @@ class SP_Team extends SP_Custom_Post {
|
|
77 |
|
78 |
foreach ( $div_ids as $div_id ):
|
79 |
|
80 |
-
$totals = array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
|
82 |
foreach ( $result_labels as $key => $value ):
|
83 |
$totals[ $key . 'for' ] = 0;
|
|
|
|
|
|
|
84 |
$totals[ $key . 'against' ] = 0;
|
|
|
|
|
|
|
85 |
endforeach;
|
86 |
|
87 |
foreach ( $outcome_labels as $key => $value ):
|
88 |
$totals[ $key ] = 0;
|
|
|
|
|
|
|
89 |
endforeach;
|
90 |
|
91 |
// Initialize streaks counter
|
@@ -151,6 +177,8 @@ class SP_Team extends SP_Custom_Post {
|
|
151 |
|
152 |
$events = get_posts( $args );
|
153 |
|
|
|
|
|
154 |
foreach( $events as $event ):
|
155 |
$results = (array)get_post_meta( $event->ID, 'sp_results', true );
|
156 |
$minutes = get_post_meta( $event->ID, 'sp_minutes', true );
|
@@ -175,6 +203,24 @@ class SP_Team extends SP_Custom_Post {
|
|
175 |
$totals['eventsplayed'] ++;
|
176 |
$totals['eventminutes'] += $minutes;
|
177 |
$totals[ $outcome ] ++;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
178 |
endif;
|
179 |
|
180 |
if ( $outcome && $outcome != '-1' ):
|
@@ -215,18 +261,45 @@ class SP_Team extends SP_Custom_Post {
|
|
215 |
else:
|
216 |
if ( array_key_exists( $key . 'for', $totals ) ):
|
217 |
$totals[ $key . 'for' ] += $value;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
218 |
endif;
|
219 |
endif;
|
220 |
else:
|
221 |
if ( $key != 'outcome' ):
|
222 |
if ( array_key_exists( $key . 'against', $totals ) ):
|
223 |
$totals[ $key . 'against' ] += $value;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
224 |
endif;
|
225 |
endif;
|
226 |
endif;
|
227 |
endforeach; endif;
|
228 |
$i++;
|
229 |
endforeach;
|
|
|
230 |
endforeach;
|
231 |
|
232 |
// Compile streaks counter and add to totals
|
@@ -272,6 +345,40 @@ class SP_Team extends SP_Custom_Post {
|
|
272 |
return array( $columns, $data, $placeholders );
|
273 |
}
|
274 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
275 |
/**
|
276 |
* Returns player lists
|
277 |
*
|
@@ -315,16 +422,58 @@ class SP_Team extends SP_Custom_Post {
|
|
315 |
public function tables( $admin = false ) {
|
316 |
if ( ! $this->ID ) return null;
|
317 |
|
|
|
|
|
|
|
318 |
$args = array(
|
319 |
'post_type' => 'sp_table',
|
320 |
'numberposts' => -1,
|
321 |
'posts_per_page' => -1,
|
322 |
'orderby' => 'menu_order',
|
323 |
'order' => 'ASC',
|
324 |
-
'
|
325 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
326 |
);
|
327 |
-
$
|
|
|
|
|
328 |
|
329 |
$checked = (array) get_post_meta( $this->ID, 'sp_table' );
|
330 |
|
5 |
* The SportsPress team class handles individual team data.
|
6 |
*
|
7 |
* @class SP_Team
|
8 |
+
* @version 1.9.14
|
9 |
* @package SportsPress/Classes
|
10 |
* @category Class
|
11 |
* @author ThemeBoy
|
17 |
'post_type' => 'sp_event',
|
18 |
'numberposts' => 1,
|
19 |
'posts_per_page' => 1,
|
20 |
+
'order' => 'DESC',
|
21 |
'post_status' => 'future',
|
22 |
'meta_query' => array(
|
23 |
array(
|
77 |
|
78 |
foreach ( $div_ids as $div_id ):
|
79 |
|
80 |
+
$totals = array(
|
81 |
+
'eventsplayed' => 0,
|
82 |
+
'eventsplayed_home' => 0,
|
83 |
+
'eventsplayed_away' => 0,
|
84 |
+
'eventsplayed_venue' => 0,
|
85 |
+
'eventminutes' => 0,
|
86 |
+
'eventminutes_home' => 0,
|
87 |
+
'eventminutes_away' => 0,
|
88 |
+
'eventminutes_venue' => 0,
|
89 |
+
'streak' => 0,
|
90 |
+
'streak_home' => 0,
|
91 |
+
'streak_away' => 0,
|
92 |
+
'streak_venue' => 0,
|
93 |
+
'last5' => null,
|
94 |
+
'last10' => null,
|
95 |
+
'homerecord' => null,
|
96 |
+
'awayrecord' => null
|
97 |
+
);
|
98 |
|
99 |
foreach ( $result_labels as $key => $value ):
|
100 |
$totals[ $key . 'for' ] = 0;
|
101 |
+
$totals[ $key . 'for_home' ] = 0;
|
102 |
+
$totals[ $key . 'for_away' ] = 0;
|
103 |
+
$totals[ $key . 'for_venue' ] = 0;
|
104 |
$totals[ $key . 'against' ] = 0;
|
105 |
+
$totals[ $key . 'against_home' ] = 0;
|
106 |
+
$totals[ $key . 'against_away' ] = 0;
|
107 |
+
$totals[ $key . 'against_venue' ] = 0;
|
108 |
endforeach;
|
109 |
|
110 |
foreach ( $outcome_labels as $key => $value ):
|
111 |
$totals[ $key ] = 0;
|
112 |
+
$totals[ $key . '_home' ] = 0;
|
113 |
+
$totals[ $key . '_away' ] = 0;
|
114 |
+
$totals[ $key . '_venue' ] = 0;
|
115 |
endforeach;
|
116 |
|
117 |
// Initialize streaks counter
|
177 |
|
178 |
$events = get_posts( $args );
|
179 |
|
180 |
+
$e = 0;
|
181 |
+
|
182 |
foreach( $events as $event ):
|
183 |
$results = (array)get_post_meta( $event->ID, 'sp_results', true );
|
184 |
$minutes = get_post_meta( $event->ID, 'sp_minutes', true );
|
203 |
$totals['eventsplayed'] ++;
|
204 |
$totals['eventminutes'] += $minutes;
|
205 |
$totals[ $outcome ] ++;
|
206 |
+
|
207 |
+
// Add to home or away stats
|
208 |
+
if ( 0 === $i ):
|
209 |
+
$totals['eventsplayed_home'] ++;
|
210 |
+
$totals['eventminutes_home'] += $minutes;
|
211 |
+
$totals[ $outcome . '_home' ] ++;
|
212 |
+
else:
|
213 |
+
$totals['eventsplayed_away'] ++;
|
214 |
+
$totals['eventminutes_away'] += $minutes;
|
215 |
+
$totals[ $outcome . '_away' ] ++;
|
216 |
+
endif;
|
217 |
+
|
218 |
+
// Add to venue stats
|
219 |
+
if ( sp_is_home_venue( $team_id, $event->ID ) ):
|
220 |
+
$totals['eventsplayed_venue'] ++;
|
221 |
+
$totals['eventminutes_venue'] += $minutes;
|
222 |
+
$totals[ $outcome . '_venue' ] ++;
|
223 |
+
endif;
|
224 |
endif;
|
225 |
|
226 |
if ( $outcome && $outcome != '-1' ):
|
261 |
else:
|
262 |
if ( array_key_exists( $key . 'for', $totals ) ):
|
263 |
$totals[ $key . 'for' ] += $value;
|
264 |
+
$totals[ $key . 'for' . ( $e + 1 ) ] = $value;
|
265 |
+
|
266 |
+
// Add to home or away stats
|
267 |
+
if ( 0 === $i ):
|
268 |
+
$totals[ $key . 'for_home' ] += $value;
|
269 |
+
else:
|
270 |
+
$totals[ $key . 'for_away' ] += $value;
|
271 |
+
endif;
|
272 |
+
|
273 |
+
// Add to venue stats
|
274 |
+
if ( sp_is_home_venue( $team_id, $event->ID ) ):
|
275 |
+
$totals[ $key . 'for_venue' ] += $value;
|
276 |
+
endif;
|
277 |
endif;
|
278 |
endif;
|
279 |
else:
|
280 |
if ( $key != 'outcome' ):
|
281 |
if ( array_key_exists( $key . 'against', $totals ) ):
|
282 |
$totals[ $key . 'against' ] += $value;
|
283 |
+
$totals[ $key . 'against' . ( $e + 1 ) ] = $value;
|
284 |
+
|
285 |
+
// Add to home or away stats
|
286 |
+
if ( 0 === $i ):
|
287 |
+
$totals[ $key . 'against_home' ] += $value;
|
288 |
+
else:
|
289 |
+
$totals[ $key . 'against_away' ] += $value;
|
290 |
+
endif;
|
291 |
+
|
292 |
+
// Add to venue stats
|
293 |
+
if ( sp_is_home_venue( $team_id, $event->ID ) ):
|
294 |
+
$totals[ $key . 'against_venue' ] += $value;
|
295 |
+
endif;
|
296 |
endif;
|
297 |
endif;
|
298 |
endif;
|
299 |
endforeach; endif;
|
300 |
$i++;
|
301 |
endforeach;
|
302 |
+
$e++;
|
303 |
endforeach;
|
304 |
|
305 |
// Compile streaks counter and add to totals
|
345 |
return array( $columns, $data, $placeholders );
|
346 |
}
|
347 |
|
348 |
+
/**
|
349 |
+
* Returns staff members
|
350 |
+
*
|
351 |
+
* @access public
|
352 |
+
* @return array
|
353 |
+
*/
|
354 |
+
public function staff( $admin = false ) {
|
355 |
+
if ( ! $this->ID ) return null;
|
356 |
+
|
357 |
+
$args = array(
|
358 |
+
'post_type' => 'sp_staff',
|
359 |
+
'numberposts' => -1,
|
360 |
+
'posts_per_page' => -1,
|
361 |
+
'orderby' => 'menu_order',
|
362 |
+
'order' => 'ASC',
|
363 |
+
'meta_key' => 'sp_team',
|
364 |
+
'meta_value' => $this->ID,
|
365 |
+
);
|
366 |
+
$members = get_posts( $args );
|
367 |
+
|
368 |
+
$checked = (array) get_post_meta( $this->ID, 'sp_staff' );
|
369 |
+
|
370 |
+
if ( $admin ):
|
371 |
+
return array( $members, $checked );
|
372 |
+
else:
|
373 |
+
foreach ( $members as $key => $member ):
|
374 |
+
if ( ! in_array( $member->ID, $checked ) ):
|
375 |
+
unset( $members[ $key ] );
|
376 |
+
endif;
|
377 |
+
endforeach;
|
378 |
+
return $members;
|
379 |
+
endif;
|
380 |
+
}
|
381 |
+
|
382 |
/**
|
383 |
* Returns player lists
|
384 |
*
|
422 |
public function tables( $admin = false ) {
|
423 |
if ( ! $this->ID ) return null;
|
424 |
|
425 |
+
$league_ids = sp_get_the_term_ids( $this->ID, 'sp_league' );
|
426 |
+
$season_ids = sp_get_the_term_ids( $this->ID, 'sp_season' );
|
427 |
+
|
428 |
$args = array(
|
429 |
'post_type' => 'sp_table',
|
430 |
'numberposts' => -1,
|
431 |
'posts_per_page' => -1,
|
432 |
'orderby' => 'menu_order',
|
433 |
'order' => 'ASC',
|
434 |
+
'meta_query' => array(
|
435 |
+
'relation' => 'AND',
|
436 |
+
array(
|
437 |
+
'key' => 'sp_select',
|
438 |
+
'value' => 'manual',
|
439 |
+
),
|
440 |
+
array(
|
441 |
+
'key' => 'sp_team',
|
442 |
+
'value' => $this->ID,
|
443 |
+
),
|
444 |
+
),
|
445 |
+
);
|
446 |
+
$tables_by_id = get_posts( $args );
|
447 |
+
|
448 |
+
$args = array(
|
449 |
+
'post_type' => 'sp_table',
|
450 |
+
'numberposts' => -1,
|
451 |
+
'posts_per_page' => -1,
|
452 |
+
'orderby' => 'menu_order',
|
453 |
+
'order' => 'ASC',
|
454 |
+
'meta_query' => array(
|
455 |
+
array(
|
456 |
+
'key' => 'sp_select',
|
457 |
+
'value' => 'auto',
|
458 |
+
),
|
459 |
+
),
|
460 |
+
'tax_query' => array(
|
461 |
+
'relation' => 'AND',
|
462 |
+
array(
|
463 |
+
'taxonomy' => 'sp_league',
|
464 |
+
'field' => 'term_id',
|
465 |
+
'terms' => $league_ids,
|
466 |
+
),
|
467 |
+
array(
|
468 |
+
'taxonomy' => 'sp_season',
|
469 |
+
'field' => 'term_id',
|
470 |
+
'terms' => $season_ids,
|
471 |
+
),
|
472 |
+
),
|
473 |
);
|
474 |
+
$tables_by_terms = get_posts( $args );
|
475 |
+
|
476 |
+
$tables = array_merge( $tables_by_id, $tables_by_terms );
|
477 |
|
478 |
$checked = (array) get_post_meta( $this->ID, 'sp_table' );
|
479 |
|
includes/class-sp-template-loader.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Template Loader
|
4 |
*
|
5 |
* @class SP_Template_Loader
|
6 |
-
* @version 1.
|
7 |
* @package SportsPress/Classes
|
8 |
* @category Class
|
9 |
* @author ThemeBoy
|
@@ -24,11 +24,17 @@ class SP_Template_Loader {
|
|
24 |
add_filter( 'the_content', array( $this, 'staff_content' ) );
|
25 |
}
|
26 |
|
27 |
-
public function add_content( $content, $template, $position = 10 ) {
|
28 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
29 |
if ( ! in_the_loop() ) return; // Return if not in main loop
|
30 |
|
31 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
|
33 |
ob_start();
|
34 |
|
@@ -42,25 +48,32 @@ class SP_Template_Loader {
|
|
42 |
|
43 |
do_action( 'sportspress_before_single_' . $template );
|
44 |
|
45 |
-
if ( $position > 0 && $position <=
|
46 |
echo $content;
|
47 |
|
48 |
do_action( 'sportspress_single_' . $template . '_content' );
|
49 |
|
50 |
-
if ( $position >
|
51 |
echo $content;
|
52 |
|
53 |
do_action( 'sportspress_after_single_' . $template );
|
54 |
|
55 |
-
if ( $position >
|
56 |
echo $content;
|
57 |
|
58 |
return ob_get_clean();
|
59 |
}
|
60 |
|
61 |
public function event_content( $content ) {
|
62 |
-
if ( is_singular( 'sp_event' ) )
|
63 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
return $content;
|
65 |
}
|
66 |
|
3 |
* Template Loader
|
4 |
*
|
5 |
* @class SP_Template_Loader
|
6 |
+
* @version 1.9.13
|
7 |
* @package SportsPress/Classes
|
8 |
* @category Class
|
9 |
* @author ThemeBoy
|
24 |
add_filter( 'the_content', array( $this, 'staff_content' ) );
|
25 |
}
|
26 |
|
27 |
+
public function add_content( $content, $template, $position = 10, $caption = null ) {
|
28 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
29 |
if ( ! in_the_loop() ) return; // Return if not in main loop
|
30 |
|
31 |
+
if ( $content ) {
|
32 |
+
if ( $caption ) {
|
33 |
+
$content = '<h3 class="sp-post-caption">' . $caption . '</h3>' . $content;
|
34 |
+
}
|
35 |
+
|
36 |
+
$content = '<div class="sp-post-content">' . $content . '</div>';
|
37 |
+
}
|
38 |
|
39 |
ob_start();
|
40 |
|
48 |
|
49 |
do_action( 'sportspress_before_single_' . $template );
|
50 |
|
51 |
+
if ( $position > 0 && $position <= 10 )
|
52 |
echo $content;
|
53 |
|
54 |
do_action( 'sportspress_single_' . $template . '_content' );
|
55 |
|
56 |
+
if ( $position > 10 && $position <= 20 )
|
57 |
echo $content;
|
58 |
|
59 |
do_action( 'sportspress_after_single_' . $template );
|
60 |
|
61 |
+
if ( $position > 20 )
|
62 |
echo $content;
|
63 |
|
64 |
return ob_get_clean();
|
65 |
}
|
66 |
|
67 |
public function event_content( $content ) {
|
68 |
+
if ( is_singular( 'sp_event' ) ) {
|
69 |
+
$status = sp_get_status( get_the_ID() );
|
70 |
+
if ( 'results' == $status ) {
|
71 |
+
$caption = __( 'Recap', 'sportspress' );
|
72 |
+
} else {
|
73 |
+
$caption = __( 'Preview', 'sportspress' );
|
74 |
+
}
|
75 |
+
$content = self::add_content( $content, 'event', apply_filters( 'sportspress_event_content_priority', 10 ), $caption );
|
76 |
+
}
|
77 |
return $content;
|
78 |
}
|
79 |
|
includes/libraries/class-eqeos.php
CHANGED
@@ -21,6 +21,8 @@
|
|
21 |
* developer. It is a safe way to evaluate expressions without putting
|
22 |
* the system at risk.
|
23 |
*
|
|
|
|
|
24 |
* 2013/04 UPDATE:
|
25 |
* - Moved to native class functions for PHP5
|
26 |
* - Removed deprecated `eregi` calls to `preg_match`
|
@@ -350,7 +352,7 @@ class eqEOS {
|
|
350 |
preg_replace("/\s/", "", $infix);
|
351 |
|
352 |
//Find all the variables that were passed and replaces them
|
353 |
-
while((preg_match('/(.){0,1}[&$]([a-zA-
|
354 |
|
355 |
//remove notices by defining if undefined.
|
356 |
if(!isset($match[3])) {
|
21 |
* developer. It is a safe way to evaluate expressions without putting
|
22 |
* the system at risk.
|
23 |
*
|
24 |
+
* Modified as per https://github.com/jlawrence11/eos/issues/2
|
25 |
+
*
|
26 |
* 2013/04 UPDATE:
|
27 |
* - Moved to native class functions for PHP5
|
28 |
* - Removed deprecated `eregi` calls to `preg_match`
|
352 |
preg_replace("/\s/", "", $infix);
|
353 |
|
354 |
//Find all the variables that were passed and replaces them
|
355 |
+
while((preg_match('/(.){0,1}[&$]([a-zA-Z0-9_]+)(.){0,1}/', $infix, $match)) != 0) {
|
356 |
|
357 |
//remove notices by defining if undefined.
|
358 |
if(!isset($match[3])) {
|
includes/libraries/class-tgm-plugin-activation.php
ADDED
@@ -0,0 +1,3618 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Plugin installation and activation for WordPress themes.
|
4 |
+
*
|
5 |
+
* Please note that this is a drop-in library for a theme or plugin.
|
6 |
+
* The authors of this library (Thomas, Gary and Juliette) are NOT responsible
|
7 |
+
* for the support of your plugin or theme. Please contact the plugin
|
8 |
+
* or theme author for support.
|
9 |
+
*
|
10 |
+
* @package TGM-Plugin-Activation
|
11 |
+
* @version 2.5.2
|
12 |
+
* @link http://tgmpluginactivation.com/
|
13 |
+
* @author Thomas Griffin, Gary Jones, Juliette Reinders Folmer
|
14 |
+
* @copyright Copyright (c) 2011, Thomas Griffin
|
15 |
+
* @license GPL-2.0+
|
16 |
+
*
|
17 |
+
* @wordpress-plugin
|
18 |
+
* Plugin Name: TGM Plugin Activation
|
19 |
+
* Plugin URI:
|
20 |
+
* Description: Plugin installation and activation for WordPress themes.
|
21 |
+
* Version: 2.5.2
|
22 |
+
* Author: Thomas Griffin, Gary Jones, Juliette Reinders Folmer
|
23 |
+
* Author URI: http://tgmpluginactivation.com/
|
24 |
+
* Text Domain: tgmpa
|
25 |
+
* Domain Path: /languages/
|
26 |
+
* Copyright: 2011, Thomas Griffin
|
27 |
+
*/
|
28 |
+
|
29 |
+
/*
|
30 |
+
Copyright 2011 Thomas Griffin (thomasgriffinmedia.com)
|
31 |
+
|
32 |
+
This program is free software; you can redistribute it and/or modify
|
33 |
+
it under the terms of the GNU General Public License, version 2, as
|
34 |
+
published by the Free Software Foundation.
|
35 |
+
|
36 |
+
This program is distributed in the hope that it will be useful,
|
37 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
38 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
39 |
+
GNU General Public License for more details.
|
40 |
+
|
41 |
+
You should have received a copy of the GNU General Public License
|
42 |
+
along with this program; if not, write to the Free Software
|
43 |
+
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
44 |
+
*/
|
45 |
+
|
46 |
+
if ( ! class_exists( 'TGM_Plugin_Activation' ) ) {
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Automatic plugin installation and activation library.
|
50 |
+
*
|
51 |
+
* Creates a way to automatically install and activate plugins from within themes.
|
52 |
+
* The plugins can be either bundled, downloaded from the WordPress
|
53 |
+
* Plugin Repository or downloaded from another external source.
|
54 |
+
*
|
55 |
+
* @since 1.0.0
|
56 |
+
*
|
57 |
+
* @package TGM-Plugin-Activation
|
58 |
+
* @author Thomas Griffin
|
59 |
+
* @author Gary Jones
|
60 |
+
*/
|
61 |
+
class TGM_Plugin_Activation {
|
62 |
+
/**
|
63 |
+
* TGMPA version number.
|
64 |
+
*
|
65 |
+
* @since 2.5.0
|
66 |
+
*
|
67 |
+
* @const string Version number.
|
68 |
+
*/
|
69 |
+
const TGMPA_VERSION = '2.5.2';
|
70 |
+
|
71 |
+
/**
|
72 |
+
* Regular expression to test if a URL is a WP plugin repo URL.
|
73 |
+
*
|
74 |
+
* @const string Regex.
|
75 |
+
*
|
76 |
+
* @since 2.5.0
|
77 |
+
*/
|
78 |
+
const WP_REPO_REGEX = '|^http[s]?://wordpress\.org/(?:extend/)?plugins/|';
|
79 |
+
|
80 |
+
/**
|
81 |
+
* Arbitrary regular expression to test if a string starts with a URL.
|
82 |
+
*
|
83 |
+
* @const string Regex.
|
84 |
+
*
|
85 |
+
* @since 2.5.0
|
86 |
+
*/
|
87 |
+
const IS_URL_REGEX = '|^http[s]?://|';
|
88 |
+
|
89 |
+
/**
|
90 |
+
* Holds a copy of itself, so it can be referenced by the class name.
|
91 |
+
*
|
92 |
+
* @since 1.0.0
|
93 |
+
*
|
94 |
+
* @var TGM_Plugin_Activation
|
95 |
+
*/
|
96 |
+
public static $instance;
|
97 |
+
|
98 |
+
/**
|
99 |
+
* Holds arrays of plugin details.
|
100 |
+
*
|
101 |
+
* @since 1.0.0
|
102 |
+
*
|
103 |
+
* @since 2.5.0 the array has the plugin slug as an associative key.
|
104 |
+
*
|
105 |
+
* @var array
|
106 |
+
*/
|
107 |
+
public $plugins = array();
|
108 |
+
|
109 |
+
/**
|
110 |
+
* Holds arrays of plugin names to use to sort the plugins array.
|
111 |
+
*
|
112 |
+
* @since 2.5.0
|
113 |
+
*
|
114 |
+
* @var array
|
115 |
+
*/
|
116 |
+
protected $sort_order = array();
|
117 |
+
|
118 |
+
/**
|
119 |
+
* Whether any plugins have the 'force_activation' setting set to true.
|
120 |
+
*
|
121 |
+
* @since 2.5.0
|
122 |
+
*
|
123 |
+
* @var bool
|
124 |
+
*/
|
125 |
+
protected $has_forced_activation = false;
|
126 |
+
|
127 |
+
/**
|
128 |
+
* Whether any plugins have the 'force_deactivation' setting set to true.
|
129 |
+
*
|
130 |
+
* @since 2.5.0
|
131 |
+
*
|
132 |
+
* @var bool
|
133 |
+
*/
|
134 |
+
protected $has_forced_deactivation = false;
|
135 |
+
|
136 |
+
/**
|
137 |
+
* Name of the unique ID to hash notices.
|
138 |
+
*
|
139 |
+
* @since 2.4.0
|
140 |
+
*
|
141 |
+
* @var string
|
142 |
+
*/
|
143 |
+
public $id = 'tgmpa';
|
144 |
+
|
145 |
+
/**
|
146 |
+
* Name of the query-string argument for the admin page.
|
147 |
+
*
|
148 |
+
* @since 1.0.0
|
149 |
+
*
|
150 |
+
* @var string
|
151 |
+
*/
|
152 |
+
protected $menu = 'tgmpa-install-plugins';
|
153 |
+
|
154 |
+
/**
|
155 |
+
* Parent menu file slug.
|
156 |
+
*
|
157 |
+
* @since 2.5.0
|
158 |
+
*
|
159 |
+
* @var string
|
160 |
+
*/
|
161 |
+
public $parent_slug = 'themes.php';
|
162 |
+
|
163 |
+
/**
|
164 |
+
* Capability needed to view the plugin installation menu item.
|
165 |
+
*
|
166 |
+
* @since 2.5.0
|
167 |
+
*
|
168 |
+
* @var string
|
169 |
+
*/
|
170 |
+
public $capability = 'edit_theme_options';
|
171 |
+
|
172 |
+
/**
|
173 |
+
* Default absolute path to folder containing bundled plugin zip files.
|
174 |
+
*
|
175 |
+
* @since 2.0.0
|
176 |
+
*
|
177 |
+
* @var string Absolute path prefix to zip file location for bundled plugins. Default is empty string.
|
178 |
+
*/
|
179 |
+
public $default_path = '';
|
180 |
+
|
181 |
+
/**
|
182 |
+
* Flag to show admin notices or not.
|
183 |
+
*
|
184 |
+
* @since 2.1.0
|
185 |
+
*
|
186 |
+
* @var boolean
|
187 |
+
*/
|
188 |
+
public $has_notices = true;
|
189 |
+
|
190 |
+
/**
|
191 |
+
* Flag to determine if the user can dismiss the notice nag.
|
192 |
+
*
|
193 |
+
* @since 2.4.0
|
194 |
+
*
|
195 |
+
* @var boolean
|
196 |
+
*/
|
197 |
+
public $dismissable = true;
|
198 |
+
|
199 |
+
/**
|
200 |
+
* Message to be output above nag notice if dismissable is false.
|
201 |
+
*
|
202 |
+
* @since 2.4.0
|
203 |
+
*
|
204 |
+
* @var string
|
205 |
+
*/
|
206 |
+
public $dismiss_msg = '';
|
207 |
+
|
208 |
+
/**
|
209 |
+
* Flag to set automatic activation of plugins. Off by default.
|
210 |
+
*
|
211 |
+
* @since 2.2.0
|
212 |
+
*
|
213 |
+
* @var boolean
|
214 |
+
*/
|
215 |
+
public $is_automatic = false;
|
216 |
+
|
217 |
+
/**
|
218 |
+
* Optional message to display before the plugins table.
|
219 |
+
*
|
220 |
+
* @since 2.2.0
|
221 |
+
*
|
222 |
+
* @var string Message filtered by wp_kses_post(). Default is empty string.
|
223 |
+
*/
|
224 |
+
public $message = '';
|
225 |
+
|
226 |
+
/**
|
227 |
+
* Holds configurable array of strings.
|
228 |
+
*
|
229 |
+
* Default values are added in the constructor.
|
230 |
+
*
|
231 |
+
* @since 2.0.0
|
232 |
+
*
|
233 |
+
* @var array
|
234 |
+
*/
|
235 |
+
public $strings = array();
|
236 |
+
|
237 |
+
/**
|
238 |
+
* Holds the version of WordPress.
|
239 |
+
*
|
240 |
+
* @since 2.4.0
|
241 |
+
*
|
242 |
+
* @var int
|
243 |
+
*/
|
244 |
+
public $wp_version;
|
245 |
+
|
246 |
+
/**
|
247 |
+
* Holds the hook name for the admin page.
|
248 |
+
*
|
249 |
+
* @since 2.5.0
|
250 |
+
*
|
251 |
+
* @var string
|
252 |
+
*/
|
253 |
+
public $page_hook;
|
254 |
+
|
255 |
+
/**
|
256 |
+
* Adds a reference of this object to $instance, populates default strings,
|
257 |
+
* does the tgmpa_init action hook, and hooks in the interactions to init.
|
258 |
+
*
|
259 |
+
* @internal This method should be `protected`, but as too many TGMPA implementations
|
260 |
+
* haven't upgraded beyond v2.3.6 yet, this gives backward compatibility issues.
|
261 |
+
* Reverted back to public for the time being.
|
262 |
+
*
|
263 |
+
* @since 1.0.0
|
264 |
+
*
|
265 |
+
* @see TGM_Plugin_Activation::init()
|
266 |
+
*/
|
267 |
+
public function __construct() {
|
268 |
+
// Set the current WordPress version.
|
269 |
+
$this->wp_version = $GLOBALS['wp_version'];
|
270 |
+
|
271 |
+
// Announce that the class is ready, and pass the object (for advanced use).
|
272 |
+
do_action_ref_array( 'tgmpa_init', array( $this ) );
|
273 |
+
|
274 |
+
// When the rest of WP has loaded, kick-start the rest of the class.
|
275 |
+
add_action( 'init', array( $this, 'init' ) );
|
276 |
+
}
|
277 |
+
|
278 |
+
/**
|
279 |
+
* Magic method to (not) set protected properties from outside of this class.
|
280 |
+
*
|
281 |
+
* @internal hackedihack... There is a serious bug in v2.3.2 - 2.3.6 where the `menu` property
|
282 |
+
* is being assigned rather than tested in a conditional, effectively rendering it useless.
|
283 |
+
* This 'hack' prevents this from happening.
|
284 |
+
*
|
285 |
+
* @see https://github.com/TGMPA/TGM-Plugin-Activation/blob/2.3.6/tgm-plugin-activation/class-tgm-plugin-activation.php#L1593
|
286 |
+
*
|
287 |
+
* @param string $name Name of an inaccessible property.
|
288 |
+
* @param mixed $value Value to assign to the property.
|
289 |
+
* @return void Silently fail to set the property when this is tried from outside of this class context.
|
290 |
+
* (Inside this class context, the __set() method if not used as there is direct access.)
|
291 |
+
*/
|
292 |
+
public function __set( $name, $value ) {
|
293 |
+
return;
|
294 |
+
}
|
295 |
+
|
296 |
+
/**
|
297 |
+
* Magic method to get the value of a protected property outside of this class context.
|
298 |
+
*
|
299 |
+
* @param string $name Name of an inaccessible property.
|
300 |
+
* @return mixed The property value.
|
301 |
+
*/
|
302 |
+
public function __get( $name ) {
|
303 |
+
return $this->{$name};
|
304 |
+
}
|
305 |
+
|
306 |
+
/**
|
307 |
+
* Initialise the interactions between this class and WordPress.
|
308 |
+
*
|
309 |
+
* Hooks in three new methods for the class: admin_menu, notices and styles.
|
310 |
+
*
|
311 |
+
* @since 2.0.0
|
312 |
+
*
|
313 |
+
* @see TGM_Plugin_Activation::admin_menu()
|
314 |
+
* @see TGM_Plugin_Activation::notices()
|
315 |
+
* @see TGM_Plugin_Activation::styles()
|
316 |
+
*/
|
317 |
+
public function init() {
|
318 |
+
/**
|
319 |
+
* By default TGMPA only loads on the WP back-end and not in an Ajax call. Using this filter
|
320 |
+
* you can overrule that behaviour.
|
321 |
+
*
|
322 |
+
* @since 2.5.0
|
323 |
+
*
|
324 |
+
* @param bool $load Whether or not TGMPA should load.
|
325 |
+
* Defaults to the return of `is_admin() && ! defined( 'DOING_AJAX' )`.
|
326 |
+
*/
|
327 |
+
if ( true !== apply_filters( 'tgmpa_load', ( is_admin() && ! defined( 'DOING_AJAX' ) ) ) ) {
|
328 |
+
return;
|
329 |
+
}
|
330 |
+
|
331 |
+
// Load class strings.
|
332 |
+
$this->strings = array(
|
333 |
+
'page_title' => __( 'Install Required Plugins', 'tgmpa' ),
|
334 |
+
'menu_title' => __( 'Install Plugins', 'tgmpa' ),
|
335 |
+
'installing' => __( 'Installing Plugin: %s', 'tgmpa' ),
|
336 |
+
'oops' => __( 'Something went wrong with the plugin API.', 'tgmpa' ),
|
337 |
+
'notice_can_install_required' => _n_noop(
|
338 |
+
'This theme requires the following plugin: %1$s.',
|
339 |
+
'This theme requires the following plugins: %1$s.',
|
340 |
+
'tgmpa'
|
341 |
+
),
|
342 |
+
'notice_can_install_recommended' => _n_noop(
|
343 |
+
'This theme recommends the following plugin: %1$s.',
|
344 |
+
'This theme recommends the following plugins: %1$s.',
|
345 |
+
'tgmpa'
|
346 |
+
),
|
347 |
+
'notice_cannot_install' => _n_noop(
|
348 |
+
'Sorry, but you do not have the correct permissions to install the %1$s plugin.',
|
349 |
+
'Sorry, but you do not have the correct permissions to install the %1$s plugins.',
|
350 |
+
'tgmpa'
|
351 |
+
),
|
352 |
+
'notice_ask_to_update' => _n_noop(
|
353 |
+
'The following plugin needs to be updated to its latest version to ensure maximum compatibility with this theme: %1$s.',
|
354 |
+
'The following plugins need to be updated to their latest version to ensure maximum compatibility with this theme: %1$s.',
|
355 |
+
'tgmpa'
|
356 |
+
),
|
357 |
+
'notice_ask_to_update_maybe' => _n_noop(
|
358 |
+
'There is an update available for: %1$s.',
|
359 |
+
'There are updates available for the following plugins: %1$s.',
|
360 |
+
'tgmpa'
|
361 |
+
),
|
362 |
+
'notice_cannot_update' => _n_noop(
|
363 |
+
'Sorry, but you do not have the correct permissions to update the %1$s plugin.',
|
364 |
+
'Sorry, but you do not have the correct permissions to update the %1$s plugins.',
|
365 |
+
'tgmpa'
|
366 |
+
),
|
367 |
+
'notice_can_activate_required' => _n_noop(
|
368 |
+
'The following required plugin is currently inactive: %1$s.',
|
369 |
+
'The following required plugins are currently inactive: %1$s.',
|
370 |
+
'tgmpa'
|
371 |
+
),
|
372 |
+
'notice_can_activate_recommended' => _n_noop(
|
373 |
+
'The following recommended plugin is currently inactive: %1$s.',
|
374 |
+
'The following recommended plugins are currently inactive: %1$s.',
|
375 |
+
'tgmpa'
|
376 |
+
),
|
377 |
+
'notice_cannot_activate' => _n_noop(
|
378 |
+
'Sorry, but you do not have the correct permissions to activate the %1$s plugin.',
|
379 |
+
'Sorry, but you do not have the correct permissions to activate the %1$s plugins.',
|
380 |
+
'tgmpa'
|
381 |
+
),
|
382 |
+
'install_link' => _n_noop(
|
383 |
+
'Begin installing plugin',
|
384 |
+
'Begin installing plugins',
|
385 |
+
'tgmpa'
|
386 |
+
),
|
387 |
+
'update_link' => _n_noop(
|
388 |
+
'Begin updating plugin',
|
389 |
+
'Begin updating plugins',
|
390 |
+
'tgmpa'
|
391 |
+
),
|
392 |
+
'activate_link' => _n_noop(
|
393 |
+
'Begin activating plugin',
|
394 |
+
'Begin activating plugins',
|
395 |
+
'tgmpa'
|
396 |
+
),
|
397 |
+
'return' => __( 'Return to Required Plugins Installer', 'tgmpa' ),
|
398 |
+
'dashboard' => __( 'Return to the dashboard', 'tgmpa' ),
|
399 |
+
'plugin_activated' => __( 'Plugin activated successfully.', 'tgmpa' ),
|
400 |
+
'activated_successfully' => __( 'The following plugin was activated successfully:', 'tgmpa' ),
|
401 |
+
'plugin_already_active' => __( 'No action taken. Plugin %1$s was already active.', 'tgmpa' ),
|
402 |
+
'plugin_needs_higher_version' => __( 'Plugin not activated. A higher version of %s is needed for this theme. Please update the plugin.', 'tgmpa' ),
|
403 |
+
'complete' => __( 'All plugins installed and activated successfully. %1$s', 'tgmpa' ),
|
404 |
+
'dismiss' => __( 'Dismiss this notice', 'tgmpa' ),
|
405 |
+
'contact_admin' => __( 'Please contact the administrator of this site for help.', 'tgmpa' ),
|
406 |
+
);
|
407 |
+
|
408 |
+
do_action( 'tgmpa_register' );
|
409 |
+
|
410 |
+
/* After this point, the plugins should be registered and the configuration set. */
|
411 |
+
|
412 |
+
// Proceed only if we have plugins to handle.
|
413 |
+
if ( empty( $this->plugins ) || ! is_array( $this->plugins ) ) {
|
414 |
+
return;
|
415 |
+
}
|
416 |
+
|
417 |
+
// Set up the menu and notices if we still have outstanding actions.
|
418 |
+
if ( true !== $this->is_tgmpa_complete() ) {
|
419 |
+
// Sort the plugins.
|
420 |
+
array_multisort( $this->sort_order, SORT_ASC, $this->plugins );
|
421 |
+
|
422 |
+
add_action( 'admin_menu', array( $this, 'admin_menu' ) );
|
423 |
+
add_action( 'admin_head', array( $this, 'dismiss' ) );
|
424 |
+
|
425 |
+
// Prevent the normal links from showing underneath a single install/update page.
|
426 |
+
add_filter( 'install_plugin_complete_actions', array( $this, 'actions' ) );
|
427 |
+
add_filter( 'update_plugin_complete_actions', array( $this, 'actions' ) );
|
428 |
+
|
429 |
+
if ( $this->has_notices ) {
|
430 |
+
add_action( 'admin_notices', array( $this, 'notices' ) );
|
431 |
+
add_action( 'admin_init', array( $this, 'admin_init' ), 1 );
|
432 |
+
add_action( 'admin_enqueue_scripts', array( $this, 'thickbox' ) );
|
433 |
+
}
|
434 |
+
|
435 |
+
add_action( 'load-plugins.php', array( $this, 'add_plugin_action_link_filters' ), 1 );
|
436 |
+
}
|
437 |
+
|
438 |
+
// Make sure things get reset on switch theme.
|
439 |
+
add_action( 'switch_theme', array( $this, 'flush_plugins_cache' ) );
|
440 |
+
|
441 |
+
if ( $this->has_notices ) {
|
442 |
+
add_action( 'switch_theme', array( $this, 'update_dismiss' ) );
|
443 |
+
}
|
444 |
+
|
445 |
+
// Setup the force activation hook.
|
446 |
+
if ( true === $this->has_forced_activation ) {
|
447 |
+
add_action( 'admin_init', array( $this, 'force_activation' ) );
|
448 |
+
}
|
449 |
+
|
450 |
+
// Setup the force deactivation hook.
|
451 |
+
if ( true === $this->has_forced_deactivation ) {
|
452 |
+
add_action( 'switch_theme', array( $this, 'force_deactivation' ) );
|
453 |
+
}
|
454 |
+
}
|
455 |
+
|
456 |
+
/**
|
457 |
+
* Prevent activation of plugins which don't meet the minimum version requirement from the
|
458 |
+
* WP native plugins page.
|
459 |
+
*
|
460 |
+
* @since 2.5.0
|
461 |
+
*/
|
462 |
+
public function add_plugin_action_link_filters() {
|
463 |
+
foreach ( $this->plugins as $slug => $plugin ) {
|
464 |
+
if ( false === $this->can_plugin_activate( $slug ) ) {
|
465 |
+
add_filter( 'plugin_action_links_' . $plugin['file_path'], array( $this, 'filter_plugin_action_links_activate' ), 20 );
|
466 |
+
}
|
467 |
+
|
468 |
+
if ( true === $plugin['force_activation'] ) {
|
469 |
+
add_filter( 'plugin_action_links_' . $plugin['file_path'], array( $this, 'filter_plugin_action_links_deactivate' ), 20 );
|
470 |
+
}
|
471 |
+
|
472 |
+
if ( false !== $this->does_plugin_require_update( $slug ) ) {
|
473 |
+
add_filter( 'plugin_action_links_' . $plugin['file_path'], array( $this, 'filter_plugin_action_links_update' ), 20 );
|
474 |
+
}
|
475 |
+
}
|
476 |
+
}
|
477 |
+
|
478 |
+
/**
|
479 |
+
* Remove the 'Activate' link on the WP native plugins page if the plugin does not meet the
|
480 |
+
* minimum version requirements.
|
481 |
+
*
|
482 |
+
* @since 2.5.0
|
483 |
+
*
|
484 |
+
* @param array $actions Action links.
|
485 |
+
* @return array
|
486 |
+
*/
|
487 |
+
public function filter_plugin_action_links_activate( $actions ) {
|
488 |
+
unset( $actions['activate'] );
|
489 |
+
|
490 |
+
return $actions;
|
491 |
+
}
|
492 |
+
|
493 |
+
/**
|
494 |
+
* Remove the 'Deactivate' link on the WP native plugins page if the plugin has been set to force activate.
|
495 |
+
*
|
496 |
+
* @since 2.5.0
|
497 |
+
*
|
498 |
+
* @param array $actions Action links.
|
499 |
+
* @return array
|
500 |
+
*/
|
501 |
+
public function filter_plugin_action_links_deactivate( $actions ) {
|
502 |
+
unset( $actions['deactivate'] );
|
503 |
+
|
504 |
+
return $actions;
|
505 |
+
}
|
506 |
+
|
507 |
+
/**
|
508 |
+
* Add a 'Requires update' link on the WP native plugins page if the plugin does not meet the
|
509 |
+
* minimum version requirements.
|
510 |
+
*
|
511 |
+
* @since 2.5.0
|
512 |
+
*
|
513 |
+
* @param array $actions Action links.
|
514 |
+
* @return array
|
515 |
+
*/
|
516 |
+
public function filter_plugin_action_links_update( $actions ) {
|
517 |
+
$actions['update'] = sprintf(
|
518 |
+
'<a href="%1$s" title="%2$s" class="edit">%3$s</a>',
|
519 |
+
esc_url( $this->get_tgmpa_status_url( 'update' ) ),
|
520 |
+
esc_attr__( 'This plugin needs to be updated to be compatible with your theme.', 'tgmpa' ),
|
521 |
+
esc_html__( 'Update Required', 'tgmpa' )
|
522 |
+
);
|
523 |
+
|
524 |
+
return $actions;
|
525 |
+
}
|
526 |
+
|
527 |
+
/**
|
528 |
+
* Handles calls to show plugin information via links in the notices.
|
529 |
+
*
|
530 |
+
* We get the links in the admin notices to point to the TGMPA page, rather
|
531 |
+
* than the typical plugin-install.php file, so we can prepare everything
|
532 |
+
* beforehand.
|
533 |
+
*
|
534 |
+
* WP does not make it easy to show the plugin information in the thickbox -
|
535 |
+
* here we have to require a file that includes a function that does the
|
536 |
+
* main work of displaying it, enqueue some styles, set up some globals and
|
537 |
+
* finally call that function before exiting.
|
538 |
+
*
|
539 |
+
* Down right easy once you know how...
|
540 |
+
*
|
541 |
+
* Returns early if not the TGMPA page.
|
542 |
+
*
|
543 |
+
* @since 2.1.0
|
544 |
+
*
|
545 |
+
* @global string $tab Used as iframe div class names, helps with styling
|
546 |
+
* @global string $body_id Used as the iframe body ID, helps with styling
|
547 |
+
*
|
548 |
+
* @return null Returns early if not the TGMPA page.
|
549 |
+
*/
|
550 |
+
public function admin_init() {
|
551 |
+
if ( ! $this->is_tgmpa_page() ) {
|
552 |
+
return;
|
553 |
+
}
|
554 |
+
|
555 |
+
if ( isset( $_REQUEST['tab'] ) && 'plugin-information' === $_REQUEST['tab'] ) {
|
556 |
+
// Needed for install_plugin_information().
|
557 |
+
require_once ABSPATH . 'wp-admin/includes/plugin-install.php';
|
558 |
+
|
559 |
+
wp_enqueue_style( 'plugin-install' );
|
560 |
+
|
561 |
+
global $tab, $body_id;
|
562 |
+
$body_id = 'plugin-information';
|
563 |
+
// @codingStandardsIgnoreStart
|
564 |
+
$tab = 'plugin-information';
|
565 |
+
// @codingStandardsIgnoreEnd
|
566 |
+
|
567 |
+
install_plugin_information();
|
568 |
+
|
569 |
+
exit;
|
570 |
+
}
|
571 |
+
}
|
572 |
+
|
573 |
+
/**
|
574 |
+
* Enqueue thickbox scripts/styles for plugin info.
|
575 |
+
*
|
576 |
+
* Thickbox is not automatically included on all admin pages, so we must
|
577 |
+
* manually enqueue it for those pages.
|
578 |
+
*
|
579 |
+
* Thickbox is only loaded if the user has not dismissed the admin
|
580 |
+
* notice or if there are any plugins left to install and activate.
|
581 |
+
*
|
582 |
+
* @since 2.1.0
|
583 |
+
*/
|
584 |
+
public function thickbox() {
|
585 |
+
if ( ! get_user_meta( get_current_user_id(), 'sp_dismissed_notice_' . $this->id, true ) ) {
|
586 |
+
add_thickbox();
|
587 |
+
}
|
588 |
+
}
|
589 |
+
|
590 |
+
/**
|
591 |
+
* Adds submenu page if there are plugin actions to take.
|
592 |
+
*
|
593 |
+
* This method adds the submenu page letting users know that a required
|
594 |
+
* plugin needs to be installed.
|
595 |
+
*
|
596 |
+
* This page disappears once the plugin has been installed and activated.
|
597 |
+
*
|
598 |
+
* @since 1.0.0
|
599 |
+
*
|
600 |
+
* @see TGM_Plugin_Activation::init()
|
601 |
+
* @see TGM_Plugin_Activation::install_plugins_page()
|
602 |
+
*
|
603 |
+
* @return null Return early if user lacks capability to install a plugin.
|
604 |
+
*/
|
605 |
+
public function admin_menu() {
|
606 |
+
// Make sure privileges are correct to see the page.
|
607 |
+
if ( ! current_user_can( 'install_plugins' ) ) {
|
608 |
+
return;
|
609 |
+
}
|
610 |
+
|
611 |
+
$args = apply_filters(
|
612 |
+
'tgmpa_admin_menu_args',
|
613 |
+
array(
|
614 |
+
'parent_slug' => $this->parent_slug, // Parent Menu slug.
|
615 |
+
'page_title' => $this->strings['page_title'], // Page title.
|
616 |
+
'menu_title' => $this->strings['menu_title'], // Menu title.
|
617 |
+
'capability' => $this->capability, // Capability.
|
618 |
+
'menu_slug' => $this->menu, // Menu slug.
|
619 |
+
'function' => array( $this, 'install_plugins_page' ), // Callback.
|
620 |
+
)
|
621 |
+
);
|
622 |
+
|
623 |
+
$this->add_admin_menu( $args );
|
624 |
+
}
|
625 |
+
|
626 |
+
/**
|
627 |
+
* Add the menu item.
|
628 |
+
*
|
629 |
+
* @since 2.5.0
|
630 |
+
*
|
631 |
+
* @param array $args Menu item configuration.
|
632 |
+
*/
|
633 |
+
protected function add_admin_menu( array $args ) {
|
634 |
+
if ( has_filter( 'tgmpa_admin_menu_use_add_theme_page' ) ) {
|
635 |
+
_deprecated_function( 'The "tgmpa_admin_menu_use_add_theme_page" filter', '2.5.0', esc_html__( 'Set the parent_slug config variable instead.', 'tgmpa' ) );
|
636 |
+
}
|
637 |
+
|
638 |
+
if ( 'themes.php' === $this->parent_slug ) {
|
639 |
+
$this->page_hook = call_user_func( 'add_theme_page', $args['page_title'], $args['menu_title'], $args['capability'], $args['menu_slug'], $args['function'] );
|
640 |
+
} else {
|
641 |
+
$this->page_hook = call_user_func( 'add_submenu_page', $args['parent_slug'], $args['page_title'], $args['menu_title'], $args['capability'], $args['menu_slug'], $args['function'] );
|
642 |
+
}
|
643 |
+
}
|
644 |
+
|
645 |
+
/**
|
646 |
+
* Echoes plugin installation form.
|
647 |
+
*
|
648 |
+
* This method is the callback for the admin_menu method function.
|
649 |
+
* This displays the admin page and form area where the user can select to install and activate the plugin.
|
650 |
+
* Aborts early if we're processing a plugin installation action.
|
651 |
+
*
|
652 |
+
* @since 1.0.0
|
653 |
+
*
|
654 |
+
* @return null Aborts early if we're processing a plugin installation action.
|
655 |
+
*/
|
656 |
+
public function install_plugins_page() {
|
657 |
+
// Store new instance of plugin table in object.
|
658 |
+
$plugin_table = new TGMPA_List_Table;
|
659 |
+
|
660 |
+
// Return early if processing a plugin installation action.
|
661 |
+
if ( ( ( 'tgmpa-bulk-install' === $plugin_table->current_action() || 'tgmpa-bulk-update' === $plugin_table->current_action() ) && $plugin_table->process_bulk_actions() ) || $this->do_plugin_install() ) {
|
662 |
+
return;
|
663 |
+
}
|
664 |
+
|
665 |
+
// Force refresh of available plugin information so we'll know about manual updates/deletes.
|
666 |
+
wp_clean_plugins_cache( false );
|
667 |
+
|
668 |
+
?>
|
669 |
+
<div class="tgmpa wrap">
|
670 |
+
<h2><?php echo esc_html( get_admin_page_title() ); ?></h2>
|
671 |
+
<?php $plugin_table->prepare_items(); ?>
|
672 |
+
|
673 |
+
<?php
|
674 |
+
if ( ! empty( $this->message ) && is_string( $this->message ) ) {
|
675 |
+
echo wp_kses_post( $this->message );
|
676 |
+
}
|
677 |
+
?>
|
678 |
+
<?php $plugin_table->views(); ?>
|
679 |
+
|
680 |
+
<form id="tgmpa-plugins" action="" method="post">
|
681 |
+
<input type="hidden" name="tgmpa-page" value="<?php echo esc_attr( $this->menu ); ?>" />
|
682 |
+
<input type="hidden" name="plugin_status" value="<?php echo esc_attr( $plugin_table->view_context ); ?>" />
|
683 |
+
<?php $plugin_table->display(); ?>
|
684 |
+
</form>
|
685 |
+
</div>
|
686 |
+
<?php
|
687 |
+
}
|
688 |
+
|
689 |
+
/**
|
690 |
+
* Installs, updates or activates a plugin depending on the action link clicked by the user.
|
691 |
+
*
|
692 |
+
* Checks the $_GET variable to see which actions have been
|
693 |
+
* passed and responds with the appropriate method.
|
694 |
+
*
|
695 |
+
* Uses WP_Filesystem to process and handle the plugin installation
|
696 |
+
* method.
|
697 |
+
*
|
698 |
+
* @since 1.0.0
|
699 |
+
*
|
700 |
+
* @uses WP_Filesystem
|
701 |
+
* @uses WP_Error
|
702 |
+
* @uses WP_Upgrader
|
703 |
+
* @uses Plugin_Upgrader
|
704 |
+
* @uses Plugin_Installer_Skin
|
705 |
+
* @uses Plugin_Upgrader_Skin
|
706 |
+
*
|
707 |
+
* @return boolean True on success, false on failure.
|
708 |
+
*/
|
709 |
+
protected function do_plugin_install() {
|
710 |
+
if ( empty( $_GET['plugin'] ) ) {
|
711 |
+
return false;
|
712 |
+
}
|
713 |
+
|
714 |
+
// All plugin information will be stored in an array for processing.
|
715 |
+
$slug = $this->sanitize_key( urldecode( $_GET['plugin'] ) );
|
716 |
+
|
717 |
+
if ( ! isset( $this->plugins[ $slug ] ) ) {
|
718 |
+
return false;
|
719 |
+
}
|
720 |
+
|
721 |
+
// Was an install or upgrade action link clicked?
|
722 |
+
if ( ( isset( $_GET['tgmpa-install'] ) && 'install-plugin' === $_GET['tgmpa-install'] ) || ( isset( $_GET['tgmpa-update'] ) && 'update-plugin' === $_GET['tgmpa-update'] ) ) {
|
723 |
+
|
724 |
+
$install_type = 'install';
|
725 |
+
if ( isset( $_GET['tgmpa-update'] ) && 'update-plugin' === $_GET['tgmpa-update'] ) {
|
726 |
+
$install_type = 'update';
|
727 |
+
}
|
728 |
+
|
729 |
+
check_admin_referer( 'tgmpa-' . $install_type, 'tgmpa-nonce' );
|
730 |
+
|
731 |
+
// Pass necessary information via URL if WP_Filesystem is needed.
|
732 |
+
$url = wp_nonce_url(
|
733 |
+
add_query_arg(
|
734 |
+
array(
|
735 |
+
'plugin' => urlencode( $slug ),
|
736 |
+
'tgmpa-' . $install_type => $install_type . '-plugin',
|
737 |
+
),
|
738 |
+
$this->get_tgmpa_url()
|
739 |
+
),
|
740 |
+
'tgmpa-' . $install_type,
|
741 |
+
'tgmpa-nonce'
|
742 |
+
);
|
743 |
+
|
744 |
+
$method = ''; // Leave blank so WP_Filesystem can populate it as necessary.
|
745 |
+
|
746 |
+
if ( false === ( $creds = request_filesystem_credentials( esc_url_raw( $url ), $method, false, false, array() ) ) ) {
|
747 |
+
return true;
|
748 |
+
}
|
749 |
+
|
750 |
+
if ( ! WP_Filesystem( $creds ) ) {
|
751 |
+
request_filesystem_credentials( esc_url_raw( $url ), $method, true, false, array() ); // Setup WP_Filesystem.
|
752 |
+
return true;
|
753 |
+
}
|
754 |
+
|
755 |
+
/* If we arrive here, we have the filesystem. */
|
756 |
+
|
757 |
+
// Prep variables for Plugin_Installer_Skin class.
|
758 |
+
$extra = array();
|
759 |
+
$extra['slug'] = $slug; // Needed for potentially renaming of directory name.
|
760 |
+
$source = $this->get_download_url( $slug );
|
761 |
+
$api = ( 'repo' === $this->plugins[ $slug ]['source_type'] ) ? $this->get_plugins_api( $slug ) : null;
|
762 |
+
$api = ( false !== $api ) ? $api : null;
|
763 |
+
|
764 |
+
$url = add_query_arg(
|
765 |
+
array(
|
766 |
+
'action' => $install_type . '-plugin',
|
767 |
+
'plugin' => urlencode( $slug ),
|
768 |
+
),
|
769 |
+
'update.php'
|
770 |
+
);
|
771 |
+
|
772 |
+
if ( ! class_exists( 'Plugin_Upgrader', false ) ) {
|
773 |
+
require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
|
774 |
+
}
|
775 |
+
|
776 |
+
$skin_args = array(
|
777 |
+
'type' => ( 'bundled' !== $this->plugins[ $slug ]['source_type'] ) ? 'web' : 'upload',
|
778 |
+
'title' => sprintf( $this->strings['installing'], $this->plugins[ $slug ]['name'] ),
|
779 |
+
'url' => esc_url_raw( $url ),
|
780 |
+
'nonce' => $install_type . '-plugin_' . $slug,
|
781 |
+
'plugin' => '',
|
782 |
+
'api' => $api,
|
783 |
+
'extra' => $extra,
|
784 |
+
);
|
785 |
+
|
786 |
+
if ( 'update' === $install_type ) {
|
787 |
+
$skin_args['plugin'] = $this->plugins[ $slug ]['file_path'];
|
788 |
+
$skin = new Plugin_Upgrader_Skin( $skin_args );
|
789 |
+
} else {
|
790 |
+
$skin = new Plugin_Installer_Skin( $skin_args );
|
791 |
+
}
|
792 |
+
|
793 |
+
// Create a new instance of Plugin_Upgrader.
|
794 |
+
$upgrader = new Plugin_Upgrader( $skin );
|
795 |
+
|
796 |
+
// Perform the action and install the plugin from the $source urldecode().
|
797 |
+
add_filter( 'upgrader_source_selection', array( $this, 'maybe_adjust_source_dir' ), 1, 3 );
|
798 |
+
|
799 |
+
if ( 'update' === $install_type ) {
|
800 |
+
// Inject our info into the update transient.
|
801 |
+
$to_inject = array( $slug => $this->plugins[ $slug ] );
|
802 |
+
$to_inject[ $slug ]['source'] = $source;
|
803 |
+
$this->inject_update_info( $to_inject );
|
804 |
+
|
805 |
+
$upgrader->upgrade( $this->plugins[ $slug ]['file_path'] );
|
806 |
+
} else {
|
807 |
+
$upgrader->install( $source );
|
808 |
+
}
|
809 |
+
|
810 |
+
remove_filter( 'upgrader_source_selection', array( $this, 'maybe_adjust_source_dir' ), 1, 3 );
|
811 |
+
|
812 |
+
// Make sure we have the correct file path now the plugin is installed/updated.
|
813 |
+
$this->populate_file_path( $slug );
|
814 |
+
|
815 |
+
// Only activate plugins if the config option is set to true and the plugin isn't
|
816 |
+
// already active (upgrade).
|
817 |
+
if ( $this->is_automatic && ! $this->is_plugin_active( $slug ) ) {
|
818 |
+
$plugin_activate = $upgrader->plugin_info(); // Grab the plugin info from the Plugin_Upgrader method.
|
819 |
+
if ( false === $this->activate_single_plugin( $plugin_activate, $slug, true ) ) {
|
820 |
+
return true; // Finish execution of the function early as we encountered an error.
|
821 |
+
}
|
822 |
+
}
|
823 |
+
|
824 |
+
$this->show_tgmpa_version();
|
825 |
+
|
826 |
+
// Display message based on if all plugins are now active or not.
|
827 |
+
if ( $this->is_tgmpa_complete() ) {
|
828 |
+
echo '<p>', sprintf( esc_html( $this->strings['complete'] ), '<a href="' . esc_url( self_admin_url() ) . '">' . esc_html__( 'Return to the Dashboard', 'tgmpa' ) . '</a>' ), '</p>';
|
829 |
+
echo '<style type="text/css">#adminmenu .wp-submenu li.current { display: none !important; }</style>';
|
830 |
+
} else {
|
831 |
+
echo '<p><a href="', esc_url( $this->get_tgmpa_url() ), '" target="_parent">', esc_html( $this->strings['return'] ), '</a></p>';
|
832 |
+
}
|
833 |
+
|
834 |
+
return true;
|
835 |
+
} elseif ( isset( $this->plugins[ $slug ]['file_path'], $_GET['tgmpa-activate'] ) && 'activate-plugin' === $_GET['tgmpa-activate'] ) {
|
836 |
+
// Activate action link was clicked.
|
837 |
+
check_admin_referer( 'tgmpa-activate', 'tgmpa-nonce' );
|
838 |
+
|
839 |
+
if ( false === $this->activate_single_plugin( $this->plugins[ $slug ]['file_path'], $slug ) ) {
|
840 |
+
return true; // Finish execution of the function early as we encountered an error.
|
841 |
+
}
|
842 |
+
}
|
843 |
+
|
844 |
+
return false;
|
845 |
+
}
|
846 |
+
|
847 |
+
/**
|
848 |
+
* Inject information into the 'update_plugins' site transient as WP checks that before running an update.
|
849 |
+
*
|
850 |
+
* @since 2.5.0
|
851 |
+
*
|
852 |
+
* @param array $plugins The plugin information for the plugins which are to be updated.
|
853 |
+
*/
|
854 |
+
public function inject_update_info( $plugins ) {
|
855 |
+
$repo_updates = get_site_transient( 'update_plugins' );
|
856 |
+
|
857 |
+
if ( ! is_object( $repo_updates ) ) {
|
858 |
+
$repo_updates = new stdClass;
|
859 |
+
}
|
860 |
+
|
861 |
+
foreach ( $plugins as $slug => $plugin ) {
|
862 |
+
$file_path = $plugin['file_path'];
|
863 |
+
|
864 |
+
if ( empty( $repo_updates->response[ $file_path ] ) ) {
|
865 |
+
$repo_updates->response[ $file_path ] = new stdClass;
|
866 |
+
}
|
867 |
+
|
868 |
+
// We only really need to set package, but let's do all we can in case WP changes something.
|
869 |
+
$repo_updates->response[ $file_path ]->slug = $slug;
|
870 |
+
$repo_updates->response[ $file_path ]->plugin = $file_path;
|
871 |
+
$repo_updates->response[ $file_path ]->new_version = $plugin['version'];
|
872 |
+
$repo_updates->response[ $file_path ]->package = $plugin['source'];
|
873 |
+
if ( empty( $repo_updates->response[ $file_path ]->url ) && ! empty( $plugin['external_url'] ) ) {
|
874 |
+
$repo_updates->response[ $file_path ]->url = $plugin['external_url'];
|
875 |
+
}
|
876 |
+
}
|
877 |
+
|
878 |
+
set_site_transient( 'update_plugins', $repo_updates );
|
879 |
+
}
|
880 |
+
|
881 |
+
/**
|
882 |
+
* Adjust the plugin directory name if necessary.
|
883 |
+
*
|
884 |
+
* The final destination directory of a plugin is based on the subdirectory name found in the
|
885 |
+
* (un)zipped source. In some cases - most notably GitHub repository plugin downloads -, this
|
886 |
+
* subdirectory name is not the same as the expected slug and the plugin will not be recognized
|
887 |
+
* as installed. This is fixed by adjusting the temporary unzipped source subdirectory name to
|
888 |
+
* the expected plugin slug.
|
889 |
+
*
|
890 |
+
* @since 2.5.0
|
891 |
+
*
|
892 |
+
* @param string $source Path to upgrade/zip-file-name.tmp/subdirectory/.
|
893 |
+
* @param string $remote_source Path to upgrade/zip-file-name.tmp.
|
894 |
+
* @param \WP_Upgrader $upgrader Instance of the upgrader which installs the plugin.
|
895 |
+
* @return string $source
|
896 |
+
*/
|
897 |
+
public function maybe_adjust_source_dir( $source, $remote_source, $upgrader ) {
|
898 |
+
if ( ! $this->is_tgmpa_page() || ! is_object( $GLOBALS['wp_filesystem'] ) ) {
|
899 |
+
return $source;
|
900 |
+
}
|
901 |
+
|
902 |
+
// Check for single file plugins.
|
903 |
+
$source_files = array_keys( $GLOBALS['wp_filesystem']->dirlist( $remote_source ) );
|
904 |
+
if ( 1 === count( $source_files ) && false === $GLOBALS['wp_filesystem']->is_dir( $source ) ) {
|
905 |
+
return $source;
|
906 |
+
}
|
907 |
+
|
908 |
+
// Multi-file plugin, let's see if the directory is correctly named.
|
909 |
+
$desired_slug = '';
|
910 |
+
|
911 |
+
// Figure out what the slug is supposed to be.
|
912 |
+
if ( false === $upgrader->bulk && ! empty( $upgrader->skin->options['extra']['slug'] ) ) {
|
913 |
+
$desired_slug = $upgrader->skin->options['extra']['slug'];
|
914 |
+
} else {
|
915 |
+
// Bulk installer contains less info, so fall back on the info registered here.
|
916 |
+
foreach ( $this->plugins as $slug => $plugin ) {
|
917 |
+
if ( ! empty( $upgrader->skin->plugin_names[ $upgrader->skin->i ] ) && $plugin['name'] === $upgrader->skin->plugin_names[ $upgrader->skin->i ] ) {
|
918 |
+
$desired_slug = $slug;
|
919 |
+
break;
|
920 |
+
}
|
921 |
+
}
|
922 |
+
unset( $slug, $plugin );
|
923 |
+
}
|
924 |
+
|
925 |
+
if ( ! empty( $desired_slug ) ) {
|
926 |
+
$subdir_name = untrailingslashit( str_replace( trailingslashit( $remote_source ), '', $source ) );
|
927 |
+
|
928 |
+
if ( ! empty( $subdir_name ) && $subdir_name !== $desired_slug ) {
|
929 |
+
$from = untrailingslashit( $source );
|
930 |
+
$to = trailingslashit( $remote_source ) . $desired_slug;
|
931 |
+
|
932 |
+
if ( true === $GLOBALS['wp_filesystem']->move( $from, $to ) ) {
|
933 |
+
return trailingslashit( $to );
|
934 |
+
} else {
|
935 |
+
return new WP_Error( 'rename_failed', esc_html__( 'The remote plugin package does not contain a folder with the desired slug and renaming did not work.', 'tgmpa' ) . ' ' . esc_html__( 'Please contact the plugin provider and ask them to package their plugin according to the WordPress guidelines.', 'tgmpa' ), array( 'found' => $subdir_name, 'expected' => $desired_slug ) );
|
936 |
+
}
|
937 |
+
} elseif ( empty( $subdir_name ) ) {
|
938 |
+
return new WP_Error( 'packaged_wrong', esc_html__( 'The remote plugin package consists of more than one file, but the files are not packaged in a folder.', 'tgmpa' ) . ' ' . esc_html__( 'Please contact the plugin provider and ask them to package their plugin according to the WordPress guidelines.', 'tgmpa' ), array( 'found' => $subdir_name, 'expected' => $desired_slug ) );
|
939 |
+
}
|
940 |
+
}
|
941 |
+
|
942 |
+
return $source;
|
943 |
+
}
|
944 |
+
|
945 |
+
/**
|
946 |
+
* Activate a single plugin and send feedback about the result to the screen.
|
947 |
+
*
|
948 |
+
* @since 2.5.0
|
949 |
+
*
|
950 |
+
* @param string $file_path Path within wp-plugins/ to main plugin file.
|
951 |
+
* @param string $slug Plugin slug.
|
952 |
+
* @param bool $automatic Whether this is an automatic activation after an install. Defaults to false.
|
953 |
+
* This determines the styling of the output messages.
|
954 |
+
* @return bool False if an error was encountered, true otherwise.
|
955 |
+
*/
|
956 |
+
protected function activate_single_plugin( $file_path, $slug, $automatic = false ) {
|
957 |
+
if ( $this->can_plugin_activate( $slug ) ) {
|
958 |
+
$activate = activate_plugin( $file_path );
|
959 |
+
|
960 |
+
if ( is_wp_error( $activate ) ) {
|
961 |
+
echo '<div id="message" class="error"><p>', wp_kses_post( $activate->get_error_message() ), '</p></div>',
|
962 |
+
'<p><a href="', esc_url( $this->get_tgmpa_url() ), '" target="_parent">', esc_html( $this->strings['return'] ), '</a></p>';
|
963 |
+
|
964 |
+
return false; // End it here if there is an error with activation.
|
965 |
+
} else {
|
966 |
+
if ( ! $automatic ) {
|
967 |
+
// Make sure message doesn't display again if bulk activation is performed
|
968 |
+
// immediately after a single activation.
|
969 |
+
if ( ! isset( $_POST['action'] ) ) { // WPCS: CSRF OK.
|
970 |
+
echo '<div id="message" class="updated"><p>', esc_html( $this->strings['activated_successfully'] ), ' <strong>', esc_html( $this->plugins[ $slug ]['name'] ), '.</strong></p></div>';
|
971 |
+
}
|
972 |
+
} else {
|
973 |
+
// Simpler message layout for use on the plugin install page.
|
974 |
+
echo '<p>', esc_html( $this->strings['plugin_activated'] ), '</p>';
|
975 |
+
}
|
976 |
+
}
|
977 |
+
} elseif ( $this->is_plugin_active( $slug ) ) {
|
978 |
+
// No simpler message format provided as this message should never be encountered
|
979 |
+
// on the plugin install page.
|
980 |
+
echo '<div id="message" class="error"><p>',
|
981 |
+
sprintf(
|
982 |
+
esc_html( $this->strings['plugin_already_active'] ),
|
983 |
+
'<strong>' . esc_html( $this->plugins[ $slug ]['name'] ) . '</strong>'
|
984 |
+
),
|
985 |
+
'</p></div>';
|
986 |
+
} elseif ( $this->does_plugin_require_update( $slug ) ) {
|
987 |
+
if ( ! $automatic ) {
|
988 |
+
// Make sure message doesn't display again if bulk activation is performed
|
989 |
+
// immediately after a single activation.
|
990 |
+
if ( ! isset( $_POST['action'] ) ) { // WPCS: CSRF OK.
|
991 |
+
echo '<div id="message" class="error"><p>',
|
992 |
+
sprintf(
|
993 |
+
esc_html( $this->strings['plugin_needs_higher_version'] ),
|
994 |
+
'<strong>' . esc_html( $this->plugins[ $slug ]['name'] ) . '</strong>'
|
995 |
+
),
|
996 |
+
'</p></div>';
|
997 |
+
}
|
998 |
+
} else {
|
999 |
+
// Simpler message layout for use on the plugin install page.
|
1000 |
+
echo '<p>', sprintf( esc_html( $this->strings['plugin_needs_higher_version'] ), esc_html( $this->plugins[ $slug ]['name'] ) ), '</p>';
|
1001 |
+
}
|
1002 |
+
}
|
1003 |
+
|
1004 |
+
return true;
|
1005 |
+
}
|
1006 |
+
|
1007 |
+
/**
|
1008 |
+
* Echoes required plugin notice.
|
1009 |
+
*
|
1010 |
+
* Outputs a message telling users that a specific plugin is required for
|
1011 |
+
* their theme. If appropriate, it includes a link to the form page where
|
1012 |
+
* users can install and activate the plugin.
|
1013 |
+
*
|
1014 |
+
* Returns early if we're on the Install page.
|
1015 |
+
*
|
1016 |
+
* @since 1.0.0
|
1017 |
+
*
|
1018 |
+
* @global object $current_screen
|
1019 |
+
*
|
1020 |
+
* @return null Returns early if we're on the Install page.
|
1021 |
+
*/
|
1022 |
+
public function notices() {
|
1023 |
+
// Remove nag on the install page / Return early if the nag message has been dismissed.
|
1024 |
+
if ( $this->is_tgmpa_page() || get_user_meta( get_current_user_id(), 'sp_dismissed_notice_' . $this->id, true ) ) {
|
1025 |
+
return;
|
1026 |
+
}
|
1027 |
+
|
1028 |
+
// Store for the plugin slugs by message type.
|
1029 |
+
$message = array();
|
1030 |
+
|
1031 |
+
// Initialize counters used to determine plurality of action link texts.
|
1032 |
+
$install_link_count = 0;
|
1033 |
+
$update_link_count = 0;
|
1034 |
+
$activate_link_count = 0;
|
1035 |
+
|
1036 |
+
foreach ( $this->plugins as $slug => $plugin ) {
|
1037 |
+
if ( $this->is_plugin_active( $slug ) && false === $this->does_plugin_have_update( $slug ) ) {
|
1038 |
+
continue;
|
1039 |
+
}
|
1040 |
+
|
1041 |
+
if ( ! $this->is_plugin_installed( $slug ) ) {
|
1042 |
+
if ( current_user_can( 'install_plugins' ) ) {
|
1043 |
+
$install_link_count++;
|
1044 |
+
|
1045 |
+
if ( true === $plugin['required'] ) {
|
1046 |
+
$message['notice_can_install_required'][] = $slug;
|
1047 |
+
} else {
|
1048 |
+
$message['notice_can_install_recommended'][] = $slug;
|
1049 |
+
}
|
1050 |
+
} else {
|
1051 |
+
// Need higher privileges to install the plugin.
|
1052 |
+
$message['notice_cannot_install'][] = $slug;
|
1053 |
+
}
|
1054 |
+
} else {
|
1055 |
+
if ( ! $this->is_plugin_active( $slug ) && $this->can_plugin_activate( $slug ) ) {
|
1056 |
+
if ( current_user_can( 'activate_plugins' ) ) {
|
1057 |
+
$activate_link_count++;
|
1058 |
+
|
1059 |
+
if ( true === $plugin['required'] ) {
|
1060 |
+
$message['notice_can_activate_required'][] = $slug;
|
1061 |
+
} else {
|
1062 |
+
$message['notice_can_activate_recommended'][] = $slug;
|
1063 |
+
}
|
1064 |
+
} else {
|
1065 |
+
// Need higher privileges to activate the plugin.
|
1066 |
+
$message['notice_cannot_activate'][] = $slug;
|
1067 |
+
}
|
1068 |
+
}
|
1069 |
+
|
1070 |
+
if ( $this->does_plugin_require_update( $slug ) || false !== $this->does_plugin_have_update( $slug ) ) {
|
1071 |
+
|
1072 |
+
if ( current_user_can( 'install_plugins' ) ) {
|
1073 |
+
$update_link_count++;
|
1074 |
+
|
1075 |
+
if ( $this->does_plugin_require_update( $slug ) ) {
|
1076 |
+
$message['notice_ask_to_update'][] = $slug;
|
1077 |
+
} elseif ( false !== $this->does_plugin_have_update( $slug ) ) {
|
1078 |
+
$message['notice_ask_to_update_maybe'][] = $slug;
|
1079 |
+
}
|
1080 |
+
} else {
|
1081 |
+
// Need higher privileges to update the plugin.
|
1082 |
+
$message['notice_cannot_update'][] = $slug;
|
1083 |
+
}
|
1084 |
+
}
|
1085 |
+
}
|
1086 |
+
}
|
1087 |
+
unset( $slug, $plugin );
|
1088 |
+
|
1089 |
+
// If we have notices to display, we move forward.
|
1090 |
+
if ( ! empty( $message ) ) {
|
1091 |
+
krsort( $message ); // Sort messages.
|
1092 |
+
$rendered = '';
|
1093 |
+
|
1094 |
+
// As add_settings_error() wraps the final message in a <p> and as the final message can't be
|
1095 |
+
// filtered, using <p>'s in our html would render invalid html output.
|
1096 |
+
$line_template = '<span style="display: block; margin: 0.5em 0.5em 0 0; clear: both;">%s</span>' . "\n";
|
1097 |
+
|
1098 |
+
// If dismissable is false and a message is set, output it now.
|
1099 |
+
if ( ! $this->dismissable && ! empty( $this->dismiss_msg ) ) {
|
1100 |
+
$rendered .= sprintf( $line_template, wp_kses_post( $this->dismiss_msg ) );
|
1101 |
+
}
|
1102 |
+
|
1103 |
+
// Render the individual message lines for the notice.
|
1104 |
+
foreach ( $message as $type => $plugin_group ) {
|
1105 |
+
$linked_plugins = array();
|
1106 |
+
|
1107 |
+
// Get the external info link for a plugin if one is available.
|
1108 |
+
foreach ( $plugin_group as $plugin_slug ) {
|
1109 |
+
$linked_plugins[] = $this->get_info_link( $plugin_slug );
|
1110 |
+
}
|
1111 |
+
unset( $plugin_slug );
|
1112 |
+
|
1113 |
+
$count = count( $plugin_group );
|
1114 |
+
$linked_plugins = array_map( array( 'TGMPA_Utils', 'wrap_in_em' ), $linked_plugins );
|
1115 |
+
$last_plugin = array_pop( $linked_plugins ); // Pop off last name to prep for readability.
|
1116 |
+
$imploded = empty( $linked_plugins ) ? $last_plugin : ( implode( ', ', $linked_plugins ) . ' ' . esc_html_x( 'and', 'plugin A *and* plugin B', 'tgmpa' ) . ' ' . $last_plugin );
|
1117 |
+
|
1118 |
+
$rendered .= sprintf(
|
1119 |
+
$line_template,
|
1120 |
+
sprintf(
|
1121 |
+
translate_nooped_plural( $this->strings[ $type ], $count, 'tgmpa' ),
|
1122 |
+
$imploded,
|
1123 |
+
$count
|
1124 |
+
)
|
1125 |
+
);
|
1126 |
+
|
1127 |
+
if ( 0 === strpos( $type, 'notice_cannot' ) ) {
|
1128 |
+
$rendered .= $this->strings['contact_admin'];
|
1129 |
+
}
|
1130 |
+
}
|
1131 |
+
unset( $type, $plugin_group, $linked_plugins, $count, $last_plugin, $imploded );
|
1132 |
+
|
1133 |
+
// Setup action links.
|
1134 |
+
$action_links = array(
|
1135 |
+
'install' => '',
|
1136 |
+
'update' => '',
|
1137 |
+
'activate' => '',
|
1138 |
+
'dismiss' => $this->dismissable ? '<a href="' . esc_url( add_query_arg( 'tgmpa-dismiss', 'dismiss_admin_notices' ) ) . '" class="dismiss-notice" target="_parent">' . esc_html( $this->strings['dismiss'] ) . '</a>' : '',
|
1139 |
+
);
|
1140 |
+
|
1141 |
+
$link_template = '<a href="%2$s">%1$s</a>';
|
1142 |
+
|
1143 |
+
if ( current_user_can( 'install_plugins' ) ) {
|
1144 |
+
if ( $install_link_count > 0 ) {
|
1145 |
+
$action_links['install'] = sprintf(
|
1146 |
+
$link_template,
|
1147 |
+
translate_nooped_plural( $this->strings['install_link'], $install_link_count, 'tgmpa' ),
|
1148 |
+
esc_url( $this->get_tgmpa_status_url( 'install' ) )
|
1149 |
+
);
|
1150 |
+
}
|
1151 |
+
if ( $update_link_count > 0 ) {
|
1152 |
+
$action_links['update'] = sprintf(
|
1153 |
+
$link_template,
|
1154 |
+
translate_nooped_plural( $this->strings['update_link'], $update_link_count, 'tgmpa' ),
|
1155 |
+
esc_url( $this->get_tgmpa_status_url( 'update' ) )
|
1156 |
+
);
|
1157 |
+
}
|
1158 |
+
}
|
1159 |
+
|
1160 |
+
if ( current_user_can( 'activate_plugins' ) && $activate_link_count > 0 ) {
|
1161 |
+
$action_links['activate'] = sprintf(
|
1162 |
+
$link_template,
|
1163 |
+
translate_nooped_plural( $this->strings['activate_link'], $activate_link_count, 'tgmpa' ),
|
1164 |
+
esc_url( $this->get_tgmpa_status_url( 'activate' ) )
|
1165 |
+
);
|
1166 |
+
}
|
1167 |
+
|
1168 |
+
$action_links = apply_filters( 'tgmpa_notice_action_links', $action_links );
|
1169 |
+
|
1170 |
+
$action_links = array_filter( (array) $action_links ); // Remove any empty array items.
|
1171 |
+
|
1172 |
+
if ( ! empty( $action_links ) && is_array( $action_links ) ) {
|
1173 |
+
$action_links = sprintf( $line_template, implode( ' | ', $action_links ) );
|
1174 |
+
$rendered .= apply_filters( 'tgmpa_notice_rendered_action_links', $action_links );
|
1175 |
+
}
|
1176 |
+
|
1177 |
+
// Register the nag messages and prepare them to be processed.
|
1178 |
+
if ( ! empty( $this->strings['nag_type'] ) ) {
|
1179 |
+
add_settings_error( 'tgmpa', 'tgmpa', $rendered, sanitize_html_class( strtolower( $this->strings['nag_type'] ) ) );
|
1180 |
+
} else {
|
1181 |
+
$nag_class = version_compare( $this->wp_version, '3.8', '<' ) ? 'updated' : 'update-nag';
|
1182 |
+
add_settings_error( 'tgmpa', 'tgmpa', $rendered, $nag_class );
|
1183 |
+
}
|
1184 |
+
}
|
1185 |
+
|
1186 |
+
// Admin options pages already output settings_errors, so this is to avoid duplication.
|
1187 |
+
if ( 'options-general' !== $GLOBALS['current_screen']->parent_base ) {
|
1188 |
+
$this->display_settings_errors();
|
1189 |
+
}
|
1190 |
+
}
|
1191 |
+
|
1192 |
+
/**
|
1193 |
+
* Display settings errors and remove those which have been displayed to avoid duplicate messages showing
|
1194 |
+
*
|
1195 |
+
* @since 2.5.0
|
1196 |
+
*/
|
1197 |
+
protected function display_settings_errors() {
|
1198 |
+
global $wp_settings_errors;
|
1199 |
+
|
1200 |
+
settings_errors( 'tgmpa' );
|
1201 |
+
|
1202 |
+
foreach ( (array) $wp_settings_errors as $key => $details ) {
|
1203 |
+
if ( 'tgmpa' === $details['setting'] ) {
|
1204 |
+
unset( $wp_settings_errors[ $key ] );
|
1205 |
+
break;
|
1206 |
+
}
|
1207 |
+
}
|
1208 |
+
}
|
1209 |
+
|
1210 |
+
/**
|
1211 |
+
* Add dismissable admin notices.
|
1212 |
+
*
|
1213 |
+
* Appends a link to the admin nag messages. If clicked, the admin notice disappears and no longer is visible to users.
|
1214 |
+
*
|
1215 |
+
* @since 2.1.0
|
1216 |
+
*/
|
1217 |
+
public function dismiss() {
|
1218 |
+
if ( isset( $_GET['tgmpa-dismiss'] ) ) {
|
1219 |
+
update_user_meta( get_current_user_id(), 'sp_dismissed_notice_' . $this->id, 1 );
|
1220 |
+
}
|
1221 |
+
}
|
1222 |
+
|
1223 |
+
/**
|
1224 |
+
* Add individual plugin to our collection of plugins.
|
1225 |
+
*
|
1226 |
+
* If the required keys are not set or the plugin has already
|
1227 |
+
* been registered, the plugin is not added.
|
1228 |
+
*
|
1229 |
+
* @since 2.0.0
|
1230 |
+
*
|
1231 |
+
* @param array|null $plugin Array of plugin arguments or null if invalid argument.
|
1232 |
+
* @return null Return early if incorrect argument.
|
1233 |
+
*/
|
1234 |
+
public function register( $plugin ) {
|
1235 |
+
if ( empty( $plugin['slug'] ) || empty( $plugin['name'] ) ) {
|
1236 |
+
return;
|
1237 |
+
}
|
1238 |
+
|
1239 |
+
if ( empty( $plugin['slug'] ) || ! is_string( $plugin['slug'] ) || isset( $this->plugins[ $plugin['slug'] ] ) ) {
|
1240 |
+
return;
|
1241 |
+
}
|
1242 |
+
|
1243 |
+
$defaults = array(
|
1244 |
+
'name' => '', // String
|
1245 |
+
'slug' => '', // String
|
1246 |
+
'source' => 'repo', // String
|
1247 |
+
'required' => false, // Boolean
|
1248 |
+
'version' => '', // String
|
1249 |
+
'force_activation' => false, // Boolean
|
1250 |
+
'force_deactivation' => false, // Boolean
|
1251 |
+
'external_url' => '', // String
|
1252 |
+
'is_callable' => '', // String|Array.
|
1253 |
+
);
|
1254 |
+
|
1255 |
+
// Prepare the received data.
|
1256 |
+
$plugin = wp_parse_args( $plugin, $defaults );
|
1257 |
+
|
1258 |
+
// Standardize the received slug.
|
1259 |
+
$plugin['slug'] = $this->sanitize_key( $plugin['slug'] );
|
1260 |
+
|
1261 |
+
// Forgive users for using string versions of booleans or floats for version number.
|
1262 |
+
$plugin['version'] = (string) $plugin['version'];
|
1263 |
+
$plugin['source'] = empty( $plugin['source'] ) ? 'repo' : $plugin['source'];
|
1264 |
+
$plugin['required'] = TGMPA_Utils::validate_bool( $plugin['required'] );
|
1265 |
+
$plugin['force_activation'] = TGMPA_Utils::validate_bool( $plugin['force_activation'] );
|
1266 |
+
$plugin['force_deactivation'] = TGMPA_Utils::validate_bool( $plugin['force_deactivation'] );
|
1267 |
+
|
1268 |
+
// Enrich the received data.
|
1269 |
+
$plugin['file_path'] = $this->_get_plugin_basename_from_slug( $plugin['slug'] );
|
1270 |
+
$plugin['source_type'] = $this->get_plugin_source_type( $plugin['source'] );
|
1271 |
+
|
1272 |
+
// Set the class properties.
|
1273 |
+
$this->plugins[ $plugin['slug'] ] = $plugin;
|
1274 |
+
$this->sort_order[ $plugin['slug'] ] = $plugin['name'];
|
1275 |
+
|
1276 |
+
// Should we add the force activation hook ?
|
1277 |
+
if ( true === $plugin['force_activation'] ) {
|
1278 |
+
$this->has_forced_activation = true;
|
1279 |
+
}
|
1280 |
+
|
1281 |
+
// Should we add the force deactivation hook ?
|
1282 |
+
if ( true === $plugin['force_deactivation'] ) {
|
1283 |
+
$this->has_forced_deactivation = true;
|
1284 |
+
}
|
1285 |
+
}
|
1286 |
+
|
1287 |
+
/**
|
1288 |
+
* Determine what type of source the plugin comes from.
|
1289 |
+
*
|
1290 |
+
* @since 2.5.0
|
1291 |
+
*
|
1292 |
+
* @param string $source The source of the plugin as provided, either empty (= WP repo), a file path
|
1293 |
+
* (= bundled) or an external URL.
|
1294 |
+
* @return string 'repo', 'external', or 'bundled'
|
1295 |
+
*/
|
1296 |
+
protected function get_plugin_source_type( $source ) {
|
1297 |
+
if ( 'repo' === $source || preg_match( self::WP_REPO_REGEX, $source ) ) {
|
1298 |
+
return 'repo';
|
1299 |
+
} elseif ( preg_match( self::IS_URL_REGEX, $source ) ) {
|
1300 |
+
return 'external';
|
1301 |
+
} else {
|
1302 |
+
return 'bundled';
|
1303 |
+
}
|
1304 |
+
}
|
1305 |
+
|
1306 |
+
/**
|
1307 |
+
* Sanitizes a string key.
|
1308 |
+
*
|
1309 |
+
* Near duplicate of WP Core `sanitize_key()`. The difference is that uppercase characters *are*
|
1310 |
+
* allowed, so as not to break upgrade paths from non-standard bundled plugins using uppercase
|
1311 |
+
* characters in the plugin directory path/slug. Silly them.
|
1312 |
+
*
|
1313 |
+
* @see https://developer.wordpress.org/reference/hooks/sanitize_key/
|
1314 |
+
*
|
1315 |
+
* @since 2.5.0
|
1316 |
+
*
|
1317 |
+
* @param string $key String key.
|
1318 |
+
* @return string Sanitized key
|
1319 |
+
*/
|
1320 |
+
public function sanitize_key( $key ) {
|
1321 |
+
$raw_key = $key;
|
1322 |
+
$key = preg_replace( '`[^A-Za-z0-9_-]`', '', $key );
|
1323 |
+
|
1324 |
+
/**
|
1325 |
+
* Filter a sanitized key string.
|
1326 |
+
*
|
1327 |
+
* @since 3.0.0
|
1328 |
+
*
|
1329 |
+
* @param string $key Sanitized key.
|
1330 |
+
* @param string $raw_key The key prior to sanitization.
|
1331 |
+
*/
|
1332 |
+
return apply_filters( 'tgmpa_sanitize_key', $key, $raw_key );
|
1333 |
+
}
|
1334 |
+
|
1335 |
+
/**
|
1336 |
+
* Amend default configuration settings.
|
1337 |
+
*
|
1338 |
+
* @since 2.0.0
|
1339 |
+
*
|
1340 |
+
* @param array $config Array of config options to pass as class properties.
|
1341 |
+
*/
|
1342 |
+
public function config( $config ) {
|
1343 |
+
$keys = array(
|
1344 |
+
'id',
|
1345 |
+
'default_path',
|
1346 |
+
'has_notices',
|
1347 |
+
'dismissable',
|
1348 |
+
'dismiss_msg',
|
1349 |
+
'menu',
|
1350 |
+
'parent_slug',
|
1351 |
+
'capability',
|
1352 |
+
'is_automatic',
|
1353 |
+
'message',
|
1354 |
+
'strings',
|
1355 |
+
);
|
1356 |
+
|
1357 |
+
foreach ( $keys as $key ) {
|
1358 |
+
if ( isset( $config[ $key ] ) ) {
|
1359 |
+
if ( is_array( $config[ $key ] ) ) {
|
1360 |
+
$this->$key = array_merge( $this->$key, $config[ $key ] );
|
1361 |
+
} else {
|
1362 |
+
$this->$key = $config[ $key ];
|
1363 |
+
}
|
1364 |
+
}
|
1365 |
+
}
|
1366 |
+
}
|
1367 |
+
|
1368 |
+
/**
|
1369 |
+
* Amend action link after plugin installation.
|
1370 |
+
*
|
1371 |
+
* @since 2.0.0
|
1372 |
+
*
|
1373 |
+
* @param array $install_actions Existing array of actions.
|
1374 |
+
* @return array Amended array of actions.
|
1375 |
+
*/
|
1376 |
+
public function actions( $install_actions ) {
|
1377 |
+
// Remove action links on the TGMPA install page.
|
1378 |
+
if ( $this->is_tgmpa_page() ) {
|
1379 |
+
return false;
|
1380 |
+
}
|
1381 |
+
|
1382 |
+
return $install_actions;
|
1383 |
+
}
|
1384 |
+
|
1385 |
+
/**
|
1386 |
+
* Flushes the plugins cache on theme switch to prevent stale entries
|
1387 |
+
* from remaining in the plugin table.
|
1388 |
+
*
|
1389 |
+
* @since 2.4.0
|
1390 |
+
*
|
1391 |
+
* @param bool $clear_update_cache Optional. Whether to clear the Plugin updates cache.
|
1392 |
+
* Parameter added in v2.5.0.
|
1393 |
+
*/
|
1394 |
+
public function flush_plugins_cache( $clear_update_cache = true ) {
|
1395 |
+
wp_clean_plugins_cache( $clear_update_cache );
|
1396 |
+
}
|
1397 |
+
|
1398 |
+
/**
|
1399 |
+
* Set file_path key for each installed plugin.
|
1400 |
+
*
|
1401 |
+
* @since 2.1.0
|
1402 |
+
*
|
1403 |
+
* @param string $plugin_slug Optional. If set, only (re-)populates the file path for that specific plugin.
|
1404 |
+
* Parameter added in v2.5.0.
|
1405 |
+
*/
|
1406 |
+
public function populate_file_path( $plugin_slug = '' ) {
|
1407 |
+
if ( ! empty( $plugin_slug ) && is_string( $plugin_slug ) && isset( $this->plugins[ $plugin_slug ] ) ) {
|
1408 |
+
$this->plugins[ $plugin_slug ]['file_path'] = $this->_get_plugin_basename_from_slug( $plugin_slug );
|
1409 |
+
} else {
|
1410 |
+
// Add file_path key for all plugins.
|
1411 |
+
foreach ( $this->plugins as $slug => $values ) {
|
1412 |
+
$this->plugins[ $slug ]['file_path'] = $this->_get_plugin_basename_from_slug( $slug );
|
1413 |
+
}
|
1414 |
+
}
|
1415 |
+
}
|
1416 |
+
|
1417 |
+
/**
|
1418 |
+
* Helper function to extract the file path of the plugin file from the
|
1419 |
+
* plugin slug, if the plugin is installed.
|
1420 |
+
*
|
1421 |
+
* @since 2.0.0
|
1422 |
+
*
|
1423 |
+
* @param string $slug Plugin slug (typically folder name) as provided by the developer.
|
1424 |
+
* @return string Either file path for plugin if installed, or just the plugin slug.
|
1425 |
+
*/
|
1426 |
+
protected function _get_plugin_basename_from_slug( $slug ) {
|
1427 |
+
$keys = array_keys( $this->get_plugins() );
|
1428 |
+
|
1429 |
+
foreach ( $keys as $key ) {
|
1430 |
+
if ( preg_match( '|^' . $slug . '/|', $key ) ) {
|
1431 |
+
return $key;
|
1432 |
+
}
|
1433 |
+
}
|
1434 |
+
|
1435 |
+
return $slug;
|
1436 |
+
}
|
1437 |
+
|
1438 |
+
/**
|
1439 |
+
* Retrieve plugin data, given the plugin name.
|
1440 |
+
*
|
1441 |
+
* Loops through the registered plugins looking for $name. If it finds it,
|
1442 |
+
* it returns the $data from that plugin. Otherwise, returns false.
|
1443 |
+
*
|
1444 |
+
* @since 2.1.0
|
1445 |
+
*
|
1446 |
+
* @param string $name Name of the plugin, as it was registered.
|
1447 |
+
* @param string $data Optional. Array key of plugin data to return. Default is slug.
|
1448 |
+
* @return string|boolean Plugin slug if found, false otherwise.
|
1449 |
+
*/
|
1450 |
+
public function _get_plugin_data_from_name( $name, $data = 'slug' ) {
|
1451 |
+
foreach ( $this->plugins as $values ) {
|
1452 |
+
if ( $name === $values['name'] && isset( $values[ $data ] ) ) {
|
1453 |
+
return $values[ $data ];
|
1454 |
+
}
|
1455 |
+
}
|
1456 |
+
|
1457 |
+
return false;
|
1458 |
+
}
|
1459 |
+
|
1460 |
+
/**
|
1461 |
+
* Retrieve the download URL for a package.
|
1462 |
+
*
|
1463 |
+
* @since 2.5.0
|
1464 |
+
*
|
1465 |
+
* @param string $slug Plugin slug.
|
1466 |
+
* @return string Plugin download URL or path to local file or empty string if undetermined.
|
1467 |
+
*/
|
1468 |
+
public function get_download_url( $slug ) {
|
1469 |
+
$dl_source = '';
|
1470 |
+
|
1471 |
+
switch ( $this->plugins[ $slug ]['source_type'] ) {
|
1472 |
+
case 'repo':
|
1473 |
+
return $this->get_wp_repo_download_url( $slug );
|
1474 |
+
case 'external':
|
1475 |
+
return $this->plugins[ $slug ]['source'];
|
1476 |
+
case 'bundled':
|
1477 |
+
return $this->default_path . $this->plugins[ $slug ]['source'];
|
1478 |
+
}
|
1479 |
+
|
1480 |
+
return $dl_source; // Should never happen.
|
1481 |
+
}
|
1482 |
+
|
1483 |
+
/**
|
1484 |
+
* Retrieve the download URL for a WP repo package.
|
1485 |
+
*
|
1486 |
+
* @since 2.5.0
|
1487 |
+
*
|
1488 |
+
* @param string $slug Plugin slug.
|
1489 |
+
* @return string Plugin download URL.
|
1490 |
+
*/
|
1491 |
+
protected function get_wp_repo_download_url( $slug ) {
|
1492 |
+
$source = '';
|
1493 |
+
$api = $this->get_plugins_api( $slug );
|
1494 |
+
|
1495 |
+
if ( false !== $api && isset( $api->download_link ) ) {
|
1496 |
+
$source = $api->download_link;
|
1497 |
+
}
|
1498 |
+
|
1499 |
+
return $source;
|
1500 |
+
}
|
1501 |
+
|
1502 |
+
/**
|
1503 |
+
* Try to grab information from WordPress API.
|
1504 |
+
*
|
1505 |
+
* @since 2.5.0
|
1506 |
+
*
|
1507 |
+
* @param string $slug Plugin slug.
|
1508 |
+
* @return object Plugins_api response object on success, WP_Error on failure.
|
1509 |
+
*/
|
1510 |
+
protected function get_plugins_api( $slug ) {
|
1511 |
+
static $api = array(); // Cache received responses.
|
1512 |
+
|
1513 |
+
if ( ! isset( $api[ $slug ] ) ) {
|
1514 |
+
if ( ! function_exists( 'plugins_api' ) ) {
|
1515 |
+
require_once ABSPATH . 'wp-admin/includes/plugin-install.php';
|
1516 |
+
}
|
1517 |
+
|
1518 |
+
$response = plugins_api( 'plugin_information', array( 'slug' => $slug, 'fields' => array( 'sections' => false ) ) );
|
1519 |
+
|
1520 |
+
$api[ $slug ] = false;
|
1521 |
+
|
1522 |
+
if ( is_wp_error( $response ) ) {
|
1523 |
+
wp_die( esc_html( $this->strings['oops'] ) );
|
1524 |
+
} else {
|
1525 |
+
$api[ $slug ] = $response;
|
1526 |
+
}
|
1527 |
+
}
|
1528 |
+
|
1529 |
+
return $api[ $slug ];
|
1530 |
+
}
|
1531 |
+
|
1532 |
+
/**
|
1533 |
+
* Retrieve a link to a plugin information page.
|
1534 |
+
*
|
1535 |
+
* @since 2.5.0
|
1536 |
+
*
|
1537 |
+
* @param string $slug Plugin slug.
|
1538 |
+
* @return string Fully formed html link to a plugin information page if available
|
1539 |
+
* or the plugin name if not.
|
1540 |
+
*/
|
1541 |
+
public function get_info_link( $slug ) {
|
1542 |
+
if ( ! empty( $this->plugins[ $slug ]['external_url'] ) && preg_match( self::IS_URL_REGEX, $this->plugins[ $slug ]['external_url'] ) ) {
|
1543 |
+
$link = sprintf(
|
1544 |
+
'<a href="%1$s" target="_blank">%2$s</a>',
|
1545 |
+
esc_url( $this->plugins[ $slug ]['external_url'] ),
|
1546 |
+
esc_html( $this->plugins[ $slug ]['name'] )
|
1547 |
+
);
|
1548 |
+
} elseif ( 'repo' === $this->plugins[ $slug ]['source_type'] ) {
|
1549 |
+
$url = add_query_arg(
|
1550 |
+
array(
|
1551 |
+
'tab' => 'plugin-information',
|
1552 |
+
'plugin' => urlencode( $slug ),
|
1553 |
+
'TB_iframe' => 'true',
|
1554 |
+
'width' => '640',
|
1555 |
+
'height' => '500',
|
1556 |
+
),
|
1557 |
+
self_admin_url( 'plugin-install.php' )
|
1558 |
+
);
|
1559 |
+
|
1560 |
+
$link = sprintf(
|
1561 |
+
'<a href="%1$s" class="thickbox">%2$s</a>',
|
1562 |
+
esc_url( $url ),
|
1563 |
+
esc_html( $this->plugins[ $slug ]['name'] )
|
1564 |
+
);
|
1565 |
+
} else {
|
1566 |
+
$link = esc_html( $this->plugins[ $slug ]['name'] ); // No hyperlink.
|
1567 |
+
}
|
1568 |
+
|
1569 |
+
return $link;
|
1570 |
+
}
|
1571 |
+
|
1572 |
+
/**
|
1573 |
+
* Determine if we're on the TGMPA Install page.
|
1574 |
+
*
|
1575 |
+
* @since 2.1.0
|
1576 |
+
*
|
1577 |
+
* @return boolean True when on the TGMPA page, false otherwise.
|
1578 |
+
*/
|
1579 |
+
protected function is_tgmpa_page() {
|
1580 |
+
return isset( $_GET['page'] ) && $this->menu === $_GET['page'];
|
1581 |
+
}
|
1582 |
+
|
1583 |
+
/**
|
1584 |
+
* Retrieve the URL to the TGMPA Install page.
|
1585 |
+
*
|
1586 |
+
* I.e. depending on the config settings passed something along the lines of:
|
1587 |
+
* http://example.com/wp-admin/themes.php?page=tgmpa-install-plugins
|
1588 |
+
*
|
1589 |
+
* @since 2.5.0
|
1590 |
+
*
|
1591 |
+
* @return string Properly encoded URL (not escaped).
|
1592 |
+
*/
|
1593 |
+
public function get_tgmpa_url() {
|
1594 |
+
static $url;
|
1595 |
+
|
1596 |
+
if ( ! isset( $url ) ) {
|
1597 |
+
$parent = $this->parent_slug;
|
1598 |
+
if ( false === strpos( $parent, '.php' ) ) {
|
1599 |
+
$parent = 'admin.php';
|
1600 |
+
}
|
1601 |
+
$url = add_query_arg(
|
1602 |
+
array(
|
1603 |
+
'page' => urlencode( $this->menu ),
|
1604 |
+
),
|
1605 |
+
self_admin_url( $parent )
|
1606 |
+
);
|
1607 |
+
}
|
1608 |
+
|
1609 |
+
return $url;
|
1610 |
+
}
|
1611 |
+
|
1612 |
+
/**
|
1613 |
+
* Retrieve the URL to the TGMPA Install page for a specific plugin status (view).
|
1614 |
+
*
|
1615 |
+
* I.e. depending on the config settings passed something along the lines of:
|
1616 |
+
* http://example.com/wp-admin/themes.php?page=tgmpa-install-plugins&plugin_status=install
|
1617 |
+
*
|
1618 |
+
* @since 2.5.0
|
1619 |
+
*
|
1620 |
+
* @param string $status Plugin status - either 'install', 'update' or 'activate'.
|
1621 |
+
* @return string Properly encoded URL (not escaped).
|
1622 |
+
*/
|
1623 |
+
public function get_tgmpa_status_url( $status ) {
|
1624 |
+
return add_query_arg(
|
1625 |
+
array(
|
1626 |
+
'plugin_status' => urlencode( $status ),
|
1627 |
+
),
|
1628 |
+
$this->get_tgmpa_url()
|
1629 |
+
);
|
1630 |
+
}
|
1631 |
+
|
1632 |
+
/**
|
1633 |
+
* Determine whether there are open actions for plugins registered with TGMPA.
|
1634 |
+
*
|
1635 |
+
* @since 2.5.0
|
1636 |
+
*
|
1637 |
+
* @return bool True if complete, i.e. no outstanding actions. False otherwise.
|
1638 |
+
*/
|
1639 |
+
public function is_tgmpa_complete() {
|
1640 |
+
$complete = true;
|
1641 |
+
foreach ( $this->plugins as $slug => $plugin ) {
|
1642 |
+
if ( ! $this->is_plugin_active( $slug ) || false !== $this->does_plugin_have_update( $slug ) ) {
|
1643 |
+
$complete = false;
|
1644 |
+
break;
|
1645 |
+
}
|
1646 |
+
}
|
1647 |
+
|
1648 |
+
return $complete;
|
1649 |
+
}
|
1650 |
+
|
1651 |
+
/**
|
1652 |
+
* Check if a plugin is installed. Does not take must-use plugins into account.
|
1653 |
+
*
|
1654 |
+
* @since 2.5.0
|
1655 |
+
*
|
1656 |
+
* @param string $slug Plugin slug.
|
1657 |
+
* @return bool True if installed, false otherwise.
|
1658 |
+
*/
|
1659 |
+
public function is_plugin_installed( $slug ) {
|
1660 |
+
$installed_plugins = $this->get_plugins(); // Retrieve a list of all installed plugins (WP cached).
|
1661 |
+
|
1662 |
+
return ( ! empty( $installed_plugins[ $this->plugins[ $slug ]['file_path'] ] ) );
|
1663 |
+
}
|
1664 |
+
|
1665 |
+
/**
|
1666 |
+
* Check if a plugin is active.
|
1667 |
+
*
|
1668 |
+
* @since 2.5.0
|
1669 |
+
*
|
1670 |
+
* @param string $slug Plugin slug.
|
1671 |
+
* @return bool True if active, false otherwise.
|
1672 |
+
*/
|
1673 |
+
public function is_plugin_active( $slug ) {
|
1674 |
+
return ( ( ! empty( $this->plugins[ $slug ]['is_callable'] ) && is_callable( $this->plugins[ $slug ]['is_callable'] ) ) || is_plugin_active( $this->plugins[ $slug ]['file_path'] ) );
|
1675 |
+
}
|
1676 |
+
|
1677 |
+
/**
|
1678 |
+
* Check if a plugin can be updated, i.e. if we have information on the minimum WP version required
|
1679 |
+
* available, check whether the current install meets them.
|
1680 |
+
*
|
1681 |
+
* @since 2.5.0
|
1682 |
+
*
|
1683 |
+
* @param string $slug Plugin slug.
|
1684 |
+
* @return bool True if OK to update, false otherwise.
|
1685 |
+
*/
|
1686 |
+
public function can_plugin_update( $slug ) {
|
1687 |
+
// We currently can't get reliable info on non-WP-repo plugins - issue #380.
|
1688 |
+
if ( 'repo' !== $this->plugins[ $slug ]['source_type'] ) {
|
1689 |
+
return true;
|
1690 |
+
}
|
1691 |
+
|
1692 |
+
$api = $this->get_plugins_api( $slug );
|
1693 |
+
|
1694 |
+
if ( false !== $api && isset( $api->requires ) ) {
|
1695 |
+
return version_compare( $GLOBALS['wp_version'], $api->requires, '>=' );
|
1696 |
+
}
|
1697 |
+
|
1698 |
+
// No usable info received from the plugins API, presume we can update.
|
1699 |
+
return true;
|
1700 |
+
}
|
1701 |
+
|
1702 |
+
/**
|
1703 |
+
* Check if a plugin can be activated, i.e. is not currently active and meets the minimum
|
1704 |
+
* plugin version requirements set in TGMPA (if any).
|
1705 |
+
*
|
1706 |
+
* @since 2.5.0
|
1707 |
+
*
|
1708 |
+
* @param string $slug Plugin slug.
|
1709 |
+
* @return bool True if OK to activate, false otherwise.
|
1710 |
+
*/
|
1711 |
+
public function can_plugin_activate( $slug ) {
|
1712 |
+
return ( ! $this->is_plugin_active( $slug ) && ! $this->does_plugin_require_update( $slug ) );
|
1713 |
+
}
|
1714 |
+
|
1715 |
+
/**
|
1716 |
+
* Retrieve the version number of an installed plugin.
|
1717 |
+
*
|
1718 |
+
* @since 2.5.0
|
1719 |
+
*
|
1720 |
+
* @param string $slug Plugin slug.
|
1721 |
+
* @return string Version number as string or an empty string if the plugin is not installed
|
1722 |
+
* or version unknown (plugins which don't comply with the plugin header standard).
|
1723 |
+
*/
|
1724 |
+
public function get_installed_version( $slug ) {
|
1725 |
+
$installed_plugins = $this->get_plugins(); // Retrieve a list of all installed plugins (WP cached).
|
1726 |
+
|
1727 |
+
if ( ! empty( $installed_plugins[ $this->plugins[ $slug ]['file_path'] ]['Version'] ) ) {
|
1728 |
+
return $installed_plugins[ $this->plugins[ $slug ]['file_path'] ]['Version'];
|
1729 |
+
}
|
1730 |
+
|
1731 |
+
return '';
|
1732 |
+
}
|
1733 |
+
|
1734 |
+
/**
|
1735 |
+
* Check whether a plugin complies with the minimum version requirements.
|
1736 |
+
*
|
1737 |
+
* @since 2.5.0
|
1738 |
+
*
|
1739 |
+
* @param string $slug Plugin slug.
|
1740 |
+
* @return bool True when a plugin needs to be updated, otherwise false.
|
1741 |
+
*/
|
1742 |
+
public function does_plugin_require_update( $slug ) {
|
1743 |
+
$installed_version = $this->get_installed_version( $slug );
|
1744 |
+
$minimum_version = $this->plugins[ $slug ]['version'];
|
1745 |
+
|
1746 |
+
return version_compare( $minimum_version, $installed_version, '>' );
|
1747 |
+
}
|
1748 |
+
|
1749 |
+
/**
|
1750 |
+
* Check whether there is an update available for a plugin.
|
1751 |
+
*
|
1752 |
+
* @since 2.5.0
|
1753 |
+
*
|
1754 |
+
* @param string $slug Plugin slug.
|
1755 |
+
* @return false|string Version number string of the available update or false if no update available.
|
1756 |
+
*/
|
1757 |
+
public function does_plugin_have_update( $slug ) {
|
1758 |
+
// Presume bundled and external plugins will point to a package which meets the minimum required version.
|
1759 |
+
if ( 'repo' !== $this->plugins[ $slug ]['source_type'] ) {
|
1760 |
+
if ( $this->does_plugin_require_update( $slug ) ) {
|
1761 |
+
return $this->plugins[ $slug ]['version'];
|
1762 |
+
}
|
1763 |
+
|
1764 |
+
return false;
|
1765 |
+
}
|
1766 |
+
|
1767 |
+
$repo_updates = get_site_transient( 'update_plugins' );
|
1768 |
+
|
1769 |
+
if ( isset( $repo_updates->response[ $this->plugins[ $slug ]['file_path'] ]->new_version ) ) {
|
1770 |
+
return $repo_updates->response[ $this->plugins[ $slug ]['file_path'] ]->new_version;
|
1771 |
+
}
|
1772 |
+
|
1773 |
+
return false;
|
1774 |
+
}
|
1775 |
+
|
1776 |
+
/**
|
1777 |
+
* Retrieve potential upgrade notice for a plugin.
|
1778 |
+
*
|
1779 |
+
* @since 2.5.0
|
1780 |
+
*
|
1781 |
+
* @param string $slug Plugin slug.
|
1782 |
+
* @return string The upgrade notice or an empty string if no message was available or provided.
|
1783 |
+
*/
|
1784 |
+
public function get_upgrade_notice( $slug ) {
|
1785 |
+
// We currently can't get reliable info on non-WP-repo plugins - issue #380.
|
1786 |
+
if ( 'repo' !== $this->plugins[ $slug ]['source_type'] ) {
|
1787 |
+
return '';
|
1788 |
+
}
|
1789 |
+
|
1790 |
+
$repo_updates = get_site_transient( 'update_plugins' );
|
1791 |
+
|
1792 |
+
if ( ! empty( $repo_updates->response[ $this->plugins[ $slug ]['file_path'] ]->upgrade_notice ) ) {
|
1793 |
+
return $repo_updates->response[ $this->plugins[ $slug ]['file_path'] ]->upgrade_notice;
|
1794 |
+
}
|
1795 |
+
|
1796 |
+
return '';
|
1797 |
+
}
|
1798 |
+
|
1799 |
+
/**
|
1800 |
+
* Wrapper around the core WP get_plugins function, making sure it's actually available.
|
1801 |
+
*
|
1802 |
+
* @since 2.5.0
|
1803 |
+
*
|
1804 |
+
* @param string $plugin_folder Optional. Relative path to single plugin folder.
|
1805 |
+
* @return array Array of installed plugins with plugin information.
|
1806 |
+
*/
|
1807 |
+
public function get_plugins( $plugin_folder = '' ) {
|
1808 |
+
if ( ! function_exists( 'get_plugins' ) ) {
|
1809 |
+
require_once ABSPATH . 'wp-admin/includes/plugin.php';
|
1810 |
+
}
|
1811 |
+
|
1812 |
+
return get_plugins( $plugin_folder );
|
1813 |
+
}
|
1814 |
+
|
1815 |
+
/**
|
1816 |
+
* Delete dismissable nag option when theme is switched.
|
1817 |
+
*
|
1818 |
+
* This ensures that the user(s) is/are again reminded via nag of required
|
1819 |
+
* and/or recommended plugins if they re-activate the theme.
|
1820 |
+
*
|
1821 |
+
* @since 2.1.1
|
1822 |
+
*/
|
1823 |
+
public function update_dismiss() {
|
1824 |
+
delete_metadata( 'user', null, 'sp_dismissed_notice_' . $this->id, null, true );
|
1825 |
+
}
|
1826 |
+
|
1827 |
+
/**
|
1828 |
+
* Forces plugin activation if the parameter 'force_activation' is
|
1829 |
+
* set to true.
|
1830 |
+
*
|
1831 |
+
* This allows theme authors to specify certain plugins that must be
|
1832 |
+
* active at all times while using the current theme.
|
1833 |
+
*
|
1834 |
+
* Please take special care when using this parameter as it has the
|
1835 |
+
* potential to be harmful if not used correctly. Setting this parameter
|
1836 |
+
* to true will not allow the specified plugin to be deactivated unless
|
1837 |
+
* the user switches themes.
|
1838 |
+
*
|
1839 |
+
* @since 2.2.0
|
1840 |
+
*/
|
1841 |
+
public function force_activation() {
|
1842 |
+
foreach ( $this->plugins as $slug => $plugin ) {
|
1843 |
+
if ( true === $plugin['force_activation'] ) {
|
1844 |
+
if ( ! $this->is_plugin_installed( $slug ) ) {
|
1845 |
+
// Oops, plugin isn't there so iterate to next condition.
|
1846 |
+
continue;
|
1847 |
+
} elseif ( $this->can_plugin_activate( $slug ) ) {
|
1848 |
+
// There we go, activate the plugin.
|
1849 |
+
activate_plugin( $plugin['file_path'] );
|
1850 |
+
}
|
1851 |
+
}
|
1852 |
+
}
|
1853 |
+
}
|
1854 |
+
|
1855 |
+
/**
|
1856 |
+
* Forces plugin deactivation if the parameter 'force_deactivation'
|
1857 |
+
* is set to true.
|
1858 |
+
*
|
1859 |
+
* This allows theme authors to specify certain plugins that must be
|
1860 |
+
* deactivated upon switching from the current theme to another.
|
1861 |
+
*
|
1862 |
+
* Please take special care when using this parameter as it has the
|
1863 |
+
* potential to be harmful if not used correctly.
|
1864 |
+
*
|
1865 |
+
* @since 2.2.0
|
1866 |
+
*/
|
1867 |
+
public function force_deactivation() {
|
1868 |
+
foreach ( $this->plugins as $slug => $plugin ) {
|
1869 |
+
// Only proceed forward if the parameter is set to true and plugin is active.
|
1870 |
+
if ( true === $plugin['force_deactivation'] && $this->is_plugin_active( $slug ) ) {
|
1871 |
+
deactivate_plugins( $plugin['file_path'] );
|
1872 |
+
}
|
1873 |
+
}
|
1874 |
+
}
|
1875 |
+
|
1876 |
+
/**
|
1877 |
+
* Echo the current TGMPA version number to the page.
|
1878 |
+
*/
|
1879 |
+
public function show_tgmpa_version() {
|
1880 |
+
echo '<p style="float: right; padding: 0em 1.5em 0.5em 0;"><strong><small>',
|
1881 |
+
esc_html( sprintf( _x( 'TGMPA v%s', '%s = version number', 'tgmpa' ), self::TGMPA_VERSION ) ),
|
1882 |
+
'</small></strong></p>';
|
1883 |
+
}
|
1884 |
+
|
1885 |
+
/**
|
1886 |
+
* Returns the singleton instance of the class.
|
1887 |
+
*
|
1888 |
+
* @since 2.4.0
|
1889 |
+
*
|
1890 |
+
* @return object The TGM_Plugin_Activation object.
|
1891 |
+
*/
|
1892 |
+
public static function get_instance() {
|
1893 |
+
if ( ! isset( self::$instance ) && ! ( self::$instance instanceof self ) ) {
|
1894 |
+
self::$instance = new self();
|
1895 |
+
}
|
1896 |
+
|
1897 |
+
return self::$instance;
|
1898 |
+
}
|
1899 |
+
}
|
1900 |
+
|
1901 |
+
if ( ! function_exists( 'load_tgm_plugin_activation' ) ) {
|
1902 |
+
/**
|
1903 |
+
* Ensure only one instance of the class is ever invoked.
|
1904 |
+
*/
|
1905 |
+
function load_tgm_plugin_activation() {
|
1906 |
+
$GLOBALS['tgmpa'] = TGM_Plugin_Activation::get_instance();
|
1907 |
+
}
|
1908 |
+
}
|
1909 |
+
|
1910 |
+
if ( did_action( 'plugins_loaded' ) ) {
|
1911 |
+
load_tgm_plugin_activation();
|
1912 |
+
} else {
|
1913 |
+
add_action( 'plugins_loaded', 'load_tgm_plugin_activation' );
|
1914 |
+
}
|
1915 |
+
}
|
1916 |
+
|
1917 |
+
if ( ! function_exists( 'tgmpa' ) ) {
|
1918 |
+
/**
|
1919 |
+
* Helper function to register a collection of required plugins.
|
1920 |
+
*
|
1921 |
+
* @since 2.0.0
|
1922 |
+
* @api
|
1923 |
+
*
|
1924 |
+
* @param array $plugins An array of plugin arrays.
|
1925 |
+
* @param array $config Optional. An array of configuration values.
|
1926 |
+
*/
|
1927 |
+
function tgmpa( $plugins, $config = array() ) {
|
1928 |
+
$instance = call_user_func( array( get_class( $GLOBALS['tgmpa'] ), 'get_instance' ) );
|
1929 |
+
|
1930 |
+
foreach ( $plugins as $plugin ) {
|
1931 |
+
call_user_func( array( $instance, 'register' ), $plugin );
|
1932 |
+
}
|
1933 |
+
|
1934 |
+
if ( ! empty( $config ) && is_array( $config ) ) {
|
1935 |
+
// Send out notices for deprecated arguments passed.
|
1936 |
+
if ( isset( $config['notices'] ) ) {
|
1937 |
+
_deprecated_argument( __FUNCTION__, '2.2.0', 'The `notices` config parameter was renamed to `has_notices` in TGMPA 2.2.0. Please adjust your configuration.' );
|
1938 |
+
if ( ! isset( $config['has_notices'] ) ) {
|
1939 |
+
$config['has_notices'] = $config['notices'];
|
1940 |
+
}
|
1941 |
+
}
|
1942 |
+
|
1943 |
+
if ( isset( $config['parent_menu_slug'] ) ) {
|
1944 |
+
_deprecated_argument( __FUNCTION__, '2.4.0', 'The `parent_menu_slug` config parameter was removed in TGMPA 2.4.0. In TGMPA 2.5.0 an alternative was (re-)introduced. Please adjust your configuration. For more information visit the website: http://tgmpluginactivation.com/configuration/#h-configuration-options.' );
|
1945 |
+
}
|
1946 |
+
if ( isset( $config['parent_url_slug'] ) ) {
|
1947 |
+
_deprecated_argument( __FUNCTION__, '2.4.0', 'The `parent_url_slug` config parameter was removed in TGMPA 2.4.0. In TGMPA 2.5.0 an alternative was (re-)introduced. Please adjust your configuration. For more information visit the website: http://tgmpluginactivation.com/configuration/#h-configuration-options.' );
|
1948 |
+
}
|
1949 |
+
|
1950 |
+
call_user_func( array( $instance, 'config' ), $config );
|
1951 |
+
}
|
1952 |
+
}
|
1953 |
+
}
|
1954 |
+
|
1955 |
+
/**
|
1956 |
+
* WP_List_Table isn't always available. If it isn't available,
|
1957 |
+
* we load it here.
|
1958 |
+
*
|
1959 |
+
* @since 2.2.0
|
1960 |
+
*/
|
1961 |
+
if ( ! class_exists( 'WP_List_Table' ) ) {
|
1962 |
+
require_once ABSPATH . 'wp-admin/includes/class-wp-list-table.php';
|
1963 |
+
}
|
1964 |
+
|
1965 |
+
if ( ! class_exists( 'TGMPA_List_Table' ) ) {
|
1966 |
+
|
1967 |
+
/**
|
1968 |
+
* List table class for handling plugins.
|
1969 |
+
*
|
1970 |
+
* Extends the WP_List_Table class to provide a future-compatible
|
1971 |
+
* way of listing out all required/recommended plugins.
|
1972 |
+
*
|
1973 |
+
* Gives users an interface similar to the Plugin Administration
|
1974 |
+
* area with similar (albeit stripped down) capabilities.
|
1975 |
+
*
|
1976 |
+
* This class also allows for the bulk install of plugins.
|
1977 |
+
*
|
1978 |
+
* @since 2.2.0
|
1979 |
+
*
|
1980 |
+
* @package TGM-Plugin-Activation
|
1981 |
+
* @author Thomas Griffin
|
1982 |
+
* @author Gary Jones
|
1983 |
+
*/
|
1984 |
+
class TGMPA_List_Table extends WP_List_Table {
|
1985 |
+
/**
|
1986 |
+
* TGMPA instance.
|
1987 |
+
*
|
1988 |
+
* @since 2.5.0
|
1989 |
+
*
|
1990 |
+
* @var object
|
1991 |
+
*/
|
1992 |
+
protected $tgmpa;
|
1993 |
+
|
1994 |
+
/**
|
1995 |
+
* The currently chosen view.
|
1996 |
+
*
|
1997 |
+
* @since 2.5.0
|
1998 |
+
*
|
1999 |
+
* @var string One of: 'all', 'install', 'update', 'activate'
|
2000 |
+
*/
|
2001 |
+
public $view_context = 'all';
|
2002 |
+
|
2003 |
+
/**
|
2004 |
+
* The plugin counts for the various views.
|
2005 |
+
*
|
2006 |
+
* @since 2.5.0
|
2007 |
+
*
|
2008 |
+
* @var array
|
2009 |
+
*/
|
2010 |
+
protected $view_totals = array(
|
2011 |
+
'all' => 0,
|
2012 |
+
'install' => 0,
|
2013 |
+
'update' => 0,
|
2014 |
+
'activate' => 0,
|
2015 |
+
);
|
2016 |
+
|
2017 |
+
/**
|
2018 |
+
* References parent constructor and sets defaults for class.
|
2019 |
+
*
|
2020 |
+
* @since 2.2.0
|
2021 |
+
*/
|
2022 |
+
public function __construct() {
|
2023 |
+
$this->tgmpa = call_user_func( array( get_class( $GLOBALS['tgmpa'] ), 'get_instance' ) );
|
2024 |
+
|
2025 |
+
parent::__construct(
|
2026 |
+
array(
|
2027 |
+
'singular' => 'plugin',
|
2028 |
+
'plural' => 'plugins',
|
2029 |
+
'ajax' => false,
|
2030 |
+
)
|
2031 |
+
);
|
2032 |
+
|
2033 |
+
if ( isset( $_REQUEST['plugin_status'] ) && in_array( $_REQUEST['plugin_status'], array( 'install', 'update', 'activate' ), true ) ) {
|
2034 |
+
$this->view_context = sanitize_key( $_REQUEST['plugin_status'] );
|
2035 |
+
}
|
2036 |
+
|
2037 |
+
add_filter( 'tgmpa_table_data_items', array( $this, 'sort_table_items' ) );
|
2038 |
+
}
|
2039 |
+
|
2040 |
+
/**
|
2041 |
+
* Get a list of CSS classes for the <table> tag.
|
2042 |
+
*
|
2043 |
+
* Overruled to prevent the 'plural' argument from being added.
|
2044 |
+
*
|
2045 |
+
* @since 2.5.0
|
2046 |
+
*
|
2047 |
+
* @return array CSS classnames.
|
2048 |
+
*/
|
2049 |
+
public function get_table_classes() {
|
2050 |
+
return array( 'widefat', 'fixed' );
|
2051 |
+
}
|
2052 |
+
|
2053 |
+
/**
|
2054 |
+
* Gathers and renames all of our plugin information to be used by WP_List_Table to create our table.
|
2055 |
+
*
|
2056 |
+
* @since 2.2.0
|
2057 |
+
*
|
2058 |
+
* @return array $table_data Information for use in table.
|
2059 |
+
*/
|
2060 |
+
protected function _gather_plugin_data() {
|
2061 |
+
// Load thickbox for plugin links.
|
2062 |
+
$this->tgmpa->admin_init();
|
2063 |
+
$this->tgmpa->thickbox();
|
2064 |
+
|
2065 |
+
// Categorize the plugins which have open actions.
|
2066 |
+
$plugins = $this->categorize_plugins_to_views();
|
2067 |
+
|
2068 |
+
// Set the counts for the view links.
|
2069 |
+
$this->set_view_totals( $plugins );
|
2070 |
+
|
2071 |
+
// Prep variables for use and grab list of all installed plugins.
|
2072 |
+
$table_data = array();
|
2073 |
+
$i = 0;
|
2074 |
+
|
2075 |
+
// Redirect to the 'all' view if no plugins were found for the selected view context.
|
2076 |
+
if ( empty( $plugins[ $this->view_context ] ) ) {
|
2077 |
+
$this->view_context = 'all';
|
2078 |
+
}
|
2079 |
+
|
2080 |
+
foreach ( $plugins[ $this->view_context ] as $slug => $plugin ) {
|
2081 |
+
$table_data[ $i ]['sanitized_plugin'] = $plugin['name'];
|
2082 |
+
$table_data[ $i ]['slug'] = $slug;
|
2083 |
+
$table_data[ $i ]['plugin'] = '<strong>' . $this->tgmpa->get_info_link( $slug ) . '</strong>';
|
2084 |
+
$table_data[ $i ]['source'] = $this->get_plugin_source_type_text( $plugin['source_type'] );
|
2085 |
+
$table_data[ $i ]['type'] = $this->get_plugin_advise_type_text( $plugin['required'] );
|
2086 |
+
$table_data[ $i ]['status'] = $this->get_plugin_status_text( $slug );
|
2087 |
+
$table_data[ $i ]['installed_version'] = $this->tgmpa->get_installed_version( $slug );
|
2088 |
+
$table_data[ $i ]['minimum_version'] = $plugin['version'];
|
2089 |
+
$table_data[ $i ]['available_version'] = $this->tgmpa->does_plugin_have_update( $slug );
|
2090 |
+
|
2091 |
+
// Prep the upgrade notice info.
|
2092 |
+
$upgrade_notice = $this->tgmpa->get_upgrade_notice( $slug );
|
2093 |
+
if ( ! empty( $upgrade_notice ) ) {
|
2094 |
+
$table_data[ $i ]['upgrade_notice'] = $upgrade_notice;
|
2095 |
+
|
2096 |
+
add_action( "tgmpa_after_plugin_row_$slug", array( $this, 'wp_plugin_update_row' ), 10, 2 );
|
2097 |
+
}
|
2098 |
+
|
2099 |
+
$table_data[ $i ] = apply_filters( 'tgmpa_table_data_item', $table_data[ $i ], $plugin );
|
2100 |
+
|
2101 |
+
$i++;
|
2102 |
+
}
|
2103 |
+
|
2104 |
+
return $table_data;
|
2105 |
+
}
|
2106 |
+
|
2107 |
+
/**
|
2108 |
+
* Categorize the plugins which have open actions into views for the TGMPA page.
|
2109 |
+
*
|
2110 |
+
* @since 2.5.0
|
2111 |
+
*/
|
2112 |
+
protected function categorize_plugins_to_views() {
|
2113 |
+
$plugins = array(
|
2114 |
+
'all' => array(), // Meaning: all plugins which still have open actions.
|
2115 |
+
'install' => array(),
|
2116 |
+
'update' => array(),
|
2117 |
+
'activate' => array(),
|
2118 |
+
);
|
2119 |
+
|
2120 |
+
foreach ( $this->tgmpa->plugins as $slug => $plugin ) {
|
2121 |
+
if ( $this->tgmpa->is_plugin_active( $slug ) && false === $this->tgmpa->does_plugin_have_update( $slug ) ) {
|
2122 |
+
// No need to display plugins if they are installed, up-to-date and active.
|
2123 |
+
continue;
|
2124 |
+
} else {
|
2125 |
+
$plugins['all'][ $slug ] = $plugin;
|
2126 |
+
|
2127 |
+
if ( ! $this->tgmpa->is_plugin_installed( $slug ) ) {
|
2128 |
+
$plugins['install'][ $slug ] = $plugin;
|
2129 |
+
} else {
|
2130 |
+
if ( false !== $this->tgmpa->does_plugin_have_update( $slug ) ) {
|
2131 |
+
$plugins['update'][ $slug ] = $plugin;
|
2132 |
+
}
|
2133 |
+
|
2134 |
+
if ( $this->tgmpa->can_plugin_activate( $slug ) ) {
|
2135 |
+
$plugins['activate'][ $slug ] = $plugin;
|
2136 |
+
}
|
2137 |
+
}
|
2138 |
+
}
|
2139 |
+
}
|
2140 |
+
|
2141 |
+
return $plugins;
|
2142 |
+
}
|
2143 |
+
|
2144 |
+
/**
|
2145 |
+
* Set the counts for the view links.
|
2146 |
+
*
|
2147 |
+
* @since 2.5.0
|
2148 |
+
*
|
2149 |
+
* @param array $plugins Plugins order by view.
|
2150 |
+
*/
|
2151 |
+
protected function set_view_totals( $plugins ) {
|
2152 |
+
foreach ( $plugins as $type => $list ) {
|
2153 |
+
$this->view_totals[ $type ] = count( $list );
|
2154 |
+
}
|
2155 |
+
}
|
2156 |
+
|
2157 |
+
/**
|
2158 |
+
* Get the plugin required/recommended text string.
|
2159 |
+
*
|
2160 |
+
* @since 2.5.0
|
2161 |
+
*
|
2162 |
+
* @param string $required Plugin required setting.
|
2163 |
+
* @return string
|
2164 |
+
*/
|
2165 |
+
protected function get_plugin_advise_type_text( $required ) {
|
2166 |
+
if ( true === $required ) {
|
2167 |
+
return __( 'Required', 'tgmpa' );
|
2168 |
+
}
|
2169 |
+
|
2170 |
+
return __( 'Recommended', 'tgmpa' );
|
2171 |
+
}
|
2172 |
+
|
2173 |
+
/**
|
2174 |
+
* Get the plugin source type text string.
|
2175 |
+
*
|
2176 |
+
* @since 2.5.0
|
2177 |
+
*
|
2178 |
+
* @param string $type Plugin type.
|
2179 |
+
* @return string
|
2180 |
+
*/
|
2181 |
+
protected function get_plugin_source_type_text( $type ) {
|
2182 |
+
$string = '';
|
2183 |
+
|
2184 |
+
switch ( $type ) {
|
2185 |
+
case 'repo':
|
2186 |
+
$string = __( 'WordPress Repository', 'tgmpa' );
|
2187 |
+
break;
|
2188 |
+
case 'external':
|
2189 |
+
$string = __( 'External Source', 'tgmpa' );
|
2190 |
+
break;
|
2191 |
+
case 'bundled':
|
2192 |
+
$string = __( 'Pre-Packaged', 'tgmpa' );
|
2193 |
+
break;
|
2194 |
+
}
|
2195 |
+
|
2196 |
+
return $string;
|
2197 |
+
}
|
2198 |
+
|
2199 |
+
/**
|
2200 |
+
* Determine the plugin status message.
|
2201 |
+
*
|
2202 |
+
* @since 2.5.0
|
2203 |
+
*
|
2204 |
+
* @param string $slug Plugin slug.
|
2205 |
+
* @return string
|
2206 |
+
*/
|
2207 |
+
protected function get_plugin_status_text( $slug ) {
|
2208 |
+
if ( ! $this->tgmpa->is_plugin_installed( $slug ) ) {
|
2209 |
+
return __( 'Not Installed', 'tgmpa' );
|
2210 |
+
}
|
2211 |
+
|
2212 |
+
if ( ! $this->tgmpa->is_plugin_active( $slug ) ) {
|
2213 |
+
$install_status = __( 'Installed But Not Activated', 'tgmpa' );
|
2214 |
+
} else {
|
2215 |
+
$install_status = __( 'Active', 'tgmpa' );
|
2216 |
+
}
|
2217 |
+
|
2218 |
+
$update_status = '';
|
2219 |
+
|
2220 |
+
if ( $this->tgmpa->does_plugin_require_update( $slug ) && false === $this->tgmpa->does_plugin_have_update( $slug ) ) {
|
2221 |
+
$update_status = __( 'Required Update not Available', 'tgmpa' );
|
2222 |
+
|
2223 |
+
} elseif ( $this->tgmpa->does_plugin_require_update( $slug ) ) {
|
2224 |
+
$update_status = __( 'Requires Update', 'tgmpa' );
|
2225 |
+
|
2226 |
+
} elseif ( false !== $this->tgmpa->does_plugin_have_update( $slug ) ) {
|
2227 |
+
$update_status = __( 'Update recommended', 'tgmpa' );
|
2228 |
+
}
|
2229 |
+
|
2230 |
+
if ( '' === $update_status ) {
|
2231 |
+
return $install_status;
|
2232 |
+
}
|
2233 |
+
|
2234 |
+
return sprintf(
|
2235 |
+
_x( '%1$s, %2$s', '%1$s = install status, %2$s = update status', 'tgmpa' ),
|
2236 |
+
$install_status,
|
2237 |
+
$update_status
|
2238 |
+
);
|
2239 |
+
}
|
2240 |
+
|
2241 |
+
/**
|
2242 |
+
* Sort plugins by Required/Recommended type and by alphabetical plugin name within each type.
|
2243 |
+
*
|
2244 |
+
* @since 2.5.0
|
2245 |
+
*
|
2246 |
+
* @param array $items Prepared table items.
|
2247 |
+
* @return array Sorted table items.
|
2248 |
+
*/
|
2249 |
+
public function sort_table_items( $items ) {
|
2250 |
+
$type = array();
|
2251 |
+
$name = array();
|
2252 |
+
|
2253 |
+
foreach ( $items as $i => $plugin ) {
|
2254 |
+
$type[ $i ] = $plugin['type']; // Required / recommended.
|
2255 |
+
$name[ $i ] = $plugin['sanitized_plugin'];
|
2256 |
+
}
|
2257 |
+
|
2258 |
+
array_multisort( $type, SORT_DESC, $name, SORT_ASC, $items );
|
2259 |
+
|
2260 |
+
return $items;
|
2261 |
+
}
|
2262 |
+
|
2263 |
+
/**
|
2264 |
+
* Get an associative array ( id => link ) of the views available on this table.
|
2265 |
+
*
|
2266 |
+
* @since 2.5.0
|
2267 |
+
*
|
2268 |
+
* @return array
|
2269 |
+
*/
|
2270 |
+
public function get_views() {
|
2271 |
+
$status_links = array();
|
2272 |
+
|
2273 |
+
foreach ( $this->view_totals as $type => $count ) {
|
2274 |
+
if ( $count < 1 ) {
|
2275 |
+
continue;
|
2276 |
+
}
|
2277 |
+
|
2278 |
+
switch ( $type ) {
|
2279 |
+
case 'all':
|
2280 |
+
$text = _nx( 'All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $count, 'plugins', 'tgmpa' );
|
2281 |
+
break;
|
2282 |
+
case 'install':
|
2283 |
+
$text = _n( 'To Install <span class="count">(%s)</span>', 'To Install <span class="count">(%s)</span>', $count, 'tgmpa' );
|
2284 |
+
break;
|
2285 |
+
case 'update':
|
2286 |
+
$text = _n( 'Update Available <span class="count">(%s)</span>', 'Update Available <span class="count">(%s)</span>', $count, 'tgmpa' );
|
2287 |
+
break;
|
2288 |
+
case 'activate':
|
2289 |
+
$text = _n( 'To Activate <span class="count">(%s)</span>', 'To Activate <span class="count">(%s)</span>', $count, 'tgmpa' );
|
2290 |
+
break;
|
2291 |
+
default:
|
2292 |
+
$text = '';
|
2293 |
+
break;
|
2294 |
+
}
|
2295 |
+
|
2296 |
+
if ( ! empty( $text ) ) {
|
2297 |
+
|
2298 |
+
$status_links[ $type ] = sprintf(
|
2299 |
+
'<a href="%s"%s>%s</a>',
|
2300 |
+
esc_url( $this->tgmpa->get_tgmpa_status_url( $type ) ),
|
2301 |
+
( $type === $this->view_context ) ? ' class="current"' : '',
|
2302 |
+
sprintf( $text, number_format_i18n( $count ) )
|
2303 |
+
);
|
2304 |
+
}
|
2305 |
+
}
|
2306 |
+
|
2307 |
+
return $status_links;
|
2308 |
+
}
|
2309 |
+
|
2310 |
+
/**
|
2311 |
+
* Create default columns to display important plugin information
|
2312 |
+
* like type, action and status.
|
2313 |
+
*
|
2314 |
+
* @since 2.2.0
|
2315 |
+
*
|
2316 |
+
* @param array $item Array of item data.
|
2317 |
+
* @param string $column_name The name of the column.
|
2318 |
+
* @return string
|
2319 |
+
*/
|
2320 |
+
public function column_default( $item, $column_name ) {
|
2321 |
+
return $item[ $column_name ];
|
2322 |
+
}
|
2323 |
+
|
2324 |
+
/**
|
2325 |
+
* Required for bulk installing.
|
2326 |
+
*
|
2327 |
+
* Adds a checkbox for each plugin.
|
2328 |
+
*
|
2329 |
+
* @since 2.2.0
|
2330 |
+
*
|
2331 |
+
* @param array $item Array of item data.
|
2332 |
+
* @return string The input checkbox with all necessary info.
|
2333 |
+
*/
|
2334 |
+
public function column_cb( $item ) {
|
2335 |
+
return sprintf(
|
2336 |
+
'<input type="checkbox" name="%1$s[]" value="%2$s" id="%3$s" />',
|
2337 |
+
esc_attr( $this->_args['singular'] ),
|
2338 |
+
esc_attr( $item['slug'] ),
|
2339 |
+
esc_attr( $item['sanitized_plugin'] )
|
2340 |
+
);
|
2341 |
+
}
|
2342 |
+
|
2343 |
+
/**
|
2344 |
+
* Create default title column along with the action links.
|
2345 |
+
*
|
2346 |
+
* @since 2.2.0
|
2347 |
+
*
|
2348 |
+
* @param array $item Array of item data.
|
2349 |
+
* @return string The plugin name and action links.
|
2350 |
+
*/
|
2351 |
+
public function column_plugin( $item ) {
|
2352 |
+
return sprintf(
|
2353 |
+
'%1$s %2$s',
|
2354 |
+
$item['plugin'],
|
2355 |
+
$this->row_actions( $this->get_row_actions( $item ), true )
|
2356 |
+
);
|
2357 |
+
}
|
2358 |
+
|
2359 |
+
/**
|
2360 |
+
* Create version information column.
|
2361 |
+
*
|
2362 |
+
* @since 2.5.0
|
2363 |
+
*
|
2364 |
+
* @param array $item Array of item data.
|
2365 |
+
* @return string HTML-formatted version information.
|
2366 |
+
*/
|
2367 |
+
public function column_version( $item ) {
|
2368 |
+
$output = array();
|
2369 |
+
|
2370 |
+
if ( $this->tgmpa->is_plugin_installed( $item['slug'] ) ) {
|
2371 |
+
$installed = ! empty( $item['installed_version'] ) ? $item['installed_version'] : _x( 'unknown', 'as in: "version nr unknown"', 'tgmpa' );
|
2372 |
+
|
2373 |
+
$color = '';
|
2374 |
+
if ( ! empty( $item['minimum_version'] ) && $this->tgmpa->does_plugin_require_update( $item['slug'] ) ) {
|
2375 |
+
$color = ' color: #ff0000; font-weight: bold;';
|
2376 |
+
}
|
2377 |
+
|
2378 |
+
$output[] = sprintf(
|
2379 |
+
'<p><span style="min-width: 32px; text-align: right; float: right;%1$s">%2$s</span>' . __( 'Installed version:', 'tgmpa' ) . '</p>',
|
2380 |
+
$color,
|
2381 |
+
$installed
|
2382 |
+
);
|
2383 |
+
}
|
2384 |
+
|
2385 |
+
if ( ! empty( $item['minimum_version'] ) ) {
|
2386 |
+
$output[] = sprintf(
|
2387 |
+
'<p><span style="min-width: 32px; text-align: right; float: right;">%1$s</span>' . __( 'Minimum required version:', 'tgmpa' ) . '</p>',
|
2388 |
+
$item['minimum_version']
|
2389 |
+
);
|
2390 |
+
}
|
2391 |
+
|
2392 |
+
if ( ! empty( $item['available_version'] ) ) {
|
2393 |
+
$color = '';
|
2394 |
+
if ( ! empty( $item['minimum_version'] ) && version_compare( $item['available_version'], $item['minimum_version'], '>=' ) ) {
|
2395 |
+
$color = ' color: #71C671; font-weight: bold;';
|
2396 |
+
}
|
2397 |
+
|
2398 |
+
$output[] = sprintf(
|
2399 |
+
'<p><span style="min-width: 32px; text-align: right; float: right;%1$s">%2$s</span>' . __( 'Available version:', 'tgmpa' ) . '</p>',
|
2400 |
+
$color,
|
2401 |
+
$item['available_version']
|
2402 |
+
);
|
2403 |
+
}
|
2404 |
+
|
2405 |
+
if ( empty( $output ) ) {
|
2406 |
+
return ' '; // Let's not break the table layout.
|
2407 |
+
} else {
|
2408 |
+
return implode( "\n", $output );
|
2409 |
+
}
|
2410 |
+
}
|
2411 |
+
|
2412 |
+
/**
|
2413 |
+
* Sets default message within the plugins table if no plugins
|
2414 |
+
* are left for interaction.
|
2415 |
+
*
|
2416 |
+
* Hides the menu item to prevent the user from clicking and
|
2417 |
+
* getting a permissions error.
|
2418 |
+
*
|
2419 |
+
* @since 2.2.0
|
2420 |
+
*/
|
2421 |
+
public function no_items() {
|
2422 |
+
printf( wp_kses_post( __( 'No plugins to install, update or activate. <a href="%1$s">Return to the Dashboard</a>', 'tgmpa' ) ), esc_url( self_admin_url() ) );
|
2423 |
+
echo '<style type="text/css">#adminmenu .wp-submenu li.current { display: none !important; }</style>';
|
2424 |
+
}
|
2425 |
+
|
2426 |
+
/**
|
2427 |
+
* Output all the column information within the table.
|
2428 |
+
*
|
2429 |
+
* @since 2.2.0
|
2430 |
+
*
|
2431 |
+
* @return array $columns The column names.
|
2432 |
+
*/
|
2433 |
+
public function get_columns() {
|
2434 |
+
$columns = array(
|
2435 |
+
'cb' => '<input type="checkbox" />',
|
2436 |
+
'plugin' => __( 'Plugin', 'tgmpa' ),
|
2437 |
+
'source' => __( 'Source', 'tgmpa' ),
|
2438 |
+
'type' => __( 'Type', 'tgmpa' ),
|
2439 |
+
);
|
2440 |
+
|
2441 |
+
if ( 'all' === $this->view_context || 'update' === $this->view_context ) {
|
2442 |
+
$columns['version'] = __( 'Version', 'tgmpa' );
|
2443 |
+
$columns['status'] = __( 'Status', 'tgmpa' );
|
2444 |
+
}
|
2445 |
+
|
2446 |
+
return apply_filters( 'tgmpa_table_columns', $columns );
|
2447 |
+
}
|
2448 |
+
|
2449 |
+
/**
|
2450 |
+
* Get name of default primary column
|
2451 |
+
*
|
2452 |
+
* @since 2.5.0 / WP 4.3+ compatibility
|
2453 |
+
* @access protected
|
2454 |
+
*
|
2455 |
+
* @return string
|
2456 |
+
*/
|
2457 |
+
protected function get_default_primary_column_name() {
|
2458 |
+
return 'plugin';
|
2459 |
+
}
|
2460 |
+
|
2461 |
+
/**
|
2462 |
+
* Get the name of the primary column.
|
2463 |
+
*
|
2464 |
+
* @since 2.5.0 / WP 4.3+ compatibility
|
2465 |
+
* @access protected
|
2466 |
+
*
|
2467 |
+
* @return string The name of the primary column.
|
2468 |
+
*/
|
2469 |
+
protected function get_primary_column_name() {
|
2470 |
+
if ( method_exists( 'WP_List_Table', 'get_primary_column_name' ) ) {
|
2471 |
+
return parent::get_primary_column_name();
|
2472 |
+
} else {
|
2473 |
+
return $this->get_default_primary_column_name();
|
2474 |
+
}
|
2475 |
+
}
|
2476 |
+
|
2477 |
+
/**
|
2478 |
+
* Get the actions which are relevant for a specific plugin row.
|
2479 |
+
*
|
2480 |
+
* @since 2.5.0
|
2481 |
+
*
|
2482 |
+
* @param array $item Array of item data.
|
2483 |
+
* @return array Array with relevant action links.
|
2484 |
+
*/
|
2485 |
+
protected function get_row_actions( $item ) {
|
2486 |
+
$actions = array();
|
2487 |
+
$action_links = array();
|
2488 |
+
|
2489 |
+
// Display the 'Install' action link if the plugin is not yet available.
|
2490 |
+
if ( ! $this->tgmpa->is_plugin_installed( $item['slug'] ) ) {
|
2491 |
+
$actions['install'] = _x( 'Install %2$s', '%2$s = plugin name in screen reader markup', 'tgmpa' );
|
2492 |
+
} else {
|
2493 |
+
// Display the 'Update' action link if an update is available and WP complies with plugin minimum.
|
2494 |
+
if ( false !== $this->tgmpa->does_plugin_have_update( $item['slug'] ) && $this->tgmpa->can_plugin_update( $item['slug'] ) ) {
|
2495 |
+
$actions['update'] = _x( 'Update %2$s', '%2$s = plugin name in screen reader markup', 'tgmpa' );
|
2496 |
+
}
|
2497 |
+
|
2498 |
+
// Display the 'Activate' action link, but only if the plugin meets the minimum version.
|
2499 |
+
if ( $this->tgmpa->can_plugin_activate( $item['slug'] ) ) {
|
2500 |
+
$actions['activate'] = _x( 'Activate %2$s', '%2$s = plugin name in screen reader markup', 'tgmpa' );
|
2501 |
+
}
|
2502 |
+
}
|
2503 |
+
|
2504 |
+
// Create the actual links.
|
2505 |
+
foreach ( $actions as $action => $text ) {
|
2506 |
+
$nonce_url = wp_nonce_url(
|
2507 |
+
add_query_arg(
|
2508 |
+
array(
|
2509 |
+
'plugin' => urlencode( $item['slug'] ),
|
2510 |
+
'tgmpa-' . $action => $action . '-plugin',
|
2511 |
+
),
|
2512 |
+
$this->tgmpa->get_tgmpa_url()
|
2513 |
+
),
|
2514 |
+
'tgmpa-' . $action,
|
2515 |
+
'tgmpa-nonce'
|
2516 |
+
);
|
2517 |
+
|
2518 |
+
$action_links[ $action ] = sprintf(
|
2519 |
+
'<a href="%1$s">' . esc_html( $text ) . '</a>',
|
2520 |
+
esc_url( $nonce_url ),
|
2521 |
+
'<span class="screen-reader-text">' . esc_html( $item['sanitized_plugin'] ) . '</span>'
|
2522 |
+
);
|
2523 |
+
}
|
2524 |
+
|
2525 |
+
$prefix = ( defined( 'WP_NETWORK_ADMIN' ) && WP_NETWORK_ADMIN ) ? 'network_admin_' : '';
|
2526 |
+
return apply_filters( "tgmpa_{$prefix}plugin_action_links", array_filter( $action_links ), $item['slug'], $item, $this->view_context );
|
2527 |
+
}
|
2528 |
+
|
2529 |
+
/**
|
2530 |
+
* Generates content for a single row of the table.
|
2531 |
+
*
|
2532 |
+
* @since 2.5.0
|
2533 |
+
*
|
2534 |
+
* @param object $item The current item.
|
2535 |
+
*/
|
2536 |
+
public function single_row( $item ) {
|
2537 |
+
parent::single_row( $item );
|
2538 |
+
|
2539 |
+
/**
|
2540 |
+
* Fires after each specific row in the TGMPA Plugins list table.
|
2541 |
+
*
|
2542 |
+
* The dynamic portion of the hook name, `$item['slug']`, refers to the slug
|
2543 |
+
* for the plugin.
|
2544 |
+
*
|
2545 |
+
* @since 2.5.0
|
2546 |
+
*/
|
2547 |
+
do_action( "tgmpa_after_plugin_row_{$item['slug']}", $item['slug'], $item, $this->view_context );
|
2548 |
+
}
|
2549 |
+
|
2550 |
+
/**
|
2551 |
+
* Show the upgrade notice below a plugin row if there is one.
|
2552 |
+
*
|
2553 |
+
* @since 2.5.0
|
2554 |
+
*
|
2555 |
+
* @see /wp-admin/includes/update.php
|
2556 |
+
*
|
2557 |
+
* @param string $slug Plugin slug.
|
2558 |
+
* @param array $item The information available in this table row.
|
2559 |
+
* @return null Return early if upgrade notice is empty.
|
2560 |
+
*/
|
2561 |
+
public function wp_plugin_update_row( $slug, $item ) {
|
2562 |
+
if ( empty( $item['upgrade_notice'] ) ) {
|
2563 |
+
return;
|
2564 |
+
}
|
2565 |
+
|
2566 |
+
echo '
|
2567 |
+
<tr class="plugin-update-tr">
|
2568 |
+
<td colspan="', absint( $this->get_column_count() ), '" class="plugin-update colspanchange">
|
2569 |
+
<div class="update-message">',
|
2570 |
+
esc_html__( 'Upgrade message from the plugin author:', 'tgmpa' ),
|
2571 |
+
' <strong>', wp_kses_data( $item['upgrade_notice'] ), '</strong>
|
2572 |
+
</div>
|
2573 |
+
</td>
|
2574 |
+
</tr>';
|
2575 |
+
}
|
2576 |
+
|
2577 |
+
/**
|
2578 |
+
* Extra controls to be displayed between bulk actions and pagination.
|
2579 |
+
*
|
2580 |
+
* @since 2.5.0
|
2581 |
+
*
|
2582 |
+
* @param string $which 'top' or 'bottom' table navigation.
|
2583 |
+
*/
|
2584 |
+
public function extra_tablenav( $which ) {
|
2585 |
+
if ( 'bottom' === $which ) {
|
2586 |
+
$this->tgmpa->show_tgmpa_version();
|
2587 |
+
}
|
2588 |
+
}
|
2589 |
+
|
2590 |
+
/**
|
2591 |
+
* Defines the bulk actions for handling registered plugins.
|
2592 |
+
*
|
2593 |
+
* @since 2.2.0
|
2594 |
+
*
|
2595 |
+
* @return array $actions The bulk actions for the plugin install table.
|
2596 |
+
*/
|
2597 |
+
public function get_bulk_actions() {
|
2598 |
+
|
2599 |
+
$actions = array();
|
2600 |
+
|
2601 |
+
if ( 'update' !== $this->view_context && 'activate' !== $this->view_context ) {
|
2602 |
+
if ( current_user_can( 'install_plugins' ) ) {
|
2603 |
+
$actions['tgmpa-bulk-install'] = __( 'Install', 'tgmpa' );
|
2604 |
+
}
|
2605 |
+
}
|
2606 |
+
|
2607 |
+
if ( 'install' !== $this->view_context ) {
|
2608 |
+
if ( current_user_can( 'update_plugins' ) ) {
|
2609 |
+
$actions['tgmpa-bulk-update'] = __( 'Update', 'tgmpa' );
|
2610 |
+
}
|
2611 |
+
if ( current_user_can( 'activate_plugins' ) ) {
|
2612 |
+
$actions['tgmpa-bulk-activate'] = __( 'Activate', 'tgmpa' );
|
2613 |
+
}
|
2614 |
+
}
|
2615 |
+
|
2616 |
+
return $actions;
|
2617 |
+
}
|
2618 |
+
|
2619 |
+
/**
|
2620 |
+
* Processes bulk installation and activation actions.
|
2621 |
+
*
|
2622 |
+
* The bulk installation process looks for the $_POST information and passes that
|
2623 |
+
* through if a user has to use WP_Filesystem to enter their credentials.
|
2624 |
+
*
|
2625 |
+
* @since 2.2.0
|
2626 |
+
*/
|
2627 |
+
public function process_bulk_actions() {
|
2628 |
+
// Bulk installation process.
|
2629 |
+
if ( 'tgmpa-bulk-install' === $this->current_action() || 'tgmpa-bulk-update' === $this->current_action() ) {
|
2630 |
+
|
2631 |
+
check_admin_referer( 'bulk-' . $this->_args['plural'] );
|
2632 |
+
|
2633 |
+
$install_type = 'install';
|
2634 |
+
if ( 'tgmpa-bulk-update' === $this->current_action() ) {
|
2635 |
+
$install_type = 'update';
|
2636 |
+
}
|
2637 |
+
|
2638 |
+
$plugins_to_install = array();
|
2639 |
+
|
2640 |
+
// Did user actually select any plugins to install/update ?
|
2641 |
+
if ( empty( $_POST['plugin'] ) ) {
|
2642 |
+
if ( 'install' === $install_type ) {
|
2643 |
+
$message = __( 'No plugins were selected to be installed. No action taken.', 'tgmpa' );
|
2644 |
+
} else {
|
2645 |
+
$message = __( 'No plugins were selected to be updated. No action taken.', 'tgmpa' );
|
2646 |
+
}
|
2647 |
+
|
2648 |
+
echo '<div id="message" class="error"><p>', esc_html( $message ), '</p></div>';
|
2649 |
+
|
2650 |
+
return false;
|
2651 |
+
}
|
2652 |
+
|
2653 |
+
if ( is_array( $_POST['plugin'] ) ) {
|
2654 |
+
$plugins_to_install = (array) $_POST['plugin'];
|
2655 |
+
} elseif ( is_string( $_POST['plugin'] ) ) {
|
2656 |
+
// Received via Filesystem page - un-flatten array (WP bug #19643).
|
2657 |
+
$plugins_to_install = explode( ',', $_POST['plugin'] );
|
2658 |
+
}
|
2659 |
+
|
2660 |
+
// Sanitize the received input.
|
2661 |
+
$plugins_to_install = array_map( 'urldecode', $plugins_to_install );
|
2662 |
+
$plugins_to_install = array_map( array( $this->tgmpa, 'sanitize_key' ), $plugins_to_install );
|
2663 |
+
|
2664 |
+
// Validate the received input.
|
2665 |
+
foreach ( $plugins_to_install as $key => $slug ) {
|
2666 |
+
// Check if the plugin was registered with TGMPA and remove if not.
|
2667 |
+
if ( ! isset( $this->tgmpa->plugins[ $slug ] ) ) {
|
2668 |
+
unset( $plugins_to_install[ $key ] );
|
2669 |
+
continue;
|
2670 |
+
}
|
2671 |
+
|
2672 |
+
// For updates: make sure this is a plugin we *can* update (update available and WP version ok).
|
2673 |
+
if ( 'update' === $install_type && ( $this->tgmpa->is_plugin_installed( $slug ) && ( false === $this->tgmpa->does_plugin_have_update( $slug ) || ! $this->tgmpa->can_plugin_update( $slug ) ) ) ) {
|
2674 |
+
unset( $plugins_to_install[ $key ] );
|
2675 |
+
}
|
2676 |
+
}
|
2677 |
+
|
2678 |
+
// No need to proceed further if we have no plugins to handle.
|
2679 |
+
if ( empty( $plugins_to_install ) ) {
|
2680 |
+
if ( 'install' === $install_type ) {
|
2681 |
+
$message = __( 'No plugins are available to be installed at this time.', 'tgmpa' );
|
2682 |
+
} else {
|
2683 |
+
$message = __( 'No plugins are available to be updated at this time.', 'tgmpa' );
|
2684 |
+
}
|
2685 |
+
|
2686 |
+
echo '<div id="message" class="error"><p>', esc_html( $message ), '</p></div>';
|
2687 |
+
|
2688 |
+
return false;
|
2689 |
+
}
|
2690 |
+
|
2691 |
+
// Pass all necessary information if WP_Filesystem is needed.
|
2692 |
+
$url = wp_nonce_url(
|
2693 |
+
$this->tgmpa->get_tgmpa_url(),
|
2694 |
+
'bulk-' . $this->_args['plural']
|
2695 |
+
);
|
2696 |
+
|
2697 |
+
// Give validated data back to $_POST which is the only place the filesystem looks for extra fields.
|
2698 |
+
$_POST['plugin'] = implode( ',', $plugins_to_install ); // Work around for WP bug #19643.
|
2699 |
+
|
2700 |
+
$method = ''; // Leave blank so WP_Filesystem can populate it as necessary.
|
2701 |
+
$fields = array_keys( $_POST ); // Extra fields to pass to WP_Filesystem.
|
2702 |
+
|
2703 |
+
if ( false === ( $creds = request_filesystem_credentials( esc_url_raw( $url ), $method, false, false, $fields ) ) ) {
|
2704 |
+
return true; // Stop the normal page form from displaying, credential request form will be shown.
|
2705 |
+
}
|
2706 |
+
|
2707 |
+
// Now we have some credentials, setup WP_Filesystem.
|
2708 |
+
if ( ! WP_Filesystem( $creds ) ) {
|
2709 |
+
// Our credentials were no good, ask the user for them again.
|
2710 |
+
request_filesystem_credentials( esc_url_raw( $url ), $method, true, false, $fields );
|
2711 |
+
|
2712 |
+
return true;
|
2713 |
+
}
|
2714 |
+
|
2715 |
+
/* If we arrive here, we have the filesystem */
|
2716 |
+
|
2717 |
+
// Store all information in arrays since we are processing a bulk installation.
|
2718 |
+
$names = array();
|
2719 |
+
$sources = array(); // Needed for installs.
|
2720 |
+
$file_paths = array(); // Needed for upgrades.
|
2721 |
+
$to_inject = array(); // Information to inject into the update_plugins transient.
|
2722 |
+
|
2723 |
+
// Prepare the data for validated plugins for the install/upgrade.
|
2724 |
+
foreach ( $plugins_to_install as $slug ) {
|
2725 |
+
$name = $this->tgmpa->plugins[ $slug ]['name'];
|
2726 |
+
$source = $this->tgmpa->get_download_url( $slug );
|
2727 |
+
|
2728 |
+
if ( ! empty( $name ) && ! empty( $source ) ) {
|
2729 |
+
$names[] = $name;
|
2730 |
+
|
2731 |
+
switch ( $install_type ) {
|
2732 |
+
|
2733 |
+
case 'install':
|
2734 |
+
$sources[] = $source;
|
2735 |
+
break;
|
2736 |
+
|
2737 |
+
case 'update':
|
2738 |
+
$file_paths[] = $this->tgmpa->plugins[ $slug ]['file_path'];
|
2739 |
+
$to_inject[ $slug ] = $this->tgmpa->plugins[ $slug ];
|
2740 |
+
$to_inject[ $slug ]['source'] = $source;
|
2741 |
+
break;
|
2742 |
+
}
|
2743 |
+
}
|
2744 |
+
}
|
2745 |
+
unset( $slug, $name, $source );
|
2746 |
+
|
2747 |
+
// Create a new instance of TGMPA_Bulk_Installer.
|
2748 |
+
$installer = new TGMPA_Bulk_Installer(
|
2749 |
+
new TGMPA_Bulk_Installer_Skin(
|
2750 |
+
array(
|
2751 |
+
'url' => esc_url_raw( $this->tgmpa->get_tgmpa_url() ),
|
2752 |
+
'nonce' => 'bulk-' . $this->_args['plural'],
|
2753 |
+
'names' => $names,
|
2754 |
+
'install_type' => $install_type,
|
2755 |
+
)
|
2756 |
+
)
|
2757 |
+
);
|
2758 |
+
|
2759 |
+
// Wrap the install process with the appropriate HTML.
|
2760 |
+
echo '<div class="tgmpa wrap">',
|
2761 |
+
'<h2>', esc_html( get_admin_page_title() ), '</h2>';
|
2762 |
+
|
2763 |
+
// Process the bulk installation submissions.
|
2764 |
+
add_filter( 'upgrader_source_selection', array( $this->tgmpa, 'maybe_adjust_source_dir' ), 1, 3 );
|
2765 |
+
|
2766 |
+
if ( 'tgmpa-bulk-update' === $this->current_action() ) {
|
2767 |
+
// Inject our info into the update transient.
|
2768 |
+
$this->tgmpa->inject_update_info( $to_inject );
|
2769 |
+
|
2770 |
+
$installer->bulk_upgrade( $file_paths );
|
2771 |
+
} else {
|
2772 |
+
$installer->bulk_install( $sources );
|
2773 |
+
}
|
2774 |
+
|
2775 |
+
remove_filter( 'upgrader_source_selection', array( $this->tgmpa, 'maybe_adjust_source_dir' ), 1, 3 );
|
2776 |
+
|
2777 |
+
echo '</div>';
|
2778 |
+
|
2779 |
+
return true;
|
2780 |
+
}
|
2781 |
+
|
2782 |
+
// Bulk activation process.
|
2783 |
+
if ( 'tgmpa-bulk-activate' === $this->current_action() ) {
|
2784 |
+
check_admin_referer( 'bulk-' . $this->_args['plural'] );
|
2785 |
+
|
2786 |
+
// Did user actually select any plugins to activate ?
|
2787 |
+
if ( empty( $_POST['plugin'] ) ) {
|
2788 |
+
echo '<div id="message" class="error"><p>', esc_html__( 'No plugins were selected to be activated. No action taken.', 'tgmpa' ), '</p></div>';
|
2789 |
+
|
2790 |
+
return false;
|
2791 |
+
}
|
2792 |
+
|
2793 |
+
// Grab plugin data from $_POST.
|
2794 |
+
$plugins = array();
|
2795 |
+
if ( isset( $_POST['plugin'] ) ) {
|
2796 |
+
$plugins = array_map( 'urldecode', (array) $_POST['plugin'] );
|
2797 |
+
$plugins = array_map( array( $this->tgmpa, 'sanitize_key' ), $plugins );
|
2798 |
+
}
|
2799 |
+
|
2800 |
+
$plugins_to_activate = array();
|
2801 |
+
$plugin_names = array();
|
2802 |
+
|
2803 |
+
// Grab the file paths for the selected & inactive plugins from the registration array.
|
2804 |
+
foreach ( $plugins as $slug ) {
|
2805 |
+
if ( $this->tgmpa->can_plugin_activate( $slug ) ) {
|
2806 |
+
$plugins_to_activate[] = $this->tgmpa->plugins[ $slug ]['file_path'];
|
2807 |
+
$plugin_names[] = $this->tgmpa->plugins[ $slug ]['name'];
|
2808 |
+
}
|
2809 |
+
}
|
2810 |
+
unset( $slug );
|
2811 |
+
|
2812 |
+
// Return early if there are no plugins to activate.
|
2813 |
+
if ( empty( $plugins_to_activate ) ) {
|
2814 |
+
echo '<div id="message" class="error"><p>', esc_html__( 'No plugins are available to be activated at this time.', 'tgmpa' ), '</p></div>';
|
2815 |
+
|
2816 |
+
return false;
|
2817 |
+
}
|
2818 |
+
|
2819 |
+
// Now we are good to go - let's start activating plugins.
|
2820 |
+
$activate = activate_plugins( $plugins_to_activate );
|
2821 |
+
|
2822 |
+
if ( is_wp_error( $activate ) ) {
|
2823 |
+
echo '<div id="message" class="error"><p>', wp_kses_post( $activate->get_error_message() ), '</p></div>';
|
2824 |
+
} else {
|
2825 |
+
$count = count( $plugin_names ); // Count so we can use _n function.
|
2826 |
+
$plugin_names = array_map( array( 'TGMPA_Utils', 'wrap_in_strong' ), $plugin_names );
|
2827 |
+
$last_plugin = array_pop( $plugin_names ); // Pop off last name to prep for readability.
|
2828 |
+
$imploded = empty( $plugin_names ) ? $last_plugin : ( implode( ', ', $plugin_names ) . ' ' . esc_html_x( 'and', 'plugin A *and* plugin B', 'tgmpa' ) . ' ' . $last_plugin );
|
2829 |
+
|
2830 |
+
printf( // WPCS: xss ok.
|
2831 |
+
'<div id="message" class="updated"><p>%1$s %2$s.</p></div>',
|
2832 |
+
esc_html( _n( 'The following plugin was activated successfully:', 'The following plugins were activated successfully:', $count, 'tgmpa' ) ),
|
2833 |
+
$imploded
|
2834 |
+
);
|
2835 |
+
|
2836 |
+
// Update recently activated plugins option.
|
2837 |
+
$recent = (array) get_option( 'recently_activated' );
|
2838 |
+
foreach ( $plugins_to_activate as $plugin => $time ) {
|
2839 |
+
if ( isset( $recent[ $plugin ] ) ) {
|
2840 |
+
unset( $recent[ $plugin ] );
|
2841 |
+
}
|
2842 |
+
}
|
2843 |
+
update_option( 'recently_activated', $recent );
|
2844 |
+
}
|
2845 |
+
|
2846 |
+
unset( $_POST ); // Reset the $_POST variable in case user wants to perform one action after another.
|
2847 |
+
|
2848 |
+
return true;
|
2849 |
+
}
|
2850 |
+
|
2851 |
+
return false;
|
2852 |
+
}
|
2853 |
+
|
2854 |
+
/**
|
2855 |
+
* Prepares all of our information to be outputted into a usable table.
|
2856 |
+
*
|
2857 |
+
* @since 2.2.0
|
2858 |
+
*/
|
2859 |
+
public function prepare_items() {
|
2860 |
+
$columns = $this->get_columns(); // Get all necessary column information.
|
2861 |
+
$hidden = array(); // No columns to hide, but we must set as an array.
|
2862 |
+
$sortable = array(); // No reason to make sortable columns.
|
2863 |
+
$primary = $this->get_primary_column_name(); // Column which has the row actions.
|
2864 |
+
$this->_column_headers = array( $columns, $hidden, $sortable, $primary ); // Get all necessary column headers.
|
2865 |
+
|
2866 |
+
// Process our bulk activations here.
|
2867 |
+
if ( 'tgmpa-bulk-activate' === $this->current_action() ) {
|
2868 |
+
$this->process_bulk_actions();
|
2869 |
+
}
|
2870 |
+
|
2871 |
+
// Store all of our plugin data into $items array so WP_List_Table can use it.
|
2872 |
+
$this->items = apply_filters( 'tgmpa_table_data_items', $this->_gather_plugin_data() );
|
2873 |
+
}
|
2874 |
+
|
2875 |
+
/* *********** DEPRECATED METHODS *********** */
|
2876 |
+
|
2877 |
+
/**
|
2878 |
+
* Retrieve plugin data, given the plugin name.
|
2879 |
+
*
|
2880 |
+
* @since 2.2.0
|
2881 |
+
* @deprecated 2.5.0 use {@see TGM_Plugin_Activation::_get_plugin_data_from_name()} instead.
|
2882 |
+
* @see TGM_Plugin_Activation::_get_plugin_data_from_name()
|
2883 |
+
*
|
2884 |
+
* @param string $name Name of the plugin, as it was registered.
|
2885 |
+
* @param string $data Optional. Array key of plugin data to return. Default is slug.
|
2886 |
+
* @return string|boolean Plugin slug if found, false otherwise.
|
2887 |
+
*/
|
2888 |
+
protected function _get_plugin_data_from_name( $name, $data = 'slug' ) {
|
2889 |
+
_deprecated_function( __FUNCTION__, 'TGMPA 2.5.0', 'TGM_Plugin_Activation::_get_plugin_data_from_name()' );
|
2890 |
+
|
2891 |
+
return $this->tgmpa->_get_plugin_data_from_name( $name, $data );
|
2892 |
+
}
|
2893 |
+
}
|
2894 |
+
}
|
2895 |
+
|
2896 |
+
|
2897 |
+
if ( ! class_exists( 'TGM_Bulk_Installer' ) ) {
|
2898 |
+
|
2899 |
+
/**
|
2900 |
+
* Hack: Prevent TGMPA v2.4.1- bulk installer class from being loaded if 2.4.1- is loaded after 2.5+.
|
2901 |
+
*/
|
2902 |
+
class TGM_Bulk_Installer {
|
2903 |
+
}
|
2904 |
+
}
|
2905 |
+
if ( ! class_exists( 'TGM_Bulk_Installer_Skin' ) ) {
|
2906 |
+
|
2907 |
+
/**
|
2908 |
+
* Hack: Prevent TGMPA v2.4.1- bulk installer skin class from being loaded if 2.4.1- is loaded after 2.5+.
|
2909 |
+
*/
|
2910 |
+
class TGM_Bulk_Installer_Skin {
|
2911 |
+
}
|
2912 |
+
}
|
2913 |
+
|
2914 |
+
/**
|
2915 |
+
* The WP_Upgrader file isn't always available. If it isn't available,
|
2916 |
+
* we load it here.
|
2917 |
+
*
|
2918 |
+
* We check to make sure no action or activation keys are set so that WordPress
|
2919 |
+
* does not try to re-include the class when processing upgrades or installs outside
|
2920 |
+
* of the class.
|
2921 |
+
*
|
2922 |
+
* @since 2.2.0
|
2923 |
+
*/
|
2924 |
+
add_action( 'admin_init', 'tgmpa_load_bulk_installer' );
|
2925 |
+
if ( ! function_exists( 'tgmpa_load_bulk_installer' ) ) {
|
2926 |
+
/**
|
2927 |
+
* Load bulk installer
|
2928 |
+
*/
|
2929 |
+
function tgmpa_load_bulk_installer() {
|
2930 |
+
// Silently fail if 2.5+ is loaded *after* an older version.
|
2931 |
+
if ( ! isset( $GLOBALS['tgmpa'] ) ) {
|
2932 |
+
return;
|
2933 |
+
}
|
2934 |
+
|
2935 |
+
// Get TGMPA class instance.
|
2936 |
+
$tgmpa_instance = call_user_func( array( get_class( $GLOBALS['tgmpa'] ), 'get_instance' ) );
|
2937 |
+
|
2938 |
+
if ( isset( $_GET['page'] ) && $tgmpa_instance->menu === $_GET['page'] ) {
|
2939 |
+
if ( ! class_exists( 'Plugin_Upgrader', false ) ) {
|
2940 |
+
require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
|
2941 |
+
}
|
2942 |
+
|
2943 |
+
if ( ! class_exists( 'TGMPA_Bulk_Installer' ) ) {
|
2944 |
+
|
2945 |
+
/**
|
2946 |
+
* Installer class to handle bulk plugin installations.
|
2947 |
+
*
|
2948 |
+
* Extends WP_Upgrader and customizes to suit the installation of multiple
|
2949 |
+
* plugins.
|
2950 |
+
*
|
2951 |
+
* @since 2.2.0
|
2952 |
+
*
|
2953 |
+
* @internal Since 2.5.0 the class is an extension of Plugin_Upgrader rather than WP_Upgrader
|
2954 |
+
* @internal Since 2.5.2 the class has been renamed from TGM_Bulk_Installer to TGMPA_Bulk_Installer.
|
2955 |
+
* This was done to prevent backward compatibility issues with v2.3.6.
|
2956 |
+
*
|
2957 |
+
* @package TGM-Plugin-Activation
|
2958 |
+
* @author Thomas Griffin
|
2959 |
+
* @author Gary Jones
|
2960 |
+
*/
|
2961 |
+
class TGMPA_Bulk_Installer extends Plugin_Upgrader {
|
2962 |
+
/**
|
2963 |
+
* Holds result of bulk plugin installation.
|
2964 |
+
*
|
2965 |
+
* @since 2.2.0
|
2966 |
+
*
|
2967 |
+
* @var string
|
2968 |
+
*/
|
2969 |
+
public $result;
|
2970 |
+
|
2971 |
+
/**
|
2972 |
+
* Flag to check if bulk installation is occurring or not.
|
2973 |
+
*
|
2974 |
+
* @since 2.2.0
|
2975 |
+
*
|
2976 |
+
* @var boolean
|
2977 |
+
*/
|
2978 |
+
public $bulk = false;
|
2979 |
+
|
2980 |
+
/**
|
2981 |
+
* TGMPA instance
|
2982 |
+
*
|
2983 |
+
* @since 2.5.0
|
2984 |
+
*
|
2985 |
+
* @var object
|
2986 |
+
*/
|
2987 |
+
protected $tgmpa;
|
2988 |
+
|
2989 |
+
/**
|
2990 |
+
* Whether or not the destination directory needs to be cleared ( = on update).
|
2991 |
+
*
|
2992 |
+
* @since 2.5.0
|
2993 |
+
*
|
2994 |
+
* @var bool
|
2995 |
+
*/
|
2996 |
+
protected $clear_destination = false;
|
2997 |
+
|
2998 |
+
/**
|
2999 |
+
* References parent constructor and sets defaults for class.
|
3000 |
+
*
|
3001 |
+
* @since 2.2.0
|
3002 |
+
*
|
3003 |
+
* @param \Bulk_Upgrader_Skin|null $skin Installer skin.
|
3004 |
+
*/
|
3005 |
+
public function __construct( $skin = null ) {
|
3006 |
+
// Get TGMPA class instance.
|
3007 |
+
$this->tgmpa = call_user_func( array( get_class( $GLOBALS['tgmpa'] ), 'get_instance' ) );
|
3008 |
+
|
3009 |
+
parent::__construct( $skin );
|
3010 |
+
|
3011 |
+
if ( isset( $this->skin->options['install_type'] ) && 'update' === $this->skin->options['install_type'] ) {
|
3012 |
+
$this->clear_destination = true;
|
3013 |
+
}
|
3014 |
+
|
3015 |
+
if ( $this->tgmpa->is_automatic ) {
|
3016 |
+
$this->activate_strings();
|
3017 |
+
}
|
3018 |
+
|
3019 |
+
add_action( 'upgrader_process_complete', array( $this->tgmpa, 'populate_file_path' ) );
|
3020 |
+
}
|
3021 |
+
|
3022 |
+
/**
|
3023 |
+
* Sets the correct activation strings for the installer skin to use.
|
3024 |
+
*
|
3025 |
+
* @since 2.2.0
|
3026 |
+
*/
|
3027 |
+
public function activate_strings() {
|
3028 |
+
$this->strings['activation_failed'] = __( 'Plugin activation failed.', 'tgmpa' );
|
3029 |
+
$this->strings['activation_success'] = __( 'Plugin activated successfully.', 'tgmpa' );
|
3030 |
+
}
|
3031 |
+
|
3032 |
+
/**
|
3033 |
+
* Performs the actual installation of each plugin.
|
3034 |
+
*
|
3035 |
+
* @since 2.2.0
|
3036 |
+
*
|
3037 |
+
* @see WP_Upgrader::run()
|
3038 |
+
*
|
3039 |
+
* @param array $options The installation config options.
|
3040 |
+
* @return null|array Return early if error, array of installation data on success.
|
3041 |
+
*/
|
3042 |
+
public function run( $options ) {
|
3043 |
+
$result = parent::run( $options );
|
3044 |
+
|
3045 |
+
// Reset the strings in case we changed one during automatic activation.
|
3046 |
+
if ( $this->tgmpa->is_automatic ) {
|
3047 |
+
if ( 'update' === $this->skin->options['install_type'] ) {
|
3048 |
+
$this->upgrade_strings();
|
3049 |
+
} else {
|
3050 |
+
$this->install_strings();
|
3051 |
+
}
|
3052 |
+
}
|
3053 |
+
|
3054 |
+
return $result;
|
3055 |
+
}
|
3056 |
+
|
3057 |
+
/**
|
3058 |
+
* Processes the bulk installation of plugins.
|
3059 |
+
*
|
3060 |
+
* @since 2.2.0
|
3061 |
+
*
|
3062 |
+
* @internal This is basically a near identical copy of the WP Core Plugin_Upgrader::bulk_upgrade()
|
3063 |
+
* method, with minor adjustments to deal with new installs instead of upgrades.
|
3064 |
+
* For ease of future synchronizations, the adjustments are clearly commented, but no other
|
3065 |
+
* comments are added. Code style has been made to comply.
|
3066 |
+
*
|
3067 |
+
* @see Plugin_Upgrader::bulk_upgrade()
|
3068 |
+
* @see https://core.trac.wordpress.org/browser/tags/4.2.1/src/wp-admin/includes/class-wp-upgrader.php#L838
|
3069 |
+
*
|
3070 |
+
* @param array $plugins The plugin sources needed for installation.
|
3071 |
+
* @param array $args Arbitrary passed extra arguments.
|
3072 |
+
* @return string|bool Install confirmation messages on success, false on failure.
|
3073 |
+
*/
|
3074 |
+
public function bulk_install( $plugins, $args = array() ) {
|
3075 |
+
// [TGMPA + ] Hook auto-activation in.
|
3076 |
+
add_filter( 'upgrader_post_install', array( $this, 'auto_activate' ), 10 );
|
3077 |
+
|
3078 |
+
$defaults = array(
|
3079 |
+
'clear_update_cache' => true,
|
3080 |
+
);
|
3081 |
+
$parsed_args = wp_parse_args( $args, $defaults );
|
3082 |
+
|
3083 |
+
$this->init();
|
3084 |
+
$this->bulk = true;
|
3085 |
+
|
3086 |
+
$this->install_strings(); // [TGMPA + ] adjusted.
|
3087 |
+
|
3088 |
+
/* [TGMPA - ] $current = get_site_transient( 'update_plugins' ); */
|
3089 |
+
|
3090 |
+
/* [TGMPA - ] add_filter('upgrader_clear_destination', array($this, 'delete_old_plugin'), 10, 4); */
|
3091 |
+
|
3092 |
+
$this->skin->header();
|
3093 |
+
|
3094 |
+
// Connect to the Filesystem first.
|
3095 |
+
$res = $this->fs_connect( array( WP_CONTENT_DIR, WP_PLUGIN_DIR ) );
|
3096 |
+
if ( ! $res ) {
|
3097 |
+
$this->skin->footer();
|
3098 |
+
|
3099 |
+
return false;
|
3100 |
+
}
|
3101 |
+
|
3102 |
+
$this->skin->bulk_header();
|
3103 |
+
|
3104 |
+
// Only start maintenance mode if:
|
3105 |
+
// - running Multisite and there are one or more plugins specified, OR
|
3106 |
+
// - a plugin with an update available is currently active.
|
3107 |
+
// @TODO: For multisite, maintenance mode should only kick in for individual sites if at all possible.
|
3108 |
+
$maintenance = ( is_multisite() && ! empty( $plugins ) );
|
3109 |
+
|
3110 |
+
/*
|
3111 |
+
[TGMPA - ]
|
3112 |
+
foreach ( $plugins as $plugin )
|
3113 |
+
$maintenance = $maintenance || ( is_plugin_active( $plugin ) && isset( $current->response[ $plugin] ) );
|
3114 |
+
*/
|
3115 |
+
if ( $maintenance ) {
|
3116 |
+
$this->maintenance_mode( true );
|
3117 |
+
}
|
3118 |
+
|
3119 |
+
$results = array();
|
3120 |
+
|
3121 |
+
$this->update_count = count( $plugins );
|
3122 |
+
$this->update_current = 0;
|
3123 |
+
foreach ( $plugins as $plugin ) {
|
3124 |
+
$this->update_current++;
|
3125 |
+
|
3126 |
+
/*
|
3127 |
+
[TGMPA - ]
|
3128 |
+
$this->skin->plugin_info = get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin, false, true);
|
3129 |
+
|
3130 |
+
if ( !isset( $current->response[ $plugin ] ) ) {
|
3131 |
+
$this->skin->set_result('up_to_date');
|
3132 |
+
$this->skin->before();
|
3133 |
+
$this->skin->feedback('up_to_date');
|
3134 |
+
$this->skin->after();
|
3135 |
+
$results[$plugin] = true;
|
3136 |
+
continue;
|
3137 |
+
}
|
3138 |
+
|
3139 |
+
// Get the URL to the zip file
|
3140 |
+
$r = $current->response[ $plugin ];
|
3141 |
+
|
3142 |
+
$this->skin->plugin_active = is_plugin_active($plugin);
|
3143 |
+
*/
|
3144 |
+
|
3145 |
+
$result = $this->run( array(
|
3146 |
+
'package' => $plugin, // [TGMPA + ] adjusted.
|
3147 |
+
'destination' => WP_PLUGIN_DIR,
|
3148 |
+
'clear_destination' => false, // [TGMPA + ] adjusted.
|
3149 |
+
'clear_working' => true,
|
3150 |
+
'is_multi' => true,
|
3151 |
+
'hook_extra' => array(
|
3152 |
+
'plugin' => $plugin,
|
3153 |
+
),
|
3154 |
+
) );
|
3155 |
+
|
3156 |
+
$results[ $plugin ] = $this->result;
|
3157 |
+
|
3158 |
+
// Prevent credentials auth screen from displaying multiple times.
|
3159 |
+
if ( false === $result ) {
|
3160 |
+
break;
|
3161 |
+
}
|
3162 |
+
} //end foreach $plugins
|
3163 |
+
|
3164 |
+
$this->maintenance_mode( false );
|
3165 |
+
|
3166 |
+
/**
|
3167 |
+
* Fires when the bulk upgrader process is complete.
|
3168 |
+
*
|
3169 |
+
* @since WP 3.6.0 / TGMPA 2.5.0
|
3170 |
+
*
|
3171 |
+
* @param Plugin_Upgrader $this Plugin_Upgrader instance. In other contexts, $this, might
|
3172 |
+
* be a Theme_Upgrader or Core_Upgrade instance.
|
3173 |
+
* @param array $data {
|
3174 |
+
* Array of bulk item update data.
|
3175 |
+
*
|
3176 |
+
* @type string $action Type of action. Default 'update'.
|
3177 |
+
* @type string $type Type of update process. Accepts 'plugin', 'theme', or 'core'.
|
3178 |
+
* @type bool $bulk Whether the update process is a bulk update. Default true.
|
3179 |
+
* @type array $packages Array of plugin, theme, or core packages to update.
|
3180 |
+
* }
|
3181 |
+
*/
|
3182 |
+
do_action( 'upgrader_process_complete', $this, array(
|
3183 |
+
'action' => 'install', // [TGMPA + ] adjusted.
|
3184 |
+
'type' => 'plugin',
|
3185 |
+
'bulk' => true,
|
3186 |
+
'plugins' => $plugins,
|
3187 |
+
) );
|
3188 |
+
|
3189 |
+
$this->skin->bulk_footer();
|
3190 |
+
|
3191 |
+
$this->skin->footer();
|
3192 |
+
|
3193 |
+
// Cleanup our hooks, in case something else does a upgrade on this connection.
|
3194 |
+
/* [TGMPA - ] remove_filter('upgrader_clear_destination', array($this, 'delete_old_plugin')); */
|
3195 |
+
|
3196 |
+
// [TGMPA + ] Remove our auto-activation hook.
|
3197 |
+
remove_filter( 'upgrader_post_install', array( $this, 'auto_activate' ), 10 );
|
3198 |
+
|
3199 |
+
// Force refresh of plugin update information.
|
3200 |
+
wp_clean_plugins_cache( $parsed_args['clear_update_cache'] );
|
3201 |
+
|
3202 |
+
return $results;
|
3203 |
+
}
|
3204 |
+
|
3205 |
+
/**
|
3206 |
+
* Handle a bulk upgrade request.
|
3207 |
+
*
|
3208 |
+
* @since 2.5.0
|
3209 |
+
*
|
3210 |
+
* @see Plugin_Upgrader::bulk_upgrade()
|
3211 |
+
*
|
3212 |
+
* @param array $plugins The local WP file_path's of the plugins which should be upgraded.
|
3213 |
+
* @param array $args Arbitrary passed extra arguments.
|
3214 |
+
* @return string|bool Install confirmation messages on success, false on failure.
|
3215 |
+
*/
|
3216 |
+
public function bulk_upgrade( $plugins, $args = array() ) {
|
3217 |
+
|
3218 |
+
add_filter( 'upgrader_post_install', array( $this, 'auto_activate' ), 10 );
|
3219 |
+
|
3220 |
+
$result = parent::bulk_upgrade( $plugins, $args );
|
3221 |
+
|
3222 |
+
remove_filter( 'upgrader_post_install', array( $this, 'auto_activate' ), 10 );
|
3223 |
+
|
3224 |
+
return $result;
|
3225 |
+
}
|
3226 |
+
|
3227 |
+
/**
|
3228 |
+
* Abuse a filter to auto-activate plugins after installation.
|
3229 |
+
*
|
3230 |
+
* Hooked into the 'upgrader_post_install' filter hook.
|
3231 |
+
*
|
3232 |
+
* @since 2.5.0
|
3233 |
+
*
|
3234 |
+
* @param bool $bool The value we need to give back (true).
|
3235 |
+
* @return bool
|
3236 |
+
*/
|
3237 |
+
public function auto_activate( $bool ) {
|
3238 |
+
// Only process the activation of installed plugins if the automatic flag is set to true.
|
3239 |
+
if ( $this->tgmpa->is_automatic ) {
|
3240 |
+
// Flush plugins cache so the headers of the newly installed plugins will be read correctly.
|
3241 |
+
wp_clean_plugins_cache();
|
3242 |
+
|
3243 |
+
// Get the installed plugin file.
|
3244 |
+
$plugin_info = $this->plugin_info();
|
3245 |
+
|
3246 |
+
// Don't try to activate on upgrade of active plugin as WP will do this already.
|
3247 |
+
if ( ! is_plugin_active( $plugin_info ) ) {
|
3248 |
+
$activate = activate_plugin( $plugin_info );
|
3249 |
+
|
3250 |
+
// Adjust the success string based on the activation result.
|
3251 |
+
$this->strings['process_success'] = $this->strings['process_success'] . "<br />\n";
|
3252 |
+
|
3253 |
+
if ( is_wp_error( $activate ) ) {
|
3254 |
+
$this->skin->error( $activate );
|
3255 |
+
$this->strings['process_success'] .= $this->strings['activation_failed'];
|
3256 |
+
} else {
|
3257 |
+
$this->strings['process_success'] .= $this->strings['activation_success'];
|
3258 |
+
}
|
3259 |
+
}
|
3260 |
+
}
|
3261 |
+
|
3262 |
+
return $bool;
|
3263 |
+
}
|
3264 |
+
}
|
3265 |
+
}
|
3266 |
+
|
3267 |
+
if ( ! class_exists( 'TGMPA_Bulk_Installer_Skin' ) ) {
|
3268 |
+
|
3269 |
+
/**
|
3270 |
+
* Installer skin to set strings for the bulk plugin installations..
|
3271 |
+
*
|
3272 |
+
* Extends Bulk_Upgrader_Skin and customizes to suit the installation of multiple
|
3273 |
+
* plugins.
|
3274 |
+
*
|
3275 |
+
* @since 2.2.0
|
3276 |
+
*
|
3277 |
+
* @internal Since 2.5.2 the class has been renamed from TGM_Bulk_Installer_Skin to
|
3278 |
+
* TGMPA_Bulk_Installer_Skin.
|
3279 |
+
* This was done to prevent backward compatibility issues with v2.3.6.
|
3280 |
+
*
|
3281 |
+
* @see https://core.trac.wordpress.org/browser/trunk/src/wp-admin/includes/class-wp-upgrader-skins.php
|
3282 |
+
*
|
3283 |
+
* @package TGM-Plugin-Activation
|
3284 |
+
* @author Thomas Griffin
|
3285 |
+
* @author Gary Jones
|
3286 |
+
*/
|
3287 |
+
class TGMPA_Bulk_Installer_Skin extends Bulk_Upgrader_Skin {
|
3288 |
+
/**
|
3289 |
+
* Holds plugin info for each individual plugin installation.
|
3290 |
+
*
|
3291 |
+
* @since 2.2.0
|
3292 |
+
*
|
3293 |
+
* @var array
|
3294 |
+
*/
|
3295 |
+
public $plugin_info = array();
|
3296 |
+
|
3297 |
+
/**
|
3298 |
+
* Holds names of plugins that are undergoing bulk installations.
|
3299 |
+
*
|
3300 |
+
* @since 2.2.0
|
3301 |
+
*
|
3302 |
+
* @var array
|
3303 |
+
*/
|
3304 |
+
public $plugin_names = array();
|
3305 |
+
|
3306 |
+
/**
|
3307 |
+
* Integer to use for iteration through each plugin installation.
|
3308 |
+
*
|
3309 |
+
* @since 2.2.0
|
3310 |
+
*
|
3311 |
+
* @var integer
|
3312 |
+
*/
|
3313 |
+
public $i = 0;
|
3314 |
+
|
3315 |
+
/**
|
3316 |
+
* TGMPA instance
|
3317 |
+
*
|
3318 |
+
* @since 2.5.0
|
3319 |
+
*
|
3320 |
+
* @var object
|
3321 |
+
*/
|
3322 |
+
protected $tgmpa;
|
3323 |
+
|
3324 |
+
/**
|
3325 |
+
* Constructor. Parses default args with new ones and extracts them for use.
|
3326 |
+
*
|
3327 |
+
* @since 2.2.0
|
3328 |
+
*
|
3329 |
+
* @param array $args Arguments to pass for use within the class.
|
3330 |
+
*/
|
3331 |
+
public function __construct( $args = array() ) {
|
3332 |
+
// Get TGMPA class instance.
|
3333 |
+
$this->tgmpa = call_user_func( array( get_class( $GLOBALS['tgmpa'] ), 'get_instance' ) );
|
3334 |
+
|
3335 |
+
// Parse default and new args.
|
3336 |
+
$defaults = array(
|
3337 |
+
'url' => '',
|
3338 |
+
'nonce' => '',
|
3339 |
+
'names' => array(),
|
3340 |
+
'install_type' => 'install',
|
3341 |
+
);
|
3342 |
+
$args = wp_parse_args( $args, $defaults );
|
3343 |
+
|
3344 |
+
// Set plugin names to $this->plugin_names property.
|
3345 |
+
$this->plugin_names = $args['names'];
|
3346 |
+
|
3347 |
+
// Extract the new args.
|
3348 |
+
parent::__construct( $args );
|
3349 |
+
}
|
3350 |
+
|
3351 |
+
/**
|
3352 |
+
* Sets install skin strings for each individual plugin.
|
3353 |
+
*
|
3354 |
+
* Checks to see if the automatic activation flag is set and uses the
|
3355 |
+
* the proper strings accordingly.
|
3356 |
+
*
|
3357 |
+
* @since 2.2.0
|
3358 |
+
*/
|
3359 |
+
public function add_strings() {
|
3360 |
+
if ( 'update' === $this->options['install_type'] ) {
|
3361 |
+
parent::add_strings();
|
3362 |
+
$this->upgrader->strings['skin_before_update_header'] = __( 'Updating Plugin %1$s (%2$d/%3$d)', 'tgmpa' );
|
3363 |
+
} else {
|
3364 |
+
$this->upgrader->strings['skin_update_failed_error'] = __( 'An error occurred while installing %1$s: <strong>%2$s</strong>.', 'tgmpa' );
|
3365 |
+
$this->upgrader->strings['skin_update_failed'] = __( 'The installation of %1$s failed.', 'tgmpa' );
|
3366 |
+
|
3367 |
+
if ( $this->tgmpa->is_automatic ) {
|
3368 |
+
// Automatic activation strings.
|
3369 |
+
$this->upgrader->strings['skin_upgrade_start'] = __( 'The installation and activation process is starting. This process may take a while on some hosts, so please be patient.', 'tgmpa' );
|
3370 |
+
$this->upgrader->strings['skin_update_successful'] = __( '%1$s installed and activated successfully.', 'tgmpa' ) . ' <a href="#" class="hide-if-no-js" onclick="%2$s"><span>' . esc_html__( 'Show Details', 'tgmpa' ) . '</span><span class="hidden">' . esc_html__( 'Hide Details', 'tgmpa' ) . '</span>.</a>';
|
3371 |
+
$this->upgrader->strings['skin_upgrade_end'] = __( 'All installations and activations have been completed.', 'tgmpa' );
|
3372 |
+
$this->upgrader->strings['skin_before_update_header'] = __( 'Installing and Activating Plugin %1$s (%2$d/%3$d)', 'tgmpa' );
|
3373 |
+
} else {
|
3374 |
+
// Default installation strings.
|
3375 |
+
$this->upgrader->strings['skin_upgrade_start'] = __( 'The installation process is starting. This process may take a while on some hosts, so please be patient.', 'tgmpa' );
|
3376 |
+
$this->upgrader->strings['skin_update_successful'] = esc_html__( '%1$s installed successfully.', 'tgmpa' ) . ' <a href="#" class="hide-if-no-js" onclick="%2$s"><span>' . esc_html__( 'Show Details', 'tgmpa' ) . '</span><span class="hidden">' . esc_html__( 'Hide Details', 'tgmpa' ) . '</span>.</a>';
|
3377 |
+
$this->upgrader->strings['skin_upgrade_end'] = __( 'All installations have been completed.', 'tgmpa' );
|
3378 |
+
$this->upgrader->strings['skin_before_update_header'] = __( 'Installing Plugin %1$s (%2$d/%3$d)', 'tgmpa' );
|
3379 |
+
}
|
3380 |
+
}
|
3381 |
+
}
|
3382 |
+
|
3383 |
+
/**
|
3384 |
+
* Outputs the header strings and necessary JS before each plugin installation.
|
3385 |
+
*
|
3386 |
+
* @since 2.2.0
|
3387 |
+
*
|
3388 |
+
* @param string $title Unused in this implementation.
|
3389 |
+
*/
|
3390 |
+
public function before( $title = '' ) {
|
3391 |
+
if ( empty( $title ) ) {
|
3392 |
+
$title = esc_html( $this->plugin_names[ $this->i ] );
|
3393 |
+
}
|
3394 |
+
parent::before( $title );
|
3395 |
+
}
|
3396 |
+
|
3397 |
+
/**
|
3398 |
+
* Outputs the footer strings and necessary JS after each plugin installation.
|
3399 |
+
*
|
3400 |
+
* Checks for any errors and outputs them if they exist, else output
|
3401 |
+
* success strings.
|
3402 |
+
*
|
3403 |
+
* @since 2.2.0
|
3404 |
+
*
|
3405 |
+
* @param string $title Unused in this implementation.
|
3406 |
+
*/
|
3407 |
+
public function after( $title = '' ) {
|
3408 |
+
if ( empty( $title ) ) {
|
3409 |
+
$title = esc_html( $this->plugin_names[ $this->i ] );
|
3410 |
+
}
|
3411 |
+
parent::after( $title );
|
3412 |
+
|
3413 |
+
$this->i++;
|
3414 |
+
}
|
3415 |
+
|
3416 |
+
/**
|
3417 |
+
* Outputs links after bulk plugin installation is complete.
|
3418 |
+
*
|
3419 |
+
* @since 2.2.0
|
3420 |
+
*/
|
3421 |
+
public function bulk_footer() {
|
3422 |
+
// Serve up the string to say installations (and possibly activations) are complete.
|
3423 |
+
parent::bulk_footer();
|
3424 |
+
|
3425 |
+
// Flush plugins cache so we can make sure that the installed plugins list is always up to date.
|
3426 |
+
wp_clean_plugins_cache();
|
3427 |
+
|
3428 |
+
$this->tgmpa->show_tgmpa_version();
|
3429 |
+
|
3430 |
+
// Display message based on if all plugins are now active or not.
|
3431 |
+
$update_actions = array();
|
3432 |
+
|
3433 |
+
if ( $this->tgmpa->is_tgmpa_complete() ) {
|
3434 |
+
// All plugins are active, so we display the complete string and hide the menu to protect users.
|
3435 |
+
echo '<style type="text/css">#adminmenu .wp-submenu li.current { display: none !important; }</style>';
|
3436 |
+
$update_actions['dashboard'] = sprintf(
|
3437 |
+
esc_html( $this->tgmpa->strings['complete'] ),
|
3438 |
+
'<a href="' . esc_url( self_admin_url() ) . '">' . esc_html__( 'Return to the Dashboard', 'tgmpa' ) . '</a>'
|
3439 |
+
);
|
3440 |
+
} else {
|
3441 |
+
$update_actions['tgmpa_page'] = '<a href="' . esc_url( $this->tgmpa->get_tgmpa_url() ) . '" target="_parent">' . esc_html( $this->tgmpa->strings['return'] ) . '</a>';
|
3442 |
+
}
|
3443 |
+
|
3444 |
+
/**
|
3445 |
+
* Filter the list of action links available following bulk plugin installs/updates.
|
3446 |
+
*
|
3447 |
+
* @since 2.5.0
|
3448 |
+
*
|
3449 |
+
* @param array $update_actions Array of plugin action links.
|
3450 |
+
* @param array $plugin_info Array of information for the last-handled plugin.
|
3451 |
+
*/
|
3452 |
+
$update_actions = apply_filters( 'tgmpa_update_bulk_plugins_complete_actions', $update_actions, $this->plugin_info );
|
3453 |
+
|
3454 |
+
if ( ! empty( $update_actions ) ) {
|
3455 |
+
$this->feedback( implode( ' | ', (array) $update_actions ) );
|
3456 |
+
}
|
3457 |
+
}
|
3458 |
+
|
3459 |
+
/* *********** DEPRECATED METHODS *********** */
|
3460 |
+
|
3461 |
+
/**
|
3462 |
+
* Flush header output buffer.
|
3463 |
+
*
|
3464 |
+
* @since 2.2.0
|
3465 |
+
* @deprecated 2.5.0 use {@see Bulk_Upgrader_Skin::flush_output()} instead
|
3466 |
+
* @see Bulk_Upgrader_Skin::flush_output()
|
3467 |
+
*/
|
3468 |
+
public function before_flush_output() {
|
3469 |
+
_deprecated_function( __FUNCTION__, 'TGMPA 2.5.0', 'Bulk_Upgrader_Skin::flush_output()' );
|
3470 |
+
$this->flush_output();
|
3471 |
+
}
|
3472 |
+
|
3473 |
+
/**
|
3474 |
+
* Flush footer output buffer and iterate $this->i to make sure the
|
3475 |
+
* installation strings reference the correct plugin.
|
3476 |
+
*
|
3477 |
+
* @since 2.2.0
|
3478 |
+
* @deprecated 2.5.0 use {@see Bulk_Upgrader_Skin::flush_output()} instead
|
3479 |
+
* @see Bulk_Upgrader_Skin::flush_output()
|
3480 |
+
*/
|
3481 |
+
public function after_flush_output() {
|
3482 |
+
_deprecated_function( __FUNCTION__, 'TGMPA 2.5.0', 'Bulk_Upgrader_Skin::flush_output()' );
|
3483 |
+
$this->flush_output();
|
3484 |
+
$this->i++;
|
3485 |
+
}
|
3486 |
+
}
|
3487 |
+
}
|
3488 |
+
}
|
3489 |
+
}
|
3490 |
+
}
|
3491 |
+
|
3492 |
+
if ( ! class_exists( 'TGMPA_Utils' ) ) {
|
3493 |
+
|
3494 |
+
/**
|
3495 |
+
* Generic utilities for TGMPA.
|
3496 |
+
*
|
3497 |
+
* All methods are static, poor-dev name-spacing class wrapper.
|
3498 |
+
*
|
3499 |
+
* Class was called TGM_Utils in 2.5.0 but renamed TGMPA_Utils in 2.5.1 as this was conflicting with Soliloquy.
|
3500 |
+
*
|
3501 |
+
* @since 2.5.0
|
3502 |
+
*
|
3503 |
+
* @package TGM-Plugin-Activation
|
3504 |
+
* @author Juliette Reinders Folmer
|
3505 |
+
*/
|
3506 |
+
class TGMPA_Utils {
|
3507 |
+
/**
|
3508 |
+
* Whether the PHP filter extension is enabled.
|
3509 |
+
*
|
3510 |
+
* @see http://php.net/book.filter
|
3511 |
+
*
|
3512 |
+
* @since 2.5.0
|
3513 |
+
*
|
3514 |
+
* @static
|
3515 |
+
*
|
3516 |
+
* @var bool $has_filters True is the extension is enabled.
|
3517 |
+
*/
|
3518 |
+
public static $has_filters;
|
3519 |
+
|
3520 |
+
/**
|
3521 |
+
* Wrap an arbitrary string in <em> tags. Meant to be used in combination with array_map().
|
3522 |
+
*
|
3523 |
+
* @since 2.5.0
|
3524 |
+
*
|
3525 |
+
* @static
|
3526 |
+
*
|
3527 |
+
* @param string $string Text to be wrapped.
|
3528 |
+
* @return string
|
3529 |
+
*/
|
3530 |
+
public static function wrap_in_em( $string ) {
|
3531 |
+
return '<em>' . wp_kses_post( $string ) . '</em>';
|
3532 |
+
}
|
3533 |
+
|
3534 |
+
/**
|
3535 |
+
* Wrap an arbitrary string in <strong> tags. Meant to be used in combination with array_map().
|
3536 |
+
*
|
3537 |
+
* @since 2.5.0
|
3538 |
+
*
|
3539 |
+
* @static
|
3540 |
+
*
|
3541 |
+
* @param string $string Text to be wrapped.
|
3542 |
+
* @return string
|
3543 |
+
*/
|
3544 |
+
public static function wrap_in_strong( $string ) {
|
3545 |
+
return '<strong>' . wp_kses_post( $string ) . '</strong>';
|
3546 |
+
}
|
3547 |
+
|
3548 |
+
/**
|
3549 |
+
* Helper function: Validate a value as boolean
|
3550 |
+
*
|
3551 |
+
* @since 2.5.0
|
3552 |
+
*
|
3553 |
+
* @static
|
3554 |
+
*
|
3555 |
+
* @param mixed $value Arbitrary value.
|
3556 |
+
* @return bool
|
3557 |
+
*/
|
3558 |
+
public static function validate_bool( $value ) {
|
3559 |
+
if ( ! isset( self::$has_filters ) ) {
|
3560 |
+
self::$has_filters = extension_loaded( 'filter' );
|
3561 |
+
}
|
3562 |
+
|
3563 |
+
if ( self::$has_filters ) {
|
3564 |
+
return filter_var( $value, FILTER_VALIDATE_BOOLEAN );
|
3565 |
+
} else {
|
3566 |
+
return self::emulate_filter_bool( $value );
|
3567 |
+
}
|
3568 |
+
}
|
3569 |
+
|
3570 |
+
/**
|
3571 |
+
* Helper function: Cast a value to bool
|
3572 |
+
*
|
3573 |
+
* @since 2.5.0
|
3574 |
+
*
|
3575 |
+
* @static
|
3576 |
+
*
|
3577 |
+
* @param mixed $value Value to cast.
|
3578 |
+
* @return bool
|
3579 |
+
*/
|
3580 |
+
protected static function emulate_filter_bool( $value ) {
|
3581 |
+
// @codingStandardsIgnoreStart
|
3582 |
+
static $true = array(
|
3583 |
+
'1',
|
3584 |
+
'true', 'True', 'TRUE',
|
3585 |
+
'y', 'Y',
|
3586 |
+
'yes', 'Yes', 'YES',
|
3587 |
+
'on', 'On', 'ON',
|
3588 |
+
);
|
3589 |
+
static $false = array(
|
3590 |
+
'0',
|
3591 |
+
'false', 'False', 'FALSE',
|
3592 |
+
'n', 'N',
|
3593 |
+
'no', 'No', 'NO',
|
3594 |
+
'off', 'Off', 'OFF',
|
3595 |
+
);
|
3596 |
+
// @codingStandardsIgnoreEnd
|
3597 |
+
|
3598 |
+
if ( is_bool( $value ) ) {
|
3599 |
+
return $value;
|
3600 |
+
} else if ( is_int( $value ) && ( 0 === $value || 1 === $value ) ) {
|
3601 |
+
return (bool) $value;
|
3602 |
+
} else if ( ( is_float( $value ) && ! is_nan( $value ) ) && ( (float) 0 === $value || (float) 1 === $value ) ) {
|
3603 |
+
return (bool) $value;
|
3604 |
+
} else if ( is_string( $value ) ) {
|
3605 |
+
$value = trim( $value );
|
3606 |
+
if ( in_array( $value, $true, true ) ) {
|
3607 |
+
return true;
|
3608 |
+
} else if ( in_array( $value, $false, true ) ) {
|
3609 |
+
return false;
|
3610 |
+
} else {
|
3611 |
+
return false;
|
3612 |
+
}
|
3613 |
+
}
|
3614 |
+
|
3615 |
+
return false;
|
3616 |
+
}
|
3617 |
+
} // End of class TGMPA_Utils
|
3618 |
+
} // End of class_exists wrapper
|
includes/sp-api-functions.php
CHANGED
@@ -7,7 +7,7 @@
|
|
7 |
* @author ThemeBoy
|
8 |
* @category Core
|
9 |
* @package SportsPress/Functions
|
10 |
-
* @version 1.
|
11 |
*/
|
12 |
|
13 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
@@ -25,6 +25,27 @@ function sp_the_time( $post = 0 ) {
|
|
25 |
echo sp_get_time( $post );
|
26 |
}
|
27 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
/*
|
29 |
* Event functions
|
30 |
*/
|
@@ -96,6 +117,16 @@ function sp_get_winner( $post = 0 ) {
|
|
96 |
return $event->winner();
|
97 |
}
|
98 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
99 |
function sp_get_performance( $post = 0 ) {
|
100 |
$event = new SP_Event( $post );
|
101 |
return $event->performance();
|
@@ -162,10 +193,32 @@ function sp_get_logo( $post = 0, $size = 'icon', $attr = array() ) {
|
|
162 |
return get_the_post_thumbnail( $post, 'sportspress-fit-' . $size, $attr );
|
163 |
}
|
164 |
|
|
|
|
|
|
|
|
|
|
|
|
|
165 |
function sp_get_abbreviation( $post = 0 ) {
|
166 |
return get_post_meta ( $post, 'sp_abbreviation', true );
|
167 |
}
|
168 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
169 |
function sp_the_abbreviation( $post = 0 ) {
|
170 |
echo sp_get_abbreviation( $post );
|
171 |
}
|
@@ -211,6 +264,19 @@ function sp_league_table( $post = 0 ) {
|
|
211 |
* Player functions
|
212 |
*/
|
213 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
214 |
function sp_player_details( $post = 0 ) {
|
215 |
sp_get_template( 'player-details.php', array( 'id' => $post ) );
|
216 |
}
|
7 |
* @author ThemeBoy
|
8 |
* @category Core
|
9 |
* @package SportsPress/Functions
|
10 |
+
* @version 1.9.19
|
11 |
*/
|
12 |
|
13 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
25 |
echo sp_get_time( $post );
|
26 |
}
|
27 |
|
28 |
+
function sp_get_posts( $post_type = 'post', $args = array() ) {
|
29 |
+
$args = array_merge( array(
|
30 |
+
'post_type' => $post_type,
|
31 |
+
'numberposts' => -1,
|
32 |
+
'posts_per_page' => -1,
|
33 |
+
), $args );
|
34 |
+
return get_posts( $args );
|
35 |
+
}
|
36 |
+
|
37 |
+
function sp_get_leagues( $post = 0, $ids = true ) {
|
38 |
+
$terms = get_the_terms( $post, 'sp_league' );
|
39 |
+
if ( $terms && $ids ) $terms = wp_list_pluck( $terms, 'term_id' );
|
40 |
+
return $terms;
|
41 |
+
}
|
42 |
+
|
43 |
+
function sp_get_seasons( $post = 0, $ids = true ) {
|
44 |
+
$terms = get_the_terms( $post, 'sp_season' );
|
45 |
+
if ( $terms && $ids ) $terms = wp_list_pluck( $terms, 'term_id' );
|
46 |
+
return $terms;
|
47 |
+
}
|
48 |
+
|
49 |
/*
|
50 |
* Event functions
|
51 |
*/
|
117 |
return $event->winner();
|
118 |
}
|
119 |
|
120 |
+
function sp_get_main_performance_option() {
|
121 |
+
$main_performance = get_option( 'sportspress_primary_performance', null );
|
122 |
+
if ( $main_performance ) return $main_performance;
|
123 |
+
$options = get_posts( array( 'post_type' => 'sp_performance', 'posts_per_page' => 1, 'orderby' => 'menu_order', 'order' => 'ASC' ) );
|
124 |
+
if ( ! $options ) return null;
|
125 |
+
$performance = reset( $options );
|
126 |
+
$slug = $performance->post_name;
|
127 |
+
return $slug;
|
128 |
+
}
|
129 |
+
|
130 |
function sp_get_performance( $post = 0 ) {
|
131 |
$event = new SP_Event( $post );
|
132 |
return $event->performance();
|
193 |
return get_the_post_thumbnail( $post, 'sportspress-fit-' . $size, $attr );
|
194 |
}
|
195 |
|
196 |
+
function sp_get_logo_url( $post = 0, $size = 'icon' ) {
|
197 |
+
$thumbnail_id = get_post_thumbnail_id( $post );
|
198 |
+
$src = wp_get_attachment_image_src( $thumbnail_id, $size, false );
|
199 |
+
return $src[0];
|
200 |
+
}
|
201 |
+
|
202 |
function sp_get_abbreviation( $post = 0 ) {
|
203 |
return get_post_meta ( $post, 'sp_abbreviation', true );
|
204 |
}
|
205 |
|
206 |
+
function sp_get_venues( $post = 0, $ids = true ) {
|
207 |
+
$terms = get_the_terms( $post, 'sp_venue' );
|
208 |
+
if ( $terms && $ids ) $terms = wp_list_pluck( $terms, 'term_id' );
|
209 |
+
return $terms;
|
210 |
+
}
|
211 |
+
|
212 |
+
function sp_is_home_venue( $post = 0, $event = 0 ) {
|
213 |
+
$pv = sp_get_venues( $post );
|
214 |
+
$ev = sp_get_venues( $event );
|
215 |
+
if ( is_array( $pv ) && is_array( $ev ) && sizeof( array_intersect( $pv, $ev ) ) ) {
|
216 |
+
return true;
|
217 |
+
} else {
|
218 |
+
return false;
|
219 |
+
}
|
220 |
+
}
|
221 |
+
|
222 |
function sp_the_abbreviation( $post = 0 ) {
|
223 |
echo sp_get_abbreviation( $post );
|
224 |
}
|
264 |
* Player functions
|
265 |
*/
|
266 |
|
267 |
+
function sp_get_player_number( $post = 0 ) {
|
268 |
+
return get_post_meta( $post, 'sp_number', true );
|
269 |
+
}
|
270 |
+
|
271 |
+
function sp_get_player_name_with_number( $post = 0, $prepend = '', $append = '. ' ) {
|
272 |
+
$number = sp_get_player_number( $post );
|
273 |
+
if ( isset( $number ) && '' !== $number ) {
|
274 |
+
return $prepend . $number . $append . get_the_title( $post );
|
275 |
+
} else {
|
276 |
+
return get_the_title( $post );
|
277 |
+
}
|
278 |
+
}
|
279 |
+
|
280 |
function sp_player_details( $post = 0 ) {
|
281 |
sp_get_template( 'player-details.php', array( 'id' => $post ) );
|
282 |
}
|
includes/sp-core-functions.php
CHANGED
@@ -7,7 +7,7 @@
|
|
7 |
* @author ThemeBoy
|
8 |
* @category Core
|
9 |
* @package SportsPress/Functions
|
10 |
-
* @version 1.
|
11 |
*/
|
12 |
|
13 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
@@ -225,6 +225,13 @@ if ( !function_exists( 'sp_flush_rewrite_rules' ) ) {
|
|
225 |
}
|
226 |
}
|
227 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
228 |
if ( !function_exists( 'sp_nonce' ) ) {
|
229 |
function sp_nonce() {
|
230 |
wp_nonce_field( 'sportspress_save_data', 'sportspress_meta_nonce' );
|
@@ -376,6 +383,7 @@ if ( !function_exists( 'sp_get_post_condition' ) ) {
|
|
376 |
'>' => sprintf( __( 'Most %s', 'sportspress' ), $label ),
|
377 |
'<' => sprintf( __( 'Least %s', 'sportspress' ), $label ),
|
378 |
'=' => sprintf( __( 'Equal %s', 'sportspress' ), $label ),
|
|
|
379 |
);
|
380 |
return sp_array_value( $conditions, $condition, '—' );
|
381 |
else:
|
@@ -414,11 +422,12 @@ if ( !function_exists( 'sp_get_post_equation' ) ) {
|
|
414 |
function sp_get_post_equation( $post_id ) {
|
415 |
$equation = get_post_meta ( $post_id, 'sp_equation', true );
|
416 |
if ( $equation ):
|
417 |
-
|
418 |
-
array( '/', '(', ')', '+', '-', '*', '$' ),
|
419 |
-
array( '
|
420 |
trim( $equation )
|
421 |
);
|
|
|
422 |
else:
|
423 |
return '—';
|
424 |
endif;
|
@@ -440,6 +449,41 @@ if ( !function_exists( 'sp_get_post_order' ) ) {
|
|
440 |
}
|
441 |
}
|
442 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
443 |
if ( !function_exists( 'sp_dropdown_statuses' ) ) {
|
444 |
function sp_dropdown_statuses( $args = array() ) {
|
445 |
$defaults = array(
|
@@ -555,7 +599,7 @@ if ( !function_exists( 'sp_dropdown_taxonomies' ) ) {
|
|
555 |
|
556 |
if ( strpos( $property, 'multiple' ) === false ):
|
557 |
if ( $args['show_option_blank'] ):
|
558 |
-
echo '<option
|
559 |
endif;
|
560 |
if ( $args['show_option_all'] ):
|
561 |
printf( '<option value="0" ' . selected( '0', $selected, false ) . '>%s</option>', $args['show_option_all'] );
|
@@ -777,16 +821,22 @@ if ( !function_exists( 'sp_posts' ) ) {
|
|
777 |
}
|
778 |
|
779 |
if ( !function_exists( 'sp_post_checklist' ) ) {
|
780 |
-
function sp_post_checklist( $post_id = null, $meta = 'post', $display = 'block', $filters = null, $index = null ) {
|
781 |
if ( ! isset( $post_id ) )
|
782 |
global $post_id;
|
|
|
|
|
783 |
?>
|
784 |
-
<div id="<?php echo $
|
785 |
-
<input type="hidden" value="0" name="<?php echo $
|
786 |
<ul class="categorychecklist form-no-clear">
|
787 |
<li class="sp-select-all-container"><label class="selectit"><input type="checkbox" class="sp-select-all"> <strong><?php _e( 'Select All', 'sportspress' ); ?></strong></label></li>
|
788 |
<?php
|
789 |
-
$selected =
|
|
|
|
|
|
|
|
|
790 |
if ( empty( $posts ) ):
|
791 |
$query = array( 'post_type' => $meta, 'numberposts' => -1, 'post_per_page' => -1, 'orderby' => 'menu_order' );
|
792 |
if ( $meta == 'sp_player' ):
|
@@ -835,8 +885,8 @@ if ( !function_exists( 'sp_post_checklist' ) ) {
|
|
835 |
?>">
|
836 |
<?php echo str_repeat( '<ul><li>', sizeof( $parents ) ); ?>
|
837 |
<label class="selectit">
|
838 |
-
<input type="checkbox" value="<?php echo $post->ID; ?>" name="<?php echo $
|
839 |
-
<?php echo
|
840 |
</label>
|
841 |
<?php echo str_repeat( '</li></ul>', sizeof( $parents ) ); ?>
|
842 |
</li>
|
@@ -845,10 +895,10 @@ if ( !function_exists( 'sp_post_checklist' ) ) {
|
|
845 |
?>
|
846 |
<li class="sp-not-found-container">
|
847 |
<?php _e( 'No results found.', 'sportspress' ); ?>
|
848 |
-
<?php if ( sizeof( $posts ) ): ?><a class="sp-show-all" href="#show-all-<?php echo $
|
849 |
</li>
|
850 |
<?php if ( sizeof( $posts ) ): ?>
|
851 |
-
<li class="sp-show-all-container"><a class="sp-show-all" href="#show-all-<?php echo $
|
852 |
<?php endif; ?>
|
853 |
</ul>
|
854 |
</div>
|
@@ -873,6 +923,10 @@ if ( !function_exists( 'sp_column_checklist' ) ) {
|
|
873 |
endif;
|
874 |
if ( sizeof( $posts ) ):
|
875 |
foreach ( $posts as $post ):
|
|
|
|
|
|
|
|
|
876 |
?>
|
877 |
<li class="sp-post">
|
878 |
<label class="selectit">
|
@@ -1014,6 +1068,16 @@ if ( !function_exists( 'sp_update_post_meta_recursive' ) ) {
|
|
1014 |
}
|
1015 |
}
|
1016 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1017 |
if ( !function_exists( 'sp_get_eos_safe_slug' ) ) {
|
1018 |
function sp_get_eos_safe_slug( $title, $post_id = 'var' ) {
|
1019 |
|
@@ -1039,20 +1103,20 @@ if ( !function_exists( 'sp_get_eos_safe_slug' ) ) {
|
|
1039 |
}
|
1040 |
|
1041 |
if ( !function_exists( 'sp_solve' ) ) {
|
1042 |
-
function sp_solve( $equation, $vars, $precision = 0 ) {
|
1043 |
|
1044 |
if ( $equation == null )
|
1045 |
-
return
|
1046 |
|
1047 |
if ( strpos( $equation, '$gamesback' ) !== false ):
|
1048 |
|
1049 |
// Return placeholder
|
1050 |
-
return
|
1051 |
|
1052 |
elseif ( strpos( $equation, '$streak' ) !== false ):
|
1053 |
|
1054 |
// Return direct value
|
1055 |
-
return sp_array_value( $vars, 'streak',
|
1056 |
|
1057 |
elseif ( strpos( $equation, '$last5' ) !== false ):
|
1058 |
|
@@ -1061,7 +1125,7 @@ if ( !function_exists( 'sp_solve' ) ) {
|
|
1061 |
if ( array_sum( $last5 ) > 0 ):
|
1062 |
return implode( '-', $last5 );
|
1063 |
else:
|
1064 |
-
return
|
1065 |
endif;
|
1066 |
|
1067 |
elseif ( strpos( $equation, '$last10' ) !== false ):
|
@@ -1071,7 +1135,7 @@ if ( !function_exists( 'sp_solve' ) ) {
|
|
1071 |
if ( array_sum( $last10 ) > 0 ):
|
1072 |
return implode( '-', $last10 );
|
1073 |
else:
|
1074 |
-
return
|
1075 |
endif;
|
1076 |
|
1077 |
elseif ( strpos( $equation, '$homerecord' ) !== false ):
|
@@ -1095,7 +1159,7 @@ if ( !function_exists( 'sp_solve' ) ) {
|
|
1095 |
unset( $vars['last10'] );
|
1096 |
|
1097 |
if ( sp_array_value( $vars, 'eventsplayed', 0 ) <= 0 )
|
1098 |
-
return
|
1099 |
|
1100 |
// Equation Operating System
|
1101 |
if ( ! class_exists( 'phpStack' ) )
|
@@ -1104,14 +1168,17 @@ if ( !function_exists( 'sp_solve' ) ) {
|
|
1104 |
include_once( SP()->plugin_path() . '/includes/libraries/class-eqeos.php' );
|
1105 |
$eos = new eqEOS();
|
1106 |
|
1107 |
-
//
|
1108 |
-
$
|
|
|
|
|
|
|
1109 |
|
1110 |
// Check if each variable part is in vars
|
1111 |
-
$parts = explode( ' ', $
|
1112 |
foreach( $parts as $key => $value ):
|
1113 |
if ( substr( $value, 0, 1 ) == '$' ):
|
1114 |
-
if ( ! array_key_exists( preg_replace( "/[^a-
|
1115 |
return 0;
|
1116 |
endif;
|
1117 |
endforeach;
|
@@ -1119,19 +1186,33 @@ if ( !function_exists( 'sp_solve' ) ) {
|
|
1119 |
// Remove space between equation parts
|
1120 |
$equation = str_replace( ' ', '', $equation );
|
1121 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1122 |
// Initialize subequation
|
1123 |
$subequation = $equation;
|
1124 |
|
1125 |
// Check each subequation separated by division
|
1126 |
-
|
1127 |
-
$
|
|
|
1128 |
|
1129 |
-
|
1130 |
-
|
1131 |
|
1132 |
-
|
1133 |
-
|
1134 |
-
|
|
|
1135 |
}
|
1136 |
}
|
1137 |
}
|
@@ -1186,7 +1267,7 @@ if ( !function_exists( 'sp_get_next_event' ) ) {
|
|
1186 |
}
|
1187 |
|
1188 |
if ( !function_exists( 'sp_taxonomy_field' ) ) {
|
1189 |
-
function sp_taxonomy_field( $taxonomy = 'category', $post = null, $multiple = false ) {
|
1190 |
$obj = get_taxonomy( $taxonomy );
|
1191 |
if ( $obj ) {
|
1192 |
$post_type = get_post_type( $post );
|
@@ -1207,7 +1288,7 @@ if ( !function_exists( 'sp_taxonomy_field' ) ) {
|
|
1207 |
'name' => 'tax_input[' . $taxonomy . '][]',
|
1208 |
'selected' => $term_ids,
|
1209 |
'values' => 'term_id',
|
1210 |
-
'class' => 'sp-has-dummy widefat',
|
1211 |
'chosen' => true,
|
1212 |
'placeholder' => __( 'All', 'sportspress' ),
|
1213 |
);
|
@@ -1232,17 +1313,19 @@ if ( !function_exists( 'sp_taxonomy_field' ) ) {
|
|
1232 |
function sp_get_text_options() {
|
1233 |
$strings = apply_filters( 'sportspress_text', array(
|
1234 |
__( 'Article', 'sportspress' ),
|
|
|
1235 |
__( 'Career Total', 'sportspress' ),
|
1236 |
__( 'Current Team', 'sportspress' ),
|
1237 |
__( 'Current Teams', 'sportspress' ),
|
1238 |
__( 'Date', 'sportspress' ),
|
|
|
1239 |
__( 'Details', 'sportspress' ),
|
1240 |
__( 'Event', 'sportspress' ),
|
1241 |
__( 'Competition', 'sportspress' ),
|
1242 |
__( 'Nationality', 'sportspress' ),
|
|
|
1243 |
__( 'Outcome', 'sportspress' ),
|
1244 |
__( 'Past Teams', 'sportspress' ),
|
1245 |
-
__( 'Performance', 'sportspress' ),
|
1246 |
__( 'Played', 'sportspress' ),
|
1247 |
__( 'Player', 'sportspress' ),
|
1248 |
__( 'Pos', 'sportspress' ),
|
7 |
* @author ThemeBoy
|
8 |
* @category Core
|
9 |
* @package SportsPress/Functions
|
10 |
+
* @version 1.9.19
|
11 |
*/
|
12 |
|
13 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
225 |
}
|
226 |
}
|
227 |
|
228 |
+
if ( !function_exists( 'sp_add_link' ) ) {
|
229 |
+
function sp_add_link( $string, $link = false, $active = true ) {
|
230 |
+
if ( empty( $link ) || ! $active ) return $string;
|
231 |
+
return '<a href="' . $link . '">' . $string . '</a>';
|
232 |
+
}
|
233 |
+
}
|
234 |
+
|
235 |
if ( !function_exists( 'sp_nonce' ) ) {
|
236 |
function sp_nonce() {
|
237 |
wp_nonce_field( 'sportspress_save_data', 'sportspress_meta_nonce' );
|
383 |
'>' => sprintf( __( 'Most %s', 'sportspress' ), $label ),
|
384 |
'<' => sprintf( __( 'Least %s', 'sportspress' ), $label ),
|
385 |
'=' => sprintf( __( 'Equal %s', 'sportspress' ), $label ),
|
386 |
+
'else' => sprintf( __( 'Default', 'sportspress' ), $label ),
|
387 |
);
|
388 |
return sp_array_value( $conditions, $condition, '—' );
|
389 |
else:
|
422 |
function sp_get_post_equation( $post_id ) {
|
423 |
$equation = get_post_meta ( $post_id, 'sp_equation', true );
|
424 |
if ( $equation ):
|
425 |
+
$equation = str_replace(
|
426 |
+
array( '/', '(', ')', '+', '-', '*', '_', '$' ),
|
427 |
+
array( '÷', '(', ')', '+', '−', '×', '@', '' ),
|
428 |
trim( $equation )
|
429 |
);
|
430 |
+
return '<code>' . implode( '</code> <code>', explode( ' ', $equation ) ) . '</code>';
|
431 |
else:
|
432 |
return '—';
|
433 |
endif;
|
449 |
}
|
450 |
}
|
451 |
|
452 |
+
if ( !function_exists( 'sp_get_post_section' ) ) {
|
453 |
+
function sp_get_post_section( $post_id ) {
|
454 |
+
$section = get_post_meta ( $post_id, 'sp_section', true );
|
455 |
+
if ( isset( $section ) ):
|
456 |
+
$options = apply_filters( 'sportspress_performance_sections', array( -1 => __( 'All', 'sportspress' ), 0 => __( 'Offense', 'sportspress' ), 1 => __( 'Defense', 'sportspress' ) ) );
|
457 |
+
return sp_array_value( $options, $section, __( 'All', 'sportspress' ) );
|
458 |
+
else:
|
459 |
+
return __( 'All', 'sportspress' );
|
460 |
+
endif;
|
461 |
+
}
|
462 |
+
}
|
463 |
+
|
464 |
+
if ( !function_exists( 'sp_get_post_format' ) ) {
|
465 |
+
function sp_get_post_format( $post_id ) {
|
466 |
+
$format = get_post_meta ( $post_id, 'sp_format', true );
|
467 |
+
if ( isset( $format ) ):
|
468 |
+
$options = apply_filters( 'sportspress_performance_formats', array( 'number' => __( 'Number', 'sportspress' ), 'time' => __( 'Time', 'sportspress' ), 'text' => __( 'Text', 'sportspress' ) ) );
|
469 |
+
return sp_array_value( $options, $format, __( 'Number', 'sportspress' ) );
|
470 |
+
else:
|
471 |
+
return __( 'Number', 'sportspress' );
|
472 |
+
endif;
|
473 |
+
}
|
474 |
+
}
|
475 |
+
|
476 |
+
if ( !function_exists( 'sp_get_format_placeholder' ) ) {
|
477 |
+
function sp_get_format_placeholder( $key = 'number' ) {
|
478 |
+
$placeholders = apply_filters( 'sportspress_format_placeholders', array(
|
479 |
+
'number' => 0,
|
480 |
+
'time' => '0:00',
|
481 |
+
'text' => ' ',
|
482 |
+
) );
|
483 |
+
return sp_array_value( $placeholders, $key, 0 );
|
484 |
+
}
|
485 |
+
}
|
486 |
+
|
487 |
if ( !function_exists( 'sp_dropdown_statuses' ) ) {
|
488 |
function sp_dropdown_statuses( $args = array() ) {
|
489 |
$defaults = array(
|
599 |
|
600 |
if ( strpos( $property, 'multiple' ) === false ):
|
601 |
if ( $args['show_option_blank'] ):
|
602 |
+
echo '<option value="">' . ( is_bool( $args['show_option_blank'] ) ? '' : $args['show_option_blank'] ) . '</option>';
|
603 |
endif;
|
604 |
if ( $args['show_option_all'] ):
|
605 |
printf( '<option value="0" ' . selected( '0', $selected, false ) . '>%s</option>', $args['show_option_all'] );
|
821 |
}
|
822 |
|
823 |
if ( !function_exists( 'sp_post_checklist' ) ) {
|
824 |
+
function sp_post_checklist( $post_id = null, $meta = 'post', $display = 'block', $filters = null, $index = null, $slug = null ) {
|
825 |
if ( ! isset( $post_id ) )
|
826 |
global $post_id;
|
827 |
+
if ( ! isset( $slug ) )
|
828 |
+
$slug = $meta;
|
829 |
?>
|
830 |
+
<div id="<?php echo $slug; ?>-all" class="posttypediv wp-tab-panel sp-tab-panel sp-tab-filter-panel sp-select-all-range" style="display: <?php echo $display; ?>;">
|
831 |
+
<input type="hidden" value="0" name="<?php echo $slug; ?><?php if ( isset( $index ) ) echo '[' . $index . ']'; ?>[]" />
|
832 |
<ul class="categorychecklist form-no-clear">
|
833 |
<li class="sp-select-all-container"><label class="selectit"><input type="checkbox" class="sp-select-all"> <strong><?php _e( 'Select All', 'sportspress' ); ?></strong></label></li>
|
834 |
<?php
|
835 |
+
$selected = (array)get_post_meta( $post_id, $slug, false );
|
836 |
+
if ( ! sizeof( $selected ) ) {
|
837 |
+
$selected = (array)get_post_meta( $post_id, $meta, false );
|
838 |
+
}
|
839 |
+
$selected = sp_array_between( $selected, 0, $index );
|
840 |
if ( empty( $posts ) ):
|
841 |
$query = array( 'post_type' => $meta, 'numberposts' => -1, 'post_per_page' => -1, 'orderby' => 'menu_order' );
|
842 |
if ( $meta == 'sp_player' ):
|
885 |
?>">
|
886 |
<?php echo str_repeat( '<ul><li>', sizeof( $parents ) ); ?>
|
887 |
<label class="selectit">
|
888 |
+
<input type="checkbox" value="<?php echo $post->ID; ?>" name="<?php echo $slug; ?><?php if ( isset( $index ) ) echo '[' . $index . ']'; ?>[]"<?php if ( in_array( $post->ID, $selected ) ) echo ' checked="checked"'; ?>>
|
889 |
+
<?php echo sp_get_player_name_with_number( $post->ID ); ?>
|
890 |
</label>
|
891 |
<?php echo str_repeat( '</li></ul>', sizeof( $parents ) ); ?>
|
892 |
</li>
|
895 |
?>
|
896 |
<li class="sp-not-found-container">
|
897 |
<?php _e( 'No results found.', 'sportspress' ); ?>
|
898 |
+
<?php if ( sizeof( $posts ) ): ?><a class="sp-show-all" href="#show-all-<?php echo $slug; ?>s"><?php _e( 'Show all', 'sportspress' ); ?></a><?php endif; ?>
|
899 |
</li>
|
900 |
<?php if ( sizeof( $posts ) ): ?>
|
901 |
+
<li class="sp-show-all-container"><a class="sp-show-all" href="#show-all-<?php echo $slug; ?>s"><?php _e( 'Show all', 'sportspress' ); ?></a></li>
|
902 |
<?php endif; ?>
|
903 |
</ul>
|
904 |
</div>
|
923 |
endif;
|
924 |
if ( sizeof( $posts ) ):
|
925 |
foreach ( $posts as $post ):
|
926 |
+
if ( 'sp_performance' == $meta ) {
|
927 |
+
$format = get_post_meta( $post->ID, 'sp_format', true );
|
928 |
+
if ( 'text' === $format ) continue;
|
929 |
+
}
|
930 |
?>
|
931 |
<li class="sp-post">
|
932 |
<label class="selectit">
|
1068 |
}
|
1069 |
}
|
1070 |
|
1071 |
+
if ( !function_exists( 'sp_update_user_meta_recursive' ) ) {
|
1072 |
+
function sp_update_user_meta_recursive( $user_id, $meta_key, $meta_value ) {
|
1073 |
+
delete_user_meta( $user_id, $meta_key );
|
1074 |
+
$values = new RecursiveIteratorIterator( new RecursiveArrayIterator( $meta_value ) );
|
1075 |
+
foreach ( $values as $value ):
|
1076 |
+
add_user_meta( $user_id, $meta_key, $value, false );
|
1077 |
+
endforeach;
|
1078 |
+
}
|
1079 |
+
}
|
1080 |
+
|
1081 |
if ( !function_exists( 'sp_get_eos_safe_slug' ) ) {
|
1082 |
function sp_get_eos_safe_slug( $title, $post_id = 'var' ) {
|
1083 |
|
1103 |
}
|
1104 |
|
1105 |
if ( !function_exists( 'sp_solve' ) ) {
|
1106 |
+
function sp_solve( $equation, $vars, $precision = 0, $default = '-' ) {
|
1107 |
|
1108 |
if ( $equation == null )
|
1109 |
+
return $default;
|
1110 |
|
1111 |
if ( strpos( $equation, '$gamesback' ) !== false ):
|
1112 |
|
1113 |
// Return placeholder
|
1114 |
+
return $default;
|
1115 |
|
1116 |
elseif ( strpos( $equation, '$streak' ) !== false ):
|
1117 |
|
1118 |
// Return direct value
|
1119 |
+
return sp_array_value( $vars, 'streak', $default );
|
1120 |
|
1121 |
elseif ( strpos( $equation, '$last5' ) !== false ):
|
1122 |
|
1125 |
if ( array_sum( $last5 ) > 0 ):
|
1126 |
return implode( '-', $last5 );
|
1127 |
else:
|
1128 |
+
return $default;
|
1129 |
endif;
|
1130 |
|
1131 |
elseif ( strpos( $equation, '$last10' ) !== false ):
|
1135 |
if ( array_sum( $last10 ) > 0 ):
|
1136 |
return implode( '-', $last10 );
|
1137 |
else:
|
1138 |
+
return $default;
|
1139 |
endif;
|
1140 |
|
1141 |
elseif ( strpos( $equation, '$homerecord' ) !== false ):
|
1159 |
unset( $vars['last10'] );
|
1160 |
|
1161 |
if ( sp_array_value( $vars, 'eventsplayed', 0 ) <= 0 )
|
1162 |
+
return $default;
|
1163 |
|
1164 |
// Equation Operating System
|
1165 |
if ( ! class_exists( 'phpStack' ) )
|
1168 |
include_once( SP()->plugin_path() . '/includes/libraries/class-eqeos.php' );
|
1169 |
$eos = new eqEOS();
|
1170 |
|
1171 |
+
// Remove spaces from equation
|
1172 |
+
$equation = str_replace( ' ', '', $equation );
|
1173 |
+
|
1174 |
+
// Create temporary equation replacing operators with spaces
|
1175 |
+
$temp = str_replace( array( '+', '-', '*', '/', '(', ')' ), ' ', $equation );
|
1176 |
|
1177 |
// Check if each variable part is in vars
|
1178 |
+
$parts = explode( ' ', $temp );
|
1179 |
foreach( $parts as $key => $value ):
|
1180 |
if ( substr( $value, 0, 1 ) == '$' ):
|
1181 |
+
if ( ! array_key_exists( preg_replace( "/[^a-z0-9_]/", '', $value ), $vars ) )
|
1182 |
return 0;
|
1183 |
endif;
|
1184 |
endforeach;
|
1186 |
// Remove space between equation parts
|
1187 |
$equation = str_replace( ' ', '', $equation );
|
1188 |
|
1189 |
+
// Initialize Subequations
|
1190 |
+
$subequations = array( $equation );
|
1191 |
+
|
1192 |
+
// Find all equation parts contained in parentheses
|
1193 |
+
if ( preg_match_all( '~\((.*?)\)~', $equation, $results ) ) {
|
1194 |
+
foreach ( sp_array_value( $results, 1, array() ) as $result ) {
|
1195 |
+
if ( ! empty( $result ) ) {
|
1196 |
+
$subequations[] = $result;
|
1197 |
+
}
|
1198 |
+
}
|
1199 |
+
}
|
1200 |
+
|
1201 |
// Initialize subequation
|
1202 |
$subequation = $equation;
|
1203 |
|
1204 |
// Check each subequation separated by division
|
1205 |
+
foreach ( $subequations as $subequation ) {
|
1206 |
+
while ( $pos = strpos( $subequation, '/' ) ) {
|
1207 |
+
$subequation = substr( $subequation, $pos + 1 );
|
1208 |
|
1209 |
+
// Make sure paretheses match
|
1210 |
+
if ( substr_count( $subequation, '(' ) === substr_count( $subequation, ')' ) ) {
|
1211 |
|
1212 |
+
// Return zero if denominator is zero
|
1213 |
+
if ( $eos->solveIF( $subequation, $vars ) == 0 ) {
|
1214 |
+
return 0;
|
1215 |
+
}
|
1216 |
}
|
1217 |
}
|
1218 |
}
|
1267 |
}
|
1268 |
|
1269 |
if ( !function_exists( 'sp_taxonomy_field' ) ) {
|
1270 |
+
function sp_taxonomy_field( $taxonomy = 'category', $post = null, $multiple = false, $trigger = false ) {
|
1271 |
$obj = get_taxonomy( $taxonomy );
|
1272 |
if ( $obj ) {
|
1273 |
$post_type = get_post_type( $post );
|
1288 |
'name' => 'tax_input[' . $taxonomy . '][]',
|
1289 |
'selected' => $term_ids,
|
1290 |
'values' => 'term_id',
|
1291 |
+
'class' => 'sp-has-dummy widefat' . ( $trigger ? ' sp-ajax-trigger' : '' ),
|
1292 |
'chosen' => true,
|
1293 |
'placeholder' => __( 'All', 'sportspress' ),
|
1294 |
);
|
1313 |
function sp_get_text_options() {
|
1314 |
$strings = apply_filters( 'sportspress_text', array(
|
1315 |
__( 'Article', 'sportspress' ),
|
1316 |
+
__( 'Scorecard', 'sportspress' ),
|
1317 |
__( 'Career Total', 'sportspress' ),
|
1318 |
__( 'Current Team', 'sportspress' ),
|
1319 |
__( 'Current Teams', 'sportspress' ),
|
1320 |
__( 'Date', 'sportspress' ),
|
1321 |
+
__( 'Defense', 'sportspress' ),
|
1322 |
__( 'Details', 'sportspress' ),
|
1323 |
__( 'Event', 'sportspress' ),
|
1324 |
__( 'Competition', 'sportspress' ),
|
1325 |
__( 'Nationality', 'sportspress' ),
|
1326 |
+
__( 'Offense', 'sportspress' ),
|
1327 |
__( 'Outcome', 'sportspress' ),
|
1328 |
__( 'Past Teams', 'sportspress' ),
|
|
|
1329 |
__( 'Played', 'sportspress' ),
|
1330 |
__( 'Player', 'sportspress' ),
|
1331 |
__( 'Pos', 'sportspress' ),
|
includes/sp-formatting-functions.php
CHANGED
@@ -7,7 +7,7 @@
|
|
7 |
* @author ThemeBoy
|
8 |
* @category Core
|
9 |
* @package SportsPress/Functions
|
10 |
-
* @version 1.
|
11 |
*/
|
12 |
|
13 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
@@ -268,12 +268,15 @@ if ( ! function_exists( 'sp_format_hex' ) ) {
|
|
268 |
*/
|
269 |
function sp_format_hex( $hex ) {
|
270 |
|
|
|
271 |
$hex = trim( str_replace( '#', '', $hex ) );
|
272 |
|
273 |
if ( strlen( $hex ) == 3 ) {
|
274 |
$hex = $hex[0] . $hex[0] . $hex[1] . $hex[1] . $hex[2] . $hex[2];
|
275 |
}
|
276 |
|
|
|
|
|
277 |
if ( $hex ) return '#' . $hex;
|
278 |
}
|
279 |
}
|
7 |
* @author ThemeBoy
|
8 |
* @category Core
|
9 |
* @package SportsPress/Functions
|
10 |
+
* @version 1.9.12
|
11 |
*/
|
12 |
|
13 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
268 |
*/
|
269 |
function sp_format_hex( $hex ) {
|
270 |
|
271 |
+
$hex = preg_replace( '/[^A-Fa-f0-9]/', '', $hex );
|
272 |
$hex = trim( str_replace( '#', '', $hex ) );
|
273 |
|
274 |
if ( strlen( $hex ) == 3 ) {
|
275 |
$hex = $hex[0] . $hex[0] . $hex[1] . $hex[1] . $hex[2] . $hex[2];
|
276 |
}
|
277 |
|
278 |
+
$hex = substr( $hex, 0, 6 );
|
279 |
+
|
280 |
if ( $hex ) return '#' . $hex;
|
281 |
}
|
282 |
}
|
includes/sp-template-functions.php
CHANGED
@@ -7,7 +7,7 @@
|
|
7 |
* @author ThemeBoy
|
8 |
* @category Core
|
9 |
* @package SportsPress/Functions
|
10 |
-
* @version 1.
|
11 |
*/
|
12 |
|
13 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
@@ -44,6 +44,24 @@ function sp_body_class( $classes ) {
|
|
44 |
$classes[] = 'sportspress-page';
|
45 |
}
|
46 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
return array_unique( $classes );
|
48 |
}
|
49 |
|
@@ -68,6 +86,22 @@ if ( ! function_exists( 'sportspress_taxonomy_archive_description' ) ) {
|
|
68 |
}
|
69 |
}
|
70 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
/** Single Event ********************************************************/
|
72 |
|
73 |
if ( ! function_exists( 'sportspress_output_event_logos' ) ) {
|
@@ -123,6 +157,19 @@ if ( ! function_exists( 'sportspress_output_event_details' ) ) {
|
|
123 |
sp_get_template( 'event-details.php' );
|
124 |
}
|
125 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
126 |
if ( ! function_exists( 'sportspress_output_event_venue' ) ) {
|
127 |
|
128 |
/**
|
@@ -212,6 +259,19 @@ if ( ! function_exists( 'sportspress_output_team_details' ) ) {
|
|
212 |
sp_get_template( 'team-details.php' );
|
213 |
}
|
214 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
215 |
if ( ! function_exists( 'sportspress_output_team_tables' ) ) {
|
216 |
|
217 |
/**
|
7 |
* @author ThemeBoy
|
8 |
* @category Core
|
9 |
* @package SportsPress/Functions
|
10 |
+
* @version 1.9.13
|
11 |
*/
|
12 |
|
13 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
44 |
$classes[] = 'sportspress-page';
|
45 |
}
|
46 |
|
47 |
+
$post_type = get_post_type();
|
48 |
+
|
49 |
+
if ( 'sp_event' == $post_type ) {
|
50 |
+
$id = get_the_ID();
|
51 |
+
if ( get_option( 'sportspress_event_show_maps', 'yes' ) == 'yes' && get_the_terms( $id, 'sp_venue' ) ) {
|
52 |
+
$classes[] = 'sp-has-venue';
|
53 |
+
}
|
54 |
+
if ( 'results' == sp_get_status( $id ) ) {
|
55 |
+
$classes[] = 'sp-has-results';
|
56 |
+
}
|
57 |
+
} elseif ( 'sp_team' == $post_type && 'yes' == get_option( 'sportspress_team_show_logo', 'yes' ) ) {
|
58 |
+
$classes[] = 'sp-show-image';
|
59 |
+
} elseif ( 'sp_player' == $post_type && 'yes' == get_option( 'sportspress_player_show_photo', 'yes' ) ) {
|
60 |
+
$classes[] = 'sp-show-image';
|
61 |
+
} elseif ( 'sp_staff' == $post_type && 'yes' == get_option( 'sportspress_staff_show_photo', 'yes' ) ) {
|
62 |
+
$classes[] = 'sp-show-image';
|
63 |
+
}
|
64 |
+
|
65 |
return array_unique( $classes );
|
66 |
}
|
67 |
|
86 |
}
|
87 |
}
|
88 |
|
89 |
+
/** Single Post ********************************************************/
|
90 |
+
|
91 |
+
if ( ! function_exists( 'sportspress_output_post_excerpt' ) ) {
|
92 |
+
|
93 |
+
/**
|
94 |
+
* Output the post excerpt.
|
95 |
+
*
|
96 |
+
* @access public
|
97 |
+
* @subpackage Excerpt
|
98 |
+
* @return void
|
99 |
+
*/
|
100 |
+
function sportspress_output_post_excerpt() {
|
101 |
+
sp_get_template( 'post-excerpt.php' );
|
102 |
+
}
|
103 |
+
}
|
104 |
+
|
105 |
/** Single Event ********************************************************/
|
106 |
|
107 |
if ( ! function_exists( 'sportspress_output_event_logos' ) ) {
|
157 |
sp_get_template( 'event-details.php' );
|
158 |
}
|
159 |
}
|
160 |
+
if ( ! function_exists( 'sportspress_output_event_overview' ) ) {
|
161 |
+
|
162 |
+
/**
|
163 |
+
* Output the event details, venue, and results.
|
164 |
+
*
|
165 |
+
* @access public
|
166 |
+
* @subpackage Event/Overview
|
167 |
+
* @return void
|
168 |
+
*/
|
169 |
+
function sportspress_output_event_overview() {
|
170 |
+
sp_get_template( 'event-overview.php' );
|
171 |
+
}
|
172 |
+
}
|
173 |
if ( ! function_exists( 'sportspress_output_event_venue' ) ) {
|
174 |
|
175 |
/**
|
259 |
sp_get_template( 'team-details.php' );
|
260 |
}
|
261 |
}
|
262 |
+
if ( ! function_exists( 'sportspress_output_team_staff' ) ) {
|
263 |
+
|
264 |
+
/**
|
265 |
+
* Output the team staff.
|
266 |
+
*
|
267 |
+
* @access public
|
268 |
+
* @subpackage Team/Staff
|
269 |
+
* @return void
|
270 |
+
*/
|
271 |
+
function sportspress_output_team_staff() {
|
272 |
+
sp_get_template( 'team-staff.php' );
|
273 |
+
}
|
274 |
+
}
|
275 |
if ( ! function_exists( 'sportspress_output_team_tables' ) ) {
|
276 |
|
277 |
/**
|
includes/sp-template-hooks.php
CHANGED
@@ -7,7 +7,7 @@
|
|
7 |
* @author ThemeBoy
|
8 |
* @category Core
|
9 |
* @package SportsPress/Functions
|
10 |
-
* @version 1.
|
11 |
*/
|
12 |
|
13 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
@@ -25,24 +25,33 @@ add_action( 'get_the_generator_xhtml', 'sp_generator_tag', 10, 2 );
|
|
25 |
/**
|
26 |
* Before Single Event
|
27 |
* @see sportspress_output_event_logos()
|
|
|
28 |
*/
|
29 |
add_action( 'sportspress_before_single_event', 'sportspress_output_event_logos', 10 );
|
|
|
30 |
|
31 |
/**
|
32 |
* Single Event Content
|
33 |
*
|
34 |
* @see sportspress_output_event_video()
|
35 |
-
* @see
|
36 |
-
* @see sportspress_output_event_details()
|
37 |
-
* @see sportspress_output_event_venue()
|
38 |
* @see sportspress_output_event_performance()
|
39 |
*/
|
40 |
add_action( 'sportspress_single_event_content', 'sportspress_output_event_video', 10 );
|
41 |
-
add_action( 'sportspress_single_event_content', '
|
42 |
-
add_action( 'sportspress_single_event_content', 'sportspress_output_event_details', 30 );
|
43 |
-
add_action( 'sportspress_single_event_content', 'sportspress_output_event_venue', 40 );
|
44 |
add_action( 'sportspress_single_event_content', 'sportspress_output_event_performance', 50 );
|
45 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
/**
|
47 |
* Single Calendar Content
|
48 |
*
|
@@ -53,25 +62,31 @@ add_action( 'sportspress_single_calendar_content', 'sportspress_output_calendar'
|
|
53 |
/**
|
54 |
* Before Single Team
|
55 |
* @see sportspress_output_team_logo()
|
|
|
56 |
*/
|
57 |
add_action( 'sportspress_before_single_team', 'sportspress_output_team_logo', 10 );
|
|
|
58 |
|
59 |
/**
|
60 |
* Single Team Content
|
61 |
*
|
|
|
62 |
* @see sportspress_output_team_details()
|
|
|
63 |
* @see sportspress_output_team_lists()
|
64 |
* @see sportspress_output_team_tables()
|
65 |
*/
|
|
|
66 |
add_action( 'sportspress_single_team_content', 'sportspress_output_team_details', 10 );
|
|
|
67 |
add_action( 'sportspress_single_team_content', 'sportspress_output_team_lists', 20 );
|
68 |
add_action( 'sportspress_single_team_content', 'sportspress_output_team_tables', 30 );
|
69 |
|
70 |
/**
|
71 |
-
*
|
72 |
-
* @see
|
73 |
*/
|
74 |
-
add_action( '
|
75 |
|
76 |
/**
|
77 |
* Single Table Content
|
@@ -83,16 +98,18 @@ add_action( 'sportspress_single_table_content', 'sportspress_output_league_table
|
|
83 |
/**
|
84 |
* Before Single Player
|
85 |
* @see sportspress_output_player_photo()
|
|
|
|
|
86 |
*/
|
87 |
add_action( 'sportspress_before_single_player', 'sportspress_output_player_photo', 10 );
|
|
|
|
|
88 |
|
89 |
/**
|
90 |
* Single Player Content
|
91 |
*
|
92 |
-
* @see sportspress_output_player_details()
|
93 |
* @see sportspress_output_player_statistics()
|
94 |
*/
|
95 |
-
add_action( 'sportspress_single_player_content', 'sportspress_output_player_details', 10 );
|
96 |
add_action( 'sportspress_single_player_content', 'sportspress_output_player_statistics', 20 );
|
97 |
|
98 |
/**
|
@@ -105,15 +122,12 @@ add_action( 'sportspress_single_list_content', 'sportspress_output_player_list',
|
|
105 |
/**
|
106 |
* Before Single Staff
|
107 |
* @see sportspress_output_staff_photo()
|
108 |
-
*/
|
109 |
-
add_action( 'sportspress_before_single_staff', 'sportspress_output_staff_photo', 10 );
|
110 |
-
|
111 |
-
/**
|
112 |
-
* Single Staff Content
|
113 |
-
*
|
114 |
* @see sportspress_output_staff_details()
|
|
|
115 |
*/
|
116 |
-
add_action( '
|
|
|
|
|
117 |
|
118 |
/**
|
119 |
* Venue Archive Content
|
@@ -272,7 +286,7 @@ add_filter( 'the_title', 'sportspress_abbreviate_team', 10, 2 );
|
|
272 |
|
273 |
function sportspress_no_terms_links( $term_list, $taxonomy ) {
|
274 |
|
275 |
-
if ( in_array( $taxonomy, array( 'sp_league', 'sp_season' ) ) )
|
276 |
return wp_filter_nohtml_kses( $term_list );
|
277 |
|
278 |
return $term_list;
|
@@ -409,3 +423,11 @@ function sportspress_hide_adjacent_post_links( $output = null, $format = null, $
|
|
409 |
|
410 |
add_filter('post_updated_messages', 'sportspress_post_updated_messages');
|
411 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
* @author ThemeBoy
|
8 |
* @category Core
|
9 |
* @package SportsPress/Functions
|
10 |
+
* @version 1.9.13
|
11 |
*/
|
12 |
|
13 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
25 |
/**
|
26 |
* Before Single Event
|
27 |
* @see sportspress_output_event_logos()
|
28 |
+
* @see sportspress_output_post_excerpt()
|
29 |
*/
|
30 |
add_action( 'sportspress_before_single_event', 'sportspress_output_event_logos', 10 );
|
31 |
+
add_action( 'sportspress_before_single_event', 'sportspress_output_post_excerpt', 20 );
|
32 |
|
33 |
/**
|
34 |
* Single Event Content
|
35 |
*
|
36 |
* @see sportspress_output_event_video()
|
37 |
+
* @see sportspress_output_event_overview()
|
|
|
|
|
38 |
* @see sportspress_output_event_performance()
|
39 |
*/
|
40 |
add_action( 'sportspress_single_event_content', 'sportspress_output_event_video', 10 );
|
41 |
+
add_action( 'sportspress_single_event_content', 'sportspress_output_event_overview', 30 );
|
|
|
|
|
42 |
add_action( 'sportspress_single_event_content', 'sportspress_output_event_performance', 50 );
|
43 |
|
44 |
+
/**
|
45 |
+
* Event Overview Content
|
46 |
+
*
|
47 |
+
* @see sportspress_output_event_details()
|
48 |
+
* @see sportspress_output_event_venue()
|
49 |
+
* @see sportspress_output_event_results()
|
50 |
+
*/
|
51 |
+
add_action( 'sportspress_event_overview_content', 'sportspress_output_event_details', 10 );
|
52 |
+
add_action( 'sportspress_event_overview_content', 'sportspress_output_event_venue', 20 );
|
53 |
+
add_action( 'sportspress_event_overview_content', 'sportspress_output_event_results', 30 );
|
54 |
+
|
55 |
/**
|
56 |
* Single Calendar Content
|
57 |
*
|
62 |
/**
|
63 |
* Before Single Team
|
64 |
* @see sportspress_output_team_logo()
|
65 |
+
* @see sportspress_output_post_excerpt()
|
66 |
*/
|
67 |
add_action( 'sportspress_before_single_team', 'sportspress_output_team_logo', 10 );
|
68 |
+
add_action( 'sportspress_before_single_team', 'sportspress_output_post_excerpt', 20 );
|
69 |
|
70 |
/**
|
71 |
* Single Team Content
|
72 |
*
|
73 |
+
* @see sportspress_output_team_link()
|
74 |
* @see sportspress_output_team_details()
|
75 |
+
* @see sportspress_output_team_staff()
|
76 |
* @see sportspress_output_team_lists()
|
77 |
* @see sportspress_output_team_tables()
|
78 |
*/
|
79 |
+
add_action( 'sportspress_single_team_content', 'sportspress_output_team_link', 0 );
|
80 |
add_action( 'sportspress_single_team_content', 'sportspress_output_team_details', 10 );
|
81 |
+
add_action( 'sportspress_single_team_content', 'sportspress_output_team_staff', 15 );
|
82 |
add_action( 'sportspress_single_team_content', 'sportspress_output_team_lists', 20 );
|
83 |
add_action( 'sportspress_single_team_content', 'sportspress_output_team_tables', 30 );
|
84 |
|
85 |
/**
|
86 |
+
* Before Single Table
|
87 |
+
* @see sportspress_output_post_excerpt()
|
88 |
*/
|
89 |
+
add_action( 'sportspress_before_single_table', 'sportspress_output_post_excerpt', 20 );
|
90 |
|
91 |
/**
|
92 |
* Single Table Content
|
98 |
/**
|
99 |
* Before Single Player
|
100 |
* @see sportspress_output_player_photo()
|
101 |
+
* @see sportspress_output_player_details()
|
102 |
+
* @see sportspress_output_post_excerpt()
|
103 |
*/
|
104 |
add_action( 'sportspress_before_single_player', 'sportspress_output_player_photo', 10 );
|
105 |
+
add_action( 'sportspress_before_single_player', 'sportspress_output_player_details', 15 );
|
106 |
+
add_action( 'sportspress_before_single_player', 'sportspress_output_post_excerpt', 20 );
|
107 |
|
108 |
/**
|
109 |
* Single Player Content
|
110 |
*
|
|
|
111 |
* @see sportspress_output_player_statistics()
|
112 |
*/
|
|
|
113 |
add_action( 'sportspress_single_player_content', 'sportspress_output_player_statistics', 20 );
|
114 |
|
115 |
/**
|
122 |
/**
|
123 |
* Before Single Staff
|
124 |
* @see sportspress_output_staff_photo()
|
|
|
|
|
|
|
|
|
|
|
|
|
125 |
* @see sportspress_output_staff_details()
|
126 |
+
* @see sportspress_output_post_excerpt()
|
127 |
*/
|
128 |
+
add_action( 'sportspress_before_single_staff', 'sportspress_output_staff_photo', 10 );
|
129 |
+
add_action( 'sportspress_before_single_staff', 'sportspress_output_staff_details', 15 );
|
130 |
+
add_action( 'sportspress_before_single_staff', 'sportspress_output_post_excerpt', 20 );
|
131 |
|
132 |
/**
|
133 |
* Venue Archive Content
|
286 |
|
287 |
function sportspress_no_terms_links( $term_list, $taxonomy ) {
|
288 |
|
289 |
+
if ( in_array( $taxonomy, array( 'sp_league', 'sp_season', 'sp_position', 'sp_role' ) ) )
|
290 |
return wp_filter_nohtml_kses( $term_list );
|
291 |
|
292 |
return $term_list;
|
423 |
|
424 |
add_filter('post_updated_messages', 'sportspress_post_updated_messages');
|
425 |
|
426 |
+
function sportspress_remove_page_parent_class( $classes, $item ) {
|
427 |
+
if ( ( is_sp_post_type( get_post_type() ) && $key = array_search( 'current_page_parent', $classes ) ) !== false ) {
|
428 |
+
unset( $classes[$key] );
|
429 |
+
}
|
430 |
+
return $classes;
|
431 |
+
}
|
432 |
+
|
433 |
+
add_filter( 'nav_menu_css_class', 'sportspress_remove_page_parent_class', 10, 2 );
|
includes/widgets/class-sp-widget-birthdays.php
ADDED
@@ -0,0 +1,72 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class SP_Widget_Birthdays extends WP_Widget {
|
3 |
+
|
4 |
+
function __construct() {
|
5 |
+
$widget_ops = array('classname' => 'widget_sportspress widget_birthdays widget_sp_birthdays', 'description' => __( 'Display players and staff on their birthday.', 'sportspress' ) );
|
6 |
+
parent::__construct('sportspress-birthdays', __( 'Birthdays', 'sportspress' ), $widget_ops);
|
7 |
+
}
|
8 |
+
|
9 |
+
function widget( $args, $instance ) {
|
10 |
+
extract($args);
|
11 |
+
$title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base);
|
12 |
+
$date = empty($instance['date']) ? 'day' : strip_tags($instance['date']);
|
13 |
+
|
14 |
+
do_action( 'sportspress_before_widget', $args, $instance, 'birthdays' );
|
15 |
+
echo $before_widget;
|
16 |
+
|
17 |
+
if ( $title )
|
18 |
+
echo $before_title . $title . $after_title;
|
19 |
+
|
20 |
+
// Action to hook into
|
21 |
+
do_action( 'sportspress_before_widget_template', $args, $instance, 'birthdays' );
|
22 |
+
|
23 |
+
sp_get_template( 'birthdays.php', array( 'date' => $date ) );
|
24 |
+
|
25 |
+
// Action to hook into
|
26 |
+
do_action( 'sportspress_after_widget_template', $args, $instance, 'birthdays' );
|
27 |
+
|
28 |
+
echo $after_widget;
|
29 |
+
do_action( 'sportspress_after_widget', $args, $instance, 'birthdays' );
|
30 |
+
}
|
31 |
+
|
32 |
+
function update( $new_instance, $old_instance ) {
|
33 |
+
$instance = $old_instance;
|
34 |
+
$instance['title'] = strip_tags($new_instance['title']);
|
35 |
+
$instance['date'] = strip_tags($new_instance['date']);
|
36 |
+
|
37 |
+
// Filter to hook into
|
38 |
+
$instance = apply_filters( 'sportspress_widget_update', $instance, $new_instance, $old_instance, 'birthdays' );
|
39 |
+
|
40 |
+
return $instance;
|
41 |
+
}
|
42 |
+
|
43 |
+
function form( $instance ) {
|
44 |
+
$instance = wp_parse_args( (array) $instance, array( 'title' => '', 'date' => 'day' ) );
|
45 |
+
$title = strip_tags($instance['title']);
|
46 |
+
$date = strip_tags($instance['date']);
|
47 |
+
$options = array(
|
48 |
+
'day' => __( 'Today', 'sportspress' ),
|
49 |
+
'month' => __( 'This month', 'sportspress' ),
|
50 |
+
);
|
51 |
+
|
52 |
+
// Action to hook into
|
53 |
+
do_action( 'sportspress_before_widget_template_form', $this, $instance, 'birthdays' );
|
54 |
+
?>
|
55 |
+
<p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e( 'Title:', 'sportspress' ); ?></label>
|
56 |
+
<input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr($title); ?>" /></p>
|
57 |
+
|
58 |
+
<p>
|
59 |
+
<label for="<?php echo $this->get_field_id('date'); ?>"><?php _e( 'Birthday:', 'sportspress' ); ?></label>
|
60 |
+
<select name="<?php echo $this->get_field_name('date'); ?>" id="<?php echo $this->get_field_id('date'); ?>" class="postform widefat">
|
61 |
+
<?php foreach ( $options as $value => $label ) { ?>
|
62 |
+
<option value="<?php echo $value; ?>" <?php selected( $value, $date ); ?>><?php echo $label; ?></option>
|
63 |
+
<?php } ?>
|
64 |
+
</select>
|
65 |
+
</p>
|
66 |
+
<?php
|
67 |
+
// Action to hook into
|
68 |
+
do_action( 'sportspress_after_widget_template_form', $this, $instance, 'birthdays' );
|
69 |
+
}
|
70 |
+
}
|
71 |
+
|
72 |
+
register_widget( 'SP_Widget_Birthdays' );
|
includes/widgets/class-sp-widget-event-blocks.php
CHANGED
@@ -8,8 +8,14 @@ class SP_Widget_Event_Blocks extends WP_Widget {
|
|
8 |
|
9 |
function widget( $args, $instance ) {
|
10 |
extract($args);
|
11 |
-
|
12 |
$id = empty($instance['id']) ? null : $instance['id'];
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
$caption = empty($instance['caption']) ? null : $instance['caption'];
|
14 |
$status = empty($instance['status']) ? 'default' : $instance['status'];
|
15 |
$date = empty($instance['date']) ? 'default' : $instance['date'];
|
8 |
|
9 |
function widget( $args, $instance ) {
|
10 |
extract($args);
|
11 |
+
|
12 |
$id = empty($instance['id']) ? null : $instance['id'];
|
13 |
+
if ( $id && 'yes' == get_option( 'sportspress_widget_unique', 'no' ) && get_the_ID() === $id ) {
|
14 |
+
$format = get_post_meta( $id, 'sp_format', true );
|
15 |
+
if ( 'blocks' == $format ) return;
|
16 |
+
}
|
17 |
+
|
18 |
+
$title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base);
|
19 |
$caption = empty($instance['caption']) ? null : $instance['caption'];
|
20 |
$status = empty($instance['status']) ? 'default' : $instance['status'];
|
21 |
$date = empty($instance['date']) ? 'default' : $instance['date'];
|
includes/widgets/class-sp-widget-event-calendar.php
CHANGED
@@ -8,8 +8,14 @@ class SP_Widget_Event_Calendar extends WP_Widget {
|
|
8 |
|
9 |
function widget( $args, $instance ) {
|
10 |
extract($args);
|
11 |
-
|
12 |
$id = empty($instance['id']) ? null : $instance['id'];
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
$status = empty($instance['status']) ? 'default' : $instance['status'];
|
14 |
$date = empty($instance['date']) ? 'default' : $instance['date'];
|
15 |
$date_from = empty($instance['date_from']) ? 'default' : $instance['date_from'];
|
8 |
|
9 |
function widget( $args, $instance ) {
|
10 |
extract($args);
|
11 |
+
|
12 |
$id = empty($instance['id']) ? null : $instance['id'];
|
13 |
+
if ( $id && 'yes' == get_option( 'sportspress_widget_unique', 'no' ) && get_the_ID() === $id ) {
|
14 |
+
$format = get_post_meta( $id, 'sp_format', true );
|
15 |
+
if ( 'calendar' == $format ) return;
|
16 |
+
}
|
17 |
+
|
18 |
+
$title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base);
|
19 |
$status = empty($instance['status']) ? 'default' : $instance['status'];
|
20 |
$date = empty($instance['date']) ? 'default' : $instance['date'];
|
21 |
$date_from = empty($instance['date_from']) ? 'default' : $instance['date_from'];
|
includes/widgets/class-sp-widget-event-list.php
CHANGED
@@ -8,8 +8,14 @@ class SP_Widget_Event_List extends WP_Widget {
|
|
8 |
|
9 |
function widget( $args, $instance ) {
|
10 |
extract($args);
|
11 |
-
|
12 |
$id = empty($instance['id']) ? null : $instance['id'];
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
$caption = empty($instance['caption']) ? null : $instance['caption'];
|
14 |
$status = empty($instance['status']) ? 'default' : $instance['status'];
|
15 |
$date = empty($instance['date']) ? 'default' : $instance['date'];
|
8 |
|
9 |
function widget( $args, $instance ) {
|
10 |
extract($args);
|
11 |
+
|
12 |
$id = empty($instance['id']) ? null : $instance['id'];
|
13 |
+
if ( $id && 'yes' == get_option( 'sportspress_widget_unique', 'no' ) && get_the_ID() === $id ) {
|
14 |
+
$format = get_post_meta( $id, 'sp_format', true );
|
15 |
+
if ( 'list' == $format ) return;
|
16 |
+
}
|
17 |
+
|
18 |
+
$title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base);
|
19 |
$caption = empty($instance['caption']) ? null : $instance['caption'];
|
20 |
$status = empty($instance['status']) ? 'default' : $instance['status'];
|
21 |
$date = empty($instance['date']) ? 'default' : $instance['date'];
|
includes/widgets/class-sp-widget-league-table.php
CHANGED
@@ -8,8 +8,13 @@ class SP_Widget_League_Table extends WP_Widget {
|
|
8 |
|
9 |
function widget( $args, $instance ) {
|
10 |
extract($args);
|
|
|
11 |
$id = empty($instance['id']) ? 0 : $instance['id'];
|
|
|
12 |
if ( $id <= 0 ) return;
|
|
|
|
|
|
|
13 |
$title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base);
|
14 |
$caption = empty($instance['caption']) ? null : $instance['caption'];
|
15 |
$number = empty($instance['number']) ? null : $instance['number'];
|
8 |
|
9 |
function widget( $args, $instance ) {
|
10 |
extract($args);
|
11 |
+
|
12 |
$id = empty($instance['id']) ? 0 : $instance['id'];
|
13 |
+
|
14 |
if ( $id <= 0 ) return;
|
15 |
+
|
16 |
+
if ( 'yes' == get_option( 'sportspress_widget_unique', 'no' ) && get_the_ID() === $id ) return;
|
17 |
+
|
18 |
$title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base);
|
19 |
$caption = empty($instance['caption']) ? null : $instance['caption'];
|
20 |
$number = empty($instance['number']) ? null : $instance['number'];
|
includes/widgets/class-sp-widget-player-gallery.php
CHANGED
@@ -8,8 +8,16 @@ class SP_Widget_Player_Gallery extends WP_Widget {
|
|
8 |
|
9 |
function widget( $args, $instance ) {
|
10 |
extract($args);
|
|
|
11 |
$id = empty($instance['id']) ? 0 : $instance['id'];
|
|
|
12 |
if ( $id <= 0 ) return;
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
$title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base);
|
14 |
$caption = empty($instance['caption']) ? null : $instance['caption'];
|
15 |
$number = empty($instance['number']) ? null : $instance['number'];
|
@@ -17,7 +25,6 @@ class SP_Widget_Player_Gallery extends WP_Widget {
|
|
17 |
$orderby = empty($instance['orderby']) ? 'default' : $instance['orderby'];
|
18 |
$order = empty($instance['order']) ? 'ASC' : $instance['order'];
|
19 |
$show_all_players_link = empty($instance['show_all_players_link']) ? false : $instance['show_all_players_link'];
|
20 |
-
$show_names_on_hover = empty($instance['show_names_on_hover']) ? false : $instance['show_names_on_hover'];
|
21 |
|
22 |
do_action( 'sportspress_before_widget', $args, $instance, 'player-gallery' );
|
23 |
echo $before_widget;
|
@@ -28,7 +35,7 @@ class SP_Widget_Player_Gallery extends WP_Widget {
|
|
28 |
// Action to hook into
|
29 |
do_action( 'sportspress_before_widget_template', $args, $instance, 'player-gallery' );
|
30 |
|
31 |
-
sp_get_template( 'player-gallery.php', array( 'id' => $id, 'title' => $caption, 'number' => $number, 'columns' => $columns, 'orderby' => $orderby , 'order' => $order, 'grouping' => 0, 'show_all_players_link' => $show_all_players_link
|
32 |
|
33 |
// Action to hook into
|
34 |
do_action( 'sportspress_after_widget_template', $args, $instance, 'player-gallery' );
|
@@ -47,7 +54,6 @@ class SP_Widget_Player_Gallery extends WP_Widget {
|
|
47 |
$instance['orderby'] = strip_tags($new_instance['orderby']);
|
48 |
$instance['order'] = strip_tags($new_instance['order']);
|
49 |
$instance['show_all_players_link'] = $new_instance['show_all_players_link'];
|
50 |
-
$instance['show_names_on_hover'] = $new_instance['show_names_on_hover'];
|
51 |
|
52 |
// Filter to hook into
|
53 |
$instance = apply_filters( 'sportspress_widget_update', $instance, $new_instance, $old_instance, 'player-gallery' );
|
@@ -56,7 +62,7 @@ class SP_Widget_Player_Gallery extends WP_Widget {
|
|
56 |
}
|
57 |
|
58 |
function form( $instance ) {
|
59 |
-
$instance = wp_parse_args( (array) $instance, array( 'title' => '', 'id' => '', 'caption' => '', 'number' => 5, 'columns' => 2, 'orderby' => 'default', 'order' => 'ASC', 'show_all_players_link' => true
|
60 |
$title = strip_tags($instance['title']);
|
61 |
$id = intval($instance['id']);
|
62 |
$caption = strip_tags($instance['caption']);
|
@@ -65,7 +71,6 @@ class SP_Widget_Player_Gallery extends WP_Widget {
|
|
65 |
$orderby = strip_tags($instance['orderby']);
|
66 |
$order = strip_tags($instance['order']);
|
67 |
$show_all_players_link = $instance['show_all_players_link'];
|
68 |
-
$show_names_on_hover = $instance['show_names_on_hover'];
|
69 |
|
70 |
// Action to hook into
|
71 |
do_action( 'sportspress_before_widget_template_form', $this, $instance, 'player-gallery' );
|
@@ -132,9 +137,6 @@ class SP_Widget_Player_Gallery extends WP_Widget {
|
|
132 |
<p><input class="checkbox" type="checkbox" id="<?php echo $this->get_field_id('show_all_players_link'); ?>" name="<?php echo $this->get_field_name('show_all_players_link'); ?>" value="1" <?php checked( $show_all_players_link, 1 ); ?>>
|
133 |
<label for="<?php echo $this->get_field_id('show_all_players_link'); ?>"><?php _e( 'Display link to view all players', 'sportspress' ); ?></label></p>
|
134 |
|
135 |
-
<p><input class="checkbox" type="checkbox" id="<?php echo $this->get_field_id('show_names_on_hover'); ?>" name="<?php echo $this->get_field_name('show_names_on_hover'); ?>" value="1" <?php checked( $show_names_on_hover, 1 ); ?>>
|
136 |
-
<label for="<?php echo $this->get_field_id('show_names_on_hover'); ?>"><?php _e( 'Display player names on hover', 'sportspress' ); ?></label></p>
|
137 |
-
|
138 |
<?php
|
139 |
// Action to hook into
|
140 |
do_action( 'sportspress_after_widget_template_form', $this, $instance, 'player-gallery' );
|
8 |
|
9 |
function widget( $args, $instance ) {
|
10 |
extract($args);
|
11 |
+
|
12 |
$id = empty($instance['id']) ? 0 : $instance['id'];
|
13 |
+
|
14 |
if ( $id <= 0 ) return;
|
15 |
+
|
16 |
+
if ( 'yes' == get_option( 'sportspress_widget_unique', 'no' ) && get_the_ID() === $id ) {
|
17 |
+
$format = get_post_meta( $id, 'sp_format', true );
|
18 |
+
if ( 'gallery' == $format ) return;
|
19 |
+
}
|
20 |
+
|
21 |
$title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base);
|
22 |
$caption = empty($instance['caption']) ? null : $instance['caption'];
|
23 |
$number = empty($instance['number']) ? null : $instance['number'];
|
25 |
$orderby = empty($instance['orderby']) ? 'default' : $instance['orderby'];
|
26 |
$order = empty($instance['order']) ? 'ASC' : $instance['order'];
|
27 |
$show_all_players_link = empty($instance['show_all_players_link']) ? false : $instance['show_all_players_link'];
|
|
|
28 |
|
29 |
do_action( 'sportspress_before_widget', $args, $instance, 'player-gallery' );
|
30 |
echo $before_widget;
|
35 |
// Action to hook into
|
36 |
do_action( 'sportspress_before_widget_template', $args, $instance, 'player-gallery' );
|
37 |
|
38 |
+
sp_get_template( 'player-gallery.php', array( 'id' => $id, 'title' => $caption, 'number' => $number, 'columns' => $columns, 'orderby' => $orderby , 'order' => $order, 'grouping' => 0, 'show_all_players_link' => $show_all_players_link ) );
|
39 |
|
40 |
// Action to hook into
|
41 |
do_action( 'sportspress_after_widget_template', $args, $instance, 'player-gallery' );
|
54 |
$instance['orderby'] = strip_tags($new_instance['orderby']);
|
55 |
$instance['order'] = strip_tags($new_instance['order']);
|
56 |
$instance['show_all_players_link'] = $new_instance['show_all_players_link'];
|
|
|
57 |
|
58 |
// Filter to hook into
|
59 |
$instance = apply_filters( 'sportspress_widget_update', $instance, $new_instance, $old_instance, 'player-gallery' );
|
62 |
}
|
63 |
|
64 |
function form( $instance ) {
|
65 |
+
$instance = wp_parse_args( (array) $instance, array( 'title' => '', 'id' => '', 'caption' => '', 'number' => 5, 'columns' => 2, 'orderby' => 'default', 'order' => 'ASC', 'show_all_players_link' => true ) );
|
66 |
$title = strip_tags($instance['title']);
|
67 |
$id = intval($instance['id']);
|
68 |
$caption = strip_tags($instance['caption']);
|
71 |
$orderby = strip_tags($instance['orderby']);
|
72 |
$order = strip_tags($instance['order']);
|
73 |
$show_all_players_link = $instance['show_all_players_link'];
|
|
|
74 |
|
75 |
// Action to hook into
|
76 |
do_action( 'sportspress_before_widget_template_form', $this, $instance, 'player-gallery' );
|
137 |
<p><input class="checkbox" type="checkbox" id="<?php echo $this->get_field_id('show_all_players_link'); ?>" name="<?php echo $this->get_field_name('show_all_players_link'); ?>" value="1" <?php checked( $show_all_players_link, 1 ); ?>>
|
138 |
<label for="<?php echo $this->get_field_id('show_all_players_link'); ?>"><?php _e( 'Display link to view all players', 'sportspress' ); ?></label></p>
|
139 |
|
|
|
|
|
|
|
140 |
<?php
|
141 |
// Action to hook into
|
142 |
do_action( 'sportspress_after_widget_template_form', $this, $instance, 'player-gallery' );
|
includes/widgets/class-sp-widget-player-list.php
CHANGED
@@ -8,8 +8,16 @@ class SP_Widget_Player_list extends WP_Widget {
|
|
8 |
|
9 |
function widget( $args, $instance ) {
|
10 |
extract($args);
|
|
|
11 |
$id = empty($instance['id']) ? 0 : $instance['id'];
|
|
|
12 |
if ( $id <= 0 ) return;
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
$title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base);
|
14 |
$caption = empty($instance['caption']) ? null : $instance['caption'];
|
15 |
$number = empty($instance['number']) ? null : $instance['number'];
|
@@ -107,6 +115,17 @@ class SP_Widget_Player_list extends WP_Widget {
|
|
107 |
$field_name = $this->get_field_name('columns') . '[]';
|
108 |
$field_id = $this->get_field_id('columns');
|
109 |
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
110 |
<?php foreach ( $the_columns as $column ): ?>
|
111 |
<label class="button"><input name="<?php echo $field_name; ?>" type="checkbox" id="<?php echo $field_id . '-' . $column->post_name; ?>" value="<?php echo $column->post_name; ?>" <?php if ( $columns === null || in_array( $column->post_name, $columns ) ): ?>checked="checked"<?php endif; ?>><?php echo $column->post_title; ?></label>
|
112 |
<?php endforeach; ?>
|
8 |
|
9 |
function widget( $args, $instance ) {
|
10 |
extract($args);
|
11 |
+
|
12 |
$id = empty($instance['id']) ? 0 : $instance['id'];
|
13 |
+
|
14 |
if ( $id <= 0 ) return;
|
15 |
+
|
16 |
+
if ( 'yes' == get_option( 'sportspress_widget_unique', 'no' ) && get_the_ID() === $id ) {
|
17 |
+
$format = get_post_meta( $id, 'sp_format', true );
|
18 |
+
if ( 'list' == $format ) return;
|
19 |
+
}
|
20 |
+
|
21 |
$title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base);
|
22 |
$caption = empty($instance['caption']) ? null : $instance['caption'];
|
23 |
$number = empty($instance['number']) ? null : $instance['number'];
|
115 |
$field_name = $this->get_field_name('columns') . '[]';
|
116 |
$field_id = $this->get_field_id('columns');
|
117 |
?>
|
118 |
+
<label class="button"><input name="<?php echo $field_name; ?>" type="checkbox" id="<?php echo $field_id; ?>-number" value="number" <?php if ( $columns === null || in_array( 'number', $columns ) ): ?>checked="checked"<?php endif; ?>><?php
|
119 |
+
if ( 'default' == $orderby ) {
|
120 |
+
_e( 'Rank', 'sportspress' );
|
121 |
+
echo '/';
|
122 |
+
_e( 'Squad Number', 'sportspress' );
|
123 |
+
} elseif ( in_array( $orderby, array( 'number', 'name' ) ) ) {
|
124 |
+
_e( 'Squad Number', 'sportspress' );
|
125 |
+
} else {
|
126 |
+
_e( 'Rank', 'sportspress' );
|
127 |
+
}
|
128 |
+
?></label>
|
129 |
<?php foreach ( $the_columns as $column ): ?>
|
130 |
<label class="button"><input name="<?php echo $field_name; ?>" type="checkbox" id="<?php echo $field_id . '-' . $column->post_name; ?>" value="<?php echo $column->post_name; ?>" <?php if ( $columns === null || in_array( $column->post_name, $columns ) ): ?>checked="checked"<?php endif; ?>><?php echo $column->post_title; ?></label>
|
131 |
<?php endforeach; ?>
|
languages/sportspress-ar.mo
CHANGED
Binary file
|
languages/sportspress-az.mo
CHANGED
Binary file
|
languages/sportspress-be_BY.mo
CHANGED
Binary file
|
languages/sportspress-bg_BG.mo
CHANGED
Binary file
|
languages/sportspress-bn_BD.mo
CHANGED
Binary file
|
languages/sportspress-bs_BA.mo
CHANGED
Binary file
|
languages/sportspress-ca.mo
CHANGED
Binary file
|
languages/sportspress-cs_CZ.mo
CHANGED
Binary file
|
languages/sportspress-cy.mo
CHANGED
Binary file
|
languages/sportspress-da_DK.mo
CHANGED
Binary file
|
languages/sportspress-de_DE.mo
CHANGED
Binary file
|
languages/sportspress-el.mo
CHANGED
Binary file
|
languages/sportspress-es_CL.mo
ADDED
Binary file
|
languages/sportspress-es_ES.mo
CHANGED
Binary file
|
languages/sportspress-et.mo
CHANGED
Binary file
|
languages/sportspress-eu.mo
CHANGED
Binary file
|
languages/sportspress-fa_IR.mo
CHANGED
Binary file
|
languages/sportspress-fi.mo
CHANGED
Binary file
|
languages/sportspress-fr_FR.mo
CHANGED
Binary file
|
languages/sportspress-gl_ES.mo
CHANGED
Binary file
|
languages/sportspress-he_IL.mo
CHANGED
Binary file
|
languages/sportspress-hi_IN.mo
ADDED
Binary file
|
languages/sportspress-hr.mo
CHANGED
Binary file
|
languages/sportspress-hu_HU.mo
CHANGED
Binary file
|
languages/sportspress-hy.mo
CHANGED
Binary file
|
languages/sportspress-id_ID.mo
CHANGED
Binary file
|
languages/sportspress-is_IS.mo
CHANGED
Binary file
|
languages/sportspress-it_IT.mo
CHANGED
Binary file
|
languages/sportspress-ja.mo
CHANGED
Binary file
|
languages/sportspress-kk.mo
CHANGED
Binary file
|
languages/sportspress-kn.mo
CHANGED
Binary file
|
languages/sportspress-ko_KR.mo
CHANGED
Binary file
|
languages/sportspress-lt_LT.mo
ADDED
Binary file
|
languages/sportspress-mk_MK.mo
CHANGED
Binary file
|
languages/sportspress-ms_MY.mo
CHANGED
Binary file
|
languages/sportspress-nb_NO.mo
CHANGED
Binary file
|
languages/sportspress-nl_NL.mo
CHANGED
Binary file
|
languages/sportspress-nn_NO.mo
CHANGED
Binary file
|
languages/sportspress-pl_PL.mo
CHANGED
Binary file
|
languages/sportspress-pt_BR.mo
CHANGED
Binary file
|
languages/sportspress-pt_PT.mo
CHANGED
Binary file
|
languages/sportspress-ro_RO.mo
CHANGED
Binary file
|
languages/sportspress-ru_RU.mo
CHANGED
Binary file
|
languages/sportspress-sk_SK.mo
CHANGED
Binary file
|
languages/sportspress-sl_SI.mo
CHANGED
Binary file
|
languages/sportspress-sq.mo
CHANGED
Binary file
|
languages/sportspress-sr_RS.mo
CHANGED
Binary file
|
languages/sportspress-sv_SE.mo
CHANGED
Binary file
|
languages/sportspress-ta_IN.mo
ADDED
Binary file
|
languages/sportspress-te.mo
CHANGED
Binary file
|
languages/sportspress-th.mo
CHANGED
Binary file
|
languages/sportspress-tl.mo
CHANGED
Binary file
|
languages/sportspress-tr_TR.mo
CHANGED
Binary file
|
languages/sportspress-uk.mo
CHANGED
Binary file
|
languages/sportspress-ur.mo
CHANGED
Binary file
|
languages/sportspress-vi.mo
CHANGED
Binary file
|
languages/sportspress-zh_CN.mo
CHANGED
Binary file
|
languages/sportspress-zh_HK.mo
ADDED
Binary file
|
languages/sportspress-zh_TW.mo
CHANGED
Binary file
|
languages/sportspress.pot
CHANGED
@@ -1,15 +1,15 @@
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: SportsPress\n"
|
4 |
-
"POT-Creation-Date:
|
5 |
-
"PO-Revision-Date:
|
6 |
"Last-Translator: Brian Miyaji <brian@themeboy.com>\n"
|
7 |
"Language-Team: ThemeBoy <support@themeboy.com>\n"
|
8 |
"Language: en_US\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"X-Generator: Poedit 1.6
|
13 |
"X-Poedit-Basepath: ..\n"
|
14 |
"X-Poedit-SourceCharset: UTF-8\n"
|
15 |
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
|
@@ -17,26 +17,29 @@ msgstr ""
|
|
17 |
"_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
|
18 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
19 |
"X-Poedit-SearchPath-0: .\n"
|
|
|
20 |
|
21 |
#: assets/js/admin/editor-lang.php:22
|
22 |
msgid "SportsPress Shortcodes"
|
23 |
msgstr ""
|
24 |
|
25 |
#: assets/js/admin/editor-lang.php:23
|
26 |
-
#: includes/admin/post-types/
|
27 |
-
#: includes/admin/post-types/
|
28 |
-
#: includes/admin/
|
29 |
-
#: includes/admin/
|
|
|
|
|
30 |
#: includes/admin/settings/class-sp-settings-general.php:91
|
31 |
-
#: includes/admin/settings/class-sp-settings-general.php:
|
32 |
msgid "Auto"
|
33 |
msgstr ""
|
34 |
|
35 |
#: assets/js/admin/editor-lang.php:24
|
36 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-list-details.php:
|
37 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-table-details.php:
|
38 |
-
#: includes/admin/settings/class-sp-settings-events.php:
|
39 |
-
#: includes/admin/settings/class-sp-settings-events.php:
|
40 |
msgid "Manual"
|
41 |
msgstr ""
|
42 |
|
@@ -45,53 +48,59 @@ msgid "Select..."
|
|
45 |
msgstr ""
|
46 |
|
47 |
#: assets/js/admin/editor-lang.php:26
|
48 |
-
#: includes/admin/class-sp-admin-sample-data.php:
|
49 |
#: includes/admin/post-types/class-sp-admin-cpt-event.php:105
|
50 |
-
#: includes/admin/post-types/class-sp-admin-meta-boxes.php:
|
51 |
-
#: includes/class-sp-ajax.php:57 includes/class-sp-ajax.php:
|
52 |
-
#: includes/class-sp-ajax.php:
|
53 |
-
#: includes/class-sp-ajax.php:
|
54 |
-
#: includes/sp-core-functions.php:
|
55 |
#: includes/widgets/class-sp-widget-countdown.php:86
|
56 |
-
#: includes/widgets/class-sp-widget-event-list.php:
|
57 |
-
#: templates/event-list.php:
|
58 |
msgid "Event"
|
59 |
msgstr ""
|
60 |
|
61 |
#: assets/js/admin/editor-lang.php:27
|
62 |
#: includes/admin/post-types/class-sp-admin-meta-boxes.php:32
|
63 |
#: includes/admin/post-types/class-sp-admin-meta-boxes.php:41
|
64 |
-
#: includes/admin/post-types/class-sp-admin-meta-boxes.php:
|
65 |
-
#: includes/admin/post-types/class-sp-admin-meta-boxes.php:
|
66 |
-
#: includes/admin/post-types/class-sp-admin-meta-boxes.php:
|
67 |
-
#: includes/admin/post-types/class-sp-admin-meta-boxes.php:
|
68 |
-
#: includes/admin/post-types/class-sp-admin-meta-boxes.php:
|
69 |
-
#: includes/admin/post-types/class-sp-admin-meta-boxes.php:
|
70 |
-
#: includes/admin/post-types/class-sp-admin-meta-boxes.php:
|
71 |
-
#: includes/admin/post-types/class-sp-admin-meta-boxes.php:
|
72 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-data.php:
|
73 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-event-shortcode.php:24
|
74 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-list-data.php:
|
75 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-player-shortcode.php:27
|
76 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-team-lists.php:110
|
|
|
77 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-team-tables.php:106
|
78 |
-
#: includes/admin/settings/class-sp-settings-events.php:
|
79 |
#: includes/admin/settings/class-sp-settings-players.php:64
|
|
|
80 |
#: includes/admin/settings/class-sp-settings-staff.php:63
|
|
|
81 |
#: includes/admin/settings/class-sp-settings-teams.php:64
|
82 |
-
#: includes/sp-core-functions.php:
|
83 |
#: modules/sportspress-calendars.php:272
|
84 |
-
#: modules/sportspress-league-tables.php:
|
85 |
-
#: modules/sportspress-player-lists.php:
|
86 |
msgid "Details"
|
87 |
msgstr ""
|
88 |
|
89 |
#: assets/js/admin/editor-lang.php:28
|
90 |
#: includes/admin/importers/class-sp-event-importer.php:30
|
|
|
91 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-data.php:84
|
92 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-event-shortcode.php:23
|
93 |
-
#: includes/admin/settings/class-sp-settings-events.php:
|
94 |
-
#:
|
|
|
|
|
95 |
msgid "Results"
|
96 |
msgstr ""
|
97 |
|
@@ -101,52 +110,56 @@ msgid "Countdown"
|
|
101 |
msgstr ""
|
102 |
|
103 |
#: assets/js/admin/editor-lang.php:30
|
104 |
-
#: includes/admin/post-types/
|
105 |
-
#: includes/sp-
|
106 |
-
|
|
|
|
|
|
|
|
|
107 |
msgstr ""
|
108 |
|
109 |
#: assets/js/admin/editor-lang.php:31
|
110 |
-
#: includes/admin/class-sp-admin-sample-data.php:
|
111 |
-
#: includes/class-sp-ajax.php:
|
112 |
-
#: includes/class-sp-ajax.php:
|
113 |
-
#: includes/widgets/class-sp-widget-event-blocks.php:
|
114 |
-
#: includes/widgets/class-sp-widget-event-calendar.php:
|
115 |
-
#: includes/widgets/class-sp-widget-event-list.php:
|
116 |
#: modules/sportspress-calendars.php:66
|
117 |
msgid "Calendar"
|
118 |
msgstr ""
|
119 |
|
120 |
#: assets/js/admin/editor-lang.php:32
|
121 |
-
#: includes/admin/post-types/class-sp-admin-meta-boxes.php:
|
122 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-list-columns.php:
|
123 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-player-shortcode.php:31
|
124 |
#: includes/admin/settings/class-sp-settings-players.php:72
|
125 |
msgid "Statistics"
|
126 |
msgstr ""
|
127 |
|
128 |
#: assets/js/admin/editor-lang.php:33
|
129 |
-
#: includes/admin/class-sp-admin-sample-data.php:
|
130 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-team-tables.php:55
|
131 |
-
#: includes/class-sp-ajax.php:
|
132 |
#: includes/widgets/class-sp-widget-league-table.php:6
|
133 |
-
#: includes/widgets/class-sp-widget-league-table.php:
|
134 |
-
#: modules/sportspress-league-tables.php:
|
135 |
-
#: modules/sportspress-league-tables.php:
|
136 |
msgid "League Table"
|
137 |
msgstr ""
|
138 |
|
139 |
#: assets/js/admin/editor-lang.php:34
|
140 |
-
#: includes/admin/class-sp-admin-sample-data.php:
|
141 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-event-performance.php:
|
142 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-list-data.php:
|
143 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-list-data.php:
|
144 |
-
#: includes/class-sp-ajax.php:
|
145 |
-
#: includes/class-sp-install.php:161 includes/class-sp-player-list.php:
|
146 |
-
#: includes/class-sp-post-types.php:
|
147 |
-
#: modules/sportspress-individual-mode.php:
|
148 |
-
#: templates/event-performance-table-combined.php:
|
149 |
-
#: templates/event-performance-table.php:
|
150 |
msgid "Player"
|
151 |
msgstr ""
|
152 |
|
@@ -171,13 +184,13 @@ msgstr ""
|
|
171 |
#: includes/admin/class-sp-admin-settings.php:128
|
172 |
#: includes/admin/importers/class-sp-event-importer.php:487
|
173 |
#: includes/admin/importers/class-sp-event-importer.php:502
|
174 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-data.php:
|
175 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-event-performance.php:
|
176 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-event-
|
177 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-list-details.php:
|
178 |
#: includes/admin/settings/class-sp-settings-status.php:260
|
179 |
#: includes/admin/views/html-admin-page-status.php:224
|
180 |
-
#: modules/sportspress-widget-alignment.php:
|
181 |
msgid "None"
|
182 |
msgstr ""
|
183 |
|
@@ -187,24 +200,24 @@ msgstr ""
|
|
187 |
|
188 |
#: includes/admin/class-sp-admin-assets.php:116
|
189 |
#: includes/admin/class-sp-admin-dashboard.php:80
|
190 |
-
#: includes/class-sp-frontend-scripts.php:85 templates/countdown.php:
|
191 |
msgid "days"
|
192 |
msgstr ""
|
193 |
|
194 |
#: includes/admin/class-sp-admin-assets.php:117
|
195 |
-
#: includes/class-sp-frontend-scripts.php:85 templates/countdown.php:
|
196 |
msgid "hrs"
|
197 |
msgstr ""
|
198 |
|
199 |
#: includes/admin/class-sp-admin-assets.php:118
|
200 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-event-details.php:
|
201 |
-
#: includes/admin/settings/class-sp-settings-events.php:
|
202 |
-
#: includes/class-sp-frontend-scripts.php:85 templates/countdown.php:
|
203 |
msgid "mins"
|
204 |
msgstr ""
|
205 |
|
206 |
#: includes/admin/class-sp-admin-assets.php:119
|
207 |
-
#: includes/class-sp-frontend-scripts.php:85 templates/countdown.php:
|
208 |
msgid "secs"
|
209 |
msgstr ""
|
210 |
|
@@ -219,10 +232,10 @@ msgstr ""
|
|
219 |
#: includes/admin/class-sp-admin-permalink-settings.php:47
|
220 |
#: includes/admin/class-sp-admin-welcome.php:105
|
221 |
#: includes/admin/views/html-admin-settings.php:2
|
222 |
-
#: modules/sportspress-
|
223 |
-
#: modules/sportspress-overview.php:
|
224 |
-
#: modules/sportspress-overview.php:
|
225 |
-
#: modules/sportspress-overview.php:356
|
226 |
msgid "SportsPress"
|
227 |
msgstr ""
|
228 |
|
@@ -291,7 +304,7 @@ msgid "Configure"
|
|
291 |
msgstr ""
|
292 |
|
293 |
#: includes/admin/class-sp-admin-menus.php:61
|
294 |
-
#: includes/admin/class-sp-admin-menus.php:
|
295 |
#: includes/admin/class-sp-admin-permalink-settings.php:29
|
296 |
#: includes/admin/importers/class-sp-player-importer.php:30
|
297 |
#: includes/admin/importers/class-sp-staff-importer.php:29
|
@@ -299,21 +312,23 @@ msgstr ""
|
|
299 |
#: includes/admin/post-types/class-sp-admin-cpt-player.php:68
|
300 |
#: includes/admin/post-types/class-sp-admin-cpt-staff.php:67
|
301 |
#: includes/admin/post-types/class-sp-admin-cpt-team.php:67
|
302 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-player-details.php:
|
303 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-player-details.php:
|
304 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-staff-details.php:
|
305 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-staff-details.php:
|
306 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-team-details.php:
|
307 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-team-details.php:
|
|
|
308 |
#: includes/admin/settings/class-sp-settings-status.php:334
|
309 |
#: includes/admin/views/html-admin-page-status.php:296
|
310 |
-
#: includes/class-sp-post-types.php:
|
311 |
-
#: modules/sportspress-tutorials.php:
|
|
|
312 |
msgid "Competitions"
|
313 |
msgstr ""
|
314 |
|
315 |
#: includes/admin/class-sp-admin-menus.php:68
|
316 |
-
#: includes/admin/class-sp-admin-menus.php:
|
317 |
#: includes/admin/class-sp-admin-permalink-settings.php:30
|
318 |
#: includes/admin/importers/class-sp-player-importer.php:31
|
319 |
#: includes/admin/importers/class-sp-staff-importer.php:30
|
@@ -321,104 +336,110 @@ msgstr ""
|
|
321 |
#: includes/admin/post-types/class-sp-admin-cpt-player.php:69
|
322 |
#: includes/admin/post-types/class-sp-admin-cpt-staff.php:68
|
323 |
#: includes/admin/post-types/class-sp-admin-cpt-team.php:68
|
324 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-player-details.php:
|
325 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-player-details.php:
|
326 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-staff-details.php:
|
327 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-staff-details.php:
|
328 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-team-details.php:
|
329 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-team-details.php:
|
|
|
330 |
#: includes/admin/settings/class-sp-settings-status.php:344
|
331 |
#: includes/admin/views/html-admin-page-status.php:306
|
332 |
-
#: includes/class-sp-post-types.php:
|
333 |
-
#: modules/sportspress-tutorials.php:
|
|
|
334 |
msgid "Seasons"
|
335 |
msgstr ""
|
336 |
|
337 |
-
#: includes/admin/class-sp-admin-menus.php:
|
338 |
#: includes/admin/class-sp-admin-welcome.php:123
|
339 |
-
#: includes/admin/class-sp-admin-welcome.php:224
|
|
|
340 |
msgid "Settings"
|
341 |
msgstr ""
|
342 |
|
343 |
-
#: includes/admin/class-sp-admin-menus.php:
|
344 |
#: includes/admin/importers/class-sp-event-importer.php:488
|
345 |
#: includes/admin/importers/class-sp-event-importer.php:503
|
346 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-details.php:
|
347 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-event-details.php:
|
348 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-
|
349 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-list-details.php:
|
350 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-
|
351 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-
|
352 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-
|
|
|
353 |
#: includes/admin/views/html-admin-config.php:51
|
354 |
-
#: includes/admin/views/html-admin-config.php:
|
355 |
-
#: includes/admin/views/html-admin-config.php:
|
356 |
-
#: includes/admin/views/html-admin-config.php:
|
357 |
-
#: includes/admin/views/html-admin-config.php:
|
358 |
-
#: includes/admin/views/html-admin-config.php:
|
359 |
-
#: includes/class-sp-post-types.php:
|
360 |
-
#: includes/class-sp-post-types.php:
|
361 |
-
#: includes/class-sp-post-types.php:
|
362 |
-
#: includes/sp-core-functions.php:
|
363 |
#: includes/widgets/class-sp-widget-countdown.php:81
|
364 |
#: includes/widgets/class-sp-widget-countdown.php:101
|
365 |
-
#: includes/widgets/class-sp-widget-event-blocks.php:
|
366 |
-
#: includes/widgets/class-sp-widget-event-calendar.php:
|
367 |
-
#: includes/widgets/class-sp-widget-event-list.php:
|
368 |
-
#: includes/widgets/class-sp-widget-league-table.php:
|
369 |
-
#: includes/widgets/class-sp-widget-player-gallery.php:
|
370 |
-
#: includes/widgets/class-sp-widget-player-gallery.php:
|
371 |
-
#: includes/widgets/class-sp-widget-player-list.php:
|
372 |
-
#: includes/widgets/class-sp-widget-player-list.php:
|
373 |
#: includes/widgets/class-sp-widget-staff.php:68
|
374 |
msgid "Add New"
|
375 |
msgstr ""
|
376 |
|
377 |
-
#: includes/admin/class-sp-admin-menus.php:
|
378 |
#: includes/admin/class-sp-admin-permalink-settings.php:33
|
379 |
#: includes/admin/importers/class-sp-player-importer.php:28
|
380 |
#: includes/admin/post-types/class-sp-admin-cpt-player.php:66
|
381 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-player-details.php:
|
382 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-player-details.php:
|
383 |
-
#: includes/admin/settings/class-sp-settings-events.php:
|
384 |
#: includes/admin/settings/class-sp-settings-status.php:364
|
385 |
#: includes/admin/views/html-admin-page-status.php:326
|
386 |
-
#: includes/class-sp-post-types.php:
|
387 |
-
#: modules/sportspress-tutorials.php:
|
388 |
msgid "Positions"
|
389 |
msgstr ""
|
390 |
|
391 |
-
#: includes/admin/class-sp-admin-menus.php:
|
392 |
#: includes/admin/class-sp-admin-permalink-settings.php:26
|
393 |
-
#: includes/admin/settings/class-sp-settings-events.php:
|
|
|
394 |
#: includes/admin/settings/class-sp-settings-status.php:354
|
395 |
#: includes/admin/views/html-admin-page-status.php:316
|
396 |
-
#: includes/class-sp-post-types.php:
|
397 |
-
#: modules/sportspress-tutorials.php:
|
398 |
msgid "Venues"
|
399 |
msgstr ""
|
400 |
|
401 |
#: includes/admin/class-sp-admin-permalink-settings.php:25
|
402 |
-
#: includes/admin/class-sp-admin-sample-data.php:
|
403 |
#: includes/admin/class-sp-admin-taxonomies.php:190
|
404 |
#: includes/admin/class-sp-admin-taxonomies.php:204
|
405 |
#: includes/admin/post-types/class-sp-admin-cpt-calendar.php:53
|
406 |
#: includes/admin/settings/class-sp-settings-events.php:25
|
407 |
#: includes/admin/settings/class-sp-settings-modules.php:34
|
408 |
-
#: includes/class-sp-post-types.php:
|
409 |
-
#: modules/sportspress-tutorials.php:
|
410 |
msgid "Events"
|
411 |
msgstr ""
|
412 |
|
413 |
#: includes/admin/class-sp-admin-permalink-settings.php:27
|
414 |
-
#: includes/admin/class-sp-admin-sample-data.php:
|
415 |
#: includes/class-sp-modules.php:28 modules/sportspress-calendars.php:65
|
416 |
-
#: modules/sportspress-
|
|
|
417 |
msgid "Calendars"
|
418 |
msgstr ""
|
419 |
|
420 |
#: includes/admin/class-sp-admin-permalink-settings.php:28
|
421 |
-
#: includes/admin/class-sp-admin-sample-data.php:
|
422 |
#: includes/admin/importers/class-sp-event-importer.php:29
|
423 |
#: includes/admin/importers/class-sp-player-importer.php:29
|
424 |
#: includes/admin/importers/class-sp-staff-importer.php:28
|
@@ -426,75 +447,81 @@ msgstr ""
|
|
426 |
#: includes/admin/post-types/class-sp-admin-cpt-player.php:67
|
427 |
#: includes/admin/post-types/class-sp-admin-cpt-staff.php:66
|
428 |
#: includes/admin/post-types/class-sp-admin-cpt-table.php:51
|
429 |
-
#: includes/admin/post-types/class-sp-admin-meta-boxes.php:
|
430 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-data.php:59
|
431 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-
|
432 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-player-details.php:
|
433 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-
|
434 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-staff-details.php:
|
435 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-
|
|
|
436 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-team-tables.php:58
|
437 |
-
#: includes/admin/settings/class-sp-settings-events.php:
|
438 |
-
#: includes/admin/settings/class-sp-settings-events.php:
|
439 |
-
#: includes/admin/settings/class-sp-settings-events.php:
|
440 |
#: includes/admin/settings/class-sp-settings-modules.php:35
|
441 |
#: includes/admin/settings/class-sp-settings-teams.php:25
|
442 |
-
#: includes/class-sp-ajax.php:
|
443 |
-
#: includes/sp-core-functions.php:
|
444 |
#: modules/sportspress-calendars.php:217 modules/sportspress-countdowns.php:85
|
445 |
-
#: modules/sportspress-individual-mode.php:
|
446 |
-
#: modules/sportspress-league-tables.php:
|
447 |
-
#: modules/sportspress-tutorials.php:
|
|
|
448 |
msgid "Teams"
|
449 |
msgstr ""
|
450 |
|
451 |
#: includes/admin/class-sp-admin-permalink-settings.php:31
|
452 |
-
#: includes/admin/class-sp-admin-sample-data.php:
|
453 |
-
#: includes/class-sp-modules.php:49 modules/sportspress-league-tables.php:
|
454 |
-
#: modules/sportspress-league-tables.php:
|
455 |
-
#: modules/sportspress-league-tables.php:
|
456 |
-
#: modules/sportspress-tutorials.php:
|
457 |
msgid "League Tables"
|
458 |
msgstr ""
|
459 |
|
460 |
#: includes/admin/class-sp-admin-permalink-settings.php:32
|
461 |
-
#: includes/admin/class-sp-admin-sample-data.php:
|
462 |
#: includes/admin/class-sp-admin-taxonomies.php:223
|
463 |
#: includes/admin/importers/class-sp-event-importer.php:32
|
464 |
#: includes/admin/post-types/class-sp-admin-cpt-list.php:52
|
465 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-
|
|
|
466 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-team-lists.php:58
|
467 |
-
#: includes/admin/settings/class-sp-settings-events.php:
|
468 |
-
#: includes/admin/settings/class-sp-settings-events.php:
|
469 |
#: includes/admin/settings/class-sp-settings-modules.php:36
|
470 |
#: includes/admin/settings/class-sp-settings-players.php:25
|
471 |
-
#: includes/class-sp-post-types.php:
|
472 |
-
#: modules/sportspress-individual-mode.php:
|
473 |
-
#: modules/sportspress-player-lists.php:
|
474 |
-
#: modules/sportspress-tutorials.php:
|
475 |
msgid "Players"
|
476 |
msgstr ""
|
477 |
|
478 |
#: includes/admin/class-sp-admin-permalink-settings.php:34
|
479 |
-
#: includes/admin/class-sp-admin-sample-data.php:
|
480 |
-
#: includes/admin/class-sp-admin-sample-data.php:
|
481 |
-
#: includes/class-sp-modules.php:
|
482 |
-
#: modules/sportspress-player-lists.php:
|
483 |
-
#: modules/sportspress-player-lists.php:
|
484 |
msgid "Player Lists"
|
485 |
msgstr ""
|
486 |
|
487 |
#: includes/admin/class-sp-admin-permalink-settings.php:35
|
488 |
-
#: includes/admin/class-sp-admin-sample-data.php:
|
489 |
#: includes/admin/class-sp-admin-taxonomies.php:240
|
490 |
-
#: includes/admin/
|
|
|
|
|
|
|
491 |
#: includes/admin/settings/class-sp-settings-modules.php:36
|
492 |
#: includes/admin/settings/class-sp-settings-staff.php:25
|
493 |
-
#: includes/class-sp-install.php:193 includes/class-sp-post-types.php:
|
494 |
-
#: includes/class-sp-post-types.php:
|
495 |
#: includes/widgets/class-sp-widget-staff.php:6
|
496 |
#: includes/widgets/class-sp-widget-staff.php:57
|
497 |
-
#: modules/sportspress-tutorials.php:
|
498 |
msgid "Staff"
|
499 |
msgstr ""
|
500 |
|
@@ -505,54 +532,54 @@ msgid ""
|
|
505 |
msgstr ""
|
506 |
|
507 |
#: includes/admin/class-sp-admin-post-types.php:74
|
508 |
-
#: includes/sp-template-hooks.php:
|
509 |
msgid "Settings saved."
|
510 |
msgstr ""
|
511 |
|
512 |
#: includes/admin/class-sp-admin-post-types.php:76
|
513 |
#: includes/admin/views/html-admin-config.php:50
|
514 |
-
#: includes/admin/views/html-admin-config.php:
|
515 |
-
#: includes/admin/views/html-admin-config.php:
|
516 |
-
#: includes/admin/views/html-admin-config.php:
|
517 |
-
#: includes/admin/views/html-admin-config.php:
|
518 |
-
#: includes/admin/views/html-admin-config.php:
|
519 |
-
#: includes/sp-template-hooks.php:
|
520 |
msgid "View All"
|
521 |
msgstr ""
|
522 |
|
523 |
#: includes/admin/class-sp-admin-post-types.php:81
|
524 |
#: includes/admin/class-sp-admin-post-types.php:84
|
525 |
#: includes/admin/class-sp-admin-post-types.php:89
|
526 |
-
#: includes/sp-template-hooks.php:
|
527 |
-
#: includes/sp-template-hooks.php:
|
528 |
msgid "Changes saved."
|
529 |
msgstr ""
|
530 |
|
531 |
#: includes/admin/class-sp-admin-post-types.php:86
|
532 |
#: includes/admin/class-sp-admin-post-types.php:91
|
533 |
#: includes/admin/class-sp-admin-post-types.php:101
|
534 |
-
#: includes/sp-template-hooks.php:
|
535 |
-
#: includes/sp-template-hooks.php:
|
536 |
msgid "Success!"
|
537 |
msgstr ""
|
538 |
|
539 |
#: includes/admin/class-sp-admin-post-types.php:93
|
540 |
#: includes/admin/class-sp-admin-post-types.php:99
|
541 |
#: includes/admin/class-sp-admin-post-types.php:103
|
542 |
-
#: includes/sp-template-hooks.php:
|
543 |
-
#: includes/sp-template-hooks.php:
|
544 |
#, php-format
|
545 |
msgid "Preview %s"
|
546 |
msgstr ""
|
547 |
|
548 |
#: includes/admin/class-sp-admin-post-types.php:96
|
549 |
-
#: includes/sp-template-hooks.php:
|
550 |
#, php-format
|
551 |
msgid "Scheduled for: <b>%1$s</b>."
|
552 |
msgstr ""
|
553 |
|
554 |
#: includes/admin/class-sp-admin-post-types.php:97
|
555 |
-
#: includes/sp-template-hooks.php:
|
556 |
msgid "M j, Y @ G:i"
|
557 |
msgstr ""
|
558 |
|
@@ -575,51 +602,53 @@ msgid ""
|
|
575 |
"your content. Have fun!"
|
576 |
msgstr ""
|
577 |
|
578 |
-
#: includes/admin/class-sp-admin-sample-data.php:
|
579 |
#: includes/admin/post-types/class-sp-admin-cpt-calendar.php:52
|
580 |
#: includes/admin/post-types/class-sp-admin-cpt-list.php:51
|
581 |
#: includes/admin/post-types/class-sp-admin-cpt-team.php:70
|
582 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-details.php:
|
583 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-event-results.php:
|
584 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-list-
|
585 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-list-
|
|
|
586 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-player-statistics.php:69
|
587 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-player-statistics.php:72
|
588 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-table-data.php:57
|
589 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-table-data.php:119
|
590 |
-
#: includes/admin/settings/class-sp-settings-events.php:
|
591 |
-
#: includes/class-sp-
|
592 |
-
#: includes/class-sp-
|
593 |
-
#: includes/class-sp-player.php:
|
594 |
-
#: includes/class-sp-
|
|
|
595 |
#: includes/widgets/class-sp-widget-countdown.php:69
|
596 |
#: templates/event-results.php:108
|
597 |
msgid "Team"
|
598 |
msgstr ""
|
599 |
|
600 |
-
#: includes/admin/class-sp-admin-sample-data.php:
|
601 |
msgctxt "example"
|
602 |
msgid "Fixtures & Results"
|
603 |
msgstr ""
|
604 |
|
605 |
-
#: includes/admin/class-sp-admin-sample-data.php:
|
606 |
msgctxt "example"
|
607 |
msgid "Roster"
|
608 |
msgstr ""
|
609 |
|
610 |
-
#: includes/admin/class-sp-admin-sample-data.php:
|
611 |
-
#: includes/admin/class-sp-admin-sample-data.php:
|
612 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-team-lists.php:55
|
613 |
-
#: includes/class-sp-ajax.php:
|
614 |
-
#: includes/widgets/class-sp-widget-player-gallery.php:
|
615 |
#: includes/widgets/class-sp-widget-player-list.php:6
|
616 |
-
#: includes/widgets/class-sp-widget-player-list.php:
|
617 |
#: modules/sportspress-player-lists.php:66
|
618 |
-
#: modules/sportspress-player-lists.php:
|
619 |
msgid "Player List"
|
620 |
msgstr ""
|
621 |
|
622 |
-
#: includes/admin/class-sp-admin-sample-data.php:
|
623 |
msgctxt "example"
|
624 |
msgid "Player Ranking"
|
625 |
msgstr ""
|
@@ -637,121 +666,126 @@ msgstr ""
|
|
637 |
msgid "Install demo content"
|
638 |
msgstr ""
|
639 |
|
640 |
-
#: includes/admin/class-sp-admin-sports.php:
|
641 |
msgid "Team Sports"
|
642 |
msgstr ""
|
643 |
|
644 |
-
#: includes/admin/class-sp-admin-sports.php:
|
645 |
msgid "Racket Sports"
|
646 |
msgstr ""
|
647 |
|
648 |
-
#: includes/admin/class-sp-admin-sports.php:
|
649 |
msgid "Water Sports"
|
650 |
msgstr ""
|
651 |
|
652 |
-
#: includes/admin/class-sp-admin-sports.php:
|
653 |
msgid "Target Sports"
|
654 |
msgstr ""
|
655 |
|
656 |
-
#: includes/admin/class-sp-admin-sports.php:
|
657 |
msgid "Esports"
|
658 |
msgstr ""
|
659 |
|
660 |
-
#: includes/admin/class-sp-admin-sports.php:
|
661 |
#: includes/admin/settings/class-sp-settings-modules.php:38
|
|
|
662 |
msgid "Other"
|
663 |
msgstr ""
|
664 |
|
665 |
-
#: includes/admin/class-sp-admin-sports.php:
|
666 |
msgid "Baseball"
|
667 |
msgstr ""
|
668 |
|
669 |
-
#: includes/admin/class-sp-admin-sports.php:
|
670 |
msgid "Basketball"
|
671 |
msgstr ""
|
672 |
|
673 |
-
#: includes/admin/class-sp-admin-sports.php:
|
674 |
msgid "Cricket"
|
675 |
msgstr ""
|
676 |
|
677 |
-
#: includes/admin/class-sp-admin-sports.php:
|
678 |
msgid "Darts"
|
679 |
msgstr ""
|
680 |
|
681 |
-
#: includes/admin/class-sp-admin-sports.php:
|
682 |
msgid "Floorball"
|
683 |
msgstr ""
|
684 |
|
685 |
-
#: includes/admin/class-sp-admin-sports.php:
|
686 |
-
msgid "Football"
|
687 |
msgstr ""
|
688 |
|
689 |
-
#: includes/admin/class-sp-admin-sports.php:
|
690 |
msgid "American Football"
|
691 |
msgstr ""
|
692 |
|
693 |
-
#: includes/admin/class-sp-admin-sports.php:
|
694 |
msgid "Australian Rules Football"
|
695 |
msgstr ""
|
696 |
|
697 |
-
#: includes/admin/class-sp-admin-sports.php:
|
698 |
msgid "Handball"
|
699 |
msgstr ""
|
700 |
|
701 |
-
#: includes/admin/class-sp-admin-sports.php:
|
702 |
msgid "Ice Hockey"
|
703 |
msgstr ""
|
704 |
|
705 |
-
#: includes/admin/class-sp-admin-sports.php:
|
706 |
#: includes/admin/class-sp-admin-welcome.php:325
|
707 |
msgid "Lacrosse"
|
708 |
msgstr ""
|
709 |
|
710 |
-
#: includes/admin/class-sp-admin-sports.php:
|
711 |
msgid "Netball"
|
712 |
msgstr ""
|
713 |
|
714 |
-
#: includes/admin/class-sp-admin-sports.php:
|
715 |
msgid "Rugby League"
|
716 |
msgstr ""
|
717 |
|
718 |
-
#: includes/admin/class-sp-admin-sports.php:
|
719 |
msgid "Rugby Union"
|
720 |
msgstr ""
|
721 |
|
722 |
-
#: includes/admin/class-sp-admin-sports.php:
|
723 |
msgid "Snooker"
|
724 |
msgstr ""
|
725 |
|
726 |
-
#: includes/admin/class-sp-admin-sports.php:
|
|
|
|
|
|
|
|
|
727 |
msgid "Squash"
|
728 |
msgstr ""
|
729 |
|
730 |
-
#: includes/admin/class-sp-admin-sports.php:
|
731 |
msgid "Table Tennis"
|
732 |
msgstr ""
|
733 |
|
734 |
-
#: includes/admin/class-sp-admin-sports.php:
|
735 |
msgid "Tennis"
|
736 |
msgstr ""
|
737 |
|
738 |
-
#: includes/admin/class-sp-admin-sports.php:
|
739 |
msgid "Volleyball"
|
740 |
msgstr ""
|
741 |
|
742 |
-
#: includes/admin/class-sp-admin-sports.php:
|
743 |
msgid "Water Polo"
|
744 |
msgstr ""
|
745 |
|
746 |
-
#: includes/admin/class-sp-admin-sports.php:
|
747 |
msgid "Dota 2"
|
748 |
msgstr ""
|
749 |
|
750 |
-
#: includes/admin/class-sp-admin-sports.php:
|
751 |
msgid "League of Legends"
|
752 |
msgstr ""
|
753 |
|
754 |
-
#: includes/admin/class-sp-admin-sports.php:
|
755 |
#: includes/admin/class-sp-admin-welcome.php:324
|
756 |
msgid "Counter-Strike: Global Offensive"
|
757 |
msgstr ""
|
@@ -780,7 +814,10 @@ msgstr ""
|
|
780 |
#: includes/admin/class-sp-admin-taxonomies.php:135
|
781 |
#: includes/admin/class-sp-admin-taxonomies.php:152
|
782 |
#: includes/admin/class-sp-admin-taxonomies.php:222
|
783 |
-
#: includes/admin/
|
|
|
|
|
|
|
784 |
msgid "Heading"
|
785 |
msgstr ""
|
786 |
|
@@ -788,7 +825,7 @@ msgstr ""
|
|
788 |
#: includes/admin/class-sp-admin-taxonomies.php:155
|
789 |
#: includes/admin/views/html-admin-config.php:20
|
790 |
#: includes/admin/views/html-admin-config.php:75
|
791 |
-
#: includes/admin/views/html-admin-config.php:
|
792 |
msgid "Used for events."
|
793 |
msgstr ""
|
794 |
|
@@ -797,7 +834,7 @@ msgid "About SportsPress"
|
|
797 |
msgstr ""
|
798 |
|
799 |
#: includes/admin/class-sp-admin-welcome.php:50
|
800 |
-
#: includes/admin/settings/class-sp-settings-modules.php:
|
801 |
msgid "Welcome to SportsPress"
|
802 |
msgstr ""
|
803 |
|
@@ -823,13 +860,13 @@ msgstr ""
|
|
823 |
msgid "%s SportsPress %s has lots of refinements we think you’ll love."
|
824 |
msgstr ""
|
825 |
|
826 |
-
#: includes/admin/class-sp-admin-welcome.php:124 sportspress.php:
|
827 |
msgid "Docs"
|
828 |
msgstr ""
|
829 |
|
830 |
#: includes/admin/class-sp-admin-welcome.php:131
|
831 |
#: includes/admin/views/html-notice-install.php:7
|
832 |
-
#: modules/sportspress-tutorials.php:
|
833 |
msgid "Get Started"
|
834 |
msgstr ""
|
835 |
|
@@ -862,17 +899,17 @@ msgid "We’ve assembled some links to get you started:"
|
|
862 |
msgstr ""
|
863 |
|
864 |
#: includes/admin/class-sp-admin-welcome.php:200
|
865 |
-
#: includes/class-sp-post-types.php:
|
866 |
msgid "Add New Team"
|
867 |
msgstr ""
|
868 |
|
869 |
#: includes/admin/class-sp-admin-welcome.php:205
|
870 |
-
#: includes/class-sp-post-types.php:
|
871 |
msgid "Add New Player"
|
872 |
msgstr ""
|
873 |
|
874 |
#: includes/admin/class-sp-admin-welcome.php:210
|
875 |
-
#: includes/class-sp-post-types.php:
|
876 |
msgid "Add New Event"
|
877 |
msgstr ""
|
878 |
|
@@ -889,24 +926,24 @@ msgid "Select your timezone and sport to get started."
|
|
889 |
msgstr ""
|
890 |
|
891 |
#: includes/admin/class-sp-admin-welcome.php:234
|
892 |
-
#: includes/admin/settings/class-sp-settings-general.php:
|
893 |
-
#: includes/admin/settings/class-sp-settings-general.php:
|
894 |
msgid "Timezone"
|
895 |
msgstr ""
|
896 |
|
897 |
#: includes/admin/class-sp-admin-welcome.php:234
|
898 |
-
#: includes/admin/settings/class-sp-settings-general.php:
|
899 |
msgid "Choose a city in the same timezone as you."
|
900 |
msgstr ""
|
901 |
|
902 |
#: includes/admin/class-sp-admin-welcome.php:280
|
903 |
-
#: includes/admin/settings/class-sp-settings-modules.php:
|
904 |
#: includes/admin/views/html-admin-settings.php:15
|
905 |
msgid "Save Changes"
|
906 |
msgstr ""
|
907 |
|
908 |
#: includes/admin/class-sp-admin-welcome.php:289
|
909 |
-
#: includes/admin/settings/class-sp-settings-modules.php:
|
910 |
msgid "Free SportsPress Theme"
|
911 |
msgstr ""
|
912 |
|
@@ -916,14 +953,13 @@ msgid "Have you tried the free Rookie theme yet?"
|
|
916 |
msgstr ""
|
917 |
|
918 |
#: includes/admin/class-sp-admin-welcome.php:292
|
919 |
-
#: includes/admin/settings/class-sp-settings-modules.php:
|
920 |
-
#: includes/admin/settings/class-sp-settings-modules.php:
|
921 |
msgid "Rookie is a free starter theme for SportsPress designed by ThemeBoy."
|
922 |
msgstr ""
|
923 |
|
924 |
#: includes/admin/class-sp-admin-welcome.php:294
|
925 |
-
#: includes/admin/settings/class-sp-settings-modules.php:
|
926 |
-
#: includes/admin/settings/class-sp-settings-modules.php:159
|
927 |
#: includes/admin/views/html-notice-theme-support.php:8
|
928 |
msgid "Install Now"
|
929 |
msgstr ""
|
@@ -937,6 +973,7 @@ msgid ""
|
|
937 |
msgstr ""
|
938 |
|
939 |
#: includes/admin/class-sp-admin-welcome.php:314
|
|
|
940 |
msgid "Developers"
|
941 |
msgstr ""
|
942 |
|
@@ -948,6 +985,7 @@ msgid ""
|
|
948 |
msgstr ""
|
949 |
|
950 |
#: includes/admin/class-sp-admin-welcome.php:321
|
|
|
951 |
msgid "Presets"
|
952 |
msgstr ""
|
953 |
|
@@ -959,12 +997,22 @@ msgid ""
|
|
959 |
"SportsPress</a>."
|
960 |
msgstr ""
|
961 |
|
962 |
-
#: includes/admin/class-sp-admin-welcome.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
963 |
#, php-format
|
964 |
msgid "View %s"
|
965 |
msgstr ""
|
966 |
|
967 |
-
#: includes/admin/class-sp-admin.php:
|
968 |
msgid "Import"
|
969 |
msgstr ""
|
970 |
|
@@ -975,18 +1023,21 @@ msgstr ""
|
|
975 |
#: includes/admin/importers/class-sp-event-importer.php:26
|
976 |
#: includes/admin/post-types/class-sp-admin-cpt-event.php:98
|
977 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-data.php:50
|
978 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-details.php:
|
979 |
-
#: includes/sp-
|
980 |
-
#: templates/event-
|
|
|
981 |
msgid "Date"
|
982 |
msgstr ""
|
983 |
|
984 |
#: includes/admin/importers/class-sp-event-importer.php:27
|
985 |
#: includes/admin/post-types/class-sp-admin-cpt-event.php:99
|
986 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-data.php:72
|
987 |
-
#: includes/class-sp-
|
988 |
-
#:
|
989 |
-
#:
|
|
|
|
|
990 |
msgid "Time"
|
991 |
msgstr ""
|
992 |
|
@@ -994,23 +1045,23 @@ msgstr ""
|
|
994 |
#: includes/admin/post-types/class-sp-admin-cpt-calendar.php:51
|
995 |
#: includes/admin/post-types/class-sp-admin-cpt-event.php:103
|
996 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-data.php:103
|
997 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-
|
998 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-
|
999 |
-
#: includes/admin/
|
|
|
1000 |
#: includes/admin/settings/class-sp-settings-teams.php:80
|
1001 |
-
#: includes/class-sp-ajax.php:
|
1002 |
-
#: includes/sp-core-functions.php:
|
1003 |
-
#: includes/widgets/class-sp-widget-event-list.php:
|
1004 |
-
#: templates/event-list.php:
|
1005 |
msgid "Venue"
|
1006 |
msgstr ""
|
1007 |
|
1008 |
#: includes/admin/importers/class-sp-event-importer.php:31
|
1009 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-event-
|
1010 |
-
#: includes/admin/
|
1011 |
-
#: includes/admin/settings/class-sp-settings-events.php:247
|
1012 |
#: includes/class-sp-event.php:46 includes/class-sp-event.php:67
|
1013 |
-
#: includes/class-sp-post-types.php:
|
1014 |
msgid "Outcome"
|
1015 |
msgstr ""
|
1016 |
|
@@ -1050,7 +1101,10 @@ msgstr ""
|
|
1050 |
|
1051 |
#: includes/admin/importers/class-sp-event-importer.php:467
|
1052 |
#: includes/admin/post-types/class-sp-admin-cpt-event.php:96
|
1053 |
-
#: includes/admin/post-types/class-sp-admin-
|
|
|
|
|
|
|
1054 |
msgid "Format"
|
1055 |
msgstr ""
|
1056 |
|
@@ -1071,25 +1125,16 @@ msgstr ""
|
|
1071 |
#: includes/admin/post-types/class-sp-admin-cpt-table.php:49
|
1072 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-data.php:91
|
1073 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-team-lists.php:61
|
|
|
1074 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-team-tables.php:61
|
1075 |
-
#: includes/class-sp-post-types.php:
|
1076 |
-
#: templates/event-list.php:
|
1077 |
-
#, fuzzy
|
1078 |
msgid "Competition"
|
1079 |
msgstr ""
|
1080 |
-
"#-#-#-#-# 1extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
1081 |
-
"#-#-#-#-# 2extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
1082 |
-
"#-#-#-#-# 3extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
1083 |
-
"#-#-#-#-# 4extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
1084 |
-
"#-#-#-#-# 5extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
1085 |
-
"#-#-#-#-# 7extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
1086 |
-
"#-#-#-#-# 8extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
1087 |
-
"#-#-#-#-# 9extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
1088 |
-
"#-#-#-#-# 10extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
1089 |
|
1090 |
#: includes/admin/importers/class-sp-event-importer.php:484
|
1091 |
#: includes/admin/importers/class-sp-event-importer.php:499
|
1092 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-event-details.php:
|
1093 |
msgid "— Not set —"
|
1094 |
msgstr ""
|
1095 |
|
@@ -1102,9 +1147,10 @@ msgstr ""
|
|
1102 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-player-statistics.php:63
|
1103 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-team-columns.php:60
|
1104 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-team-lists.php:64
|
|
|
1105 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-team-tables.php:64
|
1106 |
-
#: includes/class-sp-player.php:
|
1107 |
-
#: includes/sp-core-functions.php:
|
1108 |
msgid "Season"
|
1109 |
msgstr ""
|
1110 |
|
@@ -1144,11 +1190,14 @@ msgstr ""
|
|
1144 |
|
1145 |
#: includes/admin/importers/class-sp-player-importer.php:26
|
1146 |
#: includes/admin/post-types/class-sp-admin-cpt-player.php:64
|
1147 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-list-
|
1148 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-
|
1149 |
-
#: includes/
|
1150 |
-
#: includes/
|
1151 |
-
#: includes/widgets/class-sp-widget-player-
|
|
|
|
|
|
|
1152 |
msgid "Squad Number"
|
1153 |
msgstr ""
|
1154 |
|
@@ -1160,26 +1209,28 @@ msgstr ""
|
|
1160 |
#: includes/admin/post-types/class-sp-admin-cpt-staff.php:52
|
1161 |
#: includes/admin/post-types/class-sp-admin-cpt-staff.php:70
|
1162 |
#: includes/admin/post-types/class-sp-admin-cpt-team.php:51
|
1163 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-list-details.php:
|
1164 |
-
#: includes/class-sp-ajax.php:
|
1165 |
-
#: includes/class-sp-post-types.php:
|
1166 |
-
#: includes/class-sp-post-types.php:
|
1167 |
-
#: includes/class-sp-post-types.php:
|
1168 |
-
#: includes/widgets/class-sp-widget-player-gallery.php:
|
1169 |
-
#: includes/widgets/class-sp-widget-player-list.php:
|
1170 |
msgid "Name"
|
1171 |
msgstr ""
|
1172 |
|
1173 |
#: includes/admin/importers/class-sp-player-importer.php:32
|
1174 |
#: includes/admin/importers/class-sp-staff-importer.php:31
|
1175 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-player-details.php:
|
1176 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-player-details.php:
|
1177 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-staff-details.php:
|
1178 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-staff-details.php:
|
1179 |
-
#: includes/admin/settings/class-sp-settings-players.php:
|
1180 |
-
#: includes/admin/settings/class-sp-settings-
|
1181 |
-
#: includes/sp-
|
1182 |
-
#:
|
|
|
|
|
1183 |
msgid "Nationality"
|
1184 |
msgstr ""
|
1185 |
|
@@ -1207,8 +1258,8 @@ msgid "Import Staff"
|
|
1207 |
msgstr ""
|
1208 |
|
1209 |
#: includes/admin/importers/class-sp-staff-importer.php:27
|
1210 |
-
#: includes/class-sp-post-types.php:
|
1211 |
-
#: modules/sportspress-tutorials.php:
|
1212 |
msgid "Jobs"
|
1213 |
msgstr ""
|
1214 |
|
@@ -1220,7 +1271,7 @@ msgid ""
|
|
1220 |
msgstr ""
|
1221 |
|
1222 |
#: includes/admin/importers/class-sp-staff-importer.php:143
|
1223 |
-
#: includes/class-sp-post-types.php:
|
1224 |
msgid "View Staff"
|
1225 |
msgstr ""
|
1226 |
|
@@ -1236,7 +1287,7 @@ msgid "Import Teams"
|
|
1236 |
msgstr ""
|
1237 |
|
1238 |
#: includes/admin/importers/class-sp-team-importer.php:29
|
1239 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-team-details.php:
|
1240 |
#: includes/admin/settings/class-sp-settings-status.php:60
|
1241 |
#: includes/admin/views/html-admin-page-status.php:24
|
1242 |
msgid "Site URL"
|
@@ -1245,8 +1296,8 @@ msgstr ""
|
|
1245 |
#: includes/admin/importers/class-sp-team-importer.php:30
|
1246 |
#: includes/admin/post-types/class-sp-admin-cpt-outcome.php:45
|
1247 |
#: includes/admin/post-types/class-sp-admin-cpt-team.php:66
|
1248 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-outcome-details.php:
|
1249 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-team-details.php:
|
1250 |
#: includes/admin/settings/class-sp-settings-teams.php:88
|
1251 |
#: includes/admin/views/html-admin-config.php:28
|
1252 |
msgid "Abbreviation"
|
@@ -1254,8 +1305,9 @@ msgstr ""
|
|
1254 |
|
1255 |
#: includes/admin/importers/class-sp-team-importer.php:31
|
1256 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-data.php:57
|
1257 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-
|
1258 |
-
#:
|
|
|
1259 |
#: templates/team-details.php:39 templates/team-details.php:45
|
1260 |
msgid "Home"
|
1261 |
msgstr ""
|
@@ -1284,8 +1336,8 @@ msgstr ""
|
|
1284 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-data.php:61
|
1285 |
#: modules/sportspress-calendars.php:195 modules/sportspress-calendars.php:216
|
1286 |
#: modules/sportspress-calendars.php:264
|
1287 |
-
#: modules/sportspress-league-tables.php:
|
1288 |
-
#: modules/sportspress-player-lists.php:
|
1289 |
msgid "Title"
|
1290 |
msgstr ""
|
1291 |
|
@@ -1293,7 +1345,8 @@ msgstr ""
|
|
1293 |
#: includes/admin/post-types/class-sp-admin-cpt-list.php:53
|
1294 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-team-lists.php:67
|
1295 |
#: modules/sportspress-calendars.php:140
|
1296 |
-
#: modules/sportspress-player-lists.php:
|
|
|
1297 |
msgid "Layout"
|
1298 |
msgstr ""
|
1299 |
|
@@ -1301,23 +1354,24 @@ msgstr ""
|
|
1301 |
#: includes/admin/post-types/class-sp-admin-cpt-calendar.php:69
|
1302 |
#: includes/admin/post-types/class-sp-admin-cpt-calendar.php:72
|
1303 |
#: includes/admin/post-types/class-sp-admin-cpt-calendar.php:78
|
1304 |
-
#: includes/admin/post-types/class-sp-admin-cpt-list.php:
|
1305 |
-
#: includes/admin/post-types/class-sp-admin-cpt-list.php:
|
1306 |
-
#: includes/admin/post-types/class-sp-admin-cpt-list.php:
|
1307 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-details.php:
|
1308 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-list-details.php:
|
1309 |
-
#: includes/admin/
|
1310 |
-
#: includes/admin/
|
1311 |
-
#: includes/class-sp-ajax.php:
|
1312 |
-
#: includes/class-sp-ajax.php:
|
1313 |
-
#: includes/class-sp-post-types.php:
|
1314 |
-
#: includes/class-sp-post-types.php:
|
1315 |
-
#: includes/sp-core-functions.php:
|
1316 |
-
#: includes/sp-core-functions.php:
|
|
|
1317 |
#: includes/widgets/class-sp-widget-countdown.php:76
|
1318 |
-
#: includes/widgets/class-sp-widget-event-blocks.php:
|
1319 |
-
#: includes/widgets/class-sp-widget-event-calendar.php:
|
1320 |
-
#: includes/widgets/class-sp-widget-event-list.php:
|
1321 |
#: modules/sportspress-overview.php:138
|
1322 |
msgid "All"
|
1323 |
msgstr ""
|
@@ -1325,47 +1379,39 @@ msgstr ""
|
|
1325 |
#: includes/admin/post-types/class-sp-admin-cpt-calendar.php:87
|
1326 |
#: includes/admin/post-types/class-sp-admin-cpt-player.php:101
|
1327 |
#: includes/admin/post-types/class-sp-admin-cpt-staff.php:97
|
1328 |
-
#: includes/sp-
|
1329 |
-
#:
|
|
|
|
|
1330 |
msgid "Current Team"
|
1331 |
msgstr ""
|
1332 |
|
1333 |
#: includes/admin/post-types/class-sp-admin-cpt-calendar.php:115
|
1334 |
#: includes/admin/post-types/class-sp-admin-cpt-event.php:214
|
1335 |
-
#: includes/admin/post-types/class-sp-admin-cpt-list.php:
|
1336 |
-
#: includes/admin/post-types/class-sp-admin-cpt-player.php:
|
1337 |
#: includes/admin/post-types/class-sp-admin-cpt-staff.php:134
|
1338 |
-
#: includes/admin/post-types/class-sp-admin-cpt-table.php:
|
1339 |
#: includes/admin/post-types/class-sp-admin-cpt-team.php:111
|
1340 |
-
#, fuzzy
|
1341 |
msgid "Show all competitions"
|
1342 |
msgstr ""
|
1343 |
-
"#-#-#-#-# 1extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
1344 |
-
"#-#-#-#-# 2extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
1345 |
-
"#-#-#-#-# 3extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
1346 |
-
"#-#-#-#-# 4extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
1347 |
-
"#-#-#-#-# 5extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
1348 |
-
"#-#-#-#-# 7extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
1349 |
-
"#-#-#-#-# 8extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
1350 |
-
"#-#-#-#-# 9extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
1351 |
-
"#-#-#-#-# 10extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
1352 |
|
1353 |
#: includes/admin/post-types/class-sp-admin-cpt-calendar.php:124
|
1354 |
#: includes/admin/post-types/class-sp-admin-cpt-event.php:223
|
1355 |
-
#: includes/admin/post-types/class-sp-admin-cpt-list.php:
|
1356 |
-
#: includes/admin/post-types/class-sp-admin-cpt-player.php:
|
1357 |
#: includes/admin/post-types/class-sp-admin-cpt-staff.php:143
|
1358 |
-
#: includes/admin/post-types/class-sp-admin-cpt-table.php:
|
1359 |
#: includes/admin/post-types/class-sp-admin-cpt-team.php:120
|
1360 |
msgid "Show all seasons"
|
1361 |
msgstr ""
|
1362 |
|
1363 |
#: includes/admin/post-types/class-sp-admin-cpt-calendar.php:135
|
1364 |
#: includes/admin/post-types/class-sp-admin-cpt-event.php:206
|
1365 |
-
#: includes/admin/post-types/class-sp-admin-cpt-list.php:
|
1366 |
-
#: includes/admin/post-types/class-sp-admin-cpt-player.php:
|
1367 |
#: includes/admin/post-types/class-sp-admin-cpt-staff.php:126
|
1368 |
-
#: includes/admin/post-types/class-sp-admin-cpt-table.php:
|
1369 |
msgid "Show all teams"
|
1370 |
msgstr ""
|
1371 |
|
@@ -1377,10 +1423,10 @@ msgstr ""
|
|
1377 |
#: includes/admin/post-types/class-sp-admin-cpt-statistic.php:43
|
1378 |
#: includes/admin/views/html-admin-config.php:26
|
1379 |
#: includes/admin/views/html-admin-config.php:85
|
1380 |
-
#: includes/admin/views/html-admin-config.php:
|
1381 |
-
#: includes/admin/views/html-admin-config.php:
|
1382 |
-
#: includes/admin/views/html-admin-config.php:
|
1383 |
-
#: includes/admin/views/html-admin-config.php:
|
1384 |
msgid "Label"
|
1385 |
msgstr ""
|
1386 |
|
@@ -1388,61 +1434,66 @@ msgstr ""
|
|
1388 |
#: includes/admin/post-types/class-sp-admin-cpt-statistic.php:44
|
1389 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-column-details.php:34
|
1390 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-statistic-details.php:31
|
1391 |
-
#: includes/
|
1392 |
-
#: includes/admin/views/html-admin-config.php:342
|
1393 |
-
#: includes/sp-template-hooks.php:164
|
1394 |
msgid "Key"
|
1395 |
msgstr ""
|
1396 |
|
1397 |
#: includes/admin/post-types/class-sp-admin-cpt-column.php:45
|
1398 |
#: includes/admin/post-types/class-sp-admin-cpt-statistic.php:45
|
1399 |
-
#: includes/admin/post-types/class-sp-admin-meta-boxes.php:
|
1400 |
-
#: includes/admin/post-types/class-sp-admin-meta-boxes.php:
|
1401 |
-
#: includes/admin/
|
1402 |
-
#: includes/admin/views/html-admin-config.php:
|
|
|
|
|
1403 |
msgid "Equation"
|
1404 |
msgstr ""
|
1405 |
|
1406 |
#: includes/admin/post-types/class-sp-admin-cpt-column.php:46
|
1407 |
#: includes/admin/post-types/class-sp-admin-cpt-statistic.php:46
|
1408 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-column-details.php:39
|
|
|
1409 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-statistic-details.php:36
|
1410 |
-
#: includes/admin/views/html-admin-config.php:
|
1411 |
-
#: includes/admin/views/html-admin-config.php:
|
|
|
1412 |
msgid "Decimal Places"
|
1413 |
msgstr ""
|
1414 |
|
1415 |
#: includes/admin/post-types/class-sp-admin-cpt-column.php:47
|
1416 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-details.php:
|
1417 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-column-details.php:43
|
1418 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-list-details.php:
|
1419 |
-
#: includes/admin/views/html-admin-config.php:
|
1420 |
msgid "Sort Order"
|
1421 |
msgstr ""
|
1422 |
|
1423 |
#: includes/admin/post-types/class-sp-admin-cpt-column.php:48
|
1424 |
#: includes/admin/post-types/class-sp-admin-cpt-metric.php:45
|
1425 |
#: includes/admin/post-types/class-sp-admin-cpt-outcome.php:46
|
1426 |
-
#: includes/admin/post-types/class-sp-admin-cpt-performance.php:
|
1427 |
#: includes/admin/post-types/class-sp-admin-cpt-result.php:45
|
1428 |
#: includes/admin/post-types/class-sp-admin-cpt-statistic.php:47
|
1429 |
#: includes/admin/views/html-admin-config.php:30
|
1430 |
-
#: includes/admin/views/html-admin-config.php:
|
1431 |
-
#: includes/admin/views/html-admin-config.php:
|
1432 |
-
#: includes/admin/views/html-admin-config.php:
|
1433 |
-
#: includes/admin/views/html-admin-config.php:
|
1434 |
-
#: includes/admin/views/html-admin-config.php:
|
1435 |
-
#: includes/sp-template-hooks.php:
|
1436 |
-
#: modules/sportspress-league-tables.php:
|
1437 |
-
#: modules/sportspress-player-lists.php:
|
1438 |
msgid "Description"
|
1439 |
msgstr ""
|
1440 |
|
1441 |
#: includes/admin/post-types/class-sp-admin-cpt-event.php:55
|
1442 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-event-details.php:
|
1443 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-event-results.php:
|
1444 |
-
#: includes/
|
|
|
|
|
1445 |
#: includes/widgets/class-sp-widget-countdown.php:93
|
|
|
1446 |
msgid "(Auto)"
|
1447 |
msgstr ""
|
1448 |
|
@@ -1452,21 +1503,21 @@ msgstr ""
|
|
1452 |
|
1453 |
#: includes/admin/post-types/class-sp-admin-cpt-event.php:174
|
1454 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-event-video.php:33
|
1455 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-list-data.php:
|
1456 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-table-data.php:88
|
1457 |
-
#: includes/class-sp-ajax.php:
|
1458 |
-
#: includes/class-sp-ajax.php:
|
1459 |
-
#: includes/class-sp-ajax.php:
|
1460 |
-
#: includes/class-sp-ajax.php:
|
1461 |
-
#: includes/class-sp-ajax.php:
|
1462 |
-
#: includes/class-sp-ajax.php:
|
1463 |
msgid "Cancel"
|
1464 |
msgstr ""
|
1465 |
|
1466 |
#: includes/admin/post-types/class-sp-admin-cpt-event.php:175
|
1467 |
-
#: includes/class-sp-post-types.php:
|
1468 |
-
#: includes/class-sp-post-types.php:
|
1469 |
-
#: includes/class-sp-post-types.php:
|
1470 |
msgid "Update"
|
1471 |
msgstr ""
|
1472 |
|
@@ -1475,36 +1526,45 @@ msgstr ""
|
|
1475 |
#: includes/admin/post-types/class-sp-admin-cpt-performance.php:45
|
1476 |
#: includes/admin/post-types/class-sp-admin-cpt-result.php:44
|
1477 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-metric-details.php:27
|
1478 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-outcome-details.php:
|
1479 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-performance-details.php:
|
1480 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-result-details.php:
|
1481 |
#: includes/admin/views/html-admin-config.php:27
|
1482 |
-
#: includes/admin/views/html-admin-config.php:
|
1483 |
-
#: includes/admin/views/html-admin-config.php:
|
1484 |
-
#: includes/sp-template-hooks.php:
|
1485 |
msgid "Variable"
|
1486 |
msgstr ""
|
1487 |
|
1488 |
#: includes/admin/post-types/class-sp-admin-cpt-performance.php:43
|
1489 |
-
#: includes/admin/
|
1490 |
-
#: includes/
|
|
|
1491 |
msgid "Icon"
|
1492 |
msgstr ""
|
1493 |
|
1494 |
-
#: includes/admin/post-types/class-sp-admin-cpt-
|
|
|
|
|
|
|
|
|
|
|
|
|
1495 |
msgid "Show all positions"
|
1496 |
msgstr ""
|
1497 |
|
1498 |
#: includes/admin/post-types/class-sp-admin-cpt-staff.php:65
|
1499 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-staff-details.php:
|
1500 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-staff-details.php:
|
1501 |
-
#: includes/class-sp-
|
|
|
1502 |
msgid "Job"
|
1503 |
msgstr ""
|
1504 |
|
1505 |
#: includes/admin/post-types/class-sp-admin-cpt-team.php:63
|
|
|
1506 |
#: includes/admin/settings/class-sp-settings-teams.php:56
|
1507 |
-
#: includes/sp-template-hooks.php:
|
1508 |
msgid "Logo"
|
1509 |
msgstr ""
|
1510 |
|
@@ -1523,183 +1583,174 @@ msgstr ""
|
|
1523 |
msgid "Uploaded to this %s"
|
1524 |
msgstr ""
|
1525 |
|
1526 |
-
#: includes/admin/post-types/class-sp-admin-meta-boxes.php:
|
1527 |
-
#: includes/admin/post-types/class-sp-admin-meta-boxes.php:
|
|
|
1528 |
msgid "Shortcodes"
|
1529 |
msgstr ""
|
1530 |
|
1531 |
-
#: includes/admin/post-types/class-sp-admin-meta-boxes.php:
|
1532 |
-
#: includes/admin/settings/class-sp-settings-events.php:223
|
1533 |
-
#: includes/admin/settings/class-sp-settings-status.php:273
|
1534 |
-
#: includes/admin/views/html-admin-config.php:74
|
1535 |
-
#: includes/admin/views/html-admin-config.php:78
|
1536 |
-
#: includes/admin/views/html-admin-config.php:151
|
1537 |
-
#: includes/admin/views/html-admin-page-status.php:237
|
1538 |
-
#: includes/class-sp-post-types.php:193 includes/sp-core-functions.php:1230
|
1539 |
-
#: templates/event-results.php:104
|
1540 |
-
msgid "Event Results"
|
1541 |
-
msgstr ""
|
1542 |
-
|
1543 |
-
#: includes/admin/post-types/class-sp-admin-meta-boxes.php:134
|
1544 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-event-shortcode.php:25
|
1545 |
-
#: includes/admin/settings/class-sp-settings-events.php:93
|
1546 |
-
#: includes/admin/settings/class-sp-settings-events.php:260
|
1547 |
-
msgid "Box Score"
|
1548 |
-
msgstr ""
|
1549 |
-
|
1550 |
-
#: includes/admin/post-types/class-sp-admin-meta-boxes.php:141
|
1551 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-data.php:109
|
1552 |
-
#: includes/class-sp-ajax.php:
|
1553 |
-
#: includes/widgets/class-sp-widget-event-list.php:
|
1554 |
-
#: templates/event-list.php:
|
1555 |
msgid "Article"
|
1556 |
msgstr ""
|
1557 |
|
1558 |
-
#: includes/admin/post-types/class-sp-admin-meta-boxes.php:
|
1559 |
-
#: includes/admin/post-types/class-sp-admin-meta-boxes.php:
|
1560 |
-
#: includes/admin/post-types/class-sp-admin-meta-boxes.php:
|
1561 |
msgid "Profile"
|
1562 |
msgstr ""
|
1563 |
|
1564 |
-
#: includes/admin/post-types/class-sp-admin-meta-boxes.php:
|
1565 |
-
#: includes/admin/settings/class-sp-settings-events.php:
|
1566 |
-
#: includes/admin/settings/class-sp-settings-events.php:
|
1567 |
-
#: modules/sportspress-player-lists.php:
|
1568 |
msgid "Columns"
|
1569 |
msgstr ""
|
1570 |
|
1571 |
-
#: includes/admin/post-types/class-sp-admin-meta-boxes.php:
|
1572 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-list-columns.php:
|
1573 |
msgid "Metrics"
|
1574 |
msgstr ""
|
1575 |
|
1576 |
-
#: includes/admin/post-types/class-sp-admin-meta-boxes.php:
|
1577 |
-
#: includes/class-sp-ajax.php:84 includes/class-sp-ajax.php:113
|
1578 |
-
#: includes/class-sp-ajax.php:142 includes/class-sp-ajax.php:171
|
1579 |
-
#: includes/class-sp-ajax.php:219 includes/class-sp-ajax.php:310
|
1580 |
-
#: includes/class-sp-ajax.php:384 includes/class-sp-ajax.php:450
|
1581 |
-
#: includes/class-sp-ajax.php:479 includes/class-sp-ajax.php:508
|
1582 |
-
#: includes/class-sp-ajax.php:598 includes/class-sp-ajax.php:675
|
1583 |
#: modules/sportspress-calendars.php:128
|
1584 |
-
#: modules/sportspress-league-tables.php:
|
1585 |
-
#: modules/sportspress-player-lists.php:
|
1586 |
msgid "Shortcode"
|
1587 |
msgstr ""
|
1588 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1589 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-data.php:57
|
1590 |
-
#:
|
|
|
1591 |
msgid "Away"
|
1592 |
msgstr ""
|
1593 |
|
1594 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-data.php:74
|
1595 |
-
#: includes/sp-core-functions.php:
|
1596 |
-
#: includes/widgets/class-sp-widget-event-list.php:
|
1597 |
-
#: templates/event-list.php:
|
1598 |
msgid "Time/Results"
|
1599 |
msgstr ""
|
1600 |
|
1601 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-data.php:
|
1602 |
-
#: includes/sp-
|
|
|
1603 |
msgid "Recap"
|
1604 |
msgstr ""
|
1605 |
|
1606 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-data.php:
|
1607 |
-
#: includes/sp-
|
|
|
1608 |
msgid "Preview"
|
1609 |
msgstr ""
|
1610 |
|
1611 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-data.php:
|
1612 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-team-lists.php:32
|
1613 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-team-lists.php:101
|
|
|
|
|
1614 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-team-tables.php:32
|
1615 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-team-tables.php:97
|
1616 |
#: includes/admin/views/html-admin-config.php:45
|
1617 |
-
#: includes/admin/views/html-admin-config.php:
|
1618 |
-
#: includes/admin/views/html-admin-config.php:
|
1619 |
-
#: includes/admin/views/html-admin-config.php:
|
1620 |
-
#: includes/admin/views/html-admin-config.php:
|
1621 |
-
#: includes/admin/views/html-admin-config.php:
|
1622 |
-
#: includes/class-sp-post-types.php:
|
1623 |
-
#: includes/class-sp-post-types.php:
|
1624 |
-
#: includes/class-sp-post-types.php:
|
1625 |
-
#: includes/class-sp-post-types.php:
|
1626 |
-
#: includes/class-sp-post-types.php:
|
1627 |
-
#: includes/class-sp-post-types.php:
|
1628 |
-
#: includes/class-sp-post-types.php:
|
1629 |
-
#: includes/class-sp-post-types.php:
|
1630 |
-
#: includes/class-sp-post-types.php:
|
1631 |
-
#: includes/class-sp-post-types.php:
|
1632 |
-
#: includes/class-sp-post-types.php:
|
1633 |
-
#: includes/class-sp-post-types.php:
|
1634 |
-
#: includes/class-sp-post-types.php:
|
1635 |
-
#: includes/sp-core-functions.php:
|
1636 |
#: modules/sportspress-calendars.php:73
|
1637 |
-
#: modules/sportspress-
|
|
|
1638 |
#: modules/sportspress-league-tables.php:73
|
1639 |
-
#: modules/sportspress-
|
1640 |
-
#: modules/sportspress-player-lists.php:72
|
1641 |
#: modules/sportspress-player-lists.php:73
|
1642 |
msgid "No results found."
|
1643 |
msgstr ""
|
1644 |
|
1645 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-data.php:
|
1646 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-list-data.php:
|
1647 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-list-data.php:
|
1648 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-player-details.php:
|
1649 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-player-details.php:
|
1650 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-player-details.php:
|
1651 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-player-details.php:
|
1652 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-player-details.php:
|
1653 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-player-details.php:
|
1654 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-staff-details.php:
|
1655 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-staff-details.php:
|
1656 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-staff-details.php:
|
1657 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-staff-details.php:
|
1658 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-staff-details.php:
|
1659 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-staff-details.php:
|
1660 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-table-data.php:106
|
1661 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-table-data.php:150
|
1662 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-team-details.php:
|
1663 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-team-details.php:
|
1664 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-team-details.php:
|
1665 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-team-lists.php:110
|
|
|
1666 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-team-tables.php:106
|
1667 |
#, php-format
|
1668 |
msgid "Select %s"
|
1669 |
msgstr ""
|
1670 |
|
1671 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-details.php:
|
1672 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-event-performance.php:
|
1673 |
msgid "Status"
|
1674 |
msgstr ""
|
1675 |
|
1676 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-details.php:
|
1677 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-column-details.php:59
|
1678 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-list-details.php:
|
1679 |
-
#: includes/class-sp-ajax.php:
|
1680 |
-
#: includes/class-sp-ajax.php:
|
1681 |
-
#: includes/widgets/class-sp-widget-event-blocks.php:
|
1682 |
-
#: includes/widgets/class-sp-widget-event-list.php:
|
1683 |
-
#: includes/widgets/class-sp-widget-player-gallery.php:
|
1684 |
-
#: includes/widgets/class-sp-widget-player-list.php:
|
1685 |
msgid "Ascending"
|
1686 |
msgstr ""
|
1687 |
|
1688 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-details.php:
|
1689 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-column-details.php:59
|
1690 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-list-details.php:
|
1691 |
-
#: includes/class-sp-ajax.php:
|
1692 |
-
#: includes/class-sp-ajax.php:
|
1693 |
-
#: includes/widgets/class-sp-widget-event-blocks.php:
|
1694 |
-
#: includes/widgets/class-sp-widget-event-list.php:
|
1695 |
-
#: includes/widgets/class-sp-widget-player-gallery.php:
|
1696 |
-
#: includes/widgets/class-sp-widget-player-list.php:
|
1697 |
msgid "Descending"
|
1698 |
msgstr ""
|
1699 |
|
1700 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-feeds.php:45
|
1701 |
-
#: includes/admin/settings/class-sp-settings-events.php:
|
1702 |
-
#: includes/admin/settings/class-sp-settings-general.php:
|
1703 |
#: includes/admin/settings/class-sp-settings-players.php:47
|
1704 |
#: includes/admin/settings/class-sp-settings-staff.php:46
|
1705 |
#: includes/admin/settings/class-sp-settings-teams.php:47
|
@@ -1722,10 +1773,10 @@ msgstr ""
|
|
1722 |
|
1723 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-equation.php:34
|
1724 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-equation.php:37
|
1725 |
-
#: includes/class-sp-ajax.php:
|
1726 |
-
#: includes/sp-core-functions.php:
|
1727 |
-
#: includes/widgets/class-sp-widget-player-gallery.php:
|
1728 |
-
#: includes/widgets/class-sp-widget-player-list.php:
|
1729 |
msgid "Played"
|
1730 |
msgstr ""
|
1731 |
|
@@ -1750,11 +1801,11 @@ msgstr ""
|
|
1750 |
msgid "against"
|
1751 |
msgstr ""
|
1752 |
|
1753 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-equation.php:
|
1754 |
msgid "Games Back"
|
1755 |
msgstr ""
|
1756 |
|
1757 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-equation.php:
|
1758 |
msgid "Home Record"
|
1759 |
msgstr ""
|
1760 |
|
@@ -1762,74 +1813,120 @@ msgstr ""
|
|
1762 |
msgid "Away Record"
|
1763 |
msgstr ""
|
1764 |
|
1765 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-equation.php:
|
1766 |
msgid "Streak"
|
1767 |
msgstr ""
|
1768 |
|
1769 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-equation.php:
|
1770 |
msgid "Last 5"
|
1771 |
msgstr ""
|
1772 |
|
1773 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-equation.php:
|
1774 |
msgid "Last 10"
|
1775 |
msgstr ""
|
1776 |
|
1777 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-equation.php:
|
1778 |
msgid "Operators"
|
1779 |
msgstr ""
|
1780 |
|
1781 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-equation.php:
|
|
|
|
|
|
|
|
|
1782 |
msgid "Constants"
|
1783 |
msgstr ""
|
1784 |
|
1785 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-event-details.php:
|
1786 |
-
#: includes/admin/settings/class-sp-settings-events.php:
|
1787 |
msgid "Full Time"
|
1788 |
msgstr ""
|
1789 |
|
1790 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-event-performance.php:
|
1791 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-
|
1792 |
-
#: includes/admin/
|
1793 |
-
#: includes/
|
1794 |
-
#: includes/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1795 |
msgid "Position"
|
1796 |
msgstr ""
|
1797 |
|
1798 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-event-performance.php:
|
1799 |
-
#: includes/admin/settings/class-sp-settings-events.php:282
|
1800 |
-
#: templates/event-performance-table.php:165
|
1801 |
-
msgid "Extras"
|
1802 |
-
msgstr ""
|
1803 |
-
|
1804 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-event-performance.php:133
|
1805 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-player-statistics.php:98
|
1806 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-player-statistics.php:104
|
1807 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-team-columns.php:38
|
1808 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-team-columns.php:76
|
1809 |
-
#: includes/admin/settings/class-sp-settings-events.php:
|
1810 |
-
#: includes/admin/settings/class-sp-settings-events.php:
|
1811 |
-
#: includes/class-sp-player.php:
|
1812 |
-
#: includes/class-sp-team.php:65 includes/sp-core-functions.php:
|
1813 |
-
#: includes/sp-core-functions.php:
|
1814 |
-
#: templates/event-performance-table-combined.php:
|
1815 |
-
#: templates/event-performance-table.php:
|
1816 |
msgid "Total"
|
1817 |
msgstr ""
|
1818 |
|
1819 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-event-performance.php:
|
1820 |
msgid "Starting Lineup"
|
1821 |
msgstr ""
|
1822 |
|
1823 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-event-performance.php:
|
1824 |
msgid "Substitute"
|
1825 |
msgstr ""
|
1826 |
|
1827 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-event-teams.php:
|
1828 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-player-statistics.php:119
|
1829 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-player-statistics.php:140
|
1830 |
msgid "— None —"
|
1831 |
msgstr ""
|
1832 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1833 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-event-video.php:27
|
1834 |
msgid "Remove video"
|
1835 |
msgstr ""
|
@@ -1838,350 +1935,330 @@ msgstr ""
|
|
1838 |
msgid "Add video"
|
1839 |
msgstr ""
|
1840 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1841 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-list-data.php:43
|
1842 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-table-data.php:49
|
1843 |
-
#: includes/admin/settings/class-sp-settings-events.php:
|
1844 |
msgid "Values"
|
1845 |
msgstr ""
|
1846 |
|
1847 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-list-data.php:44
|
1848 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-table-data.php:50
|
|
|
1849 |
msgid "Adjustments"
|
1850 |
msgstr ""
|
1851 |
|
1852 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-list-data.php:
|
1853 |
-
#: includes/sp-core-functions.php:1241 templates/player-list.php:103
|
1854 |
-
msgid "Rank"
|
1855 |
-
msgstr ""
|
1856 |
-
|
1857 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-list-data.php:95
|
1858 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-table-data.php:84
|
1859 |
#: includes/admin/views/html-admin-config.php:41
|
1860 |
-
#: includes/admin/views/html-admin-config.php:
|
1861 |
-
#: includes/admin/views/html-admin-config.php:
|
1862 |
-
#: includes/admin/views/html-admin-config.php:
|
1863 |
-
#: includes/admin/views/html-admin-config.php:
|
1864 |
-
#: includes/admin/views/html-admin-config.php:
|
1865 |
msgid "Edit"
|
1866 |
msgstr ""
|
1867 |
|
1868 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-list-data.php:
|
1869 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-table-data.php:89
|
1870 |
msgid "Save"
|
1871 |
msgstr ""
|
1872 |
|
1873 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-list-
|
1874 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-table-data.php:106
|
1875 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-table-data.php:150
|
1876 |
-
msgid "Data"
|
1877 |
-
msgstr ""
|
1878 |
-
|
1879 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-list-details.php:56
|
1880 |
msgid "Grouping"
|
1881 |
msgstr ""
|
1882 |
|
1883 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-list-details.php:
|
1884 |
msgid "Sort by"
|
1885 |
msgstr ""
|
1886 |
|
1887 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-outcome-details.php:
|
1888 |
-
#: includes/admin/settings/class-sp-settings-events.php:
|
1889 |
-
#: includes/admin/settings/class-sp-settings-general.php:
|
1890 |
#: includes/admin/views/html-admin-config.php:84
|
1891 |
-
#: includes/admin/views/html-admin-config.php:
|
1892 |
-
#: includes/sp-core-functions.php:
|
1893 |
msgid "Primary"
|
1894 |
msgstr ""
|
1895 |
|
1896 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-outcome-details.php:
|
1897 |
#: includes/admin/views/html-admin-config.php:29
|
1898 |
-
#, fuzzy
|
1899 |
msgid "Condition"
|
1900 |
msgstr ""
|
1901 |
-
"#-#-#-#-# 1extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
1902 |
-
"#-#-#-#-# 2extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
1903 |
-
"#-#-#-#-# 3extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
1904 |
-
"#-#-#-#-# 4extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
1905 |
-
"#-#-#-#-# 5extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
1906 |
-
"#-#-#-#-# 7extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
1907 |
-
"#-#-#-#-# 8extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
1908 |
-
"#-#-#-#-# 9extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
1909 |
-
"#-#-#-#-# 10extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
1910 |
|
1911 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-outcome-details.php:
|
1912 |
-
#: includes/sp-core-functions.php:
|
1913 |
#, php-format
|
1914 |
msgid "Most %s"
|
1915 |
msgstr ""
|
1916 |
|
1917 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-outcome-details.php:
|
1918 |
-
#: includes/sp-core-functions.php:
|
1919 |
#, php-format
|
1920 |
msgid "Least %s"
|
1921 |
msgstr ""
|
1922 |
|
1923 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-outcome-details.php:
|
1924 |
-
#: includes/sp-core-functions.php:
|
1925 |
#, php-format
|
1926 |
msgid "Equal %s"
|
1927 |
msgstr ""
|
1928 |
|
1929 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-
|
1930 |
-
#: includes/admin/
|
1931 |
-
#: includes/sp-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1932 |
msgid "Current Teams"
|
1933 |
msgstr ""
|
1934 |
|
1935 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-player-details.php:
|
1936 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-staff-details.php:
|
1937 |
-
#: includes/sp-
|
1938 |
-
#:
|
|
|
|
|
1939 |
msgid "Past Teams"
|
1940 |
msgstr ""
|
1941 |
|
1942 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-player-statistics.php:39
|
1943 |
-
#: includes/sp-core-functions.php:
|
1944 |
msgid "Career Total"
|
1945 |
msgstr ""
|
1946 |
|
1947 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-table-data.php:56
|
|
|
1948 |
msgid "Highlight"
|
1949 |
msgstr ""
|
1950 |
|
1951 |
-
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-team-details.php:
|
1952 |
#: includes/admin/settings/class-sp-settings-teams.php:72
|
1953 |
#: includes/admin/settings/class-sp-settings-teams.php:96
|
1954 |
-
#: includes/sp-core-functions.php:
|
1955 |
msgid "Visit Site"
|
1956 |
msgstr ""
|
1957 |
|
1958 |
-
#: includes/admin/settings/class-sp-settings-events.php:
|
1959 |
msgid "Event Options"
|
1960 |
msgstr ""
|
1961 |
|
1962 |
-
#: includes/admin/settings/class-sp-settings-events.php:
|
1963 |
msgid "Link events"
|
1964 |
msgstr ""
|
1965 |
|
1966 |
-
#: includes/admin/settings/class-sp-settings-events.php:
|
|
|
1967 |
#: includes/admin/settings/class-sp-settings-players.php:55
|
1968 |
#: includes/admin/settings/class-sp-settings-staff.php:54
|
1969 |
-
#: includes/admin/settings/class-sp-settings-status.php:464
|
1970 |
#: includes/admin/settings/class-sp-settings-teams.php:55
|
1971 |
-
|
1972 |
-
msgid "Templates"
|
1973 |
msgstr ""
|
1974 |
|
1975 |
-
#: includes/admin/settings/class-sp-settings-events.php:
|
1976 |
-
#: includes/admin/settings/class-sp-settings-events.php:
|
1977 |
msgid "Logos"
|
1978 |
msgstr ""
|
1979 |
|
1980 |
-
#: includes/admin/settings/class-sp-settings-events.php:
|
1981 |
-
#: includes/admin/settings/class-sp-settings-events.php:
|
1982 |
msgid "Mode"
|
1983 |
msgstr ""
|
1984 |
|
1985 |
-
#: includes/admin/settings/class-sp-settings-events.php:
|
1986 |
msgid "Team vs team"
|
1987 |
msgstr ""
|
1988 |
|
1989 |
-
#: includes/admin/settings/class-sp-settings-events.php:
|
1990 |
msgid "Player vs player"
|
1991 |
msgstr ""
|
1992 |
|
1993 |
-
#: includes/admin/settings/class-sp-settings-events.php:
|
1994 |
msgctxt "mode setting description"
|
1995 |
msgid "Who competes in events?"
|
1996 |
msgstr ""
|
1997 |
|
1998 |
-
#: includes/admin/settings/class-sp-settings-events.php:
|
1999 |
#: modules/sportspress-calendars.php:244 modules/sportspress-calendars.php:305
|
2000 |
-
#: modules/sportspress-league-tables.php:
|
2001 |
-
#: modules/sportspress-player-lists.php:
|
2002 |
msgid "Limit"
|
2003 |
msgstr ""
|
2004 |
|
2005 |
-
#: includes/admin/settings/class-sp-settings-events.php:
|
2006 |
-
#: modules/sportspress-league-tables.php:
|
2007 |
msgid "teams"
|
2008 |
msgstr ""
|
2009 |
|
2010 |
-
#: includes/admin/settings/class-sp-settings-events.php:
|
2011 |
-
|
2012 |
-
msgid "Display team names"
|
2013 |
-
msgstr ""
|
2014 |
-
"#-#-#-#-# 1extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
2015 |
-
"#-#-#-#-# 2extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
2016 |
-
"#-#-#-#-# 3extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
2017 |
-
"#-#-#-#-# 4extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
2018 |
-
"#-#-#-#-# 5extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
2019 |
-
"#-#-#-#-# 7extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
2020 |
-
"#-#-#-#-# 8extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
2021 |
-
"#-#-#-#-# 9extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
2022 |
-
"#-#-#-#-# 10extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
2023 |
-
|
2024 |
-
#: includes/admin/settings/class-sp-settings-events.php:141
|
2025 |
-
#, fuzzy
|
2026 |
-
msgid "Display results"
|
2027 |
msgstr ""
|
2028 |
-
"#-#-#-#-# 1extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
2029 |
-
"#-#-#-#-# 2extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
2030 |
-
"#-#-#-#-# 3extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
2031 |
-
"#-#-#-#-# 4extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
2032 |
-
"#-#-#-#-# 5extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
2033 |
-
"#-#-#-#-# 7extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
2034 |
-
"#-#-#-#-# 8extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
2035 |
-
"#-#-#-#-# 9extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
2036 |
-
"#-#-#-#-# 10extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
2037 |
|
2038 |
#: includes/admin/settings/class-sp-settings-events.php:150
|
2039 |
-
|
2040 |
-
msgid "Filter by competition"
|
2041 |
msgstr ""
|
2042 |
-
"#-#-#-#-# 1extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
2043 |
-
"#-#-#-#-# 2extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
2044 |
-
"#-#-#-#-# 3extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
2045 |
-
"#-#-#-#-# 4extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
2046 |
-
"#-#-#-#-# 5extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
2047 |
-
"#-#-#-#-# 7extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
2048 |
-
"#-#-#-#-# 8extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
2049 |
-
"#-#-#-#-# 9extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
2050 |
-
"#-#-#-#-# 10extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
2051 |
|
2052 |
-
#: includes/admin/settings/class-sp-settings-events.php:
|
2053 |
-
msgid "Filter by season"
|
2054 |
-
msgstr ""
|
2055 |
-
|
2056 |
-
#: includes/admin/settings/class-sp-settings-events.php:167
|
2057 |
msgid "Display maps"
|
2058 |
msgstr ""
|
2059 |
|
2060 |
-
#: includes/admin/settings/class-sp-settings-events.php:
|
2061 |
#: includes/admin/settings/class-sp-settings-teams.php:81
|
2062 |
msgid "Link venues"
|
2063 |
msgstr ""
|
2064 |
|
2065 |
-
#: includes/admin/settings/class-sp-settings-events.php:
|
2066 |
msgid "Google Maps"
|
2067 |
msgstr ""
|
2068 |
|
2069 |
-
#: includes/admin/settings/class-sp-settings-events.php:
|
2070 |
-
#: includes/admin/settings/class-sp-settings-general.php:79
|
2071 |
-
#: includes/admin/settings/class-sp-settings-status.php:101
|
2072 |
-
#: includes/admin/views/html-admin-config.php:101
|
2073 |
-
#: includes/admin/views/html-admin-config.php:176
|
2074 |
-
#: includes/admin/views/html-admin-page-status.php:65
|
2075 |
-
#: includes/class-sp-ajax.php:206 includes/class-sp-ajax.php:253
|
2076 |
-
#: includes/class-sp-ajax.php:263 includes/class-sp-ajax.php:280
|
2077 |
-
#: includes/class-sp-ajax.php:344 includes/class-sp-ajax.php:354
|
2078 |
-
#: includes/class-sp-ajax.php:371 includes/class-sp-ajax.php:567
|
2079 |
-
#: includes/class-sp-ajax.php:585 includes/class-sp-ajax.php:638
|
2080 |
-
#: includes/class-sp-ajax.php:656
|
2081 |
-
#: includes/widgets/class-sp-widget-event-blocks.php:101
|
2082 |
-
#: includes/widgets/class-sp-widget-event-blocks.php:115
|
2083 |
-
#: includes/widgets/class-sp-widget-event-blocks.php:136
|
2084 |
-
#: includes/widgets/class-sp-widget-event-calendar.php:89
|
2085 |
-
#: includes/widgets/class-sp-widget-event-calendar.php:103
|
2086 |
-
#: includes/widgets/class-sp-widget-event-list.php:104
|
2087 |
-
#: includes/widgets/class-sp-widget-event-list.php:118
|
2088 |
-
#: includes/widgets/class-sp-widget-event-list.php:139
|
2089 |
-
#: includes/widgets/class-sp-widget-player-gallery.php:105
|
2090 |
-
#: includes/widgets/class-sp-widget-player-list.php:119
|
2091 |
-
msgid "Default"
|
2092 |
-
msgstr ""
|
2093 |
-
|
2094 |
-
#: includes/admin/settings/class-sp-settings-events.php:189
|
2095 |
msgid "Satellite"
|
2096 |
msgstr ""
|
2097 |
|
2098 |
-
#: includes/admin/settings/class-sp-settings-events.php:
|
2099 |
msgid "Hybrid"
|
2100 |
msgstr ""
|
2101 |
|
2102 |
-
#: includes/admin/settings/class-sp-settings-events.php:
|
2103 |
msgid "Terrain"
|
2104 |
msgstr ""
|
2105 |
|
2106 |
-
#: includes/admin/settings/class-sp-settings-events.php:
|
2107 |
msgid "Comments"
|
2108 |
msgstr ""
|
2109 |
|
2110 |
-
#: includes/admin/settings/class-sp-settings-events.php:
|
2111 |
msgid "Allow people to post comments on new articles"
|
2112 |
msgstr ""
|
2113 |
|
2114 |
-
#: includes/admin/settings/class-sp-settings-events.php:
|
2115 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2116 |
msgid "Reverse order"
|
2117 |
msgstr ""
|
2118 |
|
2119 |
-
#: includes/admin/settings/class-sp-settings-events.php:
|
2120 |
-
#, fuzzy
|
2121 |
msgid "Display outcome"
|
2122 |
msgstr ""
|
2123 |
-
|
2124 |
-
|
2125 |
-
"#-#-#-#-# 3extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
2126 |
-
"#-#-#-#-# 4extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
2127 |
-
"#-#-#-#-# 5extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
2128 |
-
"#-#-#-#-# 7extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
2129 |
-
"#-#-#-#-# 8extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
2130 |
-
"#-#-#-#-# 9extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
2131 |
-
"#-#-#-#-# 10extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
2132 |
-
|
2133 |
-
#: includes/admin/settings/class-sp-settings-events.php:265
|
2134 |
msgid "Rows"
|
2135 |
msgstr ""
|
2136 |
|
2137 |
-
#: includes/admin/settings/class-sp-settings-events.php:
|
2138 |
msgid "Icons"
|
2139 |
msgstr ""
|
2140 |
|
2141 |
-
#: includes/admin/settings/class-sp-settings-events.php:
|
2142 |
msgid "Top-level only"
|
2143 |
msgstr ""
|
2144 |
|
2145 |
-
#: includes/admin/settings/class-sp-settings-events.php:
|
2146 |
msgid "Display squad numbers"
|
2147 |
msgstr ""
|
2148 |
|
2149 |
-
#: includes/admin/settings/class-sp-settings-events.php:
|
2150 |
-
#, fuzzy
|
2151 |
msgid "Display positions"
|
2152 |
msgstr ""
|
2153 |
-
"#-#-#-#-# 1extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
2154 |
-
"#-#-#-#-# 2extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
2155 |
-
"#-#-#-#-# 3extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
2156 |
-
"#-#-#-#-# 4extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
2157 |
-
"#-#-#-#-# 5extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
2158 |
-
"#-#-#-#-# 7extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
2159 |
-
"#-#-#-#-# 8extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
2160 |
-
"#-#-#-#-# 9extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
2161 |
-
"#-#-#-#-# 10extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
2162 |
-
|
2163 |
-
#: includes/admin/settings/class-sp-settings-events.php:353
|
2164 |
-
msgid "Split players by team"
|
2165 |
-
msgstr ""
|
2166 |
|
2167 |
-
#: includes/admin/settings/class-sp-settings-events.php:
|
2168 |
-
|
|
|
2169 |
msgstr ""
|
2170 |
|
2171 |
-
#: includes/admin/settings/class-sp-settings-events.php:
|
2172 |
-
#: includes/admin/settings/class-sp-settings-events.php:
|
2173 |
msgid "Delimiter"
|
2174 |
msgstr ""
|
2175 |
|
2176 |
-
#: includes/admin/settings/class-sp-settings-events.php:
|
2177 |
msgid "Custom:"
|
2178 |
msgstr ""
|
2179 |
|
2180 |
-
#: includes/admin/settings/class-sp-settings-general.php:25
|
2181 |
-
#: includes/admin/settings/class-sp-settings-modules.php:33
|
2182 |
-
msgid "General"
|
2183 |
-
msgstr ""
|
2184 |
-
|
2185 |
#: includes/admin/settings/class-sp-settings-general.php:46
|
2186 |
msgid "General Options"
|
2187 |
msgstr ""
|
@@ -2195,7 +2272,7 @@ msgid "Align"
|
|
2195 |
msgstr ""
|
2196 |
|
2197 |
#: includes/admin/settings/class-sp-settings-general.php:80
|
2198 |
-
#: modules/sportspress-widget-alignment.php:
|
2199 |
msgid "Left"
|
2200 |
msgstr ""
|
2201 |
|
@@ -2204,7 +2281,7 @@ msgid "Center"
|
|
2204 |
msgstr ""
|
2205 |
|
2206 |
#: includes/admin/settings/class-sp-settings-general.php:82
|
2207 |
-
#: modules/sportspress-widget-alignment.php:
|
2208 |
msgid "Right"
|
2209 |
msgstr ""
|
2210 |
|
@@ -2252,34 +2329,41 @@ msgstr ""
|
|
2252 |
msgid "Sortable"
|
2253 |
msgstr ""
|
2254 |
|
2255 |
-
#: includes/admin/settings/class-sp-settings-general.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2256 |
msgid "Header Offset"
|
2257 |
msgstr ""
|
2258 |
|
2259 |
-
#: includes/admin/settings/class-sp-settings-general.php:
|
2260 |
msgid "Frontend Styles"
|
2261 |
msgstr ""
|
2262 |
|
2263 |
-
#: includes/admin/settings/class-sp-settings-general.php:
|
|
|
2264 |
msgid "Customize"
|
2265 |
msgstr ""
|
2266 |
|
2267 |
-
#: includes/admin/settings/class-sp-settings-general.php:
|
2268 |
msgid "Background"
|
2269 |
msgstr ""
|
2270 |
|
2271 |
-
#: includes/admin/settings/class-sp-settings-general.php:
|
2272 |
-
#: includes/admin/settings/class-sp-settings-text.php:25
|
2273 |
-
#: includes/admin/settings/class-sp-settings-text.php:40
|
2274 |
-
msgid "Text"
|
2275 |
-
msgstr ""
|
2276 |
-
|
2277 |
-
#: includes/admin/settings/class-sp-settings-general.php:342
|
2278 |
msgid "Enable"
|
2279 |
msgstr ""
|
2280 |
|
2281 |
#: includes/admin/settings/class-sp-settings-modules.php:30
|
2282 |
-
#: includes/admin/settings/class-sp-settings-modules.php:
|
2283 |
msgid "Modules"
|
2284 |
msgstr ""
|
2285 |
|
@@ -2287,141 +2371,133 @@ msgstr ""
|
|
2287 |
msgid "Dashboard"
|
2288 |
msgstr ""
|
2289 |
|
2290 |
-
#: includes/admin/settings/class-sp-settings-modules.php:
|
2291 |
msgid "SportsPress Pro"
|
2292 |
msgstr ""
|
2293 |
|
2294 |
-
#: includes/admin/settings/class-sp-settings-modules.php:
|
2295 |
msgid ""
|
2296 |
"Get SportsPress Pro to get access to all modules. You can upgrade any time "
|
2297 |
"without losing any of your data."
|
2298 |
msgstr ""
|
2299 |
|
2300 |
-
#: includes/admin/settings/class-sp-settings-modules.php:
|
2301 |
msgid "Premium"
|
2302 |
msgstr ""
|
2303 |
|
2304 |
-
#: includes/admin/settings/class-sp-settings-modules.php:
|
2305 |
msgid "Upgrade Now"
|
2306 |
msgstr ""
|
2307 |
|
2308 |
-
#: includes/admin/settings/class-sp-settings-modules.php:
|
2309 |
-
msgid "SportsPress TV"
|
2310 |
-
msgstr ""
|
2311 |
-
|
2312 |
-
#: includes/admin/settings/class-sp-settings-modules.php:84
|
2313 |
-
msgid ""
|
2314 |
-
"Offer premium news & highlights from leading global sports. SportsPress TV "
|
2315 |
-
"will keep your visitors entertained for hours."
|
2316 |
-
msgstr ""
|
2317 |
-
|
2318 |
-
#: includes/admin/settings/class-sp-settings-modules.php:86
|
2319 |
-
#: includes/admin/settings/class-sp-settings-modules.php:158
|
2320 |
-
msgid "Free"
|
2321 |
-
msgstr ""
|
2322 |
-
|
2323 |
-
#: includes/admin/settings/class-sp-settings-modules.php:98
|
2324 |
msgid "Twitter Module"
|
2325 |
msgstr ""
|
2326 |
|
2327 |
-
#: includes/admin/settings/class-sp-settings-modules.php:
|
2328 |
msgid "Follow [link]@ThemeBoy[/link] on Twitter."
|
2329 |
msgstr ""
|
2330 |
|
2331 |
-
#: includes/admin/settings/class-sp-settings-modules.php:
|
2332 |
msgid ""
|
2333 |
"Help spread the word by tweeting with [link]#SportsPress[/link] and get the "
|
2334 |
"Twitter module for free."
|
2335 |
msgstr ""
|
2336 |
|
2337 |
-
#: includes/admin/settings/class-sp-settings-modules.php:
|
2338 |
msgid "[link]Get the download link[/link]."
|
2339 |
msgstr ""
|
2340 |
|
2341 |
-
#: includes/admin/settings/class-sp-settings-modules.php:
|
2342 |
msgid "Free with tweet"
|
2343 |
msgstr ""
|
2344 |
|
2345 |
-
#: includes/admin/settings/class-sp-settings-modules.php:
|
2346 |
msgid "Tweet"
|
2347 |
msgstr ""
|
2348 |
|
2349 |
-
#: includes/admin/settings/class-sp-settings-modules.php:
|
2350 |
msgid "Current Theme"
|
2351 |
msgstr ""
|
2352 |
|
2353 |
-
#: includes/admin/settings/class-sp-settings-modules.php:
|
2354 |
-
msgid "Need a
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2355 |
msgstr ""
|
2356 |
|
2357 |
-
#: includes/admin/settings/class-sp-settings-modules.php:
|
2358 |
-
#, fuzzy
|
2359 |
msgid "Documentation"
|
2360 |
msgstr ""
|
2361 |
-
"#-#-#-#-# 1extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
2362 |
-
"#-#-#-#-# 2extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
2363 |
-
"#-#-#-#-# 3extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
2364 |
-
"#-#-#-#-# 4extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
2365 |
-
"#-#-#-#-# 5extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
2366 |
-
"#-#-#-#-# 7extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
2367 |
-
"#-#-#-#-# 8extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
2368 |
-
"#-#-#-#-# 9extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
2369 |
-
"#-#-#-#-# 10extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
2370 |
|
2371 |
-
#: includes/admin/settings/class-sp-settings-modules.php:
|
2372 |
msgid "Getting Started"
|
2373 |
msgstr ""
|
2374 |
|
2375 |
-
#: includes/admin/settings/class-sp-settings-modules.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2376 |
#: includes/admin/views/html-notice-theme-support.php:9
|
2377 |
msgid "Theme Integration Guide"
|
2378 |
msgstr ""
|
2379 |
|
2380 |
-
#: includes/admin/settings/class-sp-settings-modules.php:
|
2381 |
msgid "Help"
|
2382 |
msgstr ""
|
2383 |
|
2384 |
-
#: includes/admin/settings/class-sp-settings-modules.php:
|
2385 |
msgid "Support Forums"
|
2386 |
msgstr ""
|
2387 |
|
2388 |
-
#: includes/admin/settings/class-sp-settings-modules.php:
|
2389 |
msgid "Feature Requests"
|
2390 |
msgstr ""
|
2391 |
|
2392 |
-
#: includes/admin/settings/class-sp-settings-modules.php:
|
2393 |
-
#: includes/admin/settings/class-sp-settings-modules.php:187
|
2394 |
-
msgid "Premium Support"
|
2395 |
-
msgstr ""
|
2396 |
-
|
2397 |
-
#: includes/admin/settings/class-sp-settings-modules.php:187
|
2398 |
-
#: includes/admin/settings/class-sp-settings-modules.php:215
|
2399 |
-
msgid "Upgrade to Pro"
|
2400 |
-
msgstr ""
|
2401 |
-
|
2402 |
-
#: includes/admin/settings/class-sp-settings-modules.php:190
|
2403 |
msgid "Connect"
|
2404 |
msgstr ""
|
2405 |
|
2406 |
-
#: includes/admin/settings/class-sp-settings-modules.php:
|
2407 |
-
#: includes/class-sp-modules.php:
|
2408 |
msgid "Twitter"
|
2409 |
msgstr ""
|
2410 |
|
2411 |
-
#: includes/admin/settings/class-sp-settings-modules.php:
|
2412 |
msgid "Facebook"
|
2413 |
msgstr ""
|
2414 |
|
2415 |
-
#: includes/admin/settings/class-sp-settings-modules.php:
|
2416 |
msgid "YouTube"
|
2417 |
msgstr ""
|
2418 |
|
2419 |
-
#: includes/admin/settings/class-sp-settings-modules.php:
|
2420 |
msgid "Google+"
|
2421 |
msgstr ""
|
2422 |
|
2423 |
-
#: includes/admin/settings/class-sp-settings-modules.php:
|
2424 |
-
#: includes/admin/settings/class-sp-settings-modules.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2425 |
msgid "Learn more"
|
2426 |
msgstr ""
|
2427 |
|
@@ -2433,14 +2509,9 @@ msgstr ""
|
|
2433 |
msgid "Link players"
|
2434 |
msgstr ""
|
2435 |
|
2436 |
-
#: includes/admin/settings/class-sp-settings-players.php:
|
2437 |
-
#: includes/admin/settings/class-sp-settings-staff.php:
|
2438 |
-
#:
|
2439 |
-
msgid "Photo"
|
2440 |
-
msgstr ""
|
2441 |
-
|
2442 |
-
#: includes/admin/settings/class-sp-settings-players.php:81
|
2443 |
-
#: includes/admin/settings/class-sp-settings-staff.php:72
|
2444 |
msgid "Display national flags"
|
2445 |
msgstr ""
|
2446 |
|
@@ -2655,11 +2726,6 @@ msgstr ""
|
|
2655 |
msgid "is available"
|
2656 |
msgstr ""
|
2657 |
|
2658 |
-
#: includes/admin/settings/class-sp-settings-status.php:237
|
2659 |
-
#: includes/admin/views/html-admin-page-status.php:201
|
2660 |
-
msgid "by"
|
2661 |
-
msgstr ""
|
2662 |
-
|
2663 |
#: includes/admin/settings/class-sp-settings-status.php:237
|
2664 |
#: includes/admin/views/html-admin-page-status.php:201
|
2665 |
msgid "version"
|
@@ -2673,36 +2739,37 @@ msgstr ""
|
|
2673 |
#: includes/admin/settings/class-sp-settings-status.php:263
|
2674 |
#: includes/admin/views/html-admin-config.php:19
|
2675 |
#: includes/admin/views/html-admin-page-status.php:227
|
2676 |
-
#: includes/class-sp-post-types.php:
|
2677 |
msgid "Event Outcomes"
|
2678 |
msgstr ""
|
2679 |
|
2680 |
#: includes/admin/settings/class-sp-settings-status.php:283
|
2681 |
-
#: includes/admin/views/html-admin-config.php:
|
2682 |
#: includes/admin/views/html-admin-page-status.php:247
|
2683 |
-
#: includes/class-sp-post-types.php:
|
2684 |
msgid "Player Performance"
|
2685 |
msgstr ""
|
2686 |
|
2687 |
#: includes/admin/settings/class-sp-settings-status.php:293
|
2688 |
-
#: includes/admin/views/html-admin-config.php:
|
2689 |
#: includes/admin/views/html-admin-page-status.php:257
|
2690 |
-
#: includes/class-sp-post-types.php:
|
2691 |
-
#: modules/sportspress-league-tables.php:
|
|
|
2692 |
msgid "Table Columns"
|
2693 |
msgstr ""
|
2694 |
|
2695 |
#: includes/admin/settings/class-sp-settings-status.php:305
|
2696 |
-
#: includes/admin/views/html-admin-config.php:
|
2697 |
#: includes/admin/views/html-admin-page-status.php:267
|
2698 |
-
#: includes/class-sp-post-types.php:
|
2699 |
msgid "Player Metrics"
|
2700 |
msgstr ""
|
2701 |
|
2702 |
#: includes/admin/settings/class-sp-settings-status.php:315
|
2703 |
-
#: includes/admin/views/html-admin-config.php:
|
2704 |
#: includes/admin/views/html-admin-page-status.php:277
|
2705 |
-
#: includes/class-sp-post-types.php:
|
2706 |
msgid "Player Statistics"
|
2707 |
msgstr ""
|
2708 |
|
@@ -2736,6 +2803,11 @@ msgstr ""
|
|
2736 |
msgid "Author URL"
|
2737 |
msgstr ""
|
2738 |
|
|
|
|
|
|
|
|
|
|
|
2739 |
#: includes/admin/settings/class-sp-settings-status.php:499
|
2740 |
#: includes/admin/views/html-admin-page-status.php:459
|
2741 |
#, php-format
|
@@ -2780,18 +2852,18 @@ msgstr ""
|
|
2780 |
msgid "Variables"
|
2781 |
msgstr ""
|
2782 |
|
2783 |
-
#: includes/admin/views/html-admin-config.php:
|
2784 |
-
#: includes/admin/views/html-admin-config.php:
|
2785 |
#, php-format
|
2786 |
msgid "Default (%s)"
|
2787 |
msgstr ""
|
2788 |
|
2789 |
-
#: includes/admin/views/html-admin-config.php:
|
2790 |
msgid "Used for league tables."
|
2791 |
msgstr ""
|
2792 |
|
2793 |
-
#: includes/admin/views/html-admin-config.php:
|
2794 |
-
#: includes/admin/views/html-admin-config.php:
|
2795 |
msgid "Used for player lists."
|
2796 |
msgstr ""
|
2797 |
|
@@ -2822,23 +2894,11 @@ msgid ""
|
|
2822 |
"SportsPress theme :)"
|
2823 |
msgstr ""
|
2824 |
|
2825 |
-
#: includes/class-sp-
|
2826 |
-
#: includes/class-sp-
|
2827 |
-
#: includes/class-sp-
|
2828 |
-
#: includes/class-sp-
|
2829 |
-
|
2830 |
-
#: includes/class-sp-ajax.php:525 includes/class-sp-ajax.php:615
|
2831 |
-
#: includes/widgets/class-sp-widget-countdown.php:69
|
2832 |
-
#: includes/widgets/class-sp-widget-countdown.php:86
|
2833 |
-
#: includes/widgets/class-sp-widget-event-blocks.php:81
|
2834 |
-
#: includes/widgets/class-sp-widget-event-calendar.php:69
|
2835 |
-
#: includes/widgets/class-sp-widget-event-list.php:84
|
2836 |
-
#: includes/widgets/class-sp-widget-league-table.php:74
|
2837 |
-
#: includes/widgets/class-sp-widget-player-gallery.php:79
|
2838 |
-
#: includes/widgets/class-sp-widget-player-list.php:76
|
2839 |
-
#: includes/widgets/class-sp-widget-staff.php:57
|
2840 |
-
#, php-format
|
2841 |
-
msgid "Select %s:"
|
2842 |
msgstr ""
|
2843 |
|
2844 |
#: includes/class-sp-ajax.php:74
|
@@ -2850,125 +2910,125 @@ msgstr ""
|
|
2850 |
#: includes/class-sp-ajax.php:80
|
2851 |
#: includes/widgets/class-sp-widget-countdown.php:110
|
2852 |
#: modules/sportspress-calendars.php:273
|
2853 |
-
#, fuzzy
|
2854 |
msgid "Display competition"
|
2855 |
msgstr ""
|
2856 |
-
|
2857 |
-
|
2858 |
-
|
2859 |
-
|
2860 |
-
|
2861 |
-
|
2862 |
-
|
2863 |
-
"
|
2864 |
-
"#-#-#-#-# 10extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
2865 |
-
|
2866 |
-
#: includes/class-sp-ajax.php:84 includes/class-sp-ajax.php:113
|
2867 |
-
#: includes/class-sp-ajax.php:142 includes/class-sp-ajax.php:171
|
2868 |
-
#: includes/class-sp-ajax.php:219 includes/class-sp-ajax.php:310
|
2869 |
-
#: includes/class-sp-ajax.php:384 includes/class-sp-ajax.php:450
|
2870 |
-
#: includes/class-sp-ajax.php:479 includes/class-sp-ajax.php:508
|
2871 |
-
#: includes/class-sp-ajax.php:598 includes/class-sp-ajax.php:675
|
2872 |
-
#, php-format
|
2873 |
-
msgid "Insert %s"
|
2874 |
msgstr ""
|
2875 |
|
2876 |
-
#: includes/class-sp-ajax.php:
|
2877 |
-
#: includes/class-sp-ajax.php:
|
2878 |
-
#: includes/widgets/class-sp-widget-event-blocks.php:
|
2879 |
-
#: includes/widgets/class-sp-widget-event-calendar.php:
|
2880 |
-
#: includes/widgets/class-sp-widget-event-list.php:
|
2881 |
msgid "Status:"
|
2882 |
msgstr ""
|
2883 |
|
2884 |
-
#: includes/class-sp-ajax.php:
|
2885 |
-
#: includes/class-sp-ajax.php:
|
2886 |
-
#: includes/widgets/class-sp-widget-event-blocks.php:
|
2887 |
-
#: includes/widgets/class-sp-widget-event-calendar.php:
|
2888 |
-
#: includes/widgets/class-sp-widget-event-list.php:
|
2889 |
msgid "Display link to view all events"
|
2890 |
msgstr ""
|
2891 |
|
2892 |
-
#: includes/class-sp-ajax.php:
|
2893 |
-
#: includes/
|
2894 |
-
#: includes/
|
2895 |
-
#: includes/widgets/class-sp-widget-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2896 |
msgid "Date:"
|
2897 |
msgstr ""
|
2898 |
|
2899 |
-
#: includes/class-sp-ajax.php:
|
2900 |
-
#: includes/sp-core-functions.php:
|
2901 |
msgid "This week"
|
2902 |
msgstr ""
|
2903 |
|
2904 |
-
#: includes/class-sp-ajax.php:
|
2905 |
-
#: includes/sp-core-functions.php:
|
|
|
2906 |
msgid "Today"
|
2907 |
msgstr ""
|
2908 |
|
2909 |
-
#: includes/class-sp-ajax.php:
|
2910 |
-
#: includes/widgets/class-sp-widget-event-blocks.php:
|
2911 |
-
#: includes/widgets/class-sp-widget-event-list.php:
|
2912 |
msgid "Number of events to show:"
|
2913 |
msgstr ""
|
2914 |
|
2915 |
-
#: includes/class-sp-ajax.php:
|
2916 |
-
#: includes/class-sp-ajax.php:
|
2917 |
-
#: includes/widgets/class-sp-widget-event-blocks.php:
|
2918 |
-
#: includes/widgets/class-sp-widget-event-list.php:
|
2919 |
-
#: includes/widgets/class-sp-widget-player-gallery.php:
|
2920 |
-
#: includes/widgets/class-sp-widget-player-list.php:
|
2921 |
msgid "Sort Order:"
|
2922 |
msgstr ""
|
2923 |
|
2924 |
-
#: includes/class-sp-ajax.php:
|
2925 |
-
#: includes/class-sp-ajax.php:
|
2926 |
-
#: includes/widgets/class-sp-widget-event-list.php:
|
2927 |
-
#: includes/widgets/class-sp-widget-league-table.php:
|
2928 |
-
#: includes/widgets/class-sp-widget-player-gallery.php:
|
2929 |
msgid "Columns:"
|
2930 |
msgstr ""
|
2931 |
|
2932 |
-
#: includes/class-sp-ajax.php:
|
2933 |
-
#: includes/widgets/class-sp-widget-league-table.php:
|
2934 |
msgid "Number of teams to show:"
|
2935 |
msgstr ""
|
2936 |
|
2937 |
-
#: includes/class-sp-ajax.php:
|
2938 |
-
#: includes/widgets/class-sp-widget-league-table.php:
|
2939 |
#: modules/sportspress-calendars.php:204 modules/sportspress-countdowns.php:86
|
2940 |
-
#: modules/sportspress-league-tables.php:
|
2941 |
msgid "Display logos"
|
2942 |
msgstr ""
|
2943 |
|
2944 |
-
#: includes/class-sp-ajax.php:
|
2945 |
-
#: includes/widgets/class-sp-widget-league-table.php:
|
2946 |
msgid "Display link to view full table"
|
2947 |
msgstr ""
|
2948 |
|
2949 |
-
#: includes/class-sp-ajax.php:
|
2950 |
-
#: includes/widgets/class-sp-widget-player-gallery.php:
|
2951 |
-
#: includes/widgets/class-sp-widget-player-list.php:
|
2952 |
msgid "Number of players to show:"
|
2953 |
msgstr ""
|
2954 |
|
2955 |
-
#: includes/class-sp-ajax.php:
|
2956 |
-
#: includes/widgets/class-sp-widget-player-gallery.php:
|
2957 |
-
#: includes/widgets/class-sp-widget-player-list.php:
|
2958 |
msgid "Sort by:"
|
2959 |
msgstr ""
|
2960 |
|
2961 |
-
#: includes/class-sp-ajax.php:
|
2962 |
-
#: includes/widgets/class-sp-widget-player-gallery.php:
|
2963 |
-
#: includes/widgets/class-sp-widget-player-list.php:
|
2964 |
msgid "Display link to view all players"
|
2965 |
msgstr ""
|
2966 |
|
2967 |
-
#: includes/class-sp-ajax.php:671
|
2968 |
-
#: includes/widgets/class-sp-widget-player-gallery.php:136
|
2969 |
-
msgid "Display player names on hover"
|
2970 |
-
msgstr ""
|
2971 |
-
|
2972 |
#: includes/class-sp-countries.php:32
|
2973 |
msgid "Africa"
|
2974 |
msgstr ""
|
@@ -2985,891 +3045,895 @@ msgstr ""
|
|
2985 |
msgid "North America"
|
2986 |
msgstr ""
|
2987 |
|
2988 |
-
#: includes/class-sp-countries.php:
|
2989 |
msgid "Oceania"
|
2990 |
msgstr ""
|
2991 |
|
2992 |
-
#: includes/class-sp-countries.php:
|
2993 |
msgid "South America"
|
2994 |
msgstr ""
|
2995 |
|
2996 |
-
#: includes/class-sp-countries.php:
|
2997 |
msgid "Afghanistan"
|
2998 |
msgstr ""
|
2999 |
|
3000 |
-
#: includes/class-sp-countries.php:
|
3001 |
msgid "Anguilla"
|
3002 |
msgstr ""
|
3003 |
|
3004 |
-
#: includes/class-sp-countries.php:
|
3005 |
msgid "Albania"
|
3006 |
msgstr ""
|
3007 |
|
3008 |
-
#: includes/class-sp-countries.php:
|
3009 |
msgid "Algeria"
|
3010 |
msgstr ""
|
3011 |
|
3012 |
-
#: includes/class-sp-countries.php:
|
3013 |
msgid "Andorra"
|
3014 |
msgstr ""
|
3015 |
|
3016 |
-
#: includes/class-sp-countries.php:
|
3017 |
msgid "Angola"
|
3018 |
msgstr ""
|
3019 |
|
3020 |
-
#: includes/class-sp-countries.php:
|
3021 |
msgid "Argentina"
|
3022 |
msgstr ""
|
3023 |
|
3024 |
-
#: includes/class-sp-countries.php:
|
3025 |
msgid "Armenia"
|
3026 |
msgstr ""
|
3027 |
|
3028 |
-
#: includes/class-sp-countries.php:
|
3029 |
msgid "Aruba"
|
3030 |
msgstr ""
|
3031 |
|
3032 |
-
#: includes/class-sp-countries.php:
|
3033 |
msgid "American Samoa"
|
3034 |
msgstr ""
|
3035 |
|
3036 |
-
#: includes/class-sp-countries.php:
|
3037 |
msgid "Antigua and Barbuda"
|
3038 |
msgstr ""
|
3039 |
|
3040 |
-
#: includes/class-sp-countries.php:
|
3041 |
msgid "Australia"
|
3042 |
msgstr ""
|
3043 |
|
3044 |
-
#: includes/class-sp-countries.php:
|
3045 |
msgid "Austria"
|
3046 |
msgstr ""
|
3047 |
|
3048 |
-
#: includes/class-sp-countries.php:
|
3049 |
msgid "Azerbaijan"
|
3050 |
msgstr ""
|
3051 |
|
3052 |
-
#: includes/class-sp-countries.php:
|
3053 |
msgid "Bahamas"
|
3054 |
msgstr ""
|
3055 |
|
3056 |
-
#: includes/class-sp-countries.php:
|
3057 |
msgid "Bangladesh"
|
3058 |
msgstr ""
|
3059 |
|
3060 |
-
#: includes/class-sp-countries.php:
|
3061 |
msgid "Burundi"
|
3062 |
msgstr ""
|
3063 |
|
3064 |
-
#: includes/class-sp-countries.php:
|
3065 |
msgid "Belgium"
|
3066 |
msgstr ""
|
3067 |
|
3068 |
-
#: includes/class-sp-countries.php:
|
3069 |
msgid "Benin"
|
3070 |
msgstr ""
|
3071 |
|
3072 |
-
#: includes/class-sp-countries.php:
|
3073 |
msgid "Bermuda"
|
3074 |
msgstr ""
|
3075 |
|
3076 |
-
#: includes/class-sp-countries.php:
|
3077 |
msgid "Burkina Faso"
|
3078 |
msgstr ""
|
3079 |
|
3080 |
-
#: includes/class-sp-countries.php:
|
3081 |
msgid "Bahrain"
|
3082 |
msgstr ""
|
3083 |
|
3084 |
-
#: includes/class-sp-countries.php:
|
3085 |
msgid "Bhutan"
|
3086 |
msgstr ""
|
3087 |
|
3088 |
-
#: includes/class-sp-countries.php:
|
3089 |
msgid "Bosnia and Herzegovina"
|
3090 |
msgstr ""
|
3091 |
|
3092 |
-
#: includes/class-sp-countries.php:
|
3093 |
msgid "Belarus"
|
3094 |
msgstr ""
|
3095 |
|
3096 |
-
#: includes/class-sp-countries.php:
|
3097 |
msgid "Belize"
|
3098 |
msgstr ""
|
3099 |
|
3100 |
-
#: includes/class-sp-countries.php:
|
3101 |
msgid "Bolivia"
|
3102 |
msgstr ""
|
3103 |
|
3104 |
-
#: includes/class-sp-countries.php:
|
3105 |
msgid "Botswana"
|
3106 |
msgstr ""
|
3107 |
|
3108 |
-
#: includes/class-sp-countries.php:
|
3109 |
msgid "Brazil"
|
3110 |
msgstr ""
|
3111 |
|
3112 |
-
#: includes/class-sp-countries.php:
|
3113 |
msgid "Barbados"
|
3114 |
msgstr ""
|
3115 |
|
3116 |
-
#: includes/class-sp-countries.php:
|
3117 |
msgid "Brunei"
|
3118 |
msgstr ""
|
3119 |
|
3120 |
-
#: includes/class-sp-countries.php:
|
3121 |
msgid "Bulgaria"
|
3122 |
msgstr ""
|
3123 |
|
3124 |
-
#: includes/class-sp-countries.php:
|
3125 |
msgid "Cambodia"
|
3126 |
msgstr ""
|
3127 |
|
3128 |
-
#: includes/class-sp-countries.php:
|
3129 |
msgid "Canada"
|
3130 |
msgstr ""
|
3131 |
|
3132 |
-
#: includes/class-sp-countries.php:
|
3133 |
msgid "Cayman Islands"
|
3134 |
msgstr ""
|
3135 |
|
3136 |
-
#: includes/class-sp-countries.php:
|
3137 |
msgid "Republic of the Congo"
|
3138 |
msgstr ""
|
3139 |
|
3140 |
-
#: includes/class-sp-countries.php:
|
3141 |
msgid "Chad"
|
3142 |
msgstr ""
|
3143 |
|
3144 |
-
#: includes/class-sp-countries.php:
|
3145 |
msgid "Chile"
|
3146 |
msgstr ""
|
3147 |
|
3148 |
-
#: includes/class-sp-countries.php:
|
3149 |
msgid "China"
|
3150 |
msgstr ""
|
3151 |
|
3152 |
-
#: includes/class-sp-countries.php:
|
3153 |
msgid "Ivory Coast"
|
3154 |
msgstr ""
|
3155 |
|
3156 |
-
#: includes/class-sp-countries.php:
|
3157 |
msgid "Cameroon"
|
3158 |
msgstr ""
|
3159 |
|
3160 |
-
#: includes/class-sp-countries.php:
|
3161 |
msgid "Democratic Republic of the Congo"
|
3162 |
msgstr ""
|
3163 |
|
3164 |
-
#: includes/class-sp-countries.php:
|
3165 |
msgid "Cook Islands"
|
3166 |
msgstr ""
|
3167 |
|
3168 |
-
#: includes/class-sp-countries.php:
|
3169 |
msgid "Colombia"
|
3170 |
msgstr ""
|
3171 |
|
3172 |
-
#: includes/class-sp-countries.php:
|
3173 |
msgid "Comoros"
|
3174 |
msgstr ""
|
3175 |
|
3176 |
-
#: includes/class-sp-countries.php:
|
3177 |
msgid "Cape Verde"
|
3178 |
msgstr ""
|
3179 |
|
3180 |
-
#: includes/class-sp-countries.php:
|
3181 |
msgid "Costa Rica"
|
3182 |
msgstr ""
|
3183 |
|
3184 |
-
#: includes/class-sp-countries.php:
|
3185 |
msgid "Croatia"
|
3186 |
msgstr ""
|
3187 |
|
3188 |
-
#: includes/class-sp-countries.php:
|
3189 |
msgid "Central African Republic"
|
3190 |
msgstr ""
|
3191 |
|
3192 |
-
#: includes/class-sp-countries.php:
|
3193 |
msgid "Cuba"
|
3194 |
msgstr ""
|
3195 |
|
3196 |
-
#: includes/class-sp-countries.php:
|
3197 |
msgid "Curacao"
|
3198 |
msgstr ""
|
3199 |
|
3200 |
-
#: includes/class-sp-countries.php:
|
3201 |
msgid "Cyprus"
|
3202 |
msgstr ""
|
3203 |
|
3204 |
-
#: includes/class-sp-countries.php:
|
3205 |
msgid "Czech Republic"
|
3206 |
msgstr ""
|
3207 |
|
3208 |
-
#: includes/class-sp-countries.php:
|
3209 |
msgid "Denmark"
|
3210 |
msgstr ""
|
3211 |
|
3212 |
-
#: includes/class-sp-countries.php:
|
3213 |
msgid "Djibouti"
|
3214 |
msgstr ""
|
3215 |
|
3216 |
-
#: includes/class-sp-countries.php:
|
3217 |
msgid "Dominica"
|
3218 |
msgstr ""
|
3219 |
|
3220 |
-
#: includes/class-sp-countries.php:
|
3221 |
msgid "Dominican Republic"
|
3222 |
msgstr ""
|
3223 |
|
3224 |
-
#: includes/class-sp-countries.php:
|
3225 |
msgid "Ecuador"
|
3226 |
msgstr ""
|
3227 |
|
3228 |
-
#: includes/class-sp-countries.php:
|
3229 |
msgid "Egypt"
|
3230 |
msgstr ""
|
3231 |
|
3232 |
-
#: includes/class-sp-countries.php:
|
3233 |
msgid "England"
|
3234 |
msgstr ""
|
3235 |
|
3236 |
-
#: includes/class-sp-countries.php:
|
3237 |
msgid "Equatorial Guinea"
|
3238 |
msgstr ""
|
3239 |
|
3240 |
-
#: includes/class-sp-countries.php:
|
3241 |
msgid "Eritrea"
|
3242 |
msgstr ""
|
3243 |
|
3244 |
-
#: includes/class-sp-countries.php:
|
3245 |
msgid "Western Sahara"
|
3246 |
msgstr ""
|
3247 |
|
3248 |
-
#: includes/class-sp-countries.php:
|
3249 |
msgid "Spain"
|
3250 |
msgstr ""
|
3251 |
|
3252 |
-
#: includes/class-sp-countries.php:
|
3253 |
msgid "Estonia"
|
3254 |
msgstr ""
|
3255 |
|
3256 |
-
#: includes/class-sp-countries.php:
|
3257 |
msgid "Ethiopia"
|
3258 |
msgstr ""
|
3259 |
|
3260 |
-
#: includes/class-sp-countries.php:
|
3261 |
msgid "Fiji"
|
3262 |
msgstr ""
|
3263 |
|
3264 |
-
#: includes/class-sp-countries.php:
|
3265 |
msgid "Finland"
|
3266 |
msgstr ""
|
3267 |
|
3268 |
-
#: includes/class-sp-countries.php:
|
3269 |
msgid "France"
|
3270 |
msgstr ""
|
3271 |
|
3272 |
-
#: includes/class-sp-countries.php:
|
3273 |
msgid "Faroe Islands"
|
3274 |
msgstr ""
|
3275 |
|
3276 |
-
#: includes/class-sp-countries.php:
|
3277 |
msgid "Micronesia"
|
3278 |
msgstr ""
|
3279 |
|
3280 |
-
#: includes/class-sp-countries.php:
|
3281 |
msgid "Gabon"
|
3282 |
msgstr ""
|
3283 |
|
3284 |
-
#: includes/class-sp-countries.php:
|
3285 |
msgid "Gambia"
|
3286 |
msgstr ""
|
3287 |
|
3288 |
-
#: includes/class-sp-countries.php:
|
3289 |
msgid "United Kingdom"
|
3290 |
msgstr ""
|
3291 |
|
3292 |
-
#: includes/class-sp-countries.php:
|
3293 |
msgid "Georgia"
|
3294 |
msgstr ""
|
3295 |
|
3296 |
-
#: includes/class-sp-countries.php:
|
3297 |
msgid "Germany"
|
3298 |
msgstr ""
|
3299 |
|
3300 |
-
#: includes/class-sp-countries.php:
|
3301 |
msgid "Ghana"
|
3302 |
msgstr ""
|
3303 |
|
3304 |
-
#: includes/class-sp-countries.php:
|
3305 |
msgid "Guinea-Bissau"
|
3306 |
msgstr ""
|
3307 |
|
3308 |
-
#: includes/class-sp-countries.php:
|
3309 |
msgid "Greece"
|
3310 |
msgstr ""
|
3311 |
|
3312 |
-
#: includes/class-sp-countries.php:
|
3313 |
msgid "Grenada"
|
3314 |
msgstr ""
|
3315 |
|
3316 |
-
#: includes/class-sp-countries.php:
|
3317 |
msgid "Guatemala"
|
3318 |
msgstr ""
|
3319 |
|
3320 |
-
#: includes/class-sp-countries.php:
|
3321 |
msgid "Guinea"
|
3322 |
msgstr ""
|
3323 |
|
3324 |
-
#: includes/class-sp-countries.php:
|
3325 |
msgid "Guam"
|
3326 |
msgstr ""
|
3327 |
|
3328 |
-
#: includes/class-sp-countries.php:
|
3329 |
msgid "Guyana"
|
3330 |
msgstr ""
|
3331 |
|
3332 |
-
#: includes/class-sp-countries.php:
|
3333 |
msgid "Haiti"
|
3334 |
msgstr ""
|
3335 |
|
3336 |
-
#: includes/class-sp-countries.php:
|
3337 |
msgid "Hong Kong"
|
3338 |
msgstr ""
|
3339 |
|
3340 |
-
#: includes/class-sp-countries.php:
|
3341 |
msgid "Honduras"
|
3342 |
msgstr ""
|
3343 |
|
3344 |
-
#: includes/class-sp-countries.php:
|
3345 |
msgid "Hungary"
|
3346 |
msgstr ""
|
3347 |
|
3348 |
-
#: includes/class-sp-countries.php:
|
3349 |
msgid "Indonesia"
|
3350 |
msgstr ""
|
3351 |
|
3352 |
-
#: includes/class-sp-countries.php:
|
3353 |
msgid "India"
|
3354 |
msgstr ""
|
3355 |
|
3356 |
-
#: includes/class-sp-countries.php:
|
3357 |
msgid "Ireland"
|
3358 |
msgstr ""
|
3359 |
|
3360 |
-
#: includes/class-sp-countries.php:
|
3361 |
msgid "Iran"
|
3362 |
msgstr ""
|
3363 |
|
3364 |
-
#: includes/class-sp-countries.php:
|
3365 |
msgid "Iraq"
|
3366 |
msgstr ""
|
3367 |
|
3368 |
-
#: includes/class-sp-countries.php:
|
3369 |
msgid "Iceland"
|
3370 |
msgstr ""
|
3371 |
|
3372 |
-
#: includes/class-sp-countries.php:
|
3373 |
msgid "Israel"
|
3374 |
msgstr ""
|
3375 |
|
3376 |
-
#: includes/class-sp-countries.php:
|
3377 |
msgid "Italy"
|
3378 |
msgstr ""
|
3379 |
|
3380 |
-
#: includes/class-sp-countries.php:
|
3381 |
msgid "Jamaica"
|
3382 |
msgstr ""
|
3383 |
|
3384 |
-
#: includes/class-sp-countries.php:
|
3385 |
msgid "Jordan"
|
3386 |
msgstr ""
|
3387 |
|
3388 |
-
#: includes/class-sp-countries.php:
|
3389 |
msgid "Japan"
|
3390 |
msgstr ""
|
3391 |
|
3392 |
-
#: includes/class-sp-countries.php:
|
3393 |
msgid "Kazakhstan"
|
3394 |
msgstr ""
|
3395 |
|
3396 |
-
#: includes/class-sp-countries.php:
|
3397 |
msgid "Kenya"
|
3398 |
msgstr ""
|
3399 |
|
3400 |
-
#: includes/class-sp-countries.php:
|
3401 |
msgid "Kosovo"
|
3402 |
msgstr ""
|
3403 |
|
3404 |
-
#: includes/class-sp-countries.php:
|
3405 |
msgid "Kyrgyzstan"
|
3406 |
msgstr ""
|
3407 |
|
3408 |
-
#: includes/class-sp-countries.php:
|
3409 |
msgid "Kiribati"
|
3410 |
msgstr ""
|
3411 |
|
3412 |
-
#: includes/class-sp-countries.php:
|
3413 |
msgid "South Korea"
|
3414 |
msgstr ""
|
3415 |
|
3416 |
-
#: includes/class-sp-countries.php:
|
3417 |
msgid "Saudi Arabia"
|
3418 |
msgstr ""
|
3419 |
|
3420 |
-
#: includes/class-sp-countries.php:
|
3421 |
msgid "Kuwait"
|
3422 |
msgstr ""
|
3423 |
|
3424 |
-
#: includes/class-sp-countries.php:
|
3425 |
msgid "Laos"
|
3426 |
msgstr ""
|
3427 |
|
3428 |
-
#: includes/class-sp-countries.php:
|
3429 |
msgid "Liberia"
|
3430 |
msgstr ""
|
3431 |
|
3432 |
-
#: includes/class-sp-countries.php:
|
3433 |
msgid "Libya"
|
3434 |
msgstr ""
|
3435 |
|
3436 |
-
#: includes/class-sp-countries.php:
|
3437 |
msgid "Saint Lucia"
|
3438 |
msgstr ""
|
3439 |
|
3440 |
-
#: includes/class-sp-countries.php:
|
3441 |
msgid "Lesotho"
|
3442 |
msgstr ""
|
3443 |
|
3444 |
-
#: includes/class-sp-countries.php:
|
3445 |
msgid "Lebanon"
|
3446 |
msgstr ""
|
3447 |
|
3448 |
-
#: includes/class-sp-countries.php:
|
3449 |
msgid "Liechtenstein"
|
3450 |
msgstr ""
|
3451 |
|
3452 |
-
#: includes/class-sp-countries.php:
|
3453 |
msgid "Lithuania"
|
3454 |
msgstr ""
|
3455 |
|
3456 |
-
#: includes/class-sp-countries.php:
|
3457 |
msgid "Luxembourg"
|
3458 |
msgstr ""
|
3459 |
|
3460 |
-
#: includes/class-sp-countries.php:
|
3461 |
msgid "Latvia"
|
3462 |
msgstr ""
|
3463 |
|
3464 |
-
#: includes/class-sp-countries.php:
|
3465 |
msgid "Macau"
|
3466 |
msgstr ""
|
3467 |
|
3468 |
-
#: includes/class-sp-countries.php:
|
3469 |
msgid "Madagascar"
|
3470 |
msgstr ""
|
3471 |
|
3472 |
-
#: includes/class-sp-countries.php:
|
3473 |
msgid "Morocco"
|
3474 |
msgstr ""
|
3475 |
|
3476 |
-
#: includes/class-sp-countries.php:
|
3477 |
msgid "Malaysia"
|
3478 |
msgstr ""
|
3479 |
|
3480 |
-
#: includes/class-sp-countries.php:
|
3481 |
msgid "Monaco"
|
3482 |
msgstr ""
|
3483 |
|
3484 |
-
#: includes/class-sp-countries.php:
|
3485 |
msgid "Moldova"
|
3486 |
msgstr ""
|
3487 |
|
3488 |
-
#: includes/class-sp-countries.php:
|
3489 |
msgid "Maldives"
|
3490 |
msgstr ""
|
3491 |
|
3492 |
-
#: includes/class-sp-countries.php:
|
3493 |
msgid "Mexico"
|
3494 |
msgstr ""
|
3495 |
|
3496 |
-
#: includes/class-sp-countries.php:
|
3497 |
msgid "Marshall Islands"
|
3498 |
msgstr ""
|
3499 |
|
3500 |
-
#: includes/class-sp-countries.php:
|
3501 |
msgid "Macedonia"
|
3502 |
msgstr ""
|
3503 |
|
3504 |
-
#: includes/class-sp-countries.php:
|
3505 |
msgid "Mali"
|
3506 |
msgstr ""
|
3507 |
|
3508 |
-
#: includes/class-sp-countries.php:
|
3509 |
msgid "Malta"
|
3510 |
msgstr ""
|
3511 |
|
3512 |
-
#: includes/class-sp-countries.php:
|
3513 |
msgid "Montenegro"
|
3514 |
msgstr ""
|
3515 |
|
3516 |
-
#: includes/class-sp-countries.php:
|
3517 |
msgid "Mongolia"
|
3518 |
msgstr ""
|
3519 |
|
3520 |
-
#: includes/class-sp-countries.php:
|
3521 |
msgid "Mozambique"
|
3522 |
msgstr ""
|
3523 |
|
3524 |
-
#: includes/class-sp-countries.php:
|
3525 |
msgid "Mauritius"
|
3526 |
msgstr ""
|
3527 |
|
3528 |
-
#: includes/class-sp-countries.php:
|
3529 |
msgid "Montserrat"
|
3530 |
msgstr ""
|
3531 |
|
3532 |
-
#: includes/class-sp-countries.php:
|
3533 |
msgid "Mauritania"
|
3534 |
msgstr ""
|
3535 |
|
3536 |
-
#: includes/class-sp-countries.php:
|
3537 |
msgid "Malawi"
|
3538 |
msgstr ""
|
3539 |
|
3540 |
-
#: includes/class-sp-countries.php:
|
3541 |
msgid "Burma"
|
3542 |
msgstr ""
|
3543 |
|
3544 |
-
#: includes/class-sp-countries.php:
|
3545 |
msgid "Namibia"
|
3546 |
msgstr ""
|
3547 |
|
3548 |
-
#: includes/class-sp-countries.php:
|
3549 |
msgid "Nicaragua"
|
3550 |
msgstr ""
|
3551 |
|
3552 |
-
#: includes/class-sp-countries.php:
|
3553 |
msgid "New Caledonia"
|
3554 |
msgstr ""
|
3555 |
|
3556 |
-
#: includes/class-sp-countries.php:
|
3557 |
msgid "Netherlands"
|
3558 |
msgstr ""
|
3559 |
|
3560 |
-
#: includes/class-sp-countries.php:
|
3561 |
msgid "Nepal"
|
3562 |
msgstr ""
|
3563 |
|
3564 |
-
#: includes/class-sp-countries.php:
|
3565 |
msgid "Nigeria"
|
3566 |
msgstr ""
|
3567 |
|
3568 |
-
#: includes/class-sp-countries.php:
|
3569 |
msgid "Niger"
|
3570 |
msgstr ""
|
3571 |
|
3572 |
-
#: includes/class-sp-countries.php:
|
3573 |
msgid "Northern Ireland"
|
3574 |
msgstr ""
|
3575 |
|
3576 |
-
#: includes/class-sp-countries.php:
|
3577 |
msgid "Norway"
|
3578 |
msgstr ""
|
3579 |
|
3580 |
-
#: includes/class-sp-countries.php:
|
3581 |
msgid "Nauru"
|
3582 |
msgstr ""
|
3583 |
|
3584 |
-
#: includes/class-sp-countries.php:
|
3585 |
msgid "New Zealand"
|
3586 |
msgstr ""
|
3587 |
|
3588 |
-
#: includes/class-sp-countries.php:
|
3589 |
msgid "Oman"
|
3590 |
msgstr ""
|
3591 |
|
3592 |
-
#: includes/class-sp-countries.php:
|
3593 |
msgid "Pakistan"
|
3594 |
msgstr ""
|
3595 |
|
3596 |
-
#: includes/class-sp-countries.php:
|
3597 |
msgid "Panama"
|
3598 |
msgstr ""
|
3599 |
|
3600 |
-
#: includes/class-sp-countries.php:
|
3601 |
msgid "Paraguay"
|
3602 |
msgstr ""
|
3603 |
|
3604 |
-
#: includes/class-sp-countries.php:
|
3605 |
msgid "Peru"
|
3606 |
msgstr ""
|
3607 |
|
3608 |
-
#: includes/class-sp-countries.php:
|
3609 |
msgid "Philippines"
|
3610 |
msgstr ""
|
3611 |
|
3612 |
-
#: includes/class-sp-countries.php:
|
3613 |
msgid "Palestine"
|
3614 |
msgstr ""
|
3615 |
|
3616 |
-
#: includes/class-sp-countries.php:
|
3617 |
msgid "Palau"
|
3618 |
msgstr ""
|
3619 |
|
3620 |
-
#: includes/class-sp-countries.php:
|
3621 |
msgid "Papua New Guinea"
|
3622 |
msgstr ""
|
3623 |
|
3624 |
-
#: includes/class-sp-countries.php:
|
3625 |
msgid "Poland"
|
3626 |
msgstr ""
|
3627 |
|
3628 |
-
#: includes/class-sp-countries.php:
|
3629 |
msgid "Portugal"
|
3630 |
msgstr ""
|
3631 |
|
3632 |
-
#: includes/class-sp-countries.php:
|
3633 |
msgid "North Korea"
|
3634 |
msgstr ""
|
3635 |
|
3636 |
-
#: includes/class-sp-countries.php:
|
3637 |
msgid "Puerto Rico"
|
3638 |
msgstr ""
|
3639 |
|
3640 |
-
#: includes/class-sp-countries.php:
|
3641 |
msgid "Qatar"
|
3642 |
msgstr ""
|
3643 |
|
3644 |
-
#: includes/class-sp-countries.php:
|
3645 |
msgid "Romania"
|
3646 |
msgstr ""
|
3647 |
|
3648 |
-
#: includes/class-sp-countries.php:
|
3649 |
msgid "South Africa"
|
3650 |
msgstr ""
|
3651 |
|
3652 |
-
#: includes/class-sp-countries.php:
|
3653 |
msgid "Russia"
|
3654 |
msgstr ""
|
3655 |
|
3656 |
-
#: includes/class-sp-countries.php:
|
3657 |
msgid "Rwanda"
|
3658 |
msgstr ""
|
3659 |
|
3660 |
-
#: includes/class-sp-countries.php:
|
3661 |
msgid "Samoa"
|
3662 |
msgstr ""
|
3663 |
|
3664 |
-
#: includes/class-sp-countries.php:
|
3665 |
msgid "Scotland"
|
3666 |
msgstr ""
|
3667 |
|
3668 |
-
#: includes/class-sp-countries.php:
|
3669 |
msgid "Sudan"
|
3670 |
msgstr ""
|
3671 |
|
3672 |
-
#: includes/class-sp-countries.php:
|
3673 |
msgid "Senegal"
|
3674 |
msgstr ""
|
3675 |
|
3676 |
-
#: includes/class-sp-countries.php:
|
3677 |
msgid "Seychelles"
|
3678 |
msgstr ""
|
3679 |
|
3680 |
-
#: includes/class-sp-countries.php:
|
3681 |
msgid "Singapore"
|
3682 |
msgstr ""
|
3683 |
|
3684 |
-
#: includes/class-sp-countries.php:
|
3685 |
msgid "Saint Kitts and Nevis"
|
3686 |
msgstr ""
|
3687 |
|
3688 |
-
#: includes/class-sp-countries.php:
|
3689 |
msgid "Sierra Leone"
|
3690 |
msgstr ""
|
3691 |
|
3692 |
-
#: includes/class-sp-countries.php:
|
3693 |
msgid "El Salvador"
|
3694 |
msgstr ""
|
3695 |
|
3696 |
-
#: includes/class-sp-countries.php:
|
3697 |
msgid "San Marino"
|
3698 |
msgstr ""
|
3699 |
|
3700 |
-
#: includes/class-sp-countries.php:
|
3701 |
msgid "Solomon Islands"
|
3702 |
msgstr ""
|
3703 |
|
3704 |
-
#: includes/class-sp-countries.php:
|
3705 |
msgid "Somalia"
|
3706 |
msgstr ""
|
3707 |
|
3708 |
-
#: includes/class-sp-countries.php:
|
3709 |
msgid "Serbia"
|
3710 |
msgstr ""
|
3711 |
|
3712 |
-
#: includes/class-sp-countries.php:
|
3713 |
msgid "Sri Lanka"
|
3714 |
msgstr ""
|
3715 |
|
3716 |
-
#: includes/class-sp-countries.php:
|
3717 |
msgid "South Sudan"
|
3718 |
msgstr ""
|
3719 |
|
3720 |
-
#: includes/class-sp-countries.php:
|
3721 |
msgid "Sao Tome and Principe"
|
3722 |
msgstr ""
|
3723 |
|
3724 |
-
#: includes/class-sp-countries.php:
|
3725 |
msgid "Switzerland"
|
3726 |
msgstr ""
|
3727 |
|
3728 |
-
#: includes/class-sp-countries.php:
|
3729 |
msgid "Suriname"
|
3730 |
msgstr ""
|
3731 |
|
3732 |
-
#: includes/class-sp-countries.php:
|
3733 |
msgid "Slovakia"
|
3734 |
msgstr ""
|
3735 |
|
3736 |
-
#: includes/class-sp-countries.php:
|
3737 |
msgid "Slovenia"
|
3738 |
msgstr ""
|
3739 |
|
3740 |
-
#: includes/class-sp-countries.php:
|
3741 |
msgid "Sweden"
|
3742 |
msgstr ""
|
3743 |
|
3744 |
-
#: includes/class-sp-countries.php:
|
3745 |
msgid "Swaziland"
|
3746 |
msgstr ""
|
3747 |
|
3748 |
-
#: includes/class-sp-countries.php:
|
3749 |
msgid "Syria"
|
3750 |
msgstr ""
|
3751 |
|
3752 |
-
#: includes/class-sp-countries.php:
|
3753 |
msgid "Tahiti"
|
3754 |
msgstr ""
|
3755 |
|
3756 |
-
#: includes/class-sp-countries.php:
|
3757 |
msgid "Tanzania"
|
3758 |
msgstr ""
|
3759 |
|
3760 |
-
#: includes/class-sp-countries.php:
|
3761 |
msgid "Turks and Caicos Islands"
|
3762 |
msgstr ""
|
3763 |
|
3764 |
-
#: includes/class-sp-countries.php:
|
3765 |
msgid "Tonga"
|
3766 |
msgstr ""
|
3767 |
|
3768 |
-
#: includes/class-sp-countries.php:
|
3769 |
msgid "Thailand"
|
3770 |
msgstr ""
|
3771 |
|
3772 |
-
#: includes/class-sp-countries.php:
|
3773 |
msgid "Tajikistan"
|
3774 |
msgstr ""
|
3775 |
|
3776 |
-
#: includes/class-sp-countries.php:
|
3777 |
msgid "Turkmenistan"
|
3778 |
msgstr ""
|
3779 |
|
3780 |
-
#: includes/class-sp-countries.php:
|
3781 |
msgid "East Timor"
|
3782 |
msgstr ""
|
3783 |
|
3784 |
-
#: includes/class-sp-countries.php:
|
3785 |
msgid "Togo"
|
3786 |
msgstr ""
|
3787 |
|
3788 |
-
#: includes/class-sp-countries.php:
|
3789 |
msgid "Taiwan"
|
3790 |
msgstr ""
|
3791 |
|
3792 |
-
#: includes/class-sp-countries.php:
|
3793 |
msgid "Trinidad and Tobago"
|
3794 |
msgstr ""
|
3795 |
|
3796 |
-
#: includes/class-sp-countries.php:
|
3797 |
msgid "Tunisia"
|
3798 |
msgstr ""
|
3799 |
|
3800 |
-
#: includes/class-sp-countries.php:
|
3801 |
msgid "Turkey"
|
3802 |
msgstr ""
|
3803 |
|
3804 |
-
#: includes/class-sp-countries.php:
|
3805 |
msgid "Tuvalu"
|
3806 |
msgstr ""
|
3807 |
|
3808 |
-
#: includes/class-sp-countries.php:
|
3809 |
msgid "United Arab Emirates"
|
3810 |
msgstr ""
|
3811 |
|
3812 |
-
#: includes/class-sp-countries.php:
|
3813 |
msgid "Uganda"
|
3814 |
msgstr ""
|
3815 |
|
3816 |
-
#: includes/class-sp-countries.php:
|
3817 |
msgid "Ukraine"
|
3818 |
msgstr ""
|
3819 |
|
3820 |
-
#: includes/class-sp-countries.php:
|
3821 |
msgid "Uruguay"
|
3822 |
msgstr ""
|
3823 |
|
3824 |
-
#: includes/class-sp-countries.php:
|
3825 |
msgid "United States"
|
3826 |
msgstr ""
|
3827 |
|
3828 |
-
#: includes/class-sp-countries.php:
|
3829 |
msgid "Uzbekistan"
|
3830 |
msgstr ""
|
3831 |
|
3832 |
-
#: includes/class-sp-countries.php:
|
3833 |
msgid "Vanuatu"
|
3834 |
msgstr ""
|
3835 |
|
3836 |
-
#: includes/class-sp-countries.php:
|
3837 |
msgid "Vatican City"
|
3838 |
msgstr ""
|
3839 |
|
3840 |
-
#: includes/class-sp-countries.php:
|
3841 |
msgid "Venezuela"
|
3842 |
msgstr ""
|
3843 |
|
3844 |
-
#: includes/class-sp-countries.php:
|
3845 |
msgid "British Virgin Islands"
|
3846 |
msgstr ""
|
3847 |
|
3848 |
-
#: includes/class-sp-countries.php:
|
3849 |
msgid "Vietnam"
|
3850 |
msgstr ""
|
3851 |
|
3852 |
-
#: includes/class-sp-countries.php:
|
3853 |
msgid "Saint Vincent and the Grenadines"
|
3854 |
msgstr ""
|
3855 |
|
3856 |
-
#: includes/class-sp-countries.php:
|
3857 |
msgid "US Virgin Islands"
|
3858 |
msgstr ""
|
3859 |
|
3860 |
-
#: includes/class-sp-countries.php:
|
3861 |
msgid "Wales"
|
3862 |
msgstr ""
|
3863 |
|
3864 |
-
#: includes/class-sp-countries.php:
|
|
|
|
|
|
|
|
|
3865 |
msgid "Yemen"
|
3866 |
msgstr ""
|
3867 |
|
3868 |
-
#: includes/class-sp-countries.php:
|
3869 |
msgid "Zambia"
|
3870 |
msgstr ""
|
3871 |
|
3872 |
-
#: includes/class-sp-countries.php:
|
3873 |
msgid "Zimbabwe"
|
3874 |
msgstr ""
|
3875 |
|
@@ -3897,20 +3961,20 @@ msgstr ""
|
|
3897 |
msgid "Event Manager"
|
3898 |
msgstr ""
|
3899 |
|
3900 |
-
#: includes/class-sp-install.php:
|
3901 |
msgid "Team Manager"
|
3902 |
msgstr ""
|
3903 |
|
3904 |
-
#: includes/class-sp-install.php:
|
3905 |
msgid "League Manager"
|
3906 |
msgstr ""
|
3907 |
|
3908 |
-
#: includes/class-sp-install.php:
|
3909 |
msgid "What's new:"
|
3910 |
msgstr ""
|
3911 |
|
3912 |
-
#: includes/class-sp-league-table.php:
|
3913 |
-
#: templates/league-table.php:
|
3914 |
msgid "Pos"
|
3915 |
msgstr ""
|
3916 |
|
@@ -3939,371 +4003,402 @@ msgid "Create automated league tables to keep track of team standings."
|
|
3939 |
msgstr ""
|
3940 |
|
3941 |
#: includes/class-sp-modules.php:54
|
3942 |
-
msgid "
|
3943 |
msgstr ""
|
3944 |
|
3945 |
#: includes/class-sp-modules.php:58
|
3946 |
-
msgid "
|
|
|
|
|
|
|
|
|
3947 |
msgstr ""
|
3948 |
|
3949 |
#: includes/class-sp-modules.php:65
|
3950 |
-
msgid "Create
|
3951 |
msgstr ""
|
3952 |
|
3953 |
#: includes/class-sp-modules.php:68
|
3954 |
-
msgid "
|
3955 |
msgstr ""
|
3956 |
|
3957 |
#: includes/class-sp-modules.php:72
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3958 |
msgid "Display each player's birthday and their current age."
|
3959 |
msgstr ""
|
3960 |
|
3961 |
-
#: includes/class-sp-modules.php:
|
3962 |
msgid "Directories"
|
3963 |
msgstr ""
|
3964 |
|
3965 |
-
#: includes/class-sp-modules.php:
|
3966 |
msgid "Organize and display staff in list and gallery layouts."
|
3967 |
msgstr ""
|
3968 |
|
3969 |
-
#: includes/class-sp-modules.php:
|
3970 |
-
#: modules/sportspress-tutorials.php:
|
3971 |
msgid "Tutorials"
|
3972 |
msgstr ""
|
3973 |
|
3974 |
-
#: includes/class-sp-modules.php:
|
3975 |
msgid "Display a dashboard page with SportsPress video tutorials."
|
3976 |
msgstr ""
|
3977 |
|
3978 |
-
#: includes/class-sp-modules.php:
|
3979 |
msgid "Branding"
|
3980 |
msgstr ""
|
3981 |
|
3982 |
-
#: includes/class-sp-modules.php:
|
3983 |
msgid "Instantly rebrand the dashboard with your own logo and colors."
|
3984 |
msgstr ""
|
3985 |
|
3986 |
-
#: includes/class-sp-modules.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3987 |
msgid "Tweet #SportsPress"
|
3988 |
msgstr ""
|
3989 |
|
3990 |
-
#: includes/class-sp-modules.php:
|
3991 |
msgid ""
|
3992 |
"Help spread the word by tweeting with #SportsPress and get the Twitter "
|
3993 |
"module for free."
|
3994 |
msgstr ""
|
3995 |
|
3996 |
-
#: includes/class-sp-modules.php:
|
3997 |
msgid "Add a Twitter feed to team, player, and staff pages."
|
3998 |
msgstr ""
|
3999 |
|
4000 |
-
#: includes/class-sp-modules.php:
|
4001 |
-
msgid "
|
4002 |
msgstr ""
|
4003 |
|
4004 |
-
#: includes/class-sp-modules.php:
|
4005 |
-
msgid "
|
4006 |
msgstr ""
|
4007 |
|
4008 |
-
#: includes/class-sp-modules.php:
|
4009 |
-
msgid "
|
4010 |
msgstr ""
|
4011 |
|
4012 |
-
#: includes/class-sp-modules.php:
|
4013 |
-
msgid "
|
4014 |
msgstr ""
|
4015 |
|
4016 |
-
#: includes/class-sp-post-types.php:
|
4017 |
msgid "Edit Competition"
|
4018 |
msgstr ""
|
4019 |
|
4020 |
-
#: includes/class-sp-post-types.php:
|
4021 |
-
#: includes/class-sp-post-types.php:
|
4022 |
-
#: includes/class-sp-post-types.php:
|
4023 |
-
#: includes/class-sp-post-types.php:
|
4024 |
-
#: includes/class-sp-post-types.php:
|
4025 |
-
#: includes/class-sp-post-types.php:
|
4026 |
msgid "View"
|
4027 |
msgstr ""
|
4028 |
|
4029 |
-
#: includes/class-sp-post-types.php:
|
4030 |
-
#: includes/class-sp-post-types.php:
|
4031 |
-
#: includes/class-sp-post-types.php:
|
4032 |
msgid "Parent"
|
4033 |
msgstr ""
|
4034 |
|
4035 |
-
#: includes/class-sp-post-types.php:
|
4036 |
-
#: includes/class-sp-post-types.php:
|
4037 |
-
#: includes/class-sp-post-types.php:
|
4038 |
msgid "Parent:"
|
4039 |
msgstr ""
|
4040 |
|
4041 |
-
#: includes/class-sp-post-types.php:
|
4042 |
-
#: includes/class-sp-post-types.php:
|
4043 |
-
#: includes/class-sp-post-types.php:
|
4044 |
-
#: includes/class-sp-post-types.php:
|
4045 |
-
#: includes/class-sp-post-types.php:
|
4046 |
-
#: includes/class-sp-post-types.php:
|
4047 |
-
#: includes/class-sp-post-types.php:
|
4048 |
-
#: includes/class-sp-post-types.php:
|
4049 |
-
#: modules/sportspress-league-tables.php:
|
4050 |
#: modules/sportspress-player-lists.php:71
|
4051 |
msgid "Search"
|
4052 |
msgstr ""
|
4053 |
|
4054 |
-
#: includes/class-sp-post-types.php:
|
4055 |
msgid "Edit Season"
|
4056 |
msgstr ""
|
4057 |
|
4058 |
-
#: includes/class-sp-post-types.php:
|
4059 |
msgid "Edit Venue"
|
4060 |
msgstr ""
|
4061 |
|
4062 |
-
#: includes/class-sp-post-types.php:
|
4063 |
msgid "Edit Position"
|
4064 |
msgstr ""
|
4065 |
|
4066 |
-
#: includes/class-sp-post-types.php:
|
4067 |
msgid "Edit Job"
|
4068 |
msgstr ""
|
4069 |
|
4070 |
-
#: includes/class-sp-post-types.php:
|
4071 |
msgid "Result"
|
4072 |
msgstr ""
|
4073 |
|
4074 |
-
#: includes/class-sp-post-types.php:
|
4075 |
msgid "Add New Result"
|
4076 |
msgstr ""
|
4077 |
|
4078 |
-
#: includes/class-sp-post-types.php:
|
4079 |
msgid "Edit Result"
|
4080 |
msgstr ""
|
4081 |
|
4082 |
-
#: includes/class-sp-post-types.php:
|
4083 |
-
#: includes/class-sp-post-types.php:
|
4084 |
-
#: includes/class-sp-post-types.php:
|
4085 |
-
#: includes/class-sp-post-types.php:
|
4086 |
-
#: includes/class-sp-post-types.php:
|
4087 |
#: modules/sportspress-calendars.php:69
|
4088 |
-
#: modules/sportspress-league-tables.php:
|
4089 |
#: modules/sportspress-player-lists.php:69
|
4090 |
msgid "New"
|
4091 |
msgstr ""
|
4092 |
|
4093 |
-
#: includes/class-sp-post-types.php:
|
4094 |
msgid "Add New Outcome"
|
4095 |
msgstr ""
|
4096 |
|
4097 |
-
#: includes/class-sp-post-types.php:
|
4098 |
msgid "Edit Outcome"
|
4099 |
msgstr ""
|
4100 |
|
4101 |
-
#: includes/class-sp-post-types.php:
|
4102 |
msgid "Column"
|
4103 |
msgstr ""
|
4104 |
|
4105 |
-
#: includes/class-sp-post-types.php:
|
4106 |
msgid "Add New Column"
|
4107 |
msgstr ""
|
4108 |
|
4109 |
-
#: includes/class-sp-post-types.php:
|
4110 |
msgid "Edit Column"
|
4111 |
msgstr ""
|
4112 |
|
4113 |
-
#: includes/class-sp-post-types.php:
|
4114 |
msgid "Metric"
|
4115 |
msgstr ""
|
4116 |
|
4117 |
-
#: includes/class-sp-post-types.php:
|
4118 |
msgid "Add New Metric"
|
4119 |
msgstr ""
|
4120 |
|
4121 |
-
#: includes/class-sp-post-types.php:
|
4122 |
msgid "Edit Metric"
|
4123 |
msgstr ""
|
4124 |
|
4125 |
-
#: includes/class-sp-post-types.php:
|
4126 |
msgid "Add New Performance"
|
4127 |
msgstr ""
|
4128 |
|
4129 |
-
#: includes/class-sp-post-types.php:
|
4130 |
msgid "Edit Performance"
|
4131 |
msgstr ""
|
4132 |
|
4133 |
-
#: includes/class-sp-post-types.php:
|
4134 |
msgid "Statistic"
|
4135 |
msgstr ""
|
4136 |
|
4137 |
-
#: includes/class-sp-post-types.php:
|
4138 |
msgid "Add New Statistic"
|
4139 |
msgstr ""
|
4140 |
|
4141 |
-
#: includes/class-sp-post-types.php:
|
4142 |
msgid "Edit Statistic"
|
4143 |
msgstr ""
|
4144 |
|
4145 |
-
#: includes/class-sp-post-types.php:
|
4146 |
msgid "Edit Event"
|
4147 |
msgstr ""
|
4148 |
|
4149 |
-
#: includes/class-sp-post-types.php:
|
4150 |
msgid "View Event"
|
4151 |
msgstr ""
|
4152 |
|
4153 |
-
#: includes/class-sp-post-types.php:
|
4154 |
msgid "Edit Team"
|
4155 |
msgstr ""
|
4156 |
|
4157 |
-
#: includes/class-sp-post-types.php:
|
4158 |
msgid "View Team"
|
4159 |
msgstr ""
|
4160 |
|
4161 |
-
#: includes/class-sp-post-types.php:
|
4162 |
msgid "Edit Player"
|
4163 |
msgstr ""
|
4164 |
|
4165 |
-
#: includes/class-sp-post-types.php:
|
4166 |
msgid "View Player"
|
4167 |
msgstr ""
|
4168 |
|
4169 |
-
#: includes/class-sp-post-types.php:
|
4170 |
msgid "Add New Staff"
|
4171 |
msgstr ""
|
4172 |
|
4173 |
-
#: includes/class-sp-post-types.php:
|
4174 |
msgid "Edit Staff"
|
4175 |
msgstr ""
|
4176 |
|
4177 |
-
#: includes/sp-core-functions.php:
|
4178 |
msgid "Average"
|
4179 |
msgstr ""
|
4180 |
|
4181 |
-
#: includes/sp-core-functions.php:
|
4182 |
msgid "Published"
|
4183 |
msgstr ""
|
4184 |
|
4185 |
-
#: includes/sp-core-functions.php:
|
4186 |
msgid "Scheduled"
|
4187 |
msgstr ""
|
4188 |
|
4189 |
-
#: includes/sp-core-functions.php:
|
4190 |
msgid "Date range:"
|
4191 |
msgstr ""
|
4192 |
|
4193 |
-
#: includes/sp-core-functions.php:
|
4194 |
msgid "(no title)"
|
4195 |
msgstr ""
|
4196 |
|
4197 |
-
#: includes/sp-core-functions.php:
|
|
|
|
|
4198 |
msgid "Select All"
|
4199 |
msgstr ""
|
4200 |
|
4201 |
-
#: includes/sp-core-functions.php:
|
|
|
|
|
|
|
4202 |
msgid "Show all"
|
4203 |
msgstr ""
|
4204 |
|
4205 |
-
#: includes/sp-core-functions.php:
|
4206 |
msgid "Substitutes"
|
4207 |
msgstr ""
|
4208 |
|
4209 |
-
#: includes/sp-core-functions.php:
|
4210 |
#: templates/event-video.php:19
|
4211 |
msgid "Video"
|
4212 |
msgstr ""
|
4213 |
|
4214 |
-
#: includes/sp-core-functions.php:
|
4215 |
-
#: templates/event-calendar.php:
|
4216 |
msgid "View all events"
|
4217 |
msgstr ""
|
4218 |
|
4219 |
-
#: includes/sp-core-functions.php:
|
4220 |
-
#: templates/player-list.php:
|
4221 |
msgid "View all players"
|
4222 |
msgstr ""
|
4223 |
|
4224 |
-
#: includes/sp-core-functions.php:
|
4225 |
msgid "View full table"
|
4226 |
msgstr ""
|
4227 |
|
4228 |
-
#: includes/sp-core-functions.php:
|
4229 |
msgid "Love SportsPress? Help spread the word by rating us 5★ on WordPress.org"
|
4230 |
msgstr ""
|
4231 |
|
4232 |
-
#: includes/sp-template-hooks.php:
|
4233 |
msgid ""
|
4234 |
"The description is not prominent by default; however, some themes may show "
|
4235 |
"it."
|
4236 |
msgstr ""
|
4237 |
|
4238 |
-
#: includes/sp-template-hooks.php:
|
4239 |
msgid "Select Icon"
|
4240 |
msgstr ""
|
4241 |
|
4242 |
-
#: includes/sp-template-hooks.php:
|
4243 |
msgid "Add icon"
|
4244 |
msgstr ""
|
4245 |
|
4246 |
-
#: includes/sp-template-hooks.php:
|
4247 |
msgid "Remove icon"
|
4248 |
msgstr ""
|
4249 |
|
4250 |
-
#: includes/sp-template-hooks.php:
|
4251 |
msgid "User"
|
4252 |
msgstr ""
|
4253 |
|
4254 |
-
#: includes/sp-template-hooks.php:
|
4255 |
msgid "Select Photo"
|
4256 |
msgstr ""
|
4257 |
|
4258 |
-
#: includes/sp-template-hooks.php:
|
4259 |
msgid "Add photo"
|
4260 |
msgstr ""
|
4261 |
|
4262 |
-
#: includes/sp-template-hooks.php:
|
4263 |
msgid "Remove photo"
|
4264 |
msgstr ""
|
4265 |
|
4266 |
-
#: includes/sp-template-hooks.php:
|
4267 |
msgid "Select Logo"
|
4268 |
msgstr ""
|
4269 |
|
4270 |
-
#: includes/sp-template-hooks.php:
|
4271 |
msgid "Add logo"
|
4272 |
msgstr ""
|
4273 |
|
4274 |
-
#: includes/sp-template-hooks.php:
|
4275 |
msgid "Remove logo"
|
4276 |
msgstr ""
|
4277 |
|
4278 |
-
#: includes/sp-template-hooks.php:
|
4279 |
msgid "Date/Time:"
|
4280 |
msgstr ""
|
4281 |
|
4282 |
-
#: includes/sp-template-hooks.php:
|
4283 |
msgid "Now"
|
4284 |
msgstr ""
|
4285 |
|
4286 |
-
#: includes/widgets/class-sp-widget-
|
4287 |
-
msgid "
|
4288 |
msgstr ""
|
4289 |
|
4290 |
-
#: includes/widgets/class-sp-widget-
|
4291 |
-
|
4292 |
-
|
4293 |
-
|
4294 |
-
#: includes/widgets/class-sp-widget-
|
4295 |
-
|
4296 |
-
|
4297 |
-
|
4298 |
-
|
|
|
4299 |
msgstr ""
|
4300 |
|
4301 |
#: includes/widgets/class-sp-widget-countdown.php:66
|
4302 |
-
#: includes/widgets/class-sp-widget-event-blocks.php:
|
4303 |
-
#: includes/widgets/class-sp-widget-event-list.php:
|
4304 |
-
#: includes/widgets/class-sp-widget-league-table.php:
|
4305 |
-
#: includes/widgets/class-sp-widget-player-gallery.php:
|
4306 |
-
#: includes/widgets/class-sp-widget-player-list.php:
|
4307 |
msgid "Heading:"
|
4308 |
msgstr ""
|
4309 |
|
@@ -4334,7 +4429,7 @@ msgstr ""
|
|
4334 |
msgid "Display a league table."
|
4335 |
msgstr ""
|
4336 |
|
4337 |
-
#: includes/widgets/class-sp-widget-league-table.php:
|
4338 |
msgid "— Select —"
|
4339 |
msgstr ""
|
4340 |
|
@@ -4346,7 +4441,7 @@ msgstr ""
|
|
4346 |
msgid "Player Gallery"
|
4347 |
msgstr ""
|
4348 |
|
4349 |
-
#: includes/widgets/class-sp-widget-player-gallery.php:
|
4350 |
msgid "Random"
|
4351 |
msgstr ""
|
4352 |
|
@@ -4354,7 +4449,7 @@ msgstr ""
|
|
4354 |
msgid "Display a list of players."
|
4355 |
msgstr ""
|
4356 |
|
4357 |
-
#: includes/widgets/class-sp-widget-player-list.php:
|
4358 |
msgid "Performance:"
|
4359 |
msgstr ""
|
4360 |
|
@@ -4362,6 +4457,29 @@ msgstr ""
|
|
4362 |
msgid "Display a single staff member."
|
4363 |
msgstr ""
|
4364 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4365 |
#: modules/sportspress-calendars.php:67
|
4366 |
msgid "Add New Calendar"
|
4367 |
msgstr ""
|
@@ -4379,18 +4497,8 @@ msgid "Feeds"
|
|
4379 |
msgstr ""
|
4380 |
|
4381 |
#: modules/sportspress-calendars.php:196 modules/sportspress-calendars.php:265
|
4382 |
-
#, fuzzy
|
4383 |
msgid "Display calendar title"
|
4384 |
msgstr ""
|
4385 |
-
"#-#-#-#-# 1extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
4386 |
-
"#-#-#-#-# 2extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
4387 |
-
"#-#-#-#-# 3extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
4388 |
-
"#-#-#-#-# 4extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
4389 |
-
"#-#-#-#-# 5extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
4390 |
-
"#-#-#-#-# 7extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
4391 |
-
"#-#-#-#-# 8extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
4392 |
-
"#-#-#-#-# 9extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
4393 |
-
"#-#-#-#-# 10extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
4394 |
|
4395 |
#: modules/sportspress-calendars.php:211
|
4396 |
msgid "Title Format"
|
@@ -4400,10 +4508,6 @@ msgstr ""
|
|
4400 |
msgid "Time/Results Format"
|
4401 |
msgstr ""
|
4402 |
|
4403 |
-
#: modules/sportspress-calendars.php:228
|
4404 |
-
msgid "Combined"
|
4405 |
-
msgstr ""
|
4406 |
-
|
4407 |
#: modules/sportspress-calendars.php:229
|
4408 |
msgid "Separate"
|
4409 |
msgstr ""
|
@@ -4417,14 +4521,14 @@ msgid "Results Only"
|
|
4417 |
msgstr ""
|
4418 |
|
4419 |
#: modules/sportspress-calendars.php:236 modules/sportspress-calendars.php:297
|
4420 |
-
#: modules/sportspress-league-tables.php:
|
4421 |
-
#: modules/sportspress-player-lists.php:
|
4422 |
msgid "Pagination"
|
4423 |
msgstr ""
|
4424 |
|
4425 |
#: modules/sportspress-calendars.php:237 modules/sportspress-calendars.php:298
|
4426 |
-
#: modules/sportspress-league-tables.php:
|
4427 |
-
#: modules/sportspress-player-lists.php:
|
4428 |
msgid "Paginate"
|
4429 |
msgstr ""
|
4430 |
|
@@ -4440,39 +4544,46 @@ msgstr ""
|
|
4440 |
msgid "Countdowns"
|
4441 |
msgstr ""
|
4442 |
|
4443 |
-
#: modules/sportspress-
|
4444 |
-
|
|
|
|
|
|
|
|
|
4445 |
msgid "players"
|
4446 |
msgstr ""
|
4447 |
|
4448 |
-
#: modules/sportspress-
|
4449 |
-
msgid "
|
4450 |
msgstr ""
|
4451 |
|
4452 |
#: modules/sportspress-league-tables.php:68
|
|
|
|
|
|
|
|
|
4453 |
msgid "Edit League Table"
|
4454 |
msgstr ""
|
4455 |
|
4456 |
-
#: modules/sportspress-league-tables.php:
|
4457 |
msgid "View League Table"
|
4458 |
msgstr ""
|
4459 |
|
4460 |
-
#: modules/sportspress-league-tables.php:
|
4461 |
-
#: modules/sportspress-player-lists.php:
|
4462 |
-
#, fuzzy
|
4463 |
msgid "Display title"
|
4464 |
msgstr ""
|
4465 |
-
|
4466 |
-
|
4467 |
-
"
|
4468 |
-
|
4469 |
-
|
4470 |
-
|
4471 |
-
"
|
4472 |
-
|
4473 |
-
"#-#-#-#-# 10extracted.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
4474 |
|
4475 |
#: modules/sportspress-overview.php:52 modules/sportspress-overview.php:62
|
|
|
4476 |
msgid "Overview"
|
4477 |
msgstr ""
|
4478 |
|
@@ -4488,23 +4599,56 @@ msgstr ""
|
|
4488 |
msgid "View Player List"
|
4489 |
msgstr ""
|
4490 |
|
4491 |
-
#: modules/sportspress-player-lists.php:
|
4492 |
msgid "Display photos"
|
4493 |
msgstr ""
|
4494 |
|
4495 |
-
#: modules/sportspress-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4496 |
msgid "Installation"
|
4497 |
msgstr ""
|
4498 |
|
4499 |
-
#: modules/sportspress-tutorials.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4500 |
msgid "Pop-out"
|
4501 |
msgstr ""
|
4502 |
|
4503 |
-
#: modules/sportspress-tutorials.php:
|
4504 |
msgid "Watch Tutorials"
|
4505 |
msgstr ""
|
4506 |
|
4507 |
-
#: modules/sportspress-widget-alignment.php:
|
|
|
4508 |
#, php-format
|
4509 |
msgid "Alignment: %s"
|
4510 |
msgstr ""
|
@@ -4513,13 +4657,8 @@ msgstr ""
|
|
4513 |
msgid "Cheatin’ huh?"
|
4514 |
msgstr ""
|
4515 |
|
4516 |
-
#:
|
4517 |
-
|
4518 |
-
msgstr ""
|
4519 |
-
|
4520 |
-
#. translators: Calendar caption: 1: month name, 2: 4-digit year
|
4521 |
-
#: templates/event-calendar.php:97 templates/event-calendar.php:125
|
4522 |
-
#: templates/event-calendar.php:133
|
4523 |
#, php-format
|
4524 |
msgctxt "calendar caption"
|
4525 |
msgid "%1$s %2$s"
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: SportsPress\n"
|
4 |
+
"POT-Creation-Date: 2016-03-19 20:08+1100\n"
|
5 |
+
"PO-Revision-Date: 2016-03-19 20:08+1100\n"
|
6 |
"Last-Translator: Brian Miyaji <brian@themeboy.com>\n"
|
7 |
"Language-Team: ThemeBoy <support@themeboy.com>\n"
|
8 |
"Language: en_US\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Generator: Poedit 1.8.6\n"
|
13 |
"X-Poedit-Basepath: ..\n"
|
14 |
"X-Poedit-SourceCharset: UTF-8\n"
|
15 |
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
|
17 |
"_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
|
18 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
19 |
"X-Poedit-SearchPath-0: .\n"
|
20 |
+
"X-Poedit-SearchPathExcluded-0: includes/libraries\n"
|
21 |
|
22 |
#: assets/js/admin/editor-lang.php:22
|
23 |
msgid "SportsPress Shortcodes"
|
24 |
msgstr ""
|
25 |
|
26 |
#: assets/js/admin/editor-lang.php:23
|
27 |
+
#: includes/admin/post-types/class-sp-admin-cpt-list.php:70
|
28 |
+
#: includes/admin/post-types/class-sp-admin-cpt-table.php:74
|
29 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-list-details.php:93
|
30 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-table-details.php:45
|
31 |
+
#: includes/admin/settings/class-sp-settings-events.php:276
|
32 |
+
#: includes/admin/settings/class-sp-settings-events.php:338
|
33 |
#: includes/admin/settings/class-sp-settings-general.php:91
|
34 |
+
#: includes/admin/settings/class-sp-settings-general.php:169
|
35 |
msgid "Auto"
|
36 |
msgstr ""
|
37 |
|
38 |
#: assets/js/admin/editor-lang.php:24
|
39 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-list-details.php:94
|
40 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-table-details.php:46
|
41 |
+
#: includes/admin/settings/class-sp-settings-events.php:277
|
42 |
+
#: includes/admin/settings/class-sp-settings-events.php:339
|
43 |
msgid "Manual"
|
44 |
msgstr ""
|
45 |
|
48 |
msgstr ""
|
49 |
|
50 |
#: assets/js/admin/editor-lang.php:26
|
51 |
+
#: includes/admin/class-sp-admin-sample-data.php:365
|
52 |
#: includes/admin/post-types/class-sp-admin-cpt-event.php:105
|
53 |
+
#: includes/admin/post-types/class-sp-admin-meta-boxes.php:303
|
54 |
+
#: includes/class-sp-ajax.php:57 includes/class-sp-ajax.php:102
|
55 |
+
#: includes/class-sp-ajax.php:132 includes/class-sp-ajax.php:162
|
56 |
+
#: includes/class-sp-ajax.php:301 includes/class-sp-post-types.php:382
|
57 |
+
#: includes/sp-core-functions.php:1323
|
58 |
#: includes/widgets/class-sp-widget-countdown.php:86
|
59 |
+
#: includes/widgets/class-sp-widget-event-list.php:154
|
60 |
+
#: templates/event-list.php:107
|
61 |
msgid "Event"
|
62 |
msgstr ""
|
63 |
|
64 |
#: assets/js/admin/editor-lang.php:27
|
65 |
#: includes/admin/post-types/class-sp-admin-meta-boxes.php:32
|
66 |
#: includes/admin/post-types/class-sp-admin-meta-boxes.php:41
|
67 |
+
#: includes/admin/post-types/class-sp-admin-meta-boxes.php:57
|
68 |
+
#: includes/admin/post-types/class-sp-admin-meta-boxes.php:66
|
69 |
+
#: includes/admin/post-types/class-sp-admin-meta-boxes.php:82
|
70 |
+
#: includes/admin/post-types/class-sp-admin-meta-boxes.php:91
|
71 |
+
#: includes/admin/post-types/class-sp-admin-meta-boxes.php:120
|
72 |
+
#: includes/admin/post-types/class-sp-admin-meta-boxes.php:156
|
73 |
+
#: includes/admin/post-types/class-sp-admin-meta-boxes.php:191
|
74 |
+
#: includes/admin/post-types/class-sp-admin-meta-boxes.php:226
|
75 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-data.php:226
|
76 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-event-shortcode.php:24
|
77 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-list-data.php:203
|
78 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-player-shortcode.php:27
|
79 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-team-lists.php:110
|
80 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-team-staff.php:105
|
81 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-team-tables.php:106
|
82 |
+
#: includes/admin/settings/class-sp-settings-events.php:88
|
83 |
#: includes/admin/settings/class-sp-settings-players.php:64
|
84 |
+
#: includes/admin/settings/class-sp-settings-players.php:80
|
85 |
#: includes/admin/settings/class-sp-settings-staff.php:63
|
86 |
+
#: includes/admin/settings/class-sp-settings-staff.php:71
|
87 |
#: includes/admin/settings/class-sp-settings-teams.php:64
|
88 |
+
#: includes/sp-core-functions.php:1322 modules/sportspress-calendars.php:147
|
89 |
#: modules/sportspress-calendars.php:272
|
90 |
+
#: modules/sportspress-league-tables.php:148
|
91 |
+
#: modules/sportspress-player-lists.php:154 templates/event-details.php:46
|
92 |
msgid "Details"
|
93 |
msgstr ""
|
94 |
|
95 |
#: assets/js/admin/editor-lang.php:28
|
96 |
#: includes/admin/importers/class-sp-event-importer.php:30
|
97 |
+
#: includes/admin/post-types/class-sp-admin-meta-boxes.php:134
|
98 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-data.php:84
|
99 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-event-shortcode.php:23
|
100 |
+
#: includes/admin/settings/class-sp-settings-events.php:81
|
101 |
+
#: includes/sp-core-functions.php:1336 templates/event-list.php:92
|
102 |
+
#: templates/event-list.php:115 templates/event-list.php:123
|
103 |
+
#: templates/event-results.php:104
|
104 |
msgid "Results"
|
105 |
msgstr ""
|
106 |
|
110 |
msgstr ""
|
111 |
|
112 |
#: assets/js/admin/editor-lang.php:30
|
113 |
+
#: includes/admin/post-types/class-sp-admin-meta-boxes.php:141
|
114 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-event-shortcode.php:25
|
115 |
+
#: includes/admin/settings/class-sp-settings-events.php:102
|
116 |
+
#: includes/admin/settings/class-sp-settings-events.php:303
|
117 |
+
#: includes/sp-core-functions.php:1316 modules/sportspress-tutorials.php:93
|
118 |
+
#: templates/event-performance.php:108
|
119 |
+
msgid "Scorecard"
|
120 |
msgstr ""
|
121 |
|
122 |
#: assets/js/admin/editor-lang.php:31
|
123 |
+
#: includes/admin/class-sp-admin-sample-data.php:472
|
124 |
+
#: includes/class-sp-ajax.php:192 includes/class-sp-ajax.php:247
|
125 |
+
#: includes/class-sp-ajax.php:345 includes/class-sp-formats.php:31
|
126 |
+
#: includes/widgets/class-sp-widget-event-blocks.php:87
|
127 |
+
#: includes/widgets/class-sp-widget-event-calendar.php:75
|
128 |
+
#: includes/widgets/class-sp-widget-event-list.php:90
|
129 |
#: modules/sportspress-calendars.php:66
|
130 |
msgid "Calendar"
|
131 |
msgstr ""
|
132 |
|
133 |
#: assets/js/admin/editor-lang.php:32
|
134 |
+
#: includes/admin/post-types/class-sp-admin-meta-boxes.php:205
|
135 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-list-columns.php:57
|
136 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-player-shortcode.php:31
|
137 |
#: includes/admin/settings/class-sp-settings-players.php:72
|
138 |
msgid "Statistics"
|
139 |
msgstr ""
|
140 |
|
141 |
#: assets/js/admin/editor-lang.php:33
|
142 |
+
#: includes/admin/class-sp-admin-sample-data.php:506
|
143 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-team-tables.php:55
|
144 |
+
#: includes/class-sp-ajax.php:426
|
145 |
#: includes/widgets/class-sp-widget-league-table.php:6
|
146 |
+
#: includes/widgets/class-sp-widget-league-table.php:79
|
147 |
+
#: modules/sportspress-league-tables.php:67
|
148 |
+
#: modules/sportspress-league-tables.php:155
|
149 |
msgid "League Table"
|
150 |
msgstr ""
|
151 |
|
152 |
#: assets/js/admin/editor-lang.php:34
|
153 |
+
#: includes/admin/class-sp-admin-sample-data.php:210
|
154 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-event-performance.php:244
|
155 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-list-data.php:53
|
156 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-list-data.php:169
|
157 |
+
#: includes/class-sp-ajax.php:493 includes/class-sp-ajax.php:523
|
158 |
+
#: includes/class-sp-install.php:161 includes/class-sp-player-list.php:561
|
159 |
+
#: includes/class-sp-post-types.php:446 includes/sp-core-functions.php:1330
|
160 |
+
#: modules/sportspress-individual-mode.php:119
|
161 |
+
#: templates/event-performance-table-combined.php:30
|
162 |
+
#: templates/event-performance-table.php:40
|
163 |
msgid "Player"
|
164 |
msgstr ""
|
165 |
|
184 |
#: includes/admin/class-sp-admin-settings.php:128
|
185 |
#: includes/admin/importers/class-sp-event-importer.php:487
|
186 |
#: includes/admin/importers/class-sp-event-importer.php:502
|
187 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-data.php:200
|
188 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-event-performance.php:408
|
189 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-event-teams.php:132
|
190 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-list-details.php:63
|
191 |
#: includes/admin/settings/class-sp-settings-status.php:260
|
192 |
#: includes/admin/views/html-admin-page-status.php:224
|
193 |
+
#: modules/sportspress-widget-alignment.php:69
|
194 |
msgid "None"
|
195 |
msgstr ""
|
196 |
|
200 |
|
201 |
#: includes/admin/class-sp-admin-assets.php:116
|
202 |
#: includes/admin/class-sp-admin-dashboard.php:80
|
203 |
+
#: includes/class-sp-frontend-scripts.php:85 templates/countdown.php:98
|
204 |
msgid "days"
|
205 |
msgstr ""
|
206 |
|
207 |
#: includes/admin/class-sp-admin-assets.php:117
|
208 |
+
#: includes/class-sp-frontend-scripts.php:85 templates/countdown.php:99
|
209 |
msgid "hrs"
|
210 |
msgstr ""
|
211 |
|
212 |
#: includes/admin/class-sp-admin-assets.php:118
|
213 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-event-details.php:30
|
214 |
+
#: includes/admin/settings/class-sp-settings-events.php:192
|
215 |
+
#: includes/class-sp-frontend-scripts.php:85 templates/countdown.php:100
|
216 |
msgid "mins"
|
217 |
msgstr ""
|
218 |
|
219 |
#: includes/admin/class-sp-admin-assets.php:119
|
220 |
+
#: includes/class-sp-frontend-scripts.php:85 templates/countdown.php:101
|
221 |
msgid "secs"
|
222 |
msgstr ""
|
223 |
|
232 |
#: includes/admin/class-sp-admin-permalink-settings.php:47
|
233 |
#: includes/admin/class-sp-admin-welcome.php:105
|
234 |
#: includes/admin/views/html-admin-settings.php:2
|
235 |
+
#: modules/sportspress-admin-bar.php:56 modules/sportspress-overview.php:78
|
236 |
+
#: modules/sportspress-overview.php:135 modules/sportspress-overview.php:186
|
237 |
+
#: modules/sportspress-overview.php:207 modules/sportspress-overview.php:289
|
238 |
+
#: modules/sportspress-overview.php:334 modules/sportspress-overview.php:356
|
239 |
msgid "SportsPress"
|
240 |
msgstr ""
|
241 |
|
304 |
msgstr ""
|
305 |
|
306 |
#: includes/admin/class-sp-admin-menus.php:61
|
307 |
+
#: includes/admin/class-sp-admin-menus.php:250
|
308 |
#: includes/admin/class-sp-admin-permalink-settings.php:29
|
309 |
#: includes/admin/importers/class-sp-player-importer.php:30
|
310 |
#: includes/admin/importers/class-sp-staff-importer.php:29
|
312 |
#: includes/admin/post-types/class-sp-admin-cpt-player.php:68
|
313 |
#: includes/admin/post-types/class-sp-admin-cpt-staff.php:67
|
314 |
#: includes/admin/post-types/class-sp-admin-cpt-team.php:67
|
315 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-player-details.php:135
|
316 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-player-details.php:142
|
317 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-staff-details.php:124
|
318 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-staff-details.php:131
|
319 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-team-details.php:59
|
320 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-team-details.php:66
|
321 |
+
#: includes/admin/settings/class-sp-settings-players.php:113
|
322 |
#: includes/admin/settings/class-sp-settings-status.php:334
|
323 |
#: includes/admin/views/html-admin-page-status.php:296
|
324 |
+
#: includes/class-sp-post-types.php:37 includes/class-sp-post-types.php:51
|
325 |
+
#: modules/sportspress-tutorials.php:64 templates/player-details.php:87
|
326 |
+
#: templates/team-details.php:24
|
327 |
msgid "Competitions"
|
328 |
msgstr ""
|
329 |
|
330 |
#: includes/admin/class-sp-admin-menus.php:68
|
331 |
+
#: includes/admin/class-sp-admin-menus.php:258
|
332 |
#: includes/admin/class-sp-admin-permalink-settings.php:30
|
333 |
#: includes/admin/importers/class-sp-player-importer.php:31
|
334 |
#: includes/admin/importers/class-sp-staff-importer.php:30
|
336 |
#: includes/admin/post-types/class-sp-admin-cpt-player.php:69
|
337 |
#: includes/admin/post-types/class-sp-admin-cpt-staff.php:68
|
338 |
#: includes/admin/post-types/class-sp-admin-cpt-team.php:68
|
339 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-player-details.php:152
|
340 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-player-details.php:159
|
341 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-staff-details.php:139
|
342 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-staff-details.php:146
|
343 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-team-details.php:76
|
344 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-team-details.php:83
|
345 |
+
#: includes/admin/settings/class-sp-settings-players.php:121
|
346 |
#: includes/admin/settings/class-sp-settings-status.php:344
|
347 |
#: includes/admin/views/html-admin-page-status.php:306
|
348 |
+
#: includes/class-sp-post-types.php:68 includes/class-sp-post-types.php:82
|
349 |
+
#: modules/sportspress-tutorials.php:64 templates/player-details.php:95
|
350 |
+
#: templates/team-details.php:33
|
351 |
msgid "Seasons"
|
352 |
msgstr ""
|
353 |
|
354 |
+
#: includes/admin/class-sp-admin-menus.php:104
|
355 |
#: includes/admin/class-sp-admin-welcome.php:123
|
356 |
+
#: includes/admin/class-sp-admin-welcome.php:224
|
357 |
+
#: modules/sportspress-tutorials.php:87 sportspress.php:140
|
358 |
msgid "Settings"
|
359 |
msgstr ""
|
360 |
|
361 |
+
#: includes/admin/class-sp-admin-menus.php:246
|
362 |
#: includes/admin/importers/class-sp-event-importer.php:488
|
363 |
#: includes/admin/importers/class-sp-event-importer.php:503
|
364 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-details.php:84
|
365 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-event-details.php:57
|
366 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-event-teams.php:135
|
367 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-list-details.php:55
|
368 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-list-details.php:100
|
369 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-player-metrics.php:43
|
370 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-staff-details.php:76
|
371 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-table-details.php:52
|
372 |
#: includes/admin/views/html-admin-config.php:51
|
373 |
+
#: includes/admin/views/html-admin-config.php:128
|
374 |
+
#: includes/admin/views/html-admin-config.php:216
|
375 |
+
#: includes/admin/views/html-admin-config.php:269
|
376 |
+
#: includes/admin/views/html-admin-config.php:319
|
377 |
+
#: includes/admin/views/html-admin-config.php:370
|
378 |
+
#: includes/class-sp-post-types.php:43 includes/class-sp-post-types.php:74
|
379 |
+
#: includes/class-sp-post-types.php:105 includes/class-sp-post-types.php:136
|
380 |
+
#: includes/class-sp-post-types.php:167 includes/sp-core-functions.php:1023
|
381 |
+
#: includes/sp-core-functions.php:1040
|
382 |
#: includes/widgets/class-sp-widget-countdown.php:81
|
383 |
#: includes/widgets/class-sp-widget-countdown.php:101
|
384 |
+
#: includes/widgets/class-sp-widget-event-blocks.php:99
|
385 |
+
#: includes/widgets/class-sp-widget-event-calendar.php:87
|
386 |
+
#: includes/widgets/class-sp-widget-event-list.php:102
|
387 |
+
#: includes/widgets/class-sp-widget-league-table.php:91
|
388 |
+
#: includes/widgets/class-sp-widget-player-gallery.php:95
|
389 |
+
#: includes/widgets/class-sp-widget-player-gallery.php:126
|
390 |
+
#: includes/widgets/class-sp-widget-player-list.php:95
|
391 |
+
#: includes/widgets/class-sp-widget-player-list.php:151
|
392 |
#: includes/widgets/class-sp-widget-staff.php:68
|
393 |
msgid "Add New"
|
394 |
msgstr ""
|
395 |
|
396 |
+
#: includes/admin/class-sp-admin-menus.php:254
|
397 |
#: includes/admin/class-sp-admin-permalink-settings.php:33
|
398 |
#: includes/admin/importers/class-sp-player-importer.php:28
|
399 |
#: includes/admin/post-types/class-sp-admin-cpt-player.php:66
|
400 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-player-details.php:86
|
401 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-player-details.php:93
|
402 |
+
#: includes/admin/settings/class-sp-settings-events.php:363
|
403 |
#: includes/admin/settings/class-sp-settings-status.php:364
|
404 |
#: includes/admin/views/html-admin-page-status.php:326
|
405 |
+
#: includes/class-sp-post-types.php:130 includes/class-sp-post-types.php:144
|
406 |
+
#: modules/sportspress-tutorials.php:66
|
407 |
msgid "Positions"
|
408 |
msgstr ""
|
409 |
|
410 |
+
#: includes/admin/class-sp-admin-menus.php:262
|
411 |
#: includes/admin/class-sp-admin-permalink-settings.php:26
|
412 |
+
#: includes/admin/settings/class-sp-settings-events.php:158
|
413 |
+
#: includes/admin/settings/class-sp-settings-events.php:215
|
414 |
#: includes/admin/settings/class-sp-settings-status.php:354
|
415 |
#: includes/admin/views/html-admin-page-status.php:316
|
416 |
+
#: includes/class-sp-post-types.php:99 includes/class-sp-post-types.php:113
|
417 |
+
#: modules/sportspress-tutorials.php:65
|
418 |
msgid "Venues"
|
419 |
msgstr ""
|
420 |
|
421 |
#: includes/admin/class-sp-admin-permalink-settings.php:25
|
422 |
+
#: includes/admin/class-sp-admin-sample-data.php:365
|
423 |
#: includes/admin/class-sp-admin-taxonomies.php:190
|
424 |
#: includes/admin/class-sp-admin-taxonomies.php:204
|
425 |
#: includes/admin/post-types/class-sp-admin-cpt-calendar.php:53
|
426 |
#: includes/admin/settings/class-sp-settings-events.php:25
|
427 |
#: includes/admin/settings/class-sp-settings-modules.php:34
|
428 |
+
#: includes/class-sp-post-types.php:381 modules/sportspress-calendars.php:154
|
429 |
+
#: modules/sportspress-tutorials.php:80 modules/sportspress-tutorials.php:91
|
430 |
msgid "Events"
|
431 |
msgstr ""
|
432 |
|
433 |
#: includes/admin/class-sp-admin-permalink-settings.php:27
|
434 |
+
#: includes/admin/class-sp-admin-sample-data.php:472
|
435 |
#: includes/class-sp-modules.php:28 modules/sportspress-calendars.php:65
|
436 |
+
#: modules/sportspress-template-selector.php:176
|
437 |
+
#: modules/sportspress-tutorials.php:83 modules/sportspress-tutorials.php:95
|
438 |
msgid "Calendars"
|
439 |
msgstr ""
|
440 |
|
441 |
#: includes/admin/class-sp-admin-permalink-settings.php:28
|
442 |
+
#: includes/admin/class-sp-admin-sample-data.php:166
|
443 |
#: includes/admin/importers/class-sp-event-importer.php:29
|
444 |
#: includes/admin/importers/class-sp-player-importer.php:29
|
445 |
#: includes/admin/importers/class-sp-staff-importer.php:28
|
447 |
#: includes/admin/post-types/class-sp-admin-cpt-player.php:67
|
448 |
#: includes/admin/post-types/class-sp-admin-cpt-staff.php:66
|
449 |
#: includes/admin/post-types/class-sp-admin-cpt-table.php:51
|
450 |
+
#: includes/admin/post-types/class-sp-admin-meta-boxes.php:127
|
451 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-data.php:59
|
452 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-event-teams.php:122
|
453 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-player-details.php:110
|
454 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-player-details.php:125
|
455 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-staff-details.php:100
|
456 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-staff-details.php:115
|
457 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-table-details.php:41
|
458 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-team-tables.php:58
|
459 |
+
#: includes/admin/settings/class-sp-settings-events.php:141
|
460 |
+
#: includes/admin/settings/class-sp-settings-events.php:282
|
461 |
+
#: includes/admin/settings/class-sp-settings-events.php:355
|
462 |
#: includes/admin/settings/class-sp-settings-modules.php:35
|
463 |
#: includes/admin/settings/class-sp-settings-teams.php:25
|
464 |
+
#: includes/class-sp-ajax.php:302 includes/class-sp-post-types.php:415
|
465 |
+
#: includes/sp-core-functions.php:1341 modules/sportspress-calendars.php:203
|
466 |
#: modules/sportspress-calendars.php:217 modules/sportspress-countdowns.php:85
|
467 |
+
#: modules/sportspress-individual-mode.php:270
|
468 |
+
#: modules/sportspress-league-tables.php:202
|
469 |
+
#: modules/sportspress-tutorials.php:68 modules/sportspress-tutorials.php:98
|
470 |
+
#: templates/event-list.php:105
|
471 |
msgid "Teams"
|
472 |
msgstr ""
|
473 |
|
474 |
#: includes/admin/class-sp-admin-permalink-settings.php:31
|
475 |
+
#: includes/admin/class-sp-admin-sample-data.php:506
|
476 |
+
#: includes/class-sp-modules.php:49 modules/sportspress-league-tables.php:66
|
477 |
+
#: modules/sportspress-league-tables.php:134
|
478 |
+
#: modules/sportspress-league-tables.php:189
|
479 |
+
#: modules/sportspress-tutorials.php:70
|
480 |
msgid "League Tables"
|
481 |
msgstr ""
|
482 |
|
483 |
#: includes/admin/class-sp-admin-permalink-settings.php:32
|
484 |
+
#: includes/admin/class-sp-admin-sample-data.php:210
|
485 |
#: includes/admin/class-sp-admin-taxonomies.php:223
|
486 |
#: includes/admin/importers/class-sp-event-importer.php:32
|
487 |
#: includes/admin/post-types/class-sp-admin-cpt-list.php:52
|
488 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-event-teams.php:88
|
489 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-list-details.php:90
|
490 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-team-lists.php:58
|
491 |
+
#: includes/admin/settings/class-sp-settings-events.php:317
|
492 |
+
#: includes/admin/settings/class-sp-settings-events.php:371
|
493 |
#: includes/admin/settings/class-sp-settings-modules.php:36
|
494 |
#: includes/admin/settings/class-sp-settings-players.php:25
|
495 |
+
#: includes/class-sp-post-types.php:445
|
496 |
+
#: modules/sportspress-individual-mode.php:116
|
497 |
+
#: modules/sportspress-player-lists.php:209
|
498 |
+
#: modules/sportspress-tutorials.php:72 modules/sportspress-tutorials.php:103
|
499 |
msgid "Players"
|
500 |
msgstr ""
|
501 |
|
502 |
#: includes/admin/class-sp-admin-permalink-settings.php:34
|
503 |
+
#: includes/admin/class-sp-admin-sample-data.php:548
|
504 |
+
#: includes/admin/class-sp-admin-sample-data.php:593
|
505 |
+
#: includes/class-sp-modules.php:77 modules/sportspress-player-lists.php:65
|
506 |
+
#: modules/sportspress-player-lists.php:126
|
507 |
+
#: modules/sportspress-player-lists.php:196
|
508 |
msgid "Player Lists"
|
509 |
msgstr ""
|
510 |
|
511 |
#: includes/admin/class-sp-admin-permalink-settings.php:35
|
512 |
+
#: includes/admin/class-sp-admin-sample-data.php:305
|
513 |
#: includes/admin/class-sp-admin-taxonomies.php:240
|
514 |
+
#: includes/admin/post-types/class-sp-admin-meta-boxes.php:169
|
515 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-event-teams.php:93
|
516 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-team-staff.php:55
|
517 |
+
#: includes/admin/settings/class-sp-settings-events.php:309
|
518 |
#: includes/admin/settings/class-sp-settings-modules.php:36
|
519 |
#: includes/admin/settings/class-sp-settings-staff.php:25
|
520 |
+
#: includes/class-sp-install.php:193 includes/class-sp-post-types.php:475
|
521 |
+
#: includes/class-sp-post-types.php:476 includes/sp-core-functions.php:1338
|
522 |
#: includes/widgets/class-sp-widget-staff.php:6
|
523 |
#: includes/widgets/class-sp-widget-staff.php:57
|
524 |
+
#: modules/sportspress-tutorials.php:72 templates/event-staff.php:44
|
525 |
msgid "Staff"
|
526 |
msgstr ""
|
527 |
|
532 |
msgstr ""
|
533 |
|
534 |
#: includes/admin/class-sp-admin-post-types.php:74
|
535 |
+
#: includes/sp-template-hooks.php:381
|
536 |
msgid "Settings saved."
|
537 |
msgstr ""
|
538 |
|
539 |
#: includes/admin/class-sp-admin-post-types.php:76
|
540 |
#: includes/admin/views/html-admin-config.php:50
|
541 |
+
#: includes/admin/views/html-admin-config.php:127
|
542 |
+
#: includes/admin/views/html-admin-config.php:215
|
543 |
+
#: includes/admin/views/html-admin-config.php:268
|
544 |
+
#: includes/admin/views/html-admin-config.php:318
|
545 |
+
#: includes/admin/views/html-admin-config.php:369
|
546 |
+
#: includes/sp-template-hooks.php:383 modules/sportspress-overview.php:284
|
547 |
msgid "View All"
|
548 |
msgstr ""
|
549 |
|
550 |
#: includes/admin/class-sp-admin-post-types.php:81
|
551 |
#: includes/admin/class-sp-admin-post-types.php:84
|
552 |
#: includes/admin/class-sp-admin-post-types.php:89
|
553 |
+
#: includes/sp-template-hooks.php:389 includes/sp-template-hooks.php:392
|
554 |
+
#: includes/sp-template-hooks.php:397
|
555 |
msgid "Changes saved."
|
556 |
msgstr ""
|
557 |
|
558 |
#: includes/admin/class-sp-admin-post-types.php:86
|
559 |
#: includes/admin/class-sp-admin-post-types.php:91
|
560 |
#: includes/admin/class-sp-admin-post-types.php:101
|
561 |
+
#: includes/sp-template-hooks.php:394 includes/sp-template-hooks.php:399
|
562 |
+
#: includes/sp-template-hooks.php:409
|
563 |
msgid "Success!"
|
564 |
msgstr ""
|
565 |
|
566 |
#: includes/admin/class-sp-admin-post-types.php:93
|
567 |
#: includes/admin/class-sp-admin-post-types.php:99
|
568 |
#: includes/admin/class-sp-admin-post-types.php:103
|
569 |
+
#: includes/sp-template-hooks.php:401 includes/sp-template-hooks.php:407
|
570 |
+
#: includes/sp-template-hooks.php:411
|
571 |
#, php-format
|
572 |
msgid "Preview %s"
|
573 |
msgstr ""
|
574 |
|
575 |
#: includes/admin/class-sp-admin-post-types.php:96
|
576 |
+
#: includes/sp-template-hooks.php:404
|
577 |
#, php-format
|
578 |
msgid "Scheduled for: <b>%1$s</b>."
|
579 |
msgstr ""
|
580 |
|
581 |
#: includes/admin/class-sp-admin-post-types.php:97
|
582 |
+
#: includes/sp-template-hooks.php:405
|
583 |
msgid "M j, Y @ G:i"
|
584 |
msgstr ""
|
585 |
|
602 |
"your content. Have fun!"
|
603 |
msgstr ""
|
604 |
|
605 |
+
#: includes/admin/class-sp-admin-sample-data.php:166
|
606 |
#: includes/admin/post-types/class-sp-admin-cpt-calendar.php:52
|
607 |
#: includes/admin/post-types/class-sp-admin-cpt-list.php:51
|
608 |
#: includes/admin/post-types/class-sp-admin-cpt-team.php:70
|
609 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-details.php:70
|
610 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-event-results.php:243
|
611 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-list-columns.php:42
|
612 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-list-data.php:55
|
613 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-list-details.php:44
|
614 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-player-statistics.php:69
|
615 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-player-statistics.php:72
|
616 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-table-data.php:57
|
617 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-table-data.php:119
|
618 |
+
#: includes/admin/settings/class-sp-settings-events.php:444
|
619 |
+
#: includes/admin/settings/class-sp-settings-events.php:446
|
620 |
+
#: includes/class-sp-league-table.php:575 includes/class-sp-player-list.php:542
|
621 |
+
#: includes/class-sp-player-list.php:562 includes/class-sp-player.php:458
|
622 |
+
#: includes/class-sp-player.php:481 includes/class-sp-post-types.php:416
|
623 |
+
#: includes/sp-core-functions.php:1340
|
624 |
#: includes/widgets/class-sp-widget-countdown.php:69
|
625 |
#: templates/event-results.php:108
|
626 |
msgid "Team"
|
627 |
msgstr ""
|
628 |
|
629 |
+
#: includes/admin/class-sp-admin-sample-data.php:469
|
630 |
msgctxt "example"
|
631 |
msgid "Fixtures & Results"
|
632 |
msgstr ""
|
633 |
|
634 |
+
#: includes/admin/class-sp-admin-sample-data.php:545
|
635 |
msgctxt "example"
|
636 |
msgid "Roster"
|
637 |
msgstr ""
|
638 |
|
639 |
+
#: includes/admin/class-sp-admin-sample-data.php:548
|
640 |
+
#: includes/admin/class-sp-admin-sample-data.php:593
|
641 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-team-lists.php:55
|
642 |
+
#: includes/class-sp-ajax.php:559 includes/class-sp-ajax.php:656
|
643 |
+
#: includes/widgets/class-sp-widget-player-gallery.php:84
|
644 |
#: includes/widgets/class-sp-widget-player-list.php:6
|
645 |
+
#: includes/widgets/class-sp-widget-player-list.php:84
|
646 |
#: modules/sportspress-player-lists.php:66
|
647 |
+
#: modules/sportspress-player-lists.php:161
|
648 |
msgid "Player List"
|
649 |
msgstr ""
|
650 |
|
651 |
+
#: includes/admin/class-sp-admin-sample-data.php:590
|
652 |
msgctxt "example"
|
653 |
msgid "Player Ranking"
|
654 |
msgstr ""
|
666 |
msgid "Install demo content"
|
667 |
msgstr ""
|
668 |
|
669 |
+
#: includes/admin/class-sp-admin-sports.php:285
|
670 |
msgid "Team Sports"
|
671 |
msgstr ""
|
672 |
|
673 |
+
#: includes/admin/class-sp-admin-sports.php:286
|
674 |
msgid "Racket Sports"
|
675 |
msgstr ""
|
676 |
|
677 |
+
#: includes/admin/class-sp-admin-sports.php:287
|
678 |
msgid "Water Sports"
|
679 |
msgstr ""
|
680 |
|
681 |
+
#: includes/admin/class-sp-admin-sports.php:288
|
682 |
msgid "Target Sports"
|
683 |
msgstr ""
|
684 |
|
685 |
+
#: includes/admin/class-sp-admin-sports.php:289
|
686 |
msgid "Esports"
|
687 |
msgstr ""
|
688 |
|
689 |
+
#: includes/admin/class-sp-admin-sports.php:290
|
690 |
#: includes/admin/settings/class-sp-settings-modules.php:38
|
691 |
+
#: modules/sportspress-tutorials.php:107
|
692 |
msgid "Other"
|
693 |
msgstr ""
|
694 |
|
695 |
+
#: includes/admin/class-sp-admin-sports.php:299
|
696 |
msgid "Baseball"
|
697 |
msgstr ""
|
698 |
|
699 |
+
#: includes/admin/class-sp-admin-sports.php:300
|
700 |
msgid "Basketball"
|
701 |
msgstr ""
|
702 |
|
703 |
+
#: includes/admin/class-sp-admin-sports.php:301
|
704 |
msgid "Cricket"
|
705 |
msgstr ""
|
706 |
|
707 |
+
#: includes/admin/class-sp-admin-sports.php:302
|
708 |
msgid "Darts"
|
709 |
msgstr ""
|
710 |
|
711 |
+
#: includes/admin/class-sp-admin-sports.php:303
|
712 |
msgid "Floorball"
|
713 |
msgstr ""
|
714 |
|
715 |
+
#: includes/admin/class-sp-admin-sports.php:304
|
716 |
+
msgid "Association Football"
|
717 |
msgstr ""
|
718 |
|
719 |
+
#: includes/admin/class-sp-admin-sports.php:305
|
720 |
msgid "American Football"
|
721 |
msgstr ""
|
722 |
|
723 |
+
#: includes/admin/class-sp-admin-sports.php:306
|
724 |
msgid "Australian Rules Football"
|
725 |
msgstr ""
|
726 |
|
727 |
+
#: includes/admin/class-sp-admin-sports.php:307
|
728 |
msgid "Handball"
|
729 |
msgstr ""
|
730 |
|
731 |
+
#: includes/admin/class-sp-admin-sports.php:308
|
732 |
msgid "Ice Hockey"
|
733 |
msgstr ""
|
734 |
|
735 |
+
#: includes/admin/class-sp-admin-sports.php:309
|
736 |
#: includes/admin/class-sp-admin-welcome.php:325
|
737 |
msgid "Lacrosse"
|
738 |
msgstr ""
|
739 |
|
740 |
+
#: includes/admin/class-sp-admin-sports.php:310
|
741 |
msgid "Netball"
|
742 |
msgstr ""
|
743 |
|
744 |
+
#: includes/admin/class-sp-admin-sports.php:311
|
745 |
msgid "Rugby League"
|
746 |
msgstr ""
|
747 |
|
748 |
+
#: includes/admin/class-sp-admin-sports.php:312
|
749 |
msgid "Rugby Union"
|
750 |
msgstr ""
|
751 |
|
752 |
+
#: includes/admin/class-sp-admin-sports.php:313
|
753 |
msgid "Snooker"
|
754 |
msgstr ""
|
755 |
|
756 |
+
#: includes/admin/class-sp-admin-sports.php:314
|
757 |
+
msgid "Softball"
|
758 |
+
msgstr ""
|
759 |
+
|
760 |
+
#: includes/admin/class-sp-admin-sports.php:315
|
761 |
msgid "Squash"
|
762 |
msgstr ""
|
763 |
|
764 |
+
#: includes/admin/class-sp-admin-sports.php:316
|
765 |
msgid "Table Tennis"
|
766 |
msgstr ""
|
767 |
|
768 |
+
#: includes/admin/class-sp-admin-sports.php:317
|
769 |
msgid "Tennis"
|
770 |
msgstr ""
|
771 |
|
772 |
+
#: includes/admin/class-sp-admin-sports.php:318
|
773 |
msgid "Volleyball"
|
774 |
msgstr ""
|
775 |
|
776 |
+
#: includes/admin/class-sp-admin-sports.php:319
|
777 |
msgid "Water Polo"
|
778 |
msgstr ""
|
779 |
|
780 |
+
#: includes/admin/class-sp-admin-sports.php:320
|
781 |
msgid "Dota 2"
|
782 |
msgstr ""
|
783 |
|
784 |
+
#: includes/admin/class-sp-admin-sports.php:321
|
785 |
msgid "League of Legends"
|
786 |
msgstr ""
|
787 |
|
788 |
+
#: includes/admin/class-sp-admin-sports.php:322
|
789 |
#: includes/admin/class-sp-admin-welcome.php:324
|
790 |
msgid "Counter-Strike: Global Offensive"
|
791 |
msgstr ""
|
814 |
#: includes/admin/class-sp-admin-taxonomies.php:135
|
815 |
#: includes/admin/class-sp-admin-taxonomies.php:152
|
816 |
#: includes/admin/class-sp-admin-taxonomies.php:222
|
817 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-details.php:33
|
818 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-list-details.php:35
|
819 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-table-details.php:32
|
820 |
+
#: includes/admin/settings/class-sp-settings-general.php:349
|
821 |
msgid "Heading"
|
822 |
msgstr ""
|
823 |
|
825 |
#: includes/admin/class-sp-admin-taxonomies.php:155
|
826 |
#: includes/admin/views/html-admin-config.php:20
|
827 |
#: includes/admin/views/html-admin-config.php:75
|
828 |
+
#: includes/admin/views/html-admin-config.php:152
|
829 |
msgid "Used for events."
|
830 |
msgstr ""
|
831 |
|
834 |
msgstr ""
|
835 |
|
836 |
#: includes/admin/class-sp-admin-welcome.php:50
|
837 |
+
#: includes/admin/settings/class-sp-settings-modules.php:197
|
838 |
msgid "Welcome to SportsPress"
|
839 |
msgstr ""
|
840 |
|
860 |
msgid "%s SportsPress %s has lots of refinements we think you’ll love."
|
861 |
msgstr ""
|
862 |
|
863 |
+
#: includes/admin/class-sp-admin-welcome.php:124 sportspress.php:141
|
864 |
msgid "Docs"
|
865 |
msgstr ""
|
866 |
|
867 |
#: includes/admin/class-sp-admin-welcome.php:131
|
868 |
#: includes/admin/views/html-notice-install.php:7
|
869 |
+
#: modules/sportspress-tutorials.php:62
|
870 |
msgid "Get Started"
|
871 |
msgstr ""
|
872 |
|
899 |
msgstr ""
|
900 |
|
901 |
#: includes/admin/class-sp-admin-welcome.php:200
|
902 |
+
#: includes/class-sp-post-types.php:417 modules/sportspress-tutorials.php:69
|
903 |
msgid "Add New Team"
|
904 |
msgstr ""
|
905 |
|
906 |
#: includes/admin/class-sp-admin-welcome.php:205
|
907 |
+
#: includes/class-sp-post-types.php:447 modules/sportspress-tutorials.php:74
|
908 |
msgid "Add New Player"
|
909 |
msgstr ""
|
910 |
|
911 |
#: includes/admin/class-sp-admin-welcome.php:210
|
912 |
+
#: includes/class-sp-post-types.php:383 modules/sportspress-tutorials.php:81
|
913 |
msgid "Add New Event"
|
914 |
msgstr ""
|
915 |
|
926 |
msgstr ""
|
927 |
|
928 |
#: includes/admin/class-sp-admin-welcome.php:234
|
929 |
+
#: includes/admin/settings/class-sp-settings-general.php:274
|
930 |
+
#: includes/admin/settings/class-sp-settings-general.php:277
|
931 |
msgid "Timezone"
|
932 |
msgstr ""
|
933 |
|
934 |
#: includes/admin/class-sp-admin-welcome.php:234
|
935 |
+
#: includes/admin/settings/class-sp-settings-general.php:274
|
936 |
msgid "Choose a city in the same timezone as you."
|
937 |
msgstr ""
|
938 |
|
939 |
#: includes/admin/class-sp-admin-welcome.php:280
|
940 |
+
#: includes/admin/settings/class-sp-settings-modules.php:264
|
941 |
#: includes/admin/views/html-admin-settings.php:15
|
942 |
msgid "Save Changes"
|
943 |
msgstr ""
|
944 |
|
945 |
#: includes/admin/class-sp-admin-welcome.php:289
|
946 |
+
#: includes/admin/settings/class-sp-settings-modules.php:134
|
947 |
msgid "Free SportsPress Theme"
|
948 |
msgstr ""
|
949 |
|
953 |
msgstr ""
|
954 |
|
955 |
#: includes/admin/class-sp-admin-welcome.php:292
|
956 |
+
#: includes/admin/settings/class-sp-settings-modules.php:122
|
957 |
+
#: includes/admin/settings/class-sp-settings-modules.php:140
|
958 |
msgid "Rookie is a free starter theme for SportsPress designed by ThemeBoy."
|
959 |
msgstr ""
|
960 |
|
961 |
#: includes/admin/class-sp-admin-welcome.php:294
|
962 |
+
#: includes/admin/settings/class-sp-settings-modules.php:143
|
|
|
963 |
#: includes/admin/views/html-notice-theme-support.php:8
|
964 |
msgid "Install Now"
|
965 |
msgstr ""
|
973 |
msgstr ""
|
974 |
|
975 |
#: includes/admin/class-sp-admin-welcome.php:314
|
976 |
+
#: includes/admin/settings/class-sp-settings-modules.php:160
|
977 |
msgid "Developers"
|
978 |
msgstr ""
|
979 |
|
985 |
msgstr ""
|
986 |
|
987 |
#: includes/admin/class-sp-admin-welcome.php:321
|
988 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-equation.php:155
|
989 |
msgid "Presets"
|
990 |
msgstr ""
|
991 |
|
997 |
"SportsPress</a>."
|
998 |
msgstr ""
|
999 |
|
1000 |
+
#: includes/admin/class-sp-admin-welcome.php:350
|
1001 |
+
msgid "Top Translations"
|
1002 |
+
msgstr ""
|
1003 |
+
|
1004 |
+
#: includes/admin/class-sp-admin-welcome.php:549
|
1005 |
+
#: includes/admin/settings/class-sp-settings-status.php:237
|
1006 |
+
#: includes/admin/views/html-admin-page-status.php:201
|
1007 |
+
msgid "by"
|
1008 |
+
msgstr ""
|
1009 |
+
|
1010 |
+
#: includes/admin/class-sp-admin-welcome.php:585
|
1011 |
#, php-format
|
1012 |
msgid "View %s"
|
1013 |
msgstr ""
|
1014 |
|
1015 |
+
#: includes/admin/class-sp-admin.php:101
|
1016 |
msgid "Import"
|
1017 |
msgstr ""
|
1018 |
|
1023 |
#: includes/admin/importers/class-sp-event-importer.php:26
|
1024 |
#: includes/admin/post-types/class-sp-admin-cpt-event.php:98
|
1025 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-data.php:50
|
1026 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-details.php:48
|
1027 |
+
#: includes/admin/settings/class-sp-settings-events.php:67
|
1028 |
+
#: includes/sp-core-functions.php:1320 templates/event-details.php:22
|
1029 |
+
#: templates/event-list.php:82
|
1030 |
msgid "Date"
|
1031 |
msgstr ""
|
1032 |
|
1033 |
#: includes/admin/importers/class-sp-event-importer.php:27
|
1034 |
#: includes/admin/post-types/class-sp-admin-cpt-event.php:99
|
1035 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-data.php:72
|
1036 |
+
#: includes/admin/settings/class-sp-settings-events.php:74
|
1037 |
+
#: includes/class-sp-ajax.php:303 includes/sp-core-functions.php:468
|
1038 |
+
#: includes/sp-core-functions.php:1342 templates/event-details.php:27
|
1039 |
+
#: templates/event-list.php:98 templates/event-list.php:113
|
1040 |
+
#: templates/event-list.php:119
|
1041 |
msgid "Time"
|
1042 |
msgstr ""
|
1043 |
|
1045 |
#: includes/admin/post-types/class-sp-admin-cpt-calendar.php:51
|
1046 |
#: includes/admin/post-types/class-sp-admin-cpt-event.php:103
|
1047 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-data.php:103
|
1048 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-equation.php:49
|
1049 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-event-details.php:40
|
1050 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-team-details.php:100
|
1051 |
+
#: includes/admin/settings/class-sp-settings-events.php:95
|
1052 |
#: includes/admin/settings/class-sp-settings-teams.php:80
|
1053 |
+
#: includes/class-sp-ajax.php:304 includes/class-sp-post-types.php:100
|
1054 |
+
#: includes/sp-core-functions.php:1345
|
1055 |
+
#: includes/widgets/class-sp-widget-event-list.php:156
|
1056 |
+
#: templates/event-list.php:138 templates/event-venue.php:37
|
1057 |
msgid "Venue"
|
1058 |
msgstr ""
|
1059 |
|
1060 |
#: includes/admin/importers/class-sp-event-importer.php:31
|
1061 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-event-results.php:258
|
1062 |
+
#: includes/admin/settings/class-sp-settings-events.php:290
|
|
|
1063 |
#: includes/class-sp-event.php:46 includes/class-sp-event.php:67
|
1064 |
+
#: includes/class-sp-post-types.php:234 includes/sp-core-functions.php:1327
|
1065 |
msgid "Outcome"
|
1066 |
msgstr ""
|
1067 |
|
1101 |
|
1102 |
#: includes/admin/importers/class-sp-event-importer.php:467
|
1103 |
#: includes/admin/post-types/class-sp-admin-cpt-event.php:96
|
1104 |
+
#: includes/admin/post-types/class-sp-admin-cpt-performance.php:47
|
1105 |
+
#: includes/admin/post-types/class-sp-admin-meta-boxes.php:113
|
1106 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-performance-details.php:57
|
1107 |
+
#: includes/admin/views/html-admin-config.php:166
|
1108 |
msgid "Format"
|
1109 |
msgstr ""
|
1110 |
|
1125 |
#: includes/admin/post-types/class-sp-admin-cpt-table.php:49
|
1126 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-data.php:91
|
1127 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-team-lists.php:61
|
1128 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-team-staff.php:61
|
1129 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-team-tables.php:61
|
1130 |
+
#: includes/class-sp-post-types.php:38 includes/sp-core-functions.php:1324
|
1131 |
+
#: templates/event-list.php:132
|
|
|
1132 |
msgid "Competition"
|
1133 |
msgstr ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1134 |
|
1135 |
#: includes/admin/importers/class-sp-event-importer.php:484
|
1136 |
#: includes/admin/importers/class-sp-event-importer.php:499
|
1137 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-event-details.php:50
|
1138 |
msgid "— Not set —"
|
1139 |
msgstr ""
|
1140 |
|
1147 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-player-statistics.php:63
|
1148 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-team-columns.php:60
|
1149 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-team-lists.php:64
|
1150 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-team-staff.php:64
|
1151 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-team-tables.php:64
|
1152 |
+
#: includes/class-sp-player.php:479 includes/class-sp-post-types.php:69
|
1153 |
+
#: includes/sp-core-functions.php:1337 templates/event-list.php:135
|
1154 |
msgid "Season"
|
1155 |
msgstr ""
|
1156 |
|
1190 |
|
1191 |
#: includes/admin/importers/class-sp-player-importer.php:26
|
1192 |
#: includes/admin/post-types/class-sp-admin-cpt-player.php:64
|
1193 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-list-columns.php:32
|
1194 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-list-details.php:72
|
1195 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-player-details.php:70
|
1196 |
+
#: includes/class-sp-ajax.php:602 includes/class-sp-ajax.php:680
|
1197 |
+
#: includes/widgets/class-sp-widget-player-gallery.php:111
|
1198 |
+
#: includes/widgets/class-sp-widget-player-list.php:122
|
1199 |
+
#: includes/widgets/class-sp-widget-player-list.php:124
|
1200 |
+
#: includes/widgets/class-sp-widget-player-list.php:139
|
1201 |
msgid "Squad Number"
|
1202 |
msgstr ""
|
1203 |
|
1209 |
#: includes/admin/post-types/class-sp-admin-cpt-staff.php:52
|
1210 |
#: includes/admin/post-types/class-sp-admin-cpt-staff.php:70
|
1211 |
#: includes/admin/post-types/class-sp-admin-cpt-team.php:51
|
1212 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-list-details.php:73
|
1213 |
+
#: includes/class-sp-ajax.php:603 includes/class-sp-ajax.php:681
|
1214 |
+
#: includes/class-sp-post-types.php:44 includes/class-sp-post-types.php:75
|
1215 |
+
#: includes/class-sp-post-types.php:106 includes/class-sp-post-types.php:137
|
1216 |
+
#: includes/class-sp-post-types.php:168
|
1217 |
+
#: includes/widgets/class-sp-widget-player-gallery.php:112
|
1218 |
+
#: includes/widgets/class-sp-widget-player-list.php:140
|
1219 |
msgid "Name"
|
1220 |
msgstr ""
|
1221 |
|
1222 |
#: includes/admin/importers/class-sp-player-importer.php:32
|
1223 |
#: includes/admin/importers/class-sp-staff-importer.php:31
|
1224 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-player-details.php:73
|
1225 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-player-details.php:74
|
1226 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-staff-details.php:80
|
1227 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-staff-details.php:81
|
1228 |
+
#: includes/admin/settings/class-sp-settings-players.php:81
|
1229 |
+
#: includes/admin/settings/class-sp-settings-players.php:129
|
1230 |
+
#: includes/admin/settings/class-sp-settings-staff.php:72
|
1231 |
+
#: includes/admin/settings/class-sp-settings-staff.php:96
|
1232 |
+
#: includes/sp-core-functions.php:1325 templates/player-details.php:49
|
1233 |
+
#: templates/staff-details.php:46
|
1234 |
msgid "Nationality"
|
1235 |
msgstr ""
|
1236 |
|
1258 |
msgstr ""
|
1259 |
|
1260 |
#: includes/admin/importers/class-sp-staff-importer.php:27
|
1261 |
+
#: includes/class-sp-post-types.php:161 includes/class-sp-post-types.php:175
|
1262 |
+
#: modules/sportspress-tutorials.php:66
|
1263 |
msgid "Jobs"
|
1264 |
msgstr ""
|
1265 |
|
1271 |
msgstr ""
|
1272 |
|
1273 |
#: includes/admin/importers/class-sp-staff-importer.php:143
|
1274 |
+
#: includes/class-sp-post-types.php:480
|
1275 |
msgid "View Staff"
|
1276 |
msgstr ""
|
1277 |
|
1287 |
msgstr ""
|
1288 |
|
1289 |
#: includes/admin/importers/class-sp-team-importer.php:29
|
1290 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-team-details.php:109
|
1291 |
#: includes/admin/settings/class-sp-settings-status.php:60
|
1292 |
#: includes/admin/views/html-admin-page-status.php:24
|
1293 |
msgid "Site URL"
|
1296 |
#: includes/admin/importers/class-sp-team-importer.php:30
|
1297 |
#: includes/admin/post-types/class-sp-admin-cpt-outcome.php:45
|
1298 |
#: includes/admin/post-types/class-sp-admin-cpt-team.php:66
|
1299 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-outcome-details.php:43
|
1300 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-team-details.php:115
|
1301 |
#: includes/admin/settings/class-sp-settings-teams.php:88
|
1302 |
#: includes/admin/views/html-admin-config.php:28
|
1303 |
msgid "Abbreviation"
|
1305 |
|
1306 |
#: includes/admin/importers/class-sp-team-importer.php:31
|
1307 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-data.php:57
|
1308 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-equation.php:49
|
1309 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-team-details.php:93
|
1310 |
+
#: modules/sportspress-calendars.php:218 templates/event-list.php:87
|
1311 |
#: templates/team-details.php:39 templates/team-details.php:45
|
1312 |
msgid "Home"
|
1313 |
msgstr ""
|
1336 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-data.php:61
|
1337 |
#: modules/sportspress-calendars.php:195 modules/sportspress-calendars.php:216
|
1338 |
#: modules/sportspress-calendars.php:264
|
1339 |
+
#: modules/sportspress-league-tables.php:194
|
1340 |
+
#: modules/sportspress-player-lists.php:201
|
1341 |
msgid "Title"
|
1342 |
msgstr ""
|
1343 |
|
1345 |
#: includes/admin/post-types/class-sp-admin-cpt-list.php:53
|
1346 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-team-lists.php:67
|
1347 |
#: modules/sportspress-calendars.php:140
|
1348 |
+
#: modules/sportspress-player-lists.php:140
|
1349 |
+
#: modules/sportspress-tutorials.php:96
|
1350 |
msgid "Layout"
|
1351 |
msgstr ""
|
1352 |
|
1354 |
#: includes/admin/post-types/class-sp-admin-cpt-calendar.php:69
|
1355 |
#: includes/admin/post-types/class-sp-admin-cpt-calendar.php:72
|
1356 |
#: includes/admin/post-types/class-sp-admin-cpt-calendar.php:78
|
1357 |
+
#: includes/admin/post-types/class-sp-admin-cpt-list.php:74
|
1358 |
+
#: includes/admin/post-types/class-sp-admin-cpt-list.php:77
|
1359 |
+
#: includes/admin/post-types/class-sp-admin-cpt-list.php:83
|
1360 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-details.php:81
|
1361 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-list-details.php:50
|
1362 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-performance-details.php:50
|
1363 |
+
#: includes/admin/settings/class-sp-settings-events.php:405
|
1364 |
+
#: includes/class-sp-ajax.php:198 includes/class-sp-ajax.php:275
|
1365 |
+
#: includes/class-sp-ajax.php:373 includes/class-sp-post-types.php:39
|
1366 |
+
#: includes/class-sp-post-types.php:70 includes/class-sp-post-types.php:101
|
1367 |
+
#: includes/class-sp-post-types.php:132 includes/class-sp-post-types.php:163
|
1368 |
+
#: includes/sp-core-functions.php:456 includes/sp-core-functions.php:457
|
1369 |
+
#: includes/sp-core-functions.php:459 includes/sp-core-functions.php:505
|
1370 |
+
#: includes/sp-core-functions.php:536 includes/sp-core-functions.php:1293
|
1371 |
#: includes/widgets/class-sp-widget-countdown.php:76
|
1372 |
+
#: includes/widgets/class-sp-widget-event-blocks.php:91
|
1373 |
+
#: includes/widgets/class-sp-widget-event-calendar.php:79
|
1374 |
+
#: includes/widgets/class-sp-widget-event-list.php:94
|
1375 |
#: modules/sportspress-overview.php:138
|
1376 |
msgid "All"
|
1377 |
msgstr ""
|
1379 |
#: includes/admin/post-types/class-sp-admin-cpt-calendar.php:87
|
1380 |
#: includes/admin/post-types/class-sp-admin-cpt-player.php:101
|
1381 |
#: includes/admin/post-types/class-sp-admin-cpt-staff.php:97
|
1382 |
+
#: includes/admin/settings/class-sp-settings-players.php:97
|
1383 |
+
#: includes/admin/settings/class-sp-settings-staff.php:80
|
1384 |
+
#: includes/sp-core-functions.php:1318 templates/player-details.php:69
|
1385 |
+
#: templates/staff-details.php:56
|
1386 |
msgid "Current Team"
|
1387 |
msgstr ""
|
1388 |
|
1389 |
#: includes/admin/post-types/class-sp-admin-cpt-calendar.php:115
|
1390 |
#: includes/admin/post-types/class-sp-admin-cpt-event.php:214
|
1391 |
+
#: includes/admin/post-types/class-sp-admin-cpt-list.php:109
|
1392 |
+
#: includes/admin/post-types/class-sp-admin-cpt-player.php:153
|
1393 |
#: includes/admin/post-types/class-sp-admin-cpt-staff.php:134
|
1394 |
+
#: includes/admin/post-types/class-sp-admin-cpt-table.php:91
|
1395 |
#: includes/admin/post-types/class-sp-admin-cpt-team.php:111
|
|
|
1396 |
msgid "Show all competitions"
|
1397 |
msgstr ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1398 |
|
1399 |
#: includes/admin/post-types/class-sp-admin-cpt-calendar.php:124
|
1400 |
#: includes/admin/post-types/class-sp-admin-cpt-event.php:223
|
1401 |
+
#: includes/admin/post-types/class-sp-admin-cpt-list.php:118
|
1402 |
+
#: includes/admin/post-types/class-sp-admin-cpt-player.php:164
|
1403 |
#: includes/admin/post-types/class-sp-admin-cpt-staff.php:143
|
1404 |
+
#: includes/admin/post-types/class-sp-admin-cpt-table.php:100
|
1405 |
#: includes/admin/post-types/class-sp-admin-cpt-team.php:120
|
1406 |
msgid "Show all seasons"
|
1407 |
msgstr ""
|
1408 |
|
1409 |
#: includes/admin/post-types/class-sp-admin-cpt-calendar.php:135
|
1410 |
#: includes/admin/post-types/class-sp-admin-cpt-event.php:206
|
1411 |
+
#: includes/admin/post-types/class-sp-admin-cpt-list.php:129
|
1412 |
+
#: includes/admin/post-types/class-sp-admin-cpt-player.php:144
|
1413 |
#: includes/admin/post-types/class-sp-admin-cpt-staff.php:126
|
1414 |
+
#: includes/admin/post-types/class-sp-admin-cpt-table.php:111
|
1415 |
msgid "Show all teams"
|
1416 |
msgstr ""
|
1417 |
|
1423 |
#: includes/admin/post-types/class-sp-admin-cpt-statistic.php:43
|
1424 |
#: includes/admin/views/html-admin-config.php:26
|
1425 |
#: includes/admin/views/html-admin-config.php:85
|
1426 |
+
#: includes/admin/views/html-admin-config.php:163
|
1427 |
+
#: includes/admin/views/html-admin-config.php:244
|
1428 |
+
#: includes/admin/views/html-admin-config.php:298
|
1429 |
+
#: includes/admin/views/html-admin-config.php:347
|
1430 |
msgid "Label"
|
1431 |
msgstr ""
|
1432 |
|
1434 |
#: includes/admin/post-types/class-sp-admin-cpt-statistic.php:44
|
1435 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-column-details.php:34
|
1436 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-statistic-details.php:31
|
1437 |
+
#: includes/sp-template-hooks.php:178
|
|
|
|
|
1438 |
msgid "Key"
|
1439 |
msgstr ""
|
1440 |
|
1441 |
#: includes/admin/post-types/class-sp-admin-cpt-column.php:45
|
1442 |
#: includes/admin/post-types/class-sp-admin-cpt-statistic.php:45
|
1443 |
+
#: includes/admin/post-types/class-sp-admin-meta-boxes.php:48
|
1444 |
+
#: includes/admin/post-types/class-sp-admin-meta-boxes.php:73
|
1445 |
+
#: includes/admin/post-types/class-sp-admin-meta-boxes.php:98
|
1446 |
+
#: includes/admin/views/html-admin-config.php:87
|
1447 |
+
#: includes/admin/views/html-admin-config.php:245
|
1448 |
+
#: includes/admin/views/html-admin-config.php:348
|
1449 |
msgid "Equation"
|
1450 |
msgstr ""
|
1451 |
|
1452 |
#: includes/admin/post-types/class-sp-admin-cpt-column.php:46
|
1453 |
#: includes/admin/post-types/class-sp-admin-cpt-statistic.php:46
|
1454 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-column-details.php:39
|
1455 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-result-details.php:39
|
1456 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-statistic-details.php:36
|
1457 |
+
#: includes/admin/views/html-admin-config.php:88
|
1458 |
+
#: includes/admin/views/html-admin-config.php:246
|
1459 |
+
#: includes/admin/views/html-admin-config.php:349
|
1460 |
msgid "Decimal Places"
|
1461 |
msgstr ""
|
1462 |
|
1463 |
#: includes/admin/post-types/class-sp-admin-cpt-column.php:47
|
1464 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-details.php:88
|
1465 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-column-details.php:43
|
1466 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-list-details.php:83
|
1467 |
+
#: includes/admin/views/html-admin-config.php:247
|
1468 |
msgid "Sort Order"
|
1469 |
msgstr ""
|
1470 |
|
1471 |
#: includes/admin/post-types/class-sp-admin-cpt-column.php:48
|
1472 |
#: includes/admin/post-types/class-sp-admin-cpt-metric.php:45
|
1473 |
#: includes/admin/post-types/class-sp-admin-cpt-outcome.php:46
|
1474 |
+
#: includes/admin/post-types/class-sp-admin-cpt-performance.php:48
|
1475 |
#: includes/admin/post-types/class-sp-admin-cpt-result.php:45
|
1476 |
#: includes/admin/post-types/class-sp-admin-cpt-statistic.php:47
|
1477 |
#: includes/admin/views/html-admin-config.php:30
|
1478 |
+
#: includes/admin/views/html-admin-config.php:89
|
1479 |
+
#: includes/admin/views/html-admin-config.php:167
|
1480 |
+
#: includes/admin/views/html-admin-config.php:248
|
1481 |
+
#: includes/admin/views/html-admin-config.php:300
|
1482 |
+
#: includes/admin/views/html-admin-config.php:350
|
1483 |
+
#: includes/sp-template-hooks.php:172 modules/sportspress-calendars.php:161
|
1484 |
+
#: modules/sportspress-league-tables.php:162
|
1485 |
+
#: modules/sportspress-player-lists.php:168
|
1486 |
msgid "Description"
|
1487 |
msgstr ""
|
1488 |
|
1489 |
#: includes/admin/post-types/class-sp-admin-cpt-event.php:55
|
1490 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-event-details.php:54
|
1491 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-event-results.php:275
|
1492 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-event-results.php:293
|
1493 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-list-data.php:130
|
1494 |
+
#: includes/class-sp-ajax.php:63 includes/class-sp-team.php:334
|
1495 |
#: includes/widgets/class-sp-widget-countdown.php:93
|
1496 |
+
#: modules/sportspress-tutorials.php:92
|
1497 |
msgid "(Auto)"
|
1498 |
msgstr ""
|
1499 |
|
1503 |
|
1504 |
#: includes/admin/post-types/class-sp-admin-cpt-event.php:174
|
1505 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-event-video.php:33
|
1506 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-list-data.php:102
|
1507 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-table-data.php:88
|
1508 |
+
#: includes/class-sp-ajax.php:86 includes/class-sp-ajax.php:116
|
1509 |
+
#: includes/class-sp-ajax.php:146 includes/class-sp-ajax.php:176
|
1510 |
+
#: includes/class-sp-ajax.php:225 includes/class-sp-ajax.php:323
|
1511 |
+
#: includes/class-sp-ajax.php:404 includes/class-sp-ajax.php:477
|
1512 |
+
#: includes/class-sp-ajax.php:507 includes/class-sp-ajax.php:537
|
1513 |
+
#: includes/class-sp-ajax.php:634 includes/class-sp-ajax.php:712
|
1514 |
msgid "Cancel"
|
1515 |
msgstr ""
|
1516 |
|
1517 |
#: includes/admin/post-types/class-sp-admin-cpt-event.php:175
|
1518 |
+
#: includes/class-sp-post-types.php:42 includes/class-sp-post-types.php:73
|
1519 |
+
#: includes/class-sp-post-types.php:104 includes/class-sp-post-types.php:135
|
1520 |
+
#: includes/class-sp-post-types.php:166
|
1521 |
msgid "Update"
|
1522 |
msgstr ""
|
1523 |
|
1526 |
#: includes/admin/post-types/class-sp-admin-cpt-performance.php:45
|
1527 |
#: includes/admin/post-types/class-sp-admin-cpt-result.php:44
|
1528 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-metric-details.php:27
|
1529 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-outcome-details.php:38
|
1530 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-performance-details.php:41
|
1531 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-result-details.php:34
|
1532 |
#: includes/admin/views/html-admin-config.php:27
|
1533 |
+
#: includes/admin/views/html-admin-config.php:164
|
1534 |
+
#: includes/admin/views/html-admin-config.php:299
|
1535 |
+
#: includes/sp-template-hooks.php:178
|
1536 |
msgid "Variable"
|
1537 |
msgstr ""
|
1538 |
|
1539 |
#: includes/admin/post-types/class-sp-admin-cpt-performance.php:43
|
1540 |
+
#: includes/admin/post-types/class-sp-admin-meta-boxes.php:315
|
1541 |
+
#: includes/admin/views/html-admin-config.php:162
|
1542 |
+
#: includes/sp-template-hooks.php:181
|
1543 |
msgid "Icon"
|
1544 |
msgstr ""
|
1545 |
|
1546 |
+
#: includes/admin/post-types/class-sp-admin-cpt-performance.php:46
|
1547 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-performance-details.php:46
|
1548 |
+
#: includes/admin/views/html-admin-config.php:165
|
1549 |
+
msgid "Category"
|
1550 |
+
msgstr ""
|
1551 |
+
|
1552 |
+
#: includes/admin/post-types/class-sp-admin-cpt-player.php:132
|
1553 |
msgid "Show all positions"
|
1554 |
msgstr ""
|
1555 |
|
1556 |
#: includes/admin/post-types/class-sp-admin-cpt-staff.php:65
|
1557 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-staff-details.php:63
|
1558 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-staff-details.php:71
|
1559 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-team-staff.php:58
|
1560 |
+
#: includes/class-sp-post-types.php:162
|
1561 |
msgid "Job"
|
1562 |
msgstr ""
|
1563 |
|
1564 |
#: includes/admin/post-types/class-sp-admin-cpt-team.php:63
|
1565 |
+
#: includes/admin/post-types/class-sp-admin-meta-boxes.php:306
|
1566 |
#: includes/admin/settings/class-sp-settings-teams.php:56
|
1567 |
+
#: includes/sp-template-hooks.php:223 modules/sportspress-tutorials.php:99
|
1568 |
msgid "Logo"
|
1569 |
msgstr ""
|
1570 |
|
1583 |
msgid "Uploaded to this %s"
|
1584 |
msgstr ""
|
1585 |
|
1586 |
+
#: includes/admin/post-types/class-sp-admin-meta-boxes.php:107
|
1587 |
+
#: includes/admin/post-types/class-sp-admin-meta-boxes.php:178
|
1588 |
+
#: modules/sportspress-tutorials.php:111
|
1589 |
msgid "Shortcodes"
|
1590 |
msgstr ""
|
1591 |
|
1592 |
+
#: includes/admin/post-types/class-sp-admin-meta-boxes.php:148
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1593 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-data.php:109
|
1594 |
+
#: includes/class-sp-ajax.php:305 includes/sp-core-functions.php:1315
|
1595 |
+
#: includes/widgets/class-sp-widget-event-list.php:157
|
1596 |
+
#: templates/event-list.php:141
|
1597 |
msgid "Article"
|
1598 |
msgstr ""
|
1599 |
|
1600 |
+
#: includes/admin/post-types/class-sp-admin-meta-boxes.php:163
|
1601 |
+
#: includes/admin/post-types/class-sp-admin-meta-boxes.php:212
|
1602 |
+
#: includes/admin/post-types/class-sp-admin-meta-boxes.php:233
|
1603 |
msgid "Profile"
|
1604 |
msgstr ""
|
1605 |
|
1606 |
+
#: includes/admin/post-types/class-sp-admin-meta-boxes.php:184
|
1607 |
+
#: includes/admin/settings/class-sp-settings-events.php:271
|
1608 |
+
#: includes/admin/settings/class-sp-settings-events.php:333
|
1609 |
+
#: modules/sportspress-player-lists.php:147
|
1610 |
msgid "Columns"
|
1611 |
msgstr ""
|
1612 |
|
1613 |
+
#: includes/admin/post-types/class-sp-admin-meta-boxes.php:198
|
1614 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-list-columns.php:56
|
1615 |
msgid "Metrics"
|
1616 |
msgstr ""
|
1617 |
|
1618 |
+
#: includes/admin/post-types/class-sp-admin-meta-boxes.php:220
|
|
|
|
|
|
|
|
|
|
|
|
|
1619 |
#: modules/sportspress-calendars.php:128
|
1620 |
+
#: modules/sportspress-league-tables.php:142
|
1621 |
+
#: modules/sportspress-player-lists.php:134
|
1622 |
msgid "Shortcode"
|
1623 |
msgstr ""
|
1624 |
|
1625 |
+
#: includes/admin/post-types/class-sp-admin-meta-boxes.php:309
|
1626 |
+
#: includes/admin/post-types/class-sp-admin-meta-boxes.php:312
|
1627 |
+
#: includes/admin/settings/class-sp-settings-players.php:56
|
1628 |
+
#: includes/admin/settings/class-sp-settings-staff.php:55
|
1629 |
+
#: includes/sp-template-hooks.php:206
|
1630 |
+
msgid "Photo"
|
1631 |
+
msgstr ""
|
1632 |
+
|
1633 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-data.php:57
|
1634 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-equation.php:49
|
1635 |
+
#: modules/sportspress-calendars.php:218 templates/event-list.php:95
|
1636 |
msgid "Away"
|
1637 |
msgstr ""
|
1638 |
|
1639 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-data.php:74
|
1640 |
+
#: includes/sp-core-functions.php:1343
|
1641 |
+
#: includes/widgets/class-sp-widget-event-list.php:155
|
1642 |
+
#: templates/event-list.php:90 templates/event-list.php:127
|
1643 |
msgid "Time/Results"
|
1644 |
msgstr ""
|
1645 |
|
1646 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-data.php:202
|
1647 |
+
#: includes/class-sp-template-loader.php:71 includes/sp-core-functions.php:1335
|
1648 |
+
#: templates/event-list.php:356
|
1649 |
msgid "Recap"
|
1650 |
msgstr ""
|
1651 |
|
1652 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-data.php:204
|
1653 |
+
#: includes/class-sp-template-loader.php:73 includes/sp-core-functions.php:1333
|
1654 |
+
#: templates/event-list.php:358
|
1655 |
msgid "Preview"
|
1656 |
msgstr ""
|
1657 |
|
1658 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-data.php:217
|
1659 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-team-lists.php:32
|
1660 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-team-lists.php:101
|
1661 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-team-staff.php:32
|
1662 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-team-staff.php:96
|
1663 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-team-tables.php:32
|
1664 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-team-tables.php:97
|
1665 |
#: includes/admin/views/html-admin-config.php:45
|
1666 |
+
#: includes/admin/views/html-admin-config.php:121
|
1667 |
+
#: includes/admin/views/html-admin-config.php:209
|
1668 |
+
#: includes/admin/views/html-admin-config.php:263
|
1669 |
+
#: includes/admin/views/html-admin-config.php:313
|
1670 |
+
#: includes/admin/views/html-admin-config.php:364
|
1671 |
+
#: includes/class-sp-post-types.php:48 includes/class-sp-post-types.php:79
|
1672 |
+
#: includes/class-sp-post-types.php:110 includes/class-sp-post-types.php:141
|
1673 |
+
#: includes/class-sp-post-types.php:172 includes/class-sp-post-types.php:210
|
1674 |
+
#: includes/class-sp-post-types.php:211 includes/class-sp-post-types.php:240
|
1675 |
+
#: includes/class-sp-post-types.php:241 includes/class-sp-post-types.php:270
|
1676 |
+
#: includes/class-sp-post-types.php:271 includes/class-sp-post-types.php:300
|
1677 |
+
#: includes/class-sp-post-types.php:301 includes/class-sp-post-types.php:330
|
1678 |
+
#: includes/class-sp-post-types.php:331 includes/class-sp-post-types.php:360
|
1679 |
+
#: includes/class-sp-post-types.php:361 includes/class-sp-post-types.php:388
|
1680 |
+
#: includes/class-sp-post-types.php:389 includes/class-sp-post-types.php:422
|
1681 |
+
#: includes/class-sp-post-types.php:423 includes/class-sp-post-types.php:452
|
1682 |
+
#: includes/class-sp-post-types.php:453 includes/class-sp-post-types.php:482
|
1683 |
+
#: includes/class-sp-post-types.php:483 includes/sp-core-functions.php:897
|
1684 |
+
#: includes/sp-core-functions.php:941 modules/sportspress-calendars.php:72
|
1685 |
#: modules/sportspress-calendars.php:73
|
1686 |
+
#: modules/sportspress-lazy-loading.php:208
|
1687 |
+
#: modules/sportspress-lazy-loading.php:221
|
1688 |
#: modules/sportspress-league-tables.php:73
|
1689 |
+
#: modules/sportspress-league-tables.php:74
|
1690 |
+
#: modules/sportspress-overview.php:341 modules/sportspress-player-lists.php:72
|
1691 |
#: modules/sportspress-player-lists.php:73
|
1692 |
msgid "No results found."
|
1693 |
msgstr ""
|
1694 |
|
1695 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-data.php:226
|
1696 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-list-data.php:155
|
1697 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-list-data.php:203
|
1698 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-player-details.php:74
|
1699 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-player-details.php:93
|
1700 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-player-details.php:110
|
1701 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-player-details.php:125
|
1702 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-player-details.php:142
|
1703 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-player-details.php:159
|
1704 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-staff-details.php:71
|
1705 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-staff-details.php:81
|
1706 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-staff-details.php:100
|
1707 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-staff-details.php:115
|
1708 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-staff-details.php:131
|
1709 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-staff-details.php:146
|
1710 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-table-data.php:106
|
1711 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-table-data.php:150
|
1712 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-team-details.php:66
|
1713 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-team-details.php:83
|
1714 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-team-details.php:100
|
1715 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-team-lists.php:110
|
1716 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-team-staff.php:105
|
1717 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-team-tables.php:106
|
1718 |
#, php-format
|
1719 |
msgid "Select %s"
|
1720 |
msgstr ""
|
1721 |
|
1722 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-details.php:36
|
1723 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-event-performance.php:264
|
1724 |
msgid "Status"
|
1725 |
msgstr ""
|
1726 |
|
1727 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-details.php:91
|
1728 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-column-details.php:59
|
1729 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-list-details.php:86
|
1730 |
+
#: includes/class-sp-ajax.php:292 includes/class-sp-ajax.php:390
|
1731 |
+
#: includes/class-sp-ajax.php:620 includes/class-sp-ajax.php:698
|
1732 |
+
#: includes/widgets/class-sp-widget-event-blocks.php:143
|
1733 |
+
#: includes/widgets/class-sp-widget-event-list.php:146
|
1734 |
+
#: includes/widgets/class-sp-widget-player-gallery.php:133
|
1735 |
+
#: includes/widgets/class-sp-widget-player-list.php:158
|
1736 |
msgid "Ascending"
|
1737 |
msgstr ""
|
1738 |
|
1739 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-details.php:92
|
1740 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-column-details.php:59
|
1741 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-list-details.php:87
|
1742 |
+
#: includes/class-sp-ajax.php:293 includes/class-sp-ajax.php:391
|
1743 |
+
#: includes/class-sp-ajax.php:621 includes/class-sp-ajax.php:699
|
1744 |
+
#: includes/widgets/class-sp-widget-event-blocks.php:144
|
1745 |
+
#: includes/widgets/class-sp-widget-event-list.php:147
|
1746 |
+
#: includes/widgets/class-sp-widget-player-gallery.php:134
|
1747 |
+
#: includes/widgets/class-sp-widget-player-list.php:159
|
1748 |
msgid "Descending"
|
1749 |
msgstr ""
|
1750 |
|
1751 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-feeds.php:45
|
1752 |
+
#: includes/admin/settings/class-sp-settings-events.php:49
|
1753 |
+
#: includes/admin/settings/class-sp-settings-general.php:350
|
1754 |
#: includes/admin/settings/class-sp-settings-players.php:47
|
1755 |
#: includes/admin/settings/class-sp-settings-staff.php:46
|
1756 |
#: includes/admin/settings/class-sp-settings-teams.php:47
|
1773 |
|
1774 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-equation.php:34
|
1775 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-equation.php:37
|
1776 |
+
#: includes/class-sp-ajax.php:604 includes/class-sp-ajax.php:682
|
1777 |
+
#: includes/sp-core-functions.php:1329
|
1778 |
+
#: includes/widgets/class-sp-widget-player-gallery.php:113
|
1779 |
+
#: includes/widgets/class-sp-widget-player-list.php:141
|
1780 |
msgid "Played"
|
1781 |
msgstr ""
|
1782 |
|
1801 |
msgid "against"
|
1802 |
msgstr ""
|
1803 |
|
1804 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-equation.php:46
|
1805 |
msgid "Games Back"
|
1806 |
msgstr ""
|
1807 |
|
1808 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-equation.php:46
|
1809 |
msgid "Home Record"
|
1810 |
msgstr ""
|
1811 |
|
1813 |
msgid "Away Record"
|
1814 |
msgstr ""
|
1815 |
|
1816 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-equation.php:46
|
1817 |
msgid "Streak"
|
1818 |
msgstr ""
|
1819 |
|
1820 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-equation.php:46
|
1821 |
msgid "Last 5"
|
1822 |
msgstr ""
|
1823 |
|
1824 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-equation.php:46
|
1825 |
msgid "Last 10"
|
1826 |
msgstr ""
|
1827 |
|
1828 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-equation.php:156
|
1829 |
msgid "Operators"
|
1830 |
msgstr ""
|
1831 |
|
1832 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-equation.php:157
|
1833 |
+
msgid "Subsets"
|
1834 |
+
msgstr ""
|
1835 |
+
|
1836 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-equation.php:158
|
1837 |
msgid "Constants"
|
1838 |
msgstr ""
|
1839 |
|
1840 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-event-details.php:27
|
1841 |
+
#: includes/admin/settings/class-sp-settings-events.php:188
|
1842 |
msgid "Full Time"
|
1843 |
msgstr ""
|
1844 |
|
1845 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-event-performance.php:173
|
1846 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-event-performance.php:175
|
1847 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-event-teams.php:74
|
1848 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-event-teams.php:79
|
1849 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-performance-details.php:50
|
1850 |
+
#: includes/admin/settings/class-sp-settings-events.php:394
|
1851 |
+
#: includes/admin/settings/class-sp-settings-events.php:395
|
1852 |
+
#: includes/sp-core-functions.php:456 includes/sp-core-functions.php:1321
|
1853 |
+
#: templates/event-performance.php:125 templates/event-performance.php:127
|
1854 |
+
msgid "Defense"
|
1855 |
+
msgstr ""
|
1856 |
+
|
1857 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-event-performance.php:173
|
1858 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-event-performance.php:175
|
1859 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-event-teams.php:70
|
1860 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-event-teams.php:83
|
1861 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-performance-details.php:50
|
1862 |
+
#: includes/admin/settings/class-sp-settings-events.php:394
|
1863 |
+
#: includes/admin/settings/class-sp-settings-events.php:395
|
1864 |
+
#: includes/sp-core-functions.php:456 includes/sp-core-functions.php:1326
|
1865 |
+
#: templates/event-performance.php:125 templates/event-performance.php:127
|
1866 |
+
msgid "Offense"
|
1867 |
+
msgstr ""
|
1868 |
+
|
1869 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-event-performance.php:247
|
1870 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-list-columns.php:48
|
1871 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-list-data.php:58
|
1872 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-list-details.php:64
|
1873 |
+
#: includes/admin/settings/class-sp-settings-players.php:89
|
1874 |
+
#: includes/class-sp-event.php:141 includes/class-sp-player-list.php:544
|
1875 |
+
#: includes/class-sp-player-list.php:563 includes/class-sp-post-types.php:131
|
1876 |
+
#: includes/sp-core-functions.php:1332 templates/event-performance.php:135
|
1877 |
+
#: templates/player-details.php:57
|
1878 |
msgid "Position"
|
1879 |
msgstr ""
|
1880 |
|
1881 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-event-performance.php:287
|
|
|
|
|
|
|
|
|
|
|
|
|
1882 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-player-statistics.php:98
|
1883 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-player-statistics.php:104
|
1884 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-team-columns.php:38
|
1885 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-team-columns.php:76
|
1886 |
+
#: includes/admin/settings/class-sp-settings-events.php:325
|
1887 |
+
#: includes/admin/settings/class-sp-settings-events.php:400
|
1888 |
+
#: includes/class-sp-player.php:140 includes/class-sp-player.php:430
|
1889 |
+
#: includes/class-sp-team.php:65 includes/sp-core-functions.php:412
|
1890 |
+
#: includes/sp-core-functions.php:416 includes/sp-core-functions.php:1344
|
1891 |
+
#: templates/event-performance-table-combined.php:139
|
1892 |
+
#: templates/event-performance-table.php:177
|
1893 |
msgid "Total"
|
1894 |
msgstr ""
|
1895 |
|
1896 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-event-performance.php:382
|
1897 |
msgid "Starting Lineup"
|
1898 |
msgstr ""
|
1899 |
|
1900 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-event-performance.php:383
|
1901 |
msgid "Substitute"
|
1902 |
msgstr ""
|
1903 |
|
1904 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-event-teams.php:35
|
1905 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-player-statistics.php:119
|
1906 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-player-statistics.php:140
|
1907 |
msgid "— None —"
|
1908 |
msgstr ""
|
1909 |
|
1910 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-event-teams.php:122
|
1911 |
+
#: includes/class-sp-ajax.php:57 includes/class-sp-ajax.php:102
|
1912 |
+
#: includes/class-sp-ajax.php:132 includes/class-sp-ajax.php:162
|
1913 |
+
#: includes/class-sp-ajax.php:192 includes/class-sp-ajax.php:247
|
1914 |
+
#: includes/class-sp-ajax.php:345 includes/class-sp-ajax.php:426
|
1915 |
+
#: includes/class-sp-ajax.php:493 includes/class-sp-ajax.php:523
|
1916 |
+
#: includes/class-sp-ajax.php:559 includes/class-sp-ajax.php:656
|
1917 |
+
#: includes/widgets/class-sp-widget-countdown.php:69
|
1918 |
+
#: includes/widgets/class-sp-widget-countdown.php:86
|
1919 |
+
#: includes/widgets/class-sp-widget-event-blocks.php:87
|
1920 |
+
#: includes/widgets/class-sp-widget-event-calendar.php:75
|
1921 |
+
#: includes/widgets/class-sp-widget-event-list.php:90
|
1922 |
+
#: includes/widgets/class-sp-widget-league-table.php:79
|
1923 |
+
#: includes/widgets/class-sp-widget-player-gallery.php:84
|
1924 |
+
#: includes/widgets/class-sp-widget-player-list.php:84
|
1925 |
+
#: includes/widgets/class-sp-widget-staff.php:57
|
1926 |
+
#, php-format
|
1927 |
+
msgid "Select %s:"
|
1928 |
+
msgstr ""
|
1929 |
+
|
1930 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-event-video.php:27
|
1931 |
msgid "Remove video"
|
1932 |
msgstr ""
|
1935 |
msgid "Add video"
|
1936 |
msgstr ""
|
1937 |
|
1938 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-list-columns.php:25
|
1939 |
+
#: includes/admin/settings/class-sp-settings-general.php:25
|
1940 |
+
#: includes/admin/settings/class-sp-settings-modules.php:33
|
1941 |
+
msgid "General"
|
1942 |
+
msgstr ""
|
1943 |
+
|
1944 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-list-columns.php:34
|
1945 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-list-data.php:51
|
1946 |
+
#: includes/sp-core-functions.php:1334
|
1947 |
+
#: includes/widgets/class-sp-widget-player-list.php:120
|
1948 |
+
#: includes/widgets/class-sp-widget-player-list.php:126
|
1949 |
+
#: templates/player-list.php:109
|
1950 |
+
msgid "Rank"
|
1951 |
+
msgstr ""
|
1952 |
+
|
1953 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-list-columns.php:52
|
1954 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-list-data.php:155
|
1955 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-table-data.php:106
|
1956 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-table-data.php:150
|
1957 |
+
msgid "Data"
|
1958 |
+
msgstr ""
|
1959 |
+
|
1960 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-list-columns.php:55
|
1961 |
+
#: includes/admin/settings/class-sp-settings-events.php:388
|
1962 |
+
msgid "Performance"
|
1963 |
+
msgstr ""
|
1964 |
+
|
1965 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-list-data.php:43
|
1966 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-table-data.php:49
|
1967 |
+
#: includes/admin/settings/class-sp-settings-events.php:349
|
1968 |
msgid "Values"
|
1969 |
msgstr ""
|
1970 |
|
1971 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-list-data.php:44
|
1972 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-table-data.php:50
|
1973 |
+
#: modules/sportspress-tutorials.php:100
|
1974 |
msgid "Adjustments"
|
1975 |
msgstr ""
|
1976 |
|
1977 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-list-data.php:98
|
|
|
|
|
|
|
|
|
|
|
1978 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-table-data.php:84
|
1979 |
#: includes/admin/views/html-admin-config.php:41
|
1980 |
+
#: includes/admin/views/html-admin-config.php:117
|
1981 |
+
#: includes/admin/views/html-admin-config.php:205
|
1982 |
+
#: includes/admin/views/html-admin-config.php:259
|
1983 |
+
#: includes/admin/views/html-admin-config.php:309
|
1984 |
+
#: includes/admin/views/html-admin-config.php:360
|
1985 |
msgid "Edit"
|
1986 |
msgstr ""
|
1987 |
|
1988 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-list-data.php:103
|
1989 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-table-data.php:89
|
1990 |
msgid "Save"
|
1991 |
msgstr ""
|
1992 |
|
1993 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-list-details.php:60
|
|
|
|
|
|
|
|
|
|
|
|
|
1994 |
msgid "Grouping"
|
1995 |
msgstr ""
|
1996 |
|
1997 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-list-details.php:67
|
1998 |
msgid "Sort by"
|
1999 |
msgstr ""
|
2000 |
|
2001 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-outcome-details.php:36
|
2002 |
+
#: includes/admin/settings/class-sp-settings-events.php:406
|
2003 |
+
#: includes/admin/settings/class-sp-settings-general.php:346
|
2004 |
#: includes/admin/views/html-admin-config.php:84
|
2005 |
+
#: includes/admin/views/html-admin-config.php:161
|
2006 |
+
#: includes/sp-core-functions.php:379
|
2007 |
msgid "Primary"
|
2008 |
msgstr ""
|
2009 |
|
2010 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-outcome-details.php:47
|
2011 |
#: includes/admin/views/html-admin-config.php:29
|
|
|
2012 |
msgid "Condition"
|
2013 |
msgstr ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014 |
|
2015 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-outcome-details.php:53
|
2016 |
+
#: includes/sp-core-functions.php:383
|
2017 |
#, php-format
|
2018 |
msgid "Most %s"
|
2019 |
msgstr ""
|
2020 |
|
2021 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-outcome-details.php:54
|
2022 |
+
#: includes/sp-core-functions.php:384
|
2023 |
#, php-format
|
2024 |
msgid "Least %s"
|
2025 |
msgstr ""
|
2026 |
|
2027 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-outcome-details.php:55
|
2028 |
+
#: includes/sp-core-functions.php:385
|
2029 |
#, php-format
|
2030 |
msgid "Equal %s"
|
2031 |
msgstr ""
|
2032 |
|
2033 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-outcome-details.php:56
|
2034 |
+
#: includes/admin/settings/class-sp-settings-events.php:180
|
2035 |
+
#: includes/admin/settings/class-sp-settings-general.php:79
|
2036 |
+
#: includes/admin/settings/class-sp-settings-status.php:101
|
2037 |
+
#: includes/admin/views/html-admin-config.php:103
|
2038 |
+
#: includes/admin/views/html-admin-config.php:181
|
2039 |
+
#: includes/admin/views/html-admin-page-status.php:65
|
2040 |
+
#: includes/class-sp-ajax.php:210 includes/class-sp-ajax.php:264
|
2041 |
+
#: includes/class-sp-ajax.php:274 includes/class-sp-ajax.php:291
|
2042 |
+
#: includes/class-sp-ajax.php:362 includes/class-sp-ajax.php:372
|
2043 |
+
#: includes/class-sp-ajax.php:389 includes/class-sp-ajax.php:601
|
2044 |
+
#: includes/class-sp-ajax.php:619 includes/class-sp-ajax.php:679
|
2045 |
+
#: includes/class-sp-ajax.php:697 includes/sp-core-functions.php:386
|
2046 |
+
#: includes/widgets/class-sp-widget-event-blocks.php:107
|
2047 |
+
#: includes/widgets/class-sp-widget-event-blocks.php:121
|
2048 |
+
#: includes/widgets/class-sp-widget-event-blocks.php:142
|
2049 |
+
#: includes/widgets/class-sp-widget-event-calendar.php:95
|
2050 |
+
#: includes/widgets/class-sp-widget-event-calendar.php:109
|
2051 |
+
#: includes/widgets/class-sp-widget-event-list.php:110
|
2052 |
+
#: includes/widgets/class-sp-widget-event-list.php:124
|
2053 |
+
#: includes/widgets/class-sp-widget-event-list.php:145
|
2054 |
+
#: includes/widgets/class-sp-widget-player-gallery.php:110
|
2055 |
+
#: includes/widgets/class-sp-widget-player-list.php:138
|
2056 |
+
msgid "Default"
|
2057 |
+
msgstr ""
|
2058 |
+
|
2059 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-performance-details.php:61
|
2060 |
+
#: includes/sp-core-functions.php:468 includes/sp-core-functions.php:469
|
2061 |
+
#: includes/sp-core-functions.php:471
|
2062 |
+
msgid "Number"
|
2063 |
+
msgstr ""
|
2064 |
+
|
2065 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-performance-details.php:61
|
2066 |
+
#: includes/admin/settings/class-sp-settings-general.php:348
|
2067 |
+
#: includes/admin/settings/class-sp-settings-text.php:25
|
2068 |
+
#: includes/admin/settings/class-sp-settings-text.php:40
|
2069 |
+
#: includes/sp-core-functions.php:468 modules/sportspress-tutorials.php:88
|
2070 |
+
msgid "Text"
|
2071 |
+
msgstr ""
|
2072 |
+
|
2073 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-player-details.php:103
|
2074 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-staff-details.php:93
|
2075 |
+
#: includes/sp-core-functions.php:1319
|
2076 |
msgid "Current Teams"
|
2077 |
msgstr ""
|
2078 |
|
2079 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-player-details.php:118
|
2080 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-staff-details.php:108
|
2081 |
+
#: includes/admin/settings/class-sp-settings-players.php:105
|
2082 |
+
#: includes/admin/settings/class-sp-settings-staff.php:88
|
2083 |
+
#: includes/sp-core-functions.php:1328 templates/player-details.php:79
|
2084 |
+
#: templates/staff-details.php:66
|
2085 |
msgid "Past Teams"
|
2086 |
msgstr ""
|
2087 |
|
2088 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-player-statistics.php:39
|
2089 |
+
#: includes/sp-core-functions.php:1317 templates/player-statistics.php:84
|
2090 |
msgid "Career Total"
|
2091 |
msgstr ""
|
2092 |
|
2093 |
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-table-data.php:56
|
2094 |
+
#: modules/sportspress-tutorials.php:101
|
2095 |
msgid "Highlight"
|
2096 |
msgstr ""
|
2097 |
|
2098 |
+
#: includes/admin/post-types/meta-boxes/class-sp-meta-box-team-details.php:112
|
2099 |
#: includes/admin/settings/class-sp-settings-teams.php:72
|
2100 |
#: includes/admin/settings/class-sp-settings-teams.php:96
|
2101 |
+
#: includes/sp-core-functions.php:359 templates/team-link.php:22
|
2102 |
msgid "Visit Site"
|
2103 |
msgstr ""
|
2104 |
|
2105 |
+
#: includes/admin/settings/class-sp-settings-events.php:43
|
2106 |
msgid "Event Options"
|
2107 |
msgstr ""
|
2108 |
|
2109 |
+
#: includes/admin/settings/class-sp-settings-events.php:50
|
2110 |
msgid "Link events"
|
2111 |
msgstr ""
|
2112 |
|
2113 |
+
#: includes/admin/settings/class-sp-settings-events.php:59
|
2114 |
+
#: includes/admin/settings/class-sp-settings-events.php:244
|
2115 |
#: includes/admin/settings/class-sp-settings-players.php:55
|
2116 |
#: includes/admin/settings/class-sp-settings-staff.php:54
|
|
|
2117 |
#: includes/admin/settings/class-sp-settings-teams.php:55
|
2118 |
+
msgid "Display"
|
|
|
2119 |
msgstr ""
|
2120 |
|
2121 |
+
#: includes/admin/settings/class-sp-settings-events.php:60
|
2122 |
+
#: includes/admin/settings/class-sp-settings-events.php:239
|
2123 |
msgid "Logos"
|
2124 |
msgstr ""
|
2125 |
|
2126 |
+
#: includes/admin/settings/class-sp-settings-events.php:112
|
2127 |
+
#: includes/admin/settings/class-sp-settings-events.php:344
|
2128 |
msgid "Mode"
|
2129 |
msgstr ""
|
2130 |
|
2131 |
+
#: includes/admin/settings/class-sp-settings-events.php:117
|
2132 |
msgid "Team vs team"
|
2133 |
msgstr ""
|
2134 |
|
2135 |
+
#: includes/admin/settings/class-sp-settings-events.php:118
|
2136 |
msgid "Player vs player"
|
2137 |
msgstr ""
|
2138 |
|
2139 |
+
#: includes/admin/settings/class-sp-settings-events.php:120
|
2140 |
msgctxt "mode setting description"
|
2141 |
msgid "Who competes in events?"
|
2142 |
msgstr ""
|
2143 |
|
2144 |
+
#: includes/admin/settings/class-sp-settings-events.php:126
|
2145 |
#: modules/sportspress-calendars.php:244 modules/sportspress-calendars.php:305
|
2146 |
+
#: modules/sportspress-league-tables.php:218
|
2147 |
+
#: modules/sportspress-player-lists.php:234
|
2148 |
msgid "Limit"
|
2149 |
msgstr ""
|
2150 |
|
2151 |
+
#: includes/admin/settings/class-sp-settings-events.php:130
|
2152 |
+
#: modules/sportspress-league-tables.php:222
|
2153 |
msgid "teams"
|
2154 |
msgstr ""
|
2155 |
|
2156 |
+
#: includes/admin/settings/class-sp-settings-events.php:142
|
2157 |
+
msgid "Filter by competition"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2158 |
msgstr ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2159 |
|
2160 |
#: includes/admin/settings/class-sp-settings-events.php:150
|
2161 |
+
msgid "Filter by season"
|
|
|
2162 |
msgstr ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2163 |
|
2164 |
+
#: includes/admin/settings/class-sp-settings-events.php:159
|
|
|
|
|
|
|
|
|
2165 |
msgid "Display maps"
|
2166 |
msgstr ""
|
2167 |
|
2168 |
+
#: includes/admin/settings/class-sp-settings-events.php:167
|
2169 |
#: includes/admin/settings/class-sp-settings-teams.php:81
|
2170 |
msgid "Link venues"
|
2171 |
msgstr ""
|
2172 |
|
2173 |
+
#: includes/admin/settings/class-sp-settings-events.php:175
|
2174 |
msgid "Google Maps"
|
2175 |
msgstr ""
|
2176 |
|
2177 |
+
#: includes/admin/settings/class-sp-settings-events.php:181
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2178 |
msgid "Satellite"
|
2179 |
msgstr ""
|
2180 |
|
2181 |
+
#: includes/admin/settings/class-sp-settings-events.php:182
|
2182 |
msgid "Hybrid"
|
2183 |
msgstr ""
|
2184 |
|
2185 |
+
#: includes/admin/settings/class-sp-settings-events.php:183
|
2186 |
msgid "Terrain"
|
2187 |
msgstr ""
|
2188 |
|
2189 |
+
#: includes/admin/settings/class-sp-settings-events.php:201
|
2190 |
msgid "Comments"
|
2191 |
msgstr ""
|
2192 |
|
2193 |
+
#: includes/admin/settings/class-sp-settings-events.php:202
|
2194 |
msgid "Allow people to post comments on new articles"
|
2195 |
msgstr ""
|
2196 |
|
2197 |
+
#: includes/admin/settings/class-sp-settings-events.php:220
|
2198 |
+
msgid "Zoom"
|
2199 |
+
msgstr ""
|
2200 |
+
|
2201 |
+
#: includes/admin/settings/class-sp-settings-events.php:245
|
2202 |
+
msgid "Display team names"
|
2203 |
+
msgstr ""
|
2204 |
+
|
2205 |
+
#: includes/admin/settings/class-sp-settings-events.php:253
|
2206 |
+
msgid "Display results"
|
2207 |
+
msgstr ""
|
2208 |
+
|
2209 |
+
#: includes/admin/settings/class-sp-settings-events.php:266
|
2210 |
+
#: includes/admin/settings/class-sp-settings-status.php:273
|
2211 |
+
#: includes/admin/views/html-admin-config.php:74
|
2212 |
+
#: includes/admin/views/html-admin-config.php:78
|
2213 |
+
#: includes/admin/views/html-admin-config.php:155
|
2214 |
+
#: includes/admin/views/html-admin-page-status.php:237
|
2215 |
+
#: includes/class-sp-post-types.php:203
|
2216 |
+
msgid "Event Results"
|
2217 |
+
msgstr ""
|
2218 |
+
|
2219 |
+
#: includes/admin/settings/class-sp-settings-events.php:283
|
2220 |
+
#: includes/admin/settings/class-sp-settings-events.php:356
|
2221 |
msgid "Reverse order"
|
2222 |
msgstr ""
|
2223 |
|
2224 |
+
#: includes/admin/settings/class-sp-settings-events.php:291
|
|
|
2225 |
msgid "Display outcome"
|
2226 |
msgstr ""
|
2227 |
+
|
2228 |
+
#: includes/admin/settings/class-sp-settings-events.php:308
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2229 |
msgid "Rows"
|
2230 |
msgstr ""
|
2231 |
|
2232 |
+
#: includes/admin/settings/class-sp-settings-events.php:350
|
2233 |
msgid "Icons"
|
2234 |
msgstr ""
|
2235 |
|
2236 |
+
#: includes/admin/settings/class-sp-settings-events.php:364
|
2237 |
msgid "Top-level only"
|
2238 |
msgstr ""
|
2239 |
|
2240 |
+
#: includes/admin/settings/class-sp-settings-events.php:372
|
2241 |
msgid "Display squad numbers"
|
2242 |
msgstr ""
|
2243 |
|
2244 |
+
#: includes/admin/settings/class-sp-settings-events.php:380
|
|
|
2245 |
msgid "Display positions"
|
2246 |
msgstr ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2247 |
|
2248 |
+
#: includes/admin/settings/class-sp-settings-events.php:393
|
2249 |
+
#: modules/sportspress-calendars.php:228
|
2250 |
+
msgid "Combined"
|
2251 |
msgstr ""
|
2252 |
|
2253 |
+
#: includes/admin/settings/class-sp-settings-events.php:452
|
2254 |
+
#: includes/admin/settings/class-sp-settings-events.php:456
|
2255 |
msgid "Delimiter"
|
2256 |
msgstr ""
|
2257 |
|
2258 |
+
#: includes/admin/settings/class-sp-settings-events.php:461
|
2259 |
msgid "Custom:"
|
2260 |
msgstr ""
|
2261 |
|
|
|
|
|
|
|
|
|
|
|
2262 |
#: includes/admin/settings/class-sp-settings-general.php:46
|
2263 |
msgid "General Options"
|
2264 |
msgstr ""
|
2272 |
msgstr ""
|
2273 |
|
2274 |
#: includes/admin/settings/class-sp-settings-general.php:80
|
2275 |
+
#: modules/sportspress-widget-alignment.php:70
|
2276 |
msgid "Left"
|
2277 |
msgstr ""
|
2278 |
|
2281 |
msgstr ""
|
2282 |
|
2283 |
#: includes/admin/settings/class-sp-settings-general.php:82
|
2284 |
+
#: modules/sportspress-widget-alignment.php:71
|
2285 |
msgid "Right"
|
2286 |
msgstr ""
|
2287 |
|
2329 |
msgid "Sortable"
|
2330 |
msgstr ""
|
2331 |
|
2332 |
+
#: includes/admin/settings/class-sp-settings-general.php:154
|
2333 |
+
msgid "Widgets"
|
2334 |
+
msgstr ""
|
2335 |
+
|
2336 |
+
#: includes/admin/settings/class-sp-settings-general.php:155
|
2337 |
+
msgid "Unique"
|
2338 |
+
msgstr ""
|
2339 |
+
|
2340 |
+
#: includes/admin/settings/class-sp-settings-general.php:159
|
2341 |
+
msgid "Hide widget when same as content."
|
2342 |
+
msgstr ""
|
2343 |
+
|
2344 |
+
#: includes/admin/settings/class-sp-settings-general.php:165
|
2345 |
msgid "Header Offset"
|
2346 |
msgstr ""
|
2347 |
|
2348 |
+
#: includes/admin/settings/class-sp-settings-general.php:306
|
2349 |
msgid "Frontend Styles"
|
2350 |
msgstr ""
|
2351 |
|
2352 |
+
#: includes/admin/settings/class-sp-settings-general.php:327
|
2353 |
+
#: modules/sportspress-icons.php:149
|
2354 |
msgid "Customize"
|
2355 |
msgstr ""
|
2356 |
|
2357 |
+
#: includes/admin/settings/class-sp-settings-general.php:347
|
2358 |
msgid "Background"
|
2359 |
msgstr ""
|
2360 |
|
2361 |
+
#: includes/admin/settings/class-sp-settings-general.php:356
|
|
|
|
|
|
|
|
|
|
|
|
|
2362 |
msgid "Enable"
|
2363 |
msgstr ""
|
2364 |
|
2365 |
#: includes/admin/settings/class-sp-settings-modules.php:30
|
2366 |
+
#: includes/admin/settings/class-sp-settings-modules.php:223
|
2367 |
msgid "Modules"
|
2368 |
msgstr ""
|
2369 |
|
2371 |
msgid "Dashboard"
|
2372 |
msgstr ""
|
2373 |
|
2374 |
+
#: includes/admin/settings/class-sp-settings-modules.php:62
|
2375 |
msgid "SportsPress Pro"
|
2376 |
msgstr ""
|
2377 |
|
2378 |
+
#: includes/admin/settings/class-sp-settings-modules.php:67
|
2379 |
msgid ""
|
2380 |
"Get SportsPress Pro to get access to all modules. You can upgrade any time "
|
2381 |
"without losing any of your data."
|
2382 |
msgstr ""
|
2383 |
|
2384 |
+
#: includes/admin/settings/class-sp-settings-modules.php:69
|
2385 |
msgid "Premium"
|
2386 |
msgstr ""
|
2387 |
|
2388 |
+
#: includes/admin/settings/class-sp-settings-modules.php:70
|
2389 |
msgid "Upgrade Now"
|
2390 |
msgstr ""
|
2391 |
|
2392 |
+
#: includes/admin/settings/class-sp-settings-modules.php:81
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2393 |
msgid "Twitter Module"
|
2394 |
msgstr ""
|
2395 |
|
2396 |
+
#: includes/admin/settings/class-sp-settings-modules.php:89
|
2397 |
msgid "Follow [link]@ThemeBoy[/link] on Twitter."
|
2398 |
msgstr ""
|
2399 |
|
2400 |
+
#: includes/admin/settings/class-sp-settings-modules.php:94
|
2401 |
msgid ""
|
2402 |
"Help spread the word by tweeting with [link]#SportsPress[/link] and get the "
|
2403 |
"Twitter module for free."
|
2404 |
msgstr ""
|
2405 |
|
2406 |
+
#: includes/admin/settings/class-sp-settings-modules.php:99
|
2407 |
msgid "[link]Get the download link[/link]."
|
2408 |
msgstr ""
|
2409 |
|
2410 |
+
#: includes/admin/settings/class-sp-settings-modules.php:102
|
2411 |
msgid "Free with tweet"
|
2412 |
msgstr ""
|
2413 |
|
2414 |
+
#: includes/admin/settings/class-sp-settings-modules.php:103
|
2415 |
msgid "Tweet"
|
2416 |
msgstr ""
|
2417 |
|
2418 |
+
#: includes/admin/settings/class-sp-settings-modules.php:116
|
2419 |
msgid "Current Theme"
|
2420 |
msgstr ""
|
2421 |
|
2422 |
+
#: includes/admin/settings/class-sp-settings-modules.php:124
|
2423 |
+
msgid "Need a better theme?"
|
2424 |
+
msgstr ""
|
2425 |
+
|
2426 |
+
#: includes/admin/settings/class-sp-settings-modules.php:125
|
2427 |
+
#: sportspress.php:142
|
2428 |
+
msgid "Upgrade"
|
2429 |
+
msgstr ""
|
2430 |
+
|
2431 |
+
#: includes/admin/settings/class-sp-settings-modules.php:142
|
2432 |
+
msgid "Free"
|
2433 |
msgstr ""
|
2434 |
|
2435 |
+
#: includes/admin/settings/class-sp-settings-modules.php:155
|
|
|
2436 |
msgid "Documentation"
|
2437 |
msgstr ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2438 |
|
2439 |
+
#: includes/admin/settings/class-sp-settings-modules.php:157
|
2440 |
msgid "Getting Started"
|
2441 |
msgstr ""
|
2442 |
|
2443 |
+
#: includes/admin/settings/class-sp-settings-modules.php:158
|
2444 |
+
msgid "Manuals"
|
2445 |
+
msgstr ""
|
2446 |
+
|
2447 |
+
#: includes/admin/settings/class-sp-settings-modules.php:159
|
2448 |
+
msgid "Videos"
|
2449 |
+
msgstr ""
|
2450 |
+
|
2451 |
+
#: includes/admin/settings/class-sp-settings-modules.php:161
|
2452 |
#: includes/admin/views/html-notice-theme-support.php:9
|
2453 |
msgid "Theme Integration Guide"
|
2454 |
msgstr ""
|
2455 |
|
2456 |
+
#: includes/admin/settings/class-sp-settings-modules.php:166
|
2457 |
msgid "Help"
|
2458 |
msgstr ""
|
2459 |
|
2460 |
+
#: includes/admin/settings/class-sp-settings-modules.php:168
|
2461 |
msgid "Support Forums"
|
2462 |
msgstr ""
|
2463 |
|
2464 |
+
#: includes/admin/settings/class-sp-settings-modules.php:169
|
2465 |
msgid "Feature Requests"
|
2466 |
msgstr ""
|
2467 |
|
2468 |
+
#: includes/admin/settings/class-sp-settings-modules.php:174
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2469 |
msgid "Connect"
|
2470 |
msgstr ""
|
2471 |
|
2472 |
+
#: includes/admin/settings/class-sp-settings-modules.php:176
|
2473 |
+
#: includes/class-sp-modules.php:119
|
2474 |
msgid "Twitter"
|
2475 |
msgstr ""
|
2476 |
|
2477 |
+
#: includes/admin/settings/class-sp-settings-modules.php:177
|
2478 |
msgid "Facebook"
|
2479 |
msgstr ""
|
2480 |
|
2481 |
+
#: includes/admin/settings/class-sp-settings-modules.php:178
|
2482 |
msgid "YouTube"
|
2483 |
msgstr ""
|
2484 |
|
2485 |
+
#: includes/admin/settings/class-sp-settings-modules.php:179
|
2486 |
msgid "Google+"
|
2487 |
msgstr ""
|
2488 |
|
2489 |
+
#: includes/admin/settings/class-sp-settings-modules.php:185
|
2490 |
+
#: includes/admin/settings/class-sp-settings-modules.php:187
|
2491 |
+
msgid "Premium Support"
|
2492 |
+
msgstr ""
|
2493 |
+
|
2494 |
+
#: includes/admin/settings/class-sp-settings-modules.php:187
|
2495 |
+
#: includes/admin/settings/class-sp-settings-modules.php:231
|
2496 |
+
msgid "Upgrade to Pro"
|
2497 |
+
msgstr ""
|
2498 |
+
|
2499 |
+
#: includes/admin/settings/class-sp-settings-modules.php:239
|
2500 |
+
#: includes/admin/settings/class-sp-settings-modules.php:244
|
2501 |
msgid "Learn more"
|
2502 |
msgstr ""
|
2503 |
|
2509 |
msgid "Link players"
|
2510 |
msgstr ""
|
2511 |
|
2512 |
+
#: includes/admin/settings/class-sp-settings-players.php:130
|
2513 |
+
#: includes/admin/settings/class-sp-settings-staff.php:97
|
2514 |
+
#: modules/sportspress-player-lists.php:218
|
|
|
|
|
|
|
|
|
|
|
2515 |
msgid "Display national flags"
|
2516 |
msgstr ""
|
2517 |
|
2726 |
msgid "is available"
|
2727 |
msgstr ""
|
2728 |
|
|
|
|
|
|
|
|
|
|
|
2729 |
#: includes/admin/settings/class-sp-settings-status.php:237
|
2730 |
#: includes/admin/views/html-admin-page-status.php:201
|
2731 |
msgid "version"
|
2739 |
#: includes/admin/settings/class-sp-settings-status.php:263
|
2740 |
#: includes/admin/views/html-admin-config.php:19
|
2741 |
#: includes/admin/views/html-admin-page-status.php:227
|
2742 |
+
#: includes/class-sp-post-types.php:233 modules/sportspress-tutorials.php:92
|
2743 |
msgid "Event Outcomes"
|
2744 |
msgstr ""
|
2745 |
|
2746 |
#: includes/admin/settings/class-sp-settings-status.php:283
|
2747 |
+
#: includes/admin/views/html-admin-config.php:151
|
2748 |
#: includes/admin/views/html-admin-page-status.php:247
|
2749 |
+
#: includes/class-sp-post-types.php:323 includes/class-sp-post-types.php:324
|
2750 |
msgid "Player Performance"
|
2751 |
msgstr ""
|
2752 |
|
2753 |
#: includes/admin/settings/class-sp-settings-status.php:293
|
2754 |
+
#: includes/admin/views/html-admin-config.php:237
|
2755 |
#: includes/admin/views/html-admin-page-status.php:257
|
2756 |
+
#: includes/class-sp-post-types.php:263
|
2757 |
+
#: modules/sportspress-league-tables.php:126
|
2758 |
+
#: modules/sportspress-league-tables.php:254
|
2759 |
msgid "Table Columns"
|
2760 |
msgstr ""
|
2761 |
|
2762 |
#: includes/admin/settings/class-sp-settings-status.php:305
|
2763 |
+
#: includes/admin/views/html-admin-config.php:291
|
2764 |
#: includes/admin/views/html-admin-page-status.php:267
|
2765 |
+
#: includes/class-sp-post-types.php:293 modules/sportspress-tutorials.php:104
|
2766 |
msgid "Player Metrics"
|
2767 |
msgstr ""
|
2768 |
|
2769 |
#: includes/admin/settings/class-sp-settings-status.php:315
|
2770 |
+
#: includes/admin/views/html-admin-config.php:340
|
2771 |
#: includes/admin/views/html-admin-page-status.php:277
|
2772 |
+
#: includes/class-sp-post-types.php:353
|
2773 |
msgid "Player Statistics"
|
2774 |
msgstr ""
|
2775 |
|
2803 |
msgid "Author URL"
|
2804 |
msgstr ""
|
2805 |
|
2806 |
+
#: includes/admin/settings/class-sp-settings-status.php:464
|
2807 |
+
#: includes/admin/views/html-admin-page-status.php:426
|
2808 |
+
msgid "Templates"
|
2809 |
+
msgstr ""
|
2810 |
+
|
2811 |
#: includes/admin/settings/class-sp-settings-status.php:499
|
2812 |
#: includes/admin/views/html-admin-page-status.php:459
|
2813 |
#, php-format
|
2852 |
msgid "Variables"
|
2853 |
msgstr ""
|
2854 |
|
2855 |
+
#: includes/admin/views/html-admin-config.php:101
|
2856 |
+
#: includes/admin/views/html-admin-config.php:179
|
2857 |
#, php-format
|
2858 |
msgid "Default (%s)"
|
2859 |
msgstr ""
|
2860 |
|
2861 |
+
#: includes/admin/views/html-admin-config.php:238
|
2862 |
msgid "Used for league tables."
|
2863 |
msgstr ""
|
2864 |
|
2865 |
+
#: includes/admin/views/html-admin-config.php:292
|
2866 |
+
#: includes/admin/views/html-admin-config.php:341
|
2867 |
msgid "Used for player lists."
|
2868 |
msgstr ""
|
2869 |
|
2894 |
"SportsPress theme :)"
|
2895 |
msgstr ""
|
2896 |
|
2897 |
+
#: includes/api/class-sp-rest-teams-controller.php:113
|
2898 |
+
#: includes/api/class-sp-rest-teams-controller.php:134
|
2899 |
+
#: includes/api/class-sp-rest-teams-controller.php:155
|
2900 |
+
#: includes/api/class-sp-rest-teams-controller.php:175
|
2901 |
+
msgid "message"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2902 |
msgstr ""
|
2903 |
|
2904 |
#: includes/class-sp-ajax.php:74
|
2910 |
#: includes/class-sp-ajax.php:80
|
2911 |
#: includes/widgets/class-sp-widget-countdown.php:110
|
2912 |
#: modules/sportspress-calendars.php:273
|
|
|
2913 |
msgid "Display competition"
|
2914 |
msgstr ""
|
2915 |
+
|
2916 |
+
#: includes/class-sp-ajax.php:85 includes/class-sp-ajax.php:115
|
2917 |
+
#: includes/class-sp-ajax.php:145 includes/class-sp-ajax.php:175
|
2918 |
+
#: includes/class-sp-ajax.php:224 includes/class-sp-ajax.php:322
|
2919 |
+
#: includes/class-sp-ajax.php:403 includes/class-sp-ajax.php:476
|
2920 |
+
#: includes/class-sp-ajax.php:506 includes/class-sp-ajax.php:536
|
2921 |
+
#: includes/class-sp-ajax.php:633 includes/class-sp-ajax.php:711
|
2922 |
+
msgid "Insert Shortcode"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2923 |
msgstr ""
|
2924 |
|
2925 |
+
#: includes/class-sp-ajax.php:206 includes/class-sp-ajax.php:260
|
2926 |
+
#: includes/class-sp-ajax.php:358
|
2927 |
+
#: includes/widgets/class-sp-widget-event-blocks.php:104
|
2928 |
+
#: includes/widgets/class-sp-widget-event-calendar.php:92
|
2929 |
+
#: includes/widgets/class-sp-widget-event-list.php:107
|
2930 |
msgid "Status:"
|
2931 |
msgstr ""
|
2932 |
|
2933 |
+
#: includes/class-sp-ajax.php:218 includes/class-sp-ajax.php:317
|
2934 |
+
#: includes/class-sp-ajax.php:398
|
2935 |
+
#: includes/widgets/class-sp-widget-event-blocks.php:148
|
2936 |
+
#: includes/widgets/class-sp-widget-event-calendar.php:126
|
2937 |
+
#: includes/widgets/class-sp-widget-event-list.php:168
|
2938 |
msgid "Display link to view all events"
|
2939 |
msgstr ""
|
2940 |
|
2941 |
+
#: includes/class-sp-ajax.php:241 includes/class-sp-ajax.php:339
|
2942 |
+
#: includes/class-sp-ajax.php:420 includes/class-sp-ajax.php:553
|
2943 |
+
#: includes/class-sp-ajax.php:650
|
2944 |
+
#: includes/widgets/class-sp-widget-birthdays.php:55
|
2945 |
+
#: includes/widgets/class-sp-widget-countdown.php:63
|
2946 |
+
#: includes/widgets/class-sp-widget-event-blocks.php:81
|
2947 |
+
#: includes/widgets/class-sp-widget-event-calendar.php:72
|
2948 |
+
#: includes/widgets/class-sp-widget-event-list.php:84
|
2949 |
+
#: includes/widgets/class-sp-widget-league-table.php:73
|
2950 |
+
#: includes/widgets/class-sp-widget-player-gallery.php:78
|
2951 |
+
#: includes/widgets/class-sp-widget-player-list.php:78
|
2952 |
+
#: includes/widgets/class-sp-widget-staff.php:54
|
2953 |
+
msgid "Title:"
|
2954 |
+
msgstr ""
|
2955 |
+
|
2956 |
+
#: includes/class-sp-ajax.php:272 includes/class-sp-ajax.php:370
|
2957 |
+
#: includes/widgets/class-sp-widget-event-blocks.php:118
|
2958 |
+
#: includes/widgets/class-sp-widget-event-calendar.php:106
|
2959 |
+
#: includes/widgets/class-sp-widget-event-list.php:121
|
2960 |
msgid "Date:"
|
2961 |
msgstr ""
|
2962 |
|
2963 |
+
#: includes/class-sp-ajax.php:276 includes/class-sp-ajax.php:374
|
2964 |
+
#: includes/sp-core-functions.php:537
|
2965 |
msgid "This week"
|
2966 |
msgstr ""
|
2967 |
|
2968 |
+
#: includes/class-sp-ajax.php:277 includes/class-sp-ajax.php:375
|
2969 |
+
#: includes/sp-core-functions.php:538
|
2970 |
+
#: includes/widgets/class-sp-widget-birthdays.php:48
|
2971 |
msgid "Today"
|
2972 |
msgstr ""
|
2973 |
|
2974 |
+
#: includes/class-sp-ajax.php:283 includes/class-sp-ajax.php:381
|
2975 |
+
#: includes/widgets/class-sp-widget-event-blocks.php:137
|
2976 |
+
#: includes/widgets/class-sp-widget-event-list.php:140
|
2977 |
msgid "Number of events to show:"
|
2978 |
msgstr ""
|
2979 |
|
2980 |
+
#: includes/class-sp-ajax.php:289 includes/class-sp-ajax.php:387
|
2981 |
+
#: includes/class-sp-ajax.php:617 includes/class-sp-ajax.php:695
|
2982 |
+
#: includes/widgets/class-sp-widget-event-blocks.php:140
|
2983 |
+
#: includes/widgets/class-sp-widget-event-list.php:143
|
2984 |
+
#: includes/widgets/class-sp-widget-player-gallery.php:131
|
2985 |
+
#: includes/widgets/class-sp-widget-player-list.php:156
|
2986 |
msgid "Sort Order:"
|
2987 |
msgstr ""
|
2988 |
|
2989 |
+
#: includes/class-sp-ajax.php:298 includes/class-sp-ajax.php:444
|
2990 |
+
#: includes/class-sp-ajax.php:577
|
2991 |
+
#: includes/widgets/class-sp-widget-event-list.php:151
|
2992 |
+
#: includes/widgets/class-sp-widget-league-table.php:100
|
2993 |
+
#: includes/widgets/class-sp-widget-player-gallery.php:103
|
2994 |
msgid "Columns:"
|
2995 |
msgstr ""
|
2996 |
|
2997 |
+
#: includes/class-sp-ajax.php:439
|
2998 |
+
#: includes/widgets/class-sp-widget-league-table.php:96
|
2999 |
msgid "Number of teams to show:"
|
3000 |
msgstr ""
|
3001 |
|
3002 |
+
#: includes/class-sp-ajax.php:465
|
3003 |
+
#: includes/widgets/class-sp-widget-league-table.php:120
|
3004 |
#: modules/sportspress-calendars.php:204 modules/sportspress-countdowns.php:86
|
3005 |
+
#: modules/sportspress-league-tables.php:203
|
3006 |
msgid "Display logos"
|
3007 |
msgstr ""
|
3008 |
|
3009 |
+
#: includes/class-sp-ajax.php:471
|
3010 |
+
#: includes/widgets/class-sp-widget-league-table.php:123
|
3011 |
msgid "Display link to view full table"
|
3012 |
msgstr ""
|
3013 |
|
3014 |
+
#: includes/class-sp-ajax.php:572 includes/class-sp-ajax.php:669
|
3015 |
+
#: includes/widgets/class-sp-widget-player-gallery.php:100
|
3016 |
+
#: includes/widgets/class-sp-widget-player-list.php:100
|
3017 |
msgid "Number of players to show:"
|
3018 |
msgstr ""
|
3019 |
|
3020 |
+
#: includes/class-sp-ajax.php:597 includes/class-sp-ajax.php:675
|
3021 |
+
#: includes/widgets/class-sp-widget-player-gallery.php:106
|
3022 |
+
#: includes/widgets/class-sp-widget-player-list.php:134
|
3023 |
msgid "Sort by:"
|
3024 |
msgstr ""
|
3025 |
|
3026 |
+
#: includes/class-sp-ajax.php:628 includes/class-sp-ajax.php:706
|
3027 |
+
#: includes/widgets/class-sp-widget-player-gallery.php:138
|
3028 |
+
#: includes/widgets/class-sp-widget-player-list.php:163
|
3029 |
msgid "Display link to view all players"
|
3030 |
msgstr ""
|
3031 |
|
|
|
|
|
|
|
|
|
|
|
3032 |
#: includes/class-sp-countries.php:32
|
3033 |
msgid "Africa"
|
3034 |
msgstr ""
|
3045 |
msgid "North America"
|
3046 |
msgstr ""
|
3047 |
|
3048 |
+
#: includes/class-sp-countries.php:229
|
3049 |
msgid "Oceania"
|
3050 |
msgstr ""
|
3051 |
|
3052 |
+
#: includes/class-sp-countries.php:252
|
3053 |
msgid "South America"
|
3054 |
msgstr ""
|
3055 |
|
3056 |
+
#: includes/class-sp-countries.php:270
|
3057 |
msgid "Afghanistan"
|
3058 |
msgstr ""
|
3059 |
|
3060 |
+
#: includes/class-sp-countries.php:271
|
3061 |
msgid "Anguilla"
|
3062 |
msgstr ""
|
3063 |
|
3064 |
+
#: includes/class-sp-countries.php:272
|
3065 |
msgid "Albania"
|
3066 |
msgstr ""
|
3067 |
|
3068 |
+
#: includes/class-sp-countries.php:273
|
3069 |
msgid "Algeria"
|
3070 |
msgstr ""
|
3071 |
|
3072 |
+
#: includes/class-sp-countries.php:274
|
3073 |
msgid "Andorra"
|
3074 |
msgstr ""
|
3075 |
|
3076 |
+
#: includes/class-sp-countries.php:275
|
3077 |
msgid "Angola"
|
3078 |
msgstr ""
|
3079 |
|
3080 |
+
#: includes/class-sp-countries.php:276
|
3081 |
msgid "Argentina"
|
3082 |
msgstr ""
|
3083 |
|
3084 |
+
#: includes/class-sp-countries.php:277
|
3085 |
msgid "Armenia"
|
3086 |
msgstr ""
|
3087 |
|
3088 |
+
#: includes/class-sp-countries.php:278
|
3089 |
msgid "Aruba"
|
3090 |
msgstr ""
|
3091 |
|
3092 |
+
#: includes/class-sp-countries.php:279
|
3093 |
msgid "American Samoa"
|
3094 |
msgstr ""
|
3095 |
|
3096 |
+
#: includes/class-sp-countries.php:280
|
3097 |
msgid "Antigua and Barbuda"
|
3098 |
msgstr ""
|
3099 |
|
3100 |
+
#: includes/class-sp-countries.php:281
|
3101 |
msgid "Australia"
|
3102 |
msgstr ""
|
3103 |
|
3104 |
+
#: includes/class-sp-countries.php:282
|
3105 |
msgid "Austria"
|
3106 |
msgstr ""
|
3107 |
|
3108 |
+
#: includes/class-sp-countries.php:283
|
3109 |
msgid "Azerbaijan"
|
3110 |
msgstr ""
|
3111 |
|
3112 |
+
#: includes/class-sp-countries.php:284
|
3113 |
msgid "Bahamas"
|
3114 |
msgstr ""
|
3115 |
|
3116 |
+
#: includes/class-sp-countries.php:285
|
3117 |
msgid "Bangladesh"
|
3118 |
msgstr ""
|
3119 |
|
3120 |
+
#: includes/class-sp-countries.php:286
|
3121 |
msgid "Burundi"
|
3122 |
msgstr ""
|
3123 |
|
3124 |
+
#: includes/class-sp-countries.php:287
|
3125 |
msgid "Belgium"
|
3126 |
msgstr ""
|
3127 |
|
3128 |
+
#: includes/class-sp-countries.php:288
|
3129 |
msgid "Benin"
|
3130 |
msgstr ""
|
3131 |
|
3132 |
+
#: includes/class-sp-countries.php:289
|
3133 |
msgid "Bermuda"
|
3134 |
msgstr ""
|
3135 |
|
3136 |
+
#: includes/class-sp-countries.php:290
|
3137 |
msgid "Burkina Faso"
|
3138 |
msgstr ""
|
3139 |
|
3140 |
+
#: includes/class-sp-countries.php:291
|
3141 |
msgid "Bahrain"
|
3142 |
msgstr ""
|
3143 |
|
3144 |
+
#: includes/class-sp-countries.php:292
|
3145 |
msgid "Bhutan"
|
3146 |
msgstr ""
|
3147 |
|
3148 |
+
#: includes/class-sp-countries.php:293
|
3149 |
msgid "Bosnia and Herzegovina"
|
3150 |
msgstr ""
|
3151 |
|
3152 |
+
#: includes/class-sp-countries.php:294
|
3153 |
msgid "Belarus"
|
3154 |
msgstr ""
|
3155 |
|
3156 |
+
#: includes/class-sp-countries.php:295
|
3157 |
msgid "Belize"
|
3158 |
msgstr ""
|
3159 |
|
3160 |
+
#: includes/class-sp-countries.php:296
|
3161 |
msgid "Bolivia"
|
3162 |
msgstr ""
|
3163 |
|
3164 |
+
#: includes/class-sp-countries.php:297
|
3165 |
msgid "Botswana"
|
3166 |
msgstr ""
|
3167 |
|
3168 |
+
#: includes/class-sp-countries.php:298
|
3169 |
msgid "Brazil"
|
3170 |
msgstr ""
|
3171 |
|
3172 |
+
#: includes/class-sp-countries.php:299
|
3173 |
msgid "Barbados"
|
3174 |
msgstr ""
|
3175 |
|
3176 |
+
#: includes/class-sp-countries.php:300
|
3177 |
msgid "Brunei"
|
3178 |
msgstr ""
|
3179 |
|
3180 |
+
#: includes/class-sp-countries.php:301
|
3181 |
msgid "Bulgaria"
|
3182 |
msgstr ""
|
3183 |
|
3184 |
+
#: includes/class-sp-countries.php:302
|
3185 |
msgid "Cambodia"
|
3186 |
msgstr ""
|
3187 |
|
3188 |
+
#: includes/class-sp-countries.php:303
|
3189 |
msgid "Canada"
|
3190 |
msgstr ""
|
3191 |
|
3192 |
+
#: includes/class-sp-countries.php:304
|
3193 |
msgid "Cayman Islands"
|
3194 |
msgstr ""
|
3195 |
|
3196 |
+
#: includes/class-sp-countries.php:305
|
3197 |
msgid "Republic of the Congo"
|
3198 |
msgstr ""
|
3199 |
|
3200 |
+
#: includes/class-sp-countries.php:306
|
3201 |
msgid "Chad"
|
3202 |
msgstr ""
|
3203 |
|
3204 |
+
#: includes/class-sp-countries.php:307
|
3205 |
msgid "Chile"
|
3206 |
msgstr ""
|
3207 |
|
3208 |
+
#: includes/class-sp-countries.php:308
|
3209 |
msgid "China"
|
3210 |
msgstr ""
|
3211 |
|
3212 |
+
#: includes/class-sp-countries.php:309
|
3213 |
msgid "Ivory Coast"
|
3214 |
msgstr ""
|
3215 |
|
3216 |
+
#: includes/class-sp-countries.php:310
|
3217 |
msgid "Cameroon"
|
3218 |
msgstr ""
|
3219 |
|
3220 |
+
#: includes/class-sp-countries.php:311
|
3221 |
msgid "Democratic Republic of the Congo"
|
3222 |
msgstr ""
|
3223 |
|
3224 |
+
#: includes/class-sp-countries.php:312
|
3225 |
msgid "Cook Islands"
|
3226 |
msgstr ""
|
3227 |
|
3228 |
+
#: includes/class-sp-countries.php:313
|
3229 |
msgid "Colombia"
|
3230 |
msgstr ""
|
3231 |
|
3232 |
+
#: includes/class-sp-countries.php:314
|
3233 |
msgid "Comoros"
|
3234 |
msgstr ""
|
3235 |
|
3236 |
+
#: includes/class-sp-countries.php:315
|
3237 |
msgid "Cape Verde"
|
3238 |
msgstr ""
|
3239 |
|
3240 |
+
#: includes/class-sp-countries.php:316
|
3241 |
msgid "Costa Rica"
|
3242 |
msgstr ""
|
3243 |
|
3244 |
+
#: includes/class-sp-countries.php:317
|
3245 |
msgid "Croatia"
|
3246 |
msgstr ""
|
3247 |
|
3248 |
+
#: includes/class-sp-countries.php:318
|
3249 |
msgid "Central African Republic"
|
3250 |
msgstr ""
|
3251 |
|
3252 |
+
#: includes/class-sp-countries.php:319
|
3253 |
msgid "Cuba"
|
3254 |
msgstr ""
|
3255 |
|
3256 |
+
#: includes/class-sp-countries.php:320
|
3257 |
msgid "Curacao"
|
3258 |
msgstr ""
|
3259 |
|
3260 |
+
#: includes/class-sp-countries.php:321
|
3261 |
msgid "Cyprus"
|
3262 |
msgstr ""
|
3263 |
|
3264 |
+
#: includes/class-sp-countries.php:322
|
3265 |
msgid "Czech Republic"
|
3266 |
msgstr ""
|
3267 |
|
3268 |
+
#: includes/class-sp-countries.php:323
|
3269 |
msgid "Denmark"
|
3270 |
msgstr ""
|
3271 |
|
3272 |
+
#: includes/class-sp-countries.php:324
|
3273 |
msgid "Djibouti"
|
3274 |
msgstr ""
|
3275 |
|
3276 |
+
#: includes/class-sp-countries.php:325
|
3277 |
msgid "Dominica"
|
3278 |
msgstr ""
|
3279 |
|
3280 |
+
#: includes/class-sp-countries.php:326
|
3281 |
msgid "Dominican Republic"
|
3282 |
msgstr ""
|
3283 |
|
3284 |
+
#: includes/class-sp-countries.php:327
|
3285 |
msgid "Ecuador"
|
3286 |
msgstr ""
|
3287 |
|
3288 |
+
#: includes/class-sp-countries.php:328
|
3289 |
msgid "Egypt"
|
3290 |
msgstr ""
|
3291 |
|
3292 |
+
#: includes/class-sp-countries.php:329
|
3293 |
msgid "England"
|
3294 |
msgstr ""
|
3295 |
|
3296 |
+
#: includes/class-sp-countries.php:330
|
3297 |
msgid "Equatorial Guinea"
|
3298 |
msgstr ""
|
3299 |
|
3300 |
+
#: includes/class-sp-countries.php:331
|
3301 |
msgid "Eritrea"
|
3302 |
msgstr ""
|
3303 |
|
3304 |
+
#: includes/class-sp-countries.php:332
|
3305 |
msgid "Western Sahara"
|
3306 |
msgstr ""
|
3307 |
|
3308 |
+
#: includes/class-sp-countries.php:333
|
3309 |
msgid "Spain"
|
3310 |
msgstr ""
|
3311 |
|
3312 |
+
#: includes/class-sp-countries.php:334
|
3313 |
msgid "Estonia"
|
3314 |
msgstr ""
|
3315 |
|
3316 |
+
#: includes/class-sp-countries.php:335
|
3317 |
msgid "Ethiopia"
|
3318 |
msgstr ""
|
3319 |
|
3320 |
+
#: includes/class-sp-countries.php:336
|
3321 |
msgid "Fiji"
|
3322 |
msgstr ""
|
3323 |
|
3324 |
+
#: includes/class-sp-countries.php:337
|
3325 |
msgid "Finland"
|
3326 |
msgstr ""
|
3327 |
|
3328 |
+
#: includes/class-sp-countries.php:338
|
3329 |
msgid "France"
|
3330 |
msgstr ""
|
3331 |
|
3332 |
+
#: includes/class-sp-countries.php:339
|
3333 |
msgid "Faroe Islands"
|
3334 |
msgstr ""
|
3335 |
|
3336 |
+
#: includes/class-sp-countries.php:340
|
3337 |
msgid "Micronesia"
|
3338 |
msgstr ""
|
3339 |
|
3340 |
+
#: includes/class-sp-countries.php:341
|
3341 |
msgid "Gabon"
|
3342 |
msgstr ""
|
3343 |
|
3344 |
+
#: includes/class-sp-countries.php:342
|
3345 |
msgid "Gambia"
|
3346 |
msgstr ""
|
3347 |
|
3348 |
+
#: includes/class-sp-countries.php:343
|
3349 |
msgid "United Kingdom"
|
3350 |
msgstr ""
|
3351 |
|
3352 |
+
#: includes/class-sp-countries.php:344
|
3353 |
msgid "Georgia"
|
3354 |
msgstr ""
|
3355 |
|
3356 |
+
#: includes/class-sp-countries.php:345
|
3357 |
msgid "Germany"
|
3358 |
msgstr ""
|
3359 |
|
3360 |
+
#: includes/class-sp-countries.php:346
|
3361 |
msgid "Ghana"
|
3362 |
msgstr ""
|
3363 |
|
3364 |
+
#: includes/class-sp-countries.php:347
|
3365 |
msgid "Guinea-Bissau"
|
3366 |
msgstr ""
|
3367 |
|
3368 |
+
#: includes/class-sp-countries.php:348
|
3369 |
msgid "Greece"
|
3370 |
msgstr ""
|
3371 |
|
3372 |
+
#: includes/class-sp-countries.php:349
|
3373 |
msgid "Grenada"
|
3374 |
msgstr ""
|
3375 |
|
3376 |
+
#: includes/class-sp-countries.php:350
|
3377 |
msgid "Guatemala"
|
3378 |
msgstr ""
|
3379 |
|
3380 |
+
#: includes/class-sp-countries.php:351
|
3381 |
msgid "Guinea"
|
3382 |
msgstr ""
|
3383 |
|
3384 |
+
#: includes/class-sp-countries.php:352
|
3385 |
msgid "Guam"
|
3386 |
msgstr ""
|
3387 |
|
3388 |
+
#: includes/class-sp-countries.php:353
|
3389 |
msgid "Guyana"
|
3390 |
msgstr ""
|
3391 |
|
3392 |
+
#: includes/class-sp-countries.php:354
|
3393 |
msgid "Haiti"
|
3394 |
msgstr ""
|
3395 |
|
3396 |
+
#: includes/class-sp-countries.php:355
|
3397 |
msgid "Hong Kong"
|
3398 |
msgstr ""
|
3399 |
|
3400 |
+
#: includes/class-sp-countries.php:356
|
3401 |
msgid "Honduras"
|
3402 |
msgstr ""
|
3403 |
|
3404 |
+
#: includes/class-sp-countries.php:357
|
3405 |
msgid "Hungary"
|
3406 |
msgstr ""
|
3407 |
|
3408 |
+
#: includes/class-sp-countries.php:358
|
3409 |
msgid "Indonesia"
|
3410 |
msgstr ""
|
3411 |
|
3412 |
+
#: includes/class-sp-countries.php:359
|
3413 |
msgid "India"
|
3414 |
msgstr ""
|
3415 |
|
3416 |
+
#: includes/class-sp-countries.php:360
|
3417 |
msgid "Ireland"
|
3418 |
msgstr ""
|
3419 |
|
3420 |
+
#: includes/class-sp-countries.php:361
|
3421 |
msgid "Iran"
|
3422 |
msgstr ""
|
3423 |
|
3424 |
+
#: includes/class-sp-countries.php:362
|
3425 |
msgid "Iraq"
|
3426 |
msgstr ""
|
3427 |
|
3428 |
+
#: includes/class-sp-countries.php:363
|
3429 |
msgid "Iceland"
|
3430 |
msgstr ""
|
3431 |
|
3432 |
+
#: includes/class-sp-countries.php:364
|
3433 |
msgid "Israel"
|
3434 |
msgstr ""
|
3435 |
|
3436 |
+
#: includes/class-sp-countries.php:365
|
3437 |
msgid "Italy"
|
3438 |
msgstr ""
|
3439 |
|
3440 |
+
#: includes/class-sp-countries.php:366
|
3441 |
msgid "Jamaica"
|
3442 |
msgstr ""
|
3443 |
|
3444 |
+
#: includes/class-sp-countries.php:367
|
3445 |
msgid "Jordan"
|
3446 |
msgstr ""
|
3447 |
|
3448 |
+
#: includes/class-sp-countries.php:368
|
3449 |
msgid "Japan"
|
3450 |
msgstr ""
|
3451 |
|
3452 |
+
#: includes/class-sp-countries.php:369
|
3453 |
msgid "Kazakhstan"
|
3454 |
msgstr ""
|
3455 |
|
3456 |
+
#: includes/class-sp-countries.php:370
|
3457 |
msgid "Kenya"
|
3458 |
msgstr ""
|
3459 |
|
3460 |
+
#: includes/class-sp-countries.php:371
|
3461 |
msgid "Kosovo"
|
3462 |
msgstr ""
|
3463 |
|
3464 |
+
#: includes/class-sp-countries.php:372
|
3465 |
msgid "Kyrgyzstan"
|
3466 |
msgstr ""
|
3467 |
|
3468 |
+
#: includes/class-sp-countries.php:373
|
3469 |
msgid "Kiribati"
|
3470 |
msgstr ""
|
3471 |
|
3472 |
+
#: includes/class-sp-countries.php:374
|
3473 |
msgid "South Korea"
|
3474 |
msgstr ""
|
3475 |
|
3476 |
+
#: includes/class-sp-countries.php:375
|
3477 |
msgid "Saudi Arabia"
|
3478 |
msgstr ""
|
3479 |
|
3480 |
+
#: includes/class-sp-countries.php:376
|
3481 |
msgid "Kuwait"
|
3482 |
msgstr ""
|
3483 |
|
3484 |
+
#: includes/class-sp-countries.php:377
|
3485 |
msgid "Laos"
|
3486 |
msgstr ""
|
3487 |
|
3488 |
+
#: includes/class-sp-countries.php:378
|
3489 |
msgid "Liberia"
|
3490 |
msgstr ""
|
3491 |
|
3492 |
+
#: includes/class-sp-countries.php:379
|
3493 |
msgid "Libya"
|
3494 |
msgstr ""
|
3495 |
|
3496 |
+
#: includes/class-sp-countries.php:380
|
3497 |
msgid "Saint Lucia"
|
3498 |
msgstr ""
|
3499 |
|
3500 |
+
#: includes/class-sp-countries.php:381
|
3501 |
msgid "Lesotho"
|
3502 |
msgstr ""
|
3503 |
|
3504 |
+
#: includes/class-sp-countries.php:382
|
3505 |
msgid "Lebanon"
|
3506 |
msgstr ""
|
3507 |
|
3508 |
+
#: includes/class-sp-countries.php:383
|
3509 |
msgid "Liechtenstein"
|
3510 |
msgstr ""
|
3511 |
|
3512 |
+
#: includes/class-sp-countries.php:384
|
3513 |
msgid "Lithuania"
|
3514 |
msgstr ""
|
3515 |
|
3516 |
+
#: includes/class-sp-countries.php:385
|
3517 |
msgid "Luxembourg"
|
3518 |
msgstr ""
|
3519 |
|
3520 |
+
#: includes/class-sp-countries.php:386
|
3521 |
msgid "Latvia"
|
3522 |
msgstr ""
|
3523 |
|
3524 |
+
#: includes/class-sp-countries.php:387
|
3525 |
msgid "Macau"
|
3526 |
msgstr ""
|
3527 |
|
3528 |
+
#: includes/class-sp-countries.php:388
|
3529 |
msgid "Madagascar"
|
3530 |
msgstr ""
|
3531 |
|
3532 |
+
#: includes/class-sp-countries.php:389
|
3533 |
msgid "Morocco"
|
3534 |
msgstr ""
|
3535 |
|
3536 |
+
#: includes/class-sp-countries.php:390
|
3537 |
msgid "Malaysia"
|
3538 |
msgstr ""
|
3539 |
|
3540 |
+
#: includes/class-sp-countries.php:391
|
3541 |
msgid "Monaco"
|
3542 |
msgstr ""
|
3543 |
|
3544 |
+
#: includes/class-sp-countries.php:392
|
3545 |
msgid "Moldova"
|
3546 |
msgstr ""
|
3547 |
|
3548 |
+
#: includes/class-sp-countries.php:393
|
3549 |
msgid "Maldives"
|
3550 |
msgstr ""
|
3551 |
|
3552 |
+
#: includes/class-sp-countries.php:394
|
3553 |
msgid "Mexico"
|
3554 |
msgstr ""
|
3555 |
|
3556 |
+
#: includes/class-sp-countries.php:395
|
3557 |
msgid "Marshall Islands"
|
3558 |
msgstr ""
|
3559 |
|
3560 |
+
#: includes/class-sp-countries.php:396
|
3561 |
msgid "Macedonia"
|
3562 |
msgstr ""
|
3563 |
|
3564 |
+
#: includes/class-sp-countries.php:397
|
3565 |
msgid "Mali"
|
3566 |
msgstr ""
|
3567 |
|
3568 |
+
#: includes/class-sp-countries.php:398
|
3569 |
msgid "Malta"
|
3570 |
msgstr ""
|
3571 |
|
3572 |
+
#: includes/class-sp-countries.php:399
|
3573 |
msgid "Montenegro"
|
3574 |
msgstr ""
|
3575 |
|
3576 |
+
#: includes/class-sp-countries.php:400
|
3577 |
msgid "Mongolia"
|
3578 |
msgstr ""
|
3579 |
|
3580 |
+
#: includes/class-sp-countries.php:401
|
3581 |
msgid "Mozambique"
|
3582 |
msgstr ""
|
3583 |
|
3584 |
+
#: includes/class-sp-countries.php:402
|
3585 |
msgid "Mauritius"
|
3586 |
msgstr ""
|
3587 |
|
3588 |
+
#: includes/class-sp-countries.php:403
|
3589 |
msgid "Montserrat"
|
3590 |
msgstr ""
|
3591 |
|
3592 |
+
#: includes/class-sp-countries.php:404
|
3593 |
msgid "Mauritania"
|
3594 |
msgstr ""
|
3595 |
|
3596 |
+
#: includes/class-sp-countries.php:405
|
3597 |
msgid "Malawi"
|
3598 |
msgstr ""
|
3599 |
|
3600 |
+
#: includes/class-sp-countries.php:406
|
3601 |
msgid "Burma"
|
3602 |
msgstr ""
|
3603 |
|
3604 |
+
#: includes/class-sp-countries.php:407
|
3605 |
msgid "Namibia"
|
3606 |
msgstr ""
|
3607 |
|
3608 |
+
#: includes/class-sp-countries.php:408
|
3609 |
msgid "Nicaragua"
|
3610 |
msgstr ""
|
3611 |
|
3612 |
+
#: includes/class-sp-countries.php:409
|
3613 |
msgid "New Caledonia"
|
3614 |
msgstr ""
|
3615 |
|
3616 |
+
#: includes/class-sp-countries.php:410
|
3617 |
msgid "Netherlands"
|
3618 |
msgstr ""
|
3619 |
|
3620 |
+
#: includes/class-sp-countries.php:411
|
3621 |
msgid "Nepal"
|
3622 |
msgstr ""
|
3623 |
|
3624 |
+
#: includes/class-sp-countries.php:412
|
3625 |
msgid "Nigeria"
|
3626 |
msgstr ""
|
3627 |
|
3628 |
+
#: includes/class-sp-countries.php:413
|
3629 |
msgid "Niger"
|
3630 |
msgstr ""
|
3631 |
|
3632 |
+
#: includes/class-sp-countries.php:414
|
3633 |
msgid "Northern Ireland"
|
3634 |
msgstr ""
|
3635 |
|
3636 |
+
#: includes/class-sp-countries.php:415
|
3637 |
msgid "Norway"
|
3638 |
msgstr ""
|
3639 |
|
3640 |
+
#: includes/class-sp-countries.php:416
|
3641 |
msgid "Nauru"
|
3642 |
msgstr ""
|
3643 |
|
3644 |
+
#: includes/class-sp-countries.php:417
|
3645 |
msgid "New Zealand"
|
3646 |
msgstr ""
|
3647 |
|
3648 |
+
#: includes/class-sp-countries.php:418
|
3649 |
msgid "Oman"
|
3650 |
msgstr ""
|
3651 |
|
3652 |
+
#: includes/class-sp-countries.php:419
|
3653 |
msgid "Pakistan"
|
3654 |
msgstr ""
|
3655 |
|
3656 |
+
#: includes/class-sp-countries.php:420
|
3657 |
msgid "Panama"
|
3658 |
msgstr ""
|
3659 |
|
3660 |
+
#: includes/class-sp-countries.php:421
|
3661 |
msgid "Paraguay"
|
3662 |
msgstr ""
|
3663 |
|
3664 |
+
#: includes/class-sp-countries.php:422
|
3665 |
msgid "Peru"
|
3666 |
msgstr ""
|
3667 |
|
3668 |
+
#: includes/class-sp-countries.php:423
|
3669 |
msgid "Philippines"
|
3670 |
msgstr ""
|
3671 |
|
3672 |
+
#: includes/class-sp-countries.php:424
|
3673 |
msgid "Palestine"
|
3674 |
msgstr ""
|
3675 |
|
3676 |
+
#: includes/class-sp-countries.php:425
|
3677 |
msgid "Palau"
|
3678 |
msgstr ""
|
3679 |
|
3680 |
+
#: includes/class-sp-countries.php:426
|
3681 |
msgid "Papua New Guinea"
|
3682 |
msgstr ""
|
3683 |
|
3684 |
+
#: includes/class-sp-countries.php:427
|
3685 |
msgid "Poland"
|
3686 |
msgstr ""
|
3687 |
|
3688 |
+
#: includes/class-sp-countries.php:428
|
3689 |
msgid "Portugal"
|
3690 |
msgstr ""
|
3691 |
|
3692 |
+
#: includes/class-sp-countries.php:429
|
3693 |
msgid "North Korea"
|
3694 |
msgstr ""
|
3695 |
|
3696 |
+
#: includes/class-sp-countries.php:430
|
3697 |
msgid "Puerto Rico"
|
3698 |
msgstr ""
|
3699 |
|
3700 |
+
#: includes/class-sp-countries.php:431
|
3701 |
msgid "Qatar"
|
3702 |
msgstr ""
|
3703 |
|
3704 |
+
#: includes/class-sp-countries.php:432
|
3705 |
msgid "Romania"
|
3706 |
msgstr ""
|
3707 |
|
3708 |
+
#: includes/class-sp-countries.php:433
|
3709 |
msgid "South Africa"
|
3710 |
msgstr ""
|
3711 |
|
3712 |
+
#: includes/class-sp-countries.php:434
|
3713 |
msgid "Russia"
|
3714 |
msgstr ""
|
3715 |
|
3716 |
+
#: includes/class-sp-countries.php:435
|
3717 |
msgid "Rwanda"
|
3718 |
msgstr ""
|
3719 |
|
3720 |
+
#: includes/class-sp-countries.php:436
|
3721 |
msgid "Samoa"
|
3722 |
msgstr ""
|
3723 |
|
3724 |
+
#: includes/class-sp-countries.php:437
|
3725 |
msgid "Scotland"
|
3726 |
msgstr ""
|
3727 |
|
3728 |
+
#: includes/class-sp-countries.php:438
|
3729 |
msgid "Sudan"
|
3730 |
msgstr ""
|
3731 |
|
3732 |
+
#: includes/class-sp-countries.php:439
|
3733 |
msgid "Senegal"
|
3734 |
msgstr ""
|
3735 |
|
3736 |
+
#: includes/class-sp-countries.php:440
|
3737 |
msgid "Seychelles"
|
3738 |
msgstr ""
|
3739 |
|
3740 |
+
#: includes/class-sp-countries.php:441
|
3741 |
msgid "Singapore"
|
3742 |
msgstr ""
|
3743 |
|
3744 |
+
#: includes/class-sp-countries.php:442
|
3745 |
msgid "Saint Kitts and Nevis"
|
3746 |
msgstr ""
|
3747 |
|
3748 |
+
#: includes/class-sp-countries.php:443
|
3749 |
msgid "Sierra Leone"
|
3750 |
msgstr ""
|
3751 |
|
3752 |
+
#: includes/class-sp-countries.php:444
|
3753 |
msgid "El Salvador"
|
3754 |
msgstr ""
|
3755 |
|
3756 |
+
#: includes/class-sp-countries.php:445
|
3757 |
msgid "San Marino"
|
3758 |
msgstr ""
|
3759 |
|
3760 |
+
#: includes/class-sp-countries.php:446
|
3761 |
msgid "Solomon Islands"
|
3762 |
msgstr ""
|
3763 |
|
3764 |
+
#: includes/class-sp-countries.php:447
|
3765 |
msgid "Somalia"
|
3766 |
msgstr ""
|
3767 |
|
3768 |
+
#: includes/class-sp-countries.php:448
|
3769 |
msgid "Serbia"
|
3770 |
msgstr ""
|
3771 |
|
3772 |
+
#: includes/class-sp-countries.php:449
|
3773 |
msgid "Sri Lanka"
|
3774 |
msgstr ""
|
3775 |
|
3776 |
+
#: includes/class-sp-countries.php:450
|
3777 |
msgid "South Sudan"
|
3778 |
msgstr ""
|
3779 |
|
3780 |
+
#: includes/class-sp-countries.php:451
|
3781 |
msgid "Sao Tome and Principe"
|
3782 |
msgstr ""
|
3783 |
|
3784 |
+
#: includes/class-sp-countries.php:452
|
3785 |
msgid "Switzerland"
|
3786 |
msgstr ""
|
3787 |
|
3788 |
+
#: includes/class-sp-countries.php:453
|
3789 |
msgid "Suriname"
|
3790 |
msgstr ""
|
3791 |
|
3792 |
+
#: includes/class-sp-countries.php:454
|
3793 |
msgid "Slovakia"
|
3794 |
msgstr ""
|
3795 |
|
3796 |
+
#: includes/class-sp-countries.php:455
|
3797 |
msgid "Slovenia"
|
3798 |
msgstr ""
|
3799 |
|
3800 |
+
#: includes/class-sp-countries.php:456
|
3801 |
msgid "Sweden"
|
3802 |
msgstr ""
|
3803 |
|
3804 |
+
#: includes/class-sp-countries.php:457
|
3805 |
msgid "Swaziland"
|
3806 |
msgstr ""
|
3807 |
|
3808 |
+
#: includes/class-sp-countries.php:458
|
3809 |
msgid "Syria"
|
3810 |
msgstr ""
|
3811 |
|
3812 |
+
#: includes/class-sp-countries.php:459
|
3813 |
msgid "Tahiti"
|
3814 |
msgstr ""
|
3815 |
|
3816 |
+
#: includes/class-sp-countries.php:460
|
3817 |
msgid "Tanzania"
|
3818 |
msgstr ""
|
3819 |
|
3820 |
+
#: includes/class-sp-countries.php:461
|
3821 |
msgid "Turks and Caicos Islands"
|
3822 |
msgstr ""
|
3823 |
|
3824 |
+
#: includes/class-sp-countries.php:462
|
3825 |
msgid "Tonga"
|
3826 |
msgstr ""
|
3827 |
|
3828 |
+
#: includes/class-sp-countries.php:463
|
3829 |
msgid "Thailand"
|
3830 |
msgstr ""
|
3831 |
|
3832 |
+
#: includes/class-sp-countries.php:464
|
3833 |
msgid "Tajikistan"
|
3834 |
msgstr ""
|
3835 |
|
3836 |
+
#: includes/class-sp-countries.php:465
|
3837 |
msgid "Turkmenistan"
|
3838 |
msgstr ""
|
3839 |
|
3840 |
+
#: includes/class-sp-countries.php:466
|
3841 |
msgid "East Timor"
|
3842 |
msgstr ""
|
3843 |
|
3844 |
+
#: includes/class-sp-countries.php:467
|
3845 |
msgid "Togo"
|
3846 |
msgstr ""
|
3847 |
|
3848 |
+
#: includes/class-sp-countries.php:468
|
3849 |
msgid "Taiwan"
|
3850 |
msgstr ""
|
3851 |
|
3852 |
+
#: includes/class-sp-countries.php:469
|
3853 |
msgid "Trinidad and Tobago"
|
3854 |
msgstr ""
|
3855 |
|
3856 |
+
#: includes/class-sp-countries.php:470
|
3857 |
msgid "Tunisia"
|
3858 |
msgstr ""
|
3859 |
|
3860 |
+
#: includes/class-sp-countries.php:471
|
3861 |
msgid "Turkey"
|
3862 |
msgstr ""
|
3863 |
|
3864 |
+
#: includes/class-sp-countries.php:472
|
3865 |
msgid "Tuvalu"
|
3866 |
msgstr ""
|
3867 |
|
3868 |
+
#: includes/class-sp-countries.php:473
|
3869 |
msgid "United Arab Emirates"
|
3870 |
msgstr ""
|
3871 |
|
3872 |
+
#: includes/class-sp-countries.php:474
|
3873 |
msgid "Uganda"
|
3874 |
msgstr ""
|
3875 |
|
3876 |
+
#: includes/class-sp-countries.php:475
|
3877 |
msgid "Ukraine"
|
3878 |
msgstr ""
|
3879 |
|
3880 |
+
#: includes/class-sp-countries.php:476
|
3881 |
msgid "Uruguay"
|
3882 |
msgstr ""
|
3883 |
|
3884 |
+
#: includes/class-sp-countries.php:477
|
3885 |
msgid "United States"
|
3886 |
msgstr ""
|
3887 |
|
3888 |
+
#: includes/class-sp-countries.php:478
|
3889 |
msgid "Uzbekistan"
|
3890 |
msgstr ""
|
3891 |
|
3892 |
+
#: includes/class-sp-countries.php:479
|
3893 |
msgid "Vanuatu"
|
3894 |
msgstr ""
|
3895 |
|
3896 |
+
#: includes/class-sp-countries.php:480
|
3897 |
msgid "Vatican City"
|
3898 |
msgstr ""
|
3899 |
|
3900 |
+
#: includes/class-sp-countries.php:481
|
3901 |
msgid "Venezuela"
|
3902 |
msgstr ""
|
3903 |
|
3904 |
+
#: includes/class-sp-countries.php:482
|
3905 |
msgid "British Virgin Islands"
|
3906 |
msgstr ""
|
3907 |
|
3908 |
+
#: includes/class-sp-countries.php:483
|
3909 |
msgid "Vietnam"
|
3910 |
msgstr ""
|
3911 |
|
3912 |
+
#: includes/class-sp-countries.php:484
|
3913 |
msgid "Saint Vincent and the Grenadines"
|
3914 |
msgstr ""
|
3915 |
|
3916 |
+
#: includes/class-sp-countries.php:485
|
3917 |
msgid "US Virgin Islands"
|
3918 |
msgstr ""
|
3919 |
|
3920 |
+
#: includes/class-sp-countries.php:486
|
3921 |
msgid "Wales"
|
3922 |
msgstr ""
|
3923 |
|
3924 |
+
#: includes/class-sp-countries.php:487
|
3925 |
+
msgid "West Indies"
|
3926 |
+
msgstr ""
|
3927 |
+
|
3928 |
+
#: includes/class-sp-countries.php:488
|
3929 |
msgid "Yemen"
|
3930 |
msgstr ""
|
3931 |
|
3932 |
+
#: includes/class-sp-countries.php:489
|
3933 |
msgid "Zambia"
|
3934 |
msgstr ""
|
3935 |
|
3936 |
+
#: includes/class-sp-countries.php:490
|
3937 |
msgid "Zimbabwe"
|
3938 |
msgstr ""
|
3939 |
|
3961 |
msgid "Event Manager"
|
3962 |
msgstr ""
|
3963 |
|
3964 |
+
#: includes/class-sp-install.php:278
|
3965 |
msgid "Team Manager"
|
3966 |
msgstr ""
|
3967 |
|
3968 |
+
#: includes/class-sp-install.php:348
|
3969 |
msgid "League Manager"
|
3970 |
msgstr ""
|
3971 |
|
3972 |
+
#: includes/class-sp-install.php:545
|
3973 |
msgid "What's new:"
|
3974 |
msgstr ""
|
3975 |
|
3976 |
+
#: includes/class-sp-league-table.php:575 includes/sp-core-functions.php:1331
|
3977 |
+
#: modules/sportspress-league-tables.php:231 templates/league-table.php:65
|
3978 |
msgid "Pos"
|
3979 |
msgstr ""
|
3980 |
|
4003 |
msgstr ""
|
4004 |
|
4005 |
#: includes/class-sp-modules.php:54
|
4006 |
+
msgid "League Menu"
|
4007 |
msgstr ""
|
4008 |
|
4009 |
#: includes/class-sp-modules.php:58
|
4010 |
+
msgid "Add a global navigation bar to display logos that link to each team."
|
4011 |
+
msgstr ""
|
4012 |
+
|
4013 |
+
#: includes/class-sp-modules.php:61
|
4014 |
+
msgid "Team Colors"
|
4015 |
msgstr ""
|
4016 |
|
4017 |
#: includes/class-sp-modules.php:65
|
4018 |
+
msgid "Create a custom color palette for each team."
|
4019 |
msgstr ""
|
4020 |
|
4021 |
#: includes/class-sp-modules.php:68
|
4022 |
+
msgid "Team Access"
|
4023 |
msgstr ""
|
4024 |
|
4025 |
#: includes/class-sp-modules.php:72
|
4026 |
+
msgid "Limit user access to data that is related to their team."
|
4027 |
+
msgstr ""
|
4028 |
+
|
4029 |
+
#: includes/class-sp-modules.php:79
|
4030 |
+
msgid "Create team rosters, player galleries, and ranking charts."
|
4031 |
+
msgstr ""
|
4032 |
+
|
4033 |
+
#: includes/class-sp-modules.php:82
|
4034 |
+
#: includes/widgets/class-sp-widget-birthdays.php:6
|
4035 |
+
msgid "Birthdays"
|
4036 |
+
msgstr ""
|
4037 |
+
|
4038 |
+
#: includes/class-sp-modules.php:86
|
4039 |
msgid "Display each player's birthday and their current age."
|
4040 |
msgstr ""
|
4041 |
|
4042 |
+
#: includes/class-sp-modules.php:89
|
4043 |
msgid "Directories"
|
4044 |
msgstr ""
|
4045 |
|
4046 |
+
#: includes/class-sp-modules.php:93
|
4047 |
msgid "Organize and display staff in list and gallery layouts."
|
4048 |
msgstr ""
|
4049 |
|
4050 |
+
#: includes/class-sp-modules.php:98 modules/sportspress-tutorials.php:122
|
4051 |
+
#: modules/sportspress-tutorials.php:130
|
4052 |
msgid "Tutorials"
|
4053 |
msgstr ""
|
4054 |
|
4055 |
+
#: includes/class-sp-modules.php:100
|
4056 |
msgid "Display a dashboard page with SportsPress video tutorials."
|
4057 |
msgstr ""
|
4058 |
|
4059 |
+
#: includes/class-sp-modules.php:103
|
4060 |
msgid "Branding"
|
4061 |
msgstr ""
|
4062 |
|
4063 |
+
#: includes/class-sp-modules.php:107
|
4064 |
msgid "Instantly rebrand the dashboard with your own logo and colors."
|
4065 |
msgstr ""
|
4066 |
|
4067 |
+
#: includes/class-sp-modules.php:110
|
4068 |
+
msgid "Duplicator"
|
4069 |
+
msgstr ""
|
4070 |
+
|
4071 |
+
#: includes/class-sp-modules.php:114
|
4072 |
+
msgid "Clone anything with just one click. Great for creating multiple events."
|
4073 |
+
msgstr ""
|
4074 |
+
|
4075 |
+
#: includes/class-sp-modules.php:121
|
4076 |
msgid "Tweet #SportsPress"
|
4077 |
msgstr ""
|
4078 |
|
4079 |
+
#: includes/class-sp-modules.php:123
|
4080 |
msgid ""
|
4081 |
"Help spread the word by tweeting with #SportsPress and get the Twitter "
|
4082 |
"module for free."
|
4083 |
msgstr ""
|
4084 |
|
4085 |
+
#: includes/class-sp-modules.php:125
|
4086 |
msgid "Add a Twitter feed to team, player, and staff pages."
|
4087 |
msgstr ""
|
4088 |
|
4089 |
+
#: includes/class-sp-modules.php:128
|
4090 |
+
msgid "Sponsors"
|
4091 |
msgstr ""
|
4092 |
|
4093 |
+
#: includes/class-sp-modules.php:132
|
4094 |
+
msgid "Attract sponsors by offering them advertising space on your website."
|
4095 |
msgstr ""
|
4096 |
|
4097 |
+
#: includes/class-sp-modules.php:139
|
4098 |
+
msgid "Multisite"
|
4099 |
msgstr ""
|
4100 |
|
4101 |
+
#: includes/class-sp-modules.php:143
|
4102 |
+
msgid "Manage multiple sports and display different widgets all on one site."
|
4103 |
msgstr ""
|
4104 |
|
4105 |
+
#: includes/class-sp-post-types.php:40
|
4106 |
msgid "Edit Competition"
|
4107 |
msgstr ""
|
4108 |
|
4109 |
+
#: includes/class-sp-post-types.php:41 includes/class-sp-post-types.php:72
|
4110 |
+
#: includes/class-sp-post-types.php:103 includes/class-sp-post-types.php:134
|
4111 |
+
#: includes/class-sp-post-types.php:165 includes/class-sp-post-types.php:208
|
4112 |
+
#: includes/class-sp-post-types.php:238 includes/class-sp-post-types.php:268
|
4113 |
+
#: includes/class-sp-post-types.php:298 includes/class-sp-post-types.php:328
|
4114 |
+
#: includes/class-sp-post-types.php:358
|
4115 |
msgid "View"
|
4116 |
msgstr ""
|
4117 |
|
4118 |
+
#: includes/class-sp-post-types.php:45 includes/class-sp-post-types.php:76
|
4119 |
+
#: includes/class-sp-post-types.php:107 includes/class-sp-post-types.php:138
|
4120 |
+
#: includes/class-sp-post-types.php:169
|
4121 |
msgid "Parent"
|
4122 |
msgstr ""
|
4123 |
|
4124 |
+
#: includes/class-sp-post-types.php:46 includes/class-sp-post-types.php:77
|
4125 |
+
#: includes/class-sp-post-types.php:108 includes/class-sp-post-types.php:139
|
4126 |
+
#: includes/class-sp-post-types.php:170
|
4127 |
msgid "Parent:"
|
4128 |
msgstr ""
|
4129 |
|
4130 |
+
#: includes/class-sp-post-types.php:47 includes/class-sp-post-types.php:78
|
4131 |
+
#: includes/class-sp-post-types.php:109 includes/class-sp-post-types.php:140
|
4132 |
+
#: includes/class-sp-post-types.php:171 includes/class-sp-post-types.php:209
|
4133 |
+
#: includes/class-sp-post-types.php:239 includes/class-sp-post-types.php:269
|
4134 |
+
#: includes/class-sp-post-types.php:299 includes/class-sp-post-types.php:329
|
4135 |
+
#: includes/class-sp-post-types.php:359 includes/class-sp-post-types.php:387
|
4136 |
+
#: includes/class-sp-post-types.php:421 includes/class-sp-post-types.php:451
|
4137 |
+
#: includes/class-sp-post-types.php:481 modules/sportspress-calendars.php:71
|
4138 |
+
#: modules/sportspress-league-tables.php:72
|
4139 |
#: modules/sportspress-player-lists.php:71
|
4140 |
msgid "Search"
|
4141 |
msgstr ""
|
4142 |
|
4143 |
+
#: includes/class-sp-post-types.php:71
|
4144 |
msgid "Edit Season"
|
4145 |
msgstr ""
|
4146 |
|
4147 |
+
#: includes/class-sp-post-types.php:102
|
4148 |
msgid "Edit Venue"
|
4149 |
msgstr ""
|
4150 |
|
4151 |
+
#: includes/class-sp-post-types.php:133
|
4152 |
msgid "Edit Position"
|
4153 |
msgstr ""
|
4154 |
|
4155 |
+
#: includes/class-sp-post-types.php:164
|
4156 |
msgid "Edit Job"
|
4157 |
msgstr ""
|
4158 |
|
4159 |
+
#: includes/class-sp-post-types.php:204
|
4160 |
msgid "Result"
|
4161 |
msgstr ""
|
4162 |
|
4163 |
+
#: includes/class-sp-post-types.php:205
|
4164 |
msgid "Add New Result"
|
4165 |
msgstr ""
|
4166 |
|
4167 |
+
#: includes/class-sp-post-types.php:206
|
4168 |
msgid "Edit Result"
|
4169 |
msgstr ""
|
4170 |
|
4171 |
+
#: includes/class-sp-post-types.php:207 includes/class-sp-post-types.php:237
|
4172 |
+
#: includes/class-sp-post-types.php:267 includes/class-sp-post-types.php:297
|
4173 |
+
#: includes/class-sp-post-types.php:327 includes/class-sp-post-types.php:357
|
4174 |
+
#: includes/class-sp-post-types.php:385 includes/class-sp-post-types.php:419
|
4175 |
+
#: includes/class-sp-post-types.php:449 includes/class-sp-post-types.php:479
|
4176 |
#: modules/sportspress-calendars.php:69
|
4177 |
+
#: modules/sportspress-league-tables.php:70
|
4178 |
#: modules/sportspress-player-lists.php:69
|
4179 |
msgid "New"
|
4180 |
msgstr ""
|
4181 |
|
4182 |
+
#: includes/class-sp-post-types.php:235
|
4183 |
msgid "Add New Outcome"
|
4184 |
msgstr ""
|
4185 |
|
4186 |
+
#: includes/class-sp-post-types.php:236
|
4187 |
msgid "Edit Outcome"
|
4188 |
msgstr ""
|
4189 |
|
4190 |
+
#: includes/class-sp-post-types.php:264
|
4191 |
msgid "Column"
|
4192 |
msgstr ""
|
4193 |
|
4194 |
+
#: includes/class-sp-post-types.php:265
|
4195 |
msgid "Add New Column"
|
4196 |
msgstr ""
|
4197 |
|
4198 |
+
#: includes/class-sp-post-types.php:266
|
4199 |
msgid "Edit Column"
|
4200 |
msgstr ""
|
4201 |
|
4202 |
+
#: includes/class-sp-post-types.php:294
|
4203 |
msgid "Metric"
|
4204 |
msgstr ""
|
4205 |
|
4206 |
+
#: includes/class-sp-post-types.php:295
|
4207 |
msgid "Add New Metric"
|
4208 |
msgstr ""
|
4209 |
|
4210 |
+
#: includes/class-sp-post-types.php:296
|
4211 |
msgid "Edit Metric"
|
4212 |
msgstr ""
|
4213 |
|
4214 |
+
#: includes/class-sp-post-types.php:325
|
4215 |
msgid "Add New Performance"
|
4216 |
msgstr ""
|
4217 |
|
4218 |
+
#: includes/class-sp-post-types.php:326
|
4219 |
msgid "Edit Performance"
|
4220 |
msgstr ""
|
4221 |
|
4222 |
+
#: includes/class-sp-post-types.php:354
|
4223 |
msgid "Statistic"
|
4224 |
msgstr ""
|
4225 |
|
4226 |
+
#: includes/class-sp-post-types.php:355
|
4227 |
msgid "Add New Statistic"
|
4228 |
msgstr ""
|
4229 |
|
4230 |
+
#: includes/class-sp-post-types.php:356
|
4231 |
msgid "Edit Statistic"
|
4232 |
msgstr ""
|
4233 |
|
4234 |
+
#: includes/class-sp-post-types.php:384 modules/sportspress-tutorials.php:82
|
4235 |
msgid "Edit Event"
|
4236 |
msgstr ""
|
4237 |
|
4238 |
+
#: includes/class-sp-post-types.php:386
|
4239 |
msgid "View Event"
|
4240 |
msgstr ""
|
4241 |
|
4242 |
+
#: includes/class-sp-post-types.php:418
|
4243 |
msgid "Edit Team"
|
4244 |
msgstr ""
|
4245 |
|
4246 |
+
#: includes/class-sp-post-types.php:420
|
4247 |
msgid "View Team"
|
4248 |
msgstr ""
|
4249 |
|
4250 |
+
#: includes/class-sp-post-types.php:448
|
4251 |
msgid "Edit Player"
|
4252 |
msgstr ""
|
4253 |
|
4254 |
+
#: includes/class-sp-post-types.php:450
|
4255 |
msgid "View Player"
|
4256 |
msgstr ""
|
4257 |
|
4258 |
+
#: includes/class-sp-post-types.php:477 modules/sportspress-tutorials.php:77
|
4259 |
msgid "Add New Staff"
|
4260 |
msgstr ""
|
4261 |
|
4262 |
+
#: includes/class-sp-post-types.php:478
|
4263 |
msgid "Edit Staff"
|
4264 |
msgstr ""
|
4265 |
|
4266 |
+
#: includes/sp-core-functions.php:412
|
4267 |
msgid "Average"
|
4268 |
msgstr ""
|
4269 |
|
4270 |
+
#: includes/sp-core-functions.php:506
|
4271 |
msgid "Published"
|
4272 |
msgstr ""
|
4273 |
|
4274 |
+
#: includes/sp-core-functions.php:507
|
4275 |
msgid "Scheduled"
|
4276 |
msgstr ""
|
4277 |
|
4278 |
+
#: includes/sp-core-functions.php:539
|
4279 |
msgid "Date range:"
|
4280 |
msgstr ""
|
4281 |
|
4282 |
+
#: includes/sp-core-functions.php:814 includes/sp-core-functions.php:964
|
4283 |
msgid "(no title)"
|
4284 |
msgstr ""
|
4285 |
|
4286 |
+
#: includes/sp-core-functions.php:833 includes/sp-core-functions.php:917
|
4287 |
+
#: modules/sportspress-lazy-loading.php:185
|
4288 |
+
#: modules/sportspress-lazy-loading.php:222
|
4289 |
msgid "Select All"
|
4290 |
msgstr ""
|
4291 |
|
4292 |
+
#: includes/sp-core-functions.php:898 includes/sp-core-functions.php:901
|
4293 |
+
#: modules/sportspress-lazy-loading.php:206
|
4294 |
+
#: modules/sportspress-lazy-loading.php:209
|
4295 |
+
#: modules/sportspress-lazy-loading.php:223
|
4296 |
msgid "Show all"
|
4297 |
msgstr ""
|
4298 |
|
4299 |
+
#: includes/sp-core-functions.php:1339
|
4300 |
msgid "Substitutes"
|
4301 |
msgstr ""
|
4302 |
|
4303 |
+
#: includes/sp-core-functions.php:1346 modules/sportspress-event-videos.php:56
|
4304 |
#: templates/event-video.php:19
|
4305 |
msgid "Video"
|
4306 |
msgstr ""
|
4307 |
|
4308 |
+
#: includes/sp-core-functions.php:1347 templates/event-blocks.php:136
|
4309 |
+
#: templates/event-calendar.php:226 templates/event-list.php:376
|
4310 |
msgid "View all events"
|
4311 |
msgstr ""
|
4312 |
|
4313 |
+
#: includes/sp-core-functions.php:1348 templates/player-gallery.php:162
|
4314 |
+
#: templates/player-list.php:207
|
4315 |
msgid "View all players"
|
4316 |
msgstr ""
|
4317 |
|
4318 |
+
#: includes/sp-core-functions.php:1349 templates/league-table.php:165
|
4319 |
msgid "View full table"
|
4320 |
msgstr ""
|
4321 |
|
4322 |
+
#: includes/sp-core-functions.php:1364
|
4323 |
msgid "Love SportsPress? Help spread the word by rating us 5★ on WordPress.org"
|
4324 |
msgstr ""
|
4325 |
|
4326 |
+
#: includes/sp-template-hooks.php:175
|
4327 |
msgid ""
|
4328 |
"The description is not prominent by default; however, some themes may show "
|
4329 |
"it."
|
4330 |
msgstr ""
|
4331 |
|
4332 |
+
#: includes/sp-template-hooks.php:184 modules/sportspress-icons.php:147
|
4333 |
msgid "Select Icon"
|
4334 |
msgstr ""
|
4335 |
|
4336 |
+
#: includes/sp-template-hooks.php:187
|
4337 |
msgid "Add icon"
|
4338 |
msgstr ""
|
4339 |
|
4340 |
+
#: includes/sp-template-hooks.php:190
|
4341 |
msgid "Remove icon"
|
4342 |
msgstr ""
|
4343 |
|
4344 |
+
#: includes/sp-template-hooks.php:198
|
4345 |
msgid "User"
|
4346 |
msgstr ""
|
4347 |
|
4348 |
+
#: includes/sp-template-hooks.php:209
|
4349 |
msgid "Select Photo"
|
4350 |
msgstr ""
|
4351 |
|
4352 |
+
#: includes/sp-template-hooks.php:212
|
4353 |
msgid "Add photo"
|
4354 |
msgstr ""
|
4355 |
|
4356 |
+
#: includes/sp-template-hooks.php:215
|
4357 |
msgid "Remove photo"
|
4358 |
msgstr ""
|
4359 |
|
4360 |
+
#: includes/sp-template-hooks.php:226
|
4361 |
msgid "Select Logo"
|
4362 |
msgstr ""
|
4363 |
|
4364 |
+
#: includes/sp-template-hooks.php:229
|
4365 |
msgid "Add logo"
|
4366 |
msgstr ""
|
4367 |
|
4368 |
+
#: includes/sp-template-hooks.php:232
|
4369 |
msgid "Remove logo"
|
4370 |
msgstr ""
|
4371 |
|
4372 |
+
#: includes/sp-template-hooks.php:240
|
4373 |
msgid "Date/Time:"
|
4374 |
msgstr ""
|
4375 |
|
4376 |
+
#: includes/sp-template-hooks.php:240
|
4377 |
msgid "Now"
|
4378 |
msgstr ""
|
4379 |
|
4380 |
+
#: includes/widgets/class-sp-widget-birthdays.php:5
|
4381 |
+
msgid "Display players and staff on their birthday."
|
4382 |
msgstr ""
|
4383 |
|
4384 |
+
#: includes/widgets/class-sp-widget-birthdays.php:49
|
4385 |
+
msgid "This month"
|
4386 |
+
msgstr ""
|
4387 |
+
|
4388 |
+
#: includes/widgets/class-sp-widget-birthdays.php:59
|
4389 |
+
msgid "Birthday:"
|
4390 |
+
msgstr ""
|
4391 |
+
|
4392 |
+
#: includes/widgets/class-sp-widget-countdown.php:5
|
4393 |
+
msgid "A clock that counts down to an upcoming event."
|
4394 |
msgstr ""
|
4395 |
|
4396 |
#: includes/widgets/class-sp-widget-countdown.php:66
|
4397 |
+
#: includes/widgets/class-sp-widget-event-blocks.php:84
|
4398 |
+
#: includes/widgets/class-sp-widget-event-list.php:87
|
4399 |
+
#: includes/widgets/class-sp-widget-league-table.php:76
|
4400 |
+
#: includes/widgets/class-sp-widget-player-gallery.php:81
|
4401 |
+
#: includes/widgets/class-sp-widget-player-list.php:81
|
4402 |
msgid "Heading:"
|
4403 |
msgstr ""
|
4404 |
|
4429 |
msgid "Display a league table."
|
4430 |
msgstr ""
|
4431 |
|
4432 |
+
#: includes/widgets/class-sp-widget-league-table.php:85
|
4433 |
msgid "— Select —"
|
4434 |
msgstr ""
|
4435 |
|
4441 |
msgid "Player Gallery"
|
4442 |
msgstr ""
|
4443 |
|
4444 |
+
#: includes/widgets/class-sp-widget-player-gallery.php:116
|
4445 |
msgid "Random"
|
4446 |
msgstr ""
|
4447 |
|
4449 |
msgid "Display a list of players."
|
4450 |
msgstr ""
|
4451 |
|
4452 |
+
#: includes/widgets/class-sp-widget-player-list.php:104
|
4453 |
msgid "Performance:"
|
4454 |
msgstr ""
|
4455 |
|
4457 |
msgid "Display a single staff member."
|
4458 |
msgstr ""
|
4459 |
|
4460 |
+
#: modules/sportspress-birthdays.php:68
|
4461 |
+
#, php-format
|
4462 |
+
msgid "Birthday: <b>%1$s</b>"
|
4463 |
+
msgstr ""
|
4464 |
+
|
4465 |
+
#: modules/sportspress-birthdays.php:70 modules/sportspress-birthdays.php:91
|
4466 |
+
#: modules/sportspress-birthdays.php:119 modules/sportspress-birthdays.php:146
|
4467 |
+
#: modules/sportspress-birthdays.php:163
|
4468 |
+
msgid "Birthday"
|
4469 |
+
msgstr ""
|
4470 |
+
|
4471 |
+
#: modules/sportspress-birthdays.php:92 modules/sportspress-birthdays.php:120
|
4472 |
+
msgid "Display birthday"
|
4473 |
+
msgstr ""
|
4474 |
+
|
4475 |
+
#: modules/sportspress-birthdays.php:100 modules/sportspress-birthdays.php:128
|
4476 |
+
msgid "Display age"
|
4477 |
+
msgstr ""
|
4478 |
+
|
4479 |
+
#: modules/sportspress-birthdays.php:150 modules/sportspress-birthdays.php:167
|
4480 |
+
msgid "Age"
|
4481 |
+
msgstr ""
|
4482 |
+
|
4483 |
#: modules/sportspress-calendars.php:67
|
4484 |
msgid "Add New Calendar"
|
4485 |
msgstr ""
|
4497 |
msgstr ""
|
4498 |
|
4499 |
#: modules/sportspress-calendars.php:196 modules/sportspress-calendars.php:265
|
|
|
4500 |
msgid "Display calendar title"
|
4501 |
msgstr ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4502 |
|
4503 |
#: modules/sportspress-calendars.php:211
|
4504 |
msgid "Title Format"
|
4508 |
msgid "Time/Results Format"
|
4509 |
msgstr ""
|
4510 |
|
|
|
|
|
|
|
|
|
4511 |
#: modules/sportspress-calendars.php:229
|
4512 |
msgid "Separate"
|
4513 |
msgstr ""
|
4521 |
msgstr ""
|
4522 |
|
4523 |
#: modules/sportspress-calendars.php:236 modules/sportspress-calendars.php:297
|
4524 |
+
#: modules/sportspress-league-tables.php:210
|
4525 |
+
#: modules/sportspress-player-lists.php:226
|
4526 |
msgid "Pagination"
|
4527 |
msgstr ""
|
4528 |
|
4529 |
#: modules/sportspress-calendars.php:237 modules/sportspress-calendars.php:298
|
4530 |
+
#: modules/sportspress-league-tables.php:211
|
4531 |
+
#: modules/sportspress-player-lists.php:227
|
4532 |
msgid "Paginate"
|
4533 |
msgstr ""
|
4534 |
|
4544 |
msgid "Countdowns"
|
4545 |
msgstr ""
|
4546 |
|
4547 |
+
#: modules/sportspress-icons.php:139
|
4548 |
+
msgid "Image"
|
4549 |
+
msgstr ""
|
4550 |
+
|
4551 |
+
#: modules/sportspress-individual-mode.php:122
|
4552 |
+
#: modules/sportspress-player-lists.php:238
|
4553 |
msgid "players"
|
4554 |
msgstr ""
|
4555 |
|
4556 |
+
#: modules/sportspress-lazy-loading.php:224
|
4557 |
+
msgid "Loading…"
|
4558 |
msgstr ""
|
4559 |
|
4560 |
#: modules/sportspress-league-tables.php:68
|
4561 |
+
msgid "Add New League Table"
|
4562 |
+
msgstr ""
|
4563 |
+
|
4564 |
+
#: modules/sportspress-league-tables.php:69
|
4565 |
msgid "Edit League Table"
|
4566 |
msgstr ""
|
4567 |
|
4568 |
+
#: modules/sportspress-league-tables.php:71
|
4569 |
msgid "View League Table"
|
4570 |
msgstr ""
|
4571 |
|
4572 |
+
#: modules/sportspress-league-tables.php:195
|
4573 |
+
#: modules/sportspress-player-lists.php:202
|
|
|
4574 |
msgid "Display title"
|
4575 |
msgstr ""
|
4576 |
+
|
4577 |
+
#: modules/sportspress-league-tables.php:232
|
4578 |
+
msgid "Always increment"
|
4579 |
+
msgstr ""
|
4580 |
+
|
4581 |
+
#: modules/sportspress-league-tables.php:255
|
4582 |
+
msgid "Enable column editing"
|
4583 |
+
msgstr ""
|
|
|
4584 |
|
4585 |
#: modules/sportspress-overview.php:52 modules/sportspress-overview.php:62
|
4586 |
+
#: modules/sportspress-tutorials.php:109
|
4587 |
msgid "Overview"
|
4588 |
msgstr ""
|
4589 |
|
4599 |
msgid "View Player List"
|
4600 |
msgstr ""
|
4601 |
|
4602 |
+
#: modules/sportspress-player-lists.php:210
|
4603 |
msgid "Display photos"
|
4604 |
msgstr ""
|
4605 |
|
4606 |
+
#: modules/sportspress-template-selector.php:132
|
4607 |
+
msgid "Default Template"
|
4608 |
+
msgstr ""
|
4609 |
+
|
4610 |
+
#: modules/sportspress-template-selector.php:136
|
4611 |
+
msgid "Template"
|
4612 |
+
msgstr ""
|
4613 |
+
|
4614 |
+
#: modules/sportspress-tutorials.php:63
|
4615 |
msgid "Installation"
|
4616 |
msgstr ""
|
4617 |
|
4618 |
+
#: modules/sportspress-tutorials.php:89
|
4619 |
+
msgid "Permalinks"
|
4620 |
+
msgstr ""
|
4621 |
+
|
4622 |
+
#: modules/sportspress-tutorials.php:105
|
4623 |
+
msgid "Player Ranking"
|
4624 |
+
msgstr ""
|
4625 |
+
|
4626 |
+
#: modules/sportspress-tutorials.php:108
|
4627 |
+
msgid "Demo Content"
|
4628 |
+
msgstr ""
|
4629 |
+
|
4630 |
+
#: modules/sportspress-tutorials.php:110
|
4631 |
+
msgid "User Roles"
|
4632 |
+
msgstr ""
|
4633 |
+
|
4634 |
+
#: modules/sportspress-tutorials.php:112
|
4635 |
+
msgid "Page not found"
|
4636 |
+
msgstr ""
|
4637 |
+
|
4638 |
+
#: modules/sportspress-tutorials.php:131
|
4639 |
+
msgid "Advanced"
|
4640 |
+
msgstr ""
|
4641 |
+
|
4642 |
+
#: modules/sportspress-tutorials.php:155
|
4643 |
msgid "Pop-out"
|
4644 |
msgstr ""
|
4645 |
|
4646 |
+
#: modules/sportspress-tutorials.php:193
|
4647 |
msgid "Watch Tutorials"
|
4648 |
msgstr ""
|
4649 |
|
4650 |
+
#: modules/sportspress-widget-alignment.php:107
|
4651 |
+
#: modules/sportspress-widget-alignment.php:141
|
4652 |
#, php-format
|
4653 |
msgid "Alignment: %s"
|
4654 |
msgstr ""
|
4657 |
msgid "Cheatin’ huh?"
|
4658 |
msgstr ""
|
4659 |
|
4660 |
+
#: templates/event-calendar.php:103 templates/event-calendar.php:131
|
4661 |
+
#: templates/event-calendar.php:139
|
|
|
|
|
|
|
|
|
|
|
4662 |
#, php-format
|
4663 |
msgctxt "calendar caption"
|
4664 |
msgid "%1$s %2$s"
|
license.txt
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
SportsPress
|
2 |
|
3 |
-
Copyright
|
4 |
|
5 |
This program is free software; you can redistribute it and/or modify
|
6 |
it under the terms of the GNU General Public License as published by
|
@@ -25,8 +25,9 @@ permission notices:
|
|
25 |
SportsPress includes icons from WebHostingHub Glyphs, released under the
|
26 |
SIL Open Font License; 80 Shades of White Icons by Victor Erixon; Entypo
|
27 |
and Entypo+ by Daniel Bruce, released under CC BY-SA 3.0; Font Awesome by
|
28 |
-
Dave Gancy, released under the GPL
|
29 |
-
SportsPress are released
|
|
|
30 |
|
31 |
Wherever third party code has been used, credit has been given in the code's
|
32 |
comments.
|
1 |
SportsPress
|
2 |
|
3 |
+
Copyright 2016 by the contributors
|
4 |
|
5 |
This program is free software; you can redistribute it and/or modify
|
6 |
it under the terms of the GNU General Public License as published by
|
25 |
SportsPress includes icons from WebHostingHub Glyphs, released under the
|
26 |
SIL Open Font License; 80 Shades of White Icons by Victor Erixon; Entypo
|
27 |
and Entypo+ by Daniel Bruce, released under CC BY-SA 3.0; Font Awesome by
|
28 |
+
Dave Gancy, released under the GPL; Flaticon by Freepick, released under
|
29 |
+
CC BY 3.0. The custom designed icons included in SportsPress are released
|
30 |
+
under the GPL.
|
31 |
|
32 |
Wherever third party code has been used, credit has been given in the code's
|
33 |
comments.
|
modules/sportspress-admin-bar.php
ADDED
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
Plugin Name: SportsPress Admin Bar
|
4 |
+
Plugin URI: http://themeboy.com/
|
5 |
+
Description: Add widgets to SportsPress.
|
6 |
+
Author: ThemeBoy
|
7 |
+
Author URI: http://themeboy.com/
|
8 |
+
Version: 1.9.14
|
9 |
+
*/
|
10 |
+
|
11 |
+
// Exit if accessed directly
|
12 |
+
if ( ! defined( 'ABSPATH' ) ) exit;
|
13 |
+
|
14 |
+
if ( ! class_exists( 'SportsPress_Admin_Bar' ) ) :
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Main SportsPress Admin Bar Class
|
18 |
+
*
|
19 |
+
* @class SportsPress_Admin_Bar
|
20 |
+
* @version 1.9.14
|
21 |
+
*/
|
22 |
+
class SportsPress_Admin_Bar {
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Constructor
|
26 |
+
*/
|
27 |
+
public function __construct() {
|
28 |
+
// Define constants
|
29 |
+
$this->define_constants();
|
30 |
+
|
31 |
+
add_action( 'admin_bar_menu', array( $this, 'add_node' ), 40 );
|
32 |
+
}
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Define constants.
|
36 |
+
*/
|
37 |
+
private function define_constants() {
|
38 |
+
if ( !defined( 'SP_ADMIN_BAR_VERSION' ) )
|
39 |
+
define( 'SP_ADMIN_BAR_VERSION', '1.9.14' );
|
40 |
+
|
41 |
+
if ( !defined( 'SP_ADMIN_BAR_URL' ) )
|
42 |
+
define( 'SP_ADMIN_BAR_URL', plugin_dir_url( __FILE__ ) );
|
43 |
+
|
44 |
+
if ( !defined( 'SP_ADMIN_BAR_DIR' ) )
|
45 |
+
define( 'SP_ADMIN_BAR_DIR', plugin_dir_path( __FILE__ ) );
|
46 |
+
}
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Add node to admin bar menu.
|
50 |
+
*/
|
51 |
+
public function add_node( $wp_admin_bar ) {
|
52 |
+
if ( is_admin() ) return;
|
53 |
+
|
54 |
+
$args = array(
|
55 |
+
'id' => 'sportspress',
|
56 |
+
'title' => __( 'SportsPress', 'sportspress' ),
|
57 |
+
'href' => add_query_arg( 'page', 'sportspress', admin_url( 'admin.php' ) ),
|
58 |
+
);
|
59 |
+
$wp_admin_bar->add_node( $args );
|
60 |
+
}
|
61 |
+
}
|
62 |
+
|
63 |
+
endif;
|
64 |
+
|
65 |
+
new SportsPress_Admin_Bar();
|
modules/sportspress-birthdays.php
ADDED
@@ -0,0 +1,198 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
Plugin Name: SportsPress Birthdays
|
4 |
+
Plugin URI: http://themeboy.com/
|
5 |
+
Description: Add birthdays to players and staff.
|
6 |
+
Author: ThemeBoy
|
7 |
+
Author URI: http://themeboy.com/
|
8 |
+
Version: 1.9.19
|
9 |
+
*/
|
10 |
+
|
11 |
+
// Exit if accessed directly
|
12 |
+
if ( ! defined( 'ABSPATH' ) ) exit;
|
13 |
+
|
14 |
+
if ( ! class_exists( 'SportsPress_Birthdays' ) ) :
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Main SportsPress Birthdays Class
|
18 |
+
*
|
19 |
+
* @class SportsPress_Birthdays
|
20 |
+
* @version 1.9.19
|
21 |
+
*/
|
22 |
+
class SportsPress_Birthdays {
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Constructor
|
26 |
+
*/
|
27 |
+
public function __construct() {
|
28 |
+
// Define constants
|
29 |
+
$this->define_constants();
|
30 |
+
|
31 |
+
add_filter( 'gettext', array( $this, 'gettext' ), 20, 3 );
|
32 |
+
add_filter( 'sportspress_player_options', array( $this, 'add_player_options' ) );
|
33 |
+
add_filter( 'sportspress_staff_options', array( $this, 'add_staff_options' ) );
|
34 |
+
add_filter( 'sportspress_player_details', array( $this, 'add_player_details' ), 20, 2 );
|
35 |
+
add_filter( 'sportspress_staff_details', array( $this, 'add_staff_details' ), 20, 2 );
|
36 |
+
|
37 |
+
add_action( 'sportspress_widgets', array( $this, 'widgets' ) );
|
38 |
+
}
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Define constants.
|
42 |
+
*/
|
43 |
+
private function define_constants() {
|
44 |
+
if ( !defined( 'SP_BIRTHDAYS_VERSION' ) )
|
45 |
+
define( 'SP_BIRTHDAYS_VERSION', '1.9.19' );
|
46 |
+
|
47 |
+
if ( !defined( 'SP_BIRTHDAYS_URL' ) )
|
48 |
+
define( 'SP_BIRTHDAYS_URL', plugin_dir_url( __FILE__ ) );
|
49 |
+
|
50 |
+
if ( !defined( 'SP_BIRTHDAYS_DIR' ) )
|
51 |
+
define( 'SP_BIRTHDAYS_DIR', plugin_dir_path( __FILE__ ) );
|
52 |
+
}
|
53 |
+
|
54 |
+
/**
|
55 |
+
* Text filter.
|
56 |
+
*/
|
57 |
+
public function gettext( $translated_text, $untranslated_text, $domain ) {
|
58 |
+
if ( ! is_admin() ) return $translated_text;
|
59 |
+
|
60 |
+
global $typenow;
|
61 |
+
|
62 |
+
if ( 'default' == $domain && in_array( $typenow, array( 'sp_player', 'sp_staff' ) ) ):
|
63 |
+
switch ( $untranslated_text ):
|
64 |
+
case 'Scheduled for: <b>%1$s</b>':
|
65 |
+
case 'Published on: <b>%1$s</b>':
|
66 |
+
case 'Schedule for: <b>%1$s</b>':
|
67 |
+
case 'Publish on: <b>%1$s</b>':
|
68 |
+
return __( 'Birthday: <b>%1$s</b>', 'sportspress' );
|
69 |
+
case 'Publish <b>immediately</b>':
|
70 |
+
return __( 'Birthday', 'sportspress' );
|
71 |
+
case 'M j, Y @ G:i':
|
72 |
+
return 'M j, Y';
|
73 |
+
case '%1$s %2$s, %3$s @ %4$s : %5$s':
|
74 |
+
$hour = '<input type="hidden" id="hh" name="hh" value="00" readonly />';
|
75 |
+
$minute = '<input type="hidden" id="mn" name="mn" value="00" readonly />';
|
76 |
+
return '%1$s %2$s, %3$s' . $hour . $minute;
|
77 |
+
endswitch;
|
78 |
+
endif;
|
79 |
+
|
80 |
+
return $translated_text;
|
81 |
+
}
|
82 |
+
|
83 |
+
/**
|
84 |
+
* Add options to player settings page.
|
85 |
+
*
|
86 |
+
* @return array
|
87 |
+
*/
|
88 |
+
public function add_player_options( $options ) {
|
89 |
+
$options = array_merge( $options, array(
|
90 |
+
array(
|
91 |
+
'title' => __( 'Birthday', 'sportspress' ),
|
92 |
+
'desc' => __( 'Display birthday', 'sportspress' ),
|
93 |
+
'id' => 'sportspress_player_show_birthday',
|
94 |
+
'default' => 'no',
|
95 |
+
'type' => 'checkbox',
|
96 |
+
'checkboxgroup' => 'start',
|
97 |
+
),
|
98 |
+
|
99 |
+
array(
|
100 |
+
'desc' => __( 'Display age', 'sportspress' ),
|
101 |
+
'id' => 'sportspress_player_show_age',
|
102 |
+
'default' => 'no',
|
103 |
+
'type' => 'checkbox',
|
104 |
+
'checkboxgroup' => 'end',
|
105 |
+
),
|
106 |
+
) );
|
107 |
+
|
108 |
+
return $options;
|
109 |
+
}
|
110 |
+
|
111 |
+
/**
|
112 |
+
* Add options to staff settings page.
|
113 |
+
*
|
114 |
+
* @return array
|
115 |
+
*/
|
116 |
+
public function add_staff_options( $options ) {
|
117 |
+
$options = array_merge( $options, array(
|
118 |
+
array(
|
119 |
+
'title' => __( 'Birthday', 'sportspress' ),
|
120 |
+
'desc' => __( 'Display birthday', 'sportspress' ),
|
121 |
+
'id' => 'sportspress_staff_show_birthday',
|
122 |
+
'default' => 'no',
|
123 |
+
'type' => 'checkbox',
|
124 |
+
'checkboxgroup' => 'start',
|
125 |
+
),
|
126 |
+
|
127 |
+
array(
|
128 |
+
'desc' => __( 'Display age', 'sportspress' ),
|
129 |
+
'id' => 'sportspress_staff_show_age',
|
130 |
+
'default' => 'no',
|
131 |
+
'type' => 'checkbox',
|
132 |
+
'checkboxgroup' => 'end',
|
133 |
+
),
|
134 |
+
) );
|
135 |
+
|
136 |
+
return $options;
|
137 |
+
}
|
138 |
+
|
139 |
+
/**
|
140 |
+
* Add data to player details template.
|
141 |
+
*
|
142 |
+
* @return array
|
143 |
+
*/
|
144 |
+
public function add_player_details( $data, $post_id ) {
|
145 |
+
if ( 'yes' == get_option( 'sportspress_player_show_birthday', 'no' ) ) {
|
146 |
+
$data[ __( 'Birthday', 'sportspress' ) ] = get_the_date( get_option( 'date_format' ), $post_id );
|
147 |
+
}
|
148 |
+
|
149 |
+
if ( 'yes' == get_option( 'sportspress_player_show_age', 'no' ) ) {
|
150 |
+
$data[ __( 'Age', 'sportspress' ) ] = $this->get_age( get_the_date( 'm-d-Y' ) );
|
151 |
+
}
|
152 |
+
|
153 |
+
return $data;
|
154 |
+
}
|
155 |
+
|
156 |
+
/**
|
157 |
+
* Add data to staff details template.
|
158 |
+
*
|
159 |
+
* @return array
|
160 |
+
*/
|
161 |
+
public function add_staff_details( $data, $post_id ) {
|
162 |
+
if ( 'yes' == get_option( 'sportspress_staff_show_birthday', 'no' ) ) {
|
163 |
+
$data[ __( 'Birthday', 'sportspress' ) ] = get_the_date( get_option( 'date_format' ), $post_id );
|
164 |
+
}
|
165 |
+
|
166 |
+
if ( 'yes' == get_option( 'sportspress_staff_show_age', 'no' ) ) {
|
167 |
+
$data[ __( 'Age', 'sportspress' ) ] = $this->get_age( get_the_date( 'm-d-Y' ) );
|
168 |
+
}
|
169 |
+
|
170 |
+
return $data;
|
171 |
+
}
|
172 |
+
|
173 |
+
|
174 |
+
/**
|
175 |
+
* Register widgets
|
176 |
+
*/
|
177 |
+
public static function widgets() {
|
178 |
+
include_once( SP()->plugin_path() . '/includes/widgets/class-sp-widget-birthdays.php' );
|
179 |
+
}
|
180 |
+
|
181 |
+
/**
|
182 |
+
* Get age from date.
|
183 |
+
* Adapted from http://stackoverflow.com/questions/3776682/php-calculate-age.
|
184 |
+
*
|
185 |
+
* @return int
|
186 |
+
*/
|
187 |
+
public static function get_age( $date ) {
|
188 |
+
$date = explode( '-', $date );
|
189 |
+
$age = ( date( 'md', date( 'U', mktime( 0, 0, 0, $date[0], $date[1], $date[2] ) ) ) > date('md')
|
190 |
+
? ( ( date( 'Y' ) - $date[2] ) - 1 )
|
191 |
+
: ( date( 'Y' ) - $date[2] ) );
|
192 |
+
return $age;
|
193 |
+
}
|
194 |
+
}
|
195 |
+
|
196 |
+
endif;
|
197 |
+
|
198 |
+
new SportsPress_Birthdays();
|
modules/sportspress-icons.php
ADDED
@@ -0,0 +1,168 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
Plugin Name: SportsPress Icons
|
4 |
+
Plugin URI: http://themeboy.com/
|
5 |
+
Description: Add vector performance icons to SportsPress.
|
6 |
+
Author: ThemeBoy
|
7 |
+
Author URI: http://themeboy.com/
|
8 |
+
Version: 1.9
|
9 |
+
*/
|
10 |
+
|
11 |
+
// Exit if accessed directly
|
12 |
+
if ( ! defined( 'ABSPATH' ) ) exit;
|
13 |
+
|
14 |
+
if ( ! class_exists( 'SportsPress_Icons' ) ) :
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Main SportsPress Icons Class
|
18 |
+
*
|
19 |
+
* @class SportsPress_Icons
|
20 |
+
* @version 1.9
|
21 |
+
*/
|
22 |
+
class SportsPress_Icons {
|
23 |
+
|
24 |
+
/**
|
25 |
+
* @var array
|
26 |
+
*/
|
27 |
+
public $icons = array();
|
28 |
+
|
29 |
+
/**
|
30 |
+
* Constructor
|
31 |
+
*/
|
32 |
+
public function __construct() {
|
33 |
+
// Define constants
|
34 |
+
$this->define_constants();
|
35 |
+
|
36 |
+
// Define icons
|
37 |
+
$this->get_icons();
|
38 |
+
|
39 |
+
add_filter( 'sportspress_enqueue_styles', array( $this, 'add_styles' ) );
|
40 |
+
add_filter( 'sportspress_performance_icon', array( $this, 'icon' ), 10, 2 );
|
41 |
+
add_filter( 'sportspress_event_performance_icons', array( $this, 'replace_icons' ), 10, 3 );
|
42 |
+
add_filter( 'admin_post_thumbnail_html', array( $this, 'admin_post_thumbnail_html' ), 10, 2 );
|
43 |
+
add_action( 'sportspress_process_sp_performance_meta', array( $this, 'save' ), 10, 2 );
|
44 |
+
}
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Define constants.
|
48 |
+
*/
|
49 |
+
private function define_constants() {
|
50 |
+
if ( !defined( 'SP_ICONS_VERSION' ) )
|
51 |
+
define( 'SP_ICONS_VERSION', '1.9' );
|
52 |
+
|
53 |
+
if ( !defined( 'SP_ICONS_URL' ) )
|
54 |
+
define( 'SP_ICONS_URL', plugin_dir_url( __FILE__ ) );
|
55 |
+
|
56 |
+
if ( !defined( 'SP_ICONS_DIR' ) )
|
57 |
+
define( 'SP_ICONS_DIR', plugin_dir_path( __FILE__ ) );
|
58 |
+
}
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Add stylesheet.
|
62 |
+
*/
|
63 |
+
public static function add_styles( $styles = array() ) {
|
64 |
+
$styles['sportspress-icons'] = array(
|
65 |
+
'src' => str_replace( array( 'http:', 'https:' ), '', SP()->plugin_url() ) . '/assets/css/icons.css',
|
66 |
+
'deps' => '',
|
67 |
+
'version' => SP_ICONS_VERSION,
|
68 |
+
'media' => 'all'
|
69 |
+
);
|
70 |
+
return $styles;
|
71 |
+
}
|
72 |
+
|
73 |
+
/**
|
74 |
+
* Define icons.
|
75 |
+
*/
|
76 |
+
private function get_icons() {
|
77 |
+
$this->icons = apply_filters( 'sportspress_icons', array(
|
78 |
+
'soccerball',
|
79 |
+
'baseball',
|
80 |
+
'basketball',
|
81 |
+
'cricketball',
|
82 |
+
'shoe',
|
83 |
+
'card',
|
84 |
+
) );
|
85 |
+
}
|
86 |
+
|
87 |
+
/**
|
88 |
+
* Display vector icon.
|
89 |
+
*/
|
90 |
+
public function icon( $icon = '', $id = 0 ) {
|
91 |
+
if ( ! $id ) return $icon;
|
92 |
+
$meta = get_post_meta( $id, 'sp_icon', true );
|
93 |
+
if ( null !== $meta && in_array( $meta, $this->icons ) ) {
|
94 |
+
$color = get_post_meta( $id, 'sp_color', true );
|
95 |
+
$icon = '<i class="sp-icon-' . $meta . '" style="color:' . $color . '"></i>';
|
96 |
+
}
|
97 |
+
return $icon;
|
98 |
+
}
|
99 |
+
|
100 |
+
/**
|
101 |
+
* Replace icons with vectors when available.
|
102 |
+
*/
|
103 |
+
public function replace_icons( $icons = '', $id = 0, $value = 0 ) {
|
104 |
+
if ( ! $id || ! $value ) return $icons;
|
105 |
+
$icon = get_post_meta( $id, 'sp_icon', true );
|
106 |
+
if ( null !== $icon && in_array( $icon, $this->icons ) ) {
|
107 |
+
$title = get_the_title( $id );
|
108 |
+
$color = get_post_meta( $id, 'sp_color', true );
|
109 |
+
$icons = str_repeat( '<i class="sp-icon-' . $icon . '" title="' . $title . '" style="color:' . $color . '"></i>' . ' ', $value );
|
110 |
+
}
|
111 |
+
return $icons;
|
112 |
+
}
|
113 |
+
|
114 |
+
/**
|
115 |
+
* Post thumbnail HTML.
|
116 |
+
*/
|
117 |
+
public function admin_post_thumbnail_html( $content = '', $id = 0 ) {
|
118 |
+
// Bypass if no ID
|
119 |
+
if ( ! $id ) return $content;
|
120 |
+
|
121 |
+
// Bypass if not performance post type
|
122 |
+
$post_type = get_post_type( $id );
|
123 |
+
if ( 'sp_performance' !== $post_type ) return $content;
|
124 |
+
|
125 |
+
// Enqueue scripts
|
126 |
+
wp_enqueue_script( 'sp_iconpicker', SP()->plugin_url() . '/assets/js/admin/iconpicker.js', array( 'jquery', 'wp-color-picker', 'iris' ), SP_ICONS_VERSION, true );
|
127 |
+
|
128 |
+
// Get selected icon
|
129 |
+
$has_icon = has_post_thumbnail( $id );
|
130 |
+
$selected = get_post_meta( $id, 'sp_icon', true );
|
131 |
+
if ( $has_icon ) $selected = null;
|
132 |
+
|
133 |
+
// Generate icon selector
|
134 |
+
$icons = '';
|
135 |
+
foreach ( $this->icons as $icon ) {
|
136 |
+
$icons .= '<label class="button"><input name="sp_icon" type="radio" value="' . $icon . '" ' . checked( $selected, $icon, false ) . '></input><i class="sp-icon-' . $icon . '"></i></label>';
|
137 |
+
}
|
138 |
+
|
139 |
+
$icons .= '<label class="button"><input name="sp_icon" type="radio" value="" ' . checked( $selected, null, false ) . '></input>' . __( 'Image', 'sportspress' ) . '</label>';
|
140 |
+
|
141 |
+
// Get color value
|
142 |
+
$value = get_post_meta( $id, 'sp_color', true );
|
143 |
+
if ( empty( $value ) ) $value = '111111';
|
144 |
+
|
145 |
+
$color = '<div class="sp-icon-color-box"><input name="sp_color" id="sp_color" type="text" value="' . esc_attr( $value ) . '" size="7" class="colorpick" /> <div id="colorPickerDiv" class="colorpickdiv"></div></div>';
|
146 |
+
|
147 |
+
$content = '<p><strong>' . __( 'Select Icon', 'sportspress' ) . '</strong></p>
|
148 |
+
<p class="sp-icons">' . $icons . '</p>
|
149 |
+
<div class="sp-para sp-custom-colors' . ( $has_icon ? ' hidden' : '' ) . '"><label data-sp-colors="' . $value . '"><strong>' . __( 'Customize', 'sportspress' ) . '</strong><br></label>' . $color . '</div>
|
150 |
+
<div class="sp-custom-thumbnail' . ( $has_icon ? '' : ' hidden' ) . '">' . $content . '</div>';
|
151 |
+
return $content;
|
152 |
+
}
|
153 |
+
|
154 |
+
/**
|
155 |
+
* Save meta boxes data
|
156 |
+
*/
|
157 |
+
public static function save( $post_id, $post ) {
|
158 |
+
update_post_meta( $post_id, 'sp_icon', sp_array_value( $_POST, 'sp_icon', null ) );
|
159 |
+
update_post_meta( $post_id, 'sp_color', sp_array_value( $_POST, 'sp_color', null ) );
|
160 |
+
if ( null != sp_array_value( $_POST, 'sp_icon', null ) ) {
|
161 |
+
delete_post_thumbnail( $post );
|
162 |
+
}
|
163 |
+
}
|
164 |
+
}
|
165 |
+
|
166 |
+
endif;
|
167 |
+
|
168 |
+
new SportsPress_Icons();
|
modules/sportspress-individual-mode.php
CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://themeboy.com/
|
|
5 |
Description: Modify SportsPress to work with individual (player vs player) sports.
|
6 |
Author: ThemeBoy
|
7 |
Author URI: http://themeboy.com/
|
8 |
-
Version: 1.
|
9 |
*/
|
10 |
|
11 |
// Exit if accessed directly
|
@@ -17,7 +17,7 @@ if ( ! class_exists( 'SportsPress_Individual_Mode' ) ) :
|
|
17 |
* Main SportsPress Individual Mode Class
|
18 |
*
|
19 |
* @class SportsPress_Individual_Mode
|
20 |
-
* @version 1.
|
21 |
*/
|
22 |
class SportsPress_Individual_Mode {
|
23 |
|
@@ -29,6 +29,7 @@ class SportsPress_Individual_Mode {
|
|
29 |
$this->define_constants();
|
30 |
|
31 |
// Actions
|
|
|
32 |
add_action( 'sportspress_process_sp_event_meta', array( $this, 'save_player_meta' ), 99, 2 );
|
33 |
|
34 |
// Filters
|
@@ -44,23 +45,23 @@ class SportsPress_Individual_Mode {
|
|
44 |
add_filter( 'sportspress_next_steps', array( $this, 'remove_team_step' ), 99 );
|
45 |
add_filter( 'sportspress_modules', array( $this, 'rearrange_modules' ), 99 );
|
46 |
add_filter( 'sportspress_glance_items', array( $this, 'remove_glance_item' ), 99 );
|
47 |
-
add_filter( 'sportspress_shortcodes', array( $this, 'remove_shortcodes' ), 99 );
|
48 |
-
add_filter( 'sportspress_event_shortcodes', array( $this, 'remove_event_shortcodes' ), 99 );
|
49 |
add_filter( 'sportspress_player_admin_columns', array( $this, 'remove_team_column' ), 99 );
|
50 |
add_filter( 'sportspress_list_admin_columns', array( $this, 'remove_team_column' ), 99 );
|
51 |
add_filter( 'sportspress_staff_admin_columns', array( $this, 'remove_team_column' ), 99 );
|
52 |
add_filter( 'sportspress_directory_admin_columns', array( $this, 'remove_team_column' ), 99 );
|
53 |
add_filter( 'sportspress_importers', array( $this, 'remove_teams_importer' ), 99 );
|
54 |
add_filter( 'sportspress_permalink_slugs', array( $this, 'remove_team_permalink_slug' ), 99 );
|
|
|
|
|
55 |
add_filter( 'sportspress_event_team_tabs', '__return_false' );
|
56 |
add_filter( 'sportspress_player_team_statistics', '__return_false' );
|
57 |
add_filter( 'sportspress_player_teams', '__return_false' );
|
58 |
add_filter( 'sportspress_staff_teams', '__return_false' );
|
59 |
add_filter( 'sportspress_list_team_selector', '__return_false' );
|
60 |
-
add_filter( '
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
}
|
65 |
|
66 |
/**
|
@@ -68,7 +69,7 @@ class SportsPress_Individual_Mode {
|
|
68 |
*/
|
69 |
private function define_constants() {
|
70 |
if ( !defined( 'SP_INDIVIDUAL_MODE_VERSION' ) )
|
71 |
-
define( 'SP_INDIVIDUAL_MODE_VERSION', '1.
|
72 |
|
73 |
if ( !defined( 'SP_INDIVIDUAL_MODE_URL' ) )
|
74 |
define( 'SP_INDIVIDUAL_MODE_URL', plugin_dir_url( __FILE__ ) );
|
@@ -77,6 +78,23 @@ class SportsPress_Individual_Mode {
|
|
77 |
define( 'SP_INDIVIDUAL_MODE_DIR', plugin_dir_path( __FILE__ ) );
|
78 |
}
|
79 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
public function save_player_meta( $post_id, $post ) {
|
81 |
if ( isset( $_POST['sp_team'] ) && is_array( $_POST['sp_team'] ) ) {
|
82 |
$players = array();
|
@@ -229,26 +247,6 @@ class SportsPress_Individual_Mode {
|
|
229 |
return $items;
|
230 |
}
|
231 |
|
232 |
-
/**
|
233 |
-
* Remove shortcodes from editor.
|
234 |
-
*/
|
235 |
-
public function remove_shortcodes( $shortcodes ) {
|
236 |
-
if ( array_key_exists( 'event', $shortcodes ) ) {
|
237 |
-
if ( ( $index = array_search ( 'performance', $shortcodes['event'] ) ) !== false ) {
|
238 |
-
unset( $shortcodes['event'][ $index ] );
|
239 |
-
}
|
240 |
-
}
|
241 |
-
return $shortcodes;
|
242 |
-
}
|
243 |
-
|
244 |
-
/**
|
245 |
-
* Remove shortcodes from event meta box.
|
246 |
-
*/
|
247 |
-
public function remove_event_shortcodes( $shortcodes ) {
|
248 |
-
unset( $shortcodes['event_performance'] );
|
249 |
-
return $shortcodes;
|
250 |
-
}
|
251 |
-
|
252 |
/**
|
253 |
* Remove team column from player list admin.
|
254 |
*/
|
@@ -274,6 +272,39 @@ class SportsPress_Individual_Mode {
|
|
274 |
}
|
275 |
return $slugs;
|
276 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
277 |
}
|
278 |
|
279 |
endif;
|
5 |
Description: Modify SportsPress to work with individual (player vs player) sports.
|
6 |
Author: ThemeBoy
|
7 |
Author URI: http://themeboy.com/
|
8 |
+
Version: 1.9
|
9 |
*/
|
10 |
|
11 |
// Exit if accessed directly
|
17 |
* Main SportsPress Individual Mode Class
|
18 |
*
|
19 |
* @class SportsPress_Individual_Mode
|
20 |
+
* @version 1.9
|
21 |
*/
|
22 |
class SportsPress_Individual_Mode {
|
23 |
|
29 |
$this->define_constants();
|
30 |
|
31 |
// Actions
|
32 |
+
add_action( 'admin_head', array( $this, 'menu_highlight' ) );
|
33 |
add_action( 'sportspress_process_sp_event_meta', array( $this, 'save_player_meta' ), 99, 2 );
|
34 |
|
35 |
// Filters
|
45 |
add_filter( 'sportspress_next_steps', array( $this, 'remove_team_step' ), 99 );
|
46 |
add_filter( 'sportspress_modules', array( $this, 'rearrange_modules' ), 99 );
|
47 |
add_filter( 'sportspress_glance_items', array( $this, 'remove_glance_item' ), 99 );
|
|
|
|
|
48 |
add_filter( 'sportspress_player_admin_columns', array( $this, 'remove_team_column' ), 99 );
|
49 |
add_filter( 'sportspress_list_admin_columns', array( $this, 'remove_team_column' ), 99 );
|
50 |
add_filter( 'sportspress_staff_admin_columns', array( $this, 'remove_team_column' ), 99 );
|
51 |
add_filter( 'sportspress_directory_admin_columns', array( $this, 'remove_team_column' ), 99 );
|
52 |
add_filter( 'sportspress_importers', array( $this, 'remove_teams_importer' ), 99 );
|
53 |
add_filter( 'sportspress_permalink_slugs', array( $this, 'remove_team_permalink_slug' ), 99 );
|
54 |
+
add_filter( 'sportspress_primary_post_types', array( $this, 'primary_post_types' ) );
|
55 |
+
add_filter( 'sportspress_post_type_hierarchy', array( $this, 'post_type_hierarchy' ) );
|
56 |
add_filter( 'sportspress_event_team_tabs', '__return_false' );
|
57 |
add_filter( 'sportspress_player_team_statistics', '__return_false' );
|
58 |
add_filter( 'sportspress_player_teams', '__return_false' );
|
59 |
add_filter( 'sportspress_staff_teams', '__return_false' );
|
60 |
add_filter( 'sportspress_list_team_selector', '__return_false' );
|
61 |
+
add_filter( 'pre_option_sportspress_event_split_players_by_team', array( $this, 'no' ) );
|
62 |
+
add_filter( 'pre_option_sportspress_event_show_status', array( $this, 'no' ) );
|
63 |
+
add_filter( 'pre_option_sportspress_link_teams', array( $this, 'link_players' ) );
|
64 |
+
add_filter( 'sportspress_has_teams', '__return_false' );
|
65 |
}
|
66 |
|
67 |
/**
|
69 |
*/
|
70 |
private function define_constants() {
|
71 |
if ( !defined( 'SP_INDIVIDUAL_MODE_VERSION' ) )
|
72 |
+
define( 'SP_INDIVIDUAL_MODE_VERSION', '1.9' );
|
73 |
|
74 |
if ( !defined( 'SP_INDIVIDUAL_MODE_URL' ) )
|
75 |
define( 'SP_INDIVIDUAL_MODE_URL', plugin_dir_url( __FILE__ ) );
|
78 |
define( 'SP_INDIVIDUAL_MODE_DIR', plugin_dir_path( __FILE__ ) );
|
79 |
}
|
80 |
|
81 |
+
/**
|
82 |
+
* Return no.
|
83 |
+
*/
|
84 |
+
public function no() {
|
85 |
+
return 'no';
|
86 |
+
}
|
87 |
+
|
88 |
+
/**
|
89 |
+
* Return link players instead of teams.
|
90 |
+
*/
|
91 |
+
public function link_players() {
|
92 |
+
return get_option( 'sportspress_link_players', 'yes' );
|
93 |
+
}
|
94 |
+
|
95 |
+
/**
|
96 |
+
* Save teams as players in events.
|
97 |
+
*/
|
98 |
public function save_player_meta( $post_id, $post ) {
|
99 |
if ( isset( $_POST['sp_team'] ) && is_array( $_POST['sp_team'] ) ) {
|
100 |
$players = array();
|
247 |
return $items;
|
248 |
}
|
249 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
250 |
/**
|
251 |
* Remove team column from player list admin.
|
252 |
*/
|
272 |
}
|
273 |
return $slugs;
|
274 |
}
|
275 |
+
|
276 |
+
/**
|
277 |
+
* Remove the team primary post type.
|
278 |
+
*/
|
279 |
+
public function primary_post_types( $post_types ) {
|
280 |
+
if ( ( $key = array_search( 'sp_team', $post_types ) ) !== false ) {
|
281 |
+
unset( $post_types[ $key ] );
|
282 |
+
}
|
283 |
+
return $post_types;
|
284 |
+
}
|
285 |
+
|
286 |
+
/**
|
287 |
+
* Adjust post type hierarchy.
|
288 |
+
*/
|
289 |
+
public function post_type_hierarchy( $hierarchy ) {
|
290 |
+
$hierarchy['sp_player'] = array_merge( sp_array_value( $hierarchy, 'sp_player', array() ), sp_array_value( $hierarchy, 'sp_team', array() ) );
|
291 |
+
unset( $hierarchy['sp_team'] );
|
292 |
+
return $hierarchy;
|
293 |
+
}
|
294 |
+
|
295 |
+
/**
|
296 |
+
* Highlights the correct top level admin menu item for post type add screens.
|
297 |
+
*
|
298 |
+
* @access public
|
299 |
+
* @return void
|
300 |
+
*/
|
301 |
+
public function menu_highlight() {
|
302 |
+
global $typenow, $parent_file, $submenu_file;
|
303 |
+
if ( 'sp_table' == $typenow ) {
|
304 |
+
$parent_file = 'edit.php?post_type=sp_player';
|
305 |
+
$submenu_file = 'edit.php?post_type=sp_table';
|
306 |
+
}
|
307 |
+
}
|
308 |
}
|
309 |
|
310 |
endif;
|
modules/sportspress-lazy-loading.php
ADDED
@@ -0,0 +1,234 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
Plugin Name: SportsPress Lazy Loading
|
4 |
+
Plugin URI: http://tboy.co/pro
|
5 |
+
Description: Load players using Ajax to speed up the event edit screen.
|
6 |
+
Author: ThemeBoy
|
7 |
+
Author URI: http://themeboy.com
|
8 |
+
Version: 1.9.19
|
9 |
+
*/
|
10 |
+
|
11 |
+
// Exit if accessed directly
|
12 |
+
if ( ! defined( 'ABSPATH' ) ) exit;
|
13 |
+
|
14 |
+
if ( ! class_exists( 'SportsPress_Lazy_Loading' ) ) :
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Main SportsPress Lazy Loading Class
|
18 |
+
*
|
19 |
+
* @class SportsPress_Lazy_Loading
|
20 |
+
* @version 1.9.19
|
21 |
+
*/
|
22 |
+
class SportsPress_Lazy_Loading {
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Constructor
|
26 |
+
*/
|
27 |
+
public function __construct() {
|
28 |
+
add_action( 'wp_ajax_sp-get-players', array( $this, 'get_players' ) );
|
29 |
+
add_action( 'sportspress_event_teams_meta_box_checklist', array( $this, 'checklist' ), 10, 6 );
|
30 |
+
add_filter( 'sportspress_localized_strings', array( $this, 'strings' ) );
|
31 |
+
}
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Get players.
|
35 |
+
*/
|
36 |
+
public function get_players() {
|
37 |
+
check_ajax_referer( 'sp-get-players', 'nonce' );
|
38 |
+
|
39 |
+
$team = sp_array_value( $_POST, 'team' );
|
40 |
+
|
41 |
+
if ( 'yes' == get_option( 'sportspress_event_filter_teams_by_league', 'no' ) ) {
|
42 |
+
$league = sp_array_value( $_POST, 'league' );
|
43 |
+
} else {
|
44 |
+
$league = false;
|
45 |
+
}
|
46 |
+
|
47 |
+
if ( 'yes' == get_option( 'sportspress_event_filter_teams_by_season', 'no' ) ) {
|
48 |
+
$season = sp_array_value( $_POST, 'season' );
|
49 |
+
} else {
|
50 |
+
$season = false;
|
51 |
+
}
|
52 |
+
|
53 |
+
$index = sp_array_value( $_POST, 'index', 1 );
|
54 |
+
$selected = sp_array_value( $_POST, 'selected', array() );
|
55 |
+
|
56 |
+
$args = array(
|
57 |
+
'orderby' => 'menu_order',
|
58 |
+
);
|
59 |
+
|
60 |
+
if ( $team ) {
|
61 |
+
$args['meta_query'] = array(
|
62 |
+
array(
|
63 |
+
'key' => 'sp_current_team',
|
64 |
+
'value' => sp_array_value( $_POST, 'team' ),
|
65 |
+
),
|
66 |
+
);
|
67 |
+
}
|
68 |
+
|
69 |
+
if ( $league || $season ) {
|
70 |
+
$args['tax_query'] = array( 'relation' => 'AND' );
|
71 |
+
|
72 |
+
if ( $league ) {
|
73 |
+
$args['tax_query'][] = array(
|
74 |
+
'taxonomy' => 'sp_league',
|
75 |
+
'field' => 'id',
|
76 |
+
'terms' => $league,
|
77 |
+
);
|
78 |
+
}
|
79 |
+
|
80 |
+
if ( $season ) {
|
81 |
+
$args['tax_query'][] = array(
|
82 |
+
'taxonomy' => 'sp_season',
|
83 |
+
'field' => 'id',
|
84 |
+
'terms' => $season,
|
85 |
+
);
|
86 |
+
}
|
87 |
+
}
|
88 |
+
|
89 |
+
$player_args = $args;
|
90 |
+
$player_args['meta_key'] = 'sp_number';
|
91 |
+
$player_args['orderby'] = 'meta_value_num';
|
92 |
+
$player_args['order'] = 'ASC';
|
93 |
+
|
94 |
+
$players = sp_get_posts( 'sp_player', $player_args );
|
95 |
+
$staff = sp_get_posts( 'sp_staff', $args );
|
96 |
+
$data = array( 'index' => $index );
|
97 |
+
|
98 |
+
foreach ( $players as $key => $value ) {
|
99 |
+
$players[ $key ]->post_title = sp_get_player_name_with_number( $value->ID );
|
100 |
+
}
|
101 |
+
|
102 |
+
$data['players'] = $players;
|
103 |
+
$data['staff'] = $staff;
|
104 |
+
$data['sections'] = get_option( 'sportspress_event_performance_sections', -1 );
|
105 |
+
|
106 |
+
wp_send_json_success( $data );
|
107 |
+
}
|
108 |
+
|
109 |
+
/**
|
110 |
+
* Ajax checklist.
|
111 |
+
*/
|
112 |
+
public function checklist( $post_id = null, $post_type = 'post', $display = 'block', $team = null, $index = null, $slug = null ) {
|
113 |
+
if ( ! isset( $slug ) ):
|
114 |
+
$slug = $post_type;
|
115 |
+
endif;
|
116 |
+
|
117 |
+
$selected = (array)get_post_meta( $post_id, $slug, false );
|
118 |
+
if ( sizeof( $selected ) ) {
|
119 |
+
$selected = sp_array_between( $selected, 0, $index );
|
120 |
+
} else {
|
121 |
+
$selected = sp_array_between( (array)get_post_meta( $post_id, $post_type, false ), 0, $index );
|
122 |
+
}
|
123 |
+
|
124 |
+
if ( 'yes' == get_option( 'sportspress_event_filter_teams_by_league', 'no' ) ) {
|
125 |
+
$leagues = get_the_terms( $post_id, 'sp_league' );
|
126 |
+
} else {
|
127 |
+
$leagues = false;
|
128 |
+
}
|
129 |
+
|
130 |
+
if ( 'yes' == get_option( 'sportspress_event_filter_teams_by_season', 'no' ) ) {
|
131 |
+
$seasons = get_the_terms( $post_id, 'sp_season' );
|
132 |
+
} else {
|
133 |
+
$seasons = false;
|
134 |
+
}
|
135 |
+
|
136 |
+
$args = array(
|
137 |
+
'orderby' => 'menu_order',
|
138 |
+
);
|
139 |
+
|
140 |
+
if ( 'sp_player' == $post_type ):
|
141 |
+
$args['meta_key'] = 'sp_number';
|
142 |
+
$args['orderby'] = 'meta_value_num';
|
143 |
+
$args['order'] = 'ASC';
|
144 |
+
endif;
|
145 |
+
|
146 |
+
$args['meta_query'] = array(
|
147 |
+
array(
|
148 |
+
'key' => 'sp_current_team',
|
149 |
+
'value' => $team,
|
150 |
+
),
|
151 |
+
);
|
152 |
+
|
153 |
+
if ( $leagues || $seasons ) {
|
154 |
+
$args['tax_query'] = array( 'relation' => 'AND' );
|
155 |
+
|
156 |
+
if ( $leagues ) {
|
157 |
+
$args['tax_query'][] = array(
|
158 |
+
'taxonomy' => 'sp_league',
|
159 |
+
'field' => 'id',
|
160 |
+
'terms' => wp_list_pluck( $leagues, 'term_id' ),
|
161 |
+
);
|
162 |
+
}
|
163 |
+
|
164 |
+
if ( $seasons ) {
|
165 |
+
$args['tax_query'][] = array(
|
166 |
+
'taxonomy' => 'sp_season',
|
167 |
+
'field' => 'id',
|
168 |
+
'terms' => wp_list_pluck( $seasons, 'term_id' ),
|
169 |
+
);
|
170 |
+
}
|
171 |
+
}
|
172 |
+
|
173 |
+
$posts = sp_get_posts( $post_type, $args );
|
174 |
+
$post_ids = wp_list_pluck( $posts, 'ID' );
|
175 |
+
$diff = array_diff( $post_ids, $selected );
|
176 |
+
$selected = array_flip( $selected );
|
177 |
+
?>
|
178 |
+
<div id="<?php echo $slug; ?>-all" class="posttypediv wp-tab-panel sp-tab-panel sp-ajax-checklist sp-select-all-range" style="display: <?php echo $display; ?>;">
|
179 |
+
<input type="hidden" value="0" name="<?php echo $slug; ?><?php if ( isset( $index ) ) echo '[' . $index . ']'; ?>[]" />
|
180 |
+
<ul class="categorychecklist form-no-clear">
|
181 |
+
<?php if ( is_array( $posts ) && sizeof( $posts ) ) { ?>
|
182 |
+
<li class="sp-select-all-container">
|
183 |
+
<label class="selectit">
|
184 |
+
<input type="checkbox" class="sp-select-all" <?php checked( empty( $diff ) ); ?>>
|
185 |
+
<strong><?php _e( 'Select All', 'sportspress' ); ?></strong>
|
186 |
+
</label>
|
187 |
+
</li>
|
188 |
+
<?php foreach ( $posts as $post ) { ?>
|
189 |
+
<li>
|
190 |
+
<label class="selectit">
|
191 |
+
<input type="checkbox" value="<?php echo $post->ID; ?>" name="<?php echo $slug; ?><?php if ( isset( $index ) ) echo '[' . $index . ']'; ?>[]" <?php checked( array_key_exists( $post->ID, $selected ) ); ?>>
|
192 |
+
<?php echo sp_get_player_name_with_number( $post->ID ); ?>
|
193 |
+
</label>
|
194 |
+
</li>
|
195 |
+
<?php unset( $selected[ $post->ID ] ); ?>
|
196 |
+
<?php } ?>
|
197 |
+
<?php if ( is_array( $selected ) && sizeof( $selected ) ) { foreach ( $selected as $post_id => $post ) { ?>
|
198 |
+
<?php if ( ! $post_id ) continue; ?>
|
199 |
+
<li>
|
200 |
+
<label class="selectit">
|
201 |
+
<input type="checkbox" value="<?php echo $post_id; ?>" name="<?php echo $slug; ?><?php if ( isset( $index ) ) echo '[' . $index . ']'; ?>[]" <?php checked( true ); ?>>
|
202 |
+
<?php echo sp_get_player_name_with_number( $post_id ); ?>
|
203 |
+
</label>
|
204 |
+
</li>
|
205 |
+
<?php } } ?>
|
206 |
+
<li class="sp-ajax-show-all-container"><a class="sp-ajax-show-all" href="#show-all-<?php echo $slug; ?>s"><?php _e( 'Show all', 'sportspress' ); ?></a></li>
|
207 |
+
<?php } else { ?>
|
208 |
+
<li class="sp-ajax-show-all-container"><?php _e( 'No results found.', 'sportspress' ); ?>
|
209 |
+
<a class="sp-ajax-show-all" href="#show-all-<?php echo $slug; ?>s"><?php _e( 'Show all', 'sportspress' ); ?></a></li>
|
210 |
+
<?php } ?>
|
211 |
+
</ul>
|
212 |
+
</div>
|
213 |
+
<?php
|
214 |
+
}
|
215 |
+
|
216 |
+
/*
|
217 |
+
* Localized strings.
|
218 |
+
*/
|
219 |
+
public function strings( $strings ) {
|
220 |
+
$strings = array_merge( $strings, array(
|
221 |
+
'no_results_found' => __( 'No results found.', 'sportspress' ),
|
222 |
+
'select_all' => __( 'Select All', 'sportspress' ),
|
223 |
+
'show_all' => __( 'Show all', 'sportspress' ),
|
224 |
+
'loading' => __( 'Loading…', 'sportspress' ),
|
225 |
+
'option_filter_by_league' => get_option( 'sportspress_event_filter_teams_by_league', 'no' ),
|
226 |
+
'option_filter_by_season' => get_option( 'sportspress_event_filter_teams_by_season', 'no' ),
|
227 |
+
) ) ;
|
228 |
+
return $strings;
|
229 |
+
}
|
230 |
+
}
|
231 |
+
|
232 |
+
endif;
|
233 |
+
|
234 |
+
new SportsPress_Lazy_Loading();
|
modules/sportspress-player-lists.php
CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://themeboy.com/
|
|
5 |
Description: Add player lists to SportsPress.
|
6 |
Author: ThemeBoy
|
7 |
Author URI: http://themeboy.com/
|
8 |
-
Version: 1.
|
9 |
*/
|
10 |
|
11 |
// Exit if accessed directly
|
@@ -17,7 +17,7 @@ if ( ! class_exists( 'SportsPress_Player_Lists' ) ) :
|
|
17 |
* Main SportsPress Player Lists Class
|
18 |
*
|
19 |
* @class SportsPress_Player_Lists
|
20 |
-
* @version 1.
|
21 |
*/
|
22 |
class SportsPress_Player_Lists {
|
23 |
|
@@ -45,7 +45,7 @@ class SportsPress_Player_Lists {
|
|
45 |
*/
|
46 |
private function define_constants() {
|
47 |
if ( !defined( 'SP_PLAYER_LISTS_VERSION' ) )
|
48 |
-
define( 'SP_PLAYER_LISTS_VERSION', '1.
|
49 |
|
50 |
if ( !defined( 'SP_PLAYER_LISTS_URL' ) )
|
51 |
define( 'SP_PLAYER_LISTS_URL', plugin_dir_url( __FILE__ ) );
|
@@ -94,6 +94,7 @@ class SportsPress_Player_Lists {
|
|
94 |
* Remove meta boxes.
|
95 |
*/
|
96 |
public function remove_meta_boxes() {
|
|
|
97 |
remove_meta_box( 'sp_seasondiv', 'sp_list', 'side' );
|
98 |
remove_meta_box( 'sp_leaguediv', 'sp_list', 'side' );
|
99 |
}
|
@@ -210,6 +211,15 @@ class SportsPress_Player_Lists {
|
|
210 |
'id' => 'sportspress_list_show_photos',
|
211 |
'default' => 'no',
|
212 |
'type' => 'checkbox',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
213 |
),
|
214 |
|
215 |
array(
|
5 |
Description: Add player lists to SportsPress.
|
6 |
Author: ThemeBoy
|
7 |
Author URI: http://themeboy.com/
|
8 |
+
Version: 1.9.17
|
9 |
*/
|
10 |
|
11 |
// Exit if accessed directly
|
17 |
* Main SportsPress Player Lists Class
|
18 |
*
|
19 |
* @class SportsPress_Player_Lists
|
20 |
+
* @version 1.9
|
21 |
*/
|
22 |
class SportsPress_Player_Lists {
|
23 |
|
45 |
*/
|
46 |
private function define_constants() {
|
47 |
if ( !defined( 'SP_PLAYER_LISTS_VERSION' ) )
|
48 |
+
define( 'SP_PLAYER_LISTS_VERSION', '1.9' );
|
49 |
|
50 |
if ( !defined( 'SP_PLAYER_LISTS_URL' ) )
|
51 |
define( 'SP_PLAYER_LISTS_URL', plugin_dir_url( __FILE__ ) );
|
94 |
* Remove meta boxes.
|
95 |
*/
|
96 |
public function remove_meta_boxes() {
|
97 |
+
remove_meta_box( 'sp_positiondiv', 'sp_list', 'side' );
|
98 |
remove_meta_box( 'sp_seasondiv', 'sp_list', 'side' );
|
99 |
remove_meta_box( 'sp_leaguediv', 'sp_list', 'side' );
|
100 |
}
|
211 |
'id' => 'sportspress_list_show_photos',
|
212 |
'default' => 'no',
|
213 |
'type' => 'checkbox',
|
214 |
+
'checkboxgroup' => 'start',
|
215 |
+
),
|
216 |
+
|
217 |
+
array(
|
218 |
+
'desc' => __( 'Display national flags', 'sportspress' ),
|
219 |
+
'id' => 'sportspress_list_show_flags',
|
220 |
+
'default' => 'no',
|
221 |
+
'type' => 'checkbox',
|
222 |
+
'checkboxgroup' => 'end',
|
223 |
),
|
224 |
|
225 |
array(
|
modules/sportspress-template-selector.php
ADDED
@@ -0,0 +1,191 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
Plugin Name: SportsPress Template Selector
|
4 |
+
Plugin URI: http://themeboy.com/
|
5 |
+
Description: Add a template selector to SportsPress post types.
|
6 |
+
Author: ThemeBoy
|
7 |
+
Author URI: http://themeboy.com/
|
8 |
+
Version: 1.9
|
9 |
+
*/
|
10 |
+
|
11 |
+
// Exit if accessed directly
|
12 |
+
if ( ! defined( 'ABSPATH' ) ) exit;
|
13 |
+
|
14 |
+
if ( ! class_exists( 'SportsPress_Template_Selector' ) ) :
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Main SportsPress Template Selector Class
|
18 |
+
*
|
19 |
+
* @class SportsPress_Template_Selector
|
20 |
+
* @version 1.9
|
21 |
+
*/
|
22 |
+
class SportsPress_Template_Selector {
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Constructor
|
26 |
+
*/
|
27 |
+
public function __construct() {
|
28 |
+
// Define constants
|
29 |
+
$this->define_constants();
|
30 |
+
|
31 |
+
// Hooks
|
32 |
+
add_filter( 'sportspress_event_options', array( $this, 'event_options' ) );
|
33 |
+
add_filter( 'sportspress_calendar_options', array( $this, 'calendar_options' ) );
|
34 |
+
add_filter( 'sportspress_team_options', array( $this, 'team_options' ) );
|
35 |
+
add_filter( 'sportspress_table_options', array( $this, 'table_options' ) );
|
36 |
+
add_filter( 'sportspress_player_options', array( $this, 'player_options' ) );
|
37 |
+
add_filter( 'sportspress_player_list_options', array( $this, 'list_options' ) );
|
38 |
+
add_filter( 'sportspress_staff_options', array( $this, 'staff_options' ) );
|
39 |
+
add_filter( 'sportspress_post_type_options', array( $this, 'post_type_options' ), 10, 2 );
|
40 |
+
add_filter( 'sportspress_event_settings', array( $this, 'add_event_settings' ), 9);
|
41 |
+
add_filter( 'template_include', array( $this, 'template_loader' ), 99 );
|
42 |
+
}
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Define constants.
|
46 |
+
*/
|
47 |
+
private function define_constants() {
|
48 |
+
if ( !defined( 'SP_TEMPLATE_SELECTOR_VERSION' ) )
|
49 |
+
define( 'SP_TEMPLATE_SELECTOR_VERSION', '1.9' );
|
50 |
+
|
51 |
+
if ( !defined( 'SP_TEMPLATE_SELECTOR_URL' ) )
|
52 |
+
define( 'SP_TEMPLATE_SELECTOR_URL', plugin_dir_url( __FILE__ ) );
|
53 |
+
|
54 |
+
if ( !defined( 'SP_TEMPLATE_SELECTOR_DIR' ) )
|
55 |
+
define( 'SP_TEMPLATE_SELECTOR_DIR', plugin_dir_path( __FILE__ ) );
|
56 |
+
}
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Add option to event post type.
|
60 |
+
*/
|
61 |
+
public function event_options( $options ) {
|
62 |
+
return $this->options( $options, 'event' );
|
63 |
+
}
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Add option to calendar post type.
|
67 |
+
*/
|
68 |
+
public function calendar_options( $options ) {
|
69 |
+
return $this->options( $options, 'calendar' );
|
70 |
+
}
|
71 |
+
|
72 |
+
/**
|
73 |
+
* Add option to team post type.
|
74 |
+
*/
|
75 |
+
public function team_options( $options ) {
|
76 |
+
if ( apply_filters( 'sportspress_has_teams', true ) ) {
|
77 |
+
return $this->options( $options, 'team' );
|
78 |
+
}
|
79 |
+
return $options;
|
80 |
+
}
|
81 |
+
|
82 |
+
/**
|
83 |
+
* Add option to league table post type.
|
84 |
+
*/
|
85 |
+
public function table_options( $options ) {
|
86 |
+
return $this->options( $options, 'table' );
|
87 |
+
}
|
88 |
+
|
89 |
+
/**
|
90 |
+
* Add option to player post type.
|
91 |
+
*/
|
92 |
+
public function player_options( $options ) {
|
93 |
+
return $this->options( $options, 'player' );
|
94 |
+
}
|
95 |
+
|
96 |
+
/**
|
97 |
+
* Add option to player list post type.
|
98 |
+
*/
|
99 |
+
public function list_options( $options ) {
|
100 |
+
return $this->options( $options, 'list' );
|
101 |
+
}
|
102 |
+
|
103 |
+
/**
|
104 |
+
* Add option to staff post type.
|
105 |
+
*/
|
106 |
+
public function staff_options( $options ) {
|
107 |
+
return $this->options( $options, 'staff' );
|
108 |
+
}
|
109 |
+
|
110 |
+
/**
|
111 |
+
* Filter for other post types.
|
112 |
+
*/
|
113 |
+
public function post_type_options( $options = array(), $post_type = null ) {
|
114 |
+
if ( null == $post_type ) {
|
115 |
+
return $options;
|
116 |
+
}
|
117 |
+
|
118 |
+
return $this->options( $options, $post_type );
|
119 |
+
}
|
120 |
+
|
121 |
+
/**
|
122 |
+
* Add template option.
|
123 |
+
*/
|
124 |
+
public function options( $options, $post_type ) {
|
125 |
+
// Get page templates from current theme
|
126 |
+
$templates = wp_get_theme()->get_page_templates( get_post() );
|
127 |
+
|
128 |
+
// Sort options alphabetically
|
129 |
+
asort( $templates );
|
130 |
+
|
131 |
+
// Add default option
|
132 |
+
$templates = array_merge( array( 'default' => __( 'Default Template', 'sportspress' ) ), $templates );
|
133 |
+
|
134 |
+
$options = array_merge( array(
|
135 |
+
array(
|
136 |
+
'title' => __( 'Template', 'sportspress' ),
|
137 |
+
'id' => 'sportspress_' . $post_type . '_page_template',
|
138 |
+
'default' => 'default',
|
139 |
+
'type' => 'select',
|
140 |
+
'options' => $templates,
|
141 |
+
),
|
142 |
+
), $options );
|
143 |
+
|
144 |
+
return $options;
|
145 |
+
}
|
146 |
+
|
147 |
+
/**
|
148 |
+
* Load page template.
|
149 |
+
*/
|
150 |
+
public function template_loader( $template ) {
|
151 |
+
if ( is_single() ) {
|
152 |
+
$post_type = get_post_type();
|
153 |
+
|
154 |
+
if ( is_sp_post_type( $post_type ) ) {
|
155 |
+
$option = get_option( 'sportspress_' . str_replace( 'sp_', '', $post_type ) . '_page_template', 'default' );
|
156 |
+
if ( 'default' !== $option ) {
|
157 |
+
$new_template = locate_template( array( $option ) );
|
158 |
+
if ( '' != $new_template ) {
|
159 |
+
return $new_template ;
|
160 |
+
}
|
161 |
+
}
|
162 |
+
}
|
163 |
+
}
|
164 |
+
|
165 |
+
return $template;
|
166 |
+
}
|
167 |
+
|
168 |
+
/**
|
169 |
+
* Add event settings.
|
170 |
+
*
|
171 |
+
* @return array
|
172 |
+
*/
|
173 |
+
public function add_event_settings( $settings ) {
|
174 |
+
$settings = array_merge( $settings,
|
175 |
+
array(
|
176 |
+
array( 'title' => __( 'Calendars', 'sportspress' ), 'type' => 'title', 'id' => 'calendar_options' ),
|
177 |
+
),
|
178 |
+
|
179 |
+
apply_filters( 'sportspress_calendar_options', array() ),
|
180 |
+
|
181 |
+
array(
|
182 |
+
array( 'type' => 'sectionend', 'id' => 'calendar_options' ),
|
183 |
+
)
|
184 |
+
);
|
185 |
+
return $settings;
|
186 |
+
}
|
187 |
+
}
|
188 |
+
|
189 |
+
endif;
|
190 |
+
|
191 |
+
new SportsPress_Template_Selector();
|
modules/sportspress-tutorials.php
CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://themeboy.com/
|
|
5 |
Description: Display SportsPress video tutorials.
|
6 |
Author: ThemeBoy
|
7 |
Author URI: http://themeboy.com/
|
8 |
-
Version: 1.
|
9 |
*/
|
10 |
|
11 |
// Exit if accessed directly
|
@@ -17,7 +17,7 @@ if ( ! class_exists( 'SportsPress_Tutorials' ) ) :
|
|
17 |
* Main SportsPress Tutorials Class
|
18 |
*
|
19 |
* @class SportsPress_Tutorials
|
20 |
-
* @version 1.
|
21 |
*/
|
22 |
class SportsPress_Tutorials {
|
23 |
|
@@ -44,7 +44,7 @@ class SportsPress_Tutorials {
|
|
44 |
*/
|
45 |
private function define_constants() {
|
46 |
if ( !defined( 'SP_TUTORIALS_VERSION' ) )
|
47 |
-
define( 'SP_TUTORIALS_VERSION', '1.
|
48 |
|
49 |
if ( !defined( 'SP_TUTORIALS_URL' ) )
|
50 |
define( 'SP_TUTORIALS_URL', plugin_dir_url( __FILE__ ) );
|
@@ -90,7 +90,7 @@ class SportsPress_Tutorials {
|
|
90 |
) ),
|
91 |
__( 'Events', 'sportspress' ) => apply_filters( 'sportspress_event_advanced_videos', array(
|
92 |
__( 'Event Outcomes', 'sportspress' ) . ' ' . __( '(Auto)', 'sportspress' ) => '//www.youtube-nocookie.com/embed/pCVfPv2O5yY?rel=0&showinfo=0',
|
93 |
-
__( '
|
94 |
) ),
|
95 |
__( 'Calendars', 'sportspress' ) => apply_filters( 'sportspress_calendar_advanced_videos', array(
|
96 |
__( 'Layout', 'sportspress' ) => '//www.youtube-nocookie.com/embed/aLx_5D0Xgnc?rel=0&showinfo=0',
|
@@ -137,10 +137,10 @@ class SportsPress_Tutorials {
|
|
137 |
}
|
138 |
$i = 0;
|
139 |
?>
|
140 |
-
<h2 class="nav-tab-wrapper">
|
141 |
-
<?php foreach ( $tabs as $name => $label ): ?><a href="<?php echo admin_url( 'admin.php?page=sportspress-tutorials&tab=' . $name ); ?>" class="nav-tab <?php echo ( $current_tab == $name ? 'nav-tab-active' : '' ); ?>"><?php echo $label; ?></a><?php endforeach; ?>
|
142 |
-
</h2>
|
143 |
<div class="wrap sportspress sportspress-tutorials-wrap">
|
|
|
|
|
|
|
144 |
<div class="sp-tutorials-main">
|
145 |
<?php foreach ( $this->ids[$current_tab] as $section => $urls ) { ?>
|
146 |
<h3><?php echo $section; ?></h3>
|
5 |
Description: Display SportsPress video tutorials.
|
6 |
Author: ThemeBoy
|
7 |
Author URI: http://themeboy.com/
|
8 |
+
Version: 1.9.6
|
9 |
*/
|
10 |
|
11 |
// Exit if accessed directly
|
17 |
* Main SportsPress Tutorials Class
|
18 |
*
|
19 |
* @class SportsPress_Tutorials
|
20 |
+
* @version 1.9.6
|
21 |
*/
|
22 |
class SportsPress_Tutorials {
|
23 |
|
44 |
*/
|
45 |
private function define_constants() {
|
46 |
if ( !defined( 'SP_TUTORIALS_VERSION' ) )
|
47 |
+
define( 'SP_TUTORIALS_VERSION', '1.9.6' );
|
48 |
|
49 |
if ( !defined( 'SP_TUTORIALS_URL' ) )
|
50 |
define( 'SP_TUTORIALS_URL', plugin_dir_url( __FILE__ ) );
|
90 |
) ),
|
91 |
__( 'Events', 'sportspress' ) => apply_filters( 'sportspress_event_advanced_videos', array(
|
92 |
__( 'Event Outcomes', 'sportspress' ) . ' ' . __( '(Auto)', 'sportspress' ) => '//www.youtube-nocookie.com/embed/pCVfPv2O5yY?rel=0&showinfo=0',
|
93 |
+
__( 'Scorecard', 'sportspress' ) => '//www.youtube-nocookie.com/embed/rERU6X7vjTc?rel=0&showinfo=0',
|
94 |
) ),
|
95 |
__( 'Calendars', 'sportspress' ) => apply_filters( 'sportspress_calendar_advanced_videos', array(
|
96 |
__( 'Layout', 'sportspress' ) => '//www.youtube-nocookie.com/embed/aLx_5D0Xgnc?rel=0&showinfo=0',
|
137 |
}
|
138 |
$i = 0;
|
139 |
?>
|
|
|
|
|
|
|
140 |
<div class="wrap sportspress sportspress-tutorials-wrap">
|
141 |
+
<h2 class="nav-tab-wrapper">
|
142 |
+
<?php foreach ( $tabs as $name => $label ): ?><a href="<?php echo admin_url( 'admin.php?page=sportspress-tutorials&tab=' . $name ); ?>" class="nav-tab <?php echo ( $current_tab == $name ? 'nav-tab-active' : '' ); ?>"><?php echo $label; ?></a><?php endforeach; ?>
|
143 |
+
</h2>
|
144 |
<div class="sp-tutorials-main">
|
145 |
<?php foreach ( $this->ids[$current_tab] as $section => $urls ) { ?>
|
146 |
<h3><?php echo $section; ?></h3>
|
presets/racket-sports/squash.json
CHANGED
@@ -25,8 +25,8 @@
|
|
25 |
{ "name" : "Pts", "equation" : "$pointsfor - $pointsagainst", "priority" : 2, "description" : "Total points" }
|
26 |
],
|
27 |
"metrics": [
|
28 |
-
"Height",
|
29 |
-
"Weight"
|
30 |
],
|
31 |
"statistics": [
|
32 |
]
|
25 |
{ "name" : "Pts", "equation" : "$pointsfor - $pointsagainst", "priority" : 2, "description" : "Total points" }
|
26 |
],
|
27 |
"metrics": [
|
28 |
+
{ "name" : "Height", "description" : "Player height" },
|
29 |
+
{ "name" : "Weight", "description" : "Player weight" }
|
30 |
],
|
31 |
"statistics": [
|
32 |
]
|
presets/target-sports/golf.json
ADDED
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "Golf",
|
3 |
+
"positions": [
|
4 |
+
],
|
5 |
+
"outcomes": [
|
6 |
+
{ "name" : "Win", "condition" : "<", "description" : "Won" },
|
7 |
+
{ "name" : "Finish", "condition" : "else", "description" : "Finished" }
|
8 |
+
],
|
9 |
+
"results": [
|
10 |
+
{ "name" : "Par", "equation" : "$strokes - $par", "description" : "Reported score", "primary" : 1 },
|
11 |
+
{ "name" : "FH", "description" : "Fairways hit" },
|
12 |
+
{ "name" : "GIR", "description" : "Greens in regulation" },
|
13 |
+
{ "name" : "Avg. Drive", "id" : "avgdrive", "description" : "Average drive (yards)" },
|
14 |
+
{ "name" : "Putts", "description" : "Number of putts" },
|
15 |
+
{ "name" : "Score", "equation" : "$strokes", "description" : "Total score" }
|
16 |
+
],
|
17 |
+
"performance": [
|
18 |
+
{ "name" : "1", "id" : "one", "description" : "Hole 1" },
|
19 |
+
{ "name" : "2", "id" : "two", "description" : "Hole 2" },
|
20 |
+
{ "name" : "3", "id" : "three", "description" : "Hole 3" },
|
21 |
+
{ "name" : "4", "id" : "four", "description" : "Hole 4" },
|
22 |
+
{ "name" : "5", "id" : "five", "description" : "Hole 5" },
|
23 |
+
{ "name" : "6", "id" : "six", "description" : "Hole 6" },
|
24 |
+
{ "name" : "7", "id" : "seven", "description" : "Hole 7" },
|
25 |
+
{ "name" : "8", "id" : "eight", "description" : "Hole 8" },
|
26 |
+
{ "name" : "9", "id" : "nine", "description" : "Hole 9" },
|
27 |
+
{ "name" : "10", "id" : "ten", "description" : "Hole 10" },
|
28 |
+
{ "name" : "11", "id" : "eleven", "description" : "Hole 11" },
|
29 |
+
{ "name" : "12", "id" : "twelve", "description" : "Hole 12" },
|
30 |
+
{ "name" : "13", "id" : "thirteen", "description" : "Hole 13" },
|
31 |
+
{ "name" : "14", "id" : "fourteen", "description" : "Hole 14" },
|
32 |
+
{ "name" : "15", "id" : "fifteen", "description" : "Hole 15" },
|
33 |
+
{ "name" : "16", "id" : "sixteen", "description" : "Hole 16" },
|
34 |
+
{ "name" : "17", "id" : "seventeen", "description" : "Hole 17" },
|
35 |
+
{ "name" : "18", "id" : "eighteen", "description" : "Hole 18" }
|
36 |
+
],
|
37 |
+
"columns": [
|
38 |
+
{ "name" : "Par", "equation" : "$parfor", "priority" : 1, "order" : "ASC", "description" : "Reported score" },
|
39 |
+
{ "name" : "R1", "equation" : "$scorefor 1", "description" : "Round 1 Score" },
|
40 |
+
{ "name" : "R2", "equation" : "$scorefor 2", "description" : "Round 2 Score" },
|
41 |
+
{ "name" : "R3", "equation" : "$scorefor 3", "description" : "Round 3 Score" },
|
42 |
+
{ "name" : "R4", "equation" : "$scorefor 4", "description" : "Round 4 Score" },
|
43 |
+
{ "name" : "Total", "equation" : "$scorefor", "priority" : 2, "order" : "ASC", "description" : "Total Score" }
|
44 |
+
],
|
45 |
+
"metrics": [
|
46 |
+
{ "name" : "Height", "description" : "Player height" },
|
47 |
+
{ "name" : "Weight", "description" : "Player weight" }
|
48 |
+
],
|
49 |
+
"statistics": [
|
50 |
+
{ "name" : "P", "equation" : "$eventsplayed", "description" : "Events played" },
|
51 |
+
{ "name" : "FH", "equation" : "$fhfor", "description" : "Fairways hit" },
|
52 |
+
{ "name" : "GIR", "equation" : "$girfor", "description" : "Greens in regulation" }
|
53 |
+
],
|
54 |
+
"options": {
|
55 |
+
"event_teams" : "0",
|
56 |
+
"event_show_players" : "yes",
|
57 |
+
"event_show_total" : "no",
|
58 |
+
"sportspress_event_performance_mode" : "values",
|
59 |
+
"event_show_player_numbers" : "no",
|
60 |
+
"event_split_players_by_team" : "no",
|
61 |
+
"event_split_players_by_position" : "no",
|
62 |
+
"event_performance_sections" : -1,
|
63 |
+
"load_individual_mode_module" : "yes"
|
64 |
+
}
|
65 |
+
}
|
presets/team-sports/baseball.json
CHANGED
@@ -16,7 +16,8 @@
|
|
16 |
},
|
17 |
"outcomes": [
|
18 |
{ "name" : "Win", "condition" : ">" },
|
19 |
-
{ "name" : "Loss", "condition" : "<" }
|
|
|
20 |
],
|
21 |
"results": [
|
22 |
{ "name" : "1", "description" : "1st inning runs" },
|
@@ -34,24 +35,24 @@
|
|
34 |
{ "name" : "E", "description" : "Errors" }
|
35 |
],
|
36 |
"performance": [
|
37 |
-
{ "name" : "AB", "
|
38 |
-
{ "name" : "R", "
|
39 |
-
{ "name" : "H", "
|
40 |
-
{ "name" : "RBI", "
|
41 |
-
{ "name" : "2B", "id" : "doubles", "
|
42 |
-
{ "name" : "3B", "id" : "triples", "
|
43 |
-
{ "name" : "HR", "
|
44 |
-
{ "name" : "SB", "
|
45 |
-
{ "name" : "BB", "
|
46 |
-
{ "name" : "SO", "
|
47 |
-
{ "name" : "LOB", "
|
48 |
-
{ "name" : "IP", "id" : "pitcher_ip", "
|
49 |
-
{ "name" : "H", "id" : "pitcher_h", "
|
50 |
-
{ "name" : "R", "id" : "pitcher_r", "
|
51 |
-
{ "name" : "ER", "id" : "pitcher_er", "
|
52 |
-
{ "name" : "BB", "id" : "pitcher_bb", "
|
53 |
-
{ "name" : "SO", "id" : "pitcher_so", "
|
54 |
-
{ "name" : "HR", "id" : "pitcher_hr", "
|
55 |
],
|
56 |
"columns": [
|
57 |
{ "name" : "W", "equation" : "$win", "description" : "Wins" },
|
@@ -79,7 +80,6 @@
|
|
79 |
"event_teams" : "2",
|
80 |
"sportspress_event_hide_child_positions" : "yes",
|
81 |
"event_show_players" : "yes",
|
82 |
-
"event_show_extras" : "no",
|
83 |
"event_show_total" : "yes",
|
84 |
"sportspress_event_results_reverse_teams" : "yes",
|
85 |
"sportspress_event_performance_mode" : "values",
|
@@ -87,6 +87,7 @@
|
|
87 |
"event_show_player_numbers" : "no",
|
88 |
"event_split_players_by_team" : "yes",
|
89 |
"event_split_players_by_position" : "yes",
|
90 |
-
"sportspress_event_total_performance" : "all"
|
|
|
91 |
}
|
92 |
}
|
16 |
},
|
17 |
"outcomes": [
|
18 |
{ "name" : "Win", "condition" : ">" },
|
19 |
+
{ "name" : "Loss", "condition" : "<" },
|
20 |
+
{ "name" : "Tie", "condition" : "=" }
|
21 |
],
|
22 |
"results": [
|
23 |
{ "name" : "1", "description" : "1st inning runs" },
|
35 |
{ "name" : "E", "description" : "Errors" }
|
36 |
],
|
37 |
"performance": [
|
38 |
+
{ "name" : "AB", "section" : 0, "description" : "At bat" },
|
39 |
+
{ "name" : "R", "section" : 0, "description" : "Runs" },
|
40 |
+
{ "name" : "H", "section" : 0, "description" : "Hits" },
|
41 |
+
{ "name" : "RBI", "section" : 0, "description" : "Runs batted in" },
|
42 |
+
{ "name" : "2B", "id" : "doubles", "section" : 0, "description" : "Doubles" },
|
43 |
+
{ "name" : "3B", "id" : "triples", "section" : 0, "description" : "Triples" },
|
44 |
+
{ "name" : "HR", "section" : 0, "description" : "Home runs" },
|
45 |
+
{ "name" : "SB", "section" : 0, "description" : "Stolen bases" },
|
46 |
+
{ "name" : "BB", "section" : 0, "description" : "Base on balls" },
|
47 |
+
{ "name" : "SO", "section" : 0, "description" : "Strike outs" },
|
48 |
+
{ "name" : "LOB", "section" : 0, "description" : "Left on base" },
|
49 |
+
{ "name" : "IP", "id" : "pitcher_ip", "section" : 1, "description" : "Innings pitched" },
|
50 |
+
{ "name" : "H", "id" : "pitcher_h", "section" : 1, "description" : "Hits allowed" },
|
51 |
+
{ "name" : "R", "id" : "pitcher_r", "section" : 1, "description" : "Runs allowed" },
|
52 |
+
{ "name" : "ER", "id" : "pitcher_er", "section" : 1, "description" : "Earned runs allowed" },
|
53 |
+
{ "name" : "BB", "id" : "pitcher_bb", "section" : 1, "description" : "Base on balls allowed" },
|
54 |
+
{ "name" : "SO", "id" : "pitcher_so", "section" : 1, "description" : "Strike outs pitched" },
|
55 |
+
{ "name" : "HR", "id" : "pitcher_hr", "section" : 1, "description" : "Home runs allowed" }
|
56 |
],
|
57 |
"columns": [
|
58 |
{ "name" : "W", "equation" : "$win", "description" : "Wins" },
|
80 |
"event_teams" : "2",
|
81 |
"sportspress_event_hide_child_positions" : "yes",
|
82 |
"event_show_players" : "yes",
|
|
|
83 |
"event_show_total" : "yes",
|
84 |
"sportspress_event_results_reverse_teams" : "yes",
|
85 |
"sportspress_event_performance_mode" : "values",
|
87 |
"event_show_player_numbers" : "no",
|
88 |
"event_split_players_by_team" : "yes",
|
89 |
"event_split_players_by_position" : "yes",
|
90 |
+
"sportspress_event_total_performance" : "all",
|
91 |
+
"event_performance_sections" : 0
|
92 |
}
|
93 |
}
|
presets/team-sports/cricket.json
CHANGED
@@ -8,25 +8,25 @@
|
|
8 |
{ "name" : "Win", "condition" : ">" },
|
9 |
{ "name" : "Loss", "condition" : "<" },
|
10 |
"Draw",
|
11 |
-
{ "name" : "Tie", "condition" : "=" }
|
|
|
12 |
],
|
13 |
"results": [
|
14 |
-
{ "name" : "
|
15 |
-
{ "name" : "
|
16 |
-
{ "name" : "
|
17 |
-
{ "name" : "
|
18 |
-
{ "name" : "BP", "description" : "Bonus points" },
|
19 |
-
{ "name" : "Points", "description" : "Total points", "primary" : 1 }
|
20 |
],
|
21 |
"performance": [
|
22 |
-
{
|
23 |
-
{
|
24 |
-
{
|
25 |
-
{
|
26 |
-
{
|
27 |
-
{
|
28 |
-
{
|
29 |
-
{
|
|
|
30 |
],
|
31 |
"columns": [
|
32 |
{ "name" : "P", "equation" : "$eventsplayed", "description" : "Matches played" },
|
@@ -34,8 +34,10 @@
|
|
34 |
{ "name" : "L", "equation" : "$loss", "description" : "Losses" },
|
35 |
{ "name" : "D", "equation" : "$draw", "description" : "Draws" },
|
36 |
{ "name" : "T", "equation" : "$tie", "description" : "Ties" },
|
37 |
-
{ "name" : "
|
38 |
-
{ "name" : "
|
|
|
|
|
39 |
],
|
40 |
"metrics": [
|
41 |
"Height",
|
@@ -44,18 +46,21 @@
|
|
44 |
],
|
45 |
"statistics": [
|
46 |
{ "name" : "Mat", "equation" : "$eventsplayed", "description" : "Matches played" },
|
47 |
-
{ "name" : "
|
48 |
-
{ "name" : "SR", "equation" : "$runs / $b * 100", "precision" : 2, "description" : "Strike Rate" }
|
49 |
],
|
50 |
"options": {
|
|
|
51 |
"event_teams" : "2",
|
|
|
|
|
|
|
|
|
52 |
"event_show_players" : "yes",
|
53 |
-
"event_show_extras" : "yes",
|
54 |
"event_show_total" : "yes",
|
55 |
-
"
|
56 |
"event_show_player_numbers" : "no",
|
57 |
-
"
|
58 |
-
"
|
59 |
-
"
|
60 |
}
|
61 |
}
|
8 |
{ "name" : "Win", "condition" : ">" },
|
9 |
{ "name" : "Loss", "condition" : "<" },
|
10 |
"Draw",
|
11 |
+
{ "name" : "Tie", "condition" : "=" },
|
12 |
+
"No Result"
|
13 |
],
|
14 |
"results": [
|
15 |
+
{ "name" : "Runs", "equation" : "$runs", "description" : "Runs", "primary" : 1 },
|
16 |
+
{ "name" : "Wickets Lost", "description" : "Wickets lost" },
|
17 |
+
{ "name" : "Overs", "equation" : "$o", "description" : "Overs" },
|
18 |
+
{ "name" : "BP", "description" : "Bonus points"}
|
|
|
|
|
19 |
],
|
20 |
"performance": [
|
21 |
+
{ "name" : " ", "id" : "notes", "section" : 0, "format" : "text", "description" : "Notes" },
|
22 |
+
{ "name" : "R", "id" : "runs", "section" : 0, "description" : "Runs" },
|
23 |
+
{ "name" : "B", "section" : 0, "description" : "Balls" },
|
24 |
+
{ "name" : "4s", "section" : 0, "description" : "Fours" },
|
25 |
+
{ "name" : "6s", "section" : 0, "description" : "Sixes" },
|
26 |
+
{ "name" : "O", "section" : 1, "description" : "Overs bowled" },
|
27 |
+
{ "name" : "M", "section" : 1, "description" : "Maidens" },
|
28 |
+
{ "name" : "R", "section" : 1, "description" : "Runs" },
|
29 |
+
{ "name" : "W", "section" : 1, "description" : "Wickets taken" }
|
30 |
],
|
31 |
"columns": [
|
32 |
{ "name" : "P", "equation" : "$eventsplayed", "description" : "Matches played" },
|
34 |
{ "name" : "L", "equation" : "$loss", "description" : "Losses" },
|
35 |
{ "name" : "D", "equation" : "$draw", "description" : "Draws" },
|
36 |
{ "name" : "T", "equation" : "$tie", "description" : "Ties" },
|
37 |
+
{ "name" : "NR", "equation" : "$noresult", "description" : "No results" },
|
38 |
+
{ "name" : "BP", "equation" : "$bpfor", "description" : "Bonus points" },
|
39 |
+
{ "name" : "Points", "equation" : "$win * 2 + $draw", "priority" : 1, "description" : "Total points" },
|
40 |
+
{ "name" : "NRR", "equation" : "( $runsfor / $oversfor ) - ( $runsagainst / $oversagainst )", "priority" : 2, "precision" : 3, "description" : "Net run rate" }
|
41 |
],
|
42 |
"metrics": [
|
43 |
"Height",
|
46 |
],
|
47 |
"statistics": [
|
48 |
{ "name" : "Mat", "equation" : "$eventsplayed", "description" : "Matches played" },
|
49 |
+
{ "name" : "SR", "equation" : "( $runs / $b ) * 100", "precision" : 2, "description" : "Strike Rate" }
|
|
|
50 |
],
|
51 |
"options": {
|
52 |
+
"load_individual_mode_module" : "no",
|
53 |
"event_teams" : "2",
|
54 |
+
"event_logos_show_team_names" : "no",
|
55 |
+
"event_logos_show_results" : "yes",
|
56 |
+
"event_results_reverse_teams" : "no",
|
57 |
+
"event_show_outcome" : "yes",
|
58 |
"event_show_players" : "yes",
|
|
|
59 |
"event_show_total" : "yes",
|
60 |
+
"event_performance_mode" : "values",
|
61 |
"event_show_player_numbers" : "no",
|
62 |
+
"event_show_position" : "no",
|
63 |
+
"event_total_performance" : "primary",
|
64 |
+
"event_performance_sections" : 0
|
65 |
}
|
66 |
}
|
presets/team-sports/ice-hockey.json
CHANGED
@@ -59,7 +59,6 @@
|
|
59 |
"options": {
|
60 |
"event_teams" : "2",
|
61 |
"event_show_players" : "yes",
|
62 |
-
"event_show_extras" : "no",
|
63 |
"event_show_total" : "yes",
|
64 |
"sportspress_event_performance_mode" : "values",
|
65 |
"event_show_player_numbers" : "yes",
|
59 |
"options": {
|
60 |
"event_teams" : "2",
|
61 |
"event_show_players" : "yes",
|
|
|
62 |
"event_show_total" : "yes",
|
63 |
"sportspress_event_performance_mode" : "values",
|
64 |
"event_show_player_numbers" : "yes",
|
presets/team-sports/soccer.json
CHANGED
@@ -7,9 +7,9 @@
|
|
7 |
"Forward"
|
8 |
],
|
9 |
"outcomes": [
|
10 |
-
{ "name" : "Win", "condition" : ">" },
|
11 |
-
{ "name" : "Draw", "condition" : "=" },
|
12 |
-
{ "name" : "Loss", "condition" : "<" }
|
13 |
],
|
14 |
"results": [
|
15 |
{ "name" : "1st Half", "description" : "1st half goals" },
|
@@ -17,10 +17,10 @@
|
|
17 |
{ "name" : "Goals", "description" : "Total goals", "primary" : 1 }
|
18 |
],
|
19 |
"performance": [
|
20 |
-
"Goals",
|
21 |
-
"Assists",
|
22 |
-
"Yellow Cards",
|
23 |
-
"Red Cards"
|
24 |
],
|
25 |
"columns": [
|
26 |
{ "name" : "P", "equation" : "$eventsplayed", "description" : "Matches played" },
|
@@ -33,13 +33,23 @@
|
|
33 |
{ "name" : "Pts", "equation" : "$win * 3 + $draw", "priority" : 1, "description" : "Team points" }
|
34 |
],
|
35 |
"metrics": [
|
36 |
-
"Height",
|
37 |
-
"Weight"
|
38 |
],
|
39 |
"statistics": [
|
40 |
{ "name" : "Appearances", "equation" : "$eventsplayed", "description" : "Matches played" },
|
41 |
-
{ "name" : "Win Ratio", "equation" : "$win / $eventsplayed * 100", "precision" : 2 },
|
42 |
-
{ "name" : "Draw Ratio", "equation" : "$draw / $eventsplayed * 100", "precision" : 2 },
|
43 |
-
{ "name" : "Loss Ratio", "equation" : "$loss / $eventsplayed * 100", "precision" : 2 }
|
44 |
-
]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
}
|
7 |
"Forward"
|
8 |
],
|
9 |
"outcomes": [
|
10 |
+
{ "name" : "Win", "condition" : ">", "description" : "Wins" },
|
11 |
+
{ "name" : "Draw", "condition" : "=", "description" : "Draws" },
|
12 |
+
{ "name" : "Loss", "condition" : "<", "description" : "Losses" }
|
13 |
],
|
14 |
"results": [
|
15 |
{ "name" : "1st Half", "description" : "1st half goals" },
|
17 |
{ "name" : "Goals", "description" : "Total goals", "primary" : 1 }
|
18 |
],
|
19 |
"performance": [
|
20 |
+
{ "name" : "Goals", "description" : "Goals", "icon" : "soccerball", "color" : "#222222" },
|
21 |
+
{ "name" : "Assists", "description" : "Assists", "icon" : "shoe", "color" : "#222222" },
|
22 |
+
{ "name" : "Yellow Cards", "description" : "Yellow cards", "icon" : "card", "color" : "#f4d014" },
|
23 |
+
{ "name" : "Red Cards", "description" : "Red cards", "icon" : "card", "color" : "#d4000f" }
|
24 |
],
|
25 |
"columns": [
|
26 |
{ "name" : "P", "equation" : "$eventsplayed", "description" : "Matches played" },
|
33 |
{ "name" : "Pts", "equation" : "$win * 3 + $draw", "priority" : 1, "description" : "Team points" }
|
34 |
],
|
35 |
"metrics": [
|
36 |
+
{ "name" : "Height", "description" : "Player height" },
|
37 |
+
{ "name" : "Weight", "description" : "Player weight" }
|
38 |
],
|
39 |
"statistics": [
|
40 |
{ "name" : "Appearances", "equation" : "$eventsplayed", "description" : "Matches played" },
|
41 |
+
{ "name" : "Win Ratio", "equation" : "$win / $eventsplayed * 100", "precision" : 2, "description" : "Win ratio" },
|
42 |
+
{ "name" : "Draw Ratio", "equation" : "$draw / $eventsplayed * 100", "precision" : 2, "description" : "Draw ratio" },
|
43 |
+
{ "name" : "Loss Ratio", "equation" : "$loss / $eventsplayed * 100", "precision" : 2, "description" : "Loss ratio" }
|
44 |
+
],
|
45 |
+
"options": {
|
46 |
+
"event_teams" : "2",
|
47 |
+
"event_show_players" : "yes",
|
48 |
+
"event_show_total" : "no",
|
49 |
+
"sportspress_event_performance_mode" : "icons",
|
50 |
+
"event_show_player_numbers" : "yes",
|
51 |
+
"event_split_players_by_team" : "yes",
|
52 |
+
"event_split_players_by_position" : "no",
|
53 |
+
"sportspress_event_total_performance" : "all"
|
54 |
+
}
|
55 |
}
|
presets/team-sports/softball.json
CHANGED
@@ -77,7 +77,6 @@
|
|
77 |
"event_teams" : "2",
|
78 |
"sportspress_event_hide_child_positions" : "yes",
|
79 |
"event_show_players" : "yes",
|
80 |
-
"event_show_extras" : "no",
|
81 |
"event_show_total" : "yes",
|
82 |
"sportspress_event_results_reverse_teams" : "yes",
|
83 |
"sportspress_event_performance_mode" : "values",
|
77 |
"event_teams" : "2",
|
78 |
"sportspress_event_hide_child_positions" : "yes",
|
79 |
"event_show_players" : "yes",
|
|
|
80 |
"event_show_total" : "yes",
|
81 |
"sportspress_event_results_reverse_teams" : "yes",
|
82 |
"sportspress_event_performance_mode" : "values",
|
readme.txt
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
=== SportsPress - Manage Leagues & Sports Clubs ===
|
2 |
-
Contributors: ThemeBoy, brianmiyaji, aylaview
|
3 |
-
Tags: sport, sports, club, clubs, teams, statistics, stats, metrics, data, fixtures, results, standings, league tables, leagues, shortcodes, sports data, sports club, themeboy, esports, wordpress sports, equations, calculations, events, calendars, players, profiles, staff, seasons, countdowns, club management, football, nfl, footy, afl, baseball, basketball, cricket, darts, handball, hockey, netball, rugby, snooker, soccer, squash, tennis, volleyball, dota 2, league of legends
|
4 |
Donate link: http://tboy.co/donate
|
5 |
Requires at least: 3.8
|
6 |
-
Tested up to: 4.
|
7 |
-
Stable tag: 1.
|
8 |
License: GPLv3
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
@@ -48,6 +48,11 @@ Transform your WordPress blog into a fully configurable team, club, or league we
|
|
48 |
|
49 |
More details about each feature are available on the [SportsPress Website](http://tboy.co/pro).
|
50 |
|
|
|
|
|
|
|
|
|
|
|
51 |
= SportsPress Pro =
|
52 |
|
53 |
Looking for more advanced sports functionality? Upgrade to [SportsPress Pro](http://tboy.co/pro) to get access to more advanced features for your team, club, or league website.
|
@@ -72,6 +77,7 @@ Looking for more advanced sports functionality? Upgrade to [SportsPress Pro](htt
|
|
72 |
* Korean – 한국어 ( ko_KR )
|
73 |
* Macedonian – македонски ( mk_MK )
|
74 |
* Norwegian Bokmål – Norsk bokmål ( nb_NO )
|
|
|
75 |
* Polish – Polski ( pl_PL )
|
76 |
* Portuguese (Brazil) – Português do Brasil ( pt_BR )
|
77 |
* Portuguese (Portugal) – Português ( pt_PT )
|
@@ -81,6 +87,7 @@ Looking for more advanced sports functionality? Upgrade to [SportsPress Pro](htt
|
|
81 |
* Slovenian – Slovenija ( sl_SI )
|
82 |
* Spanish – Español ( es_ES )
|
83 |
* Swedish – Svenska ( sv_SE )
|
|
|
84 |
* Thai – ไทย ( th )
|
85 |
* Turkish – Türkçe ( tr_TR )
|
86 |
|
@@ -92,6 +99,7 @@ Looking for more advanced sports functionality? Upgrade to [SportsPress Pro](htt
|
|
92 |
* Basketball
|
93 |
* Cricket
|
94 |
* Darts
|
|
|
95 |
* Handball
|
96 |
* Ice Hockey
|
97 |
* Lacrosse
|
@@ -114,6 +122,7 @@ Looking for more advanced sports functionality? Upgrade to [SportsPress Pro](htt
|
|
114 |
= SportsPress Themes for Clubs =
|
115 |
* [Football Club](http://tboy.co/fc)
|
116 |
* [Premier](http://tboy.co/premier)
|
|
|
117 |
|
118 |
= Documentation =
|
119 |
* [Getting Started](http://tboy.co/installation)
|
@@ -214,16 +223,175 @@ The current modules that are available exclusively to SportsPress Pro are:
|
|
214 |
* Tournaments: Create and display tournaments in a bracket/knockout cup format.
|
215 |
* Sponsors: Add your sponsors on your website and track each of their clicks and impressions.
|
216 |
* Staff Directories: Show contact information of your key personnel so people know who to get in touch with.
|
|
|
217 |
* Team Colors: Make each team's profile page unique by displaying their team colors.
|
218 |
* League Menu: Display a global navigation bar at the top of your website for easy navigation from one team to the next.
|
|
|
|
|
219 |
* Branding: Instantly rebrands your admin panel to reflect your organization's brand.
|
|
|
|
|
220 |
|
221 |
-
There are [4 different licenses](http://tboy.co/pro) that you can choose from
|
222 |
|
223 |
When you upgrade to one of the SportsPress Pro licenses, you can simply activate the Pro version without losing any of your data. Please note that we recommend that you do a complete backup whenever you make big changes to your website.
|
224 |
|
225 |
== Changelog ==
|
226 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
227 |
= 1.8.9 =
|
228 |
* Feature - Enable multiple nationalities for players and staff.
|
229 |
* Feature - Enable multiple seasons and competitions for league tables.
|
1 |
=== SportsPress - Manage Leagues & Sports Clubs ===
|
2 |
+
Contributors: ThemeBoy, brianmiyaji, aylaview, rochesterj
|
3 |
+
Tags: sport, sports, club, clubs, teams, statistics, stats, metrics, data, fixtures, results, standings, league tables, leagues, shortcodes, sports data, sports club, themeboy, esports, wordpress sports, equations, calculations, events, calendars, players, profiles, staff, seasons, countdowns, club management, football, nfl, footy, afl, baseball, basketball, cricket, darts, handball, hockey, netball, rugby, snooker, soccer, squash, tennis, volleyball, dota 2, league of legends, golf
|
4 |
Donate link: http://tboy.co/donate
|
5 |
Requires at least: 3.8
|
6 |
+
Tested up to: 4.4
|
7 |
+
Stable tag: 1.9.20
|
8 |
License: GPLv3
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
48 |
|
49 |
More details about each feature are available on the [SportsPress Website](http://tboy.co/pro).
|
50 |
|
51 |
+
= Free Extensions =
|
52 |
+
* [SportsPress for Cricket](https://wordpress.org/plugins/sportspress-for-cricket/)
|
53 |
+
* [SportsPress for Football (Soccer)](https://wordpress.org/plugins/sportspress-for-soccer/)
|
54 |
+
* [SportsPress for Golf](https://wordpress.org/plugins/sportspress-for-golf/)
|
55 |
+
|
56 |
= SportsPress Pro =
|
57 |
|
58 |
Looking for more advanced sports functionality? Upgrade to [SportsPress Pro](http://tboy.co/pro) to get access to more advanced features for your team, club, or league website.
|
77 |
* Korean – 한국어 ( ko_KR )
|
78 |
* Macedonian – македонски ( mk_MK )
|
79 |
* Norwegian Bokmål – Norsk bokmål ( nb_NO )
|
80 |
+
* Persian – فارسی ( fa_IR )
|
81 |
* Polish – Polski ( pl_PL )
|
82 |
* Portuguese (Brazil) – Português do Brasil ( pt_BR )
|
83 |
* Portuguese (Portugal) – Português ( pt_PT )
|
87 |
* Slovenian – Slovenija ( sl_SI )
|
88 |
* Spanish – Español ( es_ES )
|
89 |
* Swedish – Svenska ( sv_SE )
|
90 |
+
* Tamil – தமிழ் ( ta_IN )
|
91 |
* Thai – ไทย ( th )
|
92 |
* Turkish – Türkçe ( tr_TR )
|
93 |
|
99 |
* Basketball
|
100 |
* Cricket
|
101 |
* Darts
|
102 |
+
* Golf
|
103 |
* Handball
|
104 |
* Ice Hockey
|
105 |
* Lacrosse
|
122 |
= SportsPress Themes for Clubs =
|
123 |
* [Football Club](http://tboy.co/fc)
|
124 |
* [Premier](http://tboy.co/premier)
|
125 |
+
* [Emblem](http://tboy.co/emblem)
|
126 |
|
127 |
= Documentation =
|
128 |
* [Getting Started](http://tboy.co/installation)
|
223 |
* Tournaments: Create and display tournaments in a bracket/knockout cup format.
|
224 |
* Sponsors: Add your sponsors on your website and track each of their clicks and impressions.
|
225 |
* Staff Directories: Show contact information of your key personnel so people know who to get in touch with.
|
226 |
+
* Team Access: Assign users to a specific team and limit their access to data related to that team.
|
227 |
* Team Colors: Make each team's profile page unique by displaying their team colors.
|
228 |
* League Menu: Display a global navigation bar at the top of your website for easy navigation from one team to the next.
|
229 |
+
* Birthdays: Display each player's birthday and their current age.
|
230 |
+
* Twitter: Add a Twitter feed to team, player, and staff pages.
|
231 |
* Branding: Instantly rebrands your admin panel to reflect your organization's brand.
|
232 |
+
* Duplicator: Clone anything with just one click. Great for creating multiple events.
|
233 |
+
* Lazy Loading: Load players using Ajax to speed up the event edit screen.
|
234 |
|
235 |
+
There are [4 different licenses](http://tboy.co/pro) that you can choose from: Social, Club, League, and Agency.
|
236 |
|
237 |
When you upgrade to one of the SportsPress Pro licenses, you can simply activate the Pro version without losing any of your data. Please note that we recommend that you do a complete backup whenever you make big changes to your website.
|
238 |
|
239 |
== Changelog ==
|
240 |
|
241 |
+
= 1.9.20 =
|
242 |
+
* Tweak - Expand event title section for team logos in countdown widget.
|
243 |
+
* Tweak - Center align team logo images in event.
|
244 |
+
* Tweak - Add iCal feed venue name and description.
|
245 |
+
* Fix - Escape address, summary, and description in iCal feed.
|
246 |
+
* Preset - Add ties and defense/offense definition to baseball preset.
|
247 |
+
* Localization - Add West Indies to nationality options.
|
248 |
+
* Localization - Update strings.
|
249 |
+
|
250 |
+
= 1.9.19 =
|
251 |
+
* Feature - Add Birthdays module.
|
252 |
+
* Feature - Add Lazy Loading module.
|
253 |
+
* Feature - Add separate offense and defense categories to player performance and box score.
|
254 |
+
* Feature - Add format setting to player performance with the options Number and Text.
|
255 |
+
* Feature - Add option to show and hide date and time in events.
|
256 |
+
* Tweak - Improve compatibility between custom color settings and theme options.
|
257 |
+
* Tweak - Add light shade to substitute rows in box score.
|
258 |
+
* Tweak - Prevent box score section from appearing when event is set in the future.
|
259 |
+
* Fix - Display icon setting in editor.
|
260 |
+
* Fix - Empty variable button appearing in equation builder when equation is empty.
|
261 |
+
* Preset - Update cricket preset with batting and bowling categories.
|
262 |
+
|
263 |
+
= 1.9.15 =
|
264 |
+
* Tweak - Add medium crop image size to ensure gallery images are square.
|
265 |
+
* Tweak - Add shortcut icon to admin bar.
|
266 |
+
* Fix - Mobile admin table cell width.
|
267 |
+
* Fix - Tutorial tab styling.
|
268 |
+
* Localization - Update Norwegian Bokmål and Turkish translations.
|
269 |
+
|
270 |
+
= 1.9.14 =
|
271 |
+
* Fix - Error appearing on team page in some cases when there are no competitions or seasons.
|
272 |
+
* Localization - Update source language file.
|
273 |
+
|
274 |
+
= 1.9.13 =
|
275 |
+
* Feature - Add option to display positions in player lists.
|
276 |
+
* Feature - Add option to show or hide player squad number and rank column.
|
277 |
+
* Feature - Add ability to display staff members in team page.
|
278 |
+
* Feature - Unique widget option added to hide widget when same as content.
|
279 |
+
* Tweak - Get auto and manual league tables in team page.
|
280 |
+
* Tweak - Add row numbers to league table and event list.
|
281 |
+
* Tweak - Allow searching from middle of sport preset names.
|
282 |
+
* Tweak - Remove deprecated settings from admin.
|
283 |
+
* Tweak - Prevent unnecessary scrollbar from appearing under scrollable tables.
|
284 |
+
* Tweak - Add spaces between results in event blocks widget.
|
285 |
+
* Tweak - Default template positions adjusted to render main content first.
|
286 |
+
* Tweak - Adjust checkbox column padding in admin.
|
287 |
+
* Tweak - Prevent positions and jobs from automatically linking to archives.
|
288 |
+
* Tweak - Adjust capabilities to allow team managers to edit venues.
|
289 |
+
* Fix - Player gallery thumbnail size too small in some cases.
|
290 |
+
* Fix - Competitive event icon in edit screen.
|
291 |
+
* Fix - SportsPress widget icons not appearing in 4.4 admin.
|
292 |
+
* Localization - Add demoyer to translation team.
|
293 |
+
* Localization - Update Dutch translations.
|
294 |
+
|
295 |
+
= 1.9.12 =
|
296 |
+
* Tweak - Display team names and score template without logos.
|
297 |
+
* Tweak - Validate hex color input.
|
298 |
+
* Tweak - Add sp prefix to TGMPA notice to avoid conflict with other plugins.
|
299 |
+
* Fix - Empty seasons displaying in player profiles.
|
300 |
+
* Fix - Error on pages with no screen objects.
|
301 |
+
* Localization - Add Tandor, muhahmetkara, elarequi, diego.battistella, and tkausch to translation team.
|
302 |
+
* Localization - Update Polish, Tamil, German, Turkish, Spanish, Dutch, and Portuguese translations.
|
303 |
+
|
304 |
+
= 1.9.10 =
|
305 |
+
* Fix - Automatic event results calculating without player performance.
|
306 |
+
* Localization - Update Turkish translation.
|
307 |
+
|
308 |
+
= 1.9.9 =
|
309 |
+
* Feature - Enable presets to define result equations.
|
310 |
+
* Tweak - Move event logo settings to new section in admin.
|
311 |
+
* Tweak - Disable custom colors by default.
|
312 |
+
* Tweak - Display league tables and player lists as auto when not manual.
|
313 |
+
* Fix - Prevent teams containing quotes to duplicate during import.
|
314 |
+
* Fix - Enable importing with special characters in team and player names.
|
315 |
+
* Fix - Check for zero in equation denominator contained within parenthesis.
|
316 |
+
* Fix - Placeholder in admin indicating automatic result.
|
317 |
+
* Preset - Update cricket preset.
|
318 |
+
* Localization - Update Tamil translation.
|
319 |
+
|
320 |
+
= 1.9.8 =
|
321 |
+
* Feature - Option to add custom table headings to calendars, league tables, and player lists.
|
322 |
+
* Tweak - Revert automatically hiding featured images when viewing teams, players, and staff.
|
323 |
+
* Fix - Team site URL escaping links in admin.
|
324 |
+
|
325 |
+
= 1.9.7 =
|
326 |
+
* Fix - Escape text inputs in admin.
|
327 |
+
* Localization - Update German translation.
|
328 |
+
|
329 |
+
= 1.9.6 =
|
330 |
+
* Feature - Venue subset to reflect statistics from a team's home venue.
|
331 |
+
* Tweak - Use team order instead of venue to get home and away subset.
|
332 |
+
* Tweak - Allow special HTML characters in player list fields.
|
333 |
+
* Tweak - Relabel box score to scorecard.
|
334 |
+
* Fix - Player list sorting by ascending squad number.
|
335 |
+
* Localization - Add Ales70, Elmister, and chinnz25 to translation team.
|
336 |
+
* Localization - Add Tamil (India) translations.
|
337 |
+
* Localization - Update Persian, Finnish, Italian, Czech, Greek, Slovenian, and Polish translations.
|
338 |
+
|
339 |
+
= 1.9.5 =
|
340 |
+
* Fix - Streaks calculation in league tables.
|
341 |
+
|
342 |
+
= 1.9.4 =
|
343 |
+
* Feature - Add Home and Away subset options to table column equation builder.
|
344 |
+
* Tweak - Display player and team checklists in admin only when Manual mode is enabled to improve performance.
|
345 |
+
* Localization - Add mahdi12 to translation team.
|
346 |
+
* Localization - Update Persian and Polish translation.
|
347 |
+
|
348 |
+
= 1.9.3 =
|
349 |
+
* Fix - Event results skipping some players in player list.
|
350 |
+
|
351 |
+
= 1.9.2 =
|
352 |
+
* Fix - Dynamic stats not being reflected in player lists.
|
353 |
+
|
354 |
+
= 1.9.1 =
|
355 |
+
* Fix - Add up statistics from multiple competitions and seasons in player list.
|
356 |
+
* Fix - Use player metrics as default in player list.
|
357 |
+
* Localization - Update Spanish translation.
|
358 |
+
|
359 |
+
= 1.9 =
|
360 |
+
* Feature - New Icons module containing vector icon options for player performance.
|
361 |
+
* Feature - Add event results to equation builder.
|
362 |
+
* Feature - Allow different page templates to be selected for each post type.
|
363 |
+
* Feature - Add equation builder to automate event results based on player performance.
|
364 |
+
* Feature - Allow Event Managers to edit venues.
|
365 |
+
* Feature - Display post excerpts in templates.
|
366 |
+
* Feature - Hide featured image if photo or logo is displayed.
|
367 |
+
* Feature - Add default outcome condition for events with more than 2 teams.
|
368 |
+
* Feature - Add option to display competition and season in player details.
|
369 |
+
* Feature - Add Google map zoom option.
|
370 |
+
* Feature - Add national flag option to player list.
|
371 |
+
* Feature - Add competition and season filter to manually inserted calendar shortcodes.
|
372 |
+
* Refactor - Move cricket functionality to free extension.
|
373 |
+
* Tweak - Improve individual mode admin screens and functionality.
|
374 |
+
* Tweak - Add styling to default event teams template.
|
375 |
+
* Tweak - Add cell padding to admin edit table.
|
376 |
+
* Tweak - Display position column only if positions exist.
|
377 |
+
* Tweak - Display Performance as Box Score in all occurrences.
|
378 |
+
* Tweak - Simplify sample data team names.
|
379 |
+
* Tweak - Move League Table module to Teams section.
|
380 |
+
* Tweak - Display column labels for time and results in split team mode.
|
381 |
+
* Tweak - Lock variable names once published to prevent equations from breaking.
|
382 |
+
* Tweak - Rename featured image meta boxes to reflect image type.
|
383 |
+
* Tweak - Improve readability of equations in admin.
|
384 |
+
* Tweak - Trim delimiter example when limit is more than 3 teams.
|
385 |
+
* Tweak - Allow a team limit of 0 for unlimited teams per event.
|
386 |
+
* Fix - Sample data generator for individual mode.
|
387 |
+
* Fix - Overview hierarchy in individual mode.
|
388 |
+
* Fix - Event delimiter sample output.
|
389 |
+
* Fix - Error in league table when stats are empty.
|
390 |
+
* Fix - Check if teams exist in countdown.
|
391 |
+
* Preset - Add golf preset.
|
392 |
+
* Preset - Recommend sport-specific extensions for cricket, golf, and football (soccer).
|
393 |
+
* Localization - Update Greek and French translations.
|
394 |
+
|
395 |
= 1.8.9 =
|
396 |
* Feature - Enable multiple nationalities for players and staff.
|
397 |
* Feature - Enable multiple seasons and competitions for league tables.
|
sportspress.php
CHANGED
@@ -3,11 +3,11 @@
|
|
3 |
* Plugin Name: SportsPress
|
4 |
* Plugin URI: http://themeboy.com/sportspress/
|
5 |
* Description: Manage your club and its players, staff, events, league tables, and player lists.
|
6 |
-
* Version: 1.
|
7 |
* Author: ThemeBoy
|
8 |
* Author URI: http://themeboy.com
|
9 |
* Requires at least: 3.8
|
10 |
-
* Tested up to: 4.
|
11 |
*
|
12 |
* Text Domain: sportspress
|
13 |
* Domain Path: /languages/
|
@@ -26,14 +26,14 @@ if ( ! class_exists( 'SportsPress' ) ) :
|
|
26 |
* Main SportsPress Class
|
27 |
*
|
28 |
* @class SportsPress
|
29 |
-
* @version 1.
|
30 |
*/
|
31 |
final class SportsPress {
|
32 |
|
33 |
/**
|
34 |
* @var string
|
35 |
*/
|
36 |
-
public $version = '1.
|
37 |
|
38 |
/**
|
39 |
* @var SportsPress The single instance of the class
|
@@ -120,6 +120,7 @@ final class SportsPress {
|
|
120 |
add_action( 'init', array( $this, 'init' ), 0 );
|
121 |
add_action( 'init', array( 'SP_Shortcodes', 'init' ) );
|
122 |
add_action( 'after_setup_theme', array( $this, 'setup_environment' ) );
|
|
|
123 |
|
124 |
// Include core modules
|
125 |
$this->include_modules();
|
@@ -232,6 +233,12 @@ final class SportsPress {
|
|
232 |
|
233 |
// WPML-related localization hooks
|
234 |
include_once( 'includes/class-sp-wpml.php' );
|
|
|
|
|
|
|
|
|
|
|
|
|
235 |
}
|
236 |
|
237 |
/**
|
@@ -312,11 +319,61 @@ final class SportsPress {
|
|
312 |
}
|
313 |
|
314 |
// Add image sizes
|
|
|
315 |
add_image_size( 'sportspress-fit-medium', 300, 300, false );
|
316 |
add_image_size( 'sportspress-fit-icon', 128, 128, false );
|
317 |
add_image_size( 'sportspress-fit-mini', 32, 32, false );
|
318 |
}
|
319 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
320 |
/** Helper functions ******************************************************/
|
321 |
|
322 |
/**
|
3 |
* Plugin Name: SportsPress
|
4 |
* Plugin URI: http://themeboy.com/sportspress/
|
5 |
* Description: Manage your club and its players, staff, events, league tables, and player lists.
|
6 |
+
* Version: 1.9.20
|
7 |
* Author: ThemeBoy
|
8 |
* Author URI: http://themeboy.com
|
9 |
* Requires at least: 3.8
|
10 |
+
* Tested up to: 4.4
|
11 |
*
|
12 |
* Text Domain: sportspress
|
13 |
* Domain Path: /languages/
|
26 |
* Main SportsPress Class
|
27 |
*
|
28 |
* @class SportsPress
|
29 |
+
* @version 1.9.20
|
30 |
*/
|
31 |
final class SportsPress {
|
32 |
|
33 |
/**
|
34 |
* @var string
|
35 |
*/
|
36 |
+
public $version = '1.9.20';
|
37 |
|
38 |
/**
|
39 |
* @var SportsPress The single instance of the class
|
120 |
add_action( 'init', array( $this, 'init' ), 0 );
|
121 |
add_action( 'init', array( 'SP_Shortcodes', 'init' ) );
|
122 |
add_action( 'after_setup_theme', array( $this, 'setup_environment' ) );
|
123 |
+
add_action( 'tgmpa_register', array( $this, 'edition' ) );
|
124 |
|
125 |
// Include core modules
|
126 |
$this->include_modules();
|
233 |
|
234 |
// WPML-related localization hooks
|
235 |
include_once( 'includes/class-sp-wpml.php' );
|
236 |
+
|
237 |
+
// REST API
|
238 |
+
//include_once( 'includes/class-sp-rest-api.php' );
|
239 |
+
|
240 |
+
// TGMPA
|
241 |
+
require_once dirname( __FILE__ ) . '/includes/libraries/class-tgm-plugin-activation.php';
|
242 |
}
|
243 |
|
244 |
/**
|
319 |
}
|
320 |
|
321 |
// Add image sizes
|
322 |
+
add_image_size( 'sportspress-crop-medium', 300, 300, true );
|
323 |
add_image_size( 'sportspress-fit-medium', 300, 300, false );
|
324 |
add_image_size( 'sportspress-fit-icon', 128, 128, false );
|
325 |
add_image_size( 'sportspress-fit-mini', 32, 32, false );
|
326 |
}
|
327 |
|
328 |
+
/**
|
329 |
+
* Recommend SportsPress edition for available sports.
|
330 |
+
*/
|
331 |
+
public static function edition() {
|
332 |
+
$sport = sp_array_value( $_POST, 'sportspress_sport', get_option( 'sportspress_sport', null ) );
|
333 |
+
if ( ! $sport ) return;
|
334 |
+
|
335 |
+
$plugins = array();
|
336 |
+
|
337 |
+
switch ( $sport ):
|
338 |
+
case 'cricket':
|
339 |
+
$plugins[] = array(
|
340 |
+
'name' => 'SportsPress for Cricket',
|
341 |
+
'slug' => 'sportspress-for-cricket',
|
342 |
+
'required' => false,
|
343 |
+
'version' => '1.0',
|
344 |
+
);
|
345 |
+
break;
|
346 |
+
case 'golf':
|
347 |
+
$plugins[] = array(
|
348 |
+
'name' => 'SportsPress for Golf',
|
349 |
+
'slug' => 'sportspress-for-golf',
|
350 |
+
'required' => false,
|
351 |
+
);
|
352 |
+
break;
|
353 |
+
case 'soccer':
|
354 |
+
$plugins[] = array(
|
355 |
+
'name' => 'SportsPress for Football (Soccer)',
|
356 |
+
'slug' => 'sportspress-for-soccer',
|
357 |
+
'required' => false,
|
358 |
+
);
|
359 |
+
break;
|
360 |
+
endswitch;
|
361 |
+
|
362 |
+
$config = array(
|
363 |
+
'default_path' => '',
|
364 |
+
'menu' => 'tgmpa-install-plugins',
|
365 |
+
'has_notices' => true,
|
366 |
+
'dismissable' => true,
|
367 |
+
'is_automatic' => true,
|
368 |
+
'message' => '',
|
369 |
+
'strings' => array(
|
370 |
+
'nag_type' => 'updated'
|
371 |
+
)
|
372 |
+
);
|
373 |
+
|
374 |
+
tgmpa( $plugins, $config );
|
375 |
+
}
|
376 |
+
|
377 |
/** Helper functions ******************************************************/
|
378 |
|
379 |
/**
|
templates/birthdays.php
ADDED
@@ -0,0 +1,76 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Birthdays
|
4 |
+
*
|
5 |
+
* @author ThemeBoy
|
6 |
+
* @package SportsPress_Birthdays
|
7 |
+
* @version 1.9.19
|
8 |
+
*/
|
9 |
+
|
10 |
+
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
11 |
+
|
12 |
+
$html5 = current_theme_supports( 'html5', 'gallery' );
|
13 |
+
$defaults = array(
|
14 |
+
'date' => 'day',
|
15 |
+
'itemtag' => 'dl',
|
16 |
+
'icontag' => 'dt',
|
17 |
+
'captiontag' => 'dd',
|
18 |
+
'size' => 'sportspress-fit-medium',
|
19 |
+
'show_player_birthday' => get_option( 'sportspress_player_show_birthday', 'no' ) == 'yes' ? true : false,
|
20 |
+
'show_staff_birthday' => get_option( 'sportspress_staff_show_birthday', 'no' ) == 'yes' ? true : false,
|
21 |
+
'link_players' => get_option( 'sportspress_link_players', 'yes' ) == 'yes' ? true : false,
|
22 |
+
'link_staff' => get_option( 'sportspress_link_staff', 'yes' ) == 'yes' ? true : false,
|
23 |
+
);
|
24 |
+
|
25 |
+
extract( $defaults, EXTR_SKIP );
|
26 |
+
|
27 |
+
$args = array(
|
28 |
+
'post_type' => array( 'sp_player', 'sp_staff' ),
|
29 |
+
'numberposts' => -1,
|
30 |
+
'posts_per_page' => -1,
|
31 |
+
'orderby' => 'date',
|
32 |
+
'order' => 'ASC',
|
33 |
+
'monthnum' => date('n'),
|
34 |
+
);
|
35 |
+
|
36 |
+
if ( $date == 'day' ) {
|
37 |
+
$args['day'] = date('j');
|
38 |
+
}
|
39 |
+
|
40 |
+
$posts = get_posts( $args );
|
41 |
+
|
42 |
+
foreach ( $posts as $post ) {
|
43 |
+
echo '<div class="sp-template sp-template-birthdays sp-template-birthday-gallery sp-template-gallery">';
|
44 |
+
|
45 |
+
if ( 'sp_staff' == $post->post_type ) {
|
46 |
+
$link_posts = $link_staff;
|
47 |
+
$show_birthday = $show_staff_birthday;
|
48 |
+
} else {
|
49 |
+
$link_posts = $link_players;
|
50 |
+
$show_birthday = $show_player_birthday;
|
51 |
+
}
|
52 |
+
|
53 |
+
$birthday = get_the_date( get_option( 'date_format') , $post->ID );
|
54 |
+
|
55 |
+
if ( $show_birthday && $birthday && $group !== $birthday ) {
|
56 |
+
echo '<h4 class="sp-table-caption">' . $birthday . '</h4>';
|
57 |
+
}
|
58 |
+
|
59 |
+
echo '<div class="gallery">';
|
60 |
+
|
61 |
+
$caption = $post->post_title;
|
62 |
+
$caption = trim( $caption );
|
63 |
+
|
64 |
+
sp_get_template( 'player-gallery-thumbnail.php', array(
|
65 |
+
'id' => $post->ID,
|
66 |
+
'itemtag' => $itemtag,
|
67 |
+
'icontag' => $icontag,
|
68 |
+
'captiontag' => $captiontag,
|
69 |
+
'caption' => $caption,
|
70 |
+
'size' => $size,
|
71 |
+
'link_posts' => $link_posts,
|
72 |
+
) );
|
73 |
+
|
74 |
+
echo '<br style="clear: both;" />';
|
75 |
+
echo "</div></div>\n";
|
76 |
+
}
|
templates/countdown.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* @author ThemeBoy
|
6 |
* @package SportsPress/Templates
|
7 |
-
* @version 1.
|
8 |
*/
|
9 |
|
10 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
@@ -46,13 +46,15 @@ if ( $link_events ) $title = '<a href="' . get_post_permalink( $post->ID, false,
|
|
46 |
$teams = array_unique( get_post_meta( $post->ID, 'sp_team' ) );
|
47 |
$i = 0;
|
48 |
|
49 |
-
|
50 |
-
$
|
51 |
-
|
52 |
-
if ( $
|
53 |
-
|
54 |
-
|
55 |
-
|
|
|
|
|
56 |
}
|
57 |
}
|
58 |
}
|
4 |
*
|
5 |
* @author ThemeBoy
|
6 |
* @package SportsPress/Templates
|
7 |
+
* @version 1.9
|
8 |
*/
|
9 |
|
10 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
46 |
$teams = array_unique( get_post_meta( $post->ID, 'sp_team' ) );
|
47 |
$i = 0;
|
48 |
|
49 |
+
if ( is_array( $teams ) ) {
|
50 |
+
foreach ( $teams as $team ) {
|
51 |
+
$i++;
|
52 |
+
if ( has_post_thumbnail ( $team ) ) {
|
53 |
+
if ( $link_teams ) {
|
54 |
+
echo '<a class="team-logo logo-' . ( $i % 2 ? 'odd' : 'even' ) . '" href="' . get_post_permalink( $team ) . '" title="' . get_the_title( $team ) . '">' . get_the_post_thumbnail( $team, 'sportspress-fit-icon' ) . '</a>';
|
55 |
+
} else {
|
56 |
+
echo get_the_post_thumbnail( $team, 'sportspress-fit-icon', array( 'class' => 'team-logo logo-' . ( $i % 2 ? 'odd' : 'even' ) ) );
|
57 |
+
}
|
58 |
}
|
59 |
}
|
60 |
}
|
templates/event-blocks.php
CHANGED
@@ -4,13 +4,11 @@
|
|
4 |
*
|
5 |
* @author ThemeBoy
|
6 |
* @package SportsPress/Templates
|
7 |
-
* @version 1.
|
8 |
*/
|
9 |
|
10 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
11 |
|
12 |
-
$primary_result = get_option( 'sportspress_primary_result', null );
|
13 |
-
|
14 |
$defaults = array(
|
15 |
'id' => null,
|
16 |
'title' => false,
|
@@ -18,6 +16,8 @@ $defaults = array(
|
|
18 |
'date' => 'default',
|
19 |
'date_from' => 'default',
|
20 |
'date_to' => 'default',
|
|
|
|
|
21 |
'number' => -1,
|
22 |
'link_teams' => get_option( 'sportspress_link_teams', 'no' ) == 'yes' ? true : false,
|
23 |
'link_events' => get_option( 'sportspress_link_events', 'yes' ) == 'yes' ? true : false,
|
@@ -42,13 +42,22 @@ if ( $date_from != 'default' )
|
|
42 |
$calendar->from = $date_from;
|
43 |
if ( $date_to != 'default' )
|
44 |
$calendar->to = $date_to;
|
|
|
|
|
|
|
|
|
45 |
if ( $order != 'default' )
|
46 |
$calendar->order = $order;
|
47 |
$data = $calendar->data();
|
48 |
$usecolumns = $calendar->columns;
|
49 |
|
50 |
-
if ( $show_title && false === $title && $id )
|
51 |
-
$
|
|
|
|
|
|
|
|
|
|
|
52 |
|
53 |
if ( isset( $columns ) ) {
|
54 |
$usecolumns = $columns;
|
@@ -71,12 +80,12 @@ if ( $title )
|
|
71 |
foreach ( $data as $event ):
|
72 |
if ( isset( $limit ) && $i >= $limit ) continue;
|
73 |
|
|
|
74 |
$results = get_post_meta( $event->ID, 'sp_results', true );
|
75 |
|
76 |
$teams = array_unique( get_post_meta( $event->ID, 'sp_team' ) );
|
77 |
$teams = array_filter( $teams, 'sp_filter_positive' );
|
78 |
$logos = array();
|
79 |
-
$main_results = array();
|
80 |
|
81 |
$j = 0;
|
82 |
foreach( $teams as $team ):
|
@@ -85,32 +94,21 @@ if ( $title )
|
|
85 |
if ( $link_teams ):
|
86 |
$logo = '<a class="team-logo logo-' . ( $j % 2 ? 'odd' : 'even' ) . '" href="' . get_permalink( $team, false, true ) . '" title="' . get_the_title( $team ) . '">' . get_the_post_thumbnail( $team, 'sportspress-fit-icon' ) . '</a>';
|
87 |
else:
|
88 |
-
$logo =
|
89 |
endif;
|
90 |
$logos[] = $logo;
|
91 |
endif;
|
92 |
-
$team_results = sp_array_value( $results, $team, null );
|
93 |
-
|
94 |
-
if ( $primary_result ):
|
95 |
-
$team_result = sp_array_value( $team_results, $primary_result, null );
|
96 |
-
else:
|
97 |
-
if ( is_array( $team_results ) ):
|
98 |
-
end( $team_results );
|
99 |
-
$team_result = prev( $team_results );
|
100 |
-
else:
|
101 |
-
$team_result = null;
|
102 |
-
endif;
|
103 |
-
endif;
|
104 |
-
if ( $team_result != null )
|
105 |
-
$main_results[] = $team_result;
|
106 |
-
|
107 |
endforeach;
|
108 |
?>
|
109 |
<tr class="sp-row sp-post<?php echo ( $i % 2 == 0 ? ' alternate' : '' ); ?>">
|
110 |
<td>
|
111 |
<?php echo implode( $logos, ' ' ); ?>
|
112 |
-
<time class="sp-event-date" datetime="<?php echo $event->post_date; ?>"
|
113 |
-
|
|
|
|
|
|
|
|
|
114 |
<?php if ( $show_league ): $leagues = get_the_terms( $event, 'sp_league' ); if ( $leagues ): $league = array_shift( $leagues ); ?>
|
115 |
<div class="sp-event-league"><?php echo $league->name; ?></div>
|
116 |
<?php endif; endif; ?>
|
@@ -121,11 +119,7 @@ if ( $title )
|
|
121 |
<div class="sp-event-venue"><?php echo $venue->name; ?></div>
|
122 |
<?php endif; endif; ?>
|
123 |
<h4 class="sp-event-title">
|
124 |
-
<?php
|
125 |
-
<a href="<?php echo get_post_permalink( $event, false, true ); ?>"><?php echo $event->post_title; ?></a>
|
126 |
-
<?php else: ?>
|
127 |
-
<?php echo $event->post_title; ?>
|
128 |
-
<?php endif; ?>
|
129 |
</h4>
|
130 |
|
131 |
</td>
|
4 |
*
|
5 |
* @author ThemeBoy
|
6 |
* @package SportsPress/Templates
|
7 |
+
* @version 1.9.13
|
8 |
*/
|
9 |
|
10 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
11 |
|
|
|
|
|
12 |
$defaults = array(
|
13 |
'id' => null,
|
14 |
'title' => false,
|
16 |
'date' => 'default',
|
17 |
'date_from' => 'default',
|
18 |
'date_to' => 'default',
|
19 |
+
'league' => null,
|
20 |
+
'season' => null,
|
21 |
'number' => -1,
|
22 |
'link_teams' => get_option( 'sportspress_link_teams', 'no' ) == 'yes' ? true : false,
|
23 |
'link_events' => get_option( 'sportspress_link_events', 'yes' ) == 'yes' ? true : false,
|
42 |
$calendar->from = $date_from;
|
43 |
if ( $date_to != 'default' )
|
44 |
$calendar->to = $date_to;
|
45 |
+
if ( $league )
|
46 |
+
$calendar->league = $league;
|
47 |
+
if ( $season )
|
48 |
+
$calendar->season = $season;
|
49 |
if ( $order != 'default' )
|
50 |
$calendar->order = $order;
|
51 |
$data = $calendar->data();
|
52 |
$usecolumns = $calendar->columns;
|
53 |
|
54 |
+
if ( $show_title && false === $title && $id ):
|
55 |
+
$caption = $calendar->caption;
|
56 |
+
if ( $caption )
|
57 |
+
$title = $caption;
|
58 |
+
else
|
59 |
+
$title = get_the_title( $id );
|
60 |
+
endif;
|
61 |
|
62 |
if ( isset( $columns ) ) {
|
63 |
$usecolumns = $columns;
|
80 |
foreach ( $data as $event ):
|
81 |
if ( isset( $limit ) && $i >= $limit ) continue;
|
82 |
|
83 |
+
$permalink = get_post_permalink( $event, false, true );
|
84 |
$results = get_post_meta( $event->ID, 'sp_results', true );
|
85 |
|
86 |
$teams = array_unique( get_post_meta( $event->ID, 'sp_team' ) );
|
87 |
$teams = array_filter( $teams, 'sp_filter_positive' );
|
88 |
$logos = array();
|
|
|
89 |
|
90 |
$j = 0;
|
91 |
foreach( $teams as $team ):
|
94 |
if ( $link_teams ):
|
95 |
$logo = '<a class="team-logo logo-' . ( $j % 2 ? 'odd' : 'even' ) . '" href="' . get_permalink( $team, false, true ) . '" title="' . get_the_title( $team ) . '">' . get_the_post_thumbnail( $team, 'sportspress-fit-icon' ) . '</a>';
|
96 |
else:
|
97 |
+
$logo = '<span class="team-logo logo-' . ( $j % 2 ? 'odd' : 'even' ) . '" title="' . get_the_title( $team ) . '">' . get_the_post_thumbnail( $team, 'sportspress-fit-icon' ) . '</span>';
|
98 |
endif;
|
99 |
$logos[] = $logo;
|
100 |
endif;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
endforeach;
|
102 |
?>
|
103 |
<tr class="sp-row sp-post<?php echo ( $i % 2 == 0 ? ' alternate' : '' ); ?>">
|
104 |
<td>
|
105 |
<?php echo implode( $logos, ' ' ); ?>
|
106 |
+
<time class="sp-event-date" datetime="<?php echo $event->post_date; ?>">
|
107 |
+
<?php echo sp_add_link( get_the_time( get_option( 'date_format' ), $event ), $permalink, $link_events ); ?>
|
108 |
+
</time>
|
109 |
+
<h5 class="sp-event-results">
|
110 |
+
<?php echo sp_add_link( '<span class="sp-result">' . implode( '</span> - <span class="sp-result">', apply_filters( 'sportspress_event_blocks_team_result_or_time', sp_get_main_results_or_time( $event ), $event->ID ) ), $permalink, $link_events . '</span>' ); ?>
|
111 |
+
</h5>
|
112 |
<?php if ( $show_league ): $leagues = get_the_terms( $event, 'sp_league' ); if ( $leagues ): $league = array_shift( $leagues ); ?>
|
113 |
<div class="sp-event-league"><?php echo $league->name; ?></div>
|
114 |
<?php endif; endif; ?>
|
119 |
<div class="sp-event-venue"><?php echo $venue->name; ?></div>
|
120 |
<?php endif; endif; ?>
|
121 |
<h4 class="sp-event-title">
|
122 |
+
<?php echo sp_add_link( $event->post_title, $permalink, $link_events ); ?>
|
|
|
|
|
|
|
|
|
123 |
</h4>
|
124 |
|
125 |
</td>
|
templates/event-calendar.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* @author ThemeBoy
|
6 |
* @package SportsPress/Templates
|
7 |
-
* @version 1.
|
8 |
*/
|
9 |
|
10 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
@@ -17,6 +17,8 @@ $defaults = array(
|
|
17 |
'date' => 'default',
|
18 |
'date_from' => 'default',
|
19 |
'date_to' => 'default',
|
|
|
|
|
20 |
'initial' => true,
|
21 |
'caption_tag' => 'h4',
|
22 |
'show_all_events_link' => false,
|
@@ -34,6 +36,10 @@ if ( isset( $id ) ):
|
|
34 |
$calendar->from = $date_from;
|
35 |
if ( $date_to != 'default' )
|
36 |
$calendar->to = $date_to;
|
|
|
|
|
|
|
|
|
37 |
$events = $calendar->data();
|
38 |
$event_ids = array();
|
39 |
foreach ( $events as $event ):
|
4 |
*
|
5 |
* @author ThemeBoy
|
6 |
* @package SportsPress/Templates
|
7 |
+
* @version 1.9
|
8 |
*/
|
9 |
|
10 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
17 |
'date' => 'default',
|
18 |
'date_from' => 'default',
|
19 |
'date_to' => 'default',
|
20 |
+
'league' => null,
|
21 |
+
'season' => null,
|
22 |
'initial' => true,
|
23 |
'caption_tag' => 'h4',
|
24 |
'show_all_events_link' => false,
|
36 |
$calendar->from = $date_from;
|
37 |
if ( $date_to != 'default' )
|
38 |
$calendar->to = $date_to;
|
39 |
+
if ( $league )
|
40 |
+
$calendar->league = $league;
|
41 |
+
if ( $season )
|
42 |
+
$calendar->season = $season;
|
43 |
$events = $calendar->data();
|
44 |
$event_ids = array();
|
45 |
foreach ( $events as $event ):
|
templates/event-details.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* @author ThemeBoy
|
6 |
* @package SportsPress/Templates
|
7 |
-
* @version 1.
|
8 |
*/
|
9 |
|
10 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
@@ -14,10 +14,18 @@ if ( ! isset( $id ) )
|
|
14 |
$id = get_the_ID();
|
15 |
|
16 |
$scrollable = get_option( 'sportspress_enable_scrollable_tables', 'yes' ) == 'yes' ? true : false;
|
17 |
-
$date = get_the_time( get_option('date_format'), $id );
|
18 |
-
$time = get_the_time( get_option('time_format'), $id );
|
19 |
|
20 |
-
$data = array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
|
22 |
$taxonomies = apply_filters( 'sportspress_event_taxonomies', array( 'sp_league' => null, 'sp_season' => null ) );
|
23 |
|
@@ -29,6 +37,10 @@ foreach ( $taxonomies as $taxonomy => $post_type ):
|
|
29 |
$data[ $obj->labels->singular_name ] = $term->name;
|
30 |
endif;
|
31 |
endforeach;
|
|
|
|
|
|
|
|
|
32 |
?>
|
33 |
<div class="sp-template sp-template-event-details">
|
34 |
<h4 class="sp-table-caption"><?php _e( 'Details', 'sportspress' ); ?></h4>
|
4 |
*
|
5 |
* @author ThemeBoy
|
6 |
* @package SportsPress/Templates
|
7 |
+
* @version 1.9.19
|
8 |
*/
|
9 |
|
10 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
14 |
$id = get_the_ID();
|
15 |
|
16 |
$scrollable = get_option( 'sportspress_enable_scrollable_tables', 'yes' ) == 'yes' ? true : false;
|
|
|
|
|
17 |
|
18 |
+
$data = array();
|
19 |
+
|
20 |
+
if ( 'yes' === get_option( 'sportspress_event_show_date', 'yes' ) ) {
|
21 |
+
$date = get_the_time( get_option('date_format'), $id );
|
22 |
+
$data[ __( 'Date', 'sportspress' ) ] = $date;
|
23 |
+
}
|
24 |
+
|
25 |
+
if ( 'yes' === get_option( 'sportspress_event_show_time', 'yes' ) ) {
|
26 |
+
$time = get_the_time( get_option('time_format'), $id );
|
27 |
+
$data[ __( 'Time', 'sportspress' ) ] = $time;
|
28 |
+
}
|
29 |
|
30 |
$taxonomies = apply_filters( 'sportspress_event_taxonomies', array( 'sp_league' => null, 'sp_season' => null ) );
|
31 |
|
37 |
$data[ $obj->labels->singular_name ] = $term->name;
|
38 |
endif;
|
39 |
endforeach;
|
40 |
+
|
41 |
+
$data = apply_filters( 'sportspress_event_details', $data, $id );
|
42 |
+
|
43 |
+
if ( ! sizeof( $data ) ) return;
|
44 |
?>
|
45 |
<div class="sp-template sp-template-event-details">
|
46 |
<h4 class="sp-table-caption"><?php _e( 'Details', 'sportspress' ); ?></h4>
|
templates/event-list.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* @author ThemeBoy
|
6 |
* @package SportsPress/Templates
|
7 |
-
* @version 1.
|
8 |
*/
|
9 |
|
10 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
@@ -16,6 +16,8 @@ $defaults = array(
|
|
16 |
'date' => 'default',
|
17 |
'date_from' => 'default',
|
18 |
'date_to' => 'default',
|
|
|
|
|
19 |
'number' => -1,
|
20 |
'show_team_logo' => get_option( 'sportspress_event_list_show_logos', 'no' ) == 'yes' ? true : false,
|
21 |
'link_events' => get_option( 'sportspress_link_events', 'yes' ) == 'yes' ? true : false,
|
@@ -42,6 +44,10 @@ if ( $date_from != 'default' )
|
|
42 |
$calendar->from = $date_from;
|
43 |
if ( $date_to != 'default' )
|
44 |
$calendar->to = $date_to;
|
|
|
|
|
|
|
|
|
45 |
if ( $order != 'default' )
|
46 |
$calendar->order = $order;
|
47 |
$data = $calendar->data();
|
@@ -56,8 +62,13 @@ if ( isset( $columns ) ):
|
|
56 |
$usecolumns = explode( ',', $columns );
|
57 |
endif;
|
58 |
|
59 |
-
if ( $show_title && false === $title && $id )
|
60 |
-
$
|
|
|
|
|
|
|
|
|
|
|
61 |
?>
|
62 |
<div class="sp-template sp-template-event-list">
|
63 |
<?php if ( $title ) { ?>
|
@@ -76,9 +87,9 @@ if ( $show_title && false === $title && $id )
|
|
76 |
echo '<th class="data-home">' . __( 'Home', 'sportspress' ) . '</th>';
|
77 |
|
78 |
if ( 'combined' == $time_format && sp_column_active( $usecolumns, 'time' ) ) {
|
79 |
-
echo '<th class="data-time"
|
80 |
} elseif ( in_array( $time_format, array( 'separate', 'results' ) ) && sp_column_active( $usecolumns, 'results' ) ) {
|
81 |
-
echo '<th class="data-results"
|
82 |
}
|
83 |
|
84 |
echo '<th class="data-away">' . __( 'Away', 'sportspress' ) . '</th>';
|
@@ -144,7 +155,7 @@ if ( $show_title && false === $title && $id )
|
|
144 |
$teams = get_post_meta( $event->ID, 'sp_team' );
|
145 |
$video = get_post_meta( $event->ID, 'sp_video', true );
|
146 |
|
147 |
-
$main_results = sp_get_main_results( $event );
|
148 |
|
149 |
$teams_output = '';
|
150 |
$teams_array = array();
|
@@ -183,7 +194,7 @@ if ( $show_title && false === $title && $id )
|
|
183 |
$teams_output .= '—';
|
184 |
endif;
|
185 |
|
186 |
-
echo '<tr class="sp-row sp-post' . ( $i % 2 == 0 ? ' alternate' : '' ) . '">';
|
187 |
|
188 |
$date_html = '<date>' . get_post_time( 'Y-m-d H:i:s', false, $event ) . '</date>' . get_post_time( get_option( 'date_format' ), false, $event, true );
|
189 |
|
@@ -364,4 +375,4 @@ if ( $show_title && false === $title && $id )
|
|
364 |
if ( $id && $show_all_events_link )
|
365 |
echo '<div class="sp-calendar-link sp-view-all-link"><a href="' . get_permalink( $id ) . '">' . __( 'View all events', 'sportspress' ) . '</a></div>';
|
366 |
?>
|
367 |
-
</div>
|
4 |
*
|
5 |
* @author ThemeBoy
|
6 |
* @package SportsPress/Templates
|
7 |
+
* @version 1.9.13
|
8 |
*/
|
9 |
|
10 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
16 |
'date' => 'default',
|
17 |
'date_from' => 'default',
|
18 |
'date_to' => 'default',
|
19 |
+
'league' => null,
|
20 |
+
'season' => null,
|
21 |
'number' => -1,
|
22 |
'show_team_logo' => get_option( 'sportspress_event_list_show_logos', 'no' ) == 'yes' ? true : false,
|
23 |
'link_events' => get_option( 'sportspress_link_events', 'yes' ) == 'yes' ? true : false,
|
44 |
$calendar->from = $date_from;
|
45 |
if ( $date_to != 'default' )
|
46 |
$calendar->to = $date_to;
|
47 |
+
if ( $league )
|
48 |
+
$calendar->league = $league;
|
49 |
+
if ( $season )
|
50 |
+
$calendar->season = $season;
|
51 |
if ( $order != 'default' )
|
52 |
$calendar->order = $order;
|
53 |
$data = $calendar->data();
|
62 |
$usecolumns = explode( ',', $columns );
|
63 |
endif;
|
64 |
|
65 |
+
if ( $show_title && false === $title && $id ):
|
66 |
+
$caption = $calendar->caption;
|
67 |
+
if ( $caption )
|
68 |
+
$title = $caption;
|
69 |
+
else
|
70 |
+
$title = get_the_title( $id );
|
71 |
+
endif;
|
72 |
?>
|
73 |
<div class="sp-template sp-template-event-list">
|
74 |
<?php if ( $title ) { ?>
|
87 |
echo '<th class="data-home">' . __( 'Home', 'sportspress' ) . '</th>';
|
88 |
|
89 |
if ( 'combined' == $time_format && sp_column_active( $usecolumns, 'time' ) ) {
|
90 |
+
echo '<th class="data-time">' . __( 'Time/Results', 'sportspress' ) . '</th>';
|
91 |
} elseif ( in_array( $time_format, array( 'separate', 'results' ) ) && sp_column_active( $usecolumns, 'results' ) ) {
|
92 |
+
echo '<th class="data-results">' . __( 'Results', 'sportspress' ) . '</th>';
|
93 |
}
|
94 |
|
95 |
echo '<th class="data-away">' . __( 'Away', 'sportspress' ) . '</th>';
|
155 |
$teams = get_post_meta( $event->ID, 'sp_team' );
|
156 |
$video = get_post_meta( $event->ID, 'sp_video', true );
|
157 |
|
158 |
+
$main_results = apply_filters( 'sportspress_event_list_main_results', sp_get_main_results( $event ), $event->ID );
|
159 |
|
160 |
$teams_output = '';
|
161 |
$teams_array = array();
|
194 |
$teams_output .= '—';
|
195 |
endif;
|
196 |
|
197 |
+
echo '<tr class="sp-row sp-post' . ( $i % 2 == 0 ? ' alternate' : '' ) . ' sp-row-no-' . $i . '">';
|
198 |
|
199 |
$date_html = '<date>' . get_post_time( 'Y-m-d H:i:s', false, $event ) . '</date>' . get_post_time( get_option( 'date_format' ), false, $event, true );
|
200 |
|
375 |
if ( $id && $show_all_events_link )
|
376 |
echo '<div class="sp-calendar-link sp-view-all-link"><a href="' . get_permalink( $id ) . '">' . __( 'View all events', 'sportspress' ) . '</a></div>';
|
377 |
?>
|
378 |
+
</div>
|
templates/event-logos.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* @author ThemeBoy
|
6 |
* @package SportsPress/Templates
|
7 |
-
* @version 1.
|
8 |
*/
|
9 |
|
10 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
@@ -29,12 +29,17 @@ if ( $teams ):
|
|
29 |
$team_logos = array();
|
30 |
$i = 0;
|
31 |
foreach ( $teams as $team ):
|
32 |
-
if ( ! has_post_thumbnail( $team ) )
|
33 |
-
|
|
|
|
|
|
|
|
|
|
|
34 |
|
35 |
// Add team name
|
36 |
if ( $show_team_names ) {
|
37 |
-
if ( $
|
38 |
$logo .= ' <strong class="sp-team-name">' . get_the_title( $team ) . '</strong>';
|
39 |
} else {
|
40 |
$logo = '<strong class="sp-team-name">' . get_the_title( $team ) . '</strong> ' . $logo;
|
@@ -46,10 +51,12 @@ if ( $teams ):
|
|
46 |
|
47 |
// Add result
|
48 |
if ( $show_results ) {
|
49 |
-
|
50 |
-
|
|
|
|
|
51 |
} else {
|
52 |
-
$logo .= ' <strong class="sp-team-result">' .
|
53 |
}
|
54 |
}
|
55 |
|
@@ -58,7 +65,7 @@ if ( $teams ):
|
|
58 |
endforeach;
|
59 |
$team_logos = array_filter( $team_logos );
|
60 |
if ( ! empty( $team_logos ) ):
|
61 |
-
echo '<div class="sp-template sp-template-event-logos"><div class="sp-event-logos">';
|
62 |
$delimiter = get_option( 'sportspress_event_teams_delimiter', 'vs' );
|
63 |
echo implode( ' ' . $delimiter . ' ', $team_logos );
|
64 |
echo '</div></div>';
|
4 |
*
|
5 |
* @author ThemeBoy
|
6 |
* @package SportsPress/Templates
|
7 |
+
* @version 1.9.12
|
8 |
*/
|
9 |
|
10 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
29 |
$team_logos = array();
|
30 |
$i = 0;
|
31 |
foreach ( $teams as $team ):
|
32 |
+
if ( ! has_post_thumbnail( $team ) ) {
|
33 |
+
$logo = '';
|
34 |
+
} else {
|
35 |
+
$logo = get_the_post_thumbnail( $team, 'sportspress-fit-icon' );
|
36 |
+
}
|
37 |
+
|
38 |
+
$alt = sizeof( $teams ) == 2 && $i % 2;
|
39 |
|
40 |
// Add team name
|
41 |
if ( $show_team_names ) {
|
42 |
+
if ( $alt ) {
|
43 |
$logo .= ' <strong class="sp-team-name">' . get_the_title( $team ) . '</strong>';
|
44 |
} else {
|
45 |
$logo = '<strong class="sp-team-name">' . get_the_title( $team ) . '</strong> ' . $logo;
|
51 |
|
52 |
// Add result
|
53 |
if ( $show_results ) {
|
54 |
+
$team_result = array_shift( $results );
|
55 |
+
$team_result = apply_filters( 'sportspress_event_logos_team_result', $team_result, $id, $team );
|
56 |
+
if ( $alt ) {
|
57 |
+
$logo = '<strong class="sp-team-result">' . $team_result . '</strong> ' . $logo;
|
58 |
} else {
|
59 |
+
$logo .= ' <strong class="sp-team-result">' . $team_result . '</strong>';
|
60 |
}
|
61 |
}
|
62 |
|
65 |
endforeach;
|
66 |
$team_logos = array_filter( $team_logos );
|
67 |
if ( ! empty( $team_logos ) ):
|
68 |
+
echo '<div class="sp-template sp-template-event-logos"><div class="sp-event-logos sp-event-logos-' . sizeof( $teams ) . '">';
|
69 |
$delimiter = get_option( 'sportspress_event_teams_delimiter', 'vs' );
|
70 |
echo implode( ' ' . $delimiter . ' ', $team_logos );
|
71 |
echo '</div></div>';
|
templates/event-overview.php
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Event Results/Details
|
4 |
+
*
|
5 |
+
* @author ThemeBoy
|
6 |
+
* @package SportsPress/Templates
|
7 |
+
* @version 1.9
|
8 |
+
*/
|
9 |
+
|
10 |
+
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
11 |
+
?>
|
12 |
+
<div class="sp-event-overview">
|
13 |
+
<?php do_action( 'sportspress_event_overview_content' ); ?>
|
14 |
+
</div>
|
templates/event-performance-table-combined.php
CHANGED
@@ -4,15 +4,19 @@
|
|
4 |
*
|
5 |
* @author ThemeBoy
|
6 |
* @package SportsPress/Templates
|
7 |
-
* @version 1.
|
8 |
*/
|
9 |
|
10 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
11 |
|
12 |
// Initialize totals
|
13 |
$totals = array();
|
|
|
|
|
|
|
|
|
14 |
?>
|
15 |
-
<div class="sp-template sp-template-event-performance sp-template-event-performance-<?php echo $mode; ?>">
|
16 |
<?php if ( $caption ): ?>
|
17 |
<h4 class="sp-table-caption"><?php echo $caption; ?></h4>
|
18 |
<?php endif; ?>
|
@@ -35,6 +39,9 @@ $totals = array();
|
|
35 |
<tbody>
|
36 |
<?php
|
37 |
if ( $show_players ) {
|
|
|
|
|
|
|
38 |
$i = 0;
|
39 |
foreach ( $data as $player_id => $row ):
|
40 |
|
@@ -67,6 +74,10 @@ $totals = array();
|
|
67 |
foreach ( $labels as $key => $label ):
|
68 |
if ( in_array( $key, array( 'number', 'name' ) ) )
|
69 |
continue;
|
|
|
|
|
|
|
|
|
70 |
$value = '—';
|
71 |
if ( $key == 'position' ):
|
72 |
if ( array_key_exists( $key, $row ) && $row[ $key ] != '' ):
|
@@ -82,21 +93,26 @@ $totals = array();
|
|
82 |
if ( array_key_exists( $key, $row ) && $row[ $key ] != '' ):
|
83 |
$value = $row[ $key ];
|
84 |
else:
|
85 |
-
$value =
|
86 |
endif;
|
87 |
endif;
|
88 |
if ( ! array_key_exists( $key, $totals ) ):
|
89 |
-
$totals[ $key ] =
|
90 |
endif;
|
91 |
-
|
|
|
|
|
|
|
92 |
|
93 |
if ( $mode == 'values' ):
|
94 |
echo '<td class="data-' . $key . '">' . $value . '</td>';
|
95 |
elseif ( intval( $value ) && $mode == 'icons' ):
|
96 |
$performance_id = sp_array_value( $performance_ids, $key, null );
|
|
|
97 |
if ( $performance_id && has_post_thumbnail( $performance_id ) ):
|
98 |
-
|
99 |
endif;
|
|
|
100 |
endif;
|
101 |
endforeach;
|
102 |
|
@@ -111,9 +127,10 @@ $totals = array();
|
|
111 |
}
|
112 |
?>
|
113 |
</tbody>
|
114 |
-
<?php if ( $show_total ): ?>
|
115 |
-
|
116 |
-
|
|
|
117 |
<tr class="' . ( $i % 2 == 0 ? 'odd' : 'even' ) . '">
|
118 |
<?php
|
119 |
if ( isset( $labels['number'] ) ):
|
@@ -121,7 +138,7 @@ $totals = array();
|
|
121 |
endif;
|
122 |
echo '<td class="data-name">' . __( 'Total', 'sportspress' ) . '</td>';
|
123 |
|
124 |
-
$row = sp_array_value( $data,
|
125 |
|
126 |
if ( $mode == 'icons' ) echo '<td class="sp-performance-icons">';
|
127 |
|
@@ -142,17 +159,19 @@ $totals = array();
|
|
142 |
echo '<td class="data-' . $key . '">' . $value . '</td>';
|
143 |
elseif ( intval( $value ) && $mode == 'icons' ):
|
144 |
$performance_id = sp_array_value( $performance_ids, $key, null );
|
|
|
145 |
if ( $performance_id && has_post_thumbnail( $performance_id ) ):
|
146 |
-
|
147 |
endif;
|
|
|
148 |
endif;
|
149 |
endforeach;
|
150 |
|
151 |
if ( $mode == 'icons' ) echo '</td>';
|
152 |
?>
|
153 |
</tr>
|
154 |
-
|
155 |
-
|
156 |
<?php endif; ?>
|
157 |
</table>
|
158 |
</div>
|
4 |
*
|
5 |
* @author ThemeBoy
|
6 |
* @package SportsPress/Templates
|
7 |
+
* @version 1.9.19
|
8 |
*/
|
9 |
|
10 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
11 |
|
12 |
// Initialize totals
|
13 |
$totals = array();
|
14 |
+
|
15 |
+
// Set null
|
16 |
+
if ( ! isset( $position ) ) $position = null;
|
17 |
+
if ( ! isset( $class ) ) $class = null;
|
18 |
?>
|
19 |
+
<div class="sp-template sp-template-event-performance sp-template-event-performance-combined sp-template-event-performance-<?php echo $mode; ?><?php if ( isset( $class ) ) { echo ' ' . $class; } ?>">
|
20 |
<?php if ( $caption ): ?>
|
21 |
<h4 class="sp-table-caption"><?php echo $caption; ?></h4>
|
22 |
<?php endif; ?>
|
39 |
<tbody>
|
40 |
<?php
|
41 |
if ( $show_players ) {
|
42 |
+
|
43 |
+
$data = apply_filters( 'sportspress_event_performance_players', $data, $data, array(), $mode );
|
44 |
+
|
45 |
$i = 0;
|
46 |
foreach ( $data as $player_id => $row ):
|
47 |
|
74 |
foreach ( $labels as $key => $label ):
|
75 |
if ( in_array( $key, array( 'number', 'name' ) ) )
|
76 |
continue;
|
77 |
+
|
78 |
+
$format = sp_array_value( $formats, $key, 'number' );
|
79 |
+
$placeholder = sp_get_format_placeholder( $format );
|
80 |
+
|
81 |
$value = '—';
|
82 |
if ( $key == 'position' ):
|
83 |
if ( array_key_exists( $key, $row ) && $row[ $key ] != '' ):
|
93 |
if ( array_key_exists( $key, $row ) && $row[ $key ] != '' ):
|
94 |
$value = $row[ $key ];
|
95 |
else:
|
96 |
+
$value = $placeholder;
|
97 |
endif;
|
98 |
endif;
|
99 |
if ( ! array_key_exists( $key, $totals ) ):
|
100 |
+
$totals[ $key ] = $placeholder;
|
101 |
endif;
|
102 |
+
|
103 |
+
if ( 'text' !== $format ) {
|
104 |
+
$totals[ $key ] += $value;
|
105 |
+
}
|
106 |
|
107 |
if ( $mode == 'values' ):
|
108 |
echo '<td class="data-' . $key . '">' . $value . '</td>';
|
109 |
elseif ( intval( $value ) && $mode == 'icons' ):
|
110 |
$performance_id = sp_array_value( $performance_ids, $key, null );
|
111 |
+
$icons = '';
|
112 |
if ( $performance_id && has_post_thumbnail( $performance_id ) ):
|
113 |
+
$icons = str_repeat( get_the_post_thumbnail( $performance_id, 'sportspress-fit-mini' ) . ' ', $value );
|
114 |
endif;
|
115 |
+
echo apply_filters( 'sportspress_event_performance_icons', $icons, $performance_id, $value );
|
116 |
endif;
|
117 |
endforeach;
|
118 |
|
127 |
}
|
128 |
?>
|
129 |
</tbody>
|
130 |
+
<?php if ( apply_filters( 'sportspress_event_performance_show_footer', $show_total ) ): ?>
|
131 |
+
<tfoot>
|
132 |
+
<?php do_action( 'sportspress_event_performance_table_footer', $data, $labels, $position, $performance_ids ); ?>
|
133 |
+
<?php if ( $show_total && ( ! $primary || sizeof( array_intersect_key( $totals, array_flip( (array) $primary ) ) ) ) ): ?>
|
134 |
<tr class="' . ( $i % 2 == 0 ? 'odd' : 'even' ) . '">
|
135 |
<?php
|
136 |
if ( isset( $labels['number'] ) ):
|
138 |
endif;
|
139 |
echo '<td class="data-name">' . __( 'Total', 'sportspress' ) . '</td>';
|
140 |
|
141 |
+
$row = sp_array_value( $data, 1, array() );
|
142 |
|
143 |
if ( $mode == 'icons' ) echo '<td class="sp-performance-icons">';
|
144 |
|
159 |
echo '<td class="data-' . $key . '">' . $value . '</td>';
|
160 |
elseif ( intval( $value ) && $mode == 'icons' ):
|
161 |
$performance_id = sp_array_value( $performance_ids, $key, null );
|
162 |
+
$icons = '';
|
163 |
if ( $performance_id && has_post_thumbnail( $performance_id ) ):
|
164 |
+
$icons = str_repeat( get_the_post_thumbnail( $performance_id, 'sportspress-fit-mini' ) . ' ', $value );
|
165 |
endif;
|
166 |
+
echo apply_filters( 'sportspress_event_performance_icons', $icons, $performance_id, $value );
|
167 |
endif;
|
168 |
endforeach;
|
169 |
|
170 |
if ( $mode == 'icons' ) echo '</td>';
|
171 |
?>
|
172 |
</tr>
|
173 |
+
<?php endif; ?>
|
174 |
+
</tfoot>
|
175 |
<?php endif; ?>
|
176 |
</table>
|
177 |
</div>
|
templates/event-performance-table.php
CHANGED
@@ -4,15 +4,24 @@
|
|
4 |
*
|
5 |
* @author ThemeBoy
|
6 |
* @package SportsPress/Templates
|
7 |
-
* @version 1.
|
8 |
*/
|
9 |
|
10 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
11 |
|
12 |
// Initialize totals
|
13 |
$totals = array();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
?>
|
15 |
-
<div class="sp-template sp-template-event-performance sp-template-event-performance-<?php echo $mode; ?>">
|
16 |
<?php if ( $caption ): ?>
|
17 |
<h4 class="sp-table-caption"><?php echo $caption; ?></h4>
|
18 |
<?php endif; ?>
|
@@ -25,15 +34,14 @@ $totals = array();
|
|
25 |
<th class="data-number">#</th>
|
26 |
<?php } ?>
|
27 |
<th class="data-name">
|
28 |
-
<?php if ( isset( $
|
29 |
-
<?php echo $
|
30 |
<?php } else { ?>
|
31 |
<?php _e( 'Player', 'sportspress' ); ?>
|
32 |
<?php } ?>
|
33 |
</th>
|
34 |
<?php endif; ?>
|
35 |
<?php if ( $mode == 'values' ): foreach ( $labels as $key => $label ): ?>
|
36 |
-
<?php if ( isset( $position ) && 'position' == $key ) continue; ?>
|
37 |
<th class="data-<?php echo $key; ?>"><?php echo $label; ?></th>
|
38 |
<?php endforeach; else: ?>
|
39 |
<th class="sp-performance-icons"> </th>
|
@@ -54,6 +62,8 @@ $totals = array();
|
|
54 |
$lineup_sub_relation[ sp_array_value( $sub, 'sub', 0 ) ] = $sub_id;
|
55 |
endforeach;
|
56 |
|
|
|
|
|
57 |
$i = 0;
|
58 |
foreach ( $data as $player_id => $row ):
|
59 |
|
@@ -77,9 +87,6 @@ $totals = array();
|
|
77 |
if ( $link_posts ):
|
78 |
$permalink = get_post_permalink( $player_id );
|
79 |
$name = '<a href="' . $permalink . '">' . $name . '</a>';
|
80 |
-
if ( isset( $row['status'] ) && $row['status'] == 'sub' ):
|
81 |
-
$name = '(' . $name . ')';
|
82 |
-
endif;
|
83 |
endif;
|
84 |
|
85 |
if ( array_key_exists( $player_id, $lineup_sub_relation ) ):
|
@@ -95,8 +102,9 @@ $totals = array();
|
|
95 |
foreach ( $labels as $key => $label ):
|
96 |
if ( 'name' == $key )
|
97 |
continue;
|
98 |
-
|
99 |
-
|
|
|
100 |
|
101 |
$value = '—';
|
102 |
if ( $key == 'position' ):
|
@@ -111,6 +119,8 @@ $totals = array();
|
|
111 |
$player_position = get_term_by( 'id', $position_id, 'sp_position' );
|
112 |
if ( $player_position ) $positions[] = $player_position->name;
|
113 |
}
|
|
|
|
|
114 |
|
115 |
if ( sizeof( $positions ) ):
|
116 |
$value = implode( ', ', $positions );
|
@@ -119,21 +129,26 @@ $totals = array();
|
|
119 |
if ( array_key_exists( $key, $row ) && $row[ $key ] != '' ):
|
120 |
$value = $row[ $key ];
|
121 |
else:
|
122 |
-
$value =
|
123 |
endif;
|
124 |
endif;
|
125 |
if ( ! array_key_exists( $key, $totals ) ):
|
126 |
-
$totals[ $key ] =
|
127 |
endif;
|
128 |
-
|
|
|
|
|
|
|
129 |
|
130 |
if ( $mode == 'values' ):
|
131 |
echo '<td class="data-' . $key . '">' . $value . '</td>';
|
132 |
elseif ( intval( $value ) && $mode == 'icons' ):
|
133 |
$performance_id = sp_array_value( $performance_ids, $key, null );
|
|
|
134 |
if ( $performance_id && has_post_thumbnail( $performance_id ) ):
|
135 |
-
|
136 |
endif;
|
|
|
137 |
endif;
|
138 |
endforeach;
|
139 |
|
@@ -147,111 +162,60 @@ $totals = array();
|
|
147 |
?>
|
148 |
</tbody>
|
149 |
<?php endif; ?>
|
150 |
-
<?php if (
|
151 |
<<?php echo ( $show_players ? 'tfoot' : 'tbody' ); ?>>
|
152 |
<?php
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
}
|
165 |
-
echo '<td class="data-name">' . __( 'Extras', 'sportspress' ) . '</td>';
|
166 |
-
endif;
|
167 |
|
168 |
-
|
169 |
|
170 |
-
|
171 |
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
|
|
178 |
$value = ' ';
|
179 |
elseif ( array_key_exists( $key, $row ) && $row[ $key ] != '' ):
|
180 |
$value = $row[ $key ];
|
181 |
else:
|
182 |
-
$value = '
|
183 |
endif;
|
184 |
-
|
185 |
-
if ( $mode == 'values' ):
|
186 |
-
echo '<td class="data-' . $key . '">' . $value . '</td>';
|
187 |
-
elseif ( intval( $value ) && $mode == 'icons' ):
|
188 |
-
$performance_id = sp_array_value( $performance_ids, $key, null );
|
189 |
-
if ( $performance_id && has_post_thumbnail( $performance_id ) ):
|
190 |
-
echo str_repeat( get_the_post_thumbnail( $performance_id, 'sportspress-fit-mini' ) . ' ', $value );
|
191 |
-
endif;
|
192 |
-
endif;
|
193 |
-
endforeach;
|
194 |
-
|
195 |
-
if ( $mode == 'icons' ) echo '</td>';
|
196 |
-
?>
|
197 |
-
</tr>
|
198 |
-
<?php
|
199 |
-
$i++;
|
200 |
-
}
|
201 |
-
}
|
202 |
-
if ( $show_total ) {
|
203 |
-
if ( ! $primary || sizeof( array_intersect_key( $totals, array_flip( (array) $primary ) ) ) ) {
|
204 |
-
?>
|
205 |
-
<tr class="sp-total-row <?php echo ( $i % 2 == 0 ? 'odd' : 'even' ); ?>">
|
206 |
-
<?php
|
207 |
-
if ( $show_players ):
|
208 |
-
if ( $show_numbers ) {
|
209 |
-
echo '<td class="data-number"> </td>';
|
210 |
-
}
|
211 |
-
echo '<td class="data-name">' . __( 'Total', 'sportspress' ) . '</td>';
|
212 |
endif;
|
213 |
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
if (
|
220 |
-
|
221 |
-
if ( isset( $position ) && 'position' == $key )
|
222 |
-
continue;
|
223 |
-
if ( $key == 'position' ):
|
224 |
-
$value = ' ';
|
225 |
-
else:
|
226 |
-
if ( $primary && $key !== $primary ):
|
227 |
-
$value = ' ';
|
228 |
-
elseif ( array_key_exists( $key, $row ) && $row[ $key ] != '' ):
|
229 |
-
$value = $row[ $key ];
|
230 |
-
else:
|
231 |
-
$value = sp_array_value( $totals, $key, 0 );
|
232 |
-
if ( $show_extras ) {
|
233 |
-
$value += sp_array_value( sp_array_value( $data, -1, array() ), $key, 0 );
|
234 |
-
}
|
235 |
-
endif;
|
236 |
-
endif;
|
237 |
-
|
238 |
-
if ( $mode == 'values' ):
|
239 |
-
echo '<td class="data-' . $key . '">' . $value . '</td>';
|
240 |
-
elseif ( intval( $value ) && $mode == 'icons' ):
|
241 |
-
$performance_id = sp_array_value( $performance_ids, $key, null );
|
242 |
-
if ( $performance_id && has_post_thumbnail( $performance_id ) ):
|
243 |
-
echo str_repeat( get_the_post_thumbnail( $performance_id, 'sportspress-fit-mini' ) . ' ', $value );
|
244 |
-
endif;
|
245 |
endif;
|
246 |
-
|
|
|
|
|
247 |
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
<?php } ?>
|
252 |
<?php } ?>
|
253 |
</<?php echo ( $show_players ? 'tfoot' : 'tbody' ); ?>>
|
254 |
<?php endif; ?>
|
255 |
</table>
|
256 |
</div>
|
257 |
-
|
|
|
|
4 |
*
|
5 |
* @author ThemeBoy
|
6 |
* @package SportsPress/Templates
|
7 |
+
* @version 1.9.19
|
8 |
*/
|
9 |
|
10 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
11 |
|
12 |
// Initialize totals
|
13 |
$totals = array();
|
14 |
+
|
15 |
+
// Set null
|
16 |
+
if ( ! isset( $section ) ) $section = -1;
|
17 |
+
if ( ! isset( $section_label ) ) $section_label = null;
|
18 |
+
if ( ! isset( $class ) ) $class = null;
|
19 |
+
|
20 |
+
// Initialize arrays
|
21 |
+
if ( ! isset( $lineups ) ) $lineups = array();
|
22 |
+
if ( ! isset( $subs ) ) $subs = array();
|
23 |
?>
|
24 |
+
<div class="sp-template sp-template-event-performance sp-template-event-performance-<?php echo $mode; ?><?php if ( isset( $class ) ) { echo ' ' . $class; } ?>">
|
25 |
<?php if ( $caption ): ?>
|
26 |
<h4 class="sp-table-caption"><?php echo $caption; ?></h4>
|
27 |
<?php endif; ?>
|
34 |
<th class="data-number">#</th>
|
35 |
<?php } ?>
|
36 |
<th class="data-name">
|
37 |
+
<?php if ( isset( $section_label ) ) { ?>
|
38 |
+
<?php echo $section_label; ?>
|
39 |
<?php } else { ?>
|
40 |
<?php _e( 'Player', 'sportspress' ); ?>
|
41 |
<?php } ?>
|
42 |
</th>
|
43 |
<?php endif; ?>
|
44 |
<?php if ( $mode == 'values' ): foreach ( $labels as $key => $label ): ?>
|
|
|
45 |
<th class="data-<?php echo $key; ?>"><?php echo $label; ?></th>
|
46 |
<?php endforeach; else: ?>
|
47 |
<th class="sp-performance-icons"> </th>
|
62 |
$lineup_sub_relation[ sp_array_value( $sub, 'sub', 0 ) ] = $sub_id;
|
63 |
endforeach;
|
64 |
|
65 |
+
$data = apply_filters( 'sportspress_event_performance_players', $data, $lineups, $subs, $mode );
|
66 |
+
|
67 |
$i = 0;
|
68 |
foreach ( $data as $player_id => $row ):
|
69 |
|
87 |
if ( $link_posts ):
|
88 |
$permalink = get_post_permalink( $player_id );
|
89 |
$name = '<a href="' . $permalink . '">' . $name . '</a>';
|
|
|
|
|
|
|
90 |
endif;
|
91 |
|
92 |
if ( array_key_exists( $player_id, $lineup_sub_relation ) ):
|
102 |
foreach ( $labels as $key => $label ):
|
103 |
if ( 'name' == $key )
|
104 |
continue;
|
105 |
+
|
106 |
+
$format = sp_array_value( $formats, $key, 'number' );
|
107 |
+
$placeholder = sp_get_format_placeholder( $format );
|
108 |
|
109 |
$value = '—';
|
110 |
if ( $key == 'position' ):
|
119 |
$player_position = get_term_by( 'id', $position_id, 'sp_position' );
|
120 |
if ( $player_position ) $positions[] = $player_position->name;
|
121 |
}
|
122 |
+
|
123 |
+
$positions = array_unique( $positions );
|
124 |
|
125 |
if ( sizeof( $positions ) ):
|
126 |
$value = implode( ', ', $positions );
|
129 |
if ( array_key_exists( $key, $row ) && $row[ $key ] != '' ):
|
130 |
$value = $row[ $key ];
|
131 |
else:
|
132 |
+
$value = $placeholder;
|
133 |
endif;
|
134 |
endif;
|
135 |
if ( ! array_key_exists( $key, $totals ) ):
|
136 |
+
$totals[ $key ] = $placeholder;
|
137 |
endif;
|
138 |
+
|
139 |
+
if ( 'text' !== $format ) {
|
140 |
+
$totals[ $key ] += $value;
|
141 |
+
}
|
142 |
|
143 |
if ( $mode == 'values' ):
|
144 |
echo '<td class="data-' . $key . '">' . $value . '</td>';
|
145 |
elseif ( intval( $value ) && $mode == 'icons' ):
|
146 |
$performance_id = sp_array_value( $performance_ids, $key, null );
|
147 |
+
$icons = '';
|
148 |
if ( $performance_id && has_post_thumbnail( $performance_id ) ):
|
149 |
+
$icons = str_repeat( get_the_post_thumbnail( $performance_id, 'sportspress-fit-mini' ) . ' ', $value );
|
150 |
endif;
|
151 |
+
echo apply_filters( 'sportspress_event_performance_icons', $icons, $performance_id, $value );
|
152 |
endif;
|
153 |
endforeach;
|
154 |
|
162 |
?>
|
163 |
</tbody>
|
164 |
<?php endif; ?>
|
165 |
+
<?php if ( apply_filters( 'sportspress_event_performance_show_footer', $show_total ) ): ?>
|
166 |
<<?php echo ( $show_players ? 'tfoot' : 'tbody' ); ?>>
|
167 |
<?php
|
168 |
+
do_action( 'sportspress_event_performance_table_footer', $data, $labels, $section, $performance_ids );
|
169 |
+
if ( $show_total && ( ! $primary || sizeof( array_intersect_key( $totals, array_flip( (array) $primary ) ) ) ) ) {
|
170 |
+
?>
|
171 |
+
<tr class="sp-total-row <?php echo ( $i % 2 == 0 ? 'odd' : 'even' ); ?>">
|
172 |
+
<?php
|
173 |
+
if ( $show_players ):
|
174 |
+
if ( $show_numbers ) {
|
175 |
+
echo '<td class="data-number"> </td>';
|
176 |
+
}
|
177 |
+
echo '<td class="data-name">' . __( 'Total', 'sportspress' ) . '</td>';
|
178 |
+
endif;
|
|
|
|
|
|
|
179 |
|
180 |
+
$row = sp_array_value( $data, 0, array() );
|
181 |
|
182 |
+
if ( $mode == 'icons' ) echo '<td class="sp-performance-icons">';
|
183 |
|
184 |
+
foreach ( $labels as $key => $label ):
|
185 |
+
if ( 'name' == $key )
|
186 |
+
continue;
|
187 |
+
if ( $key == 'position' ):
|
188 |
+
$value = ' ';
|
189 |
+
else:
|
190 |
+
if ( $primary && $key !== $primary ):
|
191 |
$value = ' ';
|
192 |
elseif ( array_key_exists( $key, $row ) && $row[ $key ] != '' ):
|
193 |
$value = $row[ $key ];
|
194 |
else:
|
195 |
+
$value = apply_filters( 'sportspress_event_performance_table_total_value', sp_array_value( $totals, $key, 0 ), $data, $key );
|
196 |
endif;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
197 |
endif;
|
198 |
|
199 |
+
if ( $mode == 'values' ):
|
200 |
+
echo '<td class="data-' . $key . '">' . $value . '</td>';
|
201 |
+
elseif ( intval( $value ) && $mode == 'icons' ):
|
202 |
+
$performance_id = sp_array_value( $performance_ids, $key, null );
|
203 |
+
$icons = '';
|
204 |
+
if ( $performance_id && has_post_thumbnail( $performance_id ) ):
|
205 |
+
$icons = str_repeat( get_the_post_thumbnail( $performance_id, 'sportspress-fit-mini' ) . ' ', $value );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
206 |
endif;
|
207 |
+
echo apply_filters( 'sportspress_event_performance_icons', $icons, $performance_id, $value );
|
208 |
+
endif;
|
209 |
+
endforeach;
|
210 |
|
211 |
+
if ( $mode == 'icons' ) echo '</td>';
|
212 |
+
?>
|
213 |
+
</tr>
|
|
|
214 |
<?php } ?>
|
215 |
</<?php echo ( $show_players ? 'tfoot' : 'tbody' ); ?>>
|
216 |
<?php endif; ?>
|
217 |
</table>
|
218 |
</div>
|
219 |
+
|
220 |
+
<?php do_action( 'sportspress_after_event_performance_table', $data, $lineups, $subs, $class ); ?>
|
221 |
+
</div>
|
templates/event-performance.php
CHANGED
@@ -4,23 +4,22 @@
|
|
4 |
*
|
5 |
* @author ThemeBoy
|
6 |
* @package SportsPress/Templates
|
7 |
-
* @version 1.
|
8 |
*/
|
9 |
|
10 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
11 |
|
|
|
12 |
$show_players = get_option( 'sportspress_event_show_players', 'yes' ) === 'yes' ? true : false;
|
13 |
$show_staff = get_option( 'sportspress_event_show_staff', 'yes' ) === 'yes' ? true : false;
|
14 |
-
$show_extras = get_option( 'sportspress_event_show_extras', 'no' ) === 'yes' ? true : false;
|
15 |
$show_total = get_option( 'sportspress_event_show_total', 'yes' ) === 'yes' ? true : false;
|
16 |
$show_numbers = get_option( 'sportspress_event_show_player_numbers', 'yes' ) === 'yes' ? true : false;
|
17 |
-
$
|
18 |
-
$split_teams = get_option( 'sportspress_event_split_players_by_team', 'yes' ) === 'yes' ? true : false;
|
19 |
$reverse_teams = get_option( 'sportspress_event_performance_reverse_teams', 'no' ) === 'yes' ? true : false;
|
20 |
-
$primary =
|
21 |
$total = get_option( 'sportspress_event_total_performance', 'all');
|
22 |
|
23 |
-
if ( ! $show_players && ! $show_staff && ! $
|
24 |
|
25 |
if ( ! isset( $id ) )
|
26 |
$id = get_the_ID();
|
@@ -29,14 +28,19 @@ $teams = get_post_meta( $id, 'sp_team', false );
|
|
29 |
|
30 |
if ( is_array( $teams ) ):
|
31 |
?>
|
32 |
-
<div class="sp-event-performance-tables sp-event-performance
|
33 |
<?php
|
34 |
|
35 |
$event = new SP_Event( $id );
|
36 |
$performance = $event->performance();
|
37 |
|
|
|
|
|
|
|
|
|
|
|
38 |
// The first row should be column labels
|
39 |
-
$labels = $performance[0];
|
40 |
|
41 |
// Remove the first row to leave us with the actual data
|
42 |
unset( $performance[0] );
|
@@ -44,11 +48,10 @@ if ( is_array( $teams ) ):
|
|
44 |
$performance = array_filter( $performance );
|
45 |
|
46 |
$status = $event->status();
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
$mode = get_option( 'sportspress_event_performance_mode', 'values' );
|
52 |
|
53 |
// Get performance ids for icons
|
54 |
if ( $mode == 'icons' ):
|
@@ -62,115 +65,191 @@ if ( is_array( $teams ) ):
|
|
62 |
if ( $reverse_teams ) {
|
63 |
$teams = array_reverse( $teams, true );
|
64 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
|
66 |
-
|
67 |
-
|
68 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
if ( -1 == $team_id ) continue;
|
70 |
|
71 |
// Get results for players in the team
|
72 |
$players = sp_array_between( (array)get_post_meta( $id, 'sp_player', false ), 0, $index );
|
73 |
$has_players = sizeof( $players ) > 1;
|
74 |
|
75 |
-
|
76 |
-
$players[] = -1;
|
77 |
-
}
|
78 |
|
79 |
$show_team_players = $show_players && $has_players;
|
80 |
|
81 |
-
if (
|
82 |
-
|
83 |
-
|
84 |
-
$
|
85 |
-
|
86 |
-
|
87 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
}
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
foreach ( $positions as $position_index => $position ) {
|
104 |
-
$subdata = array();
|
105 |
-
foreach ( $data as $player_id => $player ) {
|
106 |
-
$player_positions = (array) sp_array_value( $player, 'position' );
|
107 |
-
$player_positions = array_filter( $player_positions );
|
108 |
-
if ( empty( $player_positions ) ) {
|
109 |
-
$player_positions = (array) sp_get_the_term_id( $player_id, 'sp_position' );
|
110 |
-
}
|
111 |
-
if ( in_array( $position->term_id, $player_positions ) ) {
|
112 |
-
$subdata[ $player_id ] = $data[ $player_id ];
|
113 |
-
}
|
114 |
-
}
|
115 |
-
|
116 |
-
// Initialize Sublabels
|
117 |
-
$sublabels = $labels;
|
118 |
-
|
119 |
-
// Get performance with position
|
120 |
-
$performance_labels = get_posts( array(
|
121 |
-
'post_type' => 'sp_performance',
|
122 |
-
'posts_per_page' => -1,
|
123 |
-
'tax_query' => array(
|
124 |
-
array(
|
125 |
-
'taxonomy' => 'sp_position',
|
126 |
-
'terms' => $position->term_id,
|
127 |
-
),
|
128 |
-
),
|
129 |
-
) );
|
130 |
-
|
131 |
-
$allowed_labels = array();
|
132 |
-
if ( ! empty( $performance_labels ) ) {
|
133 |
-
foreach ( $performance_labels as $label ) {
|
134 |
-
$allowed_labels[ $label->post_name ] = $label->post_title;
|
135 |
-
}
|
136 |
-
|
137 |
-
$sublabels = array_intersect_key( $sublabels, $allowed_labels );
|
138 |
-
}
|
139 |
-
|
140 |
-
if ( sizeof( $subdata ) ) {
|
141 |
-
if ( $show_extras ) {
|
142 |
-
$subdata[-1] = sp_array_value( $data, -1 );
|
143 |
}
|
144 |
-
|
145 |
sp_get_template( 'event-performance-table.php', array(
|
146 |
-
'
|
|
|
147 |
'scrollable' => $scrollable,
|
148 |
'sortable' => $sortable,
|
149 |
'show_players' => $show_team_players,
|
150 |
'show_numbers' => $show_numbers,
|
151 |
-
'show_extras' => $show_extras,
|
152 |
'show_total' => $show_total,
|
153 |
-
'caption' => 0 == $
|
154 |
-
'labels' => $
|
|
|
155 |
'mode' => $mode,
|
156 |
-
'data' => $
|
157 |
'event' => $event,
|
158 |
'link_posts' => $link_posts,
|
159 |
'performance_ids' => isset( $performance_ids ) ? $performance_ids : null,
|
160 |
'primary' => 'primary' == $total ? $primary : null,
|
|
|
161 |
) );
|
162 |
}
|
|
|
|
|
163 |
}
|
164 |
} else {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
165 |
sp_get_template( 'event-performance-table.php', array(
|
166 |
'scrollable' => $scrollable,
|
167 |
'sortable' => $sortable,
|
168 |
'show_players' => $show_team_players,
|
169 |
'show_numbers' => $show_numbers,
|
170 |
-
'show_extras' => $show_extras,
|
171 |
'show_total' => $show_total,
|
172 |
'caption' => $team_id ? get_the_title( $team_id ) : null,
|
173 |
'labels' => $labels,
|
|
|
174 |
'mode' => $mode,
|
175 |
'data' => $data,
|
176 |
'event' => $event,
|
@@ -181,78 +260,13 @@ if ( is_array( $teams ) ):
|
|
181 |
) );
|
182 |
}
|
183 |
}
|
184 |
-
if ( $show_staff ):
|
185 |
-
sp_get_template( 'event-staff.php', array( 'id' => $id, 'index' => $index ) );
|
186 |
-
endif;
|
187 |
-
?>
|
188 |
-
<?php
|
189 |
-
endforeach;
|
190 |
-
} else {
|
191 |
-
// Combined table
|
192 |
-
$data = array();
|
193 |
-
foreach ( $performance as $players ) {
|
194 |
-
foreach ( $players as $player_id => $player ) {
|
195 |
-
if ( $player_id <= 0 ) continue;
|
196 |
-
$data[ $player_id ] = $player;
|
197 |
-
}
|
198 |
-
}
|
199 |
-
|
200 |
-
if ( $split_positions ) {
|
201 |
-
$positions = get_terms( 'sp_position', array(
|
202 |
-
'orderby' => 'slug',
|
203 |
-
'hide_empty' => 0,
|
204 |
-
) );
|
205 |
-
|
206 |
-
foreach ( $positions as $position_index => $position ) {
|
207 |
-
$subdata = array();
|
208 |
-
foreach ( $data as $player_id => $player ) {
|
209 |
-
$player_positions = (array) sp_array_value( $player, 'position' );
|
210 |
-
$player_positions = array_filter( $player_positions );
|
211 |
-
if ( empty( $player_positions ) ) {
|
212 |
-
$player_positions = (array) sp_get_the_term_id( $player_id, 'sp_position' );
|
213 |
-
}
|
214 |
-
if ( in_array( $position->term_id, $player_positions ) ) {
|
215 |
-
$subdata[ $player_id ] = $data[ $player_id ];
|
216 |
-
}
|
217 |
-
}
|
218 |
-
|
219 |
-
if ( sizeof( $subdata ) ) {
|
220 |
-
sp_get_template( 'event-performance-table-combined.php', array(
|
221 |
-
'scrollable' => $scrollable,
|
222 |
-
'sortable' => $sortable,
|
223 |
-
'show_players' => $show_players,
|
224 |
-
'show_numbers' => $show_numbers,
|
225 |
-
'show_extras' => $show_extras,
|
226 |
-
'show_total' => $show_total,
|
227 |
-
'caption' => sp_get_position_caption( $position->term_id ),
|
228 |
-
'labels' => $labels,
|
229 |
-
'mode' => $mode,
|
230 |
-
'data' => $subdata,
|
231 |
-
'event' => $event,
|
232 |
-
'link_posts' => $link_posts,
|
233 |
-
'performance_ids' => isset( $performance_ids ) ? $performance_ids : null,
|
234 |
-
'primary' => 'primary' == $total ? $primary : null,
|
235 |
-
) );
|
236 |
-
}
|
237 |
-
}
|
238 |
-
} else {
|
239 |
-
sp_get_template( 'event-performance-table-combined.php', array(
|
240 |
-
'scrollable' => $scrollable,
|
241 |
-
'sortable' => $sortable,
|
242 |
-
'show_players' => $show_players,
|
243 |
-
'show_numbers' => $show_numbers,
|
244 |
-
'show_extras' => $show_extras,
|
245 |
-
'show_total' => $show_total,
|
246 |
-
'caption' => __( 'Performance', 'sportspress' ),
|
247 |
-
'labels' => $labels,
|
248 |
-
'mode' => $mode,
|
249 |
-
'data' => $data,
|
250 |
-
'event' => $event,
|
251 |
-
'link_posts' => $link_posts,
|
252 |
-
'performance_ids' => isset( $performance_ids ) ? $performance_ids : null,
|
253 |
-
'primary' => 'primary' == $total ? $primary : null,
|
254 |
-
) );
|
255 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
256 |
}
|
257 |
|
258 |
do_action( 'sportspress_event_performance' );
|
4 |
*
|
5 |
* @author ThemeBoy
|
6 |
* @package SportsPress/Templates
|
7 |
+
* @version 1.9.19
|
8 |
*/
|
9 |
|
10 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
11 |
|
12 |
+
$is_individual = get_option( 'sportspress_load_individual_mode_module', 'no' ) === 'yes' ? true : false;
|
13 |
$show_players = get_option( 'sportspress_event_show_players', 'yes' ) === 'yes' ? true : false;
|
14 |
$show_staff = get_option( 'sportspress_event_show_staff', 'yes' ) === 'yes' ? true : false;
|
|
|
15 |
$show_total = get_option( 'sportspress_event_show_total', 'yes' ) === 'yes' ? true : false;
|
16 |
$show_numbers = get_option( 'sportspress_event_show_player_numbers', 'yes' ) === 'yes' ? true : false;
|
17 |
+
$sections = get_option( 'sportspress_event_performance_sections', -1 );
|
|
|
18 |
$reverse_teams = get_option( 'sportspress_event_performance_reverse_teams', 'no' ) === 'yes' ? true : false;
|
19 |
+
$primary = sp_get_main_performance_option();
|
20 |
$total = get_option( 'sportspress_event_total_performance', 'all');
|
21 |
|
22 |
+
if ( ! $show_players && ! $show_staff && ! $show_total ) return;
|
23 |
|
24 |
if ( ! isset( $id ) )
|
25 |
$id = get_the_ID();
|
28 |
|
29 |
if ( is_array( $teams ) ):
|
30 |
?>
|
31 |
+
<div class="sp-event-performance-tables sp-event-performance-teams">
|
32 |
<?php
|
33 |
|
34 |
$event = new SP_Event( $id );
|
35 |
$performance = $event->performance();
|
36 |
|
37 |
+
$link_posts = get_option( 'sportspress_link_players', 'yes' ) == 'yes' ? true : false;
|
38 |
+
$scrollable = get_option( 'sportspress_enable_scrollable_tables', 'yes' ) == 'yes' ? true : false;
|
39 |
+
$sortable = get_option( 'sportspress_enable_sortable_tables', 'yes' ) == 'yes' ? true : false;
|
40 |
+
$mode = get_option( 'sportspress_event_performance_mode', 'values' );
|
41 |
+
|
42 |
// The first row should be column labels
|
43 |
+
$labels = apply_filters( 'sportspress_event_box_score_labels', $performance[0], $event, $mode );
|
44 |
|
45 |
// Remove the first row to leave us with the actual data
|
46 |
unset( $performance[0] );
|
48 |
$performance = array_filter( $performance );
|
49 |
|
50 |
$status = $event->status();
|
51 |
+
|
52 |
+
if ( 'future' == $status ) {
|
53 |
+
$show_total = false;
|
54 |
+
}
|
|
|
55 |
|
56 |
// Get performance ids for icons
|
57 |
if ( $mode == 'icons' ):
|
65 |
if ( $reverse_teams ) {
|
66 |
$teams = array_reverse( $teams, true );
|
67 |
}
|
68 |
+
|
69 |
+
// Get performance columns
|
70 |
+
$args = array(
|
71 |
+
'post_type' => 'sp_performance',
|
72 |
+
'numberposts' => 100,
|
73 |
+
'posts_per_page' => 100,
|
74 |
+
'orderby' => 'menu_order',
|
75 |
+
'order' => 'ASC',
|
76 |
+
);
|
77 |
+
|
78 |
+
$columns = get_posts( $args );
|
79 |
+
|
80 |
+
// Get formats
|
81 |
+
$formats = array();
|
82 |
+
|
83 |
+
// Add to formats
|
84 |
+
foreach ( $columns as $column ) {
|
85 |
+
$format = get_post_meta( $column->ID, 'sp_format', true );
|
86 |
+
if ( '' === $format ) {
|
87 |
+
$format = 'number';
|
88 |
+
}
|
89 |
+
$formats[ $column->post_name ] = $format;
|
90 |
+
}
|
91 |
+
|
92 |
+
if ( $is_individual ) {
|
93 |
+
// Combined table
|
94 |
+
$data = array();
|
95 |
+
foreach ( $performance as $players ) {
|
96 |
+
foreach ( $players as $player_id => $player ) {
|
97 |
+
if ( $player_id == 0 ) continue;
|
98 |
+
$data[ $player_id ] = $player;
|
99 |
+
}
|
100 |
+
}
|
101 |
+
|
102 |
+
sp_get_template( 'event-performance-table-combined.php', array(
|
103 |
+
'scrollable' => $scrollable,
|
104 |
+
'sortable' => $sortable,
|
105 |
+
'show_players' => $show_players,
|
106 |
+
'show_numbers' => $show_numbers,
|
107 |
+
'show_total' => $show_total,
|
108 |
+
'caption' => __( 'Scorecard', 'sportspress' ),
|
109 |
+
'labels' => $labels,
|
110 |
+
'formats' => $formats,
|
111 |
+
'mode' => $mode,
|
112 |
+
'data' => $data,
|
113 |
+
'event' => $event,
|
114 |
+
'link_posts' => $link_posts,
|
115 |
+
'performance_ids' => isset( $performance_ids ) ? $performance_ids : null,
|
116 |
+
'primary' => 'primary' == $total ? $primary : null,
|
117 |
+
) );
|
118 |
+
} else {
|
119 |
+
|
120 |
+
// Prepare for offense and defense sections
|
121 |
+
if ( -1 != $sections ) {
|
122 |
+
|
123 |
+
// Determine order of sections
|
124 |
+
if ( 1 == $sections ) {
|
125 |
+
$section_order = array( 1 => __( 'Defense', 'sportspress' ), 0 => __( 'Offense', 'sportspress' ) );
|
126 |
+
} else {
|
127 |
+
$section_order = array( __( 'Offense', 'sportspress' ), __( 'Defense', 'sportspress' ) );
|
128 |
+
}
|
129 |
+
|
130 |
+
// Initialize labels
|
131 |
+
$labels = array( array(), array() );
|
132 |
+
|
133 |
+
// Add positions if applicable
|
134 |
+
if ( 'yes' == get_option( 'sportspress_event_show_position', 'yes' ) ) {
|
135 |
+
$labels[0]['position'] = $labels[1]['position'] = __( 'Position', 'sportspress' );
|
136 |
+
}
|
137 |
|
138 |
+
// Get labels by section
|
139 |
+
foreach ( $columns as $column ):
|
140 |
+
$section = get_post_meta( $column->ID, 'sp_section', true );
|
141 |
+
if ( '' === $section ) {
|
142 |
+
$section = -1;
|
143 |
+
}
|
144 |
+
switch ( $section ):
|
145 |
+
case 1:
|
146 |
+
$labels[1][ $column->post_name ] = $column->post_title;
|
147 |
+
break;
|
148 |
+
case 0:
|
149 |
+
$labels[0][ $column->post_name ] = $column->post_title;
|
150 |
+
break;
|
151 |
+
default:
|
152 |
+
$labels[0][ $column->post_name ] = $column->post_title;
|
153 |
+
$labels[1][ $column->post_name ] = $column->post_title;
|
154 |
+
endswitch;
|
155 |
+
endforeach;
|
156 |
+
}
|
157 |
+
|
158 |
+
foreach( $teams as $index => $team_id ) {
|
159 |
if ( -1 == $team_id ) continue;
|
160 |
|
161 |
// Get results for players in the team
|
162 |
$players = sp_array_between( (array)get_post_meta( $id, 'sp_player', false ), 0, $index );
|
163 |
$has_players = sizeof( $players ) > 1;
|
164 |
|
165 |
+
$players = apply_filters( 'sportspress_event_performance_split_team_players', $players );
|
|
|
|
|
166 |
|
167 |
$show_team_players = $show_players && $has_players;
|
168 |
|
169 |
+
if ( ! $show_team_players && ! $show_staff && ! $show_total ) continue;
|
170 |
+
|
171 |
+
if ( $show_team_players || $show_total ) {
|
172 |
+
if ( -1 != $sections ) {
|
173 |
+
|
174 |
+
$data = array();
|
175 |
+
|
176 |
+
$offense = (array)get_post_meta( $id, 'sp_offense', false );
|
177 |
+
$defense = (array)get_post_meta( $id, 'sp_defense', false );
|
178 |
+
|
179 |
+
if ( sizeof( $offense ) || sizeof( $defense ) ) {
|
180 |
+
// Get results for offensive players in the team
|
181 |
+
$offense = sp_array_between( $offense, 0, $index );
|
182 |
+
$data[0] = sp_array_combine( $offense, sp_array_value( $performance, $team_id, array() ) );
|
183 |
+
|
184 |
+
// Get results for defensive players in the team
|
185 |
+
$defense = sp_array_between( $defense, 0, $index );
|
186 |
+
$data[1] = sp_array_combine( $defense, sp_array_value( $performance, $team_id, array() ) );
|
187 |
+
} else {
|
188 |
+
// Get results for all players in the team
|
189 |
+
$players = sp_array_between( (array)get_post_meta( $id, 'sp_player', false ), 0, $index );
|
190 |
+
$data[0] = $data[1] = sp_array_combine( $players, sp_array_value( $performance, $team_id, array() ) );
|
191 |
}
|
192 |
+
|
193 |
+
$s = 0;
|
194 |
+
|
195 |
+
foreach ( $section_order as $section_id => $section_label ) {
|
196 |
+
if ( sizeof( $data[ $section_id ] ) ) {
|
197 |
+
if ( 1 == $section_id ) {
|
198 |
+
$order = (array)get_post_meta( $id, 'sp_order', true );
|
199 |
+
if ( is_array( $order ) && sizeof( $order ) ) {
|
200 |
+
$player_order = sp_array_value( $order, $team_id, array() );
|
201 |
+
if ( is_array( $player_order ) && sizeof( $player_order ) ) {
|
202 |
+
$data[1] = sp_array_combine( $player_order, $data[1], true );
|
203 |
+
}
|
204 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
205 |
}
|
206 |
+
|
207 |
sp_get_template( 'event-performance-table.php', array(
|
208 |
+
'section' => $section_id,
|
209 |
+
'section_label' => $section_label,
|
210 |
'scrollable' => $scrollable,
|
211 |
'sortable' => $sortable,
|
212 |
'show_players' => $show_team_players,
|
213 |
'show_numbers' => $show_numbers,
|
|
|
214 |
'show_total' => $show_total,
|
215 |
+
'caption' => 0 == $s && $team_id ? get_the_title( $team_id ) : null,
|
216 |
+
'labels' => $labels[ $section_id ],
|
217 |
+
'formats' => $formats,
|
218 |
'mode' => $mode,
|
219 |
+
'data' => $data[ $section_id ],
|
220 |
'event' => $event,
|
221 |
'link_posts' => $link_posts,
|
222 |
'performance_ids' => isset( $performance_ids ) ? $performance_ids : null,
|
223 |
'primary' => 'primary' == $total ? $primary : null,
|
224 |
+
'class' => 'sp-template-event-performance-team-' . $index . ' sp-template-event-performance-section-' . $section_id . ' sp-template-event-performance-team-' . $index . '-section-' . $section_id,
|
225 |
) );
|
226 |
}
|
227 |
+
|
228 |
+
$s++;
|
229 |
}
|
230 |
} else {
|
231 |
+
if ( 0 < $team_id ) {
|
232 |
+
$data = sp_array_combine( $players, sp_array_value( $performance, $team_id, array() ) );
|
233 |
+
} elseif ( 0 == $team_id ) {
|
234 |
+
$data = array();
|
235 |
+
foreach ( $players as $player_id ) {
|
236 |
+
if ( isset( $performance[ $player_id ][ $player_id ] ) ) {
|
237 |
+
$data[ $player_id ] = $performance[ $player_id ][ $player_id ];
|
238 |
+
}
|
239 |
+
}
|
240 |
+
} else {
|
241 |
+
$data = sp_array_value( array_values( $performance ), $index );
|
242 |
+
}
|
243 |
+
|
244 |
sp_get_template( 'event-performance-table.php', array(
|
245 |
'scrollable' => $scrollable,
|
246 |
'sortable' => $sortable,
|
247 |
'show_players' => $show_team_players,
|
248 |
'show_numbers' => $show_numbers,
|
|
|
249 |
'show_total' => $show_total,
|
250 |
'caption' => $team_id ? get_the_title( $team_id ) : null,
|
251 |
'labels' => $labels,
|
252 |
+
'formats' => $formats,
|
253 |
'mode' => $mode,
|
254 |
'data' => $data,
|
255 |
'event' => $event,
|
260 |
) );
|
261 |
}
|
262 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
263 |
}
|
264 |
+
|
265 |
+
if ( $show_staff ):
|
266 |
+
sp_get_template( 'event-staff.php', array( 'id' => $id, 'index' => $index ) );
|
267 |
+
endif;
|
268 |
+
?>
|
269 |
+
<?php
|
270 |
}
|
271 |
|
272 |
do_action( 'sportspress_event_performance' );
|
templates/event-venue.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* @author ThemeBoy
|
6 |
* @package SportsPress/Templates
|
7 |
-
* @version 1.
|
8 |
*/
|
9 |
|
10 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
@@ -44,7 +44,7 @@ foreach( $venues as $venue ):
|
|
44 |
<?php if ( $show_maps && $latitude != null && $longitude != null ): ?>
|
45 |
<tbody>
|
46 |
<tr class="sp-event-venue-map-row">
|
47 |
-
<td
|
48 |
</tr>
|
49 |
<?php if ( $address != null ) { ?>
|
50 |
<tr class="sp-event-venue-address-row">
|
4 |
*
|
5 |
* @author ThemeBoy
|
6 |
* @package SportsPress/Templates
|
7 |
+
* @version 1.9
|
8 |
*/
|
9 |
|
10 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
44 |
<?php if ( $show_maps && $latitude != null && $longitude != null ): ?>
|
45 |
<tbody>
|
46 |
<tr class="sp-event-venue-map-row">
|
47 |
+
<td><?php sp_get_template( 'venue-map.php', array( 'meta' => $meta ) ); ?></td>
|
48 |
</tr>
|
49 |
<?php if ( $address != null ) { ?>
|
50 |
<tr class="sp-event-venue-address-row">
|
templates/league-table.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* @author ThemeBoy
|
6 |
* @package SportsPress/Templates
|
7 |
-
* @version 1.
|
8 |
*/
|
9 |
|
10 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
@@ -31,8 +31,13 @@ if ( ! isset( $highlight ) ) $highlight = get_post_meta( $id, 'sp_highlight', tr
|
|
31 |
|
32 |
$table = new SP_League_Table( $id );
|
33 |
|
34 |
-
if ( $show_title && false === $title && $id )
|
35 |
-
$
|
|
|
|
|
|
|
|
|
|
|
36 |
|
37 |
$output = '';
|
38 |
|
@@ -116,7 +121,7 @@ foreach ( $data as $team_id => $row ):
|
|
116 |
$td_class = ' sp-highlight';
|
117 |
endif;
|
118 |
|
119 |
-
$output .= '<tr class="' . ( $i % 2 == 0 ? 'odd' : 'even' ) . $tr_class . '">';
|
120 |
|
121 |
// Rank
|
122 |
$output .= '<td class="data-rank' . $td_class . '">' . sp_array_value( $row, 'pos' ) . '</td>';
|
@@ -162,4 +167,4 @@ if ( $show_full_table_link )
|
|
162 |
?>
|
163 |
<div class="sp-template sp-template-league-table">
|
164 |
<?php echo $output; ?>
|
165 |
-
</div>
|
4 |
*
|
5 |
* @author ThemeBoy
|
6 |
* @package SportsPress/Templates
|
7 |
+
* @version 1.9.13
|
8 |
*/
|
9 |
|
10 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
31 |
|
32 |
$table = new SP_League_Table( $id );
|
33 |
|
34 |
+
if ( $show_title && false === $title && $id ):
|
35 |
+
$caption = $table->caption;
|
36 |
+
if ( $caption )
|
37 |
+
$title = $caption;
|
38 |
+
else
|
39 |
+
$title = get_the_title( $id );
|
40 |
+
endif;
|
41 |
|
42 |
$output = '';
|
43 |
|
121 |
$td_class = ' sp-highlight';
|
122 |
endif;
|
123 |
|
124 |
+
$output .= '<tr class="' . ( $i % 2 == 0 ? 'odd' : 'even' ) . $tr_class . ' sp-row-no-' . $i . '">';
|
125 |
|
126 |
// Rank
|
127 |
$output .= '<td class="data-rank' . $td_class . '">' . sp_array_value( $row, 'pos' ) . '</td>';
|
167 |
?>
|
168 |
<div class="sp-template sp-template-league-table">
|
169 |
<?php echo $output; ?>
|
170 |
+
</div>
|
templates/player-details.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* @author ThemeBoy
|
6 |
* @package SportsPress/Templates
|
7 |
-
* @version 1.
|
8 |
*/
|
9 |
|
10 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
@@ -18,6 +18,8 @@ $defaults = array(
|
|
18 |
'show_positions' => get_option( 'sportspress_player_show_positions', 'yes' ) == 'yes' ? true : false,
|
19 |
'show_current_teams' => get_option( 'sportspress_player_show_current_teams', 'yes' ) == 'yes' ? true : false,
|
20 |
'show_past_teams' => get_option( 'sportspress_player_show_past_teams', 'yes' ) == 'yes' ? true : false,
|
|
|
|
|
21 |
'show_nationality_flags' => get_option( 'sportspress_player_show_flags', 'yes' ) == 'yes' ? true : false,
|
22 |
'link_teams' => get_option( 'sportspress_link_teams', 'no' ) == 'yes' ? true : false,
|
23 |
);
|
@@ -32,6 +34,8 @@ $nationalities = $player->nationalities();
|
|
32 |
$positions = $player->positions();
|
33 |
$current_teams = $player->current_teams();
|
34 |
$past_teams = $player->past_teams();
|
|
|
|
|
35 |
$metrics_before = $player->metrics( true );
|
36 |
$metrics_after = $player->metrics( false );
|
37 |
|
@@ -39,18 +43,13 @@ $common = array();
|
|
39 |
if ( $show_nationality && $nationalities && is_array( $nationalities ) ):
|
40 |
$values = array();
|
41 |
foreach ( $nationalities as $nationality ):
|
42 |
-
if ( 2 == strlen( $nationality ) ):
|
43 |
-
$legacy = SP()->countries->legacy;
|
44 |
-
$nationality = strtolower( $nationality );
|
45 |
-
$nationality = sp_array_value( $legacy, $nationality, null );
|
46 |
-
endif;
|
47 |
$country_name = sp_array_value( $countries, $nationality, null );
|
48 |
$values[] = $country_name ? ( $show_nationality_flags ? '<img src="' . plugin_dir_url( SP_PLUGIN_FILE ) . 'assets/images/flags/' . strtolower( $nationality ) . '.png" alt="' . $nationality . '"> ' : '' ) . $country_name : '—';
|
49 |
endforeach;
|
50 |
$common[ __( 'Nationality', 'sportspress' ) ] = implode( '<br>', $values );
|
51 |
endif;
|
52 |
|
53 |
-
if ( $show_positions && $positions ):
|
54 |
$position_names = array();
|
55 |
foreach ( $positions as $position ):
|
56 |
$position_names[] = $position->name;
|
@@ -80,6 +79,22 @@ if ( $show_past_teams && $past_teams ):
|
|
80 |
$data[ __( 'Past Teams', 'sportspress' ) ] = implode( ', ', $teams );
|
81 |
endif;
|
82 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
$data = apply_filters( 'sportspress_player_details', $data, $id );
|
84 |
|
85 |
if ( empty( $data ) )
|
4 |
*
|
5 |
* @author ThemeBoy
|
6 |
* @package SportsPress/Templates
|
7 |
+
* @version 1.9
|
8 |
*/
|
9 |
|
10 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
18 |
'show_positions' => get_option( 'sportspress_player_show_positions', 'yes' ) == 'yes' ? true : false,
|
19 |
'show_current_teams' => get_option( 'sportspress_player_show_current_teams', 'yes' ) == 'yes' ? true : false,
|
20 |
'show_past_teams' => get_option( 'sportspress_player_show_past_teams', 'yes' ) == 'yes' ? true : false,
|
21 |
+
'show_leagues' => get_option( 'sportspress_player_show_leagues', 'no' ) == 'yes' ? true : false,
|
22 |
+
'show_seasons' => get_option( 'sportspress_player_show_seasons', 'no' ) == 'yes' ? true : false,
|
23 |
'show_nationality_flags' => get_option( 'sportspress_player_show_flags', 'yes' ) == 'yes' ? true : false,
|
24 |
'link_teams' => get_option( 'sportspress_link_teams', 'no' ) == 'yes' ? true : false,
|
25 |
);
|
34 |
$positions = $player->positions();
|
35 |
$current_teams = $player->current_teams();
|
36 |
$past_teams = $player->past_teams();
|
37 |
+
$leagues = $player->leagues();
|
38 |
+
$seasons = $player->seasons();
|
39 |
$metrics_before = $player->metrics( true );
|
40 |
$metrics_after = $player->metrics( false );
|
41 |
|
43 |
if ( $show_nationality && $nationalities && is_array( $nationalities ) ):
|
44 |
$values = array();
|
45 |
foreach ( $nationalities as $nationality ):
|
|
|
|
|
|
|
|
|
|
|
46 |
$country_name = sp_array_value( $countries, $nationality, null );
|
47 |
$values[] = $country_name ? ( $show_nationality_flags ? '<img src="' . plugin_dir_url( SP_PLUGIN_FILE ) . 'assets/images/flags/' . strtolower( $nationality ) . '.png" alt="' . $nationality . '"> ' : '' ) . $country_name : '—';
|
48 |
endforeach;
|
49 |
$common[ __( 'Nationality', 'sportspress' ) ] = implode( '<br>', $values );
|
50 |
endif;
|
51 |
|
52 |
+
if ( $show_positions && $positions && is_array( $positions ) ):
|
53 |
$position_names = array();
|
54 |
foreach ( $positions as $position ):
|
55 |
$position_names[] = $position->name;
|
79 |
$data[ __( 'Past Teams', 'sportspress' ) ] = implode( ', ', $teams );
|
80 |
endif;
|
81 |
|
82 |
+
if ( $show_leagues && $leagues && ! is_wp_error( $leagues ) ):
|
83 |
+
$terms = array();
|
84 |
+
foreach ( $leagues as $league ) {
|
85 |
+
$terms[] = $league->name;
|
86 |
+
}
|
87 |
+
$data[ __( 'Competitions', 'sportspress' ) ] = implode( ', ', $terms );
|
88 |
+
endif;
|
89 |
+
|
90 |
+
if ( $show_seasons && $seasons && ! is_wp_error( $seasons ) ):
|
91 |
+
$terms = array();
|
92 |
+
foreach ( $seasons as $season ) {
|
93 |
+
$terms[] = $season->name;
|
94 |
+
}
|
95 |
+
$data[ __( 'Seasons', 'sportspress' ) ] = implode( ', ', $terms );
|
96 |
+
endif;
|
97 |
+
|
98 |
$data = apply_filters( 'sportspress_player_details', $data, $id );
|
99 |
|
100 |
if ( empty( $data ) )
|
templates/player-gallery-thumbnail.php
CHANGED
@@ -4,18 +4,17 @@
|
|
4 |
*
|
5 |
* @author ThemeBoy
|
6 |
* @package SportsPress/Templates
|
7 |
-
* @version 1.
|
8 |
*/
|
9 |
|
10 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
11 |
|
12 |
$defaults = array(
|
13 |
'id' => null,
|
14 |
-
'performance' => array(),
|
15 |
'icontag' => 'dt',
|
16 |
'captiontag' => 'dd',
|
17 |
'caption' => null,
|
18 |
-
'size' => '
|
19 |
'link_posts' => get_option( 'sportspress_link_players', 'yes' ) == 'yes' ? true : false,
|
20 |
);
|
21 |
|
@@ -33,9 +32,6 @@ if ( $captiontag && $caption )
|
|
33 |
if ( $link_posts )
|
34 |
$caption = '<a href="' . get_permalink( $id ) . '">' . $caption . '</a>';
|
35 |
|
36 |
-
if ( isset( $limit ) && $i >= $limit )
|
37 |
-
continue;
|
38 |
-
|
39 |
if ( has_post_thumbnail( $id ) )
|
40 |
$thumbnail = get_the_post_thumbnail( $id, $size );
|
41 |
else
|
4 |
*
|
5 |
* @author ThemeBoy
|
6 |
* @package SportsPress/Templates
|
7 |
+
* @version 1.9.13
|
8 |
*/
|
9 |
|
10 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
11 |
|
12 |
$defaults = array(
|
13 |
'id' => null,
|
|
|
14 |
'icontag' => 'dt',
|
15 |
'captiontag' => 'dd',
|
16 |
'caption' => null,
|
17 |
+
'size' => 'sportspress-crop-medium',
|
18 |
'link_posts' => get_option( 'sportspress_link_players', 'yes' ) == 'yes' ? true : false,
|
19 |
);
|
20 |
|
32 |
if ( $link_posts )
|
33 |
$caption = '<a href="' . get_permalink( $id ) . '">' . $caption . '</a>';
|
34 |
|
|
|
|
|
|
|
35 |
if ( has_post_thumbnail( $id ) )
|
36 |
$thumbnail = get_the_post_thumbnail( $id, $size );
|
37 |
else
|
templates/player-gallery.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* @author ThemeBoy
|
6 |
* @package SportsPress/Templates
|
7 |
-
* @version 1.
|
8 |
*/
|
9 |
|
10 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
@@ -22,7 +22,7 @@ $defaults = array(
|
|
22 |
'captiontag' => 'dd',
|
23 |
'grouptag' => 'h4',
|
24 |
'columns' => 3,
|
25 |
-
'size' => '
|
26 |
'show_all_players_link' => false,
|
27 |
'link_posts' => get_option( 'sportspress_link_players', 'yes' ) == 'yes' ? true : false,
|
28 |
);
|
@@ -121,6 +121,8 @@ echo apply_filters( 'gallery_style', $gallery_style . "\n\t\t" );
|
|
121 |
$i = 0;
|
122 |
|
123 |
echo '<div class="sp-template sp-template-player-gallery sp-template-gallery">';
|
|
|
|
|
124 |
|
125 |
if ( ! empty( $group->name ) ):
|
126 |
echo '<a name="group-' . $group->slug . '" id="group-' . $group->slug . '"></a>';
|
@@ -136,7 +138,6 @@ echo apply_filters( 'gallery_style', $gallery_style . "\n\t\t" );
|
|
136 |
|
137 |
sp_get_template( 'player-gallery-thumbnail.php', array(
|
138 |
'id' => $player_id,
|
139 |
-
'performance' => $performance,
|
140 |
'itemtag' => $itemtag,
|
141 |
'icontag' => $icontag,
|
142 |
'captiontag' => $captiontag,
|
@@ -154,6 +155,8 @@ echo apply_filters( 'gallery_style', $gallery_style . "\n\t\t" );
|
|
154 |
if ( ! $html5 && $columns > 0 && ++$i % $columns == 0 ) {
|
155 |
echo '<br style="clear: both" />';
|
156 |
}
|
|
|
|
|
157 |
|
158 |
if ( $show_all_players_link && ( 'position' !== $grouping || $j == count( $groups ) ) ) {
|
159 |
echo '<div class="sp-player-gallery-link sp-gallery-link sp-view-all-link"><a href="' . get_permalink( $id ) . '">' . __( 'View all players', 'sportspress' ) . '</a></div>';
|
4 |
*
|
5 |
* @author ThemeBoy
|
6 |
* @package SportsPress/Templates
|
7 |
+
* @version 1.9.13
|
8 |
*/
|
9 |
|
10 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
22 |
'captiontag' => 'dd',
|
23 |
'grouptag' => 'h4',
|
24 |
'columns' => 3,
|
25 |
+
'size' => 'sportspress-crop-medium',
|
26 |
'show_all_players_link' => false,
|
27 |
'link_posts' => get_option( 'sportspress_link_players', 'yes' ) == 'yes' ? true : false,
|
28 |
);
|
121 |
$i = 0;
|
122 |
|
123 |
echo '<div class="sp-template sp-template-player-gallery sp-template-gallery">';
|
124 |
+
|
125 |
+
echo '<div class="sp-player-gallery-wrapper">';
|
126 |
|
127 |
if ( ! empty( $group->name ) ):
|
128 |
echo '<a name="group-' . $group->slug . '" id="group-' . $group->slug . '"></a>';
|
138 |
|
139 |
sp_get_template( 'player-gallery-thumbnail.php', array(
|
140 |
'id' => $player_id,
|
|
|
141 |
'itemtag' => $itemtag,
|
142 |
'icontag' => $icontag,
|
143 |
'captiontag' => $captiontag,
|
155 |
if ( ! $html5 && $columns > 0 && ++$i % $columns == 0 ) {
|
156 |
echo '<br style="clear: both" />';
|
157 |
}
|
158 |
+
|
159 |
+
echo '</div>';
|
160 |
|
161 |
if ( $show_all_players_link && ( 'position' !== $grouping || $j == count( $groups ) ) ) {
|
162 |
echo '<div class="sp-player-gallery-link sp-gallery-link sp-view-all-link"><a href="' . get_permalink( $id ) . '">' . __( 'View all players', 'sportspress' ) . '</a></div>';
|
templates/player-list.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* @author ThemeBoy
|
6 |
* @package SportsPress/Templates
|
7 |
-
* @version 1.
|
8 |
*/
|
9 |
|
10 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
@@ -20,7 +20,8 @@ $defaults = array(
|
|
20 |
'order' => 'ASC',
|
21 |
'show_all_players_link' => false,
|
22 |
'show_title' => get_option( 'sportspress_list_show_title', 'yes' ) == 'yes' ? true : false,
|
23 |
-
'show_player_photo' => get_option( 'sportspress_list_show_photos', '
|
|
|
24 |
'link_posts' => get_option( 'sportspress_link_players', 'yes' ) == 'yes' ? true : false,
|
25 |
'link_teams' => get_option( 'sportspress_link_teams', 'no' ) == 'yes' ? true : false,
|
26 |
'sortable' => get_option( 'sportspress_enable_sortable_tables', 'yes' ) == 'yes' ? true : false,
|
@@ -73,8 +74,13 @@ $output = '';
|
|
73 |
if ( $grouping === 'position' ):
|
74 |
$groups = get_terms( 'sp_position', array( 'orderby' => 'slug' ) );
|
75 |
else:
|
76 |
-
if ( $show_title && false === $title && $id )
|
77 |
-
|
|
|
|
|
|
|
|
|
|
|
78 |
if ( $title )
|
79 |
$output .= '<' . $grouptag . ' class="sp-table-caption">' . $title . '</' . $grouptag . '>';
|
80 |
$group = new stdClass();
|
@@ -144,6 +150,17 @@ foreach ( $groups as $group ):
|
|
144 |
endif;
|
145 |
endif;
|
146 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
147 |
if ( $link_posts ):
|
148 |
$permalink = get_post_permalink( $player_id );
|
149 |
$name = '<a href="' . $permalink . '">' . $name . '</a>';
|
@@ -159,9 +176,20 @@ foreach ( $groups as $group ):
|
|
159 |
endif;
|
160 |
$output .= '<td class="data-team">' . $team_name . '</td>';
|
161 |
endif;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
162 |
|
163 |
foreach( $labels as $key => $value ):
|
164 |
-
if ( in_array( $key, array( 'number', 'name', 'team' ) ) )
|
165 |
continue;
|
166 |
if ( ! is_array( $columns ) || in_array( $key, $columns ) )
|
167 |
$output .= '<td class="data-' . $key . '">' . sp_array_value( $row, $key, '—' ) . '</td>';
|
4 |
*
|
5 |
* @author ThemeBoy
|
6 |
* @package SportsPress/Templates
|
7 |
+
* @version 1.9.13
|
8 |
*/
|
9 |
|
10 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
20 |
'order' => 'ASC',
|
21 |
'show_all_players_link' => false,
|
22 |
'show_title' => get_option( 'sportspress_list_show_title', 'yes' ) == 'yes' ? true : false,
|
23 |
+
'show_player_photo' => get_option( 'sportspress_list_show_photos', 'no' ) == 'yes' ? true : false,
|
24 |
+
'show_player_flag' => get_option( 'sportspress_list_show_flags', 'no' ) == 'yes' ? true : false,
|
25 |
'link_posts' => get_option( 'sportspress_link_players', 'yes' ) == 'yes' ? true : false,
|
26 |
'link_teams' => get_option( 'sportspress_link_teams', 'no' ) == 'yes' ? true : false,
|
27 |
'sortable' => get_option( 'sportspress_enable_sortable_tables', 'yes' ) == 'yes' ? true : false,
|
74 |
if ( $grouping === 'position' ):
|
75 |
$groups = get_terms( 'sp_position', array( 'orderby' => 'slug' ) );
|
76 |
else:
|
77 |
+
if ( $show_title && false === $title && $id ):
|
78 |
+
$caption = $list->caption;
|
79 |
+
if ( $caption )
|
80 |
+
$title = $caption;
|
81 |
+
else
|
82 |
+
$title = get_the_title( $id );
|
83 |
+
endif;
|
84 |
if ( $title )
|
85 |
$output .= '<' . $grouptag . ' class="sp-table-caption">' . $title . '</' . $grouptag . '>';
|
86 |
$group = new stdClass();
|
150 |
endif;
|
151 |
endif;
|
152 |
|
153 |
+
if ( $show_player_flag ):
|
154 |
+
$player = new SP_Player( $player_id );
|
155 |
+
$nationalities = $player->nationalities();
|
156 |
+
if ( ! empty( $nationalities ) ):
|
157 |
+
foreach ( $nationalities as $nationality ):
|
158 |
+
$name = '<span class="player-flag"><img src="' . plugin_dir_url( SP_PLUGIN_FILE ) . 'assets/images/flags/' . strtolower( $nationality ) . '.png" alt="' . $nationality . '"></span>' . $name;
|
159 |
+
endforeach;
|
160 |
+
$name_class .= ' has-photo';
|
161 |
+
endif;
|
162 |
+
endif;
|
163 |
+
|
164 |
if ( $link_posts ):
|
165 |
$permalink = get_post_permalink( $player_id );
|
166 |
$name = '<a href="' . $permalink . '">' . $name . '</a>';
|
176 |
endif;
|
177 |
$output .= '<td class="data-team">' . $team_name . '</td>';
|
178 |
endif;
|
179 |
+
|
180 |
+
if ( array_key_exists( 'position', $labels ) ):
|
181 |
+
$position = sp_array_value( $row, 'position', null );
|
182 |
+
if ( null === $position || ! $position ):
|
183 |
+
$positions = wp_strip_all_tags( get_the_term_list( $player_id, 'sp_position', '', ', ' ) );
|
184 |
+
else:
|
185 |
+
$position_term = get_term_by( 'id', $position, 'sp_position', ARRAY_A );
|
186 |
+
$positions = sp_array_value( $position_term, 'name', '—' );
|
187 |
+
endif;
|
188 |
+
$output .= '<td class="data-position">' . $positions . '</td>';
|
189 |
+
endif;
|
190 |
|
191 |
foreach( $labels as $key => $value ):
|
192 |
+
if ( in_array( $key, array( 'number', 'name', 'team', 'position' ) ) )
|
193 |
continue;
|
194 |
if ( ! is_array( $columns ) || in_array( $key, $columns ) )
|
195 |
$output .= '<td class="data-' . $key . '">' . sp_array_value( $row, $key, '—' ) . '</td>';
|
templates/player-photo.php
CHANGED
@@ -16,7 +16,7 @@ if ( ! isset( $id ) )
|
|
16 |
if ( has_post_thumbnail( $id ) ):
|
17 |
?>
|
18 |
<div class="sp-template sp-template-player-photo sp-template-photo sp-player-photo">
|
19 |
-
<?php echo get_the_post_thumbnail( $id, 'medium' ); ?>
|
20 |
</div>
|
21 |
<?php
|
22 |
endif;
|
16 |
if ( has_post_thumbnail( $id ) ):
|
17 |
?>
|
18 |
<div class="sp-template sp-template-player-photo sp-template-photo sp-player-photo">
|
19 |
+
<?php echo get_the_post_thumbnail( $id, 'sportspress-fit-medium' ); ?>
|
20 |
</div>
|
21 |
<?php
|
22 |
endif;
|
templates/post-excerpt.php
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Post Excerpt
|
4 |
+
*
|
5 |
+
* @author ThemeBoy
|
6 |
+
* @package SportsPress/Templates
|
7 |
+
* @version 1.9
|
8 |
+
*/
|
9 |
+
|
10 |
+
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
11 |
+
|
12 |
+
$id = get_the_ID();
|
13 |
+
$post = get_post( $id );
|
14 |
+
$excerpt = $post->post_excerpt;
|
15 |
+
if ( $excerpt ) {
|
16 |
+
?>
|
17 |
+
<p class="sp-excerpt"><?php echo $excerpt; ?></p>
|
18 |
+
<?php
|
19 |
+
}
|
templates/staff-photo.php
CHANGED
@@ -16,7 +16,7 @@ if ( ! isset( $id ) )
|
|
16 |
if ( has_post_thumbnail( $id ) ):
|
17 |
?>
|
18 |
<div class="sp-template sp-template-staff-photo sp-template-photo sp-staff-photo">
|
19 |
-
<?php echo get_the_post_thumbnail( $id, 'medium' ); ?>
|
20 |
</div>
|
21 |
<?php
|
22 |
endif;
|
16 |
if ( has_post_thumbnail( $id ) ):
|
17 |
?>
|
18 |
<div class="sp-template sp-template-staff-photo sp-template-photo sp-staff-photo">
|
19 |
+
<?php echo get_the_post_thumbnail( $id, 'sportspress-fit-medium' ); ?>
|
20 |
</div>
|
21 |
<?php
|
22 |
endif;
|
templates/team-staff.php
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Team Staff
|
4 |
+
*
|
5 |
+
* @author ThemeBoy
|
6 |
+
* @package SportsPress/Templates
|
7 |
+
* @version 1.9.13
|
8 |
+
*/
|
9 |
+
|
10 |
+
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
11 |
+
|
12 |
+
if ( ! isset( $id ) )
|
13 |
+
$id = get_the_ID();
|
14 |
+
|
15 |
+
$team = new SP_Team( $id );
|
16 |
+
$members = $team->staff();
|
17 |
+
|
18 |
+
foreach ( $members as $staff ):
|
19 |
+
$id = $staff->ID;
|
20 |
+
$name = $staff->post_title;
|
21 |
+
|
22 |
+
$staff = new SP_Staff( $id );
|
23 |
+
$role = $staff->role();
|
24 |
+
|
25 |
+
if ( $role )
|
26 |
+
$name = '<span class="sp-staff-role">' . $role->name . '</span> ' . $name;
|
27 |
+
?>
|
28 |
+
<h4 class="sp-staff-name"><?php echo $name; ?></h4>
|
29 |
+
<?php
|
30 |
+
sp_get_template( 'staff-photo.php', array( 'id' => $id ) );
|
31 |
+
sp_get_template( 'staff-details.php', array( 'id' => $id ) );
|
32 |
+
endforeach;
|
wpml-config.xml
CHANGED
@@ -20,6 +20,7 @@
|
|
20 |
<key name="Preview"/>
|
21 |
<key name="Rank"/>
|
22 |
<key name="Recap"/>
|
|
|
23 |
<key name="Season"/>
|
24 |
<key name="Staff"/>
|
25 |
<key name="Substitutes"/>
|
20 |
<key name="Preview"/>
|
21 |
<key name="Rank"/>
|
22 |
<key name="Recap"/>
|
23 |
+
<key name="Scorecard"/>
|
24 |
<key name="Season"/>
|
25 |
<key name="Staff"/>
|
26 |
<key name="Substitutes"/>
|