Add filter to localized js strings
This commit is contained in:
@@ -110,7 +110,7 @@ class SP_Admin_Assets {
|
||||
wp_enqueue_script( 'jquery-fitvids' );
|
||||
wp_enqueue_script( 'sportspress-admin', SP()->plugin_url() . '/assets/js/admin/sportspress-admin.js', array( 'jquery', 'chosen', 'jquery-ui-core', 'jquery-ui-datepicker', 'jquery-ui-draggable', 'jquery-ui-droppable', 'jquery-ui-sortable', 'jquery-tiptip', 'jquery-caret', 'jquery-countdown', 'jquery-fitvids' ), SP_VERSION, true );
|
||||
|
||||
$strings = array(
|
||||
$strings = apply_filters( 'sportspress_localized_strings', array(
|
||||
'none' => __( 'None', 'sportspress' ),
|
||||
'remove_text' => __( '— Remove —', 'sportspress' ),
|
||||
'days' => __( 'days', 'sportspress' ),
|
||||
@@ -118,7 +118,7 @@ class SP_Admin_Assets {
|
||||
'mins' => __( 'mins', 'sportspress' ),
|
||||
'secs' => __( 'secs', 'sportspress' ),
|
||||
'displaying_posts' => html_entity_decode( __( 'Displaying %s–%s of %s', 'sportspress' ) ),
|
||||
);
|
||||
) );
|
||||
|
||||
// Localize scripts
|
||||
wp_localize_script( 'sportspress-admin', 'localized_strings', $strings );
|
||||
|
||||
Reference in New Issue
Block a user