Version Description
- Fix: PHP "Fatal error: Call to undefined function get_current_screen ()" has been fixed.
- Fix: Enhanced taxonomy support for drag & drop file uploads has been restored.
- Fix: JavaScript "undefined or null object" reference when all Media Manager toolbar enhancements are disabled has been fixed.
Download this release
Release Info
Developer | dglingren |
Plugin | Media Library Assistant |
Version | 1.92 |
Comparing to | |
See all releases |
Code changes from version 1.91 to 1.92
- includes/class-mla-main.php +1 -1
- includes/class-mla-media-modal.php +55 -44
- index.php +2 -2
- js/mla-media-modal-scripts.js +14 -9
- js/mla-media-modal-scripts.min.js +1 -1
- readme.txt +10 -5
includes/class-mla-main.php
CHANGED
@@ -29,7 +29,7 @@ class MLA {
|
|
29 |
*
|
30 |
* @var string
|
31 |
*/
|
32 |
-
const CURRENT_MLA_VERSION = '1.
|
33 |
|
34 |
/**
|
35 |
* Slug for registering and enqueueing plugin style sheet
|
29 |
*
|
30 |
* @var string
|
31 |
*/
|
32 |
+
const CURRENT_MLA_VERSION = '1.92';
|
33 |
|
34 |
/**
|
35 |
* Slug for registering and enqueueing plugin style sheet
|
includes/class-mla-media-modal.php
CHANGED
@@ -174,7 +174,8 @@ class MLAModal {
|
|
174 |
* For the non-Modal Media/Edit Media screen, the MLAEdit::mla_add_meta_boxes_action
|
175 |
* function changes the default meta box to the MLA searchable meta box.
|
176 |
*/
|
177 |
-
if ( self::$mla_query_attachments ) {
|
|
|
178 |
foreach ( get_taxonomies( array ( 'show_ui' => true ), 'objects' ) as $key => $value ) {
|
179 |
if ( MLAOptions::mla_taxonomy_support( $key ) ) {
|
180 |
if ( isset( $form_fields[ $key ] ) ) {
|
@@ -346,6 +347,7 @@ class MLAModal {
|
|
346 |
* @var array
|
347 |
*/
|
348 |
private static $mla_media_modal_settings = array(
|
|
|
349 |
'ajaxNonce' => '',
|
350 |
'ajaxFillCompatAction' => self::JAVASCRIPT_FILL_COMPAT_ACTION,
|
351 |
'ajaxQueryAttachmentsAction' => self::JAVASCRIPT_QUERY_ATTACHMENTS_ACTION,
|
@@ -388,17 +390,20 @@ class MLAModal {
|
|
388 |
* @return array updated $settings array
|
389 |
*/
|
390 |
public static function mla_media_view_settings_filter( $settings, $post ) {
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
|
|
|
|
400 |
}
|
401 |
|
|
|
402 |
self::$mla_media_modal_settings['ajaxNonce'] = wp_create_nonce( MLA::MLA_ADMIN_NONCE );
|
403 |
self::$mla_media_modal_settings['mimeTypes'] = MLAMime::mla_pluck_table_views();
|
404 |
self::$mla_media_modal_settings['mimeTypes']['detached'] = MLAOptions::$mla_option_definitions[ MLAOptions::MLA_POST_MIME_TYPES ]['std']['unattached']['plural'];
|
@@ -469,17 +474,19 @@ class MLAModal {
|
|
469 |
* @return array updated $strings array
|
470 |
*/
|
471 |
public static function mla_media_view_strings_filter( $strings, $post ) {
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
|
|
|
|
481 |
}
|
482 |
-
|
483 |
$mla_strings = array(
|
484 |
'searchBoxPlaceholder' => __( 'Search Box', 'media-library-assistant' ),
|
485 |
'loadingText' => __( 'Loading...', 'media-library-assistant' ),
|
@@ -499,17 +506,19 @@ class MLAModal {
|
|
499 |
* @return void
|
500 |
*/
|
501 |
public static function mla_wp_enqueue_media_action( ) {
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
|
|
|
|
511 |
}
|
512 |
-
|
513 |
$suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
|
514 |
|
515 |
wp_register_style( self::JAVASCRIPT_MEDIA_MODAL_STYLES, MLA_PLUGIN_URL . 'css/mla-media-modal-style.css', false, MLA::CURRENT_MLA_VERSION );
|
@@ -531,21 +540,23 @@ class MLAModal {
|
|
531 |
* @return void echoes HTML script tags for the templates
|
532 |
*/
|
533 |
public static function mla_print_media_templates_action( ) {
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
|
|
|
|
547 |
}
|
548 |
-
|
549 |
/*
|
550 |
* Compose the Search Media box
|
551 |
*/
|
174 |
* For the non-Modal Media/Edit Media screen, the MLAEdit::mla_add_meta_boxes_action
|
175 |
* function changes the default meta box to the MLA searchable meta box.
|
176 |
*/
|
177 |
+
// if ( self::$mla_query_attachments ) {
|
178 |
+
if ( isset( self::$media_item_args['in_modal'] ) && self::$media_item_args['in_modal'] ) {
|
179 |
foreach ( get_taxonomies( array ( 'show_ui' => true ), 'objects' ) as $key => $value ) {
|
180 |
if ( MLAOptions::mla_taxonomy_support( $key ) ) {
|
181 |
if ( isset( $form_fields[ $key ] ) ) {
|
347 |
* @var array
|
348 |
*/
|
349 |
private static $mla_media_modal_settings = array(
|
350 |
+
'comma' => ',',
|
351 |
'ajaxNonce' => '',
|
352 |
'ajaxFillCompatAction' => self::JAVASCRIPT_FILL_COMPAT_ACTION,
|
353 |
'ajaxQueryAttachmentsAction' => self::JAVASCRIPT_QUERY_ATTACHMENTS_ACTION,
|
390 |
* @return array updated $settings array
|
391 |
*/
|
392 |
public static function mla_media_view_settings_filter( $settings, $post ) {
|
393 |
+
if ( function_exists( 'get_current_screen' ) ) {
|
394 |
+
$screen = get_current_screen();
|
395 |
+
|
396 |
+
/*
|
397 |
+
* WordPress 4.0 adds the "grid view" to the Media/Library screen, and we don't want
|
398 |
+
* to add our functionality to that screen.
|
399 |
+
*/
|
400 |
+
if ( 'upload' == $screen->base ) {
|
401 |
+
//if ( 'edit' != $screen->parent_base ) {
|
402 |
+
return $settings;
|
403 |
+
}
|
404 |
}
|
405 |
|
406 |
+
self::$mla_media_modal_settings['comma'] = _x( ',', 'tag delimiter' );
|
407 |
self::$mla_media_modal_settings['ajaxNonce'] = wp_create_nonce( MLA::MLA_ADMIN_NONCE );
|
408 |
self::$mla_media_modal_settings['mimeTypes'] = MLAMime::mla_pluck_table_views();
|
409 |
self::$mla_media_modal_settings['mimeTypes']['detached'] = MLAOptions::$mla_option_definitions[ MLAOptions::MLA_POST_MIME_TYPES ]['std']['unattached']['plural'];
|
474 |
* @return array updated $strings array
|
475 |
*/
|
476 |
public static function mla_media_view_strings_filter( $strings, $post ) {
|
477 |
+
if ( function_exists( 'get_current_screen' ) ) {
|
478 |
+
$screen = get_current_screen();
|
479 |
+
|
480 |
+
/*
|
481 |
+
* WordPress 4.0 adds the "grid view" to the Media/Library screen, and we don't want
|
482 |
+
* to add our functionality to that screen.
|
483 |
+
*/
|
484 |
+
if ( 'upload' == $screen->base ) {
|
485 |
+
//if ( 'edit' != $screen->parent_base ) {
|
486 |
+
return $strings;
|
487 |
+
}
|
488 |
}
|
489 |
+
|
490 |
$mla_strings = array(
|
491 |
'searchBoxPlaceholder' => __( 'Search Box', 'media-library-assistant' ),
|
492 |
'loadingText' => __( 'Loading...', 'media-library-assistant' ),
|
506 |
* @return void
|
507 |
*/
|
508 |
public static function mla_wp_enqueue_media_action( ) {
|
509 |
+
if ( function_exists( 'get_current_screen' ) ) {
|
510 |
+
$screen = get_current_screen();
|
511 |
+
|
512 |
+
/*
|
513 |
+
* WordPress 4.0 adds the "grid view" to the Media/Library screen, and we don't want
|
514 |
+
* to add our functionality to that screen.
|
515 |
+
*/
|
516 |
+
if ( 'upload' == $screen->base ) {
|
517 |
+
//if ( 'edit' != $screen->parent_base ) {
|
518 |
+
return;
|
519 |
+
}
|
520 |
}
|
521 |
+
|
522 |
$suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
|
523 |
|
524 |
wp_register_style( self::JAVASCRIPT_MEDIA_MODAL_STYLES, MLA_PLUGIN_URL . 'css/mla-media-modal-style.css', false, MLA::CURRENT_MLA_VERSION );
|
540 |
* @return void echoes HTML script tags for the templates
|
541 |
*/
|
542 |
public static function mla_print_media_templates_action( ) {
|
543 |
+
if ( function_exists( 'get_current_screen' ) ) {
|
544 |
+
$screen = get_current_screen();
|
545 |
+
//cause_an_error();
|
546 |
+
//$cause_notice = $screen->bad_property;
|
547 |
+
//trigger_error( 'mla_print_media_templates_action', E_USER_WARNING );
|
548 |
+
//error_log( 'xdebug_get_function_stack = ' . var_export( xdebug_get_function_stack(), true), 0 );
|
549 |
+
|
550 |
+
/*
|
551 |
+
* WordPress 4.0 adds the "grid view" to the Media/Library screen, and we don't want
|
552 |
+
* to add our functionality to that screen.
|
553 |
+
*/
|
554 |
+
if ( 'upload' == $screen->base ) {
|
555 |
+
//if ( 'edit' != $screen->parent_base ) {
|
556 |
+
return;
|
557 |
+
}
|
558 |
}
|
559 |
+
|
560 |
/*
|
561 |
* Compose the Search Media box
|
562 |
*/
|
index.php
CHANGED
@@ -6,7 +6,7 @@
|
|
6 |
* will the rest of the plugin be loaded and run.
|
7 |
*
|
8 |
* @package Media Library Assistant
|
9 |
-
* @version 1.
|
10 |
*/
|
11 |
|
12 |
/*
|
@@ -16,7 +16,7 @@ Description: Enhances the Media Library; powerful[mla_gallery], taxonomy support
|
|
16 |
Author: David Lingren
|
17 |
Text Domain: media-library-assistant
|
18 |
Domain Path: /languages
|
19 |
-
Version: 1.
|
20 |
Author URI: http://fairtradejudaica.org/our-story/staff/
|
21 |
|
22 |
Copyright 2011-2014 David Lingren
|
6 |
* will the rest of the plugin be loaded and run.
|
7 |
*
|
8 |
* @package Media Library Assistant
|
9 |
+
* @version 1.92
|
10 |
*/
|
11 |
|
12 |
/*
|
16 |
Author: David Lingren
|
17 |
Text Domain: media-library-assistant
|
18 |
Domain Path: /languages
|
19 |
+
Version: 1.92
|
20 |
Author URI: http://fairtradejudaica.org/our-story/staff/
|
21 |
|
22 |
Copyright 2011-2014 David Lingren
|
js/mla-media-modal-scripts.js
CHANGED
@@ -669,7 +669,7 @@ wp.media.frame.on( 'all', mediaFrameOn );
|
|
669 |
var arrayOut = [], isString = ( 'string' === typeof arrayIn );
|
670 |
|
671 |
if( isString ) {
|
672 |
-
arrayIn = arrayIn.split(
|
673 |
}
|
674 |
|
675 |
jQuery.each( arrayIn, function( key, val ) {
|
@@ -684,7 +684,7 @@ wp.media.frame.on( 'all', mediaFrameOn );
|
|
684 |
arrayOut.sort();
|
685 |
|
686 |
if( isString ) {
|
687 |
-
arrayOut = arrayOut.join(
|
688 |
}
|
689 |
|
690 |
return arrayOut;
|
@@ -710,7 +710,7 @@ wp.media.frame.on( 'all', mediaFrameOn );
|
|
710 |
* Remove duplicate commas and whitespace from a string containing a tag list
|
711 |
*/
|
712 |
cleanTags : function( tags ) {
|
713 |
-
var comma =
|
714 |
if ( ',' !== comma ) {
|
715 |
tags = tags.replace( new RegExp( comma, 'g' ), ',' );
|
716 |
}
|
@@ -730,7 +730,7 @@ wp.media.frame.on( 'all', mediaFrameOn );
|
|
730 |
parseTags : function( el ) {
|
731 |
var id = el.id, num = id.split( '-check-num-' )[1],
|
732 |
tagsDiv = $( el ).closest( '.tagsdiv' ),
|
733 |
-
thetags = tagsDiv.find( '.the-tags' ), comma =
|
734 |
current_tags = thetags.val().split( comma ), new_tags = [];
|
735 |
|
736 |
delete current_tags[ num ];
|
@@ -764,7 +764,7 @@ wp.media.frame.on( 'all', mediaFrameOn );
|
|
764 |
|
765 |
disabled = thetags.prop( 'disabled' );
|
766 |
|
767 |
-
current_tags = thetags.val().split(
|
768 |
tagchecklist.empty();
|
769 |
|
770 |
$.each( current_tags, function( key, val ) {
|
@@ -798,7 +798,7 @@ wp.media.frame.on( 'all', mediaFrameOn );
|
|
798 |
var tagsval, newtags, text,
|
799 |
tags = $( '.the-tags', tagsDiv ),
|
800 |
newtag = $( 'input.newtag', tagsDiv ),
|
801 |
-
comma =
|
802 |
|
803 |
a = a || false;
|
804 |
|
@@ -862,7 +862,7 @@ wp.media.frame.on( 'all', mediaFrameOn );
|
|
862 |
return false;
|
863 |
}
|
864 |
}).each( function(){
|
865 |
-
$( this ).suggest( ajaxurl + '?action=ajax-tag-search&tax=' + taxonomy, { delay: 500, resultsClass: 'mla_ac_results', selectClass: 'mla_ac_over', matchClass: 'mla_ac_match', minchars: 2, multiple: true, multipleSep:
|
866 |
});
|
867 |
|
868 |
// get the tag cloud on first click, then toggle visibility
|
@@ -901,7 +901,10 @@ wp.media.frame.on( 'all', mediaFrameOn );
|
|
901 |
|
902 |
for ( taxonomy in results ) {
|
903 |
if ( 'object' === typeof( results[ taxonomy][ 'object-terms' ] ) ) {
|
904 |
-
mlaModal.utility.mlaAttachmentsBrowser
|
|
|
|
|
|
|
905 |
delete results[ taxonomy][ 'object-terms' ];
|
906 |
}
|
907 |
|
@@ -1238,7 +1241,9 @@ wp.media.frame.on( 'all', mediaFrameOn );
|
|
1238 |
if ( 'undefined' != s.parsed.responses[0] && ( sup = s.parsed.responses[0].supplemental.newcat_parent ) ) {
|
1239 |
drop.before( sup );
|
1240 |
drop.remove();
|
1241 |
-
mlaModal.utility.mlaAttachmentsBrowser
|
|
|
|
|
1242 |
}
|
1243 |
};
|
1244 |
|
669 |
var arrayOut = [], isString = ( 'string' === typeof arrayIn );
|
670 |
|
671 |
if( isString ) {
|
672 |
+
arrayIn = arrayIn.split( mlaModal.settings.comma );
|
673 |
}
|
674 |
|
675 |
jQuery.each( arrayIn, function( key, val ) {
|
684 |
arrayOut.sort();
|
685 |
|
686 |
if( isString ) {
|
687 |
+
arrayOut = arrayOut.join( mlaModal.settings.comma );
|
688 |
}
|
689 |
|
690 |
return arrayOut;
|
710 |
* Remove duplicate commas and whitespace from a string containing a tag list
|
711 |
*/
|
712 |
cleanTags : function( tags ) {
|
713 |
+
var comma = mlaModal.settings.comma;
|
714 |
if ( ',' !== comma ) {
|
715 |
tags = tags.replace( new RegExp( comma, 'g' ), ',' );
|
716 |
}
|
730 |
parseTags : function( el ) {
|
731 |
var id = el.id, num = id.split( '-check-num-' )[1],
|
732 |
tagsDiv = $( el ).closest( '.tagsdiv' ),
|
733 |
+
thetags = tagsDiv.find( '.the-tags' ), comma = mlaModal.settings.comma,
|
734 |
current_tags = thetags.val().split( comma ), new_tags = [];
|
735 |
|
736 |
delete current_tags[ num ];
|
764 |
|
765 |
disabled = thetags.prop( 'disabled' );
|
766 |
|
767 |
+
current_tags = thetags.val().split( mlaModal.settings.comma );
|
768 |
tagchecklist.empty();
|
769 |
|
770 |
$.each( current_tags, function( key, val ) {
|
798 |
var tagsval, newtags, text,
|
799 |
tags = $( '.the-tags', tagsDiv ),
|
800 |
newtag = $( 'input.newtag', tagsDiv ),
|
801 |
+
comma = mlaModal.settings.comma;
|
802 |
|
803 |
a = a || false;
|
804 |
|
862 |
return false;
|
863 |
}
|
864 |
}).each( function(){
|
865 |
+
$( this ).suggest( ajaxurl + '?action=ajax-tag-search&tax=' + taxonomy, { delay: 500, resultsClass: 'mla_ac_results', selectClass: 'mla_ac_over', matchClass: 'mla_ac_match', minchars: 2, multiple: true, multipleSep: mlaModal.settings.comma + ' ' } );
|
866 |
});
|
867 |
|
868 |
// get the tag cloud on first click, then toggle visibility
|
901 |
|
902 |
for ( taxonomy in results ) {
|
903 |
if ( 'object' === typeof( results[ taxonomy][ 'object-terms' ] ) ) {
|
904 |
+
if ( null !== mlaModal.utility.mlaAttachmentsBrowser ) {
|
905 |
+
mlaModal.utility.mlaAttachmentsBrowser.updateFilters( taxonomy, results[ taxonomy][ 'object-terms' ] );
|
906 |
+
}
|
907 |
+
|
908 |
delete results[ taxonomy][ 'object-terms' ];
|
909 |
}
|
910 |
|
1241 |
if ( 'undefined' != s.parsed.responses[0] && ( sup = s.parsed.responses[0].supplemental.newcat_parent ) ) {
|
1242 |
drop.before( sup );
|
1243 |
drop.remove();
|
1244 |
+
if ( null !== mlaModal.utility.mlaAttachmentsBrowser ) {
|
1245 |
+
mlaModal.utility.mlaAttachmentsBrowser.updateFilters( taxonomy, sup );
|
1246 |
+
}
|
1247 |
}
|
1248 |
};
|
1249 |
|
js/mla-media-modal-scripts.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
var mlaModal={strings:{},settings:{},initialHTML:{},uploading:false,cid:null,utility:{originalMediaAjax:null,mlaAttachmentsBrowser:null,parseTermsOptions:null,arrayCleanup:null,parseTaxonomyId:null,hookCompatTaxonomies:null,fillCompatTaxonomies:null,supportCompatTaxonomies:null},tagBox:null};(function(a){mlaModal.utility.originalMediaAjax=wp.media.ajax;wp.media.ajax=function(c,b){if(_.isObject(c)){b=c}else{b=b||{};b.data=_.extend(b.data||{},{action:c})}if("query-attachments"==b.data.action){stype=typeof b.data.query.s;if("object"==stype){s=b.data.query.s}else{if("string"==stype){s={mla_search_value:b.data.query.s}}else{s={}}}if("undefined"!=typeof b.data.query.post_mime_type){mlaModal.settings.filterMime=b.data.query.post_mime_type}else{mlaModal.settings.filterMime="all"}if("undefined"!=typeof s.mla_filter_month){mlaModal.settings.filterMonth=s.mla_filter_month}if("undefined"!=typeof s.mla_filter_term){mlaModal.settings.filterTerm=s.mla_filter_term}if("undefined"!=typeof s.mla_search_value){mlaModal.settings.searchValue=s.mla_search_value}searchValues={mla_filter_month:mlaModal.settings.filterMonth,mla_filter_term:mlaModal.settings.filterTerm,mla_terms_search:mlaModal.settings.termsSearch,mla_search_clicks:mlaModal.settings.searchClicks,mla_search_value:mlaModal.settings.searchValue,mla_search_fields:mlaModal.settings.searchFields,mla_search_connector:mlaModal.settings.searchConnector};mlaModal.settings.termsSearch="";a("#mla-terms-search-input").html("").val("");b.data.query.s=searchValues}return mlaModal.utility.originalMediaAjax.call(this,b)};mlaModal.strings=typeof wp.media.view.l10n.mla_strings==="undefined"?{}:wp.media.view.l10n.mla_strings;delete wp.media.view.l10n.mla_strings;mlaModal.settings=typeof wp.media.view.settings.mla_settings==="undefined"?{}:wp.media.view.settings.mla_settings;delete wp.media.view.settings.mla_settings;if(mlaModal.settings.enableMimeTypes){wp.media.view.AttachmentFilters.Mla=wp.media.view.AttachmentFilters.extend({createFilters:function(){var b={};_.each(mlaModal.settings.mimeTypes||{},function(d,c){b[c]={text:d,props:{type:c,uploadedTo:null,orderby:"date",order:"DESC"}}});b.all={text:wp.media.view.l10n.allMediaItems,props:{type:null,uploadedTo:null,orderby:"date",order:"DESC"},priority:10};b.uploaded={text:wp.media.view.l10n.uploadedToThisPost,props:{type:null,uploadedTo:wp.media.view.settings.post.id,orderby:"menuOrder",order:"ASC"},priority:20};this.filters=b;if((mlaModal.settings.filterMime!="all")&&("undefined"!==typeof b[mlaModal.settings.filterMime])){this.model.set(b[mlaModal.settings.filterMime].props,{silent:false})}},change:function(){var b=this.filters[this.el.value];if(b){this.model.set(b.props,{silent:true});a("#mla-search-submit").click()}}})}if(mlaModal.settings.enableMonthsDropdown){wp.media.view.AttachmentFilters.MlaMonths=wp.media.view.AttachmentFilters.extend({className:"attachment-months",createFilters:function(){var b={};_.each(mlaModal.settings.months||{},function(d,c){b[c]={text:d,props:{s:{mla_filter_month:c}}}});this.filters=b;if((mlaModal.settings.filterMonth>0)&&("undefined"!==typeof b[mlaModal.settings.filterMonth])){if(mlaModal.settings.filterMonth>0){this.model.set(b[mlaModal.settings.filterMonth].props,{silent:false})}}},select:function(){var b=this.model,d=mlaModal.settings.filterMonth,c=b.toJSON();if(_.isUndefined(c.s)){c.s={}}if("string"==typeof c.search){mlaModal.settings.searchValue=c.search}if(_.isUndefined(c.s.mla_filter_month)){c.s.mla_filter_month=mlaModal.settings.filterMonth}else{mlaModal.settings.filterMonth=c.s.mla_filter_month}_.find(this.filters,function(f,g){var e=_.all(f.props,function(i,h){return i.mla_filter_month==mlaModal.settings.filterMonth});if(e){return d=g}});this.$el.val(d)},change:function(){var b=this.filters[this.el.value];if(b){this.model.set(b.props);a("#mla-search-submit").click()}}})}if(mlaModal.settings.enableTermsDropdown){wp.media.view.AttachmentFilters.MlaTerms=wp.media.view.AttachmentFilters.extend({className:"attachment-terms",createFilters:function(){var b={};_.each(mlaModal.settings.termsText||{},function(d,c){b[c]={text:d,props:{s:{mla_filter_term:parseInt(mlaModal.settings.termsValue[c])}}}});this.filters=b;index=_.indexOf(mlaModal.settings.termsValue,mlaModal.settings.filterTerm);if(index>0){this.model.set(b[index].props,{silent:false})}},select:function(){var b=this.model,d=mlaModal.settings.filterTerm,c=b.toJSON();if(_.isUndefined(c.s)){c.s={}}if("string"==typeof c.search){mlaModal.settings.searchValue=c.search}if(_.isUndefined(c.s.mla_filter_term)){c.s.mla_filter_term=mlaModal.settings.filterTerm}else{mlaModal.settings.filterTerm=c.s.mla_filter_term}_.find(this.filters,function(f,g){var e=_.all(f.props,function(i,h){return i.mla_filter_term==mlaModal.settings.filterTerm});if(e){return d=g}});this.$el.val(d)},change:function(){var b=this.filters[this.el.value];if(b){this.model.set(b.props);a("#mla-search-submit").click()}}})}if(mlaModal.settings.enableTermsSearch){wp.media.view.MlaTermsSearch=wp.media.View.extend({tagName:"span",className:"mla-terms-search",template:wp.media.template("mla-terms-search-button"),attributes:{type:"mla-terms-search-button"},events:{change:"termsSearchOpen",click:"termsSearchOpen",},render:function(){this.$el.html(this.template(mlaModal.strings));return this},termsSearchOpen:function(b){if(("click"==b.type)&&("mla_terms_search"===b.target.name)){mlaTaxonomy.termsSearch.open();a("#mla-terms-search-form").off("submit");a("#mla-terms-search-form").submit(function(g){var c,f,d={phrases:"",taxonomies:[]};g.preventDefault();c=a("#mla-terms-search-form").serializeArray();for(f=0;f<c.length;f++){switch(c[f].name){case"mla_terms_search[phrases]":d.phrases=c[f].value;break;case"mla_terms_search[radio_phrases]":d.radio_phrases=c[f].value;break;case"mla_terms_search[radio_terms]":d.radio_terms=c[f].value;break;case"mla_terms_search[taxonomies][]":d.taxonomies[d.taxonomies.length]=c[f].value;break}}mlaModal.settings.termsSearch=d;a("#mla-search-submit").click();return false});a("#mla-terms-search-input").keypress(function(c){if(13==c.which){c.preventDefault();a("#mla-terms-search-submit").click()}})}}})}if(mlaModal.settings.enableSearchBox){wp.media.view.MlaSearch=wp.media.View.extend({tagName:"div",className:"mla-search-box",template:wp.media.template("mla-search-box"),attributes:{type:"mla-search-box"},events:{change:"search",click:"search",search:"search",MlaSearch:"search"},render:function(){this.$el.html(this.template(mlaModal.strings));return this},search:function(b){if(("click"==b.type)&&("mla_search_submit"!=b.target.name)){return}switch(b.target.name){case"s[mla_search_value]":mlaModal.settings.searchValue=b.target.value;break;case"mla_search_submit":searchValues={mla_filter_month:mlaModal.settings.filterMonth,mla_filter_term:mlaModal.settings.filterTerm,mla_terms_search:mlaModal.settings.termsSearch,mla_search_clicks:mlaModal.settings.searchClicks++,mla_search_value:mlaModal.settings.searchValue,mla_search_fields:mlaModal.settings.searchFields,mla_search_connector:mlaModal.settings.searchConnector};this.model.set({s:searchValues});break;case"s[mla_search_connector]":mlaModal.settings.searchConnector=b.target.value;break;case"s[mla_search_title]":index=mlaModal.settings.searchFields.indexOf("title");if(-1==index){mlaModal.settings.searchFields.push("title")}else{mlaModal.settings.searchFields.splice(index,1)}break;case"s[mla_search_name]":index=mlaModal.settings.searchFields.indexOf("name");if(-1==index){mlaModal.settings.searchFields.push("name")}else{mlaModal.settings.searchFields.splice(index,1)}break;case"s[mla_search_alt_text]":index=mlaModal.settings.searchFields.indexOf("alt-text");if(-1==index){mlaModal.settings.searchFields.push("alt-text")}else{mlaModal.settings.searchFields.splice(index,1)}break;case"s[mla_search_excerpt]":index=mlaModal.settings.searchFields.indexOf("excerpt");if(-1==index){mlaModal.settings.searchFields.push("excerpt")}else{mlaModal.settings.searchFields.splice(index,1)}break;case"s[mla_search_content]":index=mlaModal.settings.searchFields.indexOf("content");if(-1==index){mlaModal.settings.searchFields.push("content")}else{mlaModal.settings.searchFields.splice(index,1)}break;case"s[mla_search_terms]":index=mlaModal.settings.searchFields.indexOf("terms");if(-1==index){mlaModal.settings.searchFields.push("terms")}else{mlaModal.settings.searchFields.splice(index,1)}break}}})}if(mlaModal.settings.enableMimeTypes||mlaModal.settings.enableMonthsDropdown||mlaModal.settings.enableTermsDropdown||mlaModal.settings.enableTermsSearch||mlaModal.settings.enableSearchBox){wp.media.view.AttachmentsBrowser=wp.media.view.AttachmentsBrowser.extend({createToolbar:function(){var b;wp.media.view.AttachmentsBrowser.__super__.createToolbar.apply(this,arguments);mlaModal.utility.mlaAttachmentsBrowser=this;b=this.options.filters;if(("all"===b)&&mlaModal.settings.enableMimeTypes){this.toolbar.unset("filters",{silent:true});this.toolbar.set("filters",new wp.media.view.AttachmentFilters.Mla({controller:this.controller,model:this.collection.props,priority:-80}).render())}if(this.options.search&&mlaModal.settings.enableMonthsDropdown){this.toolbar.set("months",new wp.media.view.AttachmentFilters.MlaMonths({controller:this.controller,model:this.collection.props,priority:-80}).render())}if(this.options.search&&mlaModal.settings.enableTermsDropdown){this.toolbar.set("terms",new wp.media.view.AttachmentFilters.MlaTerms({controller:this.controller,model:this.collection.props,priority:-80}).render())}if(this.options.search&&mlaModal.settings.enableTermsSearch){this.toolbar.set("termsSearch",new wp.media.view.MlaTermsSearch({controller:this.controller,model:this.collection.props,priority:-80}).render())}if(this.options.search){if(mlaModal.settings.enableSearchBox){this.toolbar.unset("search",{silent:true});this.toolbar.set("MlaSearch",new wp.media.view.MlaSearch({controller:this.controller,model:this.collection.props,priority:60}).render())}}},updateFilters:function(b,c){var d={};if(this.options.search&&mlaModal.settings.enableTermsDropdown&&mlaModal.settings.termsTaxonomy==b){d=mlaModal.utility.parseTermsOptions(c);mlaModal.settings.termsClass=d.termsClass;mlaModal.settings.termsText=d.termsText;mlaModal.settings.termsValue=d.termsValue;this.toolbar.unset("terms",{silent:true});this.toolbar.set("terms",new wp.media.view.AttachmentFilters.MlaTerms({controller:this.controller,model:this.collection.props,priority:-80}).render())}}})}mlaModal.utility.parseTermsOptions=function(h){var g={termsClass:[mlaModal.settings.termsClass[0],mlaModal.settings.termsClass[1]],termsText:[mlaModal.settings.termsText[0],mlaModal.settings.termsText[1]],termsValue:[mlaModal.settings.termsValue[0],mlaModal.settings.termsValue[1]]},d=2,b,c,f=/\<option(( class=\"([^\"]+)\" )|( ))value=((\'([^\']+)\')|(\"([^\"]+)\"))([^\>]*)\>([^\<]*)\<.*/g,e=[];if("object"===typeof h){d=mlaModal.settings.termsValue.length;for(b=2;b<d;b++){e[b]={termsClass:mlaModal.settings.termsClass[b],termsText:mlaModal.settings.termsText[b],termsValue:mlaModal.settings.termsValue[b]};if("undefined"!==typeof h[mlaModal.settings.termsValue[b]]){delete h[mlaModal.settings.termsValue[b]]}}for(c in h){e[b++]={termsClass:"level-0",termsText:h[c],termsValue:c.toString()}}if(d===b){return{termsClass:mlaModal.settings.termsClass,termsText:mlaModal.settings.termsText,termsValue:mlaModal.settings.termsValue}}e.sort(function(j,i){if(j.termsText>i.termsText){return 1}else{if(j.termsText<i.termsText){return -1}else{return 0}}});b=2;for(c in e){g.termsClass[b]=e[c].termsClass;g.termsText[b]=e[c].termsText;g.termsValue[b++]=e[c].termsValue}return g}e=f.exec(h);while(null!==(e=f.exec(h))){g.termsClass[d]=e[3];g.termsValue[d]=("undefined"===typeof e[6])?e[9]:e[7];g.termsText[d++]=e[11].replace(" ",mlaModal.settings.termsIndent)}return g};mlaModal.utility.arrayCleanup=function(d){var c=[],b=("string"===typeof d);if(b){d=d.split(postL10n.comma)}jQuery.each(d,function(e,f){f=jQuery.trim(f);if(f&&jQuery.inArray(f,c)==-1){c.push(f)}});c.sort();if(b){c=c.join(postL10n.comma)}return c};mlaModal.utility.parseTaxonomyId=function(c){var b=c.split("-");b.shift();b.shift();return b.join("-")};mlaModal.tagBox={cleanTags:function(c){var b=postL10n.comma;if(","!==b){c=c.replace(new RegExp(b,"g"),",")}c=c.replace(/\s*,\s*/g,",").replace(/,+/g,",").replace(/[,\s]+$/,"").replace(/^[,\s]+/,"");if(","!==b){c=c.replace(/,/g,b)}return c},parseTags:function(e){var i=e.id,c=i.split("-check-num-")[1],f=a(e).closest(".tagsdiv"),h=f.find(".the-tags"),b=postL10n.comma,d=h.val().split(b),g=[];delete d[c];a.each(d,function(j,k){k=a.trim(k);if(k){g.push(k)}});h.val(this.cleanTags(g.join(b)));this.quickClicks(f);return false},quickClicks:function(d){var g=a(".the-tags",d),e=a(".tagchecklist",d),f=a(d).attr("id"),b,c;if(!g.length){return}c=g.prop("disabled");b=g.val().split(postL10n.comma);e.empty();a.each(b,function(i,k){var j,h;k=a.trim(k);if(!k){return}j=a("<span />").text(k);if(!c){h=a('<a id="'+f+"-check-num-"+i+'" class="ntdelbutton">X</a>');h.click(function(){mlaModal.tagBox.parseTags(this)});j.prepend(" ").prepend(h)}e.append(j)})},flushTags:function(h,d,c){var j,b,e,k=a(".the-tags",h),g=a("input.newtag",h),i=postL10n.comma;d=d||false;e=d?a(d).text():g.val();j=k.val();b=j?j+i+e:e;b=mlaModal.utility.arrayCleanup(this.cleanTags(b));k.val(b);this.quickClicks(h);if(!d){g.val("")}if("undefined"==typeof(c)){g.focus()}return false},getCloud:function(c,b){a.post(ajaxurl,{action:"get-tagcloud",tax:b},function(e,d){if(0===e||"success"!=d){e=wpAjax.broken}e=a('<p id="tagcloud-'+b+'" class="the-tagcloud">'+e+"</p>");a("a",e).click(function(){mlaModal.tagBox.flushTags(a(this).closest(".mla-taxonomy-field").children(".tagsdiv"),this);return false});a("#"+c).after(e)})},init:function(f,b,d){var e,c;e=a("#mla-taxonomy-"+b,d);c=a("div.ajaxtag",e);mlaModal.tagBox.quickClicks(e);a("input.tagadd",c).click(function(){mlaModal.tagBox.flushTags(a(this).closest(".tagsdiv"))});a("input.newtag",c).keyup(function(g){if(13==g.which){mlaModal.tagBox.flushTags(e);return false}}).keypress(function(g){if(13==g.which){g.preventDefault();return false}}).each(function(){a(this).suggest(ajaxurl+"?action=ajax-tag-search&tax="+b,{delay:500,resultsClass:"mla_ac_results",selectClass:"mla_ac_over",matchClass:"mla_ac_match",minchars:2,multiple:true,multipleSep:postL10n.comma+" "})});e.siblings(":first").click(function(){mlaModal.tagBox.getCloud(a("a",this).attr("id"),b);a("a",this).unbind().click(function(){a(this).siblings(".the-tagcloud").toggle();return false});return false});a(".compat-field-"+b+" td",d).on("mouseleave",function(i){var k,h=this,g=mlaModal.utility.arrayCleanup(a(".server-tags",h).val()),j=mlaModal.utility.arrayCleanup(a(".the-tags",h).val());if(g===j){return}a(h).css("opacity","0.5");k={id:f,};k[b]=j;wp.media.post(mlaModal.settings.ajaxUpdateCompatAction,k).done(function(m){var l,n;for(l in m){if("object"===typeof(m[l]["object-terms"])){mlaModal.utility.mlaAttachmentsBrowser.updateFilters(l,m[l]["object-terms"]);delete m[l]["object-terms"]}for(n in m[l]){a("#"+n,h).replaceWith(m[l][n])}}a(h).css("opacity","1.0")})});e.on("change",function(g){g.stopPropagation();return false});a(".the-tags, .server-tags .newtag",e).on("change",function(g){g.stopPropagation();return false})}};if(mlaModal.settings.enableDetailsCategory||mlaModal.settings.enableDetailsTag){wp.media.view.AttachmentCompat=wp.media.view.AttachmentCompat.extend({initialize:function(){wp.media.view.AttachmentCompat.__super__.initialize.apply(this,arguments);this.on("ready",function(b){mlaModal.utility.hookCompatTaxonomies(this.model.get("id"),this.el)})}})}if(mlaModal.settings.enableDetailsCategory||mlaModal.settings.enableDetailsTag){wp.media.model.Selection=wp.media.model.Selection.extend({initialize:function(){wp.media.model.Selection.__super__.initialize.apply(this,arguments);this.on("selection:reset",function(b){mlaModal.cid=null});this.on("selection:unsingle",function(b){mlaModal.cid=null});this.on("selection:single",function(b){mlaModal.cid=b.cid});this.on("change:uploading",function(b){mlaModal.uploading=true});this.on("change",function(d){if(mlaModal.uploading&&mlaModal.cid===d.cid){var b=wp.media.editor.get("content"),c=b.content.get("compat");mlaModal.utility.hookCompatTaxonomies(d.get("id"),c.sidebar.$el);mlaModal.uploading=false}})}})}mlaModal.utility.hookCompatTaxonomies=function(d,c){var b;if(mlaModal.settings.enableDetailsCategory){a(".mla-taxonomy-field .categorydiv",c).each(function(){b=mlaModal.utility.parseTaxonomyId(a(this).attr("id"));a(".compat-field-"+b+" th",c).click({id:d,currentTaxonomy:b,el:c},function(e){mlaModal.utility.fillCompatTaxonomies(e.data)})})}if(mlaModal.settings.enableDetailsTag){a(".mla-taxonomy-field .tagsdiv",c).each(function(){b=mlaModal.utility.parseTaxonomyId(a(this).attr("id"));a(".compat-field-"+b+" th",c).click({id:d,currentTaxonomy:b,el:c},function(e){mlaModal.utility.fillCompatTaxonomies(e.data)})})}};mlaModal.utility.fillCompatTaxonomies=function(f){var c=f.el,e=[],b,d;if(mlaModal.settings.enableDetailsCategory){a(".mla-taxonomy-field .categorydiv",c).each(function(){b=mlaModal.utility.parseTaxonomyId(a(this).attr("id"));e[e.length]=b;d=".compat-field-"+b;if("undefined"===typeof(mlaModal.initialHTML[b])){mlaModal.initialHTML[b]=a(d,c).html()}else{a(d,c).html(mlaModal.initialHTML[b])}a(d+" .categorydiv",c).html(mlaModal.strings.loadingText)})}if(mlaModal.settings.enableDetailsTag){a(".mla-taxonomy-field .tagsdiv",c).each(function(){b=mlaModal.utility.parseTaxonomyId(a(this).attr("id"));e[e.length]=b;d=".compat-field-"+b;if("undefined"===typeof(mlaModal.initialHTML[b])){mlaModal.initialHTML[b]=a(d,c).html()}else{a(d,c).html(mlaModal.initialHTML[b])}a(d+" .tagsdiv",c).html(mlaModal.strings.loadingText)})}if(e.length){wp.media.post(mlaModal.settings.ajaxFillCompatAction,{id:f.id,query:e,}).done(function(h){var g,i;for(g in h){i=".compat-field-"+g;a(i,c).html(h[g])}mlaModal.utility.supportCompatTaxonomies(f);a(".compat-field-"+f.currentTaxonomy+" td",c).show()})}};mlaModal.utility.supportCompatTaxonomies=function(d){var c=d.id,b=d.el;if(mlaModal.settings.enableDetailsCategory){a(".mla-taxonomy-field .categorydiv",b).each(function(){var g=a(this),e,h,f,k,i,m,l,j;f=mlaModal.utility.parseTaxonomyId(a(this).attr("id"));k=f+"_tab";i="#mla-"+f;m="#mla-new-"+f;l="#mla-search-"+f;j="#mla-attachments-"+c+"-"+f;if(f=="category"){k="cats"}g.find(".category-tabs").show();a(".compat-field-"+f+" th",b).click(function(){a(this).siblings("td").slideToggle()});g.on("mouseleave",function(p){var r,n,q=[],o=g.find(i+"-checklist input:checked");o.each(function(t){q[q.length]=a(this).val()});q.sort(function(u,t){return u-t});q=q.join(",");n=g.siblings(j).val();if(n===q){return}g.siblings(j).val(q);g.prop("disabled",true);r={id:c,};r[f]=q;wp.media.post(mlaModal.settings.ajaxUpdateCompatAction,r).done(function(u){var t,v;for(t in u){for(v in u[t]){g.find("#"+v).html(u[t][v])}}g.find(l).val("");g.find(i+"-searcher").addClass("mla-hidden-children");g.prop("disabled",false)})});g.on('change input[type="checkbox"]',function(n){n.stopPropagation();return false});g.find(i+"-tabs a").click(function(){var n=a(this).attr("href");a(this).parent().addClass("tabs").siblings("li").removeClass("tabs");g.find(i+"-tabs").siblings(".tabs-panel").hide();g.find(n).show();a(this).focus();if("#mla-"+f+"-all"==n){deleteUserSetting(k)}else{setUserSetting(k,"pop")}return false});if(getUserSetting(k)){g.find(i+'-tabs a[href="#mla-'+f+'-pop"]').click()}g.find(i+"-add-toggle").click(function(){g.find(i+"-searcher").addClass("mla-hidden-children");g.find(i+"-adder").toggleClass("mla-hidden-children");g.find(i+'-tabs a[href="#mla-'+f+'-all"]').click();g.find(i+"-checklist li").show();g.find(i+"-checklist-pop li").show();if(false===g.find(i+"-adder").hasClass("mla-hidden-children")){g.find(m).val("").removeClass("form-input-tip");g.find(m).focus()}return false});g.find(m).keypress(function(n){if(13===n.keyCode){n.preventDefault();g.find(i+"-add-submit").click()}});g.find(i+"-add-submit").click(function(){g.find(m).focus()});e=function(n){if(!g.find(m).val()){return false}n.data+="&"+g.find(i+"-checklist :checked").serialize();g.prop("disabled",true);return n};h=function(q,p){var o,n=g.find("#new"+f+"_parent");g.prop("disabled",false);if("undefined"!=p.parsed.responses[0]&&(o=p.parsed.responses[0].supplemental.newcat_parent)){n.before(o);n.remove();mlaModal.utility.mlaAttachmentsBrowser.updateFilters(f,o)}};g.find(i+"-checklist").wpList({alt:"",response:"mla-"+f+"-ajax-response",addBefore:e,addAfter:h});g.find(i+"-checklist, "+i+"-checklist-pop").on("click",'li.popular-category > label input[type="checkbox"]',function(){var n=a(this),p=n.is(":checked"),o=n.val();if(o&&n.parents("#mla-taxonomy-"+f).length){a("#in-"+f+"-"+o+", #in-popular-"+f+"-"+o).prop("checked",p)}});a.extend(a.expr[":"],{matchTerms:function(p,o,n,q){return(p.textContent||p.innerText||"").toLowerCase().indexOf((n[3]||"").toLowerCase())>=0}});g.find(l).keypress(function(n){if(13===n.keyCode){n.preventDefault();g.find(l).val("");g.find(i+"-searcher").addClass("mla-hidden-children");g.find(i+"-checklist li").show();g.find(i+"-checklist-pop li").show();return}});g.find(l).keyup(function(p){var q,o,n;if(13===p.keyCode){p.preventDefault();g.find(i+"-search-toggle").focus();return}q=g.find(l).val(),termList=g.find(i+"-checklist li");termListPopular=g.find(i+"-checklist-pop li");if(0<q.length){termList.hide();termListPopular.hide()}else{termList.show();termListPopular.show()}o=g.find(i+"-checklist label:matchTerms('"+q+"')");o.closest("li").find("li").andSelf().show();o.parents(i+"-checklist li").show();n=g.find(i+"-checklist-pop label:matchTerms('"+q+"')");n.closest("li").find("li").andSelf().show();n.parents(i+"-checklist li").show()});g.find(i+"-search-toggle").click(function(){g.find(i+"-adder ").addClass("mla-hidden-children");g.find(i+"-searcher").toggleClass("mla-hidden-children");g.find(i+'-tabs a[href="#mla-'+f+'-all"]').click();g.find(i+"-checklist li").show();g.find(i+"-checklist-pop li").show();if(false===g.find(i+"-searcher").hasClass("mla-hidden-children")){g.find(l).val("").removeClass("form-input-tip");g.find(l).focus()}return false})})}if(mlaModal.settings.enableDetailsTag){a(".mla-taxonomy-field .tagsdiv",b).each(function(){var e=mlaModal.utility.parseTaxonomyId(a(this).attr("id"));a(".compat-field-"+e+" th",b).click(function(){a(this).siblings("td").slideToggle()});mlaModal.tagBox.init(c,e,b)})}}}(jQuery));
|
1 |
+
var mlaModal={strings:{},settings:{},initialHTML:{},uploading:false,cid:null,utility:{originalMediaAjax:null,mlaAttachmentsBrowser:null,parseTermsOptions:null,arrayCleanup:null,parseTaxonomyId:null,hookCompatTaxonomies:null,fillCompatTaxonomies:null,supportCompatTaxonomies:null},tagBox:null};(function(a){mlaModal.utility.originalMediaAjax=wp.media.ajax;wp.media.ajax=function(c,b){if(_.isObject(c)){b=c}else{b=b||{};b.data=_.extend(b.data||{},{action:c})}if("query-attachments"==b.data.action){stype=typeof b.data.query.s;if("object"==stype){s=b.data.query.s}else{if("string"==stype){s={mla_search_value:b.data.query.s}}else{s={}}}if("undefined"!=typeof b.data.query.post_mime_type){mlaModal.settings.filterMime=b.data.query.post_mime_type}else{mlaModal.settings.filterMime="all"}if("undefined"!=typeof s.mla_filter_month){mlaModal.settings.filterMonth=s.mla_filter_month}if("undefined"!=typeof s.mla_filter_term){mlaModal.settings.filterTerm=s.mla_filter_term}if("undefined"!=typeof s.mla_search_value){mlaModal.settings.searchValue=s.mla_search_value}searchValues={mla_filter_month:mlaModal.settings.filterMonth,mla_filter_term:mlaModal.settings.filterTerm,mla_terms_search:mlaModal.settings.termsSearch,mla_search_clicks:mlaModal.settings.searchClicks,mla_search_value:mlaModal.settings.searchValue,mla_search_fields:mlaModal.settings.searchFields,mla_search_connector:mlaModal.settings.searchConnector};mlaModal.settings.termsSearch="";a("#mla-terms-search-input").html("").val("");b.data.query.s=searchValues}return mlaModal.utility.originalMediaAjax.call(this,b)};mlaModal.strings=typeof wp.media.view.l10n.mla_strings==="undefined"?{}:wp.media.view.l10n.mla_strings;delete wp.media.view.l10n.mla_strings;mlaModal.settings=typeof wp.media.view.settings.mla_settings==="undefined"?{}:wp.media.view.settings.mla_settings;delete wp.media.view.settings.mla_settings;if(mlaModal.settings.enableMimeTypes){wp.media.view.AttachmentFilters.Mla=wp.media.view.AttachmentFilters.extend({createFilters:function(){var b={};_.each(mlaModal.settings.mimeTypes||{},function(d,c){b[c]={text:d,props:{type:c,uploadedTo:null,orderby:"date",order:"DESC"}}});b.all={text:wp.media.view.l10n.allMediaItems,props:{type:null,uploadedTo:null,orderby:"date",order:"DESC"},priority:10};b.uploaded={text:wp.media.view.l10n.uploadedToThisPost,props:{type:null,uploadedTo:wp.media.view.settings.post.id,orderby:"menuOrder",order:"ASC"},priority:20};this.filters=b;if((mlaModal.settings.filterMime!="all")&&("undefined"!==typeof b[mlaModal.settings.filterMime])){this.model.set(b[mlaModal.settings.filterMime].props,{silent:false})}},change:function(){var b=this.filters[this.el.value];if(b){this.model.set(b.props,{silent:true});a("#mla-search-submit").click()}}})}if(mlaModal.settings.enableMonthsDropdown){wp.media.view.AttachmentFilters.MlaMonths=wp.media.view.AttachmentFilters.extend({className:"attachment-months",createFilters:function(){var b={};_.each(mlaModal.settings.months||{},function(d,c){b[c]={text:d,props:{s:{mla_filter_month:c}}}});this.filters=b;if((mlaModal.settings.filterMonth>0)&&("undefined"!==typeof b[mlaModal.settings.filterMonth])){if(mlaModal.settings.filterMonth>0){this.model.set(b[mlaModal.settings.filterMonth].props,{silent:false})}}},select:function(){var b=this.model,d=mlaModal.settings.filterMonth,c=b.toJSON();if(_.isUndefined(c.s)){c.s={}}if("string"==typeof c.search){mlaModal.settings.searchValue=c.search}if(_.isUndefined(c.s.mla_filter_month)){c.s.mla_filter_month=mlaModal.settings.filterMonth}else{mlaModal.settings.filterMonth=c.s.mla_filter_month}_.find(this.filters,function(f,g){var e=_.all(f.props,function(i,h){return i.mla_filter_month==mlaModal.settings.filterMonth});if(e){return d=g}});this.$el.val(d)},change:function(){var b=this.filters[this.el.value];if(b){this.model.set(b.props);a("#mla-search-submit").click()}}})}if(mlaModal.settings.enableTermsDropdown){wp.media.view.AttachmentFilters.MlaTerms=wp.media.view.AttachmentFilters.extend({className:"attachment-terms",createFilters:function(){var b={};_.each(mlaModal.settings.termsText||{},function(d,c){b[c]={text:d,props:{s:{mla_filter_term:parseInt(mlaModal.settings.termsValue[c])}}}});this.filters=b;index=_.indexOf(mlaModal.settings.termsValue,mlaModal.settings.filterTerm);if(index>0){this.model.set(b[index].props,{silent:false})}},select:function(){var b=this.model,d=mlaModal.settings.filterTerm,c=b.toJSON();if(_.isUndefined(c.s)){c.s={}}if("string"==typeof c.search){mlaModal.settings.searchValue=c.search}if(_.isUndefined(c.s.mla_filter_term)){c.s.mla_filter_term=mlaModal.settings.filterTerm}else{mlaModal.settings.filterTerm=c.s.mla_filter_term}_.find(this.filters,function(f,g){var e=_.all(f.props,function(i,h){return i.mla_filter_term==mlaModal.settings.filterTerm});if(e){return d=g}});this.$el.val(d)},change:function(){var b=this.filters[this.el.value];if(b){this.model.set(b.props);a("#mla-search-submit").click()}}})}if(mlaModal.settings.enableTermsSearch){wp.media.view.MlaTermsSearch=wp.media.View.extend({tagName:"span",className:"mla-terms-search",template:wp.media.template("mla-terms-search-button"),attributes:{type:"mla-terms-search-button"},events:{change:"termsSearchOpen",click:"termsSearchOpen",},render:function(){this.$el.html(this.template(mlaModal.strings));return this},termsSearchOpen:function(b){if(("click"==b.type)&&("mla_terms_search"===b.target.name)){mlaTaxonomy.termsSearch.open();a("#mla-terms-search-form").off("submit");a("#mla-terms-search-form").submit(function(g){var c,f,d={phrases:"",taxonomies:[]};g.preventDefault();c=a("#mla-terms-search-form").serializeArray();for(f=0;f<c.length;f++){switch(c[f].name){case"mla_terms_search[phrases]":d.phrases=c[f].value;break;case"mla_terms_search[radio_phrases]":d.radio_phrases=c[f].value;break;case"mla_terms_search[radio_terms]":d.radio_terms=c[f].value;break;case"mla_terms_search[taxonomies][]":d.taxonomies[d.taxonomies.length]=c[f].value;break}}mlaModal.settings.termsSearch=d;a("#mla-search-submit").click();return false});a("#mla-terms-search-input").keypress(function(c){if(13==c.which){c.preventDefault();a("#mla-terms-search-submit").click()}})}}})}if(mlaModal.settings.enableSearchBox){wp.media.view.MlaSearch=wp.media.View.extend({tagName:"div",className:"mla-search-box",template:wp.media.template("mla-search-box"),attributes:{type:"mla-search-box"},events:{change:"search",click:"search",search:"search",MlaSearch:"search"},render:function(){this.$el.html(this.template(mlaModal.strings));return this},search:function(b){if(("click"==b.type)&&("mla_search_submit"!=b.target.name)){return}switch(b.target.name){case"s[mla_search_value]":mlaModal.settings.searchValue=b.target.value;break;case"mla_search_submit":searchValues={mla_filter_month:mlaModal.settings.filterMonth,mla_filter_term:mlaModal.settings.filterTerm,mla_terms_search:mlaModal.settings.termsSearch,mla_search_clicks:mlaModal.settings.searchClicks++,mla_search_value:mlaModal.settings.searchValue,mla_search_fields:mlaModal.settings.searchFields,mla_search_connector:mlaModal.settings.searchConnector};this.model.set({s:searchValues});break;case"s[mla_search_connector]":mlaModal.settings.searchConnector=b.target.value;break;case"s[mla_search_title]":index=mlaModal.settings.searchFields.indexOf("title");if(-1==index){mlaModal.settings.searchFields.push("title")}else{mlaModal.settings.searchFields.splice(index,1)}break;case"s[mla_search_name]":index=mlaModal.settings.searchFields.indexOf("name");if(-1==index){mlaModal.settings.searchFields.push("name")}else{mlaModal.settings.searchFields.splice(index,1)}break;case"s[mla_search_alt_text]":index=mlaModal.settings.searchFields.indexOf("alt-text");if(-1==index){mlaModal.settings.searchFields.push("alt-text")}else{mlaModal.settings.searchFields.splice(index,1)}break;case"s[mla_search_excerpt]":index=mlaModal.settings.searchFields.indexOf("excerpt");if(-1==index){mlaModal.settings.searchFields.push("excerpt")}else{mlaModal.settings.searchFields.splice(index,1)}break;case"s[mla_search_content]":index=mlaModal.settings.searchFields.indexOf("content");if(-1==index){mlaModal.settings.searchFields.push("content")}else{mlaModal.settings.searchFields.splice(index,1)}break;case"s[mla_search_terms]":index=mlaModal.settings.searchFields.indexOf("terms");if(-1==index){mlaModal.settings.searchFields.push("terms")}else{mlaModal.settings.searchFields.splice(index,1)}break}}})}if(mlaModal.settings.enableMimeTypes||mlaModal.settings.enableMonthsDropdown||mlaModal.settings.enableTermsDropdown||mlaModal.settings.enableTermsSearch||mlaModal.settings.enableSearchBox){wp.media.view.AttachmentsBrowser=wp.media.view.AttachmentsBrowser.extend({createToolbar:function(){var b;wp.media.view.AttachmentsBrowser.__super__.createToolbar.apply(this,arguments);mlaModal.utility.mlaAttachmentsBrowser=this;b=this.options.filters;if(("all"===b)&&mlaModal.settings.enableMimeTypes){this.toolbar.unset("filters",{silent:true});this.toolbar.set("filters",new wp.media.view.AttachmentFilters.Mla({controller:this.controller,model:this.collection.props,priority:-80}).render())}if(this.options.search&&mlaModal.settings.enableMonthsDropdown){this.toolbar.set("months",new wp.media.view.AttachmentFilters.MlaMonths({controller:this.controller,model:this.collection.props,priority:-80}).render())}if(this.options.search&&mlaModal.settings.enableTermsDropdown){this.toolbar.set("terms",new wp.media.view.AttachmentFilters.MlaTerms({controller:this.controller,model:this.collection.props,priority:-80}).render())}if(this.options.search&&mlaModal.settings.enableTermsSearch){this.toolbar.set("termsSearch",new wp.media.view.MlaTermsSearch({controller:this.controller,model:this.collection.props,priority:-80}).render())}if(this.options.search){if(mlaModal.settings.enableSearchBox){this.toolbar.unset("search",{silent:true});this.toolbar.set("MlaSearch",new wp.media.view.MlaSearch({controller:this.controller,model:this.collection.props,priority:60}).render())}}},updateFilters:function(b,c){var d={};if(this.options.search&&mlaModal.settings.enableTermsDropdown&&mlaModal.settings.termsTaxonomy==b){d=mlaModal.utility.parseTermsOptions(c);mlaModal.settings.termsClass=d.termsClass;mlaModal.settings.termsText=d.termsText;mlaModal.settings.termsValue=d.termsValue;this.toolbar.unset("terms",{silent:true});this.toolbar.set("terms",new wp.media.view.AttachmentFilters.MlaTerms({controller:this.controller,model:this.collection.props,priority:-80}).render())}}})}mlaModal.utility.parseTermsOptions=function(h){var g={termsClass:[mlaModal.settings.termsClass[0],mlaModal.settings.termsClass[1]],termsText:[mlaModal.settings.termsText[0],mlaModal.settings.termsText[1]],termsValue:[mlaModal.settings.termsValue[0],mlaModal.settings.termsValue[1]]},d=2,b,c,f=/\<option(( class=\"([^\"]+)\" )|( ))value=((\'([^\']+)\')|(\"([^\"]+)\"))([^\>]*)\>([^\<]*)\<.*/g,e=[];if("object"===typeof h){d=mlaModal.settings.termsValue.length;for(b=2;b<d;b++){e[b]={termsClass:mlaModal.settings.termsClass[b],termsText:mlaModal.settings.termsText[b],termsValue:mlaModal.settings.termsValue[b]};if("undefined"!==typeof h[mlaModal.settings.termsValue[b]]){delete h[mlaModal.settings.termsValue[b]]}}for(c in h){e[b++]={termsClass:"level-0",termsText:h[c],termsValue:c.toString()}}if(d===b){return{termsClass:mlaModal.settings.termsClass,termsText:mlaModal.settings.termsText,termsValue:mlaModal.settings.termsValue}}e.sort(function(j,i){if(j.termsText>i.termsText){return 1}else{if(j.termsText<i.termsText){return -1}else{return 0}}});b=2;for(c in e){g.termsClass[b]=e[c].termsClass;g.termsText[b]=e[c].termsText;g.termsValue[b++]=e[c].termsValue}return g}e=f.exec(h);while(null!==(e=f.exec(h))){g.termsClass[d]=e[3];g.termsValue[d]=("undefined"===typeof e[6])?e[9]:e[7];g.termsText[d++]=e[11].replace(" ",mlaModal.settings.termsIndent)}return g};mlaModal.utility.arrayCleanup=function(d){var c=[],b=("string"===typeof d);if(b){d=d.split(mlaModal.settings.comma)}jQuery.each(d,function(e,f){f=jQuery.trim(f);if(f&&jQuery.inArray(f,c)==-1){c.push(f)}});c.sort();if(b){c=c.join(mlaModal.settings.comma)}return c};mlaModal.utility.parseTaxonomyId=function(c){var b=c.split("-");b.shift();b.shift();return b.join("-")};mlaModal.tagBox={cleanTags:function(c){var b=mlaModal.settings.comma;if(","!==b){c=c.replace(new RegExp(b,"g"),",")}c=c.replace(/\s*,\s*/g,",").replace(/,+/g,",").replace(/[,\s]+$/,"").replace(/^[,\s]+/,"");if(","!==b){c=c.replace(/,/g,b)}return c},parseTags:function(e){var i=e.id,c=i.split("-check-num-")[1],f=a(e).closest(".tagsdiv"),h=f.find(".the-tags"),b=mlaModal.settings.comma,d=h.val().split(b),g=[];delete d[c];a.each(d,function(j,k){k=a.trim(k);if(k){g.push(k)}});h.val(this.cleanTags(g.join(b)));this.quickClicks(f);return false},quickClicks:function(d){var g=a(".the-tags",d),e=a(".tagchecklist",d),f=a(d).attr("id"),b,c;if(!g.length){return}c=g.prop("disabled");b=g.val().split(mlaModal.settings.comma);e.empty();a.each(b,function(i,k){var j,h;k=a.trim(k);if(!k){return}j=a("<span />").text(k);if(!c){h=a('<a id="'+f+"-check-num-"+i+'" class="ntdelbutton">X</a>');h.click(function(){mlaModal.tagBox.parseTags(this)});j.prepend(" ").prepend(h)}e.append(j)})},flushTags:function(h,d,c){var j,b,e,k=a(".the-tags",h),g=a("input.newtag",h),i=mlaModal.settings.comma;d=d||false;e=d?a(d).text():g.val();j=k.val();b=j?j+i+e:e;b=mlaModal.utility.arrayCleanup(this.cleanTags(b));k.val(b);this.quickClicks(h);if(!d){g.val("")}if("undefined"==typeof(c)){g.focus()}return false},getCloud:function(c,b){a.post(ajaxurl,{action:"get-tagcloud",tax:b},function(e,d){if(0===e||"success"!=d){e=wpAjax.broken}e=a('<p id="tagcloud-'+b+'" class="the-tagcloud">'+e+"</p>");a("a",e).click(function(){mlaModal.tagBox.flushTags(a(this).closest(".mla-taxonomy-field").children(".tagsdiv"),this);return false});a("#"+c).after(e)})},init:function(f,b,d){var e,c;e=a("#mla-taxonomy-"+b,d);c=a("div.ajaxtag",e);mlaModal.tagBox.quickClicks(e);a("input.tagadd",c).click(function(){mlaModal.tagBox.flushTags(a(this).closest(".tagsdiv"))});a("input.newtag",c).keyup(function(g){if(13==g.which){mlaModal.tagBox.flushTags(e);return false}}).keypress(function(g){if(13==g.which){g.preventDefault();return false}}).each(function(){a(this).suggest(ajaxurl+"?action=ajax-tag-search&tax="+b,{delay:500,resultsClass:"mla_ac_results",selectClass:"mla_ac_over",matchClass:"mla_ac_match",minchars:2,multiple:true,multipleSep:mlaModal.settings.comma+" "})});e.siblings(":first").click(function(){mlaModal.tagBox.getCloud(a("a",this).attr("id"),b);a("a",this).unbind().click(function(){a(this).siblings(".the-tagcloud").toggle();return false});return false});a(".compat-field-"+b+" td",d).on("mouseleave",function(i){var k,h=this,g=mlaModal.utility.arrayCleanup(a(".server-tags",h).val()),j=mlaModal.utility.arrayCleanup(a(".the-tags",h).val());if(g===j){return}a(h).css("opacity","0.5");k={id:f,};k[b]=j;wp.media.post(mlaModal.settings.ajaxUpdateCompatAction,k).done(function(m){var l,n;for(l in m){if("object"===typeof(m[l]["object-terms"])){if(null!==mlaModal.utility.mlaAttachmentsBrowser){mlaModal.utility.mlaAttachmentsBrowser.updateFilters(l,m[l]["object-terms"])}delete m[l]["object-terms"]}for(n in m[l]){a("#"+n,h).replaceWith(m[l][n])}}a(h).css("opacity","1.0")})});e.on("change",function(g){g.stopPropagation();return false});a(".the-tags, .server-tags .newtag",e).on("change",function(g){g.stopPropagation();return false})}};if(mlaModal.settings.enableDetailsCategory||mlaModal.settings.enableDetailsTag){wp.media.view.AttachmentCompat=wp.media.view.AttachmentCompat.extend({initialize:function(){wp.media.view.AttachmentCompat.__super__.initialize.apply(this,arguments);this.on("ready",function(b){mlaModal.utility.hookCompatTaxonomies(this.model.get("id"),this.el)})}})}if(mlaModal.settings.enableDetailsCategory||mlaModal.settings.enableDetailsTag){wp.media.model.Selection=wp.media.model.Selection.extend({initialize:function(){wp.media.model.Selection.__super__.initialize.apply(this,arguments);this.on("selection:reset",function(b){mlaModal.cid=null});this.on("selection:unsingle",function(b){mlaModal.cid=null});this.on("selection:single",function(b){mlaModal.cid=b.cid});this.on("change:uploading",function(b){mlaModal.uploading=true});this.on("change",function(d){if(mlaModal.uploading&&mlaModal.cid===d.cid){var b=wp.media.editor.get("content"),c=b.content.get("compat");mlaModal.utility.hookCompatTaxonomies(d.get("id"),c.sidebar.$el);mlaModal.uploading=false}})}})}mlaModal.utility.hookCompatTaxonomies=function(d,c){var b;if(mlaModal.settings.enableDetailsCategory){a(".mla-taxonomy-field .categorydiv",c).each(function(){b=mlaModal.utility.parseTaxonomyId(a(this).attr("id"));a(".compat-field-"+b+" th",c).click({id:d,currentTaxonomy:b,el:c},function(e){mlaModal.utility.fillCompatTaxonomies(e.data)})})}if(mlaModal.settings.enableDetailsTag){a(".mla-taxonomy-field .tagsdiv",c).each(function(){b=mlaModal.utility.parseTaxonomyId(a(this).attr("id"));a(".compat-field-"+b+" th",c).click({id:d,currentTaxonomy:b,el:c},function(e){mlaModal.utility.fillCompatTaxonomies(e.data)})})}};mlaModal.utility.fillCompatTaxonomies=function(f){var c=f.el,e=[],b,d;if(mlaModal.settings.enableDetailsCategory){a(".mla-taxonomy-field .categorydiv",c).each(function(){b=mlaModal.utility.parseTaxonomyId(a(this).attr("id"));e[e.length]=b;d=".compat-field-"+b;if("undefined"===typeof(mlaModal.initialHTML[b])){mlaModal.initialHTML[b]=a(d,c).html()}else{a(d,c).html(mlaModal.initialHTML[b])}a(d+" .categorydiv",c).html(mlaModal.strings.loadingText)})}if(mlaModal.settings.enableDetailsTag){a(".mla-taxonomy-field .tagsdiv",c).each(function(){b=mlaModal.utility.parseTaxonomyId(a(this).attr("id"));e[e.length]=b;d=".compat-field-"+b;if("undefined"===typeof(mlaModal.initialHTML[b])){mlaModal.initialHTML[b]=a(d,c).html()}else{a(d,c).html(mlaModal.initialHTML[b])}a(d+" .tagsdiv",c).html(mlaModal.strings.loadingText)})}if(e.length){wp.media.post(mlaModal.settings.ajaxFillCompatAction,{id:f.id,query:e,}).done(function(h){var g,i;for(g in h){i=".compat-field-"+g;a(i,c).html(h[g])}mlaModal.utility.supportCompatTaxonomies(f);a(".compat-field-"+f.currentTaxonomy+" td",c).show()})}};mlaModal.utility.supportCompatTaxonomies=function(d){var c=d.id,b=d.el;if(mlaModal.settings.enableDetailsCategory){a(".mla-taxonomy-field .categorydiv",b).each(function(){var g=a(this),e,h,f,k,i,m,l,j;f=mlaModal.utility.parseTaxonomyId(a(this).attr("id"));k=f+"_tab";i="#mla-"+f;m="#mla-new-"+f;l="#mla-search-"+f;j="#mla-attachments-"+c+"-"+f;if(f=="category"){k="cats"}g.find(".category-tabs").show();a(".compat-field-"+f+" th",b).click(function(){a(this).siblings("td").slideToggle()});g.on("mouseleave",function(p){var r,n,q=[],o=g.find(i+"-checklist input:checked");o.each(function(t){q[q.length]=a(this).val()});q.sort(function(u,t){return u-t});q=q.join(",");n=g.siblings(j).val();if(n===q){return}g.siblings(j).val(q);g.prop("disabled",true);r={id:c,};r[f]=q;wp.media.post(mlaModal.settings.ajaxUpdateCompatAction,r).done(function(u){var t,v;for(t in u){for(v in u[t]){g.find("#"+v).html(u[t][v])}}g.find(l).val("");g.find(i+"-searcher").addClass("mla-hidden-children");g.prop("disabled",false)})});g.on('change input[type="checkbox"]',function(n){n.stopPropagation();return false});g.find(i+"-tabs a").click(function(){var n=a(this).attr("href");a(this).parent().addClass("tabs").siblings("li").removeClass("tabs");g.find(i+"-tabs").siblings(".tabs-panel").hide();g.find(n).show();a(this).focus();if("#mla-"+f+"-all"==n){deleteUserSetting(k)}else{setUserSetting(k,"pop")}return false});if(getUserSetting(k)){g.find(i+'-tabs a[href="#mla-'+f+'-pop"]').click()}g.find(i+"-add-toggle").click(function(){g.find(i+"-searcher").addClass("mla-hidden-children");g.find(i+"-adder").toggleClass("mla-hidden-children");g.find(i+'-tabs a[href="#mla-'+f+'-all"]').click();g.find(i+"-checklist li").show();g.find(i+"-checklist-pop li").show();if(false===g.find(i+"-adder").hasClass("mla-hidden-children")){g.find(m).val("").removeClass("form-input-tip");g.find(m).focus()}return false});g.find(m).keypress(function(n){if(13===n.keyCode){n.preventDefault();g.find(i+"-add-submit").click()}});g.find(i+"-add-submit").click(function(){g.find(m).focus()});e=function(n){if(!g.find(m).val()){return false}n.data+="&"+g.find(i+"-checklist :checked").serialize();g.prop("disabled",true);return n};h=function(q,p){var o,n=g.find("#new"+f+"_parent");g.prop("disabled",false);if("undefined"!=p.parsed.responses[0]&&(o=p.parsed.responses[0].supplemental.newcat_parent)){n.before(o);n.remove();if(null!==mlaModal.utility.mlaAttachmentsBrowser){mlaModal.utility.mlaAttachmentsBrowser.updateFilters(f,o)}}};g.find(i+"-checklist").wpList({alt:"",response:"mla-"+f+"-ajax-response",addBefore:e,addAfter:h});g.find(i+"-checklist, "+i+"-checklist-pop").on("click",'li.popular-category > label input[type="checkbox"]',function(){var n=a(this),p=n.is(":checked"),o=n.val();if(o&&n.parents("#mla-taxonomy-"+f).length){a("#in-"+f+"-"+o+", #in-popular-"+f+"-"+o).prop("checked",p)}});a.extend(a.expr[":"],{matchTerms:function(p,o,n,q){return(p.textContent||p.innerText||"").toLowerCase().indexOf((n[3]||"").toLowerCase())>=0}});g.find(l).keypress(function(n){if(13===n.keyCode){n.preventDefault();g.find(l).val("");g.find(i+"-searcher").addClass("mla-hidden-children");g.find(i+"-checklist li").show();g.find(i+"-checklist-pop li").show();return}});g.find(l).keyup(function(p){var q,o,n;if(13===p.keyCode){p.preventDefault();g.find(i+"-search-toggle").focus();return}q=g.find(l).val(),termList=g.find(i+"-checklist li");termListPopular=g.find(i+"-checklist-pop li");if(0<q.length){termList.hide();termListPopular.hide()}else{termList.show();termListPopular.show()}o=g.find(i+"-checklist label:matchTerms('"+q+"')");o.closest("li").find("li").andSelf().show();o.parents(i+"-checklist li").show();n=g.find(i+"-checklist-pop label:matchTerms('"+q+"')");n.closest("li").find("li").andSelf().show();n.parents(i+"-checklist li").show()});g.find(i+"-search-toggle").click(function(){g.find(i+"-adder ").addClass("mla-hidden-children");g.find(i+"-searcher").toggleClass("mla-hidden-children");g.find(i+'-tabs a[href="#mla-'+f+'-all"]').click();g.find(i+"-checklist li").show();g.find(i+"-checklist-pop li").show();if(false===g.find(i+"-searcher").hasClass("mla-hidden-children")){g.find(l).val("").removeClass("form-input-tip");g.find(l).focus()}return false})})}if(mlaModal.settings.enableDetailsTag){a(".mla-taxonomy-field .tagsdiv",b).each(function(){var e=mlaModal.utility.parseTaxonomyId(a(this).attr("id"));a(".compat-field-"+e+" th",b).click(function(){a(this).siblings("td").slideToggle()});mlaModal.tagBox.init(c,e,b)})}}}(jQuery));
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: dglingren
|
|
3 |
Donate link: http://fairtradejudaica.org/make-a-difference/donate/
|
4 |
Tags: attachment, attachments, documents, gallery, image, images, media, library, media library, tag cloud, media-tags, media tags, tags, media categories, categories, IPTC, EXIF, GPS, PDF, meta, metadata, photo, photos, photograph, photographs, photoblog, photo albums, lightroom, photoshop, MIME, mime-type, icon, upload, file extensions
|
5 |
Requires at least: 3.3
|
6 |
-
Tested up to:
|
7 |
-
Stable tag: 1.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -148,10 +148,15 @@ All of the MLA source code has been annotated with "DocBlocks", a special type o
|
|
148 |
6. The Settings page MLA Gallery tab, where you can add custom style and markup templates for `[mla_gallery]` shortcode output.
|
149 |
7. The Settings page IPTC & EXIF Processing Options screen, where you can map image metadata to standard fields (e.g. caption), taxonomy terms and custom fields.
|
150 |
8. The Settings page Custom Field Processing Options screen, where you can map attachment metadata to custom fields for display in [mla_gallery] shortcodes and as sortable, searchable columns in the Media/Assistant submenu.
|
151 |
-
9. The Media Manager popup modal window showing additional filters for date and taxonomy terms. Also shows the enhanced Search Media box and the
|
152 |
|
153 |
== Changelog ==
|
154 |
|
|
|
|
|
|
|
|
|
|
|
155 |
= 1.91 =
|
156 |
|
157 |
* New: Fourteen filters have been added to the "Edit Media additional meta boxes". You can customize which meta boxes appear and replace their contents. An example plugin has been added to demonstrate their use. See the [Other Notes section](http://wordpress.org/extend/plugins/media-library-assistant/other_notes/ "Click here, then scroll down") section or the Settings/Media Library Assistant Documentation tab for more information.
|
@@ -243,8 +248,8 @@ All of the MLA source code has been annotated with "DocBlocks", a special type o
|
|
243 |
|
244 |
== Upgrade Notice ==
|
245 |
|
246 |
-
= 1.
|
247 |
-
|
248 |
|
249 |
== Other Notes ==
|
250 |
|
3 |
Donate link: http://fairtradejudaica.org/make-a-difference/donate/
|
4 |
Tags: attachment, attachments, documents, gallery, image, images, media, library, media library, tag cloud, media-tags, media tags, tags, media categories, categories, IPTC, EXIF, GPS, PDF, meta, metadata, photo, photos, photograph, photographs, photoblog, photo albums, lightroom, photoshop, MIME, mime-type, icon, upload, file extensions
|
5 |
Requires at least: 3.3
|
6 |
+
Tested up to: 3.9.2
|
7 |
+
Stable tag: 1.92
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
148 |
6. The Settings page MLA Gallery tab, where you can add custom style and markup templates for `[mla_gallery]` shortcode output.
|
149 |
7. The Settings page IPTC & EXIF Processing Options screen, where you can map image metadata to standard fields (e.g. caption), taxonomy terms and custom fields.
|
150 |
8. The Settings page Custom Field Processing Options screen, where you can map attachment metadata to custom fields for display in [mla_gallery] shortcodes and as sortable, searchable columns in the Media/Assistant submenu.
|
151 |
+
9. The Media Manager popup modal window showing additional filters for date and taxonomy terms. Also shows the enhanced Search Media box and the full-function taxonomy support in the ATTACHMENT DETAILS area.
|
152 |
|
153 |
== Changelog ==
|
154 |
|
155 |
+
= 1.92 =
|
156 |
+
* Fix: PHP "Fatal error: Call to undefined function get_current_screen ()" has been fixed.
|
157 |
+
* Fix: Enhanced taxonomy support for drag & drop file uploads has been restored.
|
158 |
+
* Fix: JavaScript "undefined or null object" reference when all Media Manager toolbar enhancements are disabled has been fixed.
|
159 |
+
|
160 |
= 1.91 =
|
161 |
|
162 |
* New: Fourteen filters have been added to the "Edit Media additional meta boxes". You can customize which meta boxes appear and replace their contents. An example plugin has been added to demonstrate their use. See the [Other Notes section](http://wordpress.org/extend/plugins/media-library-assistant/other_notes/ "Click here, then scroll down") section or the Settings/Media Library Assistant Documentation tab for more information.
|
248 |
|
249 |
== Upgrade Notice ==
|
250 |
|
251 |
+
= 1.92 =
|
252 |
+
Three bug fixes, one serious.
|
253 |
|
254 |
== Other Notes ==
|
255 |
|