Plugin Directory

Changeset 1570297


Ignore:
Timestamp:
01/07/2017 05:41:09 PM (9 years ago)
Author:
thinkatat
Message:

Localize backend.min.js

Location:
at-multiauthor/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • at-multiauthor/trunk/assets/js/backend.min.js

    r1566446 r1570297  
    11jQuery('#atmat-mb-multi-author').ready(function(){
    22    jQuery('#atmat-authors').select2({
    3         placeholder : 'Select Author(s)'
     3        placeholder : atmatStrings.placeholder
    44    });
    55});
  • at-multiauthor/trunk/includes/class-backend.php

    r1570252 r1570297  
    6060        wp_enqueue_script( 'atmat-select2-js' );
    6161        wp_enqueue_script( 'atmat-backend-js' );
     62        wp_localize_script(
     63            'atmat-backend-js',
     64            'atmatStrings',
     65            array(
     66                'placeholder' => __('Select Contributor(s)', 'at-multiauthor')
     67            )
     68        );
    6269        $authors = get_post_meta( $post->ID, 'atmat_authors', true );
    6370        $users = get_users(
Note: See TracChangeset for help on using the changeset viewer.