Changeset 3270053
- Timestamp:
- 04/10/2025 12:42:00 AM (11 months ago)
- Location:
- team-rosters
- Files:
-
- 18 edited
-
tags/4.7/css/mstw-tr-styles.css (modified) (1 diff)
-
trunk/includes/mstw-tr-admin.php (modified) (8 diffs)
-
trunk/includes/mstw-tr-csv-import-class.php (modified) (16 diffs)
-
trunk/includes/mstw-tr-data-fields-columns-settings.php (modified) (5 diffs)
-
trunk/includes/mstw-tr-player-cpt-admin.php (modified) (9 diffs)
-
trunk/includes/mstw-tr-player-profiles-galleries-settings.php (modified) (1 diff)
-
trunk/includes/mstw-tr-roster-color-settings.php (modified) (2 diffs)
-
trunk/includes/mstw-tr-roster-table-settings.php (modified) (2 diffs)
-
trunk/includes/mstw-tr-roster-tables-class.php (modified) (16 diffs)
-
trunk/includes/mstw-tr-settings.php (modified) (7 diffs)
-
trunk/includes/mstw-tr-team-roster-admin-class.php (modified) (18 diffs)
-
trunk/includes/mstw-tr-team-tax-admin-class.php (modified) (8 diffs)
-
trunk/includes/mstw-tr-utility-functions.php (modified) (17 diffs)
-
trunk/includes/mstw-utility-functions.php (modified) (12 diffs)
-
trunk/mstw-team-rosters.php (modified) (7 diffs)
-
trunk/readme.txt (modified) (1 diff)
-
trunk/theme-templates/single-player.php (modified) (11 diffs)
-
trunk/theme-templates/taxonomy-team.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
team-rosters/tags/4.7/css/mstw-tr-styles.css
r2823832 r3270053 367 367 div.player-select-list, 368 368 div.player-select-button { 369 /*float : left;*/369 float : left; 370 370 margin-left : 5px; 371 371 margin-right : 5px; -
team-rosters/trunk/includes/mstw-tr-admin.php
r3240856 r3270053 52 52 if ( !is_admin( ) ) { 53 53 54 die( __( 'You is no admin. You a cheater!', 'team-rosters' ) );54 die( esc_html__( 'You is no admin. You a cheater!', 'team-rosters' ) ); 55 55 } 56 56 // … … 241 241 global $current_screen; 242 242 243 wp_enqueue_style( 'tr-admin-styles', plugins_url( 'css/mstw-tr-admin-styles.css', dirname( __FILE__ ) ), array(), false, 'all' ); 243 wp_enqueue_style( 'tr-admin-styles', 244 plugins_url( 'css/mstw-tr-admin-styles.css', dirname( __FILE__ ) ), 245 array( ), 246 '4.9', 247 array( ) 248 ); 244 249 245 250 // This function loads in the required media files for the media manager … … 250 255 wp_enqueue_media(); 251 256 252 wp_enqueue_script( 'another-media', plugins_url( 'team-rosters/js/tr-another-media.js' ), null, false, true ); 253 254 wp_enqueue_style('thickbox'); 257 wp_enqueue_script( 'another-media', 258 plugins_url( 'team-rosters/js/tr-another-media.js' ), 259 array( ), 260 '4.9', 261 array( ) 262 ); 263 264 wp_enqueue_style( 'thickbox' ); 255 265 256 266 // … … 264 274 plugins_url( 'js/tr-manage-rosters.js', dirname( __FILE__ ) ), 265 275 array( ), 266 false, true ); 276 '4.9', 277 array( ) 278 ); 267 279 } 268 280 … … 274 286 plugins_url( 'js/tr-manage-teams.js', dirname( __FILE__ ) ), 275 287 array( ), 276 false, true ); 288 '4.9', 289 array( ) 290 ); 277 291 278 292 } … … 282 296 plugins_url( 'js/tr-load-teams.js', dirname( __FILE__ ) ), 283 297 array( ), 284 false, true ); 298 '4.9', 299 array( ) 300 ); 285 301 } 286 302 … … 812 828 ?> 813 829 <div class="wrap"> 814 <h2><?php _e( 'Team Rosters - Quick Start', 'team-rosters') ?></h2>830 <h2><?php esc_html_e( 'Team Rosters - Quick Start', 'team-rosters') ?></h2> 815 831 <h3>GETTING STARTED</h3> 816 832 <ol> 817 <li><a href="<?php echo admin_url( '/edit-tags.php?taxonomy=mstw_tr_team&post_type=mstw_tr_player' ) ?>">TEAMS</a>. <?php_e('At least one team must exist before anything can be displayed via the shortcodes on the front end. Teams can be entered on this screen, or can be imported in bulk using the CSV IMPORT screen described below.', 'team-rosters' ) ?></li>818 <li><a href="<?php echo admin_url( '/edit.php?post_type=mstw_tr_player' ) ?>">MANAGE PLAYERS</a>. <?php_e( 'After creating one or more teams, players must be added to them. Players may be added, edited, and deleted on this screen. However, there are faster ways to add players in bulk. See ADD PLAYERS TO ROSTERS and CSV IMPORT below.', 'team-rosters' )?></li>819 <li><a href="<?php echo admin_url( '/admin.php?page=add-players-screen' ) ?>">ADD PLAYERS TO ROSTERS</a>.<?php_e( 'Multiple players may be added to a roster via this screen. While the same data as on the MANAGE PLAYERS screen must be entered, it can be entered more quickly on this screen.', 'team-rosters' )?></li>820 <li><a href="<?php echo admin_url( '/admin.php?page=manage-team-rosters' ) ?>">EDIT ROSTERS</a>. <?php_e( 'Entire rosters may be edited or updated via this screen. While the same data as on the MANAGE PLAYERS screen must be entered, it can entered more quickly on this screen.', 'team-rosters' )?></li>821 <li><a href="<?php echo admin_url( '/admin.php?page=mstw-tr-settings' ) ?>">SETTINGS</a>. <?php_e( 'Provides a rich set of controls for ROSTER TABLES, ROSTER GALLERIES, and SINGLE PLAYER PROFILES.', 'team-rosters' )?></li>822 <li><a href="<?php echo admin_url( '/admin.php?page=mstw-tr-csv-import' ) ?>">CSV IMPORT</a>. <?php_e( 'Provides the ability to upload Teams and Players (including player photos) from CSV formatted files. Note that these CSV files can generated from previous version of MSTW Team Rosters using the MSTW CSV Exporter plugin, or created by hand using an editor. (Excel works great.)', 'team-rosters' )?></li>833 <li><a href="<?php echo esc_url( admin_url( '/edit-tags.php?taxonomy=mstw_tr_team&post_type=mstw_tr_player' ) ) ?>">TEAMS</a>. <?php esc_html_e('At least one team must exist before anything can be displayed via the shortcodes on the front end. Teams can be entered on this screen, or can be imported in bulk using the CSV IMPORT screen described below.', 'team-rosters' ) ?></li> 834 <li><a href="<?php echo esc_url( admin_url( '/edit.php?post_type=mstw_tr_player' ) ) ?>">MANAGE PLAYERS</a>. <?php esc_html_e( 'After creating one or more teams, players must be added to them. Players may be added, edited, and deleted on this screen. However, there are faster ways to add players in bulk. See ADD PLAYERS TO ROSTERS and CSV IMPORT below.', 'team-rosters' )?></li> 835 <li><a href="<?php echo esc_url( admin_url( '/admin.php?page=add-players-screen' ) ) ?>">ADD PLAYERS TO ROSTERS</a>.<?php esc_html_e( 'Multiple players may be added to a roster via this screen. While the same data as on the MANAGE PLAYERS screen must be entered, it can be entered more quickly on this screen.', 'team-rosters' )?></li> 836 <li><a href="<?php echo esc_url( admin_url( '/admin.php?page=manage-team-rosters' ) ) ?>">EDIT ROSTERS</a>. <?php esc_html_e( 'Entire rosters may be edited or updated via this screen. While the same data as on the MANAGE PLAYERS screen must be entered, it can entered more quickly on this screen.', 'team-rosters' )?></li> 837 <li><a href="<?php echo esc_url( admin_url( '/admin.php?page=mstw-tr-settings' ) ) ?>">SETTINGS</a>. <?php esc_html_e( 'Provides a rich set of controls for ROSTER TABLES, ROSTER GALLERIES, and SINGLE PLAYER PROFILES.', 'team-rosters' )?></li> 838 <li><a href="<?php echo esc_url( admin_url( '/admin.php?page=mstw-tr-csv-import' ) ) ?>">CSV IMPORT</a>. <?php esc_html_e( 'Provides the ability to upload Teams and Players (including player photos) from CSV formatted files. Note that these CSV files can generated from previous version of MSTW Team Rosters using the MSTW CSV Exporter plugin, or created by hand using an editor. (Excel works great.)', 'team-rosters' )?></li> 823 839 824 840 </ol> … … 828 844 printf( 829 845 /* Translators: the arguments here are simply html formatting that does not require translation */ 830 __( 'Team Rosters may be displayed in two formats: roster tables and roster galleries. Roster tables are displayed using the shortcode %1$s[mstw-tr-roster team=team-slug]%2$s Roster Galleries my be displayed using the shortcode %1$s[mstw-tr-gallery team=team-slug]%2$s or via the %3$staxonomy_team.php%4$s template. See the %5$sshortcodes man page%6$s for complete details.', 'team-rosters' ), '<blockquote><code>', '</code></blockquote>', '<strong><code>', '</code></strong>', '<a href="http://shoalsummitsolutions.com/tr-shortcodes/">', '</a>' ) ?>846 esc_html__( 'Team Rosters may be displayed in two formats: roster tables and roster galleries. Roster tables are displayed using the shortcode %1$s[mstw-tr-roster team=team-slug]%2$s Roster Galleries my be displayed using the shortcode %1$s[mstw-tr-gallery team=team-slug]%2$s or via the %3$staxonomy_team.php%4$s template. See the %5$sshortcodes man page%6$s for complete details.', 'team-rosters' ), '<blockquote><code>', '</code></blockquote>', '<strong><code>', '</code></strong>', '<a href="http://shoalsummitsolutions.com/tr-shortcodes/">', '</a>' ) ?> 831 847 </p> 832 848 -
team-rosters/trunk/includes/mstw-tr-csv-import-class.php
r3240856 r3270053 84 84 <div class="wrap"> 85 85 <?php //echo get_screen_icon(); ?> 86 <h2><?php _e( 'Import CSV Files', 'team-rosters' ) ?></h2>86 <h2><?php esc_html_e( 'Import CSV Files', 'team-rosters' ) ?></h2> 87 87 88 88 <p class='mstw-lm-admin-instructions'> 89 <?php _e( 'Read the contextual help tab on the top right of this screen.', 'team-rosters' ) ?>89 <?php esc_html_e( 'Read the contextual help tab on the top right of this screen.', 'team-rosters' ) ?> 90 90 </p> 91 91 92 92 <!-- TEAMS import form --> 93 93 <form class="add:the-list: validate" method="post" enctype="multipart/form-data" action=""> 94 <?php wp_nonce_field( 'import-teams', 'mstw-tr-nonce' ); ?> 94 95 95 96 <table class='form-table'> 96 <thead><tr><th><?php _e( 'Teams', 'team-rosters' ) ?></th></tr></thead>97 <thead><tr><th><?php esc_html_e( 'Teams', 'team-rosters' ) ?></th></tr></thead> 97 98 98 99 <tr> <!-- CSV file selection field --> 99 <td><label for="csv_teams_import"><?php _e( 'Teams CSV file:', 'team-rosters' ); ?></label></td>100 <td><label for="csv_teams_import"><?php esc_html_e( 'Teams CSV file:', 'team-rosters' ); ?></label></td> 100 101 <td><input name="csv_teams_import" id="csv_teams_import" type="file" value="" aria-required="true" /> 101 102 <br/> … … 104 105 105 106 <tr> <!-- Submit button --> 106 <td colspan="2" class="submit tr-action-button"><input type="submit" class="button" name="submit" value="<?php _e( 'Import Teams', 'team-rosters' ); ?>"/></td>107 <td colspan="2" class="submit tr-action-button"><input type="submit" class="button" name="submit" value="<?php esc_html_e( 'Import Teams', 'team-rosters' ); ?>"/></td> 107 108 </tr> 108 109 109 110 </table> 110 111 </form> <!--End: Teams import form --> 111 112 <!--<div id = "roster-progress">113 <img src = "/wp-includes/js/thickbox/loadingAnimation.gif" />114 <p class='mstw-lm-admin-instructions'><?php //_e( 'Processing ...', 'team-rosters' )?></p>115 </div> -->116 117 112 118 113 <!-- PLAYERS import form --> … … 139 134 140 135 <form class="add:the-list: validate" method="post" enctype="multipart/form-data"> 141 136 <?php wp_nonce_field( 'import-players', 'mstw-tr-nonce' ); ?> 142 137 <table class='form-table'> 143 138 <thead> 144 139 <tr><th colspan=2> 145 <?php _e( 'Players', 'team-rosters' ) ?>140 <?php esc_html_e( 'Players', 'team-rosters' ) ?> 146 141 <br/> 147 142 <span class='description' style='font-weight: normal'><?php printf( 148 143 /* translators: %1s: HTML newline that should not be translated */ 149 __( 'The importer will use the "player-teams" column in the CSV file to assign teams to a player if that column is not empty.%1$s Otherwise, the player will be assigned to the team selected in the "Select Team to Import" dropdown. %1$sOtherwise, the player will be imported but will not be assigned to a team.', 'team-rosters' ), '<br/>' ) ?></span>144 esc_html__( 'The importer will use the "player-teams" column in the CSV file to assign teams to a player if that column is not empty.%1$s Otherwise, the player will be assigned to the team selected in the "Select Team to Import" dropdown. %1$sOtherwise, the player will be imported but will not be assigned to a team.', 'team-rosters' ), '<br/>' ) ?></span> 150 145 </th></tr> 151 146 </thead> … … 153 148 <tbody> 154 149 <tr> <!-- Team (to import) selection field --> 155 <td><label for="csv_import_team"><?php _e( 'Select Team to Import:', 'team-rosters' ) ?></label></td>150 <td><label for="csv_import_team"><?php esc_html_e( 'Select Team to Import:', 'team-rosters' ) ?></label></td> 156 151 <td><?php wp_dropdown_categories( $args ) ?> 157 152 <br/> 158 <span class='description' ><?php _e( 'This team will be used as the default if there is no entry for a player in the player_teams column.', 'team-rosters' ) ?></span>153 <span class='description' ><?php esc_html_e( 'This team will be used as the default if there is no entry for a player in the player_teams column.', 'team-rosters' ) ?></span> 159 154 </td> 160 155 </tr> 161 156 <tr> 162 <td><label for="csv_move_photos"><?php _e( 'Move Player Photos:', 'team-rosters') ?></label></td>157 <td><label for="csv_move_photos"><?php esc_html_e( 'Move Player Photos:', 'team-rosters') ?></label></td> 163 158 <td><input name="csv_move_photos" id="csv_move_photos" type="checkbox" value="1" /> 164 159 <br/> 165 <span class='description' ><?php _e( 'If checked, photo files will be imported from their current locations to the media library.If unchecked, photo files will remain in their current locations.', 'team-rosters' ) ?></span>160 <span class='description' ><?php esc_html_e( 'If checked, photo files will be imported from their current locations to the media library.If unchecked, photo files will remain in their current locations.', 'team-rosters' ) ?></span> 166 161 </td> 167 162 </tr> 168 163 <tr> <!-- CSV file selection field --> 169 <td><label for="csv_players_import"><?php _e( 'Players CSV file:', 'team-rosters') ?></label></td>164 <td><label for="csv_players_import"><?php esc_html_e( 'Players CSV file:', 'team-rosters') ?></label></td> 170 165 <td><input name="csv_players_import" id="csv_players_import" type="file" value="" aria-required="true" /> 171 166 <br/> 172 <span class='description' ><?php _e( 'Select the CSV players file to import.', 'team-rosters' ) ?></span>167 <span class='description' ><?php esc_html_e( 'Select the CSV players file to import.', 'team-rosters' ) ?></span> 173 168 </td> 174 169 </tr> … … 189 184 function print_messages() { 190 185 //mstw_tr_log_msg( "MSTW_TR_ImporterPlugin.print_messages:" ); 191 //mstw_tr_log_msg( $this -> log );192 186 193 187 if ( !empty( $this->log ) ) { ?> … … 198 192 <div class="error"> 199 193 <?php foreach ($this->log['error'] as $error): ?> 200 <p><?php echo $error; ?></p>194 <p><?php echo esc_html( $error ); ?></p> 201 195 <?php endforeach; ?> 202 196 </div> … … 206 200 <div class="updated fade"> 207 201 <?php foreach ($this->log['notice'] as $notice): ?> 208 <p><?php echo $notice; ?></p>202 <p><?php echo esc_html( $notice ); ?></p> 209 203 <?php endforeach; ?> 210 204 </div> … … 226 220 function post( $options ) { 227 221 //mstw_tr_log_msg( "MSTW_TR_ImporterPlugin.post:" ); 228 //mstw_tr_log_msg( $options );229 222 230 223 if ( !$options ) { … … 235 228 switch( $options['submit_value'] ) { 236 229 case __( 'Import Teams', 'team-rosters' ): 230 // First check for nonce 231 if ( isset( $_POST['mstw-tr-nonce'] ) ) { 232 //wp_verify_nonce( sanitize_key( wp_unslash( $_POST['mstw-tr-nonce'] ) ); 233 $safeNonce = wp_esc_key( wp_unslash( $_POST['mstw-tr-nonce'] ) ); 234 if ( !wp_verify_nonce( $safeNonce, 'import-teams' ) ) { 235 mstw_tr_add_admin_notice( 'error', __( 'Problem encountered with CSV file. Exiting.', 'team-rosters' ) ); 236 mstw_log_msg( 'MSTW_TR_CSV_IMPORT_CLASS.post: Problem encountered loading CSV file; bad nonce. Exiting.' ); 237 return; 238 } 239 } else { //nonce non found 240 mstw_tr_add_admin_notice( 'error', __( 'Problem encountered with CSV file. Exiting.', 'team-rosters' ) ); 241 mstw_log_msg( 'MSTW_TR_CSV_IMPORT_CLASS.post: Problem encountered updating roster; nonce missing. Exiting.' ); 242 return; 243 } 244 245 // Nonce ok. Proceed with progessing. 237 246 $file_id = 'csv_teams_import'; 238 247 //$msg_str is only used in summary messages … … 241 250 242 251 case __( 'Import Players', 'team-rosters' ): 252 // First check for nonce 253 if ( isset( $_POST['mstw-tr-nonce'] ) ) { 254 //wp_verify_nonce( sanitize_key( wp_unslash( $_POST['mstw-tr-nonce'] ) ); 255 $safeNonce = wp_esc_key( wp_unslash( $_POST['mstw-tr-nonce'] ) ); 256 257 if ( !wp_verify_nonce( $safeNonce, 'import-teams' ) ) { 258 mstw_tr_add_admin_notice( 'error', __( 'Problem encountered with CSV file. Exiting.', 'team-rosters' ) ); 259 mstw_log_msg( 'MSTW_TR_CSV_IMPORT_CLASS.post: Problem encountered loading CSV file; bad nonce. Exiting.' ); 260 return; 261 } 262 263 } else { //nonce non found 264 mstw_tr_add_admin_notice( 'error', __( 'Problem encountered with CSV file. Exiting.', 'team-rosters' ) ); 265 mstw_log_msg( 'MSTW_TR_CSV_IMPORT_CLASS.post: Problem encountered updating roster; nonce missing. Exiting.' ); 266 return; 267 268 } 269 243 270 $file_id = 'csv_players_import'; 244 271 //$msg_str is only used in summary messages … … 314 341 } 315 342 316 if (file_exists($file)) { 317 @unlink($file); 343 if ( file_exists($file) ) { 344 $deleteFile = wp_delete_file( $file ); 345 if ( !$deleteFile ) { 346 mstw_log_msg( "CSV Import: Error deleting file $file" ); 347 } 318 348 } 319 349 … … 329 359 330 360 //always add notice for records imported and elapsed time 331 //$format = _n( 'Imported %1$s %2$s in %4$.2f seconds.', 'Imported %1$s %3$s in %4$.2f seconds.', $imported, 'team-rosters' );332 //$admin_notice = sprintf( $format, $imported, $msg_str[0], $msg_str[1], $exec_time );333 361 $admin_notice = sprintf( 334 362 /* translators: %1$s/%2$s 'record' or 'records' processed */ … … 592 620 593 621 // Split the $url into two pars with the wp-content directory as the separator 594 $parsed_url = explode( parse_url( WP_CONTENT_URL, PHP_URL_HOST ), $url );622 $parsed_url = explode( wp_parse_url( WP_CONTENT_URL, PHP_URL_HOST ), $url ); 595 623 596 624 // Get the host of the current site and the host of the $url, ignoring www 597 $this_host = str_ireplace( 'www.', '', parse_url( home_url( ), PHP_URL_HOST ) );598 $file_host = str_ireplace( 'www.', '', parse_url( $url, PHP_URL_HOST ) );625 $this_host = str_ireplace( 'www.', '', wp_parse_url( home_url( ), PHP_URL_HOST ) ); 626 $file_host = str_ireplace( 'www.', '', wp_parse_url( $url, PHP_URL_HOST ) ); 599 627 600 628 // Return nothing if there aren't any $url parts or if the current host and $url host do not match … … 606 634 // Example: /uploads/2013/05/test-image.jpg 607 635 global $wpdb; 608 609 $attachment = $wpdb->get_col( $wpdb->prepare( "SELECT ID FROM {$wpdb->prefix}posts WHERE guid RLIKE %s;", $parsed_url[1] ) ); 636 // 637 // I have no idea how to address the PCP warnings about direct database calls here 638 // Is there a better "wordpress" way to accomplish this? 639 // 640 $attachment = $wpdb->get_col( $wpdb->prepare( "SELECT ID FROM {$wpdb->prefix} posts WHERE guid RLIKE %s;", $parsed_url[1] ) ); 610 641 611 642 // Returns -1 if no attachment is found … … 724 755 if ($bytes == pack('CCC', 0xef, 0xbb, 0xbf)) { 725 756 $this->log['notice'][] = 'Getting rid of byte order mark...'; 726 fclose( $res);757 fclose( $res ); 727 758 728 759 $contents = file_get_contents( $fname ); … … 788 819 //mstw_tr_log_msg( "MSTW_TR_ImporterPlugin.add_help:" ); 789 820 ?> 790 <p><?php _e( 'This screen allows the import of teams and players from files in CSV format. Sample file formats are available in the Users Manual (link below).', 'team-rosters' ) ?></p>791 792 <p><?php _e( 'To import teams, simply choose the CSV file and click "Import Teams".', 'team-rosters' ) ?></p>793 794 <p><?php _e( 'To import players, first select the CSV file containing the players, then you have some options:.', 'team-rosters' ) ?></p>821 <p><?php esc_html_e( 'This screen allows the import of teams and players from files in CSV format. Sample file formats are available in the Users Manual (link below).', 'team-rosters' ) ?></p> 822 823 <p><?php esc_html_e( 'To import teams, simply choose the CSV file and click "Import Teams".', 'team-rosters' ) ?></p> 824 825 <p><?php esc_html_e( 'To import players, first select the CSV file containing the players, then you have some options:.', 'team-rosters' ) ?></p> 795 826 796 827 <ul> 797 <li><?php _e( 'Select an existing team. Players will be addeded to that team.', 'team-rosters' ) ?></li>798 <li><?php _e( 'Don\'t elect an existing team, and provide the team(s) in the player_teams column of the CSV file. This allows players to be added to multiple teams (or no team) using one CSV file.', 'team-rosters' ) ?></li>799 <li><?php _e( 'Choose whether you want the player photos (provided in the CSV file) to be moved to the Media Library. If you are moving teams from a different site, you probably want to do this. If you are moving players on the same site, you probably do not want to do this since it will create duplicate image files in the Media Library.', 'team-rosters' ) ?></li>828 <li><?php esc_html_e( 'Select an existing team. Players will be addeded to that team.', 'team-rosters' ) ?></li> 829 <li><?php esc_html_e( 'Don\'t elect an existing team, and provide the team(s) in the player_teams column of the CSV file. This allows players to be added to multiple teams (or no team) using one CSV file.', 'team-rosters' ) ?></li> 830 <li><?php esc_html_e( 'Choose whether you want the player photos (provided in the CSV file) to be moved to the Media Library. If you are moving teams from a different site, you probably want to do this. If you are moving players on the same site, you probably do not want to do this since it will create duplicate image files in the Media Library.', 'team-rosters' ) ?></li> 800 831 </ul> 801 832 802 <p><?php _e( 'NOTE THAT IT CAN TAKE A SIGNFICANT AMOUNT OF TIME TO IMPORT PLAYERS. In fact, if the CSV file is too large, WordPress process can time out at the server. If so, simply divide the players up across two or more CSV files.', 'team-rosters' ) ?></p>803 804 <p><a href="http://shoalsummitsolutions.com/loading-rosters-from-csv-files-v-4-0/" target="_blank"><?php _e( 'See the plugin Users Manual on shoalsummitsolutions.com', 'team-rosters' ) ?></a></p>833 <p><?php esc_html_e( 'NOTE THAT IT CAN TAKE A SIGNFICANT AMOUNT OF TIME TO IMPORT PLAYERS. In fact, if the CSV file is too large, WordPress process can time out at the server. If so, simply divide the players up across two or more CSV files.', 'team-rosters' ) ?></p> 834 835 <p><a href="http://shoalsummitsolutions.com/loading-rosters-from-csv-files-v-4-0/" target="_blank"><?php esc_html_e( 'See the plugin Users Manual on shoalsummitsolutions.com', 'team-rosters' ) ?></a></p> 805 836 806 837 <?php -
team-rosters/trunk/includes/mstw-tr-data-fields-columns-settings.php
r3240856 r3270053 27 27 function mstw_tr_data_fields_setup( ) { 28 28 //mstw_log_msg( 'mstw_tr_data_fields_setup:' ); 29 30 29 mstw_tr_data_fields_left_setup( ); 31 30 mstw_tr_data_fields_center_setup( ); 32 31 mstw_tr_data_fields_right_setup( ); 33 34 32 } 35 33 … … 43 41 $display_on_page = 'mstw-tr-data-fields-labels'; 44 42 $page_section = 'mstw-tr-fields-labels'; 45 $instruct_callback = null; //'mstw_tr_data_fields_inst';43 $instruct_callback = null; 46 44 $section_title = __( 'Data Fields Labels', 'team-rosters' ); 47 45 … … 222 220 $display_on_page = 'mstw-tr-fields-show-hide'; 223 221 $page_section = 'mstw-tr-fields-show-hide'; 224 $instruct_callback = null; //'mstw_tr_data_fields_inst';222 $instruct_callback = null; 225 223 $section_title = __( 'Visibility', 'team-rosters' ); 226 224 … … 400 398 $display_on_page = 'mstw-tr-fields-order'; 401 399 $page_section = 'mstw-tr-fields-order'; 402 $instruct_callback = null; //'mstw_tr_data_fields_inst';400 $instruct_callback = null; 403 401 $section_title = __( 'Order', 'team-rosters' ); 404 402 … … 568 566 569 567 } //End: mstw_tr_data_fields_right_setup() 570 571 572 573 //-----------------------------------------------------------------574 // Colors table section instructions575 //576 if( !function_exists( 'mstw_tr_data_fields_inst' ) ) {577 function mstw_tr_data_fields_inst( ) {578 echo '<p>' . __( 'Field Labels. ', 'team-rosters' ) .'</p>';579 } //End: mstw_tr_data_fields_inst()580 } -
team-rosters/trunk/includes/mstw-tr-player-cpt-admin.php
r3240856 r3270053 36 36 do_meta_boxes(get_current_screen( ), 'advanced', $post); 37 37 unset( $wp_meta_boxes[get_post_type($post)]['advanced'] ); 38 echo "<p class='player-bio-admin-head'>" . __( 'Player Bio:', 'team-rosters' ) . "</p>"; 38 ?> 39 <p class='player-bio-admin-head'><?php esc_html_e( 'Player Bio:', 'team-rosters' ) ?></p> 40 <?php 39 41 } 40 42 } //End: mstw_tr_build_player_screen … … 334 336 if ( $_POST['post_type'] == 'mstw_tr_player' ) { 335 337 update_post_meta( $post_id, 'player_first_name', 336 strip_tags( $_POST['player_first_name'] ) );338 wp_strip_all_tags( $_POST['player_first_name'] ) ); 337 339 338 340 update_post_meta( $post_id, 'player_last_name', 339 strip_tags( $_POST['player_last_name'] ) );341 wp_strip_all_tags( $_POST['player_last_name'] ) ); 340 342 341 343 update_post_meta( $post_id, 'player_number', 342 strip_tags( $_POST['player_number'] ) );344 wp_strip_all_tags( $_POST['player_number'] ) ); 343 345 344 346 update_post_meta( $post_id, 'player_position', 345 strip_tags( $_POST['player_position'] ) );347 wp_strip_all_tags( $_POST['player_position'] ) ); 346 348 347 349 update_post_meta( $post_id, 'player_position_long', 348 strip_tags( $_POST['player_position_long'] ) );350 wp_strip_all_tags( $_POST['player_position_long'] ) ); 349 351 350 352 update_post_meta( $post_id, 'player_height', 351 353 //$_POST['player_height'] ); 352 strip_tags( $_POST['player_height'] ) );354 wp_strip_all_tags( $_POST['player_height'] ) ); 353 355 354 356 update_post_meta( $post_id, 'player_weight', 355 strip_tags( $_POST['player_weight'] ) );357 wp_strip_all_tags( $_POST['player_weight'] ) ); 356 358 357 359 update_post_meta( $post_id, 'player_year', 358 strip_tags( $_POST['player_year'] ) );360 wp_strip_all_tags( $_POST['player_year'] ) ); 359 361 360 362 update_post_meta( $post_id, 'player_year_long', 361 strip_tags( $_POST['player_year_long'] ) );363 wp_strip_all_tags( $_POST['player_year_long'] ) ); 362 364 363 365 update_post_meta( $post_id, 'player_experience', 364 strip_tags( $_POST['player_experience'] ) );366 wp_strip_all_tags( $_POST['player_experience'] ) ); 365 367 366 368 update_post_meta( $post_id, 'player_age', 367 strip_tags( $_POST['player_age'] ) );369 wp_strip_all_tags( $_POST['player_age'] ) ); 368 370 369 371 update_post_meta( $post_id, 'player_home_town', 370 strip_tags( $_POST['player_home_town'] ) );372 wp_strip_all_tags( $_POST['player_home_town'] ) ); 371 373 372 374 update_post_meta( $post_id, 'player_last_school', 373 strip_tags( $_POST['player_last_school'] ) );375 wp_strip_all_tags( $_POST['player_last_school'] ) ); 374 376 375 377 update_post_meta( $post_id, 'player_country', 376 strip_tags( $_POST['player_country'] ) );378 wp_strip_all_tags( $_POST['player_country'] ) ); 377 379 378 380 update_post_meta( $post_id, 'player_bats', 379 strip_tags( $_POST['player_bats'] ) );381 wp_strip_all_tags( $_POST['player_bats'] ) ); 380 382 381 383 update_post_meta( $post_id, 'player_throws', 382 strip_tags( $_POST['player_throws'] ) );384 wp_strip_all_tags( $_POST['player_throws'] ) ); 383 385 384 386 update_post_meta( $post_id, 'player_other', 385 strip_tags( $_POST['player_other'] ) );387 wp_strip_all_tags( $_POST['player_other'] ) ); 386 388 387 389 } //End: if ( $_POST['post_type'] == 'mstw_tr_player' ) … … 442 444 $teams[$key] = '<a href="' . $edit_link . '">' . $team->name . '</a>'; 443 445 } 444 echo implode( ' | ', $teams);446 echo wp_kses_post( implode( ' | ', $teams ) ); 445 447 } 446 448 break; … … 448 450 case 'first-name' : 449 451 //printf( '%s', get_post_meta( $post_id, 'player_first_name', true ) ); 450 echo ( get_post_meta( $post_id, 'player_first_name', true ) );452 echo esc_html( get_post_meta( $post_id, 'player_first_name', true ) ); 451 453 break; 452 454 453 455 case 'last-name' : 454 printf( '%s',get_post_meta( $post_id, 'player_last_name', true ) );456 echo esc_html( get_post_meta( $post_id, 'player_last_name', true ) ); 455 457 break; 456 458 457 459 case 'number' : 458 printf( '%s',get_post_meta( $post_id, 'player_number', true ) );460 echo esc_html( get_post_meta( $post_id, 'player_number', true ) ); 459 461 break; 460 462 461 463 case 'position' : 462 printf( '%s',get_post_meta( $post_id, 'player_position', true ) );464 echo esc_html( get_post_meta( $post_id, 'player_position', true ) ); 463 465 break; 464 466 465 467 case 'position_long' : 466 printf( '%s',get_post_meta( $post_id, 'player_position_long', true ) );468 echo esc_html( get_post_meta( $post_id, 'player_position_long', true ) ); 467 469 break; 468 470 469 471 case 'height' : 470 printf( '%s',get_post_meta( $post_id, 'player_height', true ) );472 echo esc_html( get_post_meta( $post_id, 'player_height', true ) ); 471 473 break; 472 474 473 475 case 'weight' : 474 printf( '%s',get_post_meta( $post_id, 'player_weight', true ) );476 echo esc_html( get_post_meta( $post_id, 'player_weight', true ) ); 475 477 break; 476 478 477 479 case 'year' : 478 printf( '%s',get_post_meta( $post_id, 'player_year', true ) );480 echo esc_html( get_post_meta( $post_id, 'player_year', true ) ); 479 481 break; 480 482 481 483 case 'experience' : 482 printf( '%s',get_post_meta( $post_id, 'player_experience', true ) );484 echo esc_html( get_post_meta( $post_id, 'player_experience', true ) ); 483 485 break; 484 486 … … 533 535 534 536 //output the html for the drop down menu 535 echo "<select name='$tax_slug' id='$tax_slug' class='postform'>"; 536 echo "<option value=''>" . __( 'Show All Teams', 'team-rosters') . "</option>"; 537 ?> 538 <select name='<?php echo esc_html( $tax_slug ) ?>' id='<?php echo esc_html( $tax_slug ) ?>' class='<?php echo esc_html( 'postform' ) ?>'>" ); 539 <option value=""> <?php esc_html_e( 'Show All Teams', 'team-rosters') ?> </option> 540 <?php 537 541 538 542 //output each select option line … … 545 549 $selected = ''; 546 550 } 547 echo '<option value=' . $term->slug . $selected . '>' . $term->name . ' (' . $term->count . ')</option>'; 551 ?> 552 <option value='<?php echo esc_html( $term->slug . $selected ) ?>' > <?php echo esc_html( $term->name . '(' . $term->count . ')' ) ?> </option> 553 <?php 548 554 } 549 echo '</select>';555 ?></select><?php 550 556 } 551 557 } … … 652 658 case 'players-screen-help': 653 659 ?> 654 <p><?php _e( 'This screen provides a list of selected data fields for all players. The list may be filtered to show only one team using the Teams filter.', 'team-rosters' ) ?></p>655 656 <p><?php _e( 'To add a player, click the "Add New Player" button at the top of the screen. Players may also be added using the "Add Players to Roster" screen or the "CSV Import" screen.', 'team-rosters' ) ?></p>657 658 <p><?php _e( 'To edit a player, roll over the "Name" field and selecte "Edit".', 'team-rosters' ) ?></p>659 660 <p><?php _e( 'To delete a player, roll over the "Name" field and selecte "Trash". Note that the player is moved to the trash BUT NOT REMOVED FROM THE DB. To delete the player from the DB, or to restore the player, click on the "Trash" link and delete selected players permanently or empty the trash.', 'team-rosters' ) ?></p>661 662 <p><a href="http://shoalsummitsolutions.com/tr-data-entry-players/" target="_blank"><?php _e( 'See the Data Entry - Players man page for more details.', 'team-rosters' ) ?></a></p>660 <p><?php esc_html_e( 'This screen provides a list of selected data fields for all players. The list may be filtered to show only one team using the Teams filter.', 'team-rosters' ) ?></p> 661 662 <p><?php esc_html_e( 'To add a player, click the "Add New Player" button at the top of the screen. Players may also be added using the "Add Players to Roster" screen or the "CSV Import" screen.', 'team-rosters' ) ?></p> 663 664 <p><?php esc_html_e( 'To edit a player, roll over the "Name" field and selecte "Edit".', 'team-rosters' ) ?></p> 665 666 <p><?php esc_html_e( 'To delete a player, roll over the "Name" field and selecte "Trash". Note that the player is moved to the trash BUT NOT REMOVED FROM THE DB. To delete the player from the DB, or to restore the player, click on the "Trash" link and delete selected players permanently or empty the trash.', 'team-rosters' ) ?></p> 667 668 <p><a href="http://shoalsummitsolutions.com/tr-data-entry-players/" target="_blank"><?php esc_html_e( 'See the Data Entry - Players man page for more details.', 'team-rosters' ) ?></a></p> 663 669 <?php 664 670 break; … … 666 672 case 'edit-player-help': 667 673 ?> 668 <p><?php _e( 'Title. The player title should always be entered. However, it does not appear anywhere on the front end.', 'team-rosters' ) ?></p>669 670 <p><?php _e( 'First Name and Last Name. At least one of these fields should be entered; otherwise, no name will appear on the front end.', 'team-rosters' ) ?></p>671 672 <p><?php _e( 'Use the Manage Teams metabox to add a player to one or more teams; otherwise, the player will not appear on the front end.', 'team-rosters' ) ?></p>673 674 <p><?php _e( 'Use the Manage Teams metabox to add a player to one or more teams; otherwise, the player will not appear on the front end.', 'team-rosters' ) ?></p>675 676 <p><?php _e( 'Use the Player Photo metabox to add a player photo from the Media Gallery.', 'team-rosters' ) ?></p>677 678 <p><?php _e( 'Use the Player Bio metabox to add a player profile/bio. Note that you can add HTML to this field to add photos, tables, links, etc.', 'team-rosters' ) ?></p>679 680 <p><?php _e( 'Delete a player by clicking the "Move to Trash" link in the Publish metabox. See the instructions on deleting players above.', 'team-rosters' ) ?></p>681 682 <p><a href="http://shoalsummitsolutions.com/tr-data-entry-players/" target="_blank"><?php _e( 'See the Data Entry - Players man page for more details.', 'team-rosters' ) ?></a></p>674 <p><?php esc_html_e( 'Title. The player title should always be entered. However, it does not appear anywhere on the front end.', 'team-rosters' ) ?></p> 675 676 <p><?php esc_html_e( 'First Name and Last Name. At least one of these fields should be entered; otherwise, no name will appear on the front end.', 'team-rosters' ) ?></p> 677 678 <p><?php esc_html_e( 'Use the Manage Teams metabox to add a player to one or more teams; otherwise, the player will not appear on the front end.', 'team-rosters' ) ?></p> 679 680 <p><?php esc_html_e( 'Use the Manage Teams metabox to add a player to one or more teams; otherwise, the player will not appear on the front end.', 'team-rosters' ) ?></p> 681 682 <p><?php esc_html_e( 'Use the Player Photo metabox to add a player photo from the Media Gallery.', 'team-rosters' ) ?></p> 683 684 <p><?php esc_html_e( 'Use the Player Bio metabox to add a player profile/bio. Note that you can add HTML to this field to add photos, tables, links, etc.', 'team-rosters' ) ?></p> 685 686 <p><?php esc_html_e( 'Delete a player by clicking the "Move to Trash" link in the Publish metabox. See the instructions on deleting players above.', 'team-rosters' ) ?></p> 687 688 <p><a href="http://shoalsummitsolutions.com/tr-data-entry-players/" target="_blank"><?php esc_html_e( 'See the Data Entry - Players man page for more details.', 'team-rosters' ) ?></a></p> 683 689 <?php 684 690 break; … … 700 706 case 'update-games-overview': 701 707 ?> 702 <p><?php _e( 'This screen allows updating the status of all games in a league and season.', 'team-rosters' ) ?></p>703 <p><?php _e( 'Select a LEAGUE and SEASON then press the Update Games Table button.', 'team-rosters' ) ?></p>704 <p><?php _e( 'Enter the status in information for each game.', 'team-rosters' ) ?></p>705 <p><a href="http://shoalsummitsolutions.com/lm-update-games/" target="_blank"><?php _e( 'See the Update Games man page for more details.', 'team-rosters' ) ?></a></p>708 <p><?php esc_html_e( 'This screen allows updating the status of all games in a league and season.', 'team-rosters' ) ?></p> 709 <p><?php esc_html_e( 'Select a LEAGUE and SEASON then press the Update Games Table button.', 'team-rosters' ) ?></p> 710 <p><?php esc_html_e( 'Enter the status in information for each game.', 'team-rosters' ) ?></p> 711 <p><a href="http://shoalsummitsolutions.com/lm-update-games/" target="_blank"><?php esc_html_e( 'See the Update Games man page for more details.', 'team-rosters' ) ?></a></p> 706 712 <?php 707 713 break; -
team-rosters/trunk/includes/mstw-tr-player-profiles-galleries-settings.php
r3240856 r3270053 185 185 if( !function_exists( 'mstw_tr_bio_gallery_inst' ) ) { 186 186 function mstw_tr_bio_gallery_inst( ) { 187 echo '<p>' . __( 'Unless otherwise noted, these settings will apply to both the Single Player Profile and Team Gallery pages. ', 'team-rosters' ) .'</p>';187 echo '<p>', esc_html__( 'Unless otherwise noted, these settings will apply to both the Single Player Profile and Team Gallery pages. ', 'team-rosters' ), '</p>'; 188 188 } //End: mstw_tr_bio_gallery_inst() 189 189 } -
team-rosters/trunk/includes/mstw-tr-roster-color-settings.php
r3240856 r3270053 264 264 //mstw_log_msg( 'mstw_tr_table_color_inst:' ); 265 265 266 echo '<p>' . __( 'These settings will apply to ALL the roster tables [mstw-roster-table], overriding the default styles. However they can be overridden by more specific stylesheet rules for specific teams. See the plugin documentation for more details.', 'team-rosters' ) .'</p>';266 echo '<p>', esc_html__( 'These settings will apply to ALL the roster tables [mstw-roster-table], overriding the default styles. However they can be overridden by more specific stylesheet rules for specific teams. See the plugin documentation for more details.', 'team-rosters' ), '</p>'; 267 267 268 268 } //End: mstw_tr_table_color_inst() … … 275 275 //mstw_log_msg( 'mstw_tr_table2_color_inst:' ); 276 276 277 echo '<p>' . __( 'These settings will apply to ALL the table 2 roster tables [mstw-tr-roster-2], overriding the default styles. However they can be overridden by more specific stylesheet rules for specific teams. See the plugin documentation for more details. NOTE: this shortcode does not support team colors and does not have borders.', 'team-rosters' ) .'</p>';277 echo '<p>', esc_html__( 'These settings will apply to ALL the table 2 roster tables [mstw-tr-roster-2], overriding the default styles. However they can be overridden by more specific stylesheet rules for specific teams. See the plugin documentation for more details. NOTE: this shortcode does not support team colors and does not have borders.', 'team-rosters' ), '</p>'; 278 278 279 279 } //End: mstw_tr_table2_color_inst() -
team-rosters/trunk/includes/mstw-tr-roster-table-settings.php
r3240856 r3270053 300 300 //mstw_log_msg( 'mstw_tr_roster_table_inst:' ); 301 301 302 echo '<p>' . __( 'These settings will apply to all the [mstw-tr-roster] shortcode tables, overriding the settings defaults. In most cases, these settings can be overridden by shortcode arguments.', 'team-rosters' ) .'</p>';302 echo '<p>', esc_html__( 'These settings will apply to all the [mstw-tr-roster] shortcode tables, overriding the settings defaults. In most cases, these settings can be overridden by shortcode arguments.', 'team-rosters' ),'</p>'; 303 303 304 304 } //End: mstw_tr_roster_table_inst() … … 307 307 //mstw_log_msg( 'mstw_tr_roster_table_2_inst:' ); 308 308 309 echo '<p>' . __( 'These settings will apply to all the [mstw-tr-roster-2] shortcode tables, overriding the settings defaults. In most cases, these settings can be overridden by shortcode arguments.', 'team-rosters' ) .'</p>';309 echo '<p>', esc_html__( 'These settings will apply to all the [mstw-tr-roster-2] shortcode tables, overriding the settings defaults. In most cases, these settings can be overridden by shortcode arguments.', 'team-rosters' ), '</p>'; 310 310 311 311 } //End: mstw_tr_roster_table_2_inst() -
team-rosters/trunk/includes/mstw-tr-roster-tables-class.php
r3240856 r3270053 2 2 /*--------------------------------------------------------------------------- 3 3 * mstw-tr-roster-tables-class.php 4 * Contains the classes for the MSTW League Manager Sport schedule table5 * shortcodes [mstw_ lm_sport_schedule]4 * Contains the classes for the MSTW Roster Tables (2) 5 * shortcodes [mstw_tr_roster_2] 6 6 * 7 7 * MSTW Wordpress Plugins (http://shoalsummitsolutions.com) … … 60 60 61 61 // tableID allows multiple tables on the same page 62 $tableID = $this -> safeGet( 'table_id', $args, mt_rand( 1000, 9999 ) );62 $tableID = $this -> safeGet( 'table_id', $args, wp_rand( 1000, 9999 ) ); 63 63 64 64 // merge the shortcode arguments and the settings/options … … 68 68 69 69 ?> 70 <div class='mstw-tr-roster-table-container mstw-tr-roster-table-container-<?php echo $teamSlug ?>' id='mstw-tr-roster-table-container-<?php echo $tableID ?>'> 71 72 70 <div class='mstw-tr-roster-table-container mstw-tr-roster-table-container-<?php echo esc_html( $teamSlug )?>' id='mstw-tr-roster-table-container-<?php echo esc_html( $tableID ) ?>'> 73 71 <?php $noControls = $this -> safeGet( 'no_controls', $args, null ); 74 72 //mstw_log_msg( "noControls= $noControls" ); … … 77 75 <!--<div class='mstw-tr-roster-title-controls mstw-tr-roster-title-controls-<?php //echo $teamSlug ?>'>--> 78 76 <?php //echo $this -> build_roster_title( $teamSlug, $attribs ); ?> 79 <div class='roster-sort-controls roster-sort-controls-<?php echo $teamSlug ?> MSTW-flex-row'> 80 <?php echo $this -> build_roster_sort_controls( $teamSlug, $attribs, $args, $argsStr, $tableID ); ?> 77 <div class='roster-sort-controls roster-sort-controls-<?php echo esc_html( $teamSlug ) ?> MSTW-flex-row'> 78 <?php 79 // build_roster_sort_controls buffers the output so I am escaping earlier then here 80 $controls_escaped = $this -> build_roster_sort_controls( $teamSlug, $attribs, $args, $argsStr, $tableID ); 81 echo $controls_escaped; 82 //echo $this -> build_roster_sort_controls( $teamSlug, $attribs, $args, $argsStr, $tableID ); 83 ?> 81 84 </div> 82 85 <!-- </div> .mstw-tr-roster-title-controls --> 83 86 <?php 84 87 } ?> 85 86 87 <div class= 'mstw-tr-roster-players mstw-tr-roster-players-<?php echo $teamSlug ?>' id='mstw-tr-roster-players-<?php echo $tableID ?>'> 88 89 <div class= 'mstw-tr-roster-players mstw-tr-roster-players-<?php echo esc_html( $teamSlug )?>' id='mstw-tr-roster-players-<?php echo esc_html( $tableID ) ?>'> 88 90 <?php 89 90 91 // get the players 91 92 $players = mstw_tr_build_player_list( $teamSlug, 'objects', $attribs ); 92 93 93 94 // build the html 94 echo $this -> buildTableHTML( $teamSlug, $players, $attribs, $shortcode, $tableID ); 95 $table_escaped = $this -> buildTableHTML( $teamSlug, $players, $attribs, $shortcode, $tableID ); 96 // I can't seem to escape late because I'm buffering the html then I output it 97 echo $table_escaped; 95 98 ?> 96 99 </div> … … 123 126 124 127 ?> 125 <ul class='mstw-tr-roster-player-list mstw-tr-roster-player-list-<?php echo $teamSlug ?> mstw-tr-roster-player-list-<?php echo $tableID?>'>128 <ul class='mstw-tr-roster-player-list mstw-tr-roster-player-list-<?php echo esc_html( $teamSlug ) ?> mstw-tr-roster-player-list-<?php echo esc_html( $tableID ) ?>'> 126 129 127 130 <!-- Why is this needed ?? --> 128 131 <?php $team_class = 'mstw-tr-table_' . $teamSlug; ?> 129 <div style='display:none' id='table-id'><?php echo $team_class?></div>132 <div style='display:none' id='table-id'><?php echo esc_html( $team_class )?></div> 130 133 131 134 <?php … … 141 144 ?> 142 145 <li class='mstw-tr-roster-player'> 143 <div class='mstw-tr-roster-player-container mstw-tr-roster-player-container-<?php echo $teamSlug?> MSTW-flex-row'>146 <div class='mstw-tr-roster-player-container mstw-tr-roster-player-container-<?php echo esc_html( $teamSlug ) ?> MSTW-flex-row'> 144 147 145 148 <?php //PRIMARY INFO COLUMN ?> … … 149 152 // PHOTO COLUMN 150 153 // 'profile' prevents link 151 echo $this -> buildPlayerPhoto( $player, $teamSlug, $attribs);154 echo wp_kses_post( $this -> buildPlayerPhoto( $player, $teamSlug, $attribs ) ); 152 155 ?> 153 156 </div> … … 158 161 159 162 <div class='mstw-tr-roster-player-position MSTW-uppercase'> 160 <?php echo $this -> get_player_position( $player); ?>163 <?php echo esc_html( $this -> get_player_position( $player ) ); ?> 161 164 </div> 162 165 163 166 <div class='mstw-tr-roster-player-number-name MSTW-uppercase'> 164 167 <?php 165 $playerName = $this -> buildPlayerName( $player, $teamSlug, $attribs, 0);168 $playerNameLink_escaped = $this -> buildPlayerName( $player, $teamSlug, $attribs, 1 ); 166 169 $playerNumber = get_post_meta( $player->ID, 'player_number', true ); 167 170 ?> 168 <span class='jersey'><?php echo $playerNumber ?></span><h3 class='player-name MSTW-uppercase'><?php echo $playerName ?> </h3> 171 <span class='jersey'><?php echo esc_html( $playerNumber ) ?></span> 172 <h3 class='player-name MSTW-uppercase'><?php echo $playerNameLink_escaped ?> </h3> 169 173 </div> 170 174 … … 175 179 <div class='mstw-tr-roster-player-other'> 176 180 <div class='mstw-tr-roster-player-other-data'> 177 <span class='mstw-tr-player-data-1'><?php echo $dataField1?></span>178 <span class='mstw-tr-player-data-2'><?php echo $dataField2?></span>179 <span class='mstw-tr-player-data-3'><?php echo $dataField3?></span> </div>181 <span class='mstw-tr-player-data-1'><?php echo esc_html( $dataField1 ) ?></span> 182 <span class='mstw-tr-player-data-2'><?php echo esc_html( $dataField2 ) ?></span> 183 <span class='mstw-tr-player-data-3'><?php echo esc_html( $dataField3 ) ?></span> </div> 180 184 <div class='mstw-tr-roster-player-bio'> 181 <?php $playerLink = '<a href="' . get_permalink( $player->ID ) . '?roster_type=' . $this -> safeGet( 'roster_type', $attribs, 'custom' ) . '&' . 'team=' . $teamSlug . '"'; ?> 182 <?php echo $playerLink ?>>> FULL BIO </a> <!-- ▶ --> 185 <?php $playerLink = get_permalink( $player->ID ) . '?roster_type=' . $this -> safeGet( 'roster_type', $attribs, 'custom' ) . '&' . 'team=' . $teamSlug . '"'; ?> 186 <a href="<?php echo esc_html( $playerLink ) ?>"> FULL BIO</a> 187 183 188 </div> 184 189 </div> <?php // .mstw=tr=roster-player-other-data ?> … … 235 240 $last_name = get_post_meta($player->ID, 'player_last_name', true ); 236 241 $alt = "$first_name $last_name"; 237 $photo_html = "<img src='$photo_file_url' alt='$alt' />"; 242 $attr = "alt=$alt"; 243 244 $photo_html = wp_get_attachment_image( get_post_thumbnail_id( $player->ID ), 'thumbnail', 245 false, 246 $attr 247 ); 238 248 239 249 } else { … … 272 282 // $player - player CPT object (mstw_tr_player) 273 283 // $options - shortcode args and team roster settings merged 274 // $addProfileLink - include a li keto the player profile284 // $addProfileLink - include a link to the player profile 275 285 // RETURNS 276 286 // $player_name in the specified format … … 298 308 } 299 309 300 $player_html = $player_name; 301 302 $paramStr = '?roster_type=' . $options['roster_type']; 303 if ( $teamSlug ) { 304 $paramStr .= "&team=$teamSlug"; 310 //$player_html = $player_name; 311 312 if ( $addProfileLink ) { 313 $paramStr = '?roster_type=' . $options['roster_type']; 314 if ( $teamSlug ) { 315 $paramStr .= "&team=$teamSlug"; 316 } 317 $ret_html = '<a href="' . esc_url( get_permalink( $player->ID ) ) . esc_html( $paramStr ) . '" '; 318 $ret_html .= '>' . esc_html( $player_name ) . '</a>'; 319 320 //$ret_html = get_permalink( $player->ID ) . $paramStr . '" '; 321 //$ret_html .= '>' . $player_html; 305 322 } 306 307 $ret_html = '<a href="' . get_permalink( $player->ID ) . $paramStr . '" '; 308 $ret_html .= '>' . $player_html . '</a>'; 309 310 //if( $addProfileLink ) { 311 //if ( $options['links_to_profiles'] ) { 312 //$player_html = '<a href="' . get_permalink( $player->ID ) . '?roster_type=' . $options['roster_type'] . '" '; 313 //$player_html .= '>' . $player_name . '</a>'; 314 //} 315 //} 316 317 //return $player_html; 323 else { 324 $ret_html = $player_name; 325 326 } 327 318 328 return $ret_html; 319 329 320 } //End: buildPlayerName( )330 } //End: buildPlayerName( ) 321 331 322 332 //----------------------------------------------------------------------------- … … 484 494 // 485 495 // the team must be provided in the shortcode args; 486 //487 /*488 $team = $this -> safeGet( 'team', $atts, null );489 if ( null === $team ) {490 return '<h3>No team specified in shortcode.</h3>';491 }492 */493 494 //495 496 // the roster type comes from the shortcode args; defaults to 'custom' 496 497 // … … 530 531 531 532 //-------------------------------------------------------------------------------------- 532 // build_roster_sort_control - Returns the HTML for a team roster sort controls533 // build_roster_sort_controls - Returns the HTML for a team roster sort controls 533 534 // 534 535 // ARGUMENTS: … … 558 559 559 560 ob_start( ); 560 echo $this -> build_roster_title( $team, $attribs);561 echo esc_html( $this -> build_roster_title( $team, $attribs ) ); 561 562 ?> 562 563 <form id='tr-sort-controls' class='MSTW-flex-row' > 563 <input type='hidden' id='roster-team' value='<?php echo $team?>'/>564 <input type="hidden" id='tableID' value="<?php echo $tableID?>" />565 <input type="hidden" id='args_<?php echo $tableID ?>' value="<?php echo $argsStr?>" />564 <input type='hidden' id='roster-team' value='<?php echo esc_html( $team ) ?>'/> 565 <input type="hidden" id='tableID' value="<?php echo esc_html( $tableID ) ?>" /> 566 <input type="hidden" id='args_<?php echo esc_html( $tableID ) ?>' value="<?php echo esc_html( $argsStr )?>" /> 566 567 567 568 <div class='tr-sort-menu'> 568 <select name='tr-sort-menu' id='tr-sort-menu_<?php echo $tableID?>'>569 <select name='tr-sort-menu' id='tr-sort-menu_<?php echo esc_html( $tableID ) ?>'> 569 570 <?php 570 571 foreach( $choices as $slug => $label ) { 571 572 $selected = ( $currentSortOrder == $slug ) ? 'selected="selected"' : ''; 572 573 ?> 573 <option value=<?php echo "$slug $selected" ?>> <?php echo $label?></option>574 <option value=<?php echo esc_html( "$slug $selected" ) ?>> <?php echo esc_html( $label ) ?></option> 574 575 <?php 575 576 } … … 579 580 580 581 <div class='tr-sort-button'> 581 <input type='button' class='secondary tr-sort-submit' id='<?php echo $tableID ?>' name='<?php echo $team ?>' value=<?php_e( 'Sort Roster', 'team-rosters' ) ?>/>582 <input type='button' class='secondary tr-sort-submit' id='<?php echo esc_html( $tableID ) ?>' name='<?php echo esc_html( $team )?>' value=<?php esc_html_e( 'Sort Roster', 'team-rosters' ) ?>/> 582 583 </div> 583 584 -
team-rosters/trunk/includes/mstw-tr-settings.php
r3240856 r3270053 48 48 <!-- The settings screen main form; includes all tabs --> 49 49 <div class="wrap"> 50 <h2><?php e cho __( 'Team Rosters Plugin Settings', 'team-rosters') ?></h2>50 <h2><?php esc_html_e( 'Team Rosters Plugin Settings', 'team-rosters') ?></h2> 51 51 52 52 <?php … … 136 136 <tr> 137 137 <td> 138 <input name="Submit" type="submit" class="button-primary" value="<?php _e( 'Save Changes', 'team-rosters' ) ?>" />139 140 <input type="submit" class="button-secondary" id="reset_btn" name="<?php echo $options_name ?>" onclick="tr_confirm_reset_defaults()" value="<?php_e( 'Reset Defaults', 'team-rosters' ) ?>" />138 <input name="Submit" type="submit" class="button-primary" value="<?php esc_html_e( 'Save Changes', 'team-rosters' ) ?>" /> 139 140 <input type="submit" class="button-secondary" id="reset_btn" name="<?php echo esc_html( $options_name ) ?>" onclick="tr_confirm_reset_defaults()" value="<?php esc_html_e( 'Reset Defaults', 'team-rosters' ) ?>" /> 141 141 </td> 142 142 </tr> … … 164 164 $class = ( $tab == $current_tab ) ? ' nav-tab-active' : ''; 165 165 //echo "<a class='nav-tab$class' href='edit.php?post_type=mstw_tr_player&page=mstw-tr-settings&tab=$tab'>$name</a>"; 166 echo "<a class='nav-tab$class' href='admin.php?page=mstw-tr-settings&tab=$tab'>$name</a>";166 echo wp_kses_post( "<a class='nav-tab$class' href='admin.php?page=mstw-tr-settings&tab=$tab'>$name</a>" ); 167 167 } 168 168 echo '</h2>'; … … 222 222 '<p>' . __('Note that these settings apply to ALL roster and player displays (tables, profiles, galleries) on the site. To control individual displays by team, set the corresponding arguments in the shortcodes.', 'team-rosters' ) . "</p>\n" . 223 223 '<p><a href="http://shoalsummitsolutions.com/tr-data-fields-columns/" target="_blank">' . __( 'See the Team Rosters Users Manual for more documentation.', 'team-rosters' ) . "</a></p>\n"; 224 echo $help;224 echo wp_kses_post( $help ); 225 225 } //End:mstw_tr_data_fields_columns_help( ) 226 226 … … 231 231 '<p><a href="http://shoalsummitsolutions.com/tr-roster-tables/" target="_blank">' . __( 'See the Team Rosters Users Manual for more documentation.', 'team-rosters' ) . "</a></p>\n"; 232 232 233 echo $help;233 echo wp_kses_post( $help ); 234 234 } //End: mstw_tr_roster_tables_help( ) 235 235 … … 247 247 "</a></p>\n"; 248 248 249 echo $help;249 echo wp_kses_post( $help ); 250 250 } //End: mstw_tr_roster_table_colors_help( ) 251 251 … … 256 256 '<p>' . __('Note that these settings apply to ALL player profiles and galleries on the site. There are a number of other ways to customize the displays for individual teams, including shortcode arguments and custom stylesheets (CSS). See the Users Manual (link below) for more information.', 'team-rosters' ) . "</p>\n" . 257 257 '<p><a href="http://shoalsummitsolutions.com/tr-player-profiles-galleries/" target="_blank">' . __( 'See the Team Rosters Users Manual for more documentation.', 'team-rosters' ) . "</a></p>\n"; 258 echo $help;258 echo wp_kses_post( $help ); 259 259 } //End: mstw_tr_player_profiles_galleries_help( ) 260 260 -
team-rosters/trunk/includes/mstw-tr-team-roster-admin-class.php
r3240856 r3270053 112 112 if ( 'POST' == $_SERVER['REQUEST_METHOD'] ) { 113 113 114 $submit_value = array_key_exists( 'submit', $_POST ) ? stripslashes( $_POST[ 'submit' ] ) : null;114 $submit_value = array_key_exists( 'submit', $_POST ) ? wp_unslash( $_POST[ 'submit' ] ) : null; 115 115 116 116 $this->post( compact( 'submit_value' ) ); … … 122 122 <div class="wrap"> 123 123 124 <h1><?php echo $screen_titles[$edit]?></h1>124 <h1><?php echo esc_html( $screen_titles[$edit] ) ?></h1> 125 125 126 126 <p class='mstw-lm-admin-instructions'> 127 <?php _e( 'Read the contextual help tab on the top right of this screen.', 'team-rosters' ) ?>127 <?php esc_html_e( 'Read the contextual help tab on the top right of this screen.', 'team-rosters' ) ?> 128 128 </p> 129 129 … … 168 168 ?> 169 169 <h1 class='mstw-lm-admin-instructions'> 170 <?php _e( 'Create a team before editting it\'s roster.', 'team-rosters' );170 <?php esc_html_e( 'Create a team before editting it\'s roster.', 'team-rosters' ); 171 171 ?> 172 172 </h1> … … 180 180 181 181 if ( $edit ) { 182 // Don't want button on the Add Games Screen182 // Don't want button on the Add Players Screen 183 183 // Nothing to do if team is changed (ajax still fires) 184 184 ?> 185 <a href="<?php echo admin_url( 'admin.php?page=manage-team-rosters' )?>" class="button mstw-lm-control-button"><?php_e( 'Change Team', 'team-rosters' ) ?></a>185 <a href="<?php echo esc_url( admin_url( 'admin.php?page=manage-team-rosters' ) )?>" class="button mstw-lm-control-button"><?php esc_html_e( 'Change Team', 'team-rosters' ) ?></a> 186 186 187 187 <?php 188 // Don't need pagination on the Add Games Screen189 188 $this -> build_pagination_links( $paged, $players_list -> max_num_pages ); 190 189 … … 193 192 194 193 <br/><p class="description"> 195 <?php _e( 'Caution! This button will update the table with the selected team roster WITHOUT SAVING any changes. Use the Update Roster button at the bottom of the screen to save any changes.', 'team-rosters' ) ?>194 <?php esc_html_e( 'Caution! This button will update the table with the selected team roster WITHOUT SAVING any changes. Use the Update Roster button at the bottom of the screen to save any changes.', 'team-rosters' ) ?> 196 195 <br/></p> 197 196 … … 201 200 ?> 202 201 <br/><p class="description"> 203 <?php _e( 'Enter players for the selected team. No data will be processed on or after the first row with blank first and last names.', 'team-rosters' ) ?>202 <?php esc_html_e( 'Enter players for the selected team. No data will be processed on or after the first row with blank first and last names.', 'team-rosters' ) ?> 204 203 <br/></p> 205 204 <?php … … 229 228 230 229 <!-- Submit button --> 230 <?php wp_nonce_field( 'add-edit-players', 'mstw-tr-nonce' ); ?> 231 231 <tbody> 232 232 <tr> … … 276 276 <tr> 277 277 <?php foreach ( $data_fields as $data_field ) { ?> 278 <th><?php echo $data_field[0]?></th>278 <th><?php echo esc_html( $data_field[0] ) ?></th> 279 279 280 280 <?php } ?> … … 376 376 if ( null === $player ) { 377 377 ?> 378 <input type="hidden" name="<?php echo $this -> make_tag( "player_slug", $row_nbr ) ?>" value="<?php echo $this -> make_tag( '-1', $row_nbr) ?>"/>378 <input type="hidden" name="<?php echo esc_html( $this -> make_tag( "player_slug", $row_nbr ) ) ?>" value="<?php echo esc_html( $this -> make_tag( '-1', $row_nbr ) ) ?>"/> 379 379 <?php 380 380 foreach ( $blank_player as $slug => $value ) { … … 398 398 ?> 399 399 400 <input type="hidden" name="<?php echo $this -> make_tag( "player_slug", $row_nbr ) ?>" value="<?php echo $this -> make_tag( $player -> post_name, $row_nbr) ?>"/>400 <input type="hidden" name="<?php echo esc_html( $this -> make_tag( "player_slug", $row_nbr ) ) ?>" value="<?php echo esc_html( $this -> make_tag( $player -> post_name, $row_nbr ) ) ?>"/> 401 401 402 402 <?php … … 440 440 ?> 441 441 <td> 442 <input type='text' size='<?php echo $size ?>' maxlength = '<?php echo $maxlength ?>' id="<?php echo $tag?>" name="<?php echo $tag?>" value="<?php echo $value?>" />442 <input type='text' size='<?php echo esc_html( $size ) ?>' maxlength = '<?php echo esc_html( $maxlength ) ?>' id="<?php echo esc_html( $tag ) ?>" name="<?php echo esc_html( $tag) ?>" value="<?php echo esc_html( $value ) ?>" /> 443 443 </td> 444 444 … … 468 468 469 469 <td> 470 <select id="<?php echo $tag?>" name="<?php echo $tag?>">470 <select id="<?php echo esc_html( $tag ) ?>" name="<?php echo esc_html( $tag ) ?>"> 471 471 <?php foreach ( $options as $key => $value ) { ?> 472 <option value = "<?php echo $key ?>" <?php selected( $current_value, $key, true )?> > <?php echo $value?> </option>472 <option value = "<?php echo esc_html( $key ) ?>" <?php selected( $current_value, $key, true )?> > <?php echo esc_html( $value ) ?> </option> 473 473 <?php } ?> 474 474 </select> … … 502 502 ?> 503 503 <span class="tr-paginate-links"> 504 <?php echo paginate_links( $args); ?>504 <?php echo wp_kses_post( paginate_links( $args ) ); ?> 505 505 </span> 506 506 … … 566 566 if ( $team_list ) { 567 567 ?> 568 <select name='<?php echo $css_tag ?>' id='<?php echo $css_tag?>' >568 <select name='<?php echo esc_html( $css_tag ) ?>' id='<?php echo esc_html( $css_tag ) ?>' > 569 569 <?php 570 570 if ( !$edit ) { … … 577 577 $selected = selected( $slug, $current_team, false ); 578 578 ?> 579 <option value=<?php echo "$slug $selected" ?>><?php echo $name?> </option>579 <option value=<?php echo esc_html( "$slug $selected" ) ?>><?php echo esc_html( $name ) ?> </option> 580 580 <?php 581 581 } … … 655 655 function post( $options ) { 656 656 //mstw_log_msg( 'MSTW_TR_TEAM_ROSTERS_ADMIN.post:' ); 657 // 658 //first, do a few checks on form 659 // 660 661 if ( isset( $_POST['mstw-tr-nonce'] ) ) { 662 //wp_verify_nonce( sanitize_key( wp_unslash( $_POST['mstw-tr-nonce'] ) ); 663 $safeNonce = wp_esc_key( wp_unslash( $_POST['mstw-tr-nonce'] ) ); 664 665 if ( !wp_verify_nonce( $safeNonce, 'add-edit-players' ) ) { 666 mstw_tr_add_admin_notice( 'error', __( 'Problem encountered updating roster. Exiting.', 'team-rosters' ) ); 667 mstw_log_msg( 'MSTW_TR_TEAM_ROSTERS_ADMIN.post: Problem encountered updating roster; bad nonce. Exiting.' ); 668 return; 669 } 670 671 } else { 672 mstw_tr_add_admin_notice( 'error', __( 'Problem encountered updating roster. Exiting.', 'team-rosters' ) ); 673 mstw_log_msg( 'MSTW_TR_TEAM_ROSTERS_ADMIN.post: Problem encountered updating roster; nonce missing. Exiting.' ); 674 return; 675 676 } 657 677 658 678 if ( !$options ) { 659 mstw_tr_add_admin_notice( 'error', __( 'Problem encountered updating games. Exiting.', 'team-rosters' ) );660 mstw_log_msg( 'MSTW_TR_TEAM_ROSTERS_ADMIN.post: Problem encountered updating games. Exiting.' );679 mstw_tr_add_admin_notice( 'error', __( 'Problem encountered updating roster; $options array missing. Exiting.', 'team-rosters' ) ); 680 mstw_log_msg( 'MSTW_TR_TEAM_ROSTERS_ADMIN.post: Problem encountered updating roster; nonce missing. Exiting.' ); 661 681 return; 662 682 } … … 951 971 //mstw_log_msg( "MSTW_TR_TEAM_ROSTERS_ADMIN.edit_rosters_help_content:" ); 952 972 ?> 953 <p><?php _e( 'Use this screen to edit the players on a roster in bulk - up to 20 at time. First use the drop-down menu to select the team roster to be edited.', 'team-rosters' ) ?></p>954 955 <p><?php _e( 'While players can be edited on this screen much faster than the Manage Players screen, there are some restrictions. The Player Title, Player Slug, Player Team(s), Player Photo, and Player Profile fields cannot be edited on this screen. Use the Manage Players screen.', 'team-rosters' ) ?></p>973 <p><?php esc_html_e( 'Use this screen to edit the players on a roster in bulk - up to 20 at time. First use the drop-down menu to select the team roster to be edited.', 'team-rosters' ) ?></p> 974 975 <p><?php esc_html_e( 'While players can be edited on this screen much faster than the Manage Players screen, there are some restrictions. The Player Title, Player Slug, Player Team(s), Player Photo, and Player Profile fields cannot be edited on this screen. Use the Manage Players screen.', 'team-rosters' ) ?></p> 956 976 957 977 <p>See the <a href="http://shoalsummitsolutions.com/category/users-manuals/tr-plugin/" target="_blank">MSTW Team Rosters users manual</a> for more details.</p> … … 973 993 //mstw_log_msg( "MSTW_TR_TEAM_ROSTERS_ADMIN.add_players_help_content:" ); 974 994 ?> 975 <p><?php _e( 'Use this screen to add players to rosters in bulk - up to 20 at time. First use the drop-down menu to select the team to which to add players.', 'team-rosters' ) ?></p>976 977 <p><?php _e( 'While players can be added on this screen much faster than the Manage Players screen, there are the following restrictions:', 'team-rosters' ) ?></p>995 <p><?php esc_html_e( 'Use this screen to add players to rosters in bulk - up to 20 at time. First use the drop-down menu to select the team to which to add players.', 'team-rosters' ) ?></p> 996 997 <p><?php esc_html_e( 'While players can be added on this screen much faster than the Manage Players screen, there are the following restrictions:', 'team-rosters' ) ?></p> 978 998 979 999 <ul> 980 <li><?php _e( 'The Player Title will be set to "First_Name Last_Name.', 'team-rosters' ) ?> </li>981 <li><?php _e( 'The Player Slug will be set to "first_name-last_name.', 'team-rosters' ) ?> </li>982 <li><?php _e( 'Each Player will be added to only the selected team. Use the Manage Players screen to add a player to muliple teams.', 'team-rosters' ) ?> </li>983 <li><?php _e( 'Use the Manage Players screen to add Player Photos and Player Profiles.', 'team-rosters' ) ?> </li>1000 <li><?php esc_html_e( 'The Player Title will be set to "First_Name Last_Name.', 'team-rosters' ) ?> </li> 1001 <li><?php esc_html_e( 'The Player Slug will be set to "first_name-last_name.', 'team-rosters' ) ?> </li> 1002 <li><?php esc_html_e( 'Each Player will be added to only the selected team. Use the Manage Players screen to add a player to muliple teams.', 'team-rosters' ) ?> </li> 1003 <li><?php esc_html_e( 'Use the Manage Players screen to add Player Photos and Player Profiles.', 'team-rosters' ) ?> </li> 984 1004 </ul> 985 1005 986 <p><a href="http://shoalsummitsolutions.com/category/users-manuals/tr-plugin/" target="_blank"><?php _e( 'See the MSTW Team Rosters users manual for more details.', 'team-rosters' ) ?></a></p>1006 <p><a href="http://shoalsummitsolutions.com/category/users-manuals/tr-plugin/" target="_blank"><?php esc_html_e( 'See the MSTW Team Rosters users manual for more details.', 'team-rosters' ) ?></a></p> 987 1007 988 1008 <?php -
team-rosters/trunk/includes/mstw-tr-team-tax-admin-class.php
r3240856 r3270053 94 94 <div class="form-field"> 95 95 <p class="plugin-not-installed"> 96 <?php esc_html( printf( '%s', $value['warning'] ) ); ?> 96 <?php //printf( '%s', $value['warning'] ); 97 echo esc_html( $value['warning'] ) ?> 97 98 </p> 98 99 </div> … … 107 108 108 109 <div class="form-field"> 109 <label for=<?php echo $id ?>><?php echo $value['title']?></label>110 <label for=<?php echo esc_html( $id ) ?>><?php echo esc_html( $value['title'] ) ?></label> 110 111 111 <select id='<?php echo $key ?>' name='<?php echo $key?>' class='mstw-tr-tax-select-team' >112 <select id='<?php echo esc_html( $key ) ?>' name='<?php echo esc_html( $key ) ?>' class='mstw-tr-tax-select-team' > 112 113 <?php 113 114 $options = $this -> build_teams_list( $value['post_type'] ); … … 116 117 $selected = selected( -1, $v, false ); 117 118 ?> 118 <option value='<?php echo $v ?>' <?php echo $selected?>><?php echo $k?></option>119 <option value='<?php echo esc_html( $v ) ?>' <?php echo esc_html( $selected ) ?>><?php echo esc_html( $k ) ?></option> 119 120 <?php } ?> 120 121 </select> … … 175 176 ?> 176 177 <td> 177 <p class="plugin-not-installed"><?php echo $value['warning']?></p>178 <p class="plugin-not-installed"><?php echo esc_html( $value['warning'] )?></p> 178 179 </td> 179 180 … … 183 184 ?> 184 185 <td> 185 <select id='<?php echo $key ?>' name='<?php echo $key?>' class='mstw-tr-tax-select-team' >186 <select id='<?php echo esc_html( $key ) ?>' name='<?php echo esc_html( $key ) ?>' class='mstw-tr-tax-select-team' > 186 187 <?php 187 188 $options = $this -> build_teams_list( $value['post_type'] ); … … 194 195 } 195 196 ?> 196 <option value='<?php echo $v ?>' <?php echo $selected ?>><?php echo $k?></option>197 <option value='<?php echo esc_html( $v )?>' <?php echo esc_html( $selected ) ?>><?php echo esc_html( $k ) ?></option> 197 198 <?php } ?> 198 199 </select> 199 200 200 <?php echo $value['title']?>201 <?php echo esc_html( $value['title'] )?> 201 202 202 203 </td> <!-- .form-field --> … … 427 428 case 'manage-teams-help': 428 429 ?> 429 <p><?php _e( 'This screen provides management (add, edit, delete) of teams.', 'team-rosters' ) ?></p>430 <p><?php _e( 'Each team may be linked to a team in the MSTW Schedules & Scoreboards or the MSTW League Manager database. These links will allow team logos to be pulled from the database, and team colors for links the Schedules & Scoreboard', 'team-rosters' ) ?></p>431 <p><?php _e( 'Teams may be added on this page. They may also be added in bulk via the CSV Import screen.', 'team-rosters' ) ?></p>432 <p><?php _e( 'Roll over a team name, and select "Edit" to modify the data for an existing team." ', 'team-rosters' ) ?></p>433 <p><?php _e( 'Roll over a team name, and select "Delete" to remove a team. Any players assigned to the team will be removed from the team, but will remain in the players database." ', 'team-rosters' ) ?></p>434 435 <p><a href="http://shoalsummitsolutions.com/tr-data-entry-teams/" target="_blank"><?php _e( 'See the Data Entry - Teams man page for more details.', 'team-rosters' ) ?></a></p>430 <p><?php esc_html_e( 'This screen provides management (add, edit, delete) of teams.', 'team-rosters' ) ?></p> 431 <p><?php esc_html_e( 'Each team may be linked to a team in the MSTW Schedules & Scoreboards or the MSTW League Manager database. These links will allow team logos to be pulled from the database, and team colors for links the Schedules & Scoreboard', 'team-rosters' ) ?></p> 432 <p><?php esc_html_e( 'Teams may be added on this page. They may also be added in bulk via the CSV Import screen.', 'team-rosters' ) ?></p> 433 <p><?php esc_html_e( 'Roll over a team name, and select "Edit" to modify the data for an existing team." ', 'team-rosters' ) ?></p> 434 <p><?php esc_html_e( 'Roll over a team name, and select "Delete" to remove a team. Any players assigned to the team will be removed from the team, but will remain in the players database." ', 'team-rosters' ) ?></p> 435 436 <p><a href="http://shoalsummitsolutions.com/tr-data-entry-teams/" target="_blank"><?php esc_html_e( 'See the Data Entry - Teams man page for more details.', 'team-rosters' ) ?></a></p> 436 437 437 438 <?php … … 440 441 case 'edit-team-help': 441 442 ?> 442 <p><?php _e( 'Use this screen to modify the information for an existing team.', 'team-rosters' ) ?></p>443 444 <p><a href="http://shoalsummitsolutions.com/tr-data-entry-teams/" target="_blank"><?php _e( 'See the Data Entry - Teams man page for more details.', 'team-rosters' ) ?></a></p>443 <p><?php esc_html_e( 'Use this screen to modify the information for an existing team.', 'team-rosters' ) ?></p> 444 445 <p><a href="http://shoalsummitsolutions.com/tr-data-entry-teams/" target="_blank"><?php esc_html_e( 'See the Data Entry - Teams man page for more details.', 'team-rosters' ) ?></a></p> 445 446 446 447 -
team-rosters/trunk/includes/mstw-tr-utility-functions.php
r3240856 r3270053 736 736 $output = sprintf( 737 737 /* translators: %s: team slug (permalink)*/ 738 __( "No players found on team: '%s'", 'team-rosters' ), $team_slug );738 esc_html__( "No players found on team: '%s'", 'team-rosters' ), $team_slug ); 739 739 } 740 740 … … 1155 1155 // null if logo can't be found/built 1156 1156 // logo html with alt, and with link to team site, if available 1157 // 1. Use the team logo from the S&S or LM DB, if available, 1158 // 2. Else use the team logo in the theme's /team-rosters/images/ dir 1159 // 3. Else use the default-logo-team-slug.png from the plugin images dir 1160 // 4. Else use the default-logo.png (mystery player) from the plugin images dir 1161 1157 1162 // 1158 1163 if ( !function_exists( 'mstw_tr_build_team_logo' ) ) { 1159 1164 function mstw_tr_build_team_logo( $team_slug = null, $type='player' ) { 1160 //1. Use the team logo from the S&S or LM DB, if available, 1161 //2. Else use the team logo in the theme's /team-rosters/images/ dir 1162 //3. Else use the default-logo-team-slug.png from the plugin images dir 1163 //4. Else use the default-logo.png (mystery player) from the plugin images dir 1164 1165 //mstw_tr_log_msg( 'mstw_tr_build_team_logo:' ); 1165 //mstw_log_msg( 'mstw_tr_build_team_logo:' ); 1166 1166 1167 1167 if( null === $team_slug ) { … … 1631 1631 ?> 1632 1632 <tr class='mstw-divider-spacer'><td> </td></tr> 1633 <tr class='mstw-divider'><th colspan=2 ><?php echo $divider_msg?></th></tr>1633 <tr class='mstw-divider'><th colspan=2 ><?php echo esc_html( $divider_msg ) ?></th></tr> 1634 1634 <?php 1635 1635 } … … 1647 1647 <tr> 1648 1648 <?php //if ( "" != $label ) { ?> 1649 <th><label for '<?php echo $field_data['id']?>' >1650 <?php echo $label?>1649 <th><label for '<?php echo esc_html( $field_data['id'] )?>' > 1650 <?php echo esc_html( $label ) ?> 1651 1651 </label></th> 1652 1652 <?php //} ?> … … 1718 1718 $name = ( !empty( $name ) ) ? $name : $id; 1719 1719 1720 // pass the standard value if the option is not yet set in the database1721 //if ( !isset( $options[$id] ) && $options[ != 'checkbox' && ) {1722 // $options[$id] = ( isset( $default ) ? $default : 'default_field' );1723 //}1724 1725 1720 // Additional field class. Output only if the class is defined in the $args() 1726 1721 $class_str = ( !empty( $class ) ) ? "class='$class'" : '' ; … … 1735 1730 case 'color': // color field is just a text field with associated JavaScript 1736 1731 ?> 1737 <input type="text" id="<?php echo $id ?>" name="<?php echo $name ?>" value="<?php echo $curr_value ?>" <?php echo $attrib_str?> />1732 <input type="text" id="<?php echo esc_html( $id ) ?>" name="<?php echo esc_html( $name ) ?>" value="<?php echo esc_html( $curr_value ) ?>" <?php echo esc_attr( $attrib_str ) ?> /> 1738 1733 <?php 1739 echo ( !empty( $desc ) ) ? "<br /><span class='description'> $desc</span>\n" : "";1734 echo ( !empty( $desc ) ) ? "<br /><span class='description'>" . esc_html( $desc ) . "</span>\n" : ""; 1740 1735 break; 1741 1736 … … 1747 1742 $options = $args['options']; 1748 1743 1749 echo "<select id=' $id' name='$name' $attrib_str>";1744 echo "<select id='" . esc_html( $id ) . "' name='" . esc_html( $name ) . "'" . esc_attr( $attrib_str ) . "'>"; 1750 1745 foreach( $options as $key=>$value ) { 1751 1746 $selected = ( $curr_value == $value ) ? 'selected="selected"' : ''; 1752 echo "<option value=' $value' $selected>$key</option>";1747 echo "<option value='" . esc_html( $value ) . "'" . esc_html( $selected ) . ">" . esc_html( $key ) . "</option>"; 1753 1748 } 1754 1749 echo "</select>"; 1755 echo ( !empty( $desc ) ) ? "<br /><span class='description'> $desc</span>" : "";1750 echo ( !empty( $desc ) ) ? "<br /><span class='description'>" . esc_html( $desc ) . "</span>" : ""; 1756 1751 break; 1757 1752 1758 1753 // CHECKBOX 1759 1754 case 'checkbox': 1760 echo "<input class='checkbox $class_str' type='checkbox' id='$id' name='$name' value=1 " . checked( $curr_value, 1, false ) . " />"; 1761 echo ($desc != '') ? "<br /><span class='description'>$desc</span>" : ""; 1755 echo "<input class='checkbox " . esc_html( $class_str ) . "' type='checkbox' id='" . esc_html( $id ) . "' name='" . esc_html( $name ) . "' value=1 " . checked( esc_html( $curr_value ), 1, false ) . " />"; 1756 //echo "<input class='checkbox $class_str' type='checkbox' id='$id' name='$name' value=1 " . checked( $curr_value, 1, false ) . " />"; 1757 echo ($desc != '') ? "<br /><span class='description'>". esc_html( $desc ) . "</span>" : ""; 1762 1758 break; 1763 1759 1764 1760 // LABEL 1765 1761 case 'label': 1766 echo "<span class='description'>" . $curr_value. "</span>";1767 echo ( '' != $desc ) ? "<br /><span class='description'> $desc</span>" : "";1762 echo "<span class='description'>" . esc_html( $curr_value ) . "</span>"; 1763 echo ( '' != $desc ) ? "<br /><span class='description'>" . esc_html( $desc ) . "</span>" : ""; 1768 1764 break; 1769 1765 … … 1772 1768 ?> 1773 1769 <td class="uploader"> 1774 <input type="text" name="<?php echo $id ?>" id="<?php echo $id ?>" class="mstw_logo_text" size="30" value="<?php echo $curr_value?>"/>1775 <?php echo ($desc != '') ? "<br /><span class='description'> $desc</span>" : ""; ?>1770 <input type="text" name="<?php echo esc_html( $id ) ?>" id="<?php echo esc_html( $id ) ?>" class="mstw_logo_text" size="30" value="<?php echo esc_html( $curr_value ) ?>"/> 1771 <?php echo ($desc != '') ? "<br /><span class='description'>" . esc_html( $desc ) . "</span>" : ""; ?> 1776 1772 </td> 1777 1773 1778 1774 <td class="uploader"> 1779 <input type="button" class="button" name="<?php echo $id . '_btn'?>" id="<?php echo $id . '_btn'?>" value="<?php echo $btn_label?>" />1775 <input type="button" class="button" name="<?php echo esc_html( $id ) . '_btn'?>" id="<?php echo esc_html( $id ) . '_btn'?>" value="<?php echo esc_html( $btn_label ) ?>" /> 1780 1776 <!-- </div> --> 1781 1777 </td> 1782 1778 <td> 1783 <img id="<?php echo $id . '_img' ?>" width="<?php echo $img_width ?>" src="<?php echo $curr_value?>" />1779 <img id="<?php echo esc_html( $id ) . '_img' ?>" width="<?php echo esc_html( $img_width )?>" src="<?php echo esc_html( $curr_value ) ?>" /> 1784 1780 </td> 1785 1781 <?php … … 1790 1786 // THE FOLLOWING CASES HAVE NOT BEEN TESTED/USED 1791 1787 1788 /* 1792 1789 case "multi-text": 1793 1790 foreach($options as $item) { … … 1843 1840 } 1844 1841 1845 echo "<input class='checkbox$field_class' type='checkbox' id='$id|$item[1]' name='" . $wptuts_option_name. "[$id|$item[1]]' value='1' $checked /> $item[0] <br/>";1842 //echo "<input class='checkbox'. esc_html( $field_class) . "' type='checkbox' id='" . esc_html( $id) . "|" esc_html( $item[1]) . "' name='" . esc_html( $wptuts_option_name ) . "[$id|$item[1]]' value='1' $checked /> $item[0] <br/>"; 1846 1843 } 1847 echo ($desc != '') ? "<br /><span class='description'> $desc</span>" : "";1844 echo ($desc != '') ? "<br /><span class='description'>" . esc_html( $desc ) . "</span>" : ""; 1848 1845 break; 1846 */ 1849 1847 1850 1848 default: 1851 1849 mstw_tr_log_msg( "CONTROL TYPE $type NOT RECOGNIZED." ); 1852 echo "CONTROL TYPE $typeNOT RECOGNIZED.";1850 echo "CONTROL TYPE ", esc_html( $type ), " NOT RECOGNIZED."; 1853 1851 break; 1854 1852 … … 2030 2028 // NEW STUFF FOR NEW MSTW TEAM ROSTERS 2031 2029 // 2032 2030 /* 2033 2031 //------------------------------------------------------------------------------------ 2034 2032 // a. mstw_tr_get_current_sport - gets the current sport from the options DB … … 2048 2046 } //End: mstw_tr_get_current_sport() 2049 2047 } 2050 2048 */ 2049 2050 /* 2051 2051 //------------------------------------------------------------------------------------ 2052 2052 // b. mstw_tr_set_current_sport - sets the current sport in the options DB … … 2066 2066 } //End: mstw_tr_set_current_sport() 2067 2067 } 2068 */ 2068 2069 2069 2070 // ------------------------------------------------------------------------------ … … 2078 2079 // Outputs the HTML control and returns the number of sports found 2079 2080 // Otherwise, returns -1 if no sports are found 2080 // 2081 // 2082 /* 2081 2083 if ( !function_exists( 'mstw_tr_build_sport_select' ) ) { 2082 2084 function mstw_tr_build_sport_select( $current_sport = '', $id = '', $showDefault = false ) { … … 2098 2100 2099 2101 ?> 2100 <select name=<?php echo $id ?> id=<?php echo $id?> >2102 <select name=<?php echo esc_html( $id ) ?> id=<?php echo esc_html( $id ) ?> > 2101 2103 <?php foreach ( $sports as $slug => $name ) { 2102 2104 $selected = selected( $slug, $current_sport, false ); 2103 2105 ?> 2104 <option value=<?php echo "$slug $selected" ?>><?php echo $name?> </option>2106 <option value=<?php echo esc_html( $slug ) . " " . esc_html( $selected) ?>><?php echo esc_html( $name ) ?> </option> 2105 2107 2106 2108 <?php … … 2116 2118 } //End: mstw_tr_build_sport_select() 2117 2119 } 2118 2120 */ 2121 2122 /* 2119 2123 // ------------------------------------------------------------------------------ 2120 2124 // d. mstw_tr_build_sports_list - Returns a default array of sports as … … 2197 2201 } //End: mstw_lm_build_sports_list( ) 2198 2202 } 2203 */ -
team-rosters/trunk/includes/mstw-utility-functions.php
r3240856 r3270053 26 26 * 1. mstw_log_msg - writes debug messages to /wp-content/debug.log 27 27 * if the WP_DEBUG settings in wp-config are correct 28 * 2. mstw_requires_wordpress_version - checks for the right WordPress version 28 * 2. mstw_requires_wordpress_version - checks for the right WordPress version 29 29 * 3. mstw_safe_ref - prevents uninitialized string errors 30 30 * 3.1 mstw_safe_get - Safely get value for a key from an array … … 54 54 //------------------------------------------------------------------------------ 55 55 // 1. mstw_log_msg - logs messages to /wp-content/debug IF WP_DEBUG is true 56 // this function is used for DEBUGGING. It's not intended for production 57 // unless there is a REAL ERROR. 56 58 // ARGUMENTS: 57 59 // $msg - string, array, or object to log … … 75 77 } //End: mstw_log_msg( ) 76 78 } 79 77 80 78 81 //------------------------------------------------------------------------------ … … 84 87 // THIS FUNCTION ONLY WORKS IN ADMIN (because it calls get_plugin_data() 85 88 // 86 if ( !function_exists( 'mstw_requires_wordpress_version' ) ) { 87 function mstw_requires_wordpress_version( $version = '3.9.2' ) { 88 global $wp_version; 89 90 $plugin = MSTW_SS_PLUGIN_NAME; 91 //$plugin_data = get_plugin_data( __FILE__, false ); 92 $plugin_data = get_plugin_data( MSTW_SS_PLUGIN_DIR . '/mstw-schedules-scoreboards.php', 93 false ); 94 95 if ( version_compare( $wp_version, $version, "<" ) ) { 96 if( is_plugin_active( $plugin ) ) { 97 deactivate_plugins( $plugin ); 98 $die_msg = $plugin_data['Name'] . " requires WordPress $version or higher, and has been deactivated! <br/> Please upgrade WordPress and try again.<br /><br /><a href='".admin_url()."'>Back to admin dashboard</a>."; 99 die( $die_msg ); 100 } 101 } 102 } //end mstw_requires_wordpress_version() 103 } 89 /* 90 * Removed from team rosters version 91 */ 104 92 105 93 // ---------------------------------------------------------------- … … 237 225 break; 238 226 case 'D' : 239 $return .= $param_D[ date('N', $timestamp)];227 $return .= $param_D[gmdate('N', $timestamp)]; 240 228 break; 241 229 case 'l' : 242 $return .= $param_l[ date('N', $timestamp)];230 $return .= $param_l[gmdate('N', $timestamp)]; 243 231 break; 244 232 case 'F' : 245 $return .= $param_F[ date('n', $timestamp)];233 $return .= $param_F[gmdate('n', $timestamp)]; 246 234 break; 247 235 case 'M' : 248 $return .= $param_M[ date('n', $timestamp)];236 $return .= $param_M[gmdate('n', $timestamp)]; 249 237 break; 250 238 default : 251 $return .= date($format[$i], $timestamp);239 $return .= gmdate($format[$i], $timestamp); 252 240 break; 253 241 } … … 274 262 // ); 275 263 // 276 if( !function_exists( 'mstw_build_admin_edit_screen' ) ) { 277 function mstw_build_admin_edit_screen( $fields ) { 278 279 foreach( $fields as $field_id=>$field_data ) { 280 //HANDLE table dividers here ... NEW 281 if ( $field_data['type'] == 'divider' ) { 282 $divider_msg = ( isset( $field_data['curr_value'] ) ) ? $field_data['curr_value'] : ' '; 283 ?> 284 <tr class='mstw-divider-spacer'><td> </td></tr> 285 <tr class='mstw-divider'><th colspan=2 ><?php echo $divider_msg ?></th></tr> 286 <?php 287 } 288 else { 289 $field_data['id'] = ( !isset( $field_data['id'] ) || empty( $field_data['id'] ) ) ? $field_id : $field_data['id']; 290 $field_data['name'] = ( !isset( $field_data['name'] ) || empty( $field_data['name'] ) ) ? $field_id : $field_data['name']; 291 292 // check the field label/title 293 if ( array_key_exists( 'label', $field_data ) && !empty( $field_data['label'] ) ) 294 $label = $field_data['label']; 295 else 296 $label = ''; 297 ?> 298 299 <tr> 300 <th><label for '<?php echo $field_data['id']?>' > 301 <?php echo $label ?> 302 </label></th> 303 <?php 304 // media-uploader will add it's own cells (3 of theme) 305 if ( $field_data['type'] != 'media-uploader' ) { 306 echo "<td>\n"; 307 } 308 309 310 mstw_build_admin_edit_field( $field_data ); 311 312 if ( $field_data['type'] != 'media-uploader' ) { 313 echo "</td>\n"; 314 } 315 ?> 316 </tr> 317 <?php 318 } 319 } 320 321 } //End: mstw_build_admin_edit_screen() 322 } 264 /* 265 * Removed from team rosters version 266 */ 323 267 324 268 //------------------------------------------------------------------------------- … … 339 283 // 340 284 // 341 if( !function_exists( 'mstw_build_admin_edit_field' ) ) { 342 function mstw_build_admin_edit_field( $args ) { 343 344 $defaults = array( 345 'type' => 'text', 346 'id' => 'default_field', // the ID of the setting in our options array, and the ID of the HTML form element 347 'title' => __( 'Default Field', 'team-rosters' ), // the label for the HTML form element 348 'label' => __( 'Default Label', 'team-rosters' ), // the label for the HTML form element 349 'desc' => '', // the description displayed under the HTML form element 350 'default' => '', // the default value for this setting 351 'type' => 'text', // the HTML form element to use 352 'options' => array(), // (optional): the values in radio buttons or a drop-down menu 353 'name' => '', //name of HTML form element. should be options_array[option] 354 'class' => '', // the HTML form element class. Also used for validation purposes! 355 'curr_value' => '', // the current value of the setting 356 'maxlength' => '', // maxlength attrib of some input controls 357 'size' => '', // size attrib of some input controls 358 'img_width' => 60, 359 'btn_label' => 'Upload from Media Library', 360 ); 361 362 // "extract" to be able to use the array keys as variables in our function output below 363 $args = wp_parse_args( $args, $defaults ); 364 365 extract( $args ); 366 367 // default name to id 368 $name = ( !empty( $name ) ) ? $name : $id; 369 370 $name = esc_attr( $name ); 371 372 $id = esc_attr( $id ); 373 374 // pass the standard value if the option is not yet set in the database 375 376 // Additional field class. Output only if the class is defined in the $args() 377 $class_str = ( !empty( $class ) ) ? "class='$class'" : ''; 378 $maxlength_str = ( !empty( $maxlength ) ) ? "maxlength='$maxlength'" : '' ; 379 $size_str = ( !empty( $size ) ) ? "size='$size'" : '' ; 380 $attrib_str = " $class_str $maxlength_str $size_str "; 381 382 $desc = esc_html( $desc ); 383 $desc_html = ( !empty( $desc ) ) ? "<br /><span class='description'>$desc</span>" : ""; 384 385 386 // switch html display based on the setting type. 387 switch ( $args['type'] ) { 388 //TEXT & COLOR CONTROLS 389 case 'text': // this is the default type 390 case 'color': // color field is just a text field with associated JavaScript 391 ?> 392 <input type="text" id="<?php echo $id ?>" name="<?php echo $name ?>" value="<?php echo $curr_value ?>" <?php echo $attrib_str ?> /> 393 <?php 394 echo $desc_html; 395 break; 396 397 //SELECT OPTION CONTROL 398 case 'select-option': 399 //not sure why this is needed given the extract() above 400 //but without it you get an extra option with the 401 //'option-name' displayed (huh??) 402 $options = $args['options']; 403 404 echo "<select id='$id' name='$name' $attrib_str >"; 405 foreach( $options as $key=>$value ) { 406 $selected = ( $curr_value == $value ) ? 'selected="selected"' : ''; 407 $value = esc_attr( $value ); 408 $key = esc_html( $key ); 409 echo "<option value='$value' $selected>$key</option>"; 410 } 411 echo "</select>"; 412 echo $desc_html; 413 break; 414 415 // CHECKBOX 416 case 'checkbox': 417 echo "<input class='checkbox $class_str' type='checkbox' id='$id' name='$name' value=1 " . checked( $curr_value, 1, false ) . " />"; 418 echo $desc_html; 419 break; 420 421 // LABEL 422 case 'label': 423 echo "<span class='description'>" . esc_html( $curr_value ) . "</span>"; 424 echo $desc_html; 425 break; 426 427 // MEDIA UPLOADER 428 case 'media-uploader': 429 ?> 430 <td class="uploader"> 431 <input type="text" name="<?php echo $id ?>" id="<?php echo $id ?>" class="mstw_logo_text" size="32" value="<?php echo esc_attr( $curr_value )?>"/> 432 <?php echo $desc_html; ?> 433 </td> 434 435 <td class="uploader"> 436 <input type="button" class="button" name="<?php echo $id . '_btn'?>" id="<?php echo $id . '_btn'?>" value="<?php echo esc_attr( $btn_label ) ?>" /> 437 <!-- </div> --> 438 </td> 439 <td> 440 <img id="<?php echo $id . '_img' ?>" width="<?php echo esc_attr( $img_width )?>" src="<?php echo esc_attr( $curr_value ) ?>" /> 441 </td> 442 <?php 443 break; 444 445 default: 446 echo "CONTROL TYPE $type NOT RECOGNIZED."; 447 break; 448 449 } //End: switch ( $args['type'] ) { 450 451 } //End: mstw_build_admin_edit_field() 452 } 285 /* 286 * Removed from team rosters version 287 */ 288 453 289 454 290 //------------------------------------------------------------------------------- … … 459 295 // None. HTML is ouput/echoed to the screen by mstw_build_settings_field() 460 296 // 461 if( !function_exists( 'mstw_build_settings_screen' ) ) { 462 function mstw_build_settings_screen( $arguments ) { 463 foreach ( $arguments as $args ) { 464 mstw_build_settings_field( $args ); 465 } 466 } //End: mstw_build_settings_screen() 467 } 297 /* 298 * Removed from team rosters version 299 */ 468 300 469 301 //------------------------------------------------------------------------------- … … 476 308 // None. HTML is output/echoed to screen 477 309 // 478 if( !function_exists( 'mstw_build_settings_field' ) ) { 479 function mstw_build_settings_field( $args ) { 480 // default array to overwrite when calling the function 481 482 $defaults = array( 483 'id' => 'default_field', // the ID of the setting in our options array, and the ID of the HTML form element 484 'title' => 'Default Field', // the label for the HTML form element 485 'desc' => '', // the description displayed under the HTML form element 486 'default' => '', // the default value for this setting 487 'type' => 'text', // the HTML form element to use 488 'section' => '', // settings section to which this setting belongs 489 'page' => '', //page on which the section belongs 490 'options' => array(), // (optional): the values in radio buttons or a drop-down menu 491 'name' => '', //name of HTML form element. should be options_array[option] 492 'class' => '', // the HTML form element class. Also used for validation purposes! 493 'value' => '' // the current value of the setting 494 ); 495 496 // ARGUMENTS: $field_args = array( 497 // 'type' => $type, * 498 // 'id' => $id, * 499 // 'desc' => $desc, * 500 // 'curr_value' => $value, * 501 // 'options' => $options, * 502 // 'label_for' => $id, * (use id) 503 // 'class' => $class, * 504 // 'name' => $name, 505 // ); 506 507 // "extract" to be able to use the array keys as variables in our function output below 508 extract( wp_parse_args( $args, $defaults ) ); 509 510 //Handle some MSTW custom field types; convert for generic select-option 511 switch ( $type ) { 512 case 'show-hide': 513 $type = 'select-option'; 514 $options = array( __( 'Show', 'team-rosters' ) => 1, 515 __( 'Hide', 'team-rosters' ) => 0, 516 ); 517 break; 518 case 'date-time': 519 $type = 'select-option'; 520 521 $options = array ( __( 'Custom', 'team-rosters' ) => 'custom', 522 __( 'Tuesday, 07 April 01:15 pm', 'team-rosters' ) => 'l, d M h:i a', 523 __( 'Tuesday, 7 April 01:15 pm', 'team-rosters' ) => 'l, j M h:i a', 524 __( 'Tuesday, 07 April 1:15 pm', 'team-rosters' ) => 'l, d M g:i a', 525 __( 'Tuesday, 7 April 1:15 pm', 'team-rosters' ) => 'l, j M g:i a', 526 __( 'Tuesday, 7 April 13:15', 'team-rosters' ) => 'l, d M H:i', 527 __( 'Tuesday, 7 April 13:15', 'team-rosters' ) => 'l, j M H:i', 528 __( '07 April 13:15', 'team-rosters' ) => 'd M H:i', 529 __( '7 April 13:15', 'team-rosters' ) => 'j M H:i', 530 __( '07 April 01:15 pm', 'team-rosters' ) => 'd M g:i a', 531 __( '7 April 01:15 pm', 'team-rosters' ) => 'j M g:i a', 532 ); 533 534 if ( isset( $custom_format ) && $custom_format == 0 ) { 535 //remove the custom option 536 unset( $options[ __( 'Custom', 'team-rosters' ) ] ); 537 } 538 539 if ( $desc == '' ) { 540 $desc = __( 'Formats for 7 April 2013 13:15.', 'team-rosters' ); 541 } 542 543 break; 544 case 'date-only': 545 $type = 'select-option'; 546 $options = array ( __( 'Custom', 'team-rosters' ) => 'custom', 547 '2013-04-07' => 'Y-m-d', 548 '13-04-07' => 'y-m-d', 549 '04/07/13' => 'm/d/y', 550 '4/7/13' => 'n/j/y', 551 __( '07 Apr 2013', 'team-rosters' ) => 'd M Y', 552 __( '7 Apr 2013', 'team-rosters' ) => 'j M Y', 553 __( 'Tues, 07 Apr 2013', 'team-rosters' ) => 'D, d M Y', 554 __( 'Tues, 7 Apr 13', 'team-rosters' ) => 'D, j M y', 555 __( 'Tuesday, 7 Apr', 'team-rosters' ) => 'l, j M', 556 __( 'Tuesday, 07 April 2013', 'team-rosters' ) => 'l, d F Y', 557 __( 'Tuesday, 7 April 2013', 'team-rosters' ) => 'l, j F Y', 558 __( 'Tues, 07 Apr', 'team-rosters' ) => 'D, d M', 559 __( 'Tues, 7 Apr', 'team-rosters' ) => 'D, j M', 560 __( '07 Apr', 'team-rosters' ) => 'd M', 561 __( '7 Apr', 'team-rosters' ) => 'j M', 562 ); 563 564 if ( isset( $custom_format ) && $custom_format == 0 ) { 565 //remove the custom option 566 unset( $options[ __( 'Custom', 'team-rosters' ) ] ); 567 } 568 if ( $desc == '' ) { 569 $desc = __( 'Formats for 7 Apr 2013. Default: 2013-04-07', 'team-rosters' ); 570 } 571 break; 572 case 'time-only': 573 $type = 'select-option'; 574 $options = array ( __( 'Custom', 'team-rosters' ) => 'custom', 575 __( '08:00 (24hr)', 'team-rosters' ) => 'H:i', 576 __( '8:00 (24hr)', 'team-rosters' ) => 'G:i', 577 __( '08:00 am', 'team-rosters' ) => 'h:i a', 578 __( '08:00 AM', 'team-rosters' ) => 'h:i A', 579 __( '8:00 am', 'team-rosters' ) => 'g:i a', 580 __( '8:00 AM', 'team-rosters' ) => 'g:i A', 581 ); 582 583 if ( isset( $custom_format ) && $custom_format == 0 ) { 584 //remove the custom option 585 unset( $options[ __( 'Custom', 'team-rosters' ) ] ); 586 } 587 if ( $desc == '' ) { 588 $desc = __( 'Formats for eight in the morning. Default: 08:00', 'team-rosters' ); 589 } 590 break; 591 default: 592 break; 593 594 } 595 596 // 597 // map arguments used by mstw_display_form_field() to create HTML output 598 // 599 $field_args = array( 600 'type' => $type, 601 'id' => $id, 602 'desc' => $desc, 603 'curr_value' => $value, 604 'options' => $options, 605 'label_for' => $id, 606 'class' => $class, 607 'name' => $name, 608 ); 609 610 add_settings_field( $id, 611 $title, 612 'mstw_build_admin_edit_field', 613 $page, 614 $section, 615 $field_args 616 ); 617 618 } //End: mstw_build_settings_field() 619 } 310 /* 311 * Removed from team rosters version 312 */ 620 313 621 314 //------------------------------------------------------------------------------- … … 623 316 // Returns input string if valid hex color (or ''); returns null otherwise 624 317 // 625 if( !function_exists( 'mstw_sanitize_hex_color' ) ) { 626 function mstw_sanitize_hex_color( $color ) { 627 // the empty string is ok 628 if ( '' === $color ) 629 return ''; 630 631 // 3 or 6 hex digits, or the empty string. 632 if ( preg_match('|^#([A-Fa-f0-9]{3}){1,2}$|', $color ) ) 633 return $color; 634 635 // return null if input $color is not valid 636 return null; 637 638 } //End: mstw_sanitize_hex_color() 639 } 318 /* 319 * Removed from team rosters version 320 */ 640 321 641 322 //------------------------------------------------------------------------------- … … 708 389 elseif( $current_screen and $current_screen->post_type ) 709 390 return $current_screen->post_type; 710 391 /** 392 * IDK how to fix the warning from the plugin checker: 393 * Processing form data without nonce verification. 394 * This utility function is just trying to find a post type?? 395 */ 711 396 elseif( isset( $_REQUEST['post_type'] ) ) 712 397 return sanitize_key( $_REQUEST['post_type'] ); … … 812 497 $msg_type = ( $msg_type == 'warning' ) ? $msg_type . ' updated' : $msg_type ; 813 498 ?> 814 <div class="<?php echo $msg_type; ?>">815 <p><?php echo $msg_notice; ?></p>499 <div class="<?php echo esc_html( $msg_type ); ?>"> 500 <p><?php echo esc_html( $msg_notice ); ?></p> 816 501 </div> 817 502 -
team-rosters/trunk/mstw-team-rosters.php
r3240856 r3270053 1 1 <?php 2 2 /* 3 * Plugin Name: MSTWTeam Rosters3 * Plugin Name: Team Rosters 4 4 * Plugin URI: http://shoalsummitsolutions.com 5 5 * Description: Manage & display team rosters. Front end displays include roster tables, player galleries, and single player profiles. … … 617 617 if ( file_exists( $plugin_stylesheet ) ) { 618 618 $plugin_style_url = plugins_url( '/css/mstw-tr-styles.css', __FILE__ ); 619 wp_enqueue_style( 'mstw_tr_style', $plugin_style_url ); 619 wp_enqueue_style( 'mstw_tr_style', 620 $plugin_style_url, 621 array( ), 622 '4.9', 623 'all' 624 ); 620 625 } 621 626 … … 628 633 wp_register_style( 'mstw_tr_custom_style', $custom_stylesheet_url ); 629 634 wp_enqueue_style( 'mstw_tr_custom_style' ); 635 wp_enqueue_style( 'mstw_tr_custom_style', 636 $custom_stylesheet_url, 637 array( ), 638 '4.9', 639 'all' 640 ); 630 641 } 631 642 … … 641 652 plugins_url( 'team-rosters/js/tr-load-team-colors.js' ), 642 653 array( 'jquery' ), 643 false,644 true654 '4.9', 655 array( ) 645 656 ); 646 657 … … 649 660 plugins_url( 'team-rosters/js/tr-sort-roster-table.js' ), 650 661 array( 'jquery' ), 651 false,652 true662 '4.9', 663 array( ) 653 664 ); 654 665 … … 657 668 plugins_url( 'team-rosters/js/tr-select-player.js' ), 658 669 array( 'jquery' ), 659 false,660 true670 '4.9', 671 array( ) 661 672 ); 662 673 … … 665 676 plugins_url( 'team-rosters/js/tr-team-roster-2-ajax.js' ), 666 677 array( 'jquery' ), 667 false,668 true678 '4.9', 679 array( ) 669 680 ); 670 681 -
team-rosters/trunk/readme.txt
r3240856 r3270053 44 44 45 45 = 4.8 = 46 * Corrected a security issue identified by the Wordpress team46 * Corrected a security issues identified by the Wordpress team 47 47 * Added a .pot file in the /lang directory so the plugin is now translatable. 48 48 * Tested on PHP 8.2.23 and WP 6.7.2. -
team-rosters/trunk/theme-templates/single-player.php
r3240856 r3270053 93 93 // Set up the hidden fields for jScript CSS 94 94 $hidden_fields = mstw_tr_build_team_colors_html( $team_slug, $options, 'profile' ); 95 echo $hidden_fields;95 echo wp_kses_post( $hidden_fields ); 96 96 ?> 97 97 … … 102 102 // Build the single player page title 103 103 if ( $options['sp_show_title'] ) { 104 echo "<h1 class='player-head-title player-head-title_ $team_slug'>$team_name</h1>";104 echo "<h1 class='player-head-title player-head-title_" . esc_html( $team_slug ) . "'>" . esc_html( $team_name) . "</h1>"; 105 105 } 106 106 ?> … … 114 114 ?> 115 115 116 <form id="single-player-profile" method="POST" action= "<?php echo $formAction; ?>">117 <input type='hidden' name='current-player' id='current-player' value= <?php echo $post->post_name?> />116 <form id="single-player-profile" method="POST" action= "<?php echo esc_url( $formAction ); ?>"> 117 <input type='hidden' name='current-player' id='current-player' value= <?php echo esc_html( $post->post_name ) ?> /> 118 118 <div class="player-select-list ms-control"> 119 119 <?php 120 120 if ( null != $team_slug ) { 121 121 $selectionHTML = mstw_tr_build_player_selection( $team_slug, $options, $post -> post_name ); 122 echo $selectionHTML; 122 $allowed_html = array( 'option' => array( 'value' => true, 'selected' => true ), 'select' => array( 'name' => true, 'id' => true ) ); 123 echo wp_kses( $selectionHTML, $allowed_html ); 123 124 } 124 125 ?> 125 126 </div> 126 127 <div class="player-select-button ms-control"> 127 <input type="submit" class="secondary tr-ps-submit" id="tr-ps-submit" name="<?php echo $team_slug?>" value='<?php_e( 'Update Player', 'team-rosters' ) ?>'/>128 <input type="submit" class="secondary tr-ps-submit" id="tr-ps-submit" name="<?php echo esc_html( $team_slug )?>" value='<?php esc_html_e( 'Update Player', 'team-rosters' ) ?>'/> 128 129 </div> 129 130 </form> … … 132 133 </div> <!-- <div class='tr-header-controls'> --> 133 134 134 <div class="player-header player-header_<?php echo ( $team_slug ) ?> MSTW-flex-row">135 <div class="player-header player-header_<?php echo esc_html( $team_slug ) ?> MSTW-flex-row"> 135 136 <div id = "player-photo"> 136 137 <?php 137 echo mstw_tr_build_player_photo( $post, $team_slug, $options, 'profile');138 echo wp_kses_post( mstw_tr_build_player_photo( $post, $team_slug, $options, 'profile' ) ); 138 139 ?> 139 140 </div> <!-- #player-photo --> … … 143 144 <?php if ( $options['show_number'] ) { ?> 144 145 <div id="number"> 145 <?php echo get_post_meta($post->ID, 'player_number', true); ?>146 <?php echo wp_kses_post( get_post_meta( $post->ID, 'player_number', true ) ); ?> 146 147 </div><!-- #number --> 147 148 <?php } ?> … … 152 153 //Convert 'last, first' to 'first last' 153 154 $options['name_format'] = ( $options['name_format'] == 'last-first' ) ? 'first-last' : $options['name_format'] ; 154 echo mstw_tr_build_player_name( $post, $options, 'profile');155 echo wp_kses_post( mstw_tr_build_player_name( $post, $options, 'profile' ) ); 155 156 ?> 156 157 </div><!-- #player-name --> … … 167 168 // the first two rows are (now almost) the same in all formats 168 169 if ( $options['show_position'] ) { 169 echo $row_start . $options['position_label'] . $new_cell . get_post_meta($post->ID, 'player_position', true ) . $row_end;170 echo wp_kses_post( $row_start . $options['position_label'] . $new_cell . get_post_meta($post->ID, 'player_position', true ) . $row_end ); 170 171 } 171 172 … … 175 176 $throws = get_post_meta($post->ID, 'player_throws', true ); 176 177 $throws = ( $throws == 0 ) ? '' : $throws ; 177 echo $row_start . $options['bats_throws_label'] . $new_cell178 . mstw_tr_build_bats_throws( $post ) . $row_end ;178 echo wp_kses_post( $row_start . $options['bats_throws_label'] . $new_cell 179 . mstw_tr_build_bats_throws( $post ) . $row_end ); 179 180 } 180 181 … … 182 183 // Otherwise show just one or the other 183 184 if ( $options['show_height'] and $options['show_weight'] ) { 184 echo $row_start . $options['height_label'] . '/' . $options['weight_label'] . $new_cell . get_post_meta($post->ID, 'player_height', true ) . '/' . get_post_meta($post->ID, 'player_weight', true ) . $row_end;185 echo wp_kses_post( $row_start . $options['height_label'] . '/' . $options['weight_label'] . $new_cell . get_post_meta($post->ID, 'player_height', true ) . '/' . get_post_meta($post->ID, 'player_weight', true ) . $row_end ); 185 186 } 186 187 else if ( $options['show_weight'] ) { 187 echo $row_start . $options['weight_label'] . $new_cell . get_post_meta($post->ID, 'player_weight', true ) . $row_end;188 echo wp_kses_post( $row_start . $options['weight_label'] . $new_cell . get_post_meta($post->ID, 'player_weight', true ) . $row_end ); 188 189 } 189 190 else if ( $options['show_height'] ) { 190 echo $row_start . $options['height_label'] . $new_cell . get_post_meta($post->ID, 'player_height', true ) . $row_end;191 echo wp_kses_post( $row_start . $options['height_label'] . $new_cell . get_post_meta($post->ID, 'player_height', true ) . $row_end ); 191 192 } 192 193 193 194 //Year 194 195 if ( $options['show_year'] ) { 195 echo $row_start . $options['year_label'] . $new_cell . get_post_meta( $post->ID, 'player_year', true ) . $row_end;196 echo wp_kses_post( $row_start . $options['year_label'] . $new_cell . get_post_meta( $post->ID, 'player_year', true ) . $row_end ); 196 197 } 197 198 //Age 198 199 if ( $options['show_age'] ) { 199 echo $row_start . $options['age_label'] . $new_cell . get_post_meta( $post->ID, 'player_age', true ) . $row_end;200 echo wp_kses_post( $row_start . $options['age_label'] . $new_cell . get_post_meta( $post->ID, 'player_age', true ) . $row_end ); 200 201 } 201 202 //Experience 202 203 if ( $options['show_experience'] ) { 203 echo $row_start . $options['experience_label'] . $new_cell . get_post_meta( $post->ID, 'player_experience', true ) . $row_end;204 echo wp_kses_post( $row_start . $options['experience_label'] . $new_cell . get_post_meta( $post->ID, 'player_experience', true ) . $row_end ); 204 205 } 205 206 //Hometown 206 207 if ( $options['show_home_town'] ) { 207 echo $row_start . $options['home_town_label'] . $new_cell . get_post_meta( $post->ID, 'player_home_town', true ) . $row_end;208 echo wp_kses_post( $row_start . $options['home_town_label'] . $new_cell . get_post_meta( $post->ID, 'player_home_town', true ) . $row_end ); 208 209 } 209 210 //Last School 210 211 if ( $options['show_last_school'] ) { 211 echo $row_start . $options['last_school_label'] . $new_cell . get_post_meta( $post->ID, 'player_last_school', true ) . $row_end;212 echo wp_kses_post( $row_start . $options['last_school_label'] . $new_cell . get_post_meta( $post->ID, 'player_last_school', true ) . $row_end ); 212 213 } 213 214 //Country 214 215 if ( $options['show_country'] ) { 215 echo $row_start . $options['country_label'] . $new_cell . get_post_meta( $post->ID, 'player_country', true ) . $row_end;216 echo wp_kses_post($row_start . $options['country_label'] . $new_cell . get_post_meta( $post->ID, 'player_country', true ) . $row_end ); 216 217 } 217 218 218 219 //Other 219 220 if ( $options['show_other_info'] ) { 220 echo $row_start . $options['other_info_label'] . $new_cell . get_post_meta( $post->ID, 'player_other', true ) . $row_end;221 echo wp_kses_post( $row_start . $options['other_info_label'] . $new_cell . get_post_meta( $post->ID, 'player_other', true ) . $row_end ); 221 222 } 222 223 ?> … … 227 228 <div id='team-logo'> 228 229 <?php 229 echo mstw_tr_build_profile_logo( $team_slug);230 echo wp_kses_post( mstw_tr_build_profile_logo( $team_slug ) ); 230 231 ?> 231 232 </div> <!-- #team-logo --> … … 236 237 237 238 if ( !empty( $bio ) ) { ?> 238 <div class="player-bio player-bio_<?php echo $team_slug; ?> ">239 <div class="player-bio player-bio_<?php echo esc_html( $team_slug ); ?> "> 239 240 <?php $sp_content_title = ( $options['sp_content_title'] == '' ) ? 240 241 __( 'Player Bio', 'team-rosters' ) : 241 242 $options['sp_content_title']; ?> 242 <h1><?php echo $sp_content_title?></h1>243 <h1><?php echo esc_html( $sp_content_title ) ?></h1> 243 244 244 245 <!--add the bio content (format it as desired in the post)--> 245 <?php echo apply_filters( 'the_content', $bio ); ?> 246 <!--NOTE: can't escape $bio - it could contain links, lists, formatting, etc entered by the site builder --> 247 <?php echo wp_kses_post( apply_filters( 'the_content', $bio ) ); ?> 246 248 </div><!-- .player-bio --> 247 249 -
team-rosters/trunk/theme-templates/taxonomy-team.php
r3240856 r3270053 25 25 $siteURL = "//".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; 26 26 27 $parsedURL = parse_url( $siteURL, PHP_URL_QUERY );27 $parsedURL = wp_parse_url( $siteURL, PHP_URL_QUERY ); 28 28 29 29 parse_str( $parsedURL, $atts ); … … 82 82 <div id="content-player-gallery" role="main" > 83 83 84 <header class="page-header page-header_<?php echo $team_slug ?>"> 85 <?php echo "<h1 class='team-head-title team-head-title_$team_slug'>$team_name</h1>"; ?> 84 <header class="page-header page-header_<?php echo esc_html( $team_slug ) ?>"> 85 <?php //echo "<h1 class='team-head-title team-head-title_$team_slug'>$team_name</h1>"; ?> 86 <?php echo "<h1 class='team-head-title team-head-title_", esc_html( $team_slug ), "'>", esc_html( $team_name ), "</h1>\n"; ?> 86 87 </header> 87 88 88 89 <?php 89 // echo mstw_tr_build_gallery( $team_slug, $roster_type, $options );90 echo mstw_tr_build_gallery( $team_slug, $roster_type, $attribs);90 // mstw_tr_build_gallery() output is escaped in that function (includes/mstw-tr-utility-functions.php) 91 echo wp_kses_post( mstw_tr_build_gallery( $team_slug, $roster_type, $attribs ) ); 91 92 ?> 92 93
Note: See TracChangeset
for help on using the changeset viewer.