Plugin Directory

Changeset 1390536


Ignore:
Timestamp:
04/08/2016 08:52:48 PM (10 years ago)
Author:
bendoh
Message:

v2.4.3: Add localization domain and use 5.2-compatible self::

Location:
getty-images/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • getty-images/trunk/getty-images.php

    r1330834 r1390536  
    66Author: gettyImages
    77Author URI: http://gettyimages.com/
    8 Version: 2.4.2
     8Version: 2.4.3
    99*/
    1010
     
    369369        $this->ajax_check();
    370370
    371         if( !current_user_can( $this::capability ) ) {
     371        if( !current_user_can( self::capability ) ) {
    372372            $this->ajax_error( __( "User can not download images", 'getty-images' ) );
    373373        }
     
    458458            'post_type' => 'attachment',
    459459            'post_status' => 'any',
    460             'meta_key' => $this::getty_details_meta_key,
     460            'meta_key' => self::getty_details_meta_key,
    461461            'meta_value' => $getty_id,
    462462            'fields' => 'ids'
     
    469469        // Save the getty image details in post meta, but only sanitized top-level
    470470        // string values
    471         update_post_meta( $attachment->ID, $this::getty_details_meta_key, array_map( 'sanitize_text_field', array_filter( $_POST['meta'], 'is_string' ) ) );
     471        update_post_meta( $attachment->ID, self::getty_details_meta_key, array_map( 'sanitize_text_field', array_filter( $_POST['meta'], 'is_string' ) ) );
    472472
    473473        // Save the image ID in a separate meta key for serchability
    474         update_post_meta( $attachment->ID, $this::getty_imageid_meta_key, sanitize_text_field( $_POST['meta']['ImageId'] ) );
     474        update_post_meta( $attachment->ID, self::getty_imageid_meta_key, sanitize_text_field( $_POST['meta']['ImageId'] ) );
    475475
    476476        // Success! Forward new attachment_id back
     
    490490        $sizes = array();
    491491        $possible_sizes = apply_filters( 'image_size_names_choose', array(
    492             'thumbnail' => __('Thumbnail'),
    493             'medium'    => __('Medium'),
    494             'large'     => __('Large'),
    495             'full'      => __('Full Size'),
     492            'thumbnail' => __('Thumbnail', 'getty-images'),
     493            'medium'    => __('Medium', 'getty-images'),
     494            'large'     => __('Large', 'getty-images'),
     495            'full'      => __('Full Size', 'getty-images'),
    496496        ) );
    497497
     
    518518
    519519        // User should only be able to read the posts DB to see these details
    520         if( !current_user_can( $this::capability ) ) {
     520        if( !current_user_can( self::capability ) ) {
    521521            $this->ajax_error( __( "No access", 'getty-images' ) );
    522522        }
     
    535535        $posts = get_posts( array(
    536536            'post_type' => 'attachment',
    537             'meta_key' => $this::getty_imageid_meta_key,
     537            'meta_key' => self::getty_imageid_meta_key,
    538538            'meta_value' => $id,
    539539            'posts_per_page' => 1
  • getty-images/trunk/getty-templates.php

    r1163686 r1390536  
    135135
    136136        <# if ( data.buttons.close ) { #>
    137             <a class="close media-modal-icon" href="#" title="<?php esc_attr_e('Remove'); ?>"></a>
     137            <a class="close media-modal-icon" href="#" title="<?php esc_attr_e('Remove', 'getty-images'); ?>"></a>
    138138        <# } #>
    139139
    140140        <# if ( data.buttons.check ) { #>
    141             <a class="check" href="#" title="<?php esc_attr_e('Deselect'); ?>"><div class="media-modal-icon"></div></a>
     141            <a class="check" href="#" title="<?php esc_attr_e('Deselect', 'getty-images'); ?>"><div class="media-modal-icon"></div></a>
    142142        <# } #>
    143143    </div>
     
    353353    var attachment = data.attachment ? data.attachment.attributes : false; #>
    354354    <h3>
    355         <?php esc_html_e('Image Details'); ?>
     355        <?php esc_html_e('Image Details', 'getty-images'); ?>
    356356    </h3>
    357357
     
    371371    <div class="attachment-info">
    372372        <div class="setting align">
    373             <span><?php esc_html_e( 'Align' ); ?></span>
     373            <span><?php esc_html_e( 'Align', 'getty-images' ); ?></span>
    374374            <select data-setting="align" data-user-setting="getty_align">
    375375                <# _(gettyImages.text.alignments).each(function(text,value){ #>
     
    382382
    383383        <label class="setting">
    384             <span><?php esc_html_e('Size'); ?></span>
     384            <span><?php esc_html_e('Size', 'getty-images'); ?></span>
    385385        <# if (data.model.downloadingSizes) { #>
    386386            <em><?php esc_html_e( 'Downloading sizes...', 'getty-images' ); ?></em>
     
    398398    <# if(gettyImages.isWPcom || gettyImages.user.get('loggedIn')) { #>
    399399        <label class="setting alt-text">
    400             <span><?php esc_html_e('Alt Text'); ?></span>
     400            <span><?php esc_html_e('Alt Text', 'getty-images'); ?></span>
    401401            <input type="text" data-setting="alt" value="{{ data.model.alt }}" data-user-setting="getty_alt" />
    402402        </label>
    403403
    404404        <label class="setting caption">
    405             <span><?php esc_html_e('Caption'); ?></span>
     405            <span><?php esc_html_e('Caption', 'getty-images'); ?></span>
    406406            <textarea data-setting="caption">{{ data.model.caption }}</textarea>
    407407        </label>
     
    451451    ?></div>
    452452    <div class="getty-comp-buttons">
    453     <input type="button" class="button-primary" value="<?php esc_attr_e( "Agree" ); ?>" />
     453    <input type="button" class="button-primary" value="<?php esc_attr_e( "Agree", 'getty-images' ); ?>" />
    454454        &nbsp;
    455455        &nbsp;
  • getty-images/trunk/readme.txt

    r1330834 r1390536  
    44Requires at least: 3.9
    55Tested up to: 4.4.1
    6 Stable tag: 2.4.2
     6Stable tag: 2.4.3
    77License: GPLv2 or later
    88
     
    5050
    5151== Changelog ==
     52
     53= 2.4.3 =
     54* Changed static reference syntax to use self:: instead of $this for PHP 5.2 compatibility.
     55* Added text domains to localization functions.
    5256
    5357= 2.4.2 =
Note: See TracChangeset for help on using the changeset viewer.