Use TONY_SPORTSPRESS_ENHANCEMENTS_DIR constant in requires; localize JS strings
- Replace repeated plugin_dir_path(__FILE__) calls with the already-defined TONY_SPORTSPRESS_ENHANCEMENTS_DIR constant - Localize 'Open ICS Feed' and 'Open Feed URL' JS strings in sp-url-builder.php via wp_json_encode() so they pass through the translation system Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -33,21 +33,20 @@ if ( ! defined( 'TONY_SPORTSPRESS_ENHANCEMENTS_PLUGIN_BASENAME' ) ) {
|
||||
define( 'TONY_SPORTSPRESS_ENHANCEMENTS_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
|
||||
}
|
||||
|
||||
// Include other files here
|
||||
require_once plugin_dir_path(__FILE__) . 'includes/sp-github-updater.php';
|
||||
require_once plugin_dir_path(__FILE__) . 'includes/sp-officials-manager-role.php';
|
||||
require_once plugin_dir_path(__FILE__) . 'includes/open-graph-tags.php';
|
||||
require_once plugin_dir_path(__FILE__) . 'includes/featured-image-generator.php';
|
||||
require_once plugin_dir_path(__FILE__) . 'includes/sp-event-permalink.php';
|
||||
require_once plugin_dir_path(__FILE__) . 'includes/sp-event-export.php';
|
||||
require_once plugin_dir_path(__FILE__) . 'includes/sp-event-csv.php';
|
||||
require_once plugin_dir_path(__FILE__) . 'includes/sp-event-admin-week-filter.php';
|
||||
require_once plugin_dir_path(__FILE__) . 'includes/sp-event-quick-edit-officials.php';
|
||||
require_once plugin_dir_path(__FILE__) . 'includes/sp-event-team-ordering.php';
|
||||
require_once plugin_dir_path(__FILE__) . 'includes/sp-printable-calendars.php';
|
||||
require_once plugin_dir_path(__FILE__) . 'includes/sp-url-builder.php';
|
||||
require_once plugin_dir_path(__FILE__) . 'includes/sp-webhooks.php';
|
||||
require_once plugin_dir_path(__FILE__) . 'includes/sp-schedule-exporter.php';
|
||||
require_once plugin_dir_path(__FILE__) . 'includes/sp-venue-meta.php';
|
||||
require_once TONY_SPORTSPRESS_ENHANCEMENTS_DIR . 'includes/sp-github-updater.php';
|
||||
require_once TONY_SPORTSPRESS_ENHANCEMENTS_DIR . 'includes/sp-officials-manager-role.php';
|
||||
require_once TONY_SPORTSPRESS_ENHANCEMENTS_DIR . 'includes/open-graph-tags.php';
|
||||
require_once TONY_SPORTSPRESS_ENHANCEMENTS_DIR . 'includes/featured-image-generator.php';
|
||||
require_once TONY_SPORTSPRESS_ENHANCEMENTS_DIR . 'includes/sp-event-permalink.php';
|
||||
require_once TONY_SPORTSPRESS_ENHANCEMENTS_DIR . 'includes/sp-event-export.php';
|
||||
require_once TONY_SPORTSPRESS_ENHANCEMENTS_DIR . 'includes/sp-event-csv.php';
|
||||
require_once TONY_SPORTSPRESS_ENHANCEMENTS_DIR . 'includes/sp-event-admin-week-filter.php';
|
||||
require_once TONY_SPORTSPRESS_ENHANCEMENTS_DIR . 'includes/sp-event-quick-edit-officials.php';
|
||||
require_once TONY_SPORTSPRESS_ENHANCEMENTS_DIR . 'includes/sp-event-team-ordering.php';
|
||||
require_once TONY_SPORTSPRESS_ENHANCEMENTS_DIR . 'includes/sp-printable-calendars.php';
|
||||
require_once TONY_SPORTSPRESS_ENHANCEMENTS_DIR . 'includes/sp-url-builder.php';
|
||||
require_once TONY_SPORTSPRESS_ENHANCEMENTS_DIR . 'includes/sp-webhooks.php';
|
||||
require_once TONY_SPORTSPRESS_ENHANCEMENTS_DIR . 'includes/sp-schedule-exporter.php';
|
||||
require_once TONY_SPORTSPRESS_ENHANCEMENTS_DIR . 'includes/sp-venue-meta.php';
|
||||
|
||||
register_activation_hook( __FILE__, 'tony_sportspress_sync_officials_manager_roles' );
|
||||
|
||||
Reference in New Issue
Block a user