Changeset 1390536
- Timestamp:
- 04/08/2016 08:52:48 PM (10 years ago)
- Location:
- getty-images/trunk
- Files:
-
- 3 edited
-
getty-images.php (modified) (7 diffs)
-
getty-templates.php (modified) (6 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
getty-images/trunk/getty-images.php
r1330834 r1390536 6 6 Author: gettyImages 7 7 Author URI: http://gettyimages.com/ 8 Version: 2.4. 28 Version: 2.4.3 9 9 */ 10 10 … … 369 369 $this->ajax_check(); 370 370 371 if( !current_user_can( $this::capability ) ) {371 if( !current_user_can( self::capability ) ) { 372 372 $this->ajax_error( __( "User can not download images", 'getty-images' ) ); 373 373 } … … 458 458 'post_type' => 'attachment', 459 459 'post_status' => 'any', 460 'meta_key' => $this::getty_details_meta_key,460 'meta_key' => self::getty_details_meta_key, 461 461 'meta_value' => $getty_id, 462 462 'fields' => 'ids' … … 469 469 // Save the getty image details in post meta, but only sanitized top-level 470 470 // 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' ) ) ); 472 472 473 473 // 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'] ) ); 475 475 476 476 // Success! Forward new attachment_id back … … 490 490 $sizes = array(); 491 491 $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'), 496 496 ) ); 497 497 … … 518 518 519 519 // 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 ) ) { 521 521 $this->ajax_error( __( "No access", 'getty-images' ) ); 522 522 } … … 535 535 $posts = get_posts( array( 536 536 'post_type' => 'attachment', 537 'meta_key' => $this::getty_imageid_meta_key,537 'meta_key' => self::getty_imageid_meta_key, 538 538 'meta_value' => $id, 539 539 'posts_per_page' => 1 -
getty-images/trunk/getty-templates.php
r1163686 r1390536 135 135 136 136 <# 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> 138 138 <# } #> 139 139 140 140 <# 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> 142 142 <# } #> 143 143 </div> … … 353 353 var attachment = data.attachment ? data.attachment.attributes : false; #> 354 354 <h3> 355 <?php esc_html_e('Image Details' ); ?>355 <?php esc_html_e('Image Details', 'getty-images'); ?> 356 356 </h3> 357 357 … … 371 371 <div class="attachment-info"> 372 372 <div class="setting align"> 373 <span><?php esc_html_e( 'Align' ); ?></span>373 <span><?php esc_html_e( 'Align', 'getty-images' ); ?></span> 374 374 <select data-setting="align" data-user-setting="getty_align"> 375 375 <# _(gettyImages.text.alignments).each(function(text,value){ #> … … 382 382 383 383 <label class="setting"> 384 <span><?php esc_html_e('Size' ); ?></span>384 <span><?php esc_html_e('Size', 'getty-images'); ?></span> 385 385 <# if (data.model.downloadingSizes) { #> 386 386 <em><?php esc_html_e( 'Downloading sizes...', 'getty-images' ); ?></em> … … 398 398 <# if(gettyImages.isWPcom || gettyImages.user.get('loggedIn')) { #> 399 399 <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> 401 401 <input type="text" data-setting="alt" value="{{ data.model.alt }}" data-user-setting="getty_alt" /> 402 402 </label> 403 403 404 404 <label class="setting caption"> 405 <span><?php esc_html_e('Caption' ); ?></span>405 <span><?php esc_html_e('Caption', 'getty-images'); ?></span> 406 406 <textarea data-setting="caption">{{ data.model.caption }}</textarea> 407 407 </label> … … 451 451 ?></div> 452 452 <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' ); ?>" /> 454 454 455 455 -
getty-images/trunk/readme.txt
r1330834 r1390536 4 4 Requires at least: 3.9 5 5 Tested up to: 4.4.1 6 Stable tag: 2.4. 26 Stable tag: 2.4.3 7 7 License: GPLv2 or later 8 8 … … 50 50 51 51 == 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. 52 56 53 57 = 2.4.2 =
Note: See TracChangeset
for help on using the changeset viewer.