Media Library Assistant - Version 2.11

Version Description

  • New: Polylang support has been added. See the Other Notes section section or the Settings/Media Library Assistant Documentation tab for more information.
  • New: WPML support has been enhanced. In particular, 1) all taxonomy term assignments are verified/adjusted to be valid for the item's language, 2) taxonomy term assignments are synchronized across all the item's translations, 3) the Media/Assistant submenu table will include a "language management" column showing each item's translation status by language; you can click on an item's "pencil" or "plus" icon to edit an existing translation or duplicate the item in a new language, 4) when "All Languages" is selected, the Media/Assistant submenu table will include a "Language" column showing each item's language, and 5) the Settings/Media Library Assistant "Language" tab lets you select the enhancements you want. See the Other Notes section section or the Settings/Media Library Assistant Documentation tab for more information.
  • New: An "Attached" view has been added, filtering the Media/Assistant submenu table to show only those items having a parent post/page. You can disable the new view, if desired, on the Settings/Media Library Assistant Views tab.
  • New: The Media/Assistant submenu table Quick Edit area now scrolls to the top of the viewport when it is opened.
  • New: Fifteen additional hooks have been added to the "Media Manager Enhancement filters (Hooks)". The /examples/mla-media-modal-hooks-example.php.txt file documents all the new additions. The example plugin includes code to add a "term elimination" taxonomy query to the standard "Query Attachments" terms.
  • New: Four new filters for the "Media/Assistant Submenu Hooks" allow you to 1) process row-level actions from the Edit Media screen and 2) modify the "prepare_items" query terms or substitute your own query results. The /media-library-assistant/examples/mla-list-table-hooks-example.php.txt example plugin has been updated with the new filters.
  • New: A new /media-library-assistant/examples/mla-custom-field-search-example.php.txt example plugin has been added to demonstrate the new "prepare_items" query terms filter, adding a custom field search to the Media/Assistant Search Media text box.
  • New: A new /media-library-assistant/examples/mla-a-z-cloud-example.php.txt example plugin has been added that combines MLA with the Collapse-o-matic plugin and custom database queries to produce an "alphabetic cloud" and custom [mla_gallery].
  • New: For [mla_gallery], when mla_alt_shortcode=mla_tag_cloud, parameters such as mla_link_href are passed through to be used by [mla_tag_cloud].
  • New: Term-specific pagination has been added to the /examples/twentytwelve-mla/image.php file.
  • New: For [mla_gallery], the new "captiontag_content" attachment-specific substitution parameter contains the complete HTML markup for the caption if both captiontag and caption are not empty. This can be used to omit empty caption tags (as it is in the default template).
  • Fix: For [mla_gallery], the "captiontag" (<dd> or <figcaption>) now contains an item-specific id attribute, supporting the aria-describedby attribute in the thumbnail's <img> tag.
  • Fix: For [mla_gallery], the default HTML5 Row Open and Row Close template sections are now empty for themes that register support for HTML5. This removes the <!-- row-open --> comment in the Row Open section and the <br style="clear: both" /> tag in the Row Close section.
  • Fix: The obsolete "Attached" view has been removed from the /examples/mla-custom-view-example.php.txt file.
  • Fix: MLA enhanced icons for non-iage items are now properly displayed on the Media/Assistant submenu table.
  • Fix: Taxonomy terms containing "HTML special characters", e.g., ampersands, are now handled correctly for searching and editing.
  • Fix: The mla_list_table_new_instance filter is now called for Media/Assistant Set Parent and Quick Edit (Ajax) actions.
  • Fix: For IPTC/EXIF mapping, empty values returned from an "EXIF/Template" template no longer suppress IPTC values that are present.
  • Fix: For the Media/Library grid view, JavaScript errors initializing the Enhanced Media Search toolbar control have been eliminated.
  • Fix: For IPTC/EXIF and custom field mapping, handling of items with corrupted attachment_matadata has been improved to avoid PHP Notice and Warning messages.
  • Fix: When WPML is active, [mla_tag_cloud] returns language-specific terms.
  • Fix: The MLA orientation data source reliably returns "portrait" or "landscape". The WordPress orientaton value, when present, is available as meta:image_meta.orientation.
  • Fix: Media/Assistant filtering by numeric custom field values with leading spaces (such as file_size) has been restored.
  • Fix: Media/Assistant "Unattached" and "Trash" view handling updated for WP 4.2 changes.
  • Fix: JavaScript "spinner" handling updated for WP 4.2 changes.
  • Fix: Code and files for WordPress before version 3.5 has been removed.
Download this release

Release Info

Developer dglingren
Plugin Icon 128x128 Media Library Assistant
Version 2.11
Comparing to
See all releases

Code changes from version 2.10 to 2.11

Files changed (75) hide show
  1. css/mla-media-modal-style.css +1 -2
  2. css/mla-polylang-support.css +81 -0
  3. css/mla-style.css +0 -48
  4. examples/mla-a-z-cloud-example.php.txt +575 -0
  5. examples/mla-custom-field-search-example.php.txt +233 -0
  6. examples/mla-custom-view-example.php.txt +13 -39
  7. examples/mla-list-table-hooks-example.php.txt +86 -4
  8. examples/mla-mapping-parent-data-example.php.txt +160 -0
  9. examples/mla-media-modal-hooks-example.php.txt +356 -19
  10. examples/mla-tax-query-example.php.txt +1 -1
  11. examples/twentytwelve-mla/image.php +7 -0
  12. includes/class-mla-data-pdf.php +4 -4
  13. includes/class-mla-data.php +55 -14
  14. includes/class-mla-edit-media.php +25 -20
  15. includes/class-mla-image-editor.php +0 -309
  16. includes/class-mla-list-table.php +90 -152
  17. includes/class-mla-main.php +375 -687
  18. includes/class-mla-media-modal.php +66 -33
  19. includes/class-mla-mime-types.php +25 -31
  20. includes/class-mla-options.php +59 -17
  21. includes/class-mla-polylang-support.php +2184 -0
  22. includes/class-mla-settings.php +63 -53
  23. includes/class-mla-shortcodes.php +56 -15
  24. includes/class-mla-stream-image.php +0 -363
  25. includes/class-mla-wpml-support.php +1758 -0
  26. includes/mla-main-search-box-template.php +2 -2
  27. includes/mla-media-modal-js-template.php +2 -2
  28. includes/mla-plugin-loader.php +77 -89
  29. includes/mla-stream-image.php +4 -4
  30. index.php +9 -5
  31. js/mla-add-new-bulk-edit-scripts.js +1 -0
  32. js/mla-inline-edit-scripts.js +44 -19
  33. js/mla-inline-edit-scripts.min.js +1 -1
  34. js/mla-inline-edit-upload-scripts.js +16 -3
  35. js/mla-inline-edit-upload-scripts.min.js +1 -1
  36. js/mla-inline-edit-view-scripts.js +16 -3
  37. js/mla-inline-edit-view-scripts.min.js +1 -1
  38. js/mla-inline-mapping-scripts.js +16 -3
  39. js/mla-inline-mapping-scripts.min.js +1 -1
  40. js/mla-media-modal-scripts.js +26 -19
  41. js/mla-media-modal-scripts.min.js +1 -1
  42. js/mla-polylang-support-scripts.js +390 -0
  43. js/mla-polylang-support-scripts.min.js +1 -0
  44. js/mla-set-parent-scripts.js +10 -2
  45. js/mla-set-parent-scripts.min.js +1 -1
  46. js/mla-single-edit-scripts.js +0 -276
  47. js/mla-single-edit-scripts.min.js +0 -1
  48. js/mla-terms-search-scripts.js +10 -3
  49. js/mla-terms-search-scripts.min.js +1 -1
  50. languages/media-library-assistant-en_US.pot +1119 -964
  51. phpDocs/classes.svg +134 -119
  52. phpDocs/classes/MLA.html +60 -80
  53. phpDocs/classes/MLAData.html +1 -1
  54. phpDocs/classes/MLAEdit.html +1 -1
  55. phpDocs/classes/MLAMime.html +2 -2
  56. phpDocs/classes/MLAModal.html +3 -3
  57. phpDocs/classes/MLAMutex.html +1 -194
  58. phpDocs/classes/MLAObjects.html +1 -1
  59. phpDocs/classes/MLAOptions.html +13 -4
  60. phpDocs/classes/MLAPDF.html +1 -1
  61. phpDocs/classes/MLASettings.html +74 -69
  62. phpDocs/classes/MLAShortcodes.html +1 -1
  63. phpDocs/classes/MLAStreamImage.html +1 -117
  64. phpDocs/classes/MLATest.html +1 -18
  65. phpDocs/classes/MLATextWidget.html +1 -1
  66. phpDocs/classes/MLA_Checklist_Walker.html +1 -1
  67. phpDocs/classes/MLA_Image_Editor.html +0 -248
  68. phpDocs/classes/MLA_List_Table.html +77 -81
  69. phpDocs/classes/MLA_Polylang.html +1302 -0
  70. phpDocs/classes/MLA_Upload_List_Table.html +1 -1
  71. phpDocs/classes/MLA_Upload_Optional_List_Table.html +1 -1
  72. phpDocs/classes/MLA_View_List_Table.html +1 -1
  73. phpDocs/classes/MLA_WPML.html +855 -0
  74. phpDocs/classes/MLA_WPML_List_Table.html +1529 -0
  75. phpDocs/classes/MLA_WPML_Table.html +358 -0
css/mla-media-modal-style.css CHANGED
@@ -52,7 +52,7 @@
52
  vertical-align:middle;
53
  }
54
 
55
- .mode-grid.media-frame .media-toolbar input#media-search-input,
56
  .mode-grid.media-frame .media-toolbar input#mla-search-submit {
57
  /* margin-top: 11px; */
58
  position: static;
@@ -112,7 +112,6 @@
112
  max-height: 200px;
113
  }
114
 
115
- /* Required for WP v3.5.x */
116
  .media-sidebar .compat-item .mla-taxonomy-row td.field div.tabs-panel input {
117
  width: 16px;
118
  }
52
  vertical-align:middle;
53
  }
54
 
55
+ .mode-grid.media-frame .media-toolbar input#mla-media-search-input,
56
  .mode-grid.media-frame .media-toolbar input#mla-search-submit {
57
  /* margin-top: 11px; */
58
  position: static;
112
  max-height: 200px;
113
  }
114
 
 
115
  .media-sidebar .compat-item .mla-taxonomy-row td.field div.tabs-panel input {
116
  width: 16px;
117
  }
css/mla-polylang-support.css ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @charset "utf-8";
2
+ /**
3
+ * CSS Document
4
+ *
5
+ * This file contains styling attributes for the Media/Assistant submenu
6
+ * and Bulk Translate areas.
7
+ */
8
+
9
+ /*
10
+ * MLA List Table ID_parent column
11
+ */
12
+ .wp-list-table td.column-ID_parent, .wp-list-table th.column-ID_parent {
13
+ width: auto;
14
+ max-width: auto;
15
+ }
16
+
17
+ /*
18
+ * Bulk Translate area
19
+ */
20
+ #pll-bulk-titles {
21
+ line-height: 140%;
22
+ display: block;
23
+ height: 12em;
24
+ border: 1px solid #ddd;
25
+ overflow-y: scroll;
26
+ padding: 0 5px;
27
+ margin: 0 0 5px;
28
+ }
29
+
30
+ #pll-bulk-titles div {
31
+ margin: 0.8em 0.3em;
32
+ font-style: normal;
33
+ font-size: 11px;
34
+ }
35
+
36
+ #pll-bulk-titles div a {
37
+ cursor: pointer;
38
+ display: block;
39
+ float: left;
40
+ height: 18px;
41
+ margin: 0 3px 0 -2px;
42
+ overflow: hidden;
43
+ position: relative;
44
+ width: 20px;
45
+ }
46
+
47
+ #pll-bulk-titles div a:before {
48
+ position: relative;
49
+ top: -3px;
50
+ }
51
+
52
+ #pll-bulk-titles div a:before {
53
+ background: none;
54
+ color: #bbb;
55
+ content: '\f153';
56
+ display: block !important;
57
+ font: normal 16px/1 'dashicons';
58
+ speak: none;
59
+ margin: 2px 0;
60
+ height: 20px;
61
+ text-align: center;
62
+ width: 20px;
63
+ -webkit-font-smoothing: antialiased !important;
64
+ }
65
+
66
+ #pll-bulk-titles div a:hover:before {
67
+ color: #c00;
68
+ }
69
+
70
+ /**
71
+ * HiDPI Displays
72
+ */
73
+ @media print,
74
+ (-o-min-device-pixel-ratio: 5/4),
75
+ (-webkit-min-device-pixel-ratio: 1.25),
76
+ (min-resolution: 120dpi) {
77
+ #pll-bulk-titles div a,
78
+ #pll-bulk-titles div a:hover {
79
+ background: none !important;
80
+ }
81
+ }
css/mla-style.css CHANGED
@@ -59,54 +59,6 @@ img.mla_media_thumbnail_80_60 {
59
  margin: 1px 8px 0 0;
60
  }
61
 
62
- /*
63
- * MLA Edit single item field labels column
64
- */
65
- .mla-media-item .describe th {
66
- width: 150px
67
- }
68
-
69
- /*
70
- * MLA Display Single Item Image Metadata, Featured in, Inserted in
71
- */
72
- textarea[readonly] {
73
- background-color: rgb(238, 238, 238)
74
- }
75
-
76
- /*
77
- * MLA Display Single Item
78
- */
79
- .has-right-sidebar .mla-inner-sidebar {
80
- clear: right;
81
- float: right;
82
- position: relative;
83
- width: 286px;
84
- margin-top: 10px;
85
- margin-left: 10px;
86
- margin-right: auto;
87
- display:block
88
- }
89
-
90
- .has-right-sidebar .mla-media-single {
91
- width: 100%;
92
- clear: left;
93
- margin-right: -2000px;
94
- float: left
95
- }
96
-
97
- .has-right-sidebar .mla-media-item {
98
- margin-right: 300px;
99
- }
100
-
101
- .has-right-sidebar .mla-media-item table {
102
- width: 100%
103
- }
104
-
105
- .mla-media-item .describe input[type='text'],
106
- .mla-media-item .describe textarea {
107
- width: 100%
108
- }
109
-
110
  /*
111
  * MLA Inline editing - adapted from load-styles.php
112
  */
59
  margin: 1px 8px 0 0;
60
  }
61
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
62
  /*
63
  * MLA Inline editing - adapted from load-styles.php
64
  */
examples/mla-a-z-cloud-example.php.txt ADDED
@@ -0,0 +1,575 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Plugin Name: MLA A-Z Cloud and Collapse-o-Matic Example
4
+ Plugin URI: http://fairtradejudaica.org/media-library-assistant-a-wordpress-plugin/
5
+ Description: Provides an "A-Z cloud/pagination" and expandable gallery example
6
+ Author: David Lingren
7
+ Version: 1.00
8
+ Author URI: http://fairtradejudaica.org/our-story/staff/
9
+
10
+ Copyright 2015 David Lingren
11
+
12
+ This program is free software; you can redistribute it and/or modify
13
+ it under the terms of the GNU General Public License as published by
14
+ the Free Software Foundation; either version 2 of the License, or
15
+ (at your option) any later version.
16
+
17
+ This program is distributed in the hope that it will be useful,
18
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
19
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
+ GNU General Public License for more details.
21
+
22
+ You can get a copy of the GNU General Public License by writing to the
23
+ Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
24
+ */
25
+
26
+ /**
27
+ * Class MLA A-Z Cloud and Collapse-o-Matic Example hooks filters provided by the [mla_gallery] shortcode
28
+ *
29
+ * Call it anything you want, but give it an unlikely and hopefully unique name. Hiding everything
30
+ * else inside a class means this is the only name you have to worry about.
31
+ */
32
+ class MLAAtoZCloudExample {
33
+ /**
34
+ * Initialization function, similar to __construct()
35
+ */
36
+ public static function initialize() {
37
+ // The filters are only useful for front-end posts/pages; exit if in the admin section
38
+ if ( is_admin() )
39
+ return;
40
+
41
+ // Custom A-Z cloud shortcode
42
+ add_shortcode( 'az_cloud', 'MLAAtoZCloudExample::a_to_z_cloud_shortcode' );
43
+ add_shortcode( 'az_gallery', 'MLAAtoZCloudExample::a_to_z_gallery_shortcode' );
44
+
45
+ // [mla_gallery] hooks
46
+ add_filter( 'mla_gallery_attributes', 'MLAAtoZCloudExample::mla_gallery_attributes_filter', 10, 1 );
47
+ add_filter( 'mla_gallery_item_values', 'MLAAtoZCloudExample::mla_gallery_item_values_filter', 10, 1 );
48
+ add_filter( 'mla_gallery_close_values', 'MLAAtoZCloudExample::mla_gallery_close_values_filter', 10, 1 );
49
+ }
50
+
51
+ /**
52
+ * WordPress Shortcode; returns A-Z cloud
53
+ *
54
+ * @since 1.00
55
+ *
56
+ * @param array shortcode parameters
57
+ *
58
+ * @return string shortcode results
59
+ */
60
+ public static function a_to_z_cloud_shortcode( $attr ) {
61
+ global $wpdb;
62
+
63
+ $default_arguments = array(
64
+ 'post_mime_type' => 'application/pdf',
65
+ 'link_href' => '.',
66
+ 'selected_attribute' => 'first_letter',
67
+ 'selected_class' => 'az-current-item',
68
+ 'css_styles' => 'inline',
69
+ 'output' => 'flat', // or 'list'
70
+ 'listtag' => 'ul',
71
+ 'itemtag' => 'li',
72
+ 'separator' => "\n",
73
+ 'single_text' => '%d item',
74
+ 'multiple_text' => '%d items',
75
+ );
76
+
77
+ // Make sure $attr is an array, even if it's empty
78
+ if ( empty( $attr ) ) {
79
+ $attr = array();
80
+ } elseif ( is_string( $attr ) ) {
81
+ $attr = shortcode_parse_atts( $attr );
82
+ }
83
+
84
+ // Accept only the attributes we need and supply defaults
85
+ $arguments = shortcode_atts( $default_arguments, $attr );
86
+
87
+ // Find IDs assigned to taxonomy term(s), if specified
88
+ $ids = self::find_term_relationships( $attr );
89
+
90
+ // Build an array of SQL clauses for the posts query
91
+ $query = array();
92
+ $query_parameters = array();
93
+
94
+ $query[] = "SELECT UCASE( MID( post_title, 1, 1 ) ) AS first_letter, COUNT( ID ) AS count FROM {$wpdb->posts}";
95
+
96
+ if ( empty( $ids ) ) {
97
+ $query[] = "WHERE ( 1=1";
98
+ } else {
99
+ $ids = implode( ',', $ids );
100
+ $query[] = "WHERE ( ID IN ({$ids})";
101
+ }
102
+
103
+ $query[] = "AND post_type = 'attachment'";
104
+
105
+ if ( ! empty( $arguments['post_mime_type'] ) ) {
106
+ if ( 'all' != strtolower( $arguments['post_mime_type'] ) ) {
107
+ $query[] = str_replace( '%', '%%', wp_post_mime_type_where( $arguments['post_mime_type'] ) ) . ')';
108
+ }
109
+ } else {
110
+ $query[] = ')';
111
+ }
112
+
113
+ $query[] = "GROUP BY first_letter";
114
+
115
+ $query = join(' ', $query);
116
+ $results = $wpdb->get_results( $query );
117
+
118
+ /*
119
+ * Make the current item distinctive
120
+ */
121
+ if ( 'inline' == $arguments['css_styles'] ) {
122
+ $output = "<style type='text/css'>\n";
123
+ $output .= " ." . $arguments['selected_class'] . " {\n";
124
+ $output .= " font-weight:bold;\n";
125
+ $output .= " font-size:larger;\n";
126
+ $output .= " }\n";
127
+ $output .= "</style>\n";
128
+ } else {
129
+ $output = '';
130
+ }
131
+
132
+ $is_list = 'list' == $arguments['output'];
133
+
134
+ if ( $is_list ) {
135
+ $output .= '<' . $arguments['listtag'] . '>' . $arguments['separator'];
136
+ }
137
+
138
+ if ( isset( $_REQUEST[ $arguments['selected_attribute'] ] ) ) {
139
+ $current_item = $_REQUEST[ $arguments['selected_attribute'] ];
140
+ } else {
141
+ $current_item = '';
142
+ }
143
+
144
+ foreach( $results as $result ) {
145
+ if ( $current_item == $result->first_letter ) {
146
+ $class = $arguments['selected_class'];
147
+ } else {
148
+ $class = '';
149
+ }
150
+
151
+ $href = sprintf( '%1$s?%2$s=%3$s',
152
+ $arguments['link_href'], $arguments['selected_attribute'], $result->first_letter );
153
+
154
+ if ( 1 == $result->count ) {
155
+ $title = sprintf( $arguments['single_text'], $result->count );
156
+ } else {
157
+ $title = sprintf( $arguments['multiple_text'], $result->count );
158
+ }
159
+
160
+ $link = sprintf( '<a class="%1$s" href="%2$s" title="%3$s">%4$s</a>%5$s',
161
+ $class, $href, $title, $result->first_letter, $arguments['separator'] );
162
+
163
+ if ( $is_list ) {
164
+ $output .= '<' . $arguments['itemtag'] . '>' . $link . '</' . $arguments['itemtag'] . '>' . $arguments['separator'];
165
+ } else {
166
+ $output .= $link . $arguments['separator'];
167
+ }
168
+ }
169
+
170
+ if ( $is_list ) {
171
+ $output .= '</' . $arguments['listtag'] . '>' . $arguments['separator'];
172
+ }
173
+
174
+ return $output;
175
+ } //a_to_z_cloud_shortcode
176
+
177
+ /**
178
+ * WordPress Shortcode; returns items beginning with a particular letter
179
+ *
180
+ * @since 1.00
181
+ *
182
+ * @param array shortcode parameters
183
+ *
184
+ * @return string shortcode results
185
+ */
186
+ public static function a_to_z_gallery_shortcode( $attr ) {
187
+ global $wpdb;
188
+
189
+ $a_to_z_arguments = array(
190
+ 'selected_attribute' => 'first_letter',
191
+ 'collapse_o_matic' => 'true',
192
+ 'az_output' => 'list', // or 'flat'
193
+ 'az_listtag' => 'ul',
194
+ 'az_itemtag' => 'li',
195
+ 'az_separator' => "\n",
196
+ );
197
+
198
+ $default_arguments = array_merge( array(
199
+ 'post_mime_type' => 'application/pdf',
200
+ 'mla_fixed_part' => 'array()',
201
+ 'mla_caption' => '{+mla_fixed_part+}',
202
+ 'size' => 'medium',
203
+ 'columns' => '6',
204
+ 'link' => 'file', ),
205
+ $a_to_z_arguments
206
+ );
207
+
208
+ // Make sure we have an array of shortcode parameters
209
+ if ( empty( $attr ) ) {
210
+ $attr = array();
211
+ } elseif ( is_string( $attr ) ) {
212
+ $attr = shortcode_parse_atts( $attr );
213
+ }
214
+
215
+ // Filter the attributes we need and supply defaults
216
+ $arguments = shortcode_atts( $default_arguments, $attr );
217
+
218
+ /*
219
+ * Compose the attributes we will pass to [mla_gallery],
220
+ * handling embedded quotes
221
+ */
222
+ $mla_arguments = '';
223
+ foreach ( array_merge( $attr, $arguments ) as $key => $value ) {
224
+ if ( array_key_exists( $key, $a_to_z_arguments ) ) {
225
+ continue;
226
+ }
227
+
228
+ $slashed = addcslashes( $value, chr(0).chr(7).chr(8)."\f\n\r\t\v\"\\\$" );
229
+ if ( ( false !== strpos( $value, ' ' ) ) || ( false !== strpos( $value, '\'' ) ) || ( $slashed != $value ) ) {
230
+ $value = '"' . $slashed . '"';
231
+ }
232
+
233
+ $mla_arguments .= empty( $mla_arguments ) ? $key . '=' . $value : ' ' . $key . '=' . $value;
234
+ } // foreach $attr
235
+
236
+ if ( isset( $_REQUEST[ $arguments['selected_attribute'] ] ) ) {
237
+ $current_item = $_REQUEST[ $arguments['selected_attribute'] ];
238
+
239
+ // Find IDs assigned to taxonomy term(s), if specified
240
+ $ids = self::find_term_relationships( $attr );
241
+
242
+ // Build an array of SQL clauses, then run the query
243
+ $query = array();
244
+ $query_parameters = array();
245
+
246
+ $query[] = "SELECT post_title, ID FROM {$wpdb->posts}";
247
+
248
+ if ( empty( $ids ) ) {
249
+ $query[] = "WHERE ( 1=1";
250
+ } else {
251
+ $ids = implode( ',', $ids );
252
+ $query[] = "WHERE ( ID IN ({$ids})";
253
+ }
254
+
255
+ $query[] = "AND UCASE( MID( post_title, 1, 1 ) ) = '" . $current_item . "'";
256
+ $query[] = "AND post_type = 'attachment'";
257
+
258
+ if ( ! empty( $arguments['post_mime_type'] ) ) {
259
+ if ( 'all' != strtolower( $arguments['post_mime_type'] ) ) {
260
+ $query[] = str_replace( '%', '%%', wp_post_mime_type_where( $arguments['post_mime_type'] ) ) . ')';
261
+ }
262
+ } else {
263
+ $query[] = ')';
264
+ }
265
+
266
+ $query[] = "ORDER BY post_title";
267
+
268
+ $query = join(' ', $query);
269
+ $results = $wpdb->get_results( $query );
270
+ } else {
271
+ return "Click on a letter to see the song list.\n";
272
+ }
273
+
274
+ $is_list = 'list' == strtolower( trim( $arguments['az_output'] ) );
275
+ $is_collapse = 'true' == strtolower( trim( $arguments['collapse_o_matic'] ) );
276
+
277
+ $output = '';
278
+ $old_song = NULL;
279
+ $old_ids = array();
280
+ // Accumulate this directly to allow quote and double-quote characters in content
281
+ self::$mla_fixed_values = array();
282
+
283
+ if ( $is_list && ! empty( $arguments['az_listtag'] ) ) {
284
+ $output .= "<{$arguments['az_listtag']}>{$arguments['az_separator']}";
285
+ }
286
+
287
+ foreach ( $results as $result ) {
288
+ // Find the song title and optional part
289
+ $title = $result->post_title;
290
+ $divide = strpos( $title, ' - ' );
291
+ if ( false === $divide ) {
292
+ $song = $title;
293
+ $part = 'All Parts';
294
+ } else {
295
+ $song = substr( $title, 0, $divide );
296
+ $part = substr( $title, $divide + 3 );
297
+ }
298
+
299
+ // If the song has changed, output the previous entry
300
+ if ( $old_song && $old_song != $song ) {
301
+ $output .= self::format_title_and_gallery( $old_song, $old_ids, $mla_arguments, $arguments );
302
+
303
+ $old_song = $song;
304
+ $old_ids = array();
305
+ self::$mla_fixed_values = array();
306
+ }
307
+
308
+ // Accumulate the parts
309
+ $old_song = $song;
310
+ $old_ids[] = $result->ID;
311
+ self::$mla_fixed_values['mla_fixed_part'][] = $part;
312
+ }
313
+
314
+ // Flush the last entry
315
+ if ( $old_song ) {
316
+ $output .= self::format_title_and_gallery( $old_song, $old_ids, $mla_arguments, $arguments );
317
+ }
318
+
319
+ if ( $is_list && ! empty( $arguments['az_listtag'] ) ) {
320
+ $output .= "</{$arguments['az_listtag']}>{$arguments['az_separator']}";
321
+ }
322
+
323
+ return $output;
324
+ } //a_to_z_gallery_shortcode
325
+
326
+ /**
327
+ * Compose a single item title and parts gallery
328
+ *
329
+ * @since 1.00
330
+ *
331
+ * @param string item title
332
+ * @param array part ID values
333
+ * @param array [mla_gallery] parameters
334
+ * @param array formating parameters
335
+ *
336
+ * @return string markup for title and gallery
337
+ */
338
+ private static function format_title_and_gallery( $title, $ids, $mla_arguments, $arguments ) {
339
+ $is_list = 'list' == strtolower( trim( $arguments['az_output'] ) );
340
+ $is_collapse = 'true' == strtolower( trim( $arguments['collapse_o_matic'] ) );
341
+ $output = '';
342
+
343
+ if ( $is_list ) {
344
+ $output .= "<{$arguments['az_itemtag']}>{$arguments['az_separator']}";
345
+ }
346
+
347
+ if ( $is_collapse ) {
348
+ $output .= "[expand title='" . esc_attr( $title ) . "']{$arguments['az_separator']}";
349
+ } else {
350
+ $output .= "{$title}<br>{$arguments['az_separator']}";
351
+ }
352
+
353
+ $output .= "[mla_gallery ids='" . implode( ',', $ids ) . "' ";
354
+ $output .= $mla_arguments . "]{$arguments['az_separator']}";
355
+
356
+ if ( $is_collapse ) {
357
+ $output .= "[/expand]{$arguments['az_separator']}";
358
+ }
359
+
360
+ if ( $is_list ) {
361
+ $output .= "</{$arguments['az_itemtag']}>{$arguments['az_separator']}";
362
+ }
363
+
364
+ return do_shortcode( $output );
365
+ } //format_title_and_gallery
366
+
367
+ /**
368
+ * Find items assigned to taxonomy term(s)
369
+ *
370
+ * @since 1.00
371
+ *
372
+ * @param array shortcode parameters
373
+ *
374
+ * @return array ID values of objects assigned to the term(s), if any
375
+ */
376
+ private static function find_term_relationships( $attr ) {
377
+ global $wpdb;
378
+
379
+ // Start with empty "taxonomy" parameter values
380
+ $ttids = array();
381
+
382
+ // Find taxonomy argument, if present, and collect terms
383
+ $taxonomies = get_taxonomies( array( 'object_type' => array( 'attachment' ) ), 'names' );
384
+ foreach( $taxonomies as $taxonomy ) {
385
+ if ( empty( $attr[ $taxonomy ] ) ) {
386
+ continue;
387
+ }
388
+
389
+ // Found the taxonomy; collect the terms
390
+ $include_children = isset( $attr['include_children'] ) && 'true' == strtolower( trim( $my_query_vars['include_children'] ) );
391
+
392
+ // Allow for multiple term slug values
393
+ $terms = array();
394
+ $slugs = explode( ',', $attr[ $taxonomy ] );
395
+ foreach ( $slugs as $slug ) {
396
+ $args = array( 'slug' => $slug, 'hide_empty' => false );
397
+ $terms = array_merge( $terms, get_terms( $taxonomy, $args ) );
398
+ }
399
+
400
+ foreach( $terms as $term ) {
401
+ // Index by ttid to remove duplicates
402
+ $ttids[ $term->term_taxonomy_id ] = $term->term_taxonomy_id;
403
+
404
+ if ( $include_children ) {
405
+ $args = array( 'child_of' => $term->term_id, 'hide_empty' => false );
406
+ $children = get_terms( $taxonomy, $args );
407
+ foreach( $children as $child ) {
408
+ $ttids[] = $child->term_taxonomy_id;
409
+ }
410
+ } // include_children
411
+ } // $term
412
+
413
+ break;
414
+ }
415
+
416
+ // Pre-select the items assigned to the taxonomy terms
417
+ $ids = array();
418
+ if ( ! empty( $ttids ) ) {
419
+ // Build an array of SQL clauses for the term_relationships query
420
+ $query = array();
421
+ $query_parameters = array();
422
+
423
+ $query[] = "SELECT DISTINCT tr.object_id FROM {$wpdb->term_relationships} as tr";
424
+
425
+ $placeholders = array();
426
+ if ( ! empty( $ttids ) ) {
427
+ foreach ( $ttids as $ttid ) {
428
+ $placeholders[] = '%s';
429
+ $query_parameters[] = $ttid;
430
+ }
431
+ } else {
432
+ $placeholders[] = '%s';
433
+ $query_parameters[] = '0';
434
+ }
435
+
436
+ $query[] = 'WHERE ( tr.term_taxonomy_id IN (' . join( ',', $placeholders ) . ') )';
437
+ $query = join(' ', $query);
438
+ $results = $wpdb->get_results( $wpdb->prepare( $query, $query_parameters ) );
439
+ if ( is_array( $results ) ) {
440
+ foreach ( $results as $id ) {
441
+ $ids[] = $id->object_id;
442
+ }
443
+ }
444
+ }
445
+
446
+ return $ids;
447
+ } //find_term_relationships
448
+
449
+ /**
450
+ * Save the shortcode attributes
451
+ */
452
+ private static $shortcode_attributes = array();
453
+
454
+ /*
455
+ * $mla_fixed_values stores the parameter(s) and values. If none are found, the
456
+ * initialization code sets it to false so the logic is quickly bypassed.
457
+ */
458
+ private static $mla_fixed_values = NULL;
459
+
460
+ /**
461
+ * MLA Gallery (Display) Attributes
462
+ *
463
+ * This filter lets you record or modify the arguments passed in to the shortcode
464
+ * before they are merged with the default arguments used for the gallery display.
465
+ *
466
+ * The $shortcode_attributes array is where you will find your own parameters that
467
+ * are coded in the shortcode, e.g.:
468
+ * [mla_gallery mla_fixed_caption="array('test1','test2')" mla_caption="{+mla_fixed_caption+}"].
469
+ */
470
+ public static function mla_gallery_attributes_filter( $shortcode_attributes ) {
471
+ /*
472
+ * Save the attributes for use in the later filter
473
+ */
474
+ self::$shortcode_attributes = $shortcode_attributes;
475
+
476
+ return $shortcode_attributes;
477
+ } // mla_gallery_attributes_filter
478
+
479
+ /**
480
+ * MLA Gallery Item Values
481
+ *
482
+ * @since 1.00
483
+ *
484
+ * @param array parameter_name => parameter_value pairs
485
+ *
486
+ * @return array updated substitution parameter name => value pairs
487
+ */
488
+ public static function mla_gallery_item_values_filter( $item_values ) {
489
+ /*
490
+ * We use shortcode parameters of our own to apply our filters on a
491
+ * gallery-by-gallery basis, leaving other [mla_gallery] instances untouched.
492
+ * If no "mla_fixed_" parameters are present, we have nothing to do. Here is
493
+ * an example of how the custom parameter can be used:
494
+ *
495
+ * [mla_gallery ids="2621,2622" mla_fixed_title="array('my title','my other title')" mla_image_attributes="title='{+mla_fixed_title+}'"]
496
+ *
497
+ * You can have as many "mla_fixed_" parameters as you need for different values.
498
+ */
499
+
500
+ if ( false === self::$mla_fixed_values ) {
501
+ return $item_values; // leave them unchanged
502
+ }
503
+
504
+ /*
505
+ * Evaluate the parameter value(s) once per page load.
506
+ */
507
+ if ( NULL === self::$mla_fixed_values ) {
508
+ self::$mla_fixed_values = array();
509
+ foreach ( self::$shortcode_attributes as $parmkey => $parmvalue ) {
510
+ if ( 'mla_fixed_' == substr( $parmkey, 0, 10 ) ) {
511
+ if ( 'array(' == substr( $parmvalue, 0, 6 ) ) {
512
+ $function = @create_function( '', 'return ' . self::$shortcode_attributes[ $parmkey ] . ';' );
513
+ if ( is_callable( $function ) ) {
514
+ self::$mla_fixed_values[ $parmkey ] = $function();
515
+
516
+ if ( ! is_array( self::$mla_fixed_values[ $parmkey ] ) ) {
517
+ self::$mla_fixed_values[ $parmkey ] = array();
518
+ }
519
+ } else {
520
+ self::$mla_fixed_values[ $parmkey ] = array();
521
+ }
522
+ } else {
523
+ self::$mla_fixed_values[ $parmkey ] = explode( ",", $parmvalue );
524
+ if ( false === self::$mla_fixed_values[ $parmkey ] ) {
525
+ self::$mla_fixed_values[ $parmkey ] = array();
526
+ }
527
+ }
528
+ } // found mla_fixed_
529
+ } // foreach parameter
530
+
531
+ if ( empty( self::$mla_fixed_values ) ) {
532
+ self::$mla_fixed_values = false;
533
+ return $item_values;
534
+ }
535
+ } // initialization code
536
+
537
+ /*
538
+ * Apply the appropriate value to the current item.
539
+ */
540
+ foreach ( self::$mla_fixed_values as $mla_fixed_key => $mla_fixed_value ) {
541
+ /*
542
+ * Apply the appropriate value to the current item.
543
+ */
544
+ if ( isset( $mla_fixed_value[ $item_values['index'] - 1 ] ) ) {
545
+ $item_values[ $mla_fixed_key ] = $mla_fixed_value[ $item_values['index'] - 1 ];
546
+ }
547
+ }
548
+
549
+ return $item_values;
550
+ } // mla_gallery_item_values_filter
551
+
552
+ /**
553
+ * MLA Gallery Close Values
554
+ *
555
+ * @since 1.02
556
+ *
557
+ * @param array parameter_name => parameter_value pairs
558
+ *
559
+ * @return array updated substitution parameter name => value pairs
560
+ */
561
+ public static function mla_gallery_close_values_filter( $markup_values ) {
562
+ /*
563
+ * Reset $mla_fixed_values for multiple shortcodes on the same post/page
564
+ */
565
+ self::$mla_fixed_values = NULL;
566
+
567
+ return $markup_values;
568
+ } // mla_gallery_close_values_filter
569
+ } // Class MLAAtoZCloudExample
570
+
571
+ /*
572
+ * Install the filters at an early opportunity
573
+ */
574
+ add_action('init', 'MLAAtoZCloudExample::initialize');
575
+ ?>
examples/mla-custom-field-search-example.php.txt ADDED
@@ -0,0 +1,233 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Extends the Media/Assistant "Search Media" box to custom field values
4
+ *
5
+ * @package MLA Custom Field Search Example
6
+ * @version 1.02
7
+ */
8
+
9
+ /*
10
+ Plugin Name: MLA Custom Field Search Example
11
+ Plugin URI: http://fairtradejudaica.org/media-library-assistant-a-wordpress-plugin/
12
+ Description: Extends the Media/Assistant "Search Media" box to custom field values
13
+ Author: David Lingren
14
+ Version: 1.02
15
+ Author URI: http://fairtradejudaica.org/our-story/staff/
16
+
17
+ Copyright 2014 - 2015 David Lingren
18
+
19
+ This program is free software; you can redistribute it and/or modify
20
+ it under the terms of the GNU General Public License as published by
21
+ the Free Software Foundation; either version 2 of the License, or
22
+ (at your option) any later version.
23
+
24
+ This program is distributed in the hope that it will be useful,
25
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
26
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27
+ GNU General Public License for more details.
28
+
29
+ You can get a copy of the GNU General Public License by writing to the
30
+ Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
31
+ */
32
+
33
+ /**
34
+ * Class MLA Custom Field Search Example hooks one of the filters provided by the MLA_List_Table class
35
+ *
36
+ * Call it anything you want, but give it an unlikely and hopefully unique name. Hiding everything
37
+ * else inside a class means this is the only name you have to worry about.
38
+ *
39
+ * @package MLA Custom Field Search Example
40
+ * @since 1.00
41
+ */
42
+ class MLACustomFieldSearchExample {
43
+ /**
44
+ * Initialization function, similar to __construct()
45
+ *
46
+ * @since 1.00
47
+ *
48
+ * @return void
49
+ */
50
+ public static function initialize() {
51
+ // The filters are only useful for the admin section; exit in the front-end posts/pages
52
+ if ( ! is_admin() )
53
+ return;
54
+
55
+ // Defined in /media-library-assistant/includes/class-mla-main.php
56
+ add_filter( 'mla_list_table_new_instance', 'MLACustomFieldSearchExample::mla_list_table_new_instance', 10, 1 );
57
+
58
+ // Defined in /media-library-assistant/includes/class-mla-data.php
59
+ add_filter( 'mla_list_table_query_final_terms', 'MLACustomFieldSearchExample::mla_list_table_query_final_terms', 10, 1 );
60
+ }
61
+
62
+ /**
63
+ * Extend the MLA_List_Table class
64
+ *
65
+ * This filter gives you an opportunity to extend the MLA_List_Table class.
66
+ * You can also use this filter to inspect or modify any of the $_REQUEST arguments.
67
+ *
68
+ * @since 1.00
69
+ *
70
+ * @param object $mla_list_table NULL, to indicate no extension/use the base class.
71
+ *
72
+ * @return object updated mla_list_table object.
73
+ */
74
+ public static function mla_list_table_new_instance( $mla_list_table ) {
75
+ /*
76
+ * Look for the special "custom:" prefix in the Search Media text box,
77
+ * after checking for the "debug" prefixes.
78
+ */
79
+ if ( isset( $_REQUEST['s'] ) ) {
80
+ switch ( substr( $_REQUEST['s'], 0, 3 ) ) {
81
+ case '>|<':
82
+ self::$custom_field_parameters['debug'] = 'console';
83
+ $start = 3;
84
+ break;
85
+ case '<|>':
86
+ self::$custom_field_parameters['debug'] = 'log';
87
+ $start = 3;
88
+ break;
89
+ default:
90
+ $start = 0;
91
+ }
92
+
93
+ if ( 'custom:' == substr( $_REQUEST['s'], $start, 7 ) ) {
94
+ self::$custom_field_parameters['s'] = substr( $_REQUEST['s'], $start + 7 );
95
+ unset( $_REQUEST['s'] );
96
+ self::$custom_field_parameters['mla_search_connector'] = $_REQUEST['mla_search_connector'];
97
+ unset( $_REQUEST['mla_search_connector'] );
98
+ self::$custom_field_parameters['mla_search_fields'] = $_REQUEST['mla_search_fields'];
99
+ unset( $_REQUEST['mla_search_fields'] );
100
+ } // custom: prefix
101
+ } // isset s=custom:
102
+
103
+ return $mla_list_table;
104
+ } // mla_list_table_new_instance
105
+
106
+ /**
107
+ * Custom Field Search "parameters"
108
+ *
109
+ * @since 1.01
110
+ *
111
+ * @var array
112
+ */
113
+ public static $custom_field_parameters = array();
114
+
115
+ /**
116
+ * Filter the WP_Query request parameters for the prepare_items query
117
+ *
118
+ * Gives you an opportunity to change the terms of the prepare_items query
119
+ * after they are processed by the "Prepare List Table Query" handler.
120
+ *
121
+ * @since 1.01
122
+ *
123
+ * @param array WP_Query request prepared by "Prepare List Table Query"
124
+ *
125
+ * @return array updated WP_Query request
126
+ */
127
+ public static function mla_list_table_query_final_terms( $request ) {
128
+ /*
129
+ * If $request['offset'] and $request['posts_per_page'] are set, this is the "prepare_items" request.
130
+ * If they are NOT set, this is a "view count" request, i.e., to get the count for a custom view.
131
+ *
132
+ * MLAData::$query_parameters and MLAData::$search_parameters contain
133
+ * additional parameters used in some List Table queries.
134
+ */
135
+ if ( ! ( isset( $request['offset'] ) && isset( $request['posts_per_page'] ) ) ) {
136
+ return $request;
137
+ }
138
+
139
+ if ( empty( self::$custom_field_parameters ) ) {
140
+ return $request;
141
+ }
142
+
143
+ if ( isset( self::$custom_field_parameters['debug'] ) ) {
144
+ MLAData::$query_parameters['debug'] = self::$custom_field_parameters['debug'];
145
+ }
146
+
147
+ // Apply default field name?
148
+ if ( '=' == substr( self::$custom_field_parameters['s'], 0, 1 ) ) {
149
+ $tokens = array( 'File Size', substr( self::$custom_field_parameters['s'], 1 ) );
150
+ } else {
151
+ $tokens = explode( '=', self::$custom_field_parameters['s'] ) ;
152
+ }
153
+
154
+ // See if the custom field name is present, followed by "=" and a value
155
+ if ( 1 < count( $tokens ) ) {
156
+ $field = array_shift( $tokens );
157
+ $value = implode( '=', $tokens );
158
+ } else {
159
+ // Supply a default custom field name
160
+ $field = 'File Size';
161
+ $value = $tokens[0];
162
+ }
163
+
164
+ /*
165
+ * Parse the query, remove MLA-specific elements, fix numeric and "commas" format fields
166
+ */
167
+ $tokens = MLAMime::mla_prepare_view_query( 'custom_field_search', 'custom:' . $field . '=' . $value );
168
+ $tokens = $tokens['meta_query'];
169
+
170
+ /*
171
+ * Matching a meta_value to NULL requires a LEFT JOIN to a view and a special WHERE clause;
172
+ * MLA filters will handle this case.
173
+ */
174
+ if ( isset( $tokens['key'] ) ) {
175
+ MLAData::$query_parameters['use_postmeta_view'] = true;
176
+ MLAData::$query_parameters['postmeta_key'] = $tokens['key'];
177
+ MLAData::$query_parameters['postmeta_value'] = NULL;
178
+ return $request;
179
+ }
180
+
181
+ /*
182
+ * Process "normal" meta_query
183
+ */
184
+ $query = array( 'relation' => $tokens['relation'] );
185
+ $padded_values = array();
186
+ $patterns = array();
187
+ foreach ( $tokens as $key => $value ) {
188
+ if ( ! is_numeric( $key ) ) {
189
+ continue;
190
+ }
191
+
192
+ if ( in_array( $value['key'], array( 'File Size', 'pixels', 'width', 'height' ) ) ) {
193
+ if ( '=' == $value['compare'] ) {
194
+ $value['value'] = str_pad( $value['value'], 15, ' ', STR_PAD_LEFT );
195
+ $padded_values[ trim( $value['value'] ) ] = $value['value'];
196
+ } else {
197
+ $value['value'] = '%' . $value['value'];
198
+ }
199
+ }
200
+
201
+ if ( 'LIKE' == $value['compare'] ) {
202
+ $patterns[] = $value['value'];
203
+ }
204
+
205
+ $query[] = $value;
206
+ }
207
+
208
+ if ( ! empty( $padded_values ) ) {
209
+ MLAData::$query_parameters['mla-metavalue'] = $padded_values;
210
+ }
211
+
212
+ if ( ! empty( $patterns ) ) {
213
+ MLAData::$query_parameters['patterns'] = $patterns;
214
+ }
215
+
216
+ /*
217
+ * Combine with an existing "custom view" meta_query, if present
218
+ */
219
+ if ( isset( $request['meta_query'] ) ) {
220
+ $request['meta_query'] = array( 'relation' => 'AND', $request['meta_query'], $query );
221
+ } else {
222
+ $request['meta_query'] = $query;
223
+ }
224
+
225
+ return $request;
226
+ } // mla_list_table_query_final_terms
227
+ } // Class MLACustomFieldSearchExample
228
+
229
+ /*
230
+ * Install the filters at an early opportunity
231
+ */
232
+ add_action('init', 'MLACustomFieldSearchExample::initialize');
233
+ ?>
examples/mla-custom-view-example.php.txt CHANGED
@@ -6,7 +6,7 @@
6
  * non-published parent posts/pages.
7
  *
8
  * @packageMLA Custom View Example
9
- * @version 1.00
10
  */
11
 
12
  /*
@@ -14,7 +14,7 @@ Plugin Name:MLA Custom View Example
14
  Plugin URI: http://fairtradejudaica.org/media-library-assistant-a-wordpress-plugin/
15
  Description: Adds a Media/Assistant submenu table view for items attached to non-published parent posts/pages.
16
  Author: David Lingren
17
- Version: 1.00
18
  Author URI: http://fairtradejudaica.org/our-story/staff/
19
 
20
  Copyright 2014 - 2015 David Lingren
@@ -75,7 +75,7 @@ class MLACustomViewExample {
75
  * Defined in /media-library-assistant/includes/class-mla-list-table.php
76
  */
77
  add_filter( 'mla_list_table_submenu_arguments', 'MLACustomViewExample::mla_list_table_submenu_arguments', 10, 2 );
78
-
79
  add_filter( 'mla_list_table_prepare_items_pagination', 'MLACustomViewExample::mla_list_table_prepare_items_pagination', 10, 2 );
80
  add_filter( 'mla_list_table_prepare_items_total_items', 'MLACustomViewExample::mla_list_table_prepare_items_total_items', 10, 2 );
81
  add_filter( 'mla_list_table_prepare_items_the_items', 'MLACustomViewExample::mla_list_table_prepare_items_the_items', 10, 2 );
@@ -101,18 +101,13 @@ class MLACustomViewExample {
101
  * Calculate the common values once per page load
102
  */
103
  if ( is_null( $posts_per_view ) ) {
104
- $items = (integer) $wpdb->get_var( "SELECT COUNT(*) FROM {$wpdb->posts} WHERE post_parent > 0 AND post_type = 'attachment' AND post_status = 'inherit'" );
105
- $posts_per_view = array( 'attached' => $items );
106
-
107
  $items = (integer) $wpdb->get_var( "SELECT COUNT(*) FROM {$wpdb->posts} AS item INNER JOIN {$wpdb->posts} AS parent ON item.post_parent = parent.ID WHERE item.post_parent > 0 AND item.post_type = 'attachment' AND item.post_status = 'inherit' AND parent.post_status IN ( 'draft', 'future', 'pending', 'trash' )" );
108
- $posts_per_view['unpublished'] = $items;
109
-
110
  $view_singular = array (
111
- 'attached' => __( 'Attached', 'mla-custom-table-example' ),
112
  'unpublished' => __( 'Unpublished', 'mla-custom-table-example' ),
113
  );
114
  $view_plural = array (
115
- 'attached' => __( 'Attached', 'mla-custom-table-example' ),
116
  'unpublished' => __( 'Unpublished', 'mla-custom-table-example' ),
117
  );
118
  }
@@ -133,7 +128,7 @@ class MLACustomViewExample {
133
  $query = array( 'cve_view' => $view_slug );
134
  $base_url = 'upload.php?page=mla-menu';
135
  $class = ( $view_slug == $current_view ) ? ' class="current"' : '';
136
-
137
  return "<a href='" . add_query_arg( $query, $base_url ) . "'$class>" . sprintf( translate_nooped_plural( $nooped_plural, $post_count, 'mla-custom-table-example' ), number_format_i18n( $post_count ) ) . '</a>';
138
  }
139
 
@@ -156,9 +151,6 @@ class MLACustomViewExample {
156
  // See if the current view is a custom view
157
  if ( isset( $_REQUEST['cve_view'] ) ) {
158
  switch( $_REQUEST['cve_view'] ) {
159
- case 'attached':
160
- $current_view = 'attached';
161
- break;
162
  case 'unpublished':
163
  $current_view = 'unpublished';
164
  break;
@@ -168,7 +160,7 @@ class MLACustomViewExample {
168
  } else {
169
  $current_view = '';
170
  }
171
-
172
  foreach ( $views as $slug => $view ) {
173
  // Find/update the current view
174
  if ( strpos( $view, ' class="current"' ) ) {
@@ -180,16 +172,11 @@ class MLACustomViewExample {
180
  }
181
  } // each view
182
 
183
- $value = self::_get_view( 'attached', $current_view );
184
- if ( $value ) {
185
- $views['attached'] = $value;
186
- }
187
-
188
  $value = self::_get_view( 'unpublished', $current_view );
189
  if ( $value ) {
190
  $views['unpublished'] = $value;
191
  }
192
-
193
  return $views;
194
  } // views_media_page_mla_menu
195
 
@@ -211,7 +198,7 @@ class MLACustomViewExample {
211
  if ( isset( $_REQUEST['cve_view'] ) ) {
212
  $submenu_arguments['cve_view'] = $_REQUEST['cve_view'];
213
  }
214
-
215
  return $submenu_arguments;
216
  } // mla_list_table_submenu_arguments
217
 
@@ -226,7 +213,7 @@ class MLACustomViewExample {
226
  'per_page' => NULL,
227
  'current_page' => NULL,
228
  );
229
-
230
  /**
231
  * Filter the pagination parameters for prepare_items()
232
  *
@@ -267,9 +254,6 @@ class MLACustomViewExample {
267
 
268
  if ( isset( $_REQUEST['cve_view'] ) ) {
269
  switch( $_REQUEST['cve_view'] ) {
270
- case 'attached':
271
- // Already handled in the total items filter
272
- break;
273
  case 'unpublished':
274
  $pieces['join'] = " INNER JOIN {$wpdb->posts} AS parent ON {$wpdb->posts}.post_parent = parent.ID" . $pieces['join'];
275
  $pieces['where'] = " AND parent.post_status IN ( 'draft', 'future', 'pending', 'trash' )" . $pieces['where'];
@@ -277,7 +261,7 @@ class MLACustomViewExample {
277
  default:
278
  } // cve_view
279
  }
280
-
281
  return $pieces;
282
  } // posts_clauses
283
 
@@ -296,16 +280,9 @@ class MLACustomViewExample {
296
  */
297
  public static function mla_list_table_prepare_items_total_items( $total_items, $mla_list_table ) {
298
  global $wpdb;
299
-
300
  if ( isset( $_REQUEST['cve_view'] ) ) {
301
  switch( $_REQUEST['cve_view'] ) {
302
- case 'attached':
303
- /*
304
- * This case is simple; we add a parameter to the request and let
305
- * the default query do the job.
306
- */
307
- $_REQUEST['detached'] = '0';
308
- break;
309
  case 'unpublished':
310
  // Defined in /wp-includes/query.php, function get_posts()
311
  add_filter( 'posts_clauses', 'MLACustomViewExample::posts_clauses', 10, 1 );
@@ -320,7 +297,7 @@ class MLACustomViewExample {
320
 
321
  return $total_items;
322
  } // mla_list_table_prepare_items_total_items
323
-
324
  /**
325
  * Filter the items returned by prepare_items()
326
  *
@@ -339,9 +316,6 @@ class MLACustomViewExample {
339
 
340
  if ( isset( $_REQUEST['cve_view'] ) ) {
341
  switch( $_REQUEST['cve_view'] ) {
342
- case 'attached':
343
- // Already handled in the total items filter
344
- break;
345
  case 'unpublished':
346
  add_filter( 'posts_clauses', 'MLACustomViewExample::posts_clauses', 10, 1 );
347
  $current_page = self::$pagination_parameters['current_page'];
6
  * non-published parent posts/pages.
7
  *
8
  * @packageMLA Custom View Example
9
+ * @version 1.01
10
  */
11
 
12
  /*
14
  Plugin URI: http://fairtradejudaica.org/media-library-assistant-a-wordpress-plugin/
15
  Description: Adds a Media/Assistant submenu table view for items attached to non-published parent posts/pages.
16
  Author: David Lingren
17
+ Version: 1.01
18
  Author URI: http://fairtradejudaica.org/our-story/staff/
19
 
20
  Copyright 2014 - 2015 David Lingren
75
  * Defined in /media-library-assistant/includes/class-mla-list-table.php
76
  */
77
  add_filter( 'mla_list_table_submenu_arguments', 'MLACustomViewExample::mla_list_table_submenu_arguments', 10, 2 );
78
+
79
  add_filter( 'mla_list_table_prepare_items_pagination', 'MLACustomViewExample::mla_list_table_prepare_items_pagination', 10, 2 );
80
  add_filter( 'mla_list_table_prepare_items_total_items', 'MLACustomViewExample::mla_list_table_prepare_items_total_items', 10, 2 );
81
  add_filter( 'mla_list_table_prepare_items_the_items', 'MLACustomViewExample::mla_list_table_prepare_items_the_items', 10, 2 );
101
  * Calculate the common values once per page load
102
  */
103
  if ( is_null( $posts_per_view ) ) {
 
 
 
104
  $items = (integer) $wpdb->get_var( "SELECT COUNT(*) FROM {$wpdb->posts} AS item INNER JOIN {$wpdb->posts} AS parent ON item.post_parent = parent.ID WHERE item.post_parent > 0 AND item.post_type = 'attachment' AND item.post_status = 'inherit' AND parent.post_status IN ( 'draft', 'future', 'pending', 'trash' )" );
105
+ $posts_per_view = array( 'unpublished' => $items );
106
+
107
  $view_singular = array (
 
108
  'unpublished' => __( 'Unpublished', 'mla-custom-table-example' ),
109
  );
110
  $view_plural = array (
 
111
  'unpublished' => __( 'Unpublished', 'mla-custom-table-example' ),
112
  );
113
  }
128
  $query = array( 'cve_view' => $view_slug );
129
  $base_url = 'upload.php?page=mla-menu';
130
  $class = ( $view_slug == $current_view ) ? ' class="current"' : '';
131
+
132
  return "<a href='" . add_query_arg( $query, $base_url ) . "'$class>" . sprintf( translate_nooped_plural( $nooped_plural, $post_count, 'mla-custom-table-example' ), number_format_i18n( $post_count ) ) . '</a>';
133
  }
134
 
151
  // See if the current view is a custom view
152
  if ( isset( $_REQUEST['cve_view'] ) ) {
153
  switch( $_REQUEST['cve_view'] ) {
 
 
 
154
  case 'unpublished':
155
  $current_view = 'unpublished';
156
  break;
160
  } else {
161
  $current_view = '';
162
  }
163
+
164
  foreach ( $views as $slug => $view ) {
165
  // Find/update the current view
166
  if ( strpos( $view, ' class="current"' ) ) {
172
  }
173
  } // each view
174
 
 
 
 
 
 
175
  $value = self::_get_view( 'unpublished', $current_view );
176
  if ( $value ) {
177
  $views['unpublished'] = $value;
178
  }
179
+
180
  return $views;
181
  } // views_media_page_mla_menu
182
 
198
  if ( isset( $_REQUEST['cve_view'] ) ) {
199
  $submenu_arguments['cve_view'] = $_REQUEST['cve_view'];
200
  }
201
+
202
  return $submenu_arguments;
203
  } // mla_list_table_submenu_arguments
204
 
213
  'per_page' => NULL,
214
  'current_page' => NULL,
215
  );
216
+
217
  /**
218
  * Filter the pagination parameters for prepare_items()
219
  *
254
 
255
  if ( isset( $_REQUEST['cve_view'] ) ) {
256
  switch( $_REQUEST['cve_view'] ) {
 
 
 
257
  case 'unpublished':
258
  $pieces['join'] = " INNER JOIN {$wpdb->posts} AS parent ON {$wpdb->posts}.post_parent = parent.ID" . $pieces['join'];
259
  $pieces['where'] = " AND parent.post_status IN ( 'draft', 'future', 'pending', 'trash' )" . $pieces['where'];
261
  default:
262
  } // cve_view
263
  }
264
+
265
  return $pieces;
266
  } // posts_clauses
267
 
280
  */
281
  public static function mla_list_table_prepare_items_total_items( $total_items, $mla_list_table ) {
282
  global $wpdb;
283
+
284
  if ( isset( $_REQUEST['cve_view'] ) ) {
285
  switch( $_REQUEST['cve_view'] ) {
 
 
 
 
 
 
 
286
  case 'unpublished':
287
  // Defined in /wp-includes/query.php, function get_posts()
288
  add_filter( 'posts_clauses', 'MLACustomViewExample::posts_clauses', 10, 1 );
297
 
298
  return $total_items;
299
  } // mla_list_table_prepare_items_total_items
300
+
301
  /**
302
  * Filter the items returned by prepare_items()
303
  *
316
 
317
  if ( isset( $_REQUEST['cve_view'] ) ) {
318
  switch( $_REQUEST['cve_view'] ) {
 
 
 
319
  case 'unpublished':
320
  add_filter( 'posts_clauses', 'MLACustomViewExample::posts_clauses', 10, 1 );
321
  $current_page = self::$pagination_parameters['current_page'];
examples/mla-list-table-hooks-example.php.txt CHANGED
@@ -3,7 +3,7 @@
3
  * Provides an example of hooking the filters provided by the MLA_List_Table class
4
  *
5
  * @package MLA List Table Hooks Example
6
- * @version 1.02
7
  */
8
 
9
  /*
@@ -11,7 +11,7 @@ Plugin Name: MLA List Table Hooks Example
11
  Plugin URI: http://fairtradejudaica.org/media-library-assistant-a-wordpress-plugin/
12
  Description: Provides an example of hooking the filters provided by the MLA_List_Table class
13
  Author: David Lingren
14
- Version: 1.02
15
  Author URI: http://fairtradejudaica.org/our-story/staff/
16
 
17
  Copyright 2014 - 2015 David Lingren
@@ -74,6 +74,8 @@ class MLAListTableHooksExample {
74
  /*
75
  * Defined in /media-library-assistant/includes/class-mla-data.php
76
  */
 
 
77
  add_filter( 'mla_list_table_search_filter_fields', 'MLAListTableHooksExample::mla_list_table_search_filter_fields', 10, 2 );
78
  add_filter( 'mla_list_table_search_filter_inner_clause', 'MLAListTableHooksExample::mla_list_table_search_filter_inner_clause', 10, 4 );
79
  add_filter( 'mla_fetch_attachment_references', 'MLAListTableHooksExample::mla_fetch_attachment_references', 10, 3 );
@@ -81,6 +83,8 @@ class MLAListTableHooksExample {
81
  /*
82
  * Defined in /media-library-assistant/includes/class-mla-main.php
83
  */
 
 
84
  add_filter( 'mla_list_table_inline_fields', 'MLAListTableHooksExample::mla_list_table_inline_fields', 10, 1 );
85
  add_filter( 'mla_list_table_inline_action', 'MLAListTableHooksExample::mla_list_table_inline_action', 10, 2 );
86
 
@@ -324,6 +328,42 @@ class MLAListTableHooksExample {
324
  return $references;
325
  } // mla_fetch_attachment_references
326
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
327
  /**
328
  * Process an MLA_List_Table inline action, i.e., Quick Edit
329
  *
@@ -776,7 +816,7 @@ class MLAListTableHooksExample {
776
  * @param array $items NULL, indicating no substitution.
777
  * @param object $mla_list_table The MLA_List_Table object, passed by reference.
778
  *
779
- * @return array updated $items array.
780
  */
781
  public static function mla_list_table_prepare_items_the_items( $items, $mla_list_table ) {
782
  //error_log( 'MLAListTableHooksExample::mla_list_table_prepare_items_the_items $items = ' . var_export( $items, true ), 0 );
@@ -784,6 +824,45 @@ class MLAListTableHooksExample {
784
  return $items;
785
  } // mla_list_table_prepare_items_the_items
786
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
787
  /**
788
  * Inspect or modify the results of prepare_items()
789
  *
@@ -798,7 +877,10 @@ class MLAListTableHooksExample {
798
  */
799
  public static function mla_list_table_prepare_items( $mla_list_table ) {
800
  //error_log( 'MLAListTableHooksExample::mla_list_table_prepare_items $mla_list_table->get_pagenum() = ' . var_export( $mla_list_table->get_pagenum(), true ), 0 );
801
- return $mla_list_table;
 
 
 
802
  } // mla_list_table_prepare_items
803
 
804
  /**
3
  * Provides an example of hooking the filters provided by the MLA_List_Table class
4
  *
5
  * @package MLA List Table Hooks Example
6
+ * @version 1.03
7
  */
8
 
9
  /*
11
  Plugin URI: http://fairtradejudaica.org/media-library-assistant-a-wordpress-plugin/
12
  Description: Provides an example of hooking the filters provided by the MLA_List_Table class
13
  Author: David Lingren
14
+ Version: 1.03
15
  Author URI: http://fairtradejudaica.org/our-story/staff/
16
 
17
  Copyright 2014 - 2015 David Lingren
74
  /*
75
  * Defined in /media-library-assistant/includes/class-mla-data.php
76
  */
77
+ add_filter( 'mla_list_table_query_final_terms', 'MLAListTableHooksExample::mla_list_table_query_final_terms', 10, 1 );
78
+ add_filter( 'mla_list_table_query_custom_items', 'MLAListTableHooksExample::mla_list_table_query_custom_items', 10, 2 );
79
  add_filter( 'mla_list_table_search_filter_fields', 'MLAListTableHooksExample::mla_list_table_search_filter_fields', 10, 2 );
80
  add_filter( 'mla_list_table_search_filter_inner_clause', 'MLAListTableHooksExample::mla_list_table_search_filter_inner_clause', 10, 4 );
81
  add_filter( 'mla_fetch_attachment_references', 'MLAListTableHooksExample::mla_fetch_attachment_references', 10, 3 );
83
  /*
84
  * Defined in /media-library-assistant/includes/class-mla-main.php
85
  */
86
+ add_filter( 'mla_list_table_admin_action', 'MLAListTableHooksExample::mla_list_table_admin_action', 10, 3 );
87
+ add_action( 'mla_list_table_custom_admin_action', 'MLAListTableHooksExample::mla_list_table_custom_admin_action', 10, 2 );
88
  add_filter( 'mla_list_table_inline_fields', 'MLAListTableHooksExample::mla_list_table_inline_fields', 10, 1 );
89
  add_filter( 'mla_list_table_inline_action', 'MLAListTableHooksExample::mla_list_table_inline_action', 10, 2 );
90
 
328
  return $references;
329
  } // mla_fetch_attachment_references
330
 
331
+ /**
332
+ * Pre-process an MLA_List_Table admin action
333
+ *
334
+ * This filter gives you an opportunity to pre-process an MLA_List_Table item-level action,
335
+ * standard or custom, before the MLA handler. This filter is called before anything is output
336
+ * for the Media/Assistant submenu, so you can redirect to another admin screen if desired.
337
+ *
338
+ * @since 1.03
339
+ *
340
+ * @param boolean $process_action true, to let MLA process the requested action.
341
+ * @param string $mla_admin_action the requested action.
342
+ * @param integer $mla_item_ID zero (0), or the affected attachment.
343
+ */
344
+ public static function mla_list_table_admin_action( $process_action, $mla_admin_action, $mla_item_ID ) {
345
+ //error_log( 'MLAListTableHooksExample::mla_list_table_admin_action $mla_admin_action = ' . var_export( $mla_admin_action, true ), 0 );
346
+ //error_log( 'MLAListTableHooksExample::mla_list_table_admin_action $mla_item_ID = ' . var_export( $mla_item_ID, true ), 0 );
347
+ return $process_action;
348
+ } // mla_list_table_admin_action
349
+
350
+ /**
351
+ * Process an MLA_List_Table custom admin action
352
+ *
353
+ * This filter gives you an opportunity to process an MLA_List_Table item-level action
354
+ * that MLA does not recognize. This filter is called before anything is output for the
355
+ * Media/Assistant submenu, so you can redirect to another admin screen if desired.
356
+ *
357
+ * @since 1.03
358
+ *
359
+ * @param string $mla_admin_action the requested action.
360
+ * @param integer $mla_item_ID zero (0), or the affected attachment.
361
+ */
362
+ public static function mla_list_table_custom_admin_action( $mla_admin_action, $mla_item_ID ) {
363
+ //error_log( 'MLAListTableHooksExample::mla_list_table_custom_admin_action $mla_admin_action = ' . var_export( $mla_admin_action, true ), 0 );
364
+ //error_log( 'MLAListTableHooksExample::mla_list_table_custom_admin_action $mla_item_ID = ' . var_export( $mla_item_ID, true ), 0 );
365
+ } // mla_list_table_custom_admin_action
366
+
367
  /**
368
  * Process an MLA_List_Table inline action, i.e., Quick Edit
369
  *
816
  * @param array $items NULL, indicating no substitution.
817
  * @param object $mla_list_table The MLA_List_Table object, passed by reference.
818
  *
819
+ * @return object NULL or replacement $items array
820
  */
821
  public static function mla_list_table_prepare_items_the_items( $items, $mla_list_table ) {
822
  //error_log( 'MLAListTableHooksExample::mla_list_table_prepare_items_the_items $items = ' . var_export( $items, true ), 0 );
824
  return $items;
825
  } // mla_list_table_prepare_items_the_items
826
 
827
+ /**
828
+ * Filter the WP_Query request parameters for the prepare_items query
829
+ *
830
+ * Gives you an opportunity to change the terms of the prepare_items query
831
+ * after they are processed by the "Prepare List Table Query" handler.
832
+ *
833
+ * @since 1.03
834
+ *
835
+ * @param array WP_Query request prepared by "Prepare List Table Query"
836
+ *
837
+ * @return array updated WP_Query request
838
+ */
839
+ public static function mla_list_table_query_final_terms( $request ) {
840
+ //error_log( 'MLAListTableHooksExample::mla_list_table_query_final_terms $request = ' . var_export( $request, true ), 0 );
841
+
842
+ return $request;
843
+ } // mla_list_table_query_final_terms
844
+
845
+ /**
846
+ * Replace the prepare_items WP_Query object with your own results
847
+ *
848
+ * Gives you an opportunity to substitute the results of the prepare_items query
849
+ * with alternative results of your own.
850
+ *
851
+ * @since 1.03
852
+ *
853
+ * @param object NULL, indicating no results substitution
854
+ * @param array WP_Query request prepared by "Prepare List Table Query"
855
+ */
856
+ public static function mla_list_table_query_custom_items( $wp_query_object, $request ) {
857
+ //error_log( 'MLAListTableHooksExample::mla_media_modal_query_custom_items $request = ' . var_export( $request, true ), 0 );
858
+
859
+ /*
860
+ * You can replace the NULL $wp_query_object with a new WP_Query( $request )
861
+ * object using your own $request parameters
862
+ */
863
+ return $wp_query_object;
864
+ } // mla_media_modal_query_custom_items
865
+
866
  /**
867
  * Inspect or modify the results of prepare_items()
868
  *
877
  */
878
  public static function mla_list_table_prepare_items( $mla_list_table ) {
879
  //error_log( 'MLAListTableHooksExample::mla_list_table_prepare_items $mla_list_table->get_pagenum() = ' . var_export( $mla_list_table->get_pagenum(), true ), 0 );
880
+
881
+ /*
882
+ * $mla_list_table->items contains the requested items from the database
883
+ */
884
  } // mla_list_table_prepare_items
885
 
886
  /**
examples/mla-mapping-parent-data-example.php.txt ADDED
@@ -0,0 +1,160 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Copies a custom field value from the parent post/page to all attached Media Library items.
4
+ *
5
+ * Provides an example of the filters provided by the IPTC/EXIF and Custom Field mapping features
6
+ *
7
+ * @package MLA Mapping Parent Data Example
8
+ * @version 1.01
9
+ */
10
+
11
+ /*
12
+ Plugin Name: MLA Mapping Parent Data Example
13
+ Plugin URI: http://fairtradejudaica.org/media-library-assistant-a-wordpress-plugin/
14
+ Description: Copies a custom field value from the parent post/page to all attached Media Library items.
15
+ Author: David Lingren
16
+ Version: 1.01
17
+ Author URI: http://fairtradejudaica.org/our-story/staff/
18
+
19
+ Copyright 2015 David Lingren
20
+
21
+ This program is free software; you can redistribute it and/or modify
22
+ it under the terms of the GNU General Public License as published by
23
+ the Free Software Foundation; either version 2 of the License, or
24
+ (at your option) any later version.
25
+
26
+ This program is distributed in the hope that it will be useful,
27
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
28
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29
+ GNU General Public License for more details.
30
+
31
+ You can get a copy of the GNU General Public License by writing to the
32
+ Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
33
+ */
34
+
35
+ /**
36
+ * Class MLA Mapping Parent Data Example hooks one of the filters provided by
37
+ * the IPTC/EXIF and Custom Field mapping features
38
+ *
39
+ * Call it anything you want, but give it an unlikely and hopefully unique name. Hiding
40
+ * everything else inside a class means this is the only name you have to worry about.
41
+ *
42
+ * @package MLA Mapping Parent Data Example
43
+ * @since 1.00
44
+ */
45
+ class MLAMappingParentDataExample {
46
+ /**
47
+ * Initialization function, similar to __construct()
48
+ *
49
+ * Installs filters and actions that handle the MLA hooks for uploading and mapping.
50
+ *
51
+ * @since 1.00
52
+ *
53
+ * @return void
54
+ */
55
+ public static function initialize() {
56
+ /*
57
+ * The filters are only useful in the admin section; exit if in the "front-end" posts/pages.
58
+ */
59
+ if ( ! is_admin() )
60
+ return;
61
+
62
+ add_filter( 'mla_mapping_updates', 'MLAMappingParentDataExample::mla_mapping_updates', 10, 5 );
63
+
64
+ /*
65
+ * Triggered by wp_insert_post and wp_publish_post in wp-includes/post.php
66
+ */
67
+ add_filter( 'save_post', 'MLAMappingParentDataExample::save_post', 10, 3 );
68
+ }
69
+
70
+ /**
71
+ * MLA Mapping Updates Filter
72
+ *
73
+ * This filter is called AFTER all mapping rules are applied.
74
+ * You can add, change or remove updates for the attachment's
75
+ * standard fields, taxonomies and/or custom fields.
76
+ *
77
+ * @since 1.00
78
+ *
79
+ * @param array updates for the attachment's standard fields, taxonomies and/or custom fields
80
+ * @param integer post ID to be evaluated
81
+ * @param string category/scope to evaluate against: custom_field_mapping or single_attachment_mapping
82
+ * @param array mapping rules
83
+ * @param array attachment_metadata, default NULL
84
+ *
85
+ * @return array updated attachment's updates
86
+ */
87
+ public static function mla_mapping_updates( $updates, $post_id, $category, $settings, $attachment_metadata ) {
88
+ /*
89
+ * For this example we have created a custom field named "ref_offer", which can be
90
+ * changed for your application. Make sure our rule is defined.
91
+ */
92
+ if ( 'single_attachment_mapping' == $category ) {
93
+ if ( ! isset( $settings['ref_offer'] ) ) {
94
+ return $updates;
95
+ }
96
+ } elseif ( 'custom_field_mapping' == $category ) {
97
+ foreach ( $settings as $setting ) {
98
+ if ( $found_it = ( $setting['name'] == 'ref_offer' ) ) {
99
+ break;
100
+ }
101
+ }
102
+
103
+ if ( ! $found_it ) {
104
+ return $updates;
105
+ }
106
+ }
107
+
108
+ // Get the current value, if any, to see if a change is required
109
+ $old_value = get_metadata( 'post', $post_id, 'ref_offer', true );
110
+
111
+ // Get the item to find its parent's value, if any
112
+ $item = get_post( $post_id );
113
+ if ( 0 < $item->post_parent ) {
114
+ $parent_value = get_metadata( 'post', $item->post_parent, 'ref_offer', true );
115
+ } else {
116
+ $parent_value = '';
117
+ }
118
+
119
+ // Add/replace the value if it has changed
120
+ if ( $old_value != $parent_value ) {
121
+ $updates['custom_updates'][ 'ref_offer' ] = $parent_value;
122
+ }
123
+
124
+ return $updates;
125
+ } // mla_mapping_updates
126
+
127
+ /**
128
+ * WordPress save post action
129
+ *
130
+ * This action is called AFTER the post has been added or updated in the posts database table.
131
+ * It is used to map or re-map the IPTC/EXIF and custom field rules.
132
+ *
133
+ * @since 1.01
134
+ *
135
+ * @param integer post ID to be evaluated
136
+ * @param object post content
137
+ * @param boolean true if update, false if insert
138
+ */
139
+ public static function save_post( $post_id, $post, $update ) {
140
+ // If this is just a revision, exit.
141
+ if ( wp_is_post_revision( $post_id ) ) {
142
+ return;
143
+ }
144
+
145
+ // You may need to add MIME types other than 'image' for your application
146
+ foreach ( get_attached_media( 'image' , $post_id ) as $attachment_id => $value) {
147
+ $updates = MLAOptions::mla_evaluate_custom_field_mapping( $attachment_id, 'single_attachment_mapping' );
148
+
149
+ if ( !empty( $updates ) ) {
150
+ $item_content = MLAData::mla_update_single_item( $attachment_id, $updates );
151
+ }
152
+ }
153
+ } // save_post
154
+ } //MLAMappingParentDataExample
155
+
156
+ /*
157
+ * Install the filters at an early opportunity
158
+ */
159
+ add_action('init', 'MLAMappingParentDataExample::initialize');
160
+ ?>
examples/mla-media-modal-hooks-example.php.txt CHANGED
@@ -1,22 +1,24 @@
1
  <?php
2
  /**
3
- * Provides an example of the filters provided by the "Media Manager Enhancements" feature
4
  *
5
- * In this example the initial value for the MIME Type dropdown control is changed.
 
 
6
  *
7
  * @package MLA Media Modal Hooks Example
8
- * @version 1.00
9
  */
10
 
11
  /*
12
  Plugin Name: MLA Media Modal Hooks Example
13
  Plugin URI: http://fairtradejudaica.org/media-library-assistant-a-wordpress-plugin/
14
- Description: Provides an example of the filters provided by the "Media Manager Enhancements" feature
15
  Author: David Lingren
16
- Version: 1.00
17
  Author URI: http://fairtradejudaica.org/our-story/staff/
18
 
19
- Copyright 2014 David Lingren
20
 
21
  This program is free software; you can redistribute it and/or modify
22
  it under the terms of the GNU General Public License as published by
@@ -45,7 +47,7 @@ class MLAMediaModalExample {
45
  /**
46
  * Initialization function, similar to __construct()
47
  *
48
- * Installs filters and actions that handle the MLA hooks for uploading and mapping.
49
  *
50
  * @since 1.00
51
  *
@@ -67,26 +69,105 @@ class MLAMediaModalExample {
67
  *
68
  * Comment out the filters you don't need; save them for future use
69
  */
70
- add_filter( 'mla_media_modal_initial_filters', 'MLAMediaModalExample::mla_media_modal_initial_filters_filter', 10, 1 );
71
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
72
 
73
  /**
74
- * MLA Edit Media Initial Filters Filter
75
- *
76
- * This filter gives you an opportunity to change the initial values of the
77
- * Media Manager Modal Window toolbar controls.
78
  *
79
- * @since 1.00
 
80
  *
81
- * @param array toolbar control initial values
82
  *
83
- * @return array updated toolbar control initial values
 
84
  */
85
- public static function mla_media_modal_initial_filters_filter( $initial_values ) {
86
  /*
87
  * Uncomment the error_log statements in any of the filters to see what's passed in
88
  */
89
- //error_log( 'MLAMediaModalExample::mla_media_modal_initial_filters_filter $initial_values = ' . var_export( $initial_values, true ), 0 );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
90
 
91
  /*
92
  * The default initial values are:
@@ -116,7 +197,263 @@ class MLAMediaModalExample {
116
  //$initial_values['searchValue'] = 'de la';
117
 
118
  return $initial_values;
119
- } // mla_media_modal_initial_filters_filter
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
120
  } //MLAMediaModalExample
121
 
122
  /*
1
  <?php
2
  /**
3
+ * Provides examples of the filters provided by the "Media Manager Enhancements" feature
4
  *
5
+ * In this example:
6
+ * - the initial value for the MIME Type dropdown control can be changed.
7
+ * - items assigned to a taxonomy term can be excluded from the "Query Attachments" results
8
  *
9
  * @package MLA Media Modal Hooks Example
10
+ * @version 1.01
11
  */
12
 
13
  /*
14
  Plugin Name: MLA Media Modal Hooks Example
15
  Plugin URI: http://fairtradejudaica.org/media-library-assistant-a-wordpress-plugin/
16
+ Description: Provides examples of the filters provided by the "Media Manager Enhancements" feature
17
  Author: David Lingren
18
+ Version: 1.01
19
  Author URI: http://fairtradejudaica.org/our-story/staff/
20
 
21
+ Copyright 2014-2015 David Lingren
22
 
23
  This program is free software; you can redistribute it and/or modify
24
  it under the terms of the GNU General Public License as published by
47
  /**
48
  * Initialization function, similar to __construct()
49
  *
50
+ * Installs filters and actions that handle the MLA hooks for the "Media Manager Enhancements"
51
  *
52
  * @since 1.00
53
  *
69
  *
70
  * Comment out the filters you don't need; save them for future use
71
  */
72
+
73
+ /*
74
+ * Defined in /media-library-assistant/includes/class-mla-data.php
75
+ */
76
+ add_filter( 'mla_media_modal_form_fields', 'MLAMediaModalExample::mla_media_modal_form_fields', 10, 2 );
77
+ add_filter( 'mla_media_modal_months_dropdown', 'MLAMediaModalExample::mla_media_modal_months_dropdown', 10, 2 );
78
+ add_filter( 'mla_media_modal_terms_options', 'MLAMediaModalExample::mla_media_modal_terms_options', 10, 1 );
79
+ add_filter( 'mla_media_modal_initial_filters', 'MLAMediaModalExample::mla_media_modal_initial_filters', 10, 2 );
80
+ add_filter( 'mla_media_modal_settings', 'MLAMediaModalExample::mla_media_modal_settings', 10, 2 );
81
+ add_filter( 'mla_media_modal_strings', 'MLAMediaModalExample::mla_media_modal_strings', 10, 2 );
82
+ add_filter( 'mla_media_modal_template_path', 'MLAMediaModalExample::mla_media_modal_template_path', 10, 2 );
83
+ add_filter( 'mla_media_modal_begin_fill_compat_fields', 'MLAMediaModalExample::mla_media_modal_begin_fill_compat_fields', 10, 3 );
84
+ add_filter( 'mla_media_modal_end_fill_compat_fields', 'MLAMediaModalExample::mla_media_modal_end_fill_compat_fields', 10, 4 );
85
+ add_action( 'mla_media_modal_begin_update_compat_fields', 'MLAMediaModalExample::mla_media_modal_begin_update_compat_fields', 10, 1 );
86
+ add_filter( 'mla_media_modal_update_compat_fields_terms', 'MLAMediaModalExample::mla_media_modal_update_compat_fields_terms', 10, 4 );
87
+ add_filter( 'mla_media_modal_end_update_compat_fields', 'MLAMediaModalExample::mla_media_modal_end_update_compat_fields', 10, 3 );
88
+ add_filter( 'mla_media_modal_query_initial_terms', 'MLAMediaModalExample::mla_media_modal_query_initial_terms', 10, 2 );
89
+ add_filter( 'mla_media_modal_query_filtered_terms', 'MLAMediaModalExample::mla_media_modal_query_filtered_terms', 10, 2 );
90
+
91
+ /*
92
+ * Defined in /media-library-assistant/includes/class-mla-data.php
93
+ */
94
+ add_filter( 'mla_media_modal_query_final_terms', 'MLAMediaModalExample::mla_media_modal_query_final_terms', 10, 1 );
95
+ add_filter( 'mla_media_modal_query_custom_items', 'MLAMediaModalExample::mla_media_modal_query_custom_items', 10, 2 );
96
+ } // initialize
97
 
98
  /**
99
+ * MLA Edit Media Form Fields Filter
 
 
 
100
  *
101
+ * Gives you an opportunity to change the content of the
102
+ * Media Manager Modal Window ATTACHMENT DETAILS fields.
103
  *
104
+ * @since 1.01
105
  *
106
+ * @param array descriptors for the "compat-attachment-fields"
107
+ * @param object the post to be edited
108
  */
109
+ public static function mla_media_modal_form_fields( $form_fields, $post ) {
110
  /*
111
  * Uncomment the error_log statements in any of the filters to see what's passed in
112
  */
113
+ //error_log( 'MLAMediaModalExample::mla_media_modal_form_fields $form_fields = ' . var_export( $form_fields, true ), 0 );
114
+ //error_log( 'MLAMediaModalExample::mla_media_modal_form_fields $post = ' . var_export( $post, true ), 0 );
115
+
116
+ return $form_fields;
117
+ } // mla_media_modal_form_fields
118
+
119
+ /**
120
+ * MLA Edit Media Month & Year Dropdown Filter
121
+ *
122
+ * Gives you an opportunity to change the content of the
123
+ * Media Manager Modal Window Month & Year Dropdown control.
124
+ *
125
+ * @since 1.01
126
+ *
127
+ * @param array ( value => label ) pairs, e.g. 0 => 'Show all dates', 201506 => 'June 2015'
128
+ * @param string post_type, e.g., 'attachment'
129
+ */
130
+ public static function mla_media_modal_months_dropdown( $month_array, $post_type ) {
131
+ //error_log( "MLAMediaModalExample::mla_media_modal_months_dropdown( {$post_type} ) \$month_array = " . var_export( $month_array, true ), 0 );
132
+
133
+ return $month_array;
134
+ } // mla_media_modal_months_dropdown
135
+
136
+ /**
137
+ * MLA Edit Media Terms Dropdown Filter
138
+ *
139
+ * Gives you an opportunity to change the content of the
140
+ * Media Manager Modal Window Terms Dropdown control.
141
+ *
142
+ * @since 1.01
143
+ *
144
+ * @param array ( 'class' => $class_array, 'value' => $value_array, 'text' => $text_array )
145
+ */
146
+ public static function mla_media_modal_terms_options( $term_values ) {
147
+ //error_log( 'MLAMediaModalExample::mla_media_modal_terms_options $term_values = ' . var_export( $term_values, true ), 0 );
148
+
149
+ /*
150
+ * $class_array => HTML class attribute value for each option
151
+ * $value_array => HTML value attribute value for each option
152
+ * $text_array => HTML text content for each option
153
+ */
154
+ return $term_values;
155
+ } // mla_media_modal_terms_options
156
+
157
+ /**
158
+ * MLA Edit Media Initial Filters Filter
159
+ *
160
+ * Gives you an opportunity to change the initial values of the
161
+ * Media Manager Modal Window toolbar controls.
162
+ *
163
+ * @since 1.00
164
+ *
165
+ * @param array associative array with setting => value pairs
166
+ * @param object current post object, if available, else NULL
167
+ */
168
+ public static function mla_media_modal_initial_filters( $initial_values, $post ) {
169
+ //error_log( 'MLAMediaModalExample::mla_media_modal_initial_filters $initial_values = ' . var_export( $initial_values, true ), 0 );
170
+ //error_log( 'MLAMediaModalExample::mla_media_modal_initial_filters $post = ' . var_export( $post, true ), 0 );
171
 
172
  /*
173
  * The default initial values are:
197
  //$initial_values['searchValue'] = 'de la';
198
 
199
  return $initial_values;
200
+ } // mla_media_modal_initial_filters
201
+
202
+ /**
203
+ * MLA Edit Media Toolbar Settings Filter
204
+ *
205
+ * Gives you an opportunity to change the content of the
206
+ * Media Manager Modal Window toolbar controls.
207
+ *
208
+ * @since 1.01
209
+ *
210
+ * @param array associative array with setting => value pairs
211
+ * @param object current post object, if available, else NULL
212
+ */
213
+ public static function mla_media_modal_settings( $settings, $post ) {
214
+ //error_log( 'MLAMediaModalExample::mla_media_modal_settings $settings = ' . var_export( $settings, true ), 0 );
215
+ //error_log( 'MLAMediaModalExample::mla_media_modal_settings $post = ' . var_export( $post, true ), 0 );
216
+
217
+ return $settings;
218
+ } // mla_media_modal_settings
219
+
220
+ /**
221
+ * MLA Edit Media Toolbar Strings Filter
222
+ *
223
+ * Gives you an opportunity to change the content of the
224
+ * string values passed Media Manager Modal Window toolbar controls.
225
+ *
226
+ * @since 1.01
227
+ *
228
+ * @param array associative array with slug => text pairs
229
+ * @param object current post object, if available, else NULL
230
+ */
231
+ public static function mla_media_modal_strings( $strings, $post ) {
232
+ //error_log( 'MLAMediaModalExample::mla_media_modal_strings $strings = ' . var_export( $strings, true ), 0 );
233
+ //error_log( 'MLAMediaModalExample::mla_media_modal_strings $post = ' . var_export( $post, true ), 0 );
234
+
235
+ return $strings;
236
+ } // mla_media_modal_strings
237
+
238
+ /**
239
+ * MLA Edit Media JavaScript Template(s) Filter
240
+ *
241
+ * Gives you an opportunity to change the path to the JavaScript template file
242
+ * or substitute your own template(s).
243
+ *
244
+ * @since 1.01
245
+ *
246
+ * @param string absolute path to the JavaScript template file
247
+ */
248
+ public static function mla_media_modal_template_path( $template_path ) {
249
+ //error_log( 'MLAMediaModalExample::mla_media_modal_template_path $template_path = ' . var_export( $template_path, true ), 0 );
250
+
251
+ /*
252
+ * To suppress the loading of the default template(s), set $template_path = '';
253
+ */
254
+ return $template_path;
255
+ } // mla_media_modal_template_path
256
+
257
+ /**
258
+ * MLA Edit Media begin "fill compat-attachment-fields" Filter
259
+ *
260
+ * Gives you an opportunity to replace the content of the
261
+ * Media Manager Modal Window ATTACHMENT DETAILS taxonomy meta boxes
262
+ * before the MLA results have been added.
263
+ *
264
+ * @since 1.01
265
+ *
266
+ * @param array empty array of HTML markup for the taxonomy meta boxes
267
+ * @param array all requested taxonomies
268
+ * @param object current post object
269
+ */
270
+ public static function mla_media_modal_begin_fill_compat_fields( $results, $requested, $post ) {
271
+ //error_log( 'MLAMediaModalExample::mla_media_modal_fill_compat_fields $results = ' . var_export( $results, true ), 0 );
272
+ //error_log( 'MLAMediaModalExample::mla_media_modal_fill_compat_fields $requested = ' . var_export( $requested, true ), 0 );
273
+ //error_log( 'MLAMediaModalExample::mla_media_modal_fill_compat_fields $post = ' . var_export( $post, true ), 0 );
274
+
275
+ /*
276
+ * To replace the MLA results with your own, return an array containing
277
+ * ( taxonomy-slug => HTML markup for the taxonomy meta box
278
+ */
279
+ return $results;
280
+ } // mla_media_modal_fill_compat_fields
281
+
282
+ /**
283
+ * MLA Edit Media end of "fill compat-attachment-fields" Filter
284
+ *
285
+ * Gives you an opportunity to change the content of the
286
+ * Media Manager Modal Window ATTACHMENT DETAILS taxonomy meta boxes
287
+ * after MLA results have been added.
288
+ *
289
+ * @since 1.01
290
+ *
291
+ * @param string HTML markup for the taxonomy meta boxes
292
+ * @param array all requested taxonomies
293
+ * @param array unsupported taxonomies; should be empty
294
+ * @param object current post object
295
+ */
296
+ public static function mla_media_modal_end_fill_compat_fields( $results, $requested, $unsupported, $post ) {
297
+ //error_log( 'MLAMediaModalExample::mla_media_modal_end_fill_compat_fields $results = ' . var_export( $results, true ), 0 );
298
+ //error_log( 'MLAMediaModalExample::mla_media_modal_end_fill_compat_fields $requested = ' . var_export( $requested, true ), 0 );
299
+ //error_log( 'MLAMediaModalExample::mla_media_modal_end_fill_compat_fields $unsupported = ' . var_export( $unsupported, true ), 0 );
300
+ //error_log( 'MLAMediaModalExample::mla_media_modal_end_fill_compat_fields $post = ' . var_export( $post, true ), 0 );
301
+
302
+ return $results;
303
+ } // mla_media_modal_end_fill_compat_fields
304
+
305
+ /**
306
+ * MLA Edit Media "begin update compat-attachment-fields" initial Action
307
+ *
308
+ * Gives you an opportunity to pre-process the $_REQUEST elements for the
309
+ * Media Manager Modal Window ATTACHMENT DETAILS taxonomy meta boxes updates.
310
+ *
311
+ * @since 1.01
312
+ *
313
+ * @param object the current post
314
+ */
315
+ public static function mla_media_modal_begin_update_compat_fields( $post ) {
316
+ //error_log( "MLAMediaModalExample::mla_media_modal_begin_update_compat_fields( {$post->ID} )", 0 );
317
+
318
+ } // mla_media_modal_begin_update_compat_fields
319
+
320
+ /**
321
+ * MLA Edit Media "update compat-attachment-fields terms" Filter
322
+ *
323
+ * Gives you an opportunity to change the terms assigned to one
324
+ * Media Manager Modal Window ATTACHMENT DETAILS taxonomy.
325
+ *
326
+ * @since 1.01
327
+ *
328
+ * @param array assigned term id/name values
329
+ * @param string taxonomy slug
330
+ * @param object taxonomy object
331
+ * @param integer current post ID
332
+ */
333
+ public static function mla_media_modal_update_compat_fields_terms( $terms, $key, $value, $post_id ) {
334
+ //error_log( "MLAMediaModalExample::mla_media_modal_update_compat_fields_terms( {$key}, {$post_id} ) \$terms = " . var_export( $terms, true ), 0 );
335
+ //error_log( "MLAMediaModalExample::mla_media_modal_update_compat_fields_terms( {$key}, {$post_id} ) \$value = " . var_export( $value, true ), 0 );
336
+
337
+ /*
338
+ * To suppress term assignment, set $terms = NULL;
339
+ */
340
+ return $terms;
341
+ } // mla_media_modal_update_compat_fields_terms
342
+
343
+ /**
344
+ * MLA Edit Media "end update compat-attachment-fields" Filter
345
+ *
346
+ * Gives you an opportunity to change the content of one (or more)
347
+ * Media Manager Modal Window ATTACHMENT DETAILS taxonomy meta boxes
348
+ * with updated checkbox or tag/term lists.
349
+ *
350
+ * @since 1.01
351
+ *
352
+ * @param string HTML markup for the taxonomy meta box elements
353
+ * @param array supported taxonomy objects
354
+ * @param object current post object
355
+ */
356
+ public static function mla_media_modal_end_update_compat_fields( $results, $taxonomies, $post ) {
357
+ //error_log( 'MLAMediaModalExample::mla_media_modal_end_update_compat_fields $results = ' . var_export( $results, true ), 0 );
358
+ //error_log( 'MLAMediaModalExample::mla_media_modal_end_update_compat_fields $taxonomies = ' . var_export( $taxonomies, true ), 0 );
359
+ //error_log( 'MLAMediaModalExample::mla_media_modal_end_update_compat_fields $post = ' . var_export( $post, true ), 0 );
360
+
361
+ return $results;
362
+ } // mla_media_modal_end_update_compat_fields
363
+
364
+ /**
365
+ * MLA Edit Media "Query Attachments" initial terms Filter
366
+ *
367
+ * Gives you an opportunity to change the terms of the
368
+ * Media Manager Modal Window "Query Attachments" query
369
+ * before they are pre-processed by the MLA handler.
370
+ *
371
+ * @since 1.01
372
+ *
373
+ * @param array WP_Query terms supported for "Query Attachments"
374
+ * @param array All terms passed in the request
375
+ */
376
+ public static function mla_media_modal_query_initial_terms( $query, $raw_query ) {
377
+ //error_log( 'MLAMediaModalExample::mla_media_modal_query_initial_terms $query = ' . var_export( $query, true ), 0 );
378
+ //error_log( 'MLAMediaModalExample::mla_media_modal_query_initial_terms $raw_query = ' . var_export( $raw_query, true ), 0 );
379
+
380
+ return $query;
381
+ } // mla_media_modal_query_initial_terms
382
+
383
+ /**
384
+ * MLA Edit Media "Query Attachments" filtered terms Filter
385
+ *
386
+ * Gives you an opportunity to change the terms of the
387
+ * Media Manager Modal Window "Query Attachments" query
388
+ * after they are pre-processed by the Ajax handler.
389
+ *
390
+ * @since 1.01
391
+ *
392
+ * @param array WP_Query terms supported for "Query Attachments"
393
+ * @param array All terms passed in the request
394
+ */
395
+ public static function mla_media_modal_query_filtered_terms( $query, $raw_query ) {
396
+ //error_log( 'MLAMediaModalExample::mla_media_modal_query_filtered_terms $query = ' . var_export( $query, true ), 0 );
397
+ //error_log( 'MLAMediaModalExample::mla_media_modal_query_filtered_terms $raw_query = ' . var_export( $raw_query, true ), 0 );
398
+
399
+ return $query;
400
+ } // mla_media_modal_query_filtered_terms
401
+
402
+ /**
403
+ * MLA Edit Media "Query Attachments" final terms Filter
404
+ *
405
+ * Gives you an opportunity to change the terms of the
406
+ * Media Manager Modal Window "Query Attachments" query
407
+ * after they are processed by the "Prepare List Table Query" handler.
408
+ *
409
+ * @since 1.01
410
+ *
411
+ * @param array WP_Query request prepared by "Prepare List Table Query"
412
+ */
413
+ public static function mla_media_modal_query_final_terms( $request ) {
414
+ //error_log( 'MLAMediaModalExample::mla_media_modal_query_final_terms $request = ' . var_export( $request, true ), 0 );
415
+
416
+ /*
417
+ * Comment the next line out to remove items assigned to the
418
+ * Att. Categories "Admin" term from the query results.
419
+ */
420
+ return $request;
421
+
422
+ if ( isset( $request['tax_query'] ) ) {
423
+ $tax_query = $request['tax_query'];
424
+ $tax_query['relation'] = 'AND';
425
+ } else {
426
+ $tax_query = array();
427
+ }
428
+
429
+ $tax_query[] = array( 'taxonomy' => 'attachment_category', 'operator' => 'NOT IN', 'field' => 'slug', 'terms' => 'admin' );
430
+ $request['tax_query'] = $tax_query;
431
+
432
+ //error_log( 'MLAMediaModalExample::mla_media_modal_query_final_terms altered $request = ' . var_export( $request, true ), 0 );
433
+ return $request;
434
+ } // mla_media_modal_query_final_terms
435
+
436
+ /**
437
+ * MLA Edit Media "Query Attachments" custom results filter
438
+ *
439
+ * Gives you an opportunity to substitute the results of the
440
+ * Media Manager Modal Window "Query Attachments" query
441
+ * with alternative results of your own.
442
+ *
443
+ * @since 1.01
444
+ *
445
+ * @param object NULL, indicating no results substitution
446
+ * @param array WP_Query request prepared by "Prepare List Table Query"
447
+ */
448
+ public static function mla_media_modal_query_custom_items( $wp_query_object, $request ) {
449
+ //error_log( 'MLAMediaModalExample::mla_media_modal_query_custom_items $request = ' . var_export( $request, true ), 0 );
450
+
451
+ /*
452
+ * You can replace the NULL $wp_query_object with a new WP_Query( $request )
453
+ * object using your own $request parameters
454
+ */
455
+ return $wp_query_object;
456
+ } // mla_media_modal_query_custom_items
457
  } //MLAMediaModalExample
458
 
459
  /*
examples/mla-tax-query-example.php.txt CHANGED
@@ -309,7 +309,7 @@ class MLATaxQueryExample {
309
 
310
  if ( $include_children ) {
311
  $args = array( 'child_of' => $term->term_id, 'hide_empty' => false );
312
- $children = get_terms( 'attachment_category', $args );
313
  foreach( $children as $child ) {
314
  $ttids[] = $child->term_taxonomy_id;
315
  }
309
 
310
  if ( $include_children ) {
311
  $args = array( 'child_of' => $term->term_id, 'hide_empty' => false );
312
+ $children = get_terms( $taxonomy, $args );
313
  foreach( $children as $child ) {
314
  $ttids[] = $child->term_taxonomy_id;
315
  }
examples/twentytwelve-mla/image.php CHANGED
@@ -38,10 +38,17 @@ get_header(); ?>
38
  <?php edit_post_link( __( 'Edit', 'twentytwelve' ), '<span class="edit-link">', '</span>' ); ?>
39
  </footer><!-- .entry-meta -->
40
 
 
 
 
 
 
 
41
  <nav id="image-navigation" class="navigation" role="navigation">
42
  <span class="previous-image"><?php previous_image_link( false, __( '&larr; Previous', 'twentytwelve' ) ); ?></span>
43
  <span class="next-image"><?php next_image_link( false, __( 'Next &rarr;', 'twentytwelve' ) ); ?></span>
44
  </nav><!-- #image-navigation -->
 
45
  </header><!-- .entry-header -->
46
 
47
  <div class="entry-content">
38
  <?php edit_post_link( __( 'Edit', 'twentytwelve' ), '<span class="edit-link">', '</span>' ); ?>
39
  </footer><!-- .entry-meta -->
40
 
41
+ <?php if ( isset( $_REQUEST['term_slug'] ) ): ?>
42
+ <nav id="image-navigation" class="navigation" role="navigation">
43
+ <span class="previous-image"><?php echo do_shortcode('[mla_gallery tag=' . $_REQUEST['term_slug'] . ' order=ASC mla_output="previous_link" mla_link_text="&larr; Previous" mla_link_href={+link_url+}?term_slug={+query:tag+}]')?></span>
44
+ <span class="next-image"><?php echo do_shortcode('[mla_gallery tag=' . $_REQUEST['term_slug'] . ' order=ASC mla_output="next_link" mla_link_text="Next &rarr;" mla_link_href={+link_url+}?term_slug={+query:tag+}]')?></span>
45
+ </nav><!-- #image-navigation -->
46
+ <?php else: ?>
47
  <nav id="image-navigation" class="navigation" role="navigation">
48
  <span class="previous-image"><?php previous_image_link( false, __( '&larr; Previous', 'twentytwelve' ) ); ?></span>
49
  <span class="next-image"><?php next_image_link( false, __( 'Next &rarr;', 'twentytwelve' ) ); ?></span>
50
  </nav><!-- #image-navigation -->
51
+ <?php endif; ?>
52
  </header><!-- .entry-header -->
53
 
54
  <div class="entry-content">
includes/class-mla-data-pdf.php CHANGED
@@ -693,12 +693,13 @@ class MLAPDF {
693
  * @return array ( 'xmp' => array( key => value ), 'pdf' => array( key => value ) ) for each metadata field, in string format
694
  */
695
  public static function mla_extract_pdf_metadata( $file_name ) {
 
696
  $metadata = array();
697
  self::$pdf_indirect_objects = NULL;
698
  $chunksize = 16384;
699
 
700
  if ( ! file_exists( $file_name ) ) {
701
- return $metadata;
702
  }
703
 
704
  $filesize = filesize( $file_name );
@@ -723,7 +724,7 @@ class MLAPDF {
723
  if ( 0 == $match_count ) {
724
  /* translators: 1: ERROR tag 2: path and file */
725
  error_log( sprintf( _x( '%1$s: File "%2$s", startxref not found.', 'error_log', 'media-library-assistant' ), __( 'ERROR', 'media-library-assistant' ), $path ), 0 );
726
- return $metadata;
727
  }
728
 
729
  $startxref = (integer) $matches[1][ $match_count - 1 ][0];
@@ -762,7 +763,6 @@ class MLAPDF {
762
  /*
763
  * Look for XMP Metadata
764
  */
765
- $xmp = array();
766
  $root_reference = NULL;
767
  foreach ( $trailer_dictionaries as $trailer_dictionary )
768
  if ( isset( $trailer_dictionary['Root'] ) ) {
@@ -792,5 +792,5 @@ class MLAPDF {
792
 
793
  return array( 'xmp' => $xmp, 'pdf' => $metadata );
794
  }
795
- } // class MLAData
796
  ?>
693
  * @return array ( 'xmp' => array( key => value ), 'pdf' => array( key => value ) ) for each metadata field, in string format
694
  */
695
  public static function mla_extract_pdf_metadata( $file_name ) {
696
+ $xmp = array();
697
  $metadata = array();
698
  self::$pdf_indirect_objects = NULL;
699
  $chunksize = 16384;
700
 
701
  if ( ! file_exists( $file_name ) ) {
702
+ return array( 'xmp' => $xmp, 'pdf' => $metadata );
703
  }
704
 
705
  $filesize = filesize( $file_name );
724
  if ( 0 == $match_count ) {
725
  /* translators: 1: ERROR tag 2: path and file */
726
  error_log( sprintf( _x( '%1$s: File "%2$s", startxref not found.', 'error_log', 'media-library-assistant' ), __( 'ERROR', 'media-library-assistant' ), $path ), 0 );
727
+ return array( 'xmp' => $xmp, 'pdf' => $metadata );
728
  }
729
 
730
  $startxref = (integer) $matches[1][ $match_count - 1 ][0];
763
  /*
764
  * Look for XMP Metadata
765
  */
 
766
  $root_reference = NULL;
767
  foreach ( $trailer_dictionaries as $trailer_dictionary )
768
  if ( isset( $trailer_dictionary['Root'] ) ) {
792
 
793
  return array( 'xmp' => $xmp, 'pdf' => $metadata );
794
  }
795
+ } // class MLAPDF
796
  ?>
includes/class-mla-data.php CHANGED
@@ -1383,12 +1383,24 @@ class MLAData {
1383
  public static function mla_count_list_table_items( $request, $offset = NULL, $count = NULL ) {
1384
  if ( NULL !== $offset && NULL !== $count ) {
1385
  $request = self::_prepare_list_table_query( $request, $offset, $count );
1386
- self::$mla_list_table_items = self::_execute_list_table_query( $request );
 
 
 
 
 
 
1387
  return self::$mla_list_table_items->found_posts;
1388
  }
1389
 
1390
  $request = self::_prepare_list_table_query( $request );
1391
- $results = self::_execute_list_table_query( $request );
 
 
 
 
 
 
1392
  self::$mla_list_table_items = NULL;
1393
 
1394
  return $results->found_posts;
@@ -1411,7 +1423,12 @@ class MLAData {
1411
  public static function mla_query_list_table_items( $request, $offset, $count ) {
1412
  if ( NULL == self::$mla_list_table_items ) {
1413
  $request = self::_prepare_list_table_query( $request, $offset, $count );
1414
- self::$mla_list_table_items = self::_execute_list_table_query( $request );
 
 
 
 
 
1415
  }
1416
 
1417
  $attachments = self::$mla_list_table_items->posts;
@@ -1452,11 +1469,14 @@ class MLAData {
1452
  * @param int number of rows to skip over to reach desired page
1453
  * @param int number of rows on each page
1454
  *
1455
- * @return array attachment objects (posts)
1456
  */
1457
  public static function mla_query_media_modal_items( $request, $offset, $count ) {
1458
  $request = self::_prepare_list_table_query( $request, $offset, $count );
1459
- return self::_execute_list_table_query( $request );
 
 
 
1460
  }
1461
 
1462
  /**
@@ -1473,7 +1493,7 @@ class MLAData {
1473
  *
1474
  * @var array
1475
  */
1476
- private static $query_parameters = array();
1477
 
1478
  /**
1479
  * WP_Query 'posts_search' filter "parameters"
@@ -1746,7 +1766,7 @@ class MLAData {
1746
  /*
1747
  * We must patch the WHERE clause if there are leading spaces in the meta_value
1748
  */
1749
- if ( isset( $clean_request['mla-metavalue'] ) && (' ' == $clean_request['mla-metavalue'][0] ) ) {
1750
  self::$query_parameters['mla-metavalue'] = $clean_request['mla-metavalue'];
1751
  }
1752
 
@@ -2109,13 +2129,20 @@ class MLAData {
2109
  if ( isset( $terms_search_parameters['exact'] ) ) {
2110
  $the_terms = array();
2111
  foreach( $terms_search_parameters['taxonomies'] as $taxonomy ) {
2112
- $the_term = get_term_by( 'name', $phrase, $taxonomy );
 
2113
  if ( false !== $the_term ) {
2114
  $the_terms[] = $the_term;
2115
  }
2116
  }
2117
  } else {
2118
- $the_terms = get_terms( $terms_search_parameters['taxonomies'], array( 'name__like' => $phrase, 'fields' => 'all', 'hide_empty' => false ) );
 
 
 
 
 
 
2119
  if ( $quoted[ $index ] ) {
2120
  foreach ( $the_terms as $term_index => $the_term ) {
2121
  if ( ! self::_match_quoted_phrase( $phrase, $the_term->name ) ) {
@@ -2271,7 +2298,13 @@ class MLAData {
2271
  * separated by taxonomy.
2272
  */
2273
  if ( in_array( 'terms', $fields ) ) {
2274
- $the_terms = get_terms( self::$search_parameters['mla_search_taxonomies'], array( 'name__like' => $term, 'fields' => 'all', 'hide_empty' => false ) );
 
 
 
 
 
 
2275
  foreach( $the_terms as $the_term ) {
2276
  $tax_terms[ $the_term->taxonomy ][ $the_term->term_id ] = (integer) $the_term->term_taxonomy_id;
2277
 
@@ -2384,7 +2417,13 @@ class MLAData {
2384
  * WordPress filters meta_value thru trim() - which we must reverse
2385
  */
2386
  if ( isset( self::$query_parameters['mla-metavalue'] ) ) {
2387
- $where_clause = preg_replace( '/(^.*meta_value AS CHAR\) = \')([^\']*)/', '${1}' . self::$query_parameters['mla-metavalue'], $where_clause );
 
 
 
 
 
 
2388
  }
2389
 
2390
  /*
@@ -3094,7 +3133,7 @@ class MLAData {
3094
 
3095
  $attachment_metadata = get_post_meta( $ID, '_wp_attachment_metadata', true );
3096
  $sizes = isset( $attachment_metadata['sizes'] ) ? $attachment_metadata['sizes'] : NULL;
3097
- if ( ! empty( $sizes ) ) {
3098
  // Using the name as the array key ensures each name is added only once
3099
  foreach ( $sizes as $size => $size_info ) {
3100
  $size_info['size'] = $size;
@@ -3944,7 +3983,7 @@ class MLAData {
3944
  if ( is_scalar( $values ) ) {
3945
  return $values;
3946
  }
3947
-
3948
  if ( isset( $values['rdf:Alt'] ) ) {
3949
  return self::_parse_xmp_array( $values['rdf:Alt'] );
3950
  }
@@ -5794,7 +5833,7 @@ class MLAData {
5794
  $taxonomy_obj = get_taxonomy( $taxonomy );
5795
 
5796
  if ( current_user_can( $taxonomy_obj->cap->assign_terms ) ) {
5797
- if ( is_array( $tags ) ) // array of int = hierarchical, array of string = non-hierarchical.
5798
  $tags = array_filter( $tags );
5799
 
5800
  switch ( $tax_action ) {
@@ -5922,6 +5961,8 @@ class MLAData {
5922
  }
5923
  }
5924
  } else {
 
 
5925
  foreach( $terms_before as $index => $term ) {
5926
  if ( ! in_array( $term, $terms ) ) {
5927
  $terms_after[] = $term;
1383
  public static function mla_count_list_table_items( $request, $offset = NULL, $count = NULL ) {
1384
  if ( NULL !== $offset && NULL !== $count ) {
1385
  $request = self::_prepare_list_table_query( $request, $offset, $count );
1386
+ $request = apply_filters( 'mla_list_table_query_final_terms', $request );
1387
+
1388
+ self::$mla_list_table_items = apply_filters( 'mla_list_table_query_custom_items', NULL, $request );
1389
+ if ( is_null( self::$mla_list_table_items ) ) {
1390
+ self::$mla_list_table_items = self::_execute_list_table_query( $request );
1391
+ }
1392
+
1393
  return self::$mla_list_table_items->found_posts;
1394
  }
1395
 
1396
  $request = self::_prepare_list_table_query( $request );
1397
+ $request = apply_filters( 'mla_list_table_query_final_terms', $request );
1398
+
1399
+ $results = apply_filters( 'mla_list_table_query_custom_items', NULL, $request );
1400
+ if ( is_null( $results ) ) {
1401
+ $results = self::_execute_list_table_query( $request );
1402
+ }
1403
+
1404
  self::$mla_list_table_items = NULL;
1405
 
1406
  return $results->found_posts;
1423
  public static function mla_query_list_table_items( $request, $offset, $count ) {
1424
  if ( NULL == self::$mla_list_table_items ) {
1425
  $request = self::_prepare_list_table_query( $request, $offset, $count );
1426
+ $request = apply_filters( 'mla_list_table_query_final_terms', $request );
1427
+
1428
+ self::$mla_list_table_items = apply_filters( 'mla_list_table_query_custom_items', NULL, $request );
1429
+ if ( is_null( self::$mla_list_table_items ) ) {
1430
+ self::$mla_list_table_items = self::_execute_list_table_query( $request );
1431
+ }
1432
  }
1433
 
1434
  $attachments = self::$mla_list_table_items->posts;
1469
  * @param int number of rows to skip over to reach desired page
1470
  * @param int number of rows on each page
1471
  *
1472
+ * @return object WP_Query object with query results
1473
  */
1474
  public static function mla_query_media_modal_items( $request, $offset, $count ) {
1475
  $request = self::_prepare_list_table_query( $request, $offset, $count );
1476
+ $request = apply_filters( 'mla_media_modal_query_final_terms', $request );
1477
+
1478
+ $results = apply_filters( 'mla_media_modal_query_custom_items', NULL, $request );
1479
+ return is_null( $results ) ? self::_execute_list_table_query( $request ) : $results;
1480
  }
1481
 
1482
  /**
1493
  *
1494
  * @var array
1495
  */
1496
+ public static $query_parameters = array();
1497
 
1498
  /**
1499
  * WP_Query 'posts_search' filter "parameters"
1766
  /*
1767
  * We must patch the WHERE clause if there are leading spaces in the meta_value
1768
  */
1769
+ if ( isset( $clean_request['mla-metavalue'] ) && ( 0 < strlen( $clean_request['mla-metavalue'] ) ) && ( ' ' == $clean_request['mla-metavalue'][0] ) ) {
1770
  self::$query_parameters['mla-metavalue'] = $clean_request['mla-metavalue'];
1771
  }
1772
 
2129
  if ( isset( $terms_search_parameters['exact'] ) ) {
2130
  $the_terms = array();
2131
  foreach( $terms_search_parameters['taxonomies'] as $taxonomy ) {
2132
+ // WordPress encodes special characters, e.g., "&" as HTML entities in term names
2133
+ $the_term = get_term_by( 'name', _wp_specialchars( $phrase ), $taxonomy );
2134
  if ( false !== $the_term ) {
2135
  $the_terms[] = $the_term;
2136
  }
2137
  }
2138
  } else {
2139
+ // WordPress encodes special characters, e.g., "&" as HTML entities in term names
2140
+ $the_terms = get_terms( $terms_search_parameters['taxonomies'], array( 'name__like' => _wp_specialchars( $phrase ), 'fields' => 'all', 'hide_empty' => false ) );
2141
+ // Invalid taxonomy will return WP_Error object
2142
+ if ( ! is_array( $the_terms ) ) {
2143
+ $the_terms = array();
2144
+ }
2145
+
2146
  if ( $quoted[ $index ] ) {
2147
  foreach ( $the_terms as $term_index => $the_term ) {
2148
  if ( ! self::_match_quoted_phrase( $phrase, $the_term->name ) ) {
2298
  * separated by taxonomy.
2299
  */
2300
  if ( in_array( 'terms', $fields ) ) {
2301
+ // WordPress encodes special characters, e.g., "&" as HTML entities in term names
2302
+ $the_terms = get_terms( self::$search_parameters['mla_search_taxonomies'], array( 'name__like' => _wp_specialchars( $term ), 'fields' => 'all', 'hide_empty' => false ) );
2303
+ // Invalid taxonomy will return WP_Error object
2304
+ if ( ! is_array( $the_terms ) ) {
2305
+ $the_terms = array();
2306
+ }
2307
+
2308
  foreach( $the_terms as $the_term ) {
2309
  $tax_terms[ $the_term->taxonomy ][ $the_term->term_id ] = (integer) $the_term->term_taxonomy_id;
2310
 
2417
  * WordPress filters meta_value thru trim() - which we must reverse
2418
  */
2419
  if ( isset( self::$query_parameters['mla-metavalue'] ) ) {
2420
+ if ( is_array( self::$query_parameters['mla-metavalue'] ) ) {
2421
+ foreach ( self::$query_parameters['mla-metavalue'] as $pattern => $replacement ) {
2422
+ $where_clause = preg_replace( '/(^.*meta_value AS CHAR\) = \')(' . $pattern . '[^\']*)/m', '${1}' . $replacement, $where_clause );
2423
+ }
2424
+ } else {
2425
+ $where_clause = preg_replace( '/(^.*meta_value AS CHAR\) = \')([^\']*)/m', '${1}' . self::$query_parameters['mla-metavalue'], $where_clause );
2426
+ }
2427
  }
2428
 
2429
  /*
3133
 
3134
  $attachment_metadata = get_post_meta( $ID, '_wp_attachment_metadata', true );
3135
  $sizes = isset( $attachment_metadata['sizes'] ) ? $attachment_metadata['sizes'] : NULL;
3136
+ if ( is_array( $sizes ) ) {
3137
  // Using the name as the array key ensures each name is added only once
3138
  foreach ( $sizes as $size => $size_info ) {
3139
  $size_info['size'] = $size;
3983
  if ( is_scalar( $values ) ) {
3984
  return $values;
3985
  }
3986
+
3987
  if ( isset( $values['rdf:Alt'] ) ) {
3988
  return self::_parse_xmp_array( $values['rdf:Alt'] );
3989
  }
5833
  $taxonomy_obj = get_taxonomy( $taxonomy );
5834
 
5835
  if ( current_user_can( $taxonomy_obj->cap->assign_terms ) ) {
5836
+ if ( is_array( $tags ) ) // array of int = hierarchical, comma-delimited string = non-hierarchical.
5837
  $tags = array_filter( $tags );
5838
 
5839
  switch ( $tax_action ) {
5961
  }
5962
  }
5963
  } else {
5964
+ // WordPress encodes special characters, e.g., "&" as HTML entities in term names
5965
+ array_map( '_wp_specialchars', $terms );
5966
  foreach( $terms_before as $index => $term ) {
5967
  if ( ! in_array( $term, $terms ) ) {
5968
  $terms_after[] = $term;
includes/class-mla-edit-media.php CHANGED
@@ -48,29 +48,26 @@ class MLAEdit {
48
  * @return void
49
  */
50
  public static function initialize() {
51
- /*
52
- * WordPress 3.5 uses the edit-form-advanced.php file for the Edit Media
53
- * page. This supports all the standard meta-boxes for post types.
54
- */
55
- if ( MLATest::$wordpress_3point5_plus ) {
56
- add_action( 'admin_init', 'MLAEdit::mla_admin_init_action' );
57
 
58
- add_action( 'admin_enqueue_scripts', 'MLAEdit::mla_admin_enqueue_scripts_action' );
 
59
 
60
- add_action( 'add_meta_boxes', 'MLAEdit::mla_add_meta_boxes_action', 10, 2 );
 
61
 
62
- // apply_filters( 'post_updated_messages', $messages ) in wp-admin/edit-form-advanced.php
63
- add_filter( 'post_updated_messages', 'MLAEdit::mla_post_updated_messages_filter', 10, 1 );
64
 
65
- // do_action in wp-admin/includes/meta-boxes.php function attachment_submit_meta_box
66
- add_action( 'attachment_submitbox_misc_actions', 'MLAEdit::mla_attachment_submitbox_action' );
67
 
68
- // do_action in wp-includes/post.php function wp_insert_post
69
- add_action( 'edit_attachment', 'MLAEdit::mla_edit_attachment_action', 10, 1 );
70
 
71
- // apply_filters( 'admin_title', $admin_title, $title ) in /wp-admin/admin-header.php
72
- add_filter( 'admin_title', 'MLAEdit::mla_edit_add_help_tab', 10, 2 );
73
- } // $wordpress_3point5_plus
74
  }
75
 
76
  /**
@@ -187,6 +184,7 @@ class MLAEdit {
187
  'ajaxFailError' => __( 'An ajax.fail error has occurred. Please reload the page and try again.', 'media-library-assistant' ),
188
  'ajaxDoneError' => __( 'An ajax.done error has occurred. Please reload the page and try again.', 'media-library-assistant' ),
189
  'useDashicons' => false,
 
190
  'toggleOpen' => __( 'Open Bulk Edit area', 'media-library-assistant' ),
191
  'toggleClose' => __( 'Close Bulk Edit area', 'media-library-assistant' ),
192
  );
@@ -195,6 +193,10 @@ class MLAEdit {
195
  $script_variables['useDashicons'] = true;
196
  }
197
 
 
 
 
 
198
  wp_localize_script( 'mla-add-new-bulk-edit-scripts', 'mla_add_new_bulk_edit_vars', $script_variables );
199
 
200
  // Filter the media upload post parameters.
@@ -236,12 +238,16 @@ class MLAEdit {
236
  'Ajax_Url' => admin_url( 'admin-ajax.php' ),
237
  'ajaxFailError' => __( 'An ajax.fail error has occurred. Please reload the page and try again.', 'media-library-assistant' ),
238
  'ajaxDoneError' => __( 'An ajax.done error has occurred. Please reload the page and try again.', 'media-library-assistant' ),
 
 
239
  );
240
 
241
  if ( version_compare( get_bloginfo( 'version' ), '3.8', '>=' ) ) {
242
  $script_variables['useDashicons'] = true;
243
- } else {
244
- $script_variables['useDashicons'] = false;
 
 
245
  }
246
 
247
  wp_localize_script( self::JAVASCRIPT_EDIT_MEDIA_SLUG, self::JAVASCRIPT_EDIT_MEDIA_OBJECT, $script_variables );
@@ -479,7 +485,6 @@ class MLAEdit {
479
  * Pass the ID
480
  */
481
  $args['cb_attachment'] = array( $post_id );
482
-
483
  $item_content = MLA::mla_process_bulk_action( 'edit', $args );
484
  }
485
 
48
  * @return void
49
  */
50
  public static function initialize() {
51
+ // do_action( 'admin_init' ) in wp-admin/admin.php
52
+ add_action( 'admin_init', 'MLAEdit::mla_admin_init_action' );
 
 
 
 
53
 
54
+ // do_action( 'admin_enqueue_scripts', $hook_suffix ) in wp-admin/admin-header.php
55
+ add_action( 'admin_enqueue_scripts', 'MLAEdit::mla_admin_enqueue_scripts_action' );
56
 
57
+ // do_action( 'add_meta_boxes', $post_type, $post ) in wp-admin/edit-form-advanced.php
58
+ add_action( 'add_meta_boxes', 'MLAEdit::mla_add_meta_boxes_action', 10, 2 );
59
 
60
+ // apply_filters( 'post_updated_messages', $messages ) in wp-admin/edit-form-advanced.php
61
+ add_filter( 'post_updated_messages', 'MLAEdit::mla_post_updated_messages_filter', 10, 1 );
62
 
63
+ // do_action in wp-admin/includes/meta-boxes.php function attachment_submit_meta_box
64
+ add_action( 'attachment_submitbox_misc_actions', 'MLAEdit::mla_attachment_submitbox_action' );
65
 
66
+ // do_action in wp-includes/post.php function wp_insert_post
67
+ add_action( 'edit_attachment', 'MLAEdit::mla_edit_attachment_action', 10, 1 );
68
 
69
+ // apply_filters( 'admin_title', $admin_title, $title ) in /wp-admin/admin-header.php
70
+ add_filter( 'admin_title', 'MLAEdit::mla_edit_add_help_tab', 10, 2 );
 
71
  }
72
 
73
  /**
184
  'ajaxFailError' => __( 'An ajax.fail error has occurred. Please reload the page and try again.', 'media-library-assistant' ),
185
  'ajaxDoneError' => __( 'An ajax.done error has occurred. Please reload the page and try again.', 'media-library-assistant' ),
186
  'useDashicons' => false,
187
+ 'useSpinnerClass' => false,
188
  'toggleOpen' => __( 'Open Bulk Edit area', 'media-library-assistant' ),
189
  'toggleClose' => __( 'Close Bulk Edit area', 'media-library-assistant' ),
190
  );
193
  $script_variables['useDashicons'] = true;
194
  }
195
 
196
+ if ( version_compare( get_bloginfo( 'version' ), '4.2', '>=' ) ) {
197
+ $script_variables['useSpinnerClass'] = true;
198
+ }
199
+
200
  wp_localize_script( 'mla-add-new-bulk-edit-scripts', 'mla_add_new_bulk_edit_vars', $script_variables );
201
 
202
  // Filter the media upload post parameters.
238
  'Ajax_Url' => admin_url( 'admin-ajax.php' ),
239
  'ajaxFailError' => __( 'An ajax.fail error has occurred. Please reload the page and try again.', 'media-library-assistant' ),
240
  'ajaxDoneError' => __( 'An ajax.done error has occurred. Please reload the page and try again.', 'media-library-assistant' ),
241
+ 'useDashicons' => false,
242
+ 'useSpinnerClass' => false,
243
  );
244
 
245
  if ( version_compare( get_bloginfo( 'version' ), '3.8', '>=' ) ) {
246
  $script_variables['useDashicons'] = true;
247
+ }
248
+
249
+ if ( version_compare( get_bloginfo( 'version' ), '4.2', '>=' ) ) {
250
+ $script_variables['useSpinnerClass'] = true;
251
  }
252
 
253
  wp_localize_script( self::JAVASCRIPT_EDIT_MEDIA_SLUG, self::JAVASCRIPT_EDIT_MEDIA_OBJECT, $script_variables );
485
  * Pass the ID
486
  */
487
  $args['cb_attachment'] = array( $post_id );
 
488
  $item_content = MLA::mla_process_bulk_action( 'edit', $args );
489
  }
490
 
includes/class-mla-image-editor.php DELETED
@@ -1,309 +0,0 @@
1
- <?php
2
- /**
3
- * MLA Imagick Image Editor
4
- *
5
- * @package Media Library Assistant
6
- * @since 2.10
7
- */
8
-
9
- /**
10
- * MLA Image Editor Class for Image Manipulation through Imagick PHP Module
11
- *
12
- * @since 2.10
13
- * @package Media Library Assistant
14
- * @uses WP_Image_Editor_Imagick Extends class
15
- */
16
- class MLA_Image_Editor extends WP_Image_Editor_Imagick {
17
- /**
18
- * Direct Ghostscript file conversion
19
- *
20
- * @since 2.10
21
- *
22
- * @param string $file Input file, e.g., a PDF document
23
- * @param string $frame Page/frame within the file, zero-based
24
- * @param string $resolution Output file DPI. Default 72.
25
- * @param string $output_type Output MIME type; 'image/jpeg' or 'image/png'.
26
- *
27
- * @return boolean true if conversion succeeds else false
28
- */
29
- private function _ghostscript_convert( $file, $frame, $resolution, $output_type ) {
30
- /*
31
- * Look for exec() - from http://stackoverflow.com/a/12980534/866618
32
- */
33
- if ( ini_get('safe_mode') ) {
34
- return false;
35
- }
36
-
37
- $blacklist = preg_split( '/,\s*/', ini_get('disable_functions') . ',' . ini_get('suhosin.executor.func.blacklist') );
38
- if ( in_array('exec', $blacklist) ) {
39
- return false;
40
- }
41
-
42
- /*
43
- * Look for the Ghostscript executable
44
- */
45
- $ghostscript_path = NULL;
46
- do {
47
-
48
- if ( 'WIN' === strtoupper( substr( PHP_OS, 0, 3) ) ) {
49
- if ( $ghostscript_path = getenv('GSC') ) {
50
- break;
51
- }
52
-
53
- $ghostscript_path = exec('where gswin*c.exe');
54
- if ( ! empty( $ghostscript_path ) ) {
55
- break;
56
- }
57
-
58
- $ghostscript_path = exec('dir /o:n/s/b "C:\Program Files\gs\*gswin*c.exe"');
59
- if ( ! empty( $ghostscript_path ) ) {
60
- break;
61
- }
62
-
63
- $ghostscript_path = exec('dir /o:n/s/b "C:\Program Files (x86)\gs\*gswin32c.exe"');
64
- if ( ! empty( $ghostscript_path ) ) {
65
- break;
66
- }
67
-
68
- $ghostscript_path = NULL;
69
- break;
70
- } // Windows platform
71
-
72
- $ghostscript_path = exec('which gs');
73
- if ( ! empty( $ghostscript_path ) ) {
74
- break;
75
- }
76
-
77
- $test_path = '/usr/bin/gs';
78
- exec('test -e ' . $test_path, $dummy, $ghostscript_path);
79
-
80
- if ( $test_path !== $ghostscript_path ) {
81
- $ghostscript_path = NULL;
82
- }
83
- } while ( false );
84
-
85
- if ( isset( $ghostscript_path ) ) {
86
- if ( 'image/jpeg' == $output_type ) {
87
- $device = 'jpeg';
88
- $extension = '.jpg';
89
- } else {
90
- $device = 'png16m';
91
- $extension = '.png';
92
- }
93
-
94
- /*
95
- * Generate a unique temporary file name
96
- */
97
- $output_path = get_temp_dir();
98
- $output_file = $output_path . wp_unique_filename( $output_path, 'mla-ghostscript' . $extension);
99
-
100
- $cmd = escapeshellarg( $ghostscript_path ) . ' -sDEVICE=%1$s -r%2$dx%2$d -dFirstPage=%3$d -dLastPage=%3$d -dPDFFitPage -o %4$s %5$s 2>&1';
101
- $cmd = sprintf( $cmd, $device, $resolution, ( $frame + 1 ), escapeshellarg( $output_file ), escapeshellarg( $file ) );
102
- exec( $cmd, $stdout, $return );
103
- if ( 0 != $return ) {
104
- error_log( "ERROR: _ghostscript_convert exec returned '{$return}, cmd = " . var_export( $cmd, true ), 0 );
105
- error_log( "ERROR: _ghostscript_convert exec returned '{$return}, details = " . var_export( $stdout, true ), 0 );
106
- return false;
107
- }
108
-
109
- try {
110
- $this->image->readImage( $output_file );
111
- }
112
- catch ( Exception $e ) {
113
- error_log( "ERROR: _ghostscript_convert readImage Exception = " . var_export( $e->getMessage(), true ), 0 );
114
- return false;
115
- }
116
-
117
- $this->file = $output_file;
118
- @unlink( $output_file );
119
- return true;
120
- } // found Ghostscript
121
-
122
- return false;
123
- }
124
-
125
-
126
- /**
127
- * Loads image from $this->file into new Imagick Object.
128
- *
129
- * Sets image resolution and frame from $imagick_args before loading the file.
130
- *
131
- * @since 2.10
132
- * @access protected
133
- *
134
- * @return boolean|WP_Error True if loaded; WP_Error on failure.
135
- */
136
- public function load() {
137
- if ( $this->image instanceof Imagick )
138
- return true;
139
-
140
- if ( ! is_file( $this->file ) && ! preg_match( '|^https?://|', $this->file ) )
141
- return new WP_Error( 'error_loading_image', __('File doesn&#8217;t exist?'), $this->file );
142
-
143
- /** This filter is documented in wp-includes/class-wp-image-editor-imagick.php */
144
- // Even though Imagick uses less PHP memory than GD, set higher limit for users that have low PHP.ini limits
145
- @ini_set( 'memory_limit', apply_filters( 'image_memory_limit', WP_MAX_MEMORY_LIMIT ) );
146
-
147
- try {
148
- $this->image = new imagick();
149
-
150
- if ( class_exists( 'MLAStreamImage' ) ) {
151
- $mla_imagick_args = MLAStreamImage::$mla_imagick_args;
152
- } else {
153
- $mla_imagick_args = array();
154
- }
155
-
156
- /*
157
- * this must be called before reading the image, otherwise has no effect -
158
- * "-density {$x_resolution}x{$y_resolution}"
159
- * this is important to give good quality output, otherwise text might be unclear
160
- * default resolution is 72,72
161
- */
162
- if ( isset( $mla_imagick_args['resolution'] ) ) {
163
- $resolution = absint( $mla_imagick_args['resolution'] );
164
- if ( $resolution ) {
165
- $this->image->setResolution( $resolution, $resolution );
166
- }
167
- } else {
168
- $resolution = 72;
169
- }
170
-
171
- if ( isset( $mla_imagick_args['frame'] ) ) {
172
- $frame = $mla_imagick_args['frame'];
173
- } else {
174
- $frame = 0;
175
- }
176
-
177
- if ( isset( $mla_imagick_args['type'] ) ) {
178
- $type = $mla_imagick_args['type'];
179
- } else {
180
- $type = 'image/jpeg';
181
- }
182
-
183
- //$result = false;
184
- $result = $this->_ghostscript_convert( $this->file, $frame, $resolution, $type );
185
-
186
- if ( false === $result ) {
187
- try {
188
- $this->image->readImage( $this->file . '[' . $frame . ']' );
189
- }
190
- catch ( Exception $e ) {
191
- $this->image->readImage( $this->file . '[0]' );
192
- }
193
-
194
- $this->image->setImageFormat( strtoupper( $this->get_extension( $type ) ) );
195
- }
196
-
197
- if( ! $this->image->valid() )
198
- return new WP_Error( 'invalid_image', __('File is not an image.'), $this->file);
199
-
200
- // Select the first frame to handle animated images properly
201
- if ( is_callable( array( $this->image, 'setIteratorIndex' ) ) )
202
- $this->image->setIteratorIndex(0);
203
-
204
- $this->mime_type = $this->get_mime_type( $this->image->getImageFormat() );
205
- }
206
- catch ( Exception $e ) {
207
- return new WP_Error( 'invalid_image', $e->getMessage(), $this->file );
208
- }
209
-
210
- $result = $this->update_size();
211
- if ( is_wp_error( $result ) ) {
212
- return $result;
213
- }
214
-
215
- return $this->set_quality();
216
- }
217
-
218
- /**
219
- * Set the iterator position
220
- *
221
- * @since 2.10
222
- * @access public
223
- *
224
- * @param integer frame/page number
225
- *
226
- * @return boolean success/failure
227
- */
228
- public function mla_setIteratorIndex( $index ) {
229
- if ( is_callable( array( $this->image, 'setIteratorIndex' ) ) ) {
230
- return $this->image->setIteratorIndex( absint( $index ) );
231
- }
232
-
233
- return false;
234
- }
235
-
236
- /**
237
- * Prepare the image for output, scaling and flattening as required
238
- *
239
- * @since 2.10
240
- * @access public
241
- *
242
- * @param integer zero or new width
243
- * @param integer zero or new height
244
- * @param boolean proportional fit (true) or exact fit (false)
245
- * @param string output MIME type
246
- * @param integer compression quality; 1 - 100
247
- *
248
- * @return void
249
- */
250
- public function mla_prepare_image( $width, $height, $best_fit, $type, $quality ) {
251
- if ( is_callable( array( $this->image, 'scaleImage' ) ) ) {
252
- if ( 0 < $width && 0 < $height ) {
253
- // Both are set; use them as-is
254
- $this->image->scaleImage( $width, $height, $best_fit );
255
- } elseif ( 0 < $width || 0 < $height ) {
256
- // One is set; scale the other one proportionally if reducing
257
- $image_size = $this->get_size();
258
- if ( $width && isset( $image_size['width'] ) && $width < $image_size['width'] ) {
259
- $this->image->scaleImage( $width, 0 );
260
- } elseif ( isset( $image_size['height'] ) && $height < $image_size['height'] ) {
261
- $this->image->scaleImage( 0, $height );
262
- }
263
- } else {
264
- // Neither is specified, apply defaults
265
- $this->image->scaleImage( 150, 0 );
266
- }
267
-
268
- $this->update_size();
269
- }
270
-
271
- if ( 0 < $quality && 101 > $quality ) {
272
- $this->set_quality( $quality );
273
- }
274
-
275
- if ( 'image/jpeg' == $type ) {
276
- if ( is_callable( array( $this->image, 'setImageBackgroundColor' ) ) ) {
277
- $this->image->setImageBackgroundColor('white');
278
- }
279
-
280
- if ( is_callable( array( $this->image, 'mergeImageLayers' ) ) ) {
281
- $this->image = $this->image->mergeImageLayers( imagick::LAYERMETHOD_FLATTEN );
282
- } elseif ( is_callable( array( $this->image, 'flattenImages' ) ) ) {
283
- $this->image = $this->image->flattenImages();
284
- }
285
- }
286
- }
287
-
288
- /**
289
- * Streams current image to browser.
290
- *
291
- * @since 2.10
292
- * @access public
293
- *
294
- * @param string $mime_type
295
- * @return boolean|WP_Error
296
- */
297
- public function stream( $mime_type = null ) {
298
- try {
299
- // Output stream of image content
300
- header( "Content-Type: $mime_type" );
301
- print $this->image->getImageBlob();
302
- }
303
- catch ( Exception $e ) {
304
- return new WP_Error( 'image_stream_error', $e->getMessage() );
305
- }
306
-
307
- return true;
308
- }
309
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/class-mla-list-table.php CHANGED
@@ -22,6 +22,38 @@ if ( !class_exists( 'WP_List_Table' ) ) {
22
  * @since 0.1
23
  */
24
  class MLA_List_Table extends WP_List_Table {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
  /*
26
  * These variables are used to assign row_actions to exactly one visible column
27
  */
@@ -48,6 +80,15 @@ class MLA_List_Table extends WP_List_Table {
48
  */
49
  protected $currently_hidden = array();
50
 
 
 
 
 
 
 
 
 
 
51
  /*
52
  * The $default_columns, $default_hidden_columns, and $default_sortable_columns
53
  * arrays define the table columns.
@@ -296,7 +337,6 @@ class MLA_List_Table extends WP_List_Table {
296
  * @return array non-empty view, search, filter and sort arguments
297
  */
298
  public static function mla_submenu_arguments( $include_filters = true ) {
299
- global $sitepress;
300
  static $submenu_arguments = NULL, $has_filters = NULL;
301
 
302
  if ( is_array( $submenu_arguments ) && ( $has_filters == $include_filters ) ) {
@@ -306,15 +346,6 @@ class MLA_List_Table extends WP_List_Table {
306
  $submenu_arguments = array();
307
  $has_filters = $include_filters;
308
 
309
- /*
310
- * WPML arguments
311
- */
312
- if ( isset( $_REQUEST['lang'] ) ) {
313
- $submenu_arguments['lang'] = $_REQUEST['lang'];
314
- } elseif ( is_object( $sitepress ) ) {
315
- $submenu_arguments['lang'] = $sitepress->get_current_language();
316
- }
317
-
318
  /*
319
  * View arguments
320
  */
@@ -445,91 +476,6 @@ class MLA_List_Table extends WP_List_Table {
445
  return apply_filters( 'mla_list_table_get_columns', self::$default_columns );
446
  }
447
 
448
- /**
449
- * Handler for filter "views_{$this->screen->id}" in /admin/includes/class-wp-list-table.php
450
- *
451
- * Filter the list of available list table views. Set when the
452
- * file is loaded because the list_table object isn't created in time
453
- * to affect the "screen options" setup.
454
- *
455
- * @since 1.82
456
- *
457
- * @param array A list of available list table views
458
- *
459
- * @return array Updated list of available list table views
460
- */
461
- public static function mla_views_media_page_mla_menu_filter( $views ) {
462
- // hooked by WPML Media in wpml-media.class.php
463
- $views = apply_filters( 'views_upload', $views );
464
- return $views;
465
- }
466
-
467
- /**
468
- * Handler for filter "wpml-media_view-upload-count" in /plugins/wpml-media/inc/wpml-media.class.php
469
- *
470
- * Computes the number of attachments that satisfy a meta_query specification.
471
- * The count is automatically made language-specific by WPML filters.
472
- *
473
- * @since 1.90
474
- *
475
- * @param NULL default return value if not replacing count
476
- * @param string key/slug value for the selected view
477
- * @param string HTML <a></a> tag for the link to the selected view
478
- * @param string language code, e.g., 'en', 'es'
479
- *
480
- * @return mixed NULL to allow SQL query or replacement count value
481
- */
482
- public static function mla_wpml_media_view_upload_count_filter( $count, $key, $view, $lang ) {
483
- // extract the base URL and query parameters
484
- $href_count = preg_match( '/(href=["\'])([\s\S]+?)\?([\s\S]+?)(["\'])/', $view, $href_matches );
485
- if ( $href_count ) {
486
- wp_parse_str( $href_matches[3], $href_args );
487
-
488
- if ( isset( $href_args['meta_query'] ) ) {
489
- $meta_view = self::_get_view( $key, '' );
490
- // extract the count value
491
- $href_count = preg_match( '/class="count">\(([^\)]*)\)/', $meta_view, $href_matches );
492
- if ( $href_count ) {
493
- $count = array( $href_matches[1] );
494
- }
495
- }
496
- }
497
-
498
- return $count;
499
- }
500
-
501
- /**
502
- * Handler for filter "wpml-media_view-upload-page-count" in /plugins/wpml-media/inc/wpml-media.class.php
503
- *
504
- * Computes the number of language-specific attachments that satisfy a meta_query specification.
505
- * The count is made language-specific by WPML filters when the current_language is set.
506
- *
507
- * @since 1.90
508
- *
509
- * @param NULL default return value if not replacing count
510
- * @param string language code, e.g., 'en', 'es'
511
- *
512
- * @return mixed NULL to allow SQL query or replacement count value
513
- */
514
- public static function mla_wpml_media_view_upload_page_count_filter( $count, $lang ) {
515
- global $sitepress;
516
-
517
- if ( isset( $_GET['meta_slug'] ) ) {
518
- $save_lang = $sitepress->get_current_language();
519
- $sitepress->switch_lang( $lang['code'] );
520
- $meta_view = self::_get_view( $_GET['meta_slug'], '' );
521
- $sitepress->switch_lang( $save_lang );
522
-
523
- // extract the count value
524
- $href_count = preg_match( '/class="count">\(([^\)]*)\)/', $meta_view, $href_matches );
525
- if ( $href_count ) {
526
- $count = array( $href_matches[1] );
527
- }
528
- }
529
-
530
- return $count;
531
- }
532
-
533
  /**
534
  * Adds support for taxonomy and custom field columns
535
  *
@@ -566,9 +512,8 @@ class MLA_List_Table extends WP_List_Table {
566
  * @return void
567
  */
568
  function __construct( ) {
569
- global $sitepress;
570
-
571
- $this->detached = isset( $_REQUEST['detached'] );
572
  $this->is_trash = isset( $_REQUEST['status'] ) && $_REQUEST['status'] == 'trash';
573
 
574
  //Set parent defaults
@@ -588,12 +533,6 @@ class MLA_List_Table extends WP_List_Table {
588
  * They are added when the source file is loaded because the MLA_List_Table
589
  * object is created too late to be useful.
590
  */
591
-
592
- if ( is_object( $sitepress ) ) {
593
- add_filter( 'views_media_page_mla-menu', 'MLA_List_Table::mla_views_media_page_mla_menu_filter', 10, 1 );
594
- add_filter( 'wpml-media_view-upload-count', 'MLA_List_Table::mla_wpml_media_view_upload_count_filter', 10, 4 );
595
- add_filter( 'wpml-media_view-upload-page-count', 'MLA_List_Table::mla_wpml_media_view_upload_page_count_filter', 10, 2 );
596
- }
597
  }
598
 
599
  /**
@@ -658,9 +597,10 @@ class MLA_List_Table extends WP_List_Table {
658
  /*
659
  * For display purposes, convert array values.
660
  * They are not links because no search will match them.
 
661
  */
662
  if ( is_array( $value ) ) {
663
- $list[] = 'array( ' . implode( ', ', $value ) . ' )';
664
  } else {
665
  $list[] = sprintf( '<a href="%1$s" title="' . __( 'Filter by', 'media-library-assistant' ) . ' &#8220;%2$s&#8221;">%3$s</a>', esc_url( add_query_arg( array_merge( self::mla_submenu_arguments( false ), array(
666
  'page' => MLA::ADMIN_PAGE_SLUG,
@@ -732,23 +672,13 @@ class MLA_List_Table extends WP_List_Table {
732
  }
733
 
734
  /*
735
- * Use the WordPress Edit Media screen for 3.5 and later
736
  */
737
  $view_args = self::mla_submenu_arguments();
738
- if ( MLATest::$wordpress_3point5_plus ) {
739
- if ( isset( $view_args['lang'] ) ) {
740
- $edit_url = 'post.php?post=' . $item->ID . '&action=edit&mla_source=edit&lang=' . $view_args['lang'];
741
- } else {
742
- $edit_url = 'post.php?post=' . $item->ID . '&action=edit&mla_source=edit';
743
- }
744
  } else {
745
- if ( isset( $view_args['lang'] ) ) {
746
- $view_args = array( 'lang' => $view_args['lang'] );
747
- } else {
748
- $view_args = array();
749
- }
750
-
751
- $edit_url = '<a href="' . add_query_arg( $view_args, wp_nonce_url( '?mla_admin_action=' . MLA::MLA_ADMIN_SINGLE_EDIT_DISPLAY, MLA::MLA_ADMIN_NONCE ) ) . '" title="' . __( 'Edit this item', 'media-library-assistant' ) . '">' . __( 'Edit', 'media-library-assistant' ) . '</a>';
752
  }
753
 
754
  return sprintf( '<a href="%1$s" title="' . __( 'Edit', 'media-library-assistant' ) . ' &#8220;%2$s&#8221;">%3$s</a>', admin_url( $edit_url ), esc_attr( $item->post_title ), $thumb );
@@ -815,20 +745,15 @@ class MLA_List_Table extends WP_List_Table {
815
  $actions['restore'] = '<a class="submitdelete" href="' . add_query_arg( $view_args, wp_nonce_url( '?mla_admin_action=' . MLA::MLA_ADMIN_SINGLE_RESTORE, MLA::MLA_ADMIN_NONCE ) ) . '" title="' . __( 'Restore this item from the Trash', 'media-library-assistant' ) . '">' . __( 'Restore', 'media-library-assistant' ) . '</a>';
816
  } else {
817
  /*
818
- * Use the WordPress Edit Media screen for 3.5 and later
819
  */
820
- if ( MLATest::$wordpress_3point5_plus ) {
821
- if ( isset( $view_args['lang'] ) ) {
822
- $edit_url = 'post.php?post=' . $item->ID . '&action=edit&mla_source=edit&lang=' . $view_args['lang'];
823
- } else {
824
- $edit_url = 'post.php?post=' . $item->ID . '&action=edit&mla_source=edit';
825
- }
826
-
827
- $actions['edit'] = '<a href="' . admin_url( $edit_url ) . '" title="' . __( 'Edit this item', 'media-library-assistant' ) . '">' . __( 'Edit', 'media-library-assistant' ) . '</a>';
828
  } else {
829
- $actions['edit'] = '<a href="' . add_query_arg( $view_args, wp_nonce_url( '?mla_admin_action=' . MLA::MLA_ADMIN_SINGLE_EDIT_DISPLAY, MLA::MLA_ADMIN_NONCE ) ) . '" title="' . __( 'Edit this item', 'media-library-assistant' ) . '">' . __( 'Edit', 'media-library-assistant' ) . '</a>';
830
  }
831
 
 
832
  $actions['inline hide-if-no-js'] = '<a class="editinline" href="#" title="' . __( 'Edit this item inline', 'media-library-assistant' ) . '">' . __( 'Quick Edit', 'media-library-assistant' ) . '</a>';
833
  }
834
  } // edit_post
@@ -1571,6 +1496,20 @@ class MLA_List_Table extends WP_List_Table {
1571
  $_SERVER['REQUEST_URI'] = $save_uri;
1572
  }
1573
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1574
  /**
1575
  * Returns HTML markup for one view that can be used with this table
1576
  *
@@ -1583,7 +1522,7 @@ class MLA_List_Table extends WP_List_Table {
1583
  */
1584
  private static function _get_view( $view_slug, $current_view ) {
1585
  global $wpdb;
1586
- static $mla_types = NULL, $posts_per_type, $post_mime_types, $avail_post_mime_types, $matches, $num_posts;
1587
 
1588
  /*
1589
  * Calculate the common values once per page load
@@ -1609,6 +1548,8 @@ class MLA_List_Table extends WP_List_Table {
1609
  $num_posts[ $type ] = ( isset( $num_posts[ $type ] ) ) ? $num_posts[ $type ] + $posts_per_type[ $real ] : $posts_per_type[ $real ];
1610
  }
1611
  }
 
 
1612
  }
1613
 
1614
  $class = ( $view_slug == $current_view ) ? ' class="current"' : '';
@@ -1621,19 +1562,21 @@ class MLA_List_Table extends WP_List_Table {
1621
  case 'all':
1622
  $total_items = array_sum( $posts_per_type ) - $posts_per_type['trash'];
1623
  return "<a href='{$base_url}'$class>" . sprintf( _nx( 'All', 'All', $total_items, 'uploaded files', 'media-library-assistant' ) . ' <span class="count">(%1$s)</span></a>', number_format_i18n( $total_items ) );
1624
- case 'unattached':
1625
- $total_items = $wpdb->get_var(
1626
- "
1627
- SELECT COUNT( * ) FROM {$wpdb->posts}
1628
- WHERE post_type = 'attachment' AND post_status != 'trash' AND post_parent < 1
1629
- "
1630
- );
1631
-
1632
- if ( $total_items ) {
1633
- $value = MLAOptions::$mla_option_definitions[ MLAOptions::MLA_POST_MIME_TYPES ]['std']['unattached'];
1634
  $singular = sprintf('%s <span class="count">(%%s)</span>', $value['singular'] );
1635
  $plural = sprintf('%s <span class="count">(%%s)</span>', $value['plural'] );
1636
- return '<a href="' . add_query_arg( array( 'detached' => '1' ), $base_url ) . '"' . $class . '>' . sprintf( _nx( $singular, $plural, $total_items, 'detached files', 'media-library-assistant' ), number_format_i18n( $total_items ) ) . '</a>';
 
 
 
 
 
 
 
 
 
1637
  }
1638
 
1639
  return false;
@@ -1642,8 +1585,7 @@ class MLA_List_Table extends WP_List_Table {
1642
  $value = MLAOptions::$mla_option_definitions[ MLAOptions::MLA_POST_MIME_TYPES ]['std']['trash'];
1643
  $singular = sprintf('%s <span class="count">(%%s)</span>', $value['singular'] );
1644
  $plural = sprintf('%s <span class="count">(%%s)</span>', $value['plural'] );
1645
- return '<a href="' . add_query_arg( array(
1646
- 'status' => 'trash'
1647
  ), $base_url ) . '"' . $class . '>' . sprintf( _nx( $singular, $plural, $posts_per_type['trash'], 'uploaded files', 'media-library-assistant' ), number_format_i18n( $posts_per_type['trash'] ) ) . '</a>';
1648
  }
1649
 
@@ -1664,8 +1606,7 @@ class MLA_List_Table extends WP_List_Table {
1664
  */
1665
  if ( $mla_type->post_mime_type ) {
1666
  if ( !empty( $num_posts[ $view_slug ] ) ) {
1667
- return "<a href='" . add_query_arg( array(
1668
- 'post_mime_type' => $view_slug
1669
  ), $base_url ) . "'$class>" . sprintf( translate_nooped_plural( $post_mime_types[ $view_slug ][ 2 ], $num_posts[ $view_slug ], 'media-library-assistant' ), number_format_i18n( $num_posts[ $view_slug ] ) ) . '</a>';
1670
  }
1671
 
@@ -1713,7 +1654,9 @@ class MLA_List_Table extends WP_List_Table {
1713
  * Find current view
1714
  */
1715
  if ( $this->detached ) {
1716
- $current_view = 'unattached';
 
 
1717
  } elseif ( $this->is_trash ) {
1718
  $current_view = 'trash';
1719
  } elseif ( empty( $_REQUEST['post_mime_type'] ) ) {
@@ -1743,12 +1686,7 @@ class MLA_List_Table extends WP_List_Table {
1743
  }
1744
 
1745
  if ( $link = self::_get_view( $value->slug, $current_view ) ) {
1746
- // WPML Media looks for "detached", not "unattached"
1747
- if ( 'unattached' == $value->slug ) {
1748
- $view_links[ 'detached' ] = $link;
1749
- } else {
1750
- $view_links[ $value->slug ] = $link;
1751
- }
1752
  }
1753
  }
1754
  }
22
  * @since 0.1
23
  */
24
  class MLA_List_Table extends WP_List_Table {
25
+
26
+ /**
27
+ * True if the current view is "Unattached"
28
+ *
29
+ * Declaration added in MLA v2.11 for WP 4.2 compatibility.
30
+ *
31
+ * @since 0.1
32
+ *
33
+ * @var int
34
+ */
35
+ private $detached;
36
+
37
+ /**
38
+ * True if the current view is "Attached"
39
+ *
40
+ * @since 2.11
41
+ *
42
+ * @var int
43
+ */
44
+ private $attached;
45
+
46
+ /**
47
+ * True if the current view is "Trash"
48
+ *
49
+ * Declaration added in MLA v2.11 for WP 4.2 compatibility.
50
+ *
51
+ * @since 0.1
52
+ *
53
+ * @var int
54
+ */
55
+ private $is_trash;
56
+
57
  /*
58
  * These variables are used to assign row_actions to exactly one visible column
59
  */
80
  */
81
  protected $currently_hidden = array();
82
 
83
+ /**
84
+ * The WPML_List_table support object, if required
85
+ *
86
+ * @since 2.11
87
+ *
88
+ * @var object
89
+ */
90
+ protected $mla_wpml_table = NULL;
91
+
92
  /*
93
  * The $default_columns, $default_hidden_columns, and $default_sortable_columns
94
  * arrays define the table columns.
337
  * @return array non-empty view, search, filter and sort arguments
338
  */
339
  public static function mla_submenu_arguments( $include_filters = true ) {
 
340
  static $submenu_arguments = NULL, $has_filters = NULL;
341
 
342
  if ( is_array( $submenu_arguments ) && ( $has_filters == $include_filters ) ) {
346
  $submenu_arguments = array();
347
  $has_filters = $include_filters;
348
 
 
 
 
 
 
 
 
 
 
349
  /*
350
  * View arguments
351
  */
476
  return apply_filters( 'mla_list_table_get_columns', self::$default_columns );
477
  }
478
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
479
  /**
480
  * Adds support for taxonomy and custom field columns
481
  *
512
  * @return void
513
  */
514
  function __construct( ) {
515
+ $this->detached = isset( $_REQUEST['detached'] ) && ( '1' == $_REQUEST['detached'] );
516
+ $this->attached = isset( $_REQUEST['detached'] ) && ( '0' == $_REQUEST['detached'] );
 
517
  $this->is_trash = isset( $_REQUEST['status'] ) && $_REQUEST['status'] == 'trash';
518
 
519
  //Set parent defaults
533
  * They are added when the source file is loaded because the MLA_List_Table
534
  * object is created too late to be useful.
535
  */
 
 
 
 
 
 
536
  }
537
 
538
  /**
597
  /*
598
  * For display purposes, convert array values.
599
  * They are not links because no search will match them.
600
+ * Use "@" because embedded arrays throw PHP Warnings from implode.
601
  */
602
  if ( is_array( $value ) ) {
603
+ $list[] = 'array( ' . @implode( ', ', $value ) . ' )';
604
  } else {
605
  $list[] = sprintf( '<a href="%1$s" title="' . __( 'Filter by', 'media-library-assistant' ) . ' &#8220;%2$s&#8221;">%3$s</a>', esc_url( add_query_arg( array_merge( self::mla_submenu_arguments( false ), array(
606
  'page' => MLA::ADMIN_PAGE_SLUG,
672
  }
673
 
674
  /*
675
+ * Use the WordPress Edit Media screen
676
  */
677
  $view_args = self::mla_submenu_arguments();
678
+ if ( isset( $view_args['lang'] ) ) {
679
+ $edit_url = 'post.php?post=' . $item->ID . '&action=edit&mla_source=edit&lang=' . $view_args['lang'];
 
 
 
 
680
  } else {
681
+ $edit_url = 'post.php?post=' . $item->ID . '&action=edit&mla_source=edit';
 
 
 
 
 
 
682
  }
683
 
684
  return sprintf( '<a href="%1$s" title="' . __( 'Edit', 'media-library-assistant' ) . ' &#8220;%2$s&#8221;">%3$s</a>', admin_url( $edit_url ), esc_attr( $item->post_title ), $thumb );
745
  $actions['restore'] = '<a class="submitdelete" href="' . add_query_arg( $view_args, wp_nonce_url( '?mla_admin_action=' . MLA::MLA_ADMIN_SINGLE_RESTORE, MLA::MLA_ADMIN_NONCE ) ) . '" title="' . __( 'Restore this item from the Trash', 'media-library-assistant' ) . '">' . __( 'Restore', 'media-library-assistant' ) . '</a>';
746
  } else {
747
  /*
748
+ * Use the WordPress Edit Media screen
749
  */
750
+ if ( isset( $view_args['lang'] ) ) {
751
+ $edit_url = 'post.php?post=' . $item->ID . '&action=edit&mla_source=edit&lang=' . $view_args['lang'];
 
 
 
 
 
 
752
  } else {
753
+ $edit_url = 'post.php?post=' . $item->ID . '&action=edit&mla_source=edit';
754
  }
755
 
756
+ $actions['edit'] = '<a href="' . admin_url( $edit_url ) . '" title="' . __( 'Edit this item', 'media-library-assistant' ) . '">' . __( 'Edit', 'media-library-assistant' ) . '</a>';
757
  $actions['inline hide-if-no-js'] = '<a class="editinline" href="#" title="' . __( 'Edit this item inline', 'media-library-assistant' ) . '">' . __( 'Quick Edit', 'media-library-assistant' ) . '</a>';
758
  }
759
  } // edit_post
1496
  $_SERVER['REQUEST_URI'] = $save_uri;
1497
  }
1498
 
1499
+ /**
1500
+ * Wrapper for _get_view; returns HTML markup for one view that can be used with this table
1501
+ *
1502
+ * @since 2.11
1503
+ *
1504
+ * @param string View slug, key to MLA_POST_MIME_TYPES array
1505
+ * @param string Slug for current view
1506
+ *
1507
+ * @return string | false HTML for link to display the view, false if count = zero
1508
+ */
1509
+ public function mla_get_view( $view_slug, $current_view ) {
1510
+ return self::_get_view( $view_slug, $current_view );
1511
+ }
1512
+
1513
  /**
1514
  * Returns HTML markup for one view that can be used with this table
1515
  *
1522
  */
1523
  private static function _get_view( $view_slug, $current_view ) {
1524
  global $wpdb;
1525
+ static $mla_types = NULL, $posts_per_type, $post_mime_types, $avail_post_mime_types, $matches, $num_posts, $detached_items;
1526
 
1527
  /*
1528
  * Calculate the common values once per page load
1548
  $num_posts[ $type ] = ( isset( $num_posts[ $type ] ) ) ? $num_posts[ $type ] + $posts_per_type[ $real ] : $posts_per_type[ $real ];
1549
  }
1550
  }
1551
+
1552
+ $detached_items = $wpdb->get_var( "SELECT COUNT(*) FROM {$wpdb->posts} WHERE post_type = 'attachment' AND post_status != 'trash' AND post_parent < 1" );
1553
  }
1554
 
1555
  $class = ( $view_slug == $current_view ) ? ' class="current"' : '';
1562
  case 'all':
1563
  $total_items = array_sum( $posts_per_type ) - $posts_per_type['trash'];
1564
  return "<a href='{$base_url}'$class>" . sprintf( _nx( 'All', 'All', $total_items, 'uploaded files', 'media-library-assistant' ) . ' <span class="count">(%1$s)</span></a>', number_format_i18n( $total_items ) );
1565
+ case 'detached':
1566
+ if ( $detached_items ) {
1567
+ $value = MLAOptions::$mla_option_definitions[ MLAOptions::MLA_POST_MIME_TYPES ]['std']['detached'];
 
 
 
 
 
 
 
1568
  $singular = sprintf('%s <span class="count">(%%s)</span>', $value['singular'] );
1569
  $plural = sprintf('%s <span class="count">(%%s)</span>', $value['plural'] );
1570
+ return '<a href="' . add_query_arg( array( 'detached' => '1' ), $base_url ) . '"' . $class . '>' . sprintf( _nx( $singular, $plural, $detached_items, 'detached files', 'media-library-assistant' ), number_format_i18n( $detached_items ) ) . '</a>';
1571
+ }
1572
+
1573
+ return false;
1574
+ case 'attached':
1575
+ if ( $attached_items = ( array_sum( $posts_per_type ) - $posts_per_type['trash'] ) - $detached_items ) {
1576
+ $value = MLAOptions::$mla_option_definitions[ MLAOptions::MLA_POST_MIME_TYPES ]['std']['attached'];
1577
+ $singular = sprintf('%s <span class="count">(%%s)</span>', $value['singular'] );
1578
+ $plural = sprintf('%s <span class="count">(%%s)</span>', $value['plural'] );
1579
+ return '<a href="' . add_query_arg( array( 'detached' => '0' ), $base_url ) . '"' . $class . '>' . sprintf( _nx( $singular, $plural, $attached_items, 'attached files', 'media-library-assistant' ), number_format_i18n( $attached_items ) ) . '</a>';
1580
  }
1581
 
1582
  return false;
1585
  $value = MLAOptions::$mla_option_definitions[ MLAOptions::MLA_POST_MIME_TYPES ]['std']['trash'];
1586
  $singular = sprintf('%s <span class="count">(%%s)</span>', $value['singular'] );
1587
  $plural = sprintf('%s <span class="count">(%%s)</span>', $value['plural'] );
1588
+ return '<a href="' . add_query_arg( array( 'status' => 'trash'
 
1589
  ), $base_url ) . '"' . $class . '>' . sprintf( _nx( $singular, $plural, $posts_per_type['trash'], 'uploaded files', 'media-library-assistant' ), number_format_i18n( $posts_per_type['trash'] ) ) . '</a>';
1590
  }
1591
 
1606
  */
1607
  if ( $mla_type->post_mime_type ) {
1608
  if ( !empty( $num_posts[ $view_slug ] ) ) {
1609
+ return "<a href='" . add_query_arg( array( 'post_mime_type' => $view_slug
 
1610
  ), $base_url ) . "'$class>" . sprintf( translate_nooped_plural( $post_mime_types[ $view_slug ][ 2 ], $num_posts[ $view_slug ], 'media-library-assistant' ), number_format_i18n( $num_posts[ $view_slug ] ) ) . '</a>';
1611
  }
1612
 
1654
  * Find current view
1655
  */
1656
  if ( $this->detached ) {
1657
+ $current_view = 'detached';
1658
+ } elseif ( $this->attached ) {
1659
+ $current_view = 'attached';
1660
  } elseif ( $this->is_trash ) {
1661
  $current_view = 'trash';
1662
  } elseif ( empty( $_REQUEST['post_mime_type'] ) ) {
1686
  }
1687
 
1688
  if ( $link = self::_get_view( $value->slug, $current_view ) ) {
1689
+ $view_links[ $value->slug ] = $link;
 
 
 
 
 
1690
  }
1691
  }
1692
  }
includes/class-mla-main.php CHANGED
@@ -29,7 +29,7 @@ class MLA {
29
  *
30
  * @var string
31
  */
32
- const CURRENT_MLA_VERSION = '2.10';
33
 
34
  /**
35
  * Current date for Development Version, empty for production versions
@@ -49,24 +49,6 @@ class MLA {
49
  */
50
  const STYLESHEET_SLUG = 'mla-style';
51
 
52
- /**
53
- * Slug for localizing and enqueueing JavaScript - edit single item page
54
- *
55
- * @since 0.1
56
- *
57
- * @var string
58
- */
59
- const JAVASCRIPT_SINGLE_EDIT_SLUG = 'mla-single-edit-scripts';
60
-
61
- /**
62
- * Object name for localizing JavaScript - edit single item page
63
- *
64
- * @since 0.1
65
- *
66
- * @var string
67
- */
68
- const JAVASCRIPT_SINGLE_EDIT_OBJECT = 'mla_single_edit_vars';
69
-
70
  /**
71
  * Slug for localizing and enqueueing JavaScript - MLA List Table
72
  *
@@ -113,7 +95,9 @@ class MLA {
113
  const MLA_ADMIN_SINGLE_DELETE = 'single_item_delete';
114
 
115
  /**
116
- * mla_admin_action value for displaying a single item
 
 
117
  *
118
  * @since 0.1
119
  *
@@ -124,6 +108,8 @@ class MLA {
124
  /**
125
  * mla_admin_action value for updating a single item
126
  *
 
 
127
  * @since 0.1
128
  *
129
  * @var string
@@ -193,6 +179,26 @@ class MLA {
193
  */
194
  private static $page_hooks = array();
195
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
196
  /**
197
  * Initialization function, similar to __construct()
198
  *
@@ -205,6 +211,48 @@ class MLA {
205
  * @return void
206
  */
207
  public static function initialize( ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
208
  add_action( 'admin_init', 'MLA::mla_admin_init_action' );
209
  add_action( 'admin_enqueue_scripts', 'MLA::mla_admin_enqueue_scripts_action' );
210
  add_action( 'admin_menu', 'MLA::mla_admin_menu_action' );
@@ -274,32 +322,35 @@ class MLA {
274
  check_admin_referer( self::MLA_ADMIN_NONCE );
275
  }
276
 
277
- switch ( $_REQUEST['mla_admin_action'] ) {
278
- case self::MLA_ADMIN_SINGLE_CUSTOM_FIELD_MAP:
279
- do_action( 'mla_begin_mapping', 'single_custom', $_REQUEST['mla_item_ID'] );
280
- $updates = MLAOptions::mla_evaluate_custom_field_mapping( $_REQUEST['mla_item_ID'], 'single_attachment_mapping' );
281
- do_action( 'mla_end_mapping' );
 
282
 
283
- if ( !empty( $updates ) ) {
284
- $item_content = MLAData::mla_update_single_item( $_REQUEST['mla_item_ID'], $updates );
285
- }
286
 
287
- $view_args = isset( $_REQUEST['mla_source'] ) ? array( 'mla_source' => $_REQUEST['mla_source']) : array();
288
- wp_redirect( add_query_arg( $view_args, admin_url( 'post.php' ) . '?post=' . $_REQUEST['mla_item_ID'] . '&action=edit&message=101' ), 302 );
289
- exit;
290
- case self::MLA_ADMIN_SINGLE_MAP:
291
- $item = get_post( $_REQUEST['mla_item_ID'] );
292
- do_action( 'mla_begin_mapping', 'single_iptc_exif', $_REQUEST['mla_item_ID'] );
293
- $updates = MLAOptions::mla_evaluate_iptc_exif_mapping( $item, 'iptc_exif_mapping' );
294
- do_action( 'mla_end_mapping' );
295
- $page_content = MLAData::mla_update_single_item( $_REQUEST['mla_item_ID'], $updates );
296
-
297
- $view_args = isset( $_REQUEST['mla_source'] ) ? array( 'mla_source' => $_REQUEST['mla_source']) : array();
298
- wp_redirect( add_query_arg( $view_args, admin_url( 'post.php' ) . '?post=' . $_REQUEST['mla_item_ID'] . '&action=edit&message=102' ), 302 );
299
- exit;
300
- default:
301
- // ignore the rest
302
- } // switch ($_REQUEST['mla_admin_action'])
 
 
303
  } // (!empty($_REQUEST['mla_admin_action'])
304
 
305
  if ( ( defined('WP_ADMIN') && WP_ADMIN ) && ( defined('DOING_AJAX') && DOING_AJAX ) ) {
@@ -342,54 +393,49 @@ class MLA {
342
  wp_register_style( self::STYLESHEET_SLUG . '-set-parent', MLA_PLUGIN_URL . 'css/mla-style-set-parent.css', false, self::CURRENT_MLA_VERSION );
343
  wp_enqueue_style( self::STYLESHEET_SLUG . '-set-parent' );
344
 
345
- if ( isset( $_REQUEST['mla_admin_action'] ) && ( $_REQUEST['mla_admin_action'] == self::MLA_ADMIN_SINGLE_EDIT_DISPLAY ) ) {
346
- wp_enqueue_script( self::JAVASCRIPT_SINGLE_EDIT_SLUG, MLA_PLUGIN_URL . "js/mla-single-edit-scripts{$suffix}.js",
347
- array( 'wp-lists', 'suggest', 'jquery' ), self::CURRENT_MLA_VERSION, false );
348
- $script_variables = array(
349
- 'comma' => _x( ',', 'tag_delimiter', 'media-library-assistant' ),
350
- 'Ajax_Url' => admin_url( 'admin-ajax.php' )
351
- );
352
- wp_localize_script( self::JAVASCRIPT_SINGLE_EDIT_SLUG, self::JAVASCRIPT_SINGLE_EDIT_OBJECT, $script_variables );
353
- } else {
354
- wp_enqueue_script( self::JAVASCRIPT_INLINE_EDIT_SLUG, MLA_PLUGIN_URL . "js/mla-inline-edit-scripts{$suffix}.js",
355
- array( 'wp-lists', 'suggest', 'jquery' ), self::CURRENT_MLA_VERSION, false );
356
-
357
- wp_enqueue_script( self::JAVASCRIPT_INLINE_EDIT_SLUG . '-set-parent', MLA_PLUGIN_URL . "js/mla-set-parent-scripts{$suffix}.js",
358
- array( 'wp-lists', 'suggest', 'jquery', self::JAVASCRIPT_INLINE_EDIT_SLUG ), self::CURRENT_MLA_VERSION, false );
359
-
360
- MLAModal::mla_add_terms_search_scripts();
361
-
362
- $fields = array( 'post_title', 'post_name', 'post_excerpt', 'post_content', 'image_alt', 'post_parent', 'post_parent_title', 'menu_order', 'post_author' );
363
- $custom_fields = MLAOptions::mla_custom_field_support( 'quick_edit' );
364
- $custom_fields = array_merge( $custom_fields, MLAOptions::mla_custom_field_support( 'bulk_edit' ) );
365
- foreach ($custom_fields as $slug => $label ) {
366
- $fields[] = $slug;
367
- }
368
-
369
- $fields = apply_filters( 'mla_list_table_inline_fields', $fields );
370
-
371
- $script_variables = array(
372
- 'fields' => $fields,
373
- 'ajaxFailError' => __( 'An ajax.fail error has occurred. Please reload the page and try again.', 'media-library-assistant' ),
374
- 'ajaxDoneError' => __( 'An ajax.done error has occurred. Please reload the page and try again.', 'media-library-assistant' ),
375
- 'error' => __( 'Error while saving the changes.', 'media-library-assistant' ),
376
- 'ntdelTitle' => __( 'Remove From Bulk Edit', 'media-library-assistant' ),
377
- 'noTitle' => __( '(no title)', 'media-library-assistant' ),
378
- 'bulkTitle' => __( 'Bulk Edit items', 'media-library-assistant' ),
379
- 'bulkWaiting' => __( 'Waiting', 'media-library-assistant' ),
380
- 'bulkComplete' => __( 'Complete', 'media-library-assistant' ),
381
- 'bulkUnchanged' => __( 'Unchanged', 'media-library-assistant' ),
382
- 'bulkSuccess' => __( 'Succeeded', 'media-library-assistant' ),
383
- 'bulkFailure' => __( 'Failed', 'media-library-assistant' ),
384
- 'bulkCanceled' => __( 'CANCELED', 'media-library-assistant' ),
385
- 'bulkChunkSize' => MLAOptions::mla_get_option( MLAOptions::MLA_BULK_CHUNK_SIZE ),
386
- 'comma' => _x( ',', 'tag_delimiter', 'media-library-assistant' ),
387
- 'ajax_action' => self::JAVASCRIPT_INLINE_EDIT_SLUG,
388
- 'ajax_nonce' => wp_create_nonce( self::MLA_ADMIN_NONCE )
389
- );
390
 
391
- wp_localize_script( self::JAVASCRIPT_INLINE_EDIT_SLUG, self::JAVASCRIPT_INLINE_EDIT_OBJECT, $script_variables );
 
392
  }
 
 
393
  }
394
 
395
  /**
@@ -399,10 +445,6 @@ class MLA {
399
  * add settings page in the "Settings" section.
400
  * add settings link in the Plugins section entry for MLA.
401
  *
402
- * For WordPress versions before 3.5,
403
- * add submenu page(s) for attachment taxonomies,
404
- * add filter to clean up taxonomy submenu labels.
405
- *
406
  * @since 0.1
407
  *
408
  * @return void
@@ -432,14 +474,6 @@ class MLA {
432
  $taxonomies = get_object_taxonomies( 'attachment', 'objects' );
433
  if ( !empty( $taxonomies ) ) {
434
  foreach ( $taxonomies as $tax_name => $tax_object ) {
435
- /*
436
- * WordPress 3.5 adds native support for taxonomies
437
- */
438
- if ( ! MLATest::$wordpress_3point5_plus ) {
439
- $hook = add_submenu_page( 'upload.php', $tax_object->label, $tax_object->label, 'manage_categories', 'mla-edit-tax-' . $tax_name, 'MLA::mla_edit_tax_redirect' );
440
- add_action( 'load-' . $hook, 'MLA::mla_edit_tax_redirect' );
441
- } // ! MLATest::$wordpress_3point5_plus
442
-
443
  /*
444
  * The page_hook we need for taxonomy edits is slightly different
445
  */
@@ -547,35 +581,24 @@ class MLA {
547
  $file_suffix = $screen->id;
548
 
549
  /*
550
- * Override the screen suffix if we are going to display something other than the attachment table
551
  */
552
- if ( isset( $_REQUEST['mla_admin_action'] ) ) {
553
- switch ( $_REQUEST['mla_admin_action'] ) {
554
- case self::MLA_ADMIN_SINGLE_EDIT_DISPLAY:
555
- $file_suffix = self::MLA_ADMIN_SINGLE_EDIT_DISPLAY;
 
556
  break;
557
- } // switch
558
- } else { // isset( $_REQUEST['mla_admin_action'] )
559
- /*
560
- * Use a generic page for edit taxonomy screens
561
- */
562
- if ( 't_' == substr( self::$page_hooks[ $file_suffix ], 0, 2 ) ) {
563
- $taxonomy = substr( self::$page_hooks[ $file_suffix ], 2 );
564
- switch ( $taxonomy ) {
565
- case 'attachment_category':
566
- case 'attachment_tag':
567
- break;
568
- default:
569
- $tax_object = get_taxonomy( $taxonomy );
570
 
571
- if ( $tax_object->hierarchical ) {
572
- $file_suffix = 'edit-hierarchical-taxonomy';
573
- } else {
574
- $file_suffix = 'edit-flat-taxonomy';
575
- }
576
- } // $taxonomy switch
577
- } // is taxonomy
578
- }
579
 
580
  $template_array = MLAData::mla_load_template( 'help-for-' . $file_suffix . '.tpl' );
581
  if ( empty( $template_array ) ) {
@@ -642,10 +665,6 @@ class MLA {
642
  * @return boolean True to display "Screen Options", false to suppress them
643
  */
644
  public static function mla_screen_options_show_screen_filter( $show_screen, $this_screen ) {
645
- if ( isset( $_REQUEST['mla_admin_action'] ) && ( $_REQUEST['mla_admin_action'] == self::MLA_ADMIN_SINGLE_EDIT_DISPLAY ) ) {
646
- return false;
647
- }
648
-
649
  return $show_screen;
650
  }
651
 
@@ -668,43 +687,10 @@ class MLA {
668
  }
669
  }
670
 
671
- /**
672
- * Redirect to the Edit Tags/Categories page
673
- *
674
- * The custom taxonomy add/edit submenu entries go to "upload.php" by default.
675
- * This filter is the only way to redirect them to the correct WordPress page.
676
- * The filter is not required for WordPress 3.5 and later.
677
- *
678
- * @since 0.1
679
- *
680
- * @return void
681
- */
682
- public static function mla_edit_tax_redirect( ) {
683
- /*
684
- * WordPress 3.5 adds native support for taxonomies
685
- */
686
- if ( MLATest::$wordpress_3point5_plus ) {
687
- return;
688
- }
689
-
690
- $screen = get_current_screen();
691
-
692
- if ( isset( $_REQUEST['page'] ) && ( substr( $_REQUEST['page'], 0, 13 ) == 'mla-edit-tax-' ) ) {
693
- $taxonomy = substr( $_REQUEST['page'], 13 );
694
- wp_redirect( admin_url( 'edit-tags.php?taxonomy=' . $taxonomy . '&post_type=attachment' ), 302 );
695
- exit;
696
- }
697
- }
698
-
699
  /**
700
  * Cleanup menus for Edit Tags/Categories page
701
  *
702
- * For WordPress before 3.5, the submenu entries for custom taxonomies
703
- * under the "Media" menu are not set up correctly by WordPress, so this
704
- * function cleans them up, redirecting the request to the right WordPress
705
- * page for editing/adding taxonomy terms.
706
- * For WordPress 3.5 and later, the function fixes the submenu bolding when
707
- * going to the Edit Media screen.
708
  *
709
  * @since 0.1
710
  *
@@ -737,31 +723,6 @@ class MLA {
737
  $submenu_file = 'upload.php?page=' . self::ADMIN_PAGE_SLUG;
738
  }
739
 
740
- /*
741
- * WordPress 3.5 adds native support for taxonomies
742
- */
743
- if ( MLATest::$wordpress_3point5_plus ) {
744
- return $parent_file;
745
- }
746
-
747
- if ( isset( $_REQUEST['taxonomy'] ) ) {
748
- $taxonomies = get_object_taxonomies( 'attachment', 'objects' );
749
-
750
- foreach ( $taxonomies as $tax_name => $tax_object ) {
751
- if ( $_REQUEST['taxonomy'] == $tax_name ) {
752
- $mla_page = 'mla-edit-tax-' . $tax_name;
753
- $real_page = 'edit-tags.php?taxonomy=' . $tax_name . '&post_type=attachment';
754
-
755
- foreach ( $submenu['upload.php'] as $submenu_index => $submenu_entry ) {
756
- if ( $submenu_entry[ 2 ] == $mla_page ) {
757
- $submenu['upload.php'][ $submenu_index ][ 2 ] = $real_page;
758
- return 'upload.php';
759
- }
760
- }
761
- }
762
- }
763
- }
764
-
765
  return $parent_file;
766
  }
767
 
@@ -853,6 +814,215 @@ class MLA {
853
  return $new_value;
854
  }
855
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
856
  /**
857
  * Process bulk action for one or more attachments
858
  *
@@ -942,195 +1112,10 @@ class MLA {
942
  break;
943
  }
944
 
945
- /*
946
- * Copy the edit form contents to $new_data
947
- * Trim text values for testing purposes only
948
- */
949
- $new_data = array() ;
950
- if ( isset( $request['post_title'] ) ) {
951
- $test_value = self::_process_bulk_value( $post_id, $request['post_title'] );
952
- if ( ! empty( $test_value ) ) {
953
- $new_data['post_title'] = $test_value;
954
- } elseif ( is_null( $test_value ) ) {
955
- $new_data['post_title'] = '';
956
- }
957
- }
958
-
959
- if ( isset( $request['post_excerpt'] ) ) {
960
- $test_value = self::_process_bulk_value( $post_id, $request['post_excerpt'] );
961
- if ( ! empty( $test_value ) ) {
962
- $new_data['post_excerpt'] = $test_value;
963
- } elseif ( is_null( $test_value ) ) {
964
- $new_data['post_excerpt'] = '';
965
- }
966
- }
967
-
968
- if ( isset( $request['post_content'] ) ) {
969
- $test_value = self::_process_bulk_value( $post_id, $request['post_content'] );
970
- if ( ! empty( $test_value ) ) {
971
- $new_data['post_content'] = $test_value;
972
- } elseif ( is_null( $test_value ) ) {
973
- $new_data['post_content'] = '';
974
- }
975
- }
976
-
977
- /*
978
- * image_alt requires a separate key because some attachment types
979
- * should not get a value, e.g., text or PDF documents
980
- */
981
- if ( isset( $request['image_alt'] ) ) {
982
- $test_value = self::_process_bulk_value( $post_id, $request['image_alt'] );
983
- if ( ! empty( $test_value ) ) {
984
- $new_data['bulk_image_alt'] = $test_value;
985
- } elseif ( is_null( $test_value ) ) {
986
- $new_data['bulk_image_alt'] = '';
987
- }
988
- }
989
-
990
- if ( isset( $request['post_parent'] ) ) {
991
- if ( is_numeric( $request['post_parent'] ) ) {
992
- $new_data['post_parent'] = $request['post_parent'];
993
- }
994
- }
995
-
996
- if ( isset( $request['post_author'] ) ) {
997
- if ( -1 != $request['post_author'] ) {
998
- $new_data['post_author'] = $request['post_author'];
999
- }
1000
- }
1001
-
1002
- if ( isset( $request['comment_status'] ) ) {
1003
- if ( -1 != $request['comment_status'] ) {
1004
- $new_data['comment_status'] = $request['comment_status'];
1005
- }
1006
- }
1007
-
1008
- if ( isset( $request['ping_status'] ) ) {
1009
- if ( -1 != $request['ping_status'] ) {
1010
- $new_data['ping_status'] = $request['ping_status'];
1011
- }
1012
- }
1013
-
1014
- /*
1015
- * Custom field support
1016
- */
1017
- $custom_fields = array();
1018
- foreach ( $custom_field_map as $slug => $label ) {
1019
- if ( isset( $request[ $slug ] ) ) {
1020
- $test_value = self::_process_bulk_value( $post_id, $request[ $slug ] );
1021
- if ( ! empty( $test_value ) ) {
1022
- $custom_fields[ $label ] = $test_value;
1023
- } elseif ( is_null( $test_value ) ) {
1024
- $custom_fields[ $label ] = '';
1025
- }
1026
- }
1027
- } // foreach
1028
-
1029
- if ( ! empty( $custom_fields ) ) {
1030
- $new_data[ 'custom_updates' ] = $custom_fields;
1031
- }
1032
-
1033
- /*
1034
- * Taxonomy Support
1035
- */
1036
- $tax_input = array();
1037
- foreach ( $request['tax_input'] as $taxonomy => $terms ) {
1038
- if ( ! empty( $request['tax_action'] ) ) {
1039
- $tax_action = $request['tax_action'][ $taxonomy ];
1040
- } else {
1041
- $tax_action = 'replace';
1042
- }
1043
-
1044
- /*
1045
- * Ignore empty updates
1046
- */
1047
- if ( $hierarchical = is_array( $terms ) ) {
1048
- if ( false !== ( $index = array_search( 0, $terms ) ) ) {
1049
- unset( $terms[ $index ] );
1050
- }
1051
- } else {
1052
- /*
1053
- * Parse out individual terms
1054
- */
1055
- $comma = _x( ',', 'tag_delimiter', 'media-library-assistant' );
1056
- if ( ',' !== $comma ) {
1057
- $tags = str_replace( $comma, ',', $terms );
1058
- }
1059
-
1060
- $fragments = explode( ',', trim( $terms, " \n\t\r\0\x0B," ) );
1061
- $terms = array();
1062
- foreach( $fragments as $fragment ) {
1063
- $fragment = trim( wp_unslash( $fragment ) );
1064
- if ( ! empty( $fragment ) ) {
1065
- $terms[] = $fragment;
1066
- }
1067
- } // foreach fragment
1068
-
1069
- $terms = array_unique( $terms );
1070
- }
1071
-
1072
- if ( empty( $terms ) && 'replace' != $tax_action ) {
1073
- continue;
1074
- }
1075
-
1076
- $post_terms = get_object_term_cache( $post_id, $taxonomy );
1077
- if ( false === $post_terms ) {
1078
- $post_terms = wp_get_object_terms( $post_id, $taxonomy );
1079
- wp_cache_add( $post_id, $post_terms, $taxonomy . '_relationships' );
1080
- }
1081
-
1082
- $current_terms = array();
1083
- foreach( $post_terms as $new_term ) {
1084
- if ( $hierarchical ) {
1085
- $current_terms[ $new_term->term_id ] = $new_term->term_id;
1086
- } else {
1087
- $current_terms[ $new_term->name ] = $new_term->name;
1088
- }
1089
- }
1090
-
1091
- if ( 'add' == $tax_action ) {
1092
- /*
1093
- * Add new terms; remove existing terms
1094
- */
1095
- foreach ( $terms as $index => $new_term ) {
1096
- if ( isset( $current_terms[ $new_term ] ) ) {
1097
- unset( $terms[ $index ] );
1098
- }
1099
- }
1100
-
1101
- $do_update = ! empty( $terms );
1102
- } elseif ( 'remove' == $tax_action ) {
1103
- /*
1104
- * Remove only the existing terms
1105
- */
1106
- foreach ( $terms as $index => $new_term ) {
1107
- if ( ! isset( $current_terms[ $new_term ] ) ) {
1108
- unset( $terms[ $index ] );
1109
- }
1110
- }
1111
-
1112
- $do_update = ! empty( $terms );
1113
- } else {
1114
- /*
1115
- * Replace all terms; if the new terms match the term
1116
- * cache, we can skip the update
1117
- */
1118
- foreach ( $terms as $new_term ) {
1119
- if ( isset( $current_terms[ $new_term ] ) ) {
1120
- unset( $current_terms[ $new_term ] );
1121
- } else {
1122
- $current_terms[ $new_term ] = $new_term;
1123
- break; // not a match; stop checking
1124
- }
1125
- }
1126
-
1127
- $do_update = ! empty( $current_terms );
1128
- }
1129
-
1130
- if ( $do_update ) {
1131
- $tax_input[ $taxonomy ] = $terms;
1132
- }
1133
- } // foreach taxonomy
1134
 
1135
  $item_content = MLAData::mla_update_single_item( $post_id, $new_data, $tax_input, $request['tax_action'] );
1136
  break;
@@ -1358,27 +1343,6 @@ class MLA {
1358
  case self::MLA_ADMIN_SINGLE_DELETE:
1359
  $page_content = self::_delete_single_item( $_REQUEST['mla_item_ID'] );
1360
  break;
1361
- case self::MLA_ADMIN_SINGLE_EDIT_DISPLAY:
1362
- echo ' - ' . __( 'Edit single item', 'media-library-assistant' ) . '</h2>';
1363
- $page_content = self::_display_single_item( $_REQUEST['mla_item_ID'] );
1364
- break;
1365
- case self::MLA_ADMIN_SINGLE_EDIT_UPDATE:
1366
- if ( !empty( $_REQUEST['update'] ) ) {
1367
- $page_content = MLAData::mla_update_single_item( $_REQUEST['mla_item_ID'], $_REQUEST['attachments'][ $_REQUEST['mla_item_ID'] ], $_REQUEST['tax_input'] );
1368
- } elseif ( !empty( $_REQUEST['map-iptc-exif'] ) ) {
1369
- $item = get_post( $_REQUEST['mla_item_ID'] );
1370
- do_action( 'mla_begin_mapping', 'single_iptc_exif', $_REQUEST['mla_item_ID'] );
1371
- $updates = MLAOptions::mla_evaluate_iptc_exif_mapping( $item, 'iptc_exif_mapping' );
1372
- do_action( 'mla_end_mapping' );
1373
- $page_content = MLAData::mla_update_single_item( $_REQUEST['mla_item_ID'], $updates );
1374
- } else {
1375
- $page_content = array(
1376
- /* translators: 1: post ID */
1377
- 'message' => sprintf( __( 'Item %1$d cancelled.', 'media-library-assistant' ), $_REQUEST['mla_item_ID'] ),
1378
- 'body' => ''
1379
- );
1380
- }
1381
- break;
1382
  case self::MLA_ADMIN_SINGLE_RESTORE:
1383
  $page_content = self::_restore_single_item( $_REQUEST['mla_item_ID'] );
1384
  break;
@@ -1711,7 +1675,11 @@ class MLA {
1711
  $new_item = (object) MLAData::mla_get_attachment_by_id( $post_id );
1712
 
1713
  // Create an instance of our package class and echo the new HTML
1714
- $MLAListTable = new MLA_List_Table();
 
 
 
 
1715
  $MLAListTable->single_row( $new_item );
1716
  die(); // this is required to return a proper result
1717
  }
@@ -1862,7 +1830,11 @@ class MLA {
1862
  $new_item = (object) MLAData::mla_get_attachment_by_id( $post_id );
1863
 
1864
  // Create an instance of our package class and echo the new HTML
1865
- $MLAListTable = new MLA_List_Table();
 
 
 
 
1866
  $MLAListTable->single_row( $new_item );
1867
  die(); // this is required to return a proper result
1868
  }
@@ -2263,290 +2235,6 @@ class MLA {
2263
  );
2264
  }
2265
 
2266
- /**
2267
- * Display a single item sub page; prepare the form to
2268
- * change the meta data for a single attachment.
2269
- *
2270
- * This function is not used in WordPress 3.5 and later.
2271
- *
2272
- * @since 0.1
2273
- *
2274
- * @param integer The WordPress Post ID of the attachment item
2275
- *
2276
- * @return array message and/or HTML content
2277
- */
2278
- private static function _display_single_item( $post_id ) {
2279
- global $post;
2280
-
2281
- /*
2282
- * This function sets the global $post
2283
- */
2284
- $post_data = MLAData::mla_get_attachment_by_id( $post_id );
2285
- if ( !isset( $post_data ) ) {
2286
- return array(
2287
- 'message' => __( 'ERROR', 'media-library-assistant' ) . ': ' . __( 'Could not retrieve Attachment.', 'media-library-assistant' ),
2288
- 'body' => ''
2289
- );
2290
- }
2291
-
2292
- if ( ! current_user_can( 'edit_post', $post_id ) ) {
2293
- return array(
2294
- 'message' => __( 'You are not allowed to edit this Attachment.', 'media-library-assistant' ),
2295
- 'body' => ''
2296
- );
2297
- }
2298
-
2299
- if ( 0 === strpos( strtolower( $post_data['post_mime_type'] ), 'image' ) ) {
2300
- $page_template_array = MLAData::mla_load_template( 'admin-display-single-image.tpl' );
2301
- $width = isset( $post_data['mla_wp_attachment_metadata']['width'] ) ? $post_data['mla_wp_attachment_metadata']['width'] : '';
2302
- $height = isset( $post_data['mla_wp_attachment_metadata']['height'] ) ? $post_data['mla_wp_attachment_metadata']['height'] : '';
2303
- $image_meta = var_export( $post_data['mla_wp_attachment_metadata'], true );
2304
-
2305
- if ( !isset( $post_data['mla_wp_attachment_image_alt'] ) ) {
2306
- $post_data['mla_wp_attachment_image_alt'] = '';
2307
- }
2308
- } else {
2309
- $page_template_array = MLAData::mla_load_template( 'admin-display-single-document.tpl' );
2310
- $width = '';
2311
- $height = '';
2312
- $image_meta = '';
2313
- }
2314
-
2315
- if ( array( $page_template_array ) ) {
2316
- $page_template = $page_template_array['page'];
2317
- $authors_template = $page_template_array['authors'];
2318
- $postbox_template = $page_template_array['postbox'];
2319
- } else {
2320
- /* translators: 1: ERROR tag 2: page_template_array */
2321
- error_log( sprintf( _x( '%1$s: MLA::_display_single_item \$page_template_array = "%2$s"', 'error_log', 'media-library-assistant' ), __( 'ERROR', 'media-library-assistant' ), var_export( $page_template_array, true ) ), 0 );
2322
- $page_template = $page_template_array;
2323
- $authors_template = '';
2324
- $postbox_template = '';
2325
- }
2326
-
2327
- if ( empty($post_data['mla_references']['parent_title'] ) ) {
2328
- $parent_info = $post_data['mla_references']['parent_errors'];
2329
- } else {
2330
- $parent_info = sprintf( '(%1$s) %2$s %3$s', $post_data['mla_references']['parent_type'], $post_data['mla_references']['parent_title'], $post_data['mla_references']['parent_errors'] );
2331
- }
2332
-
2333
- if ( $authors = self::mla_authors_dropdown( $post_data['post_author'], 'attachments[' . $post_data['ID'] . '][post_author]' ) ) {
2334
- $args = array (
2335
- 'ID' => $post_data['ID'],
2336
- 'Author' => __( 'Author', 'media-library-assistant' ),
2337
- 'authors' => $authors
2338
- );
2339
- $authors = MLAData::mla_parse_template( $authors_template, $args );
2340
- } else {
2341
- $authors = '';
2342
- }
2343
-
2344
- if ( MLAOptions::$process_featured_in ) {
2345
- $features = '';
2346
-
2347
- foreach ( $post_data['mla_references']['features'] as $feature_id => $feature ) {
2348
- if ( $feature_id == $post_data['post_parent'] ) {
2349
- $parent = __( 'PARENT', 'media-library-assistant' ) . ' ';
2350
- } else {
2351
- $parent = '';
2352
- }
2353
-
2354
- $features .= sprintf( '%1$s (%2$s %3$s), %4$s', /*$1%s*/ $parent, /*$2%s*/ $feature->post_type, /*$3%s*/ $feature_id, /*$4%s*/ $feature->post_title ) . "\n";
2355
- } // foreach $feature
2356
- } else {
2357
- $features = __( 'Disabled', 'media-library-assistant' );
2358
- }
2359
-
2360
- if ( MLAOptions::$process_inserted_in ) {
2361
- $inserts = '';
2362
-
2363
- foreach ( $post_data['mla_references']['inserts'] as $file => $insert_array ) {
2364
- $inserts .= $file . "\n";
2365
-
2366
- foreach ( $insert_array as $insert ) {
2367
- if ( $insert->ID == $post_data['post_parent'] ) {
2368
- $parent = ' ' . __( 'PARENT', 'media-library-assistant' ) . ' ';
2369
- } else {
2370
- $parent = ' ';
2371
- }
2372
-
2373
- $inserts .= sprintf( '%1$s (%2$s %3$s), %4$s', /*$1%s*/ $parent, /*$2%s*/ $insert->post_type, /*$3%s*/ $insert->ID, /*$4%s*/ $insert->post_title ) . "\n";
2374
- } // foreach $insert
2375
- } // foreach $file
2376
- } else {
2377
- $inserts = __( 'Disabled', 'media-library-assistant' );
2378
- }
2379
-
2380
- if ( MLAOptions::$process_gallery_in ) {
2381
- $galleries = '';
2382
-
2383
- foreach ( $post_data['mla_references']['galleries'] as $gallery_id => $gallery ) {
2384
- if ( $gallery_id == $post_data['post_parent'] ) {
2385
- $parent = __( 'PARENT', 'media-library-assistant' ) . ' ';
2386
- } else {
2387
- $parent = '';
2388
- }
2389
-
2390
- $galleries .= sprintf( '%1$s (%2$s %3$s), %4$s', /*$1%s*/ $parent, /*$2%s*/ $gallery['post_type'], /*$3%s*/ $gallery_id, /*$4%s*/ $gallery['post_title'] ) . "\n";
2391
- } // foreach $gallery
2392
- } else {
2393
- $galleries = __( 'Disabled', 'media-library-assistant' );
2394
- }
2395
-
2396
- if ( MLAOptions::$process_mla_gallery_in ) {
2397
- $mla_galleries = '';
2398
-
2399
- foreach ( $post_data['mla_references']['mla_galleries'] as $gallery_id => $gallery ) {
2400
- if ( $gallery_id == $post_data['post_parent'] ) {
2401
- $parent = __( 'PARENT', 'media-library-assistant' ) . ' ';
2402
- } else {
2403
- $parent = '';
2404
- }
2405
-
2406
- $mla_galleries .= sprintf( '%1$s (%2$s %3$s), %4$s', /*$1%s*/ $parent, /*$2%s*/ $gallery['post_type'], /*$3%s*/ $gallery_id, /*$4%s*/ $gallery['post_title'] ) . "\n";
2407
- } // foreach $gallery
2408
- } else {
2409
- $mla_galleries = __( 'Disabled', 'media-library-assistant' );
2410
- }
2411
-
2412
- /*
2413
- * WordPress doesn't look in hidden fields to set the month filter dropdown or sorting parameters
2414
- */
2415
- if ( isset( $_REQUEST['m'] ) ) {
2416
- $url_args = '&m=' . $_REQUEST['m'];
2417
- } else {
2418
- $url_args = '';
2419
- }
2420
-
2421
- if ( isset( $_REQUEST['post_mime_type'] ) ) {
2422
- $url_args .= '&post_mime_type=' . $_REQUEST['post_mime_type'];
2423
- }
2424
-
2425
- if ( isset( $_REQUEST['order'] ) ) {
2426
- $url_args .= '&order=' . $_REQUEST['order'];
2427
- }
2428
-
2429
- if ( isset( $_REQUEST['orderby'] ) ) {
2430
- $url_args .= '&orderby=' . $_REQUEST['orderby'];
2431
- }
2432
-
2433
- /*
2434
- * Add the current view arguments
2435
- */
2436
- if ( isset( $_REQUEST['detached'] ) ) {
2437
- $view_args = '<input type="hidden" name="detached" value="' . $_REQUEST['detached'] . "\" />\n";
2438
- } elseif ( isset( $_REQUEST['status'] ) ) {
2439
- $view_args = '<input type="hidden" name="status" value="' . $_REQUEST['status'] . "\" />\n";
2440
- } else {
2441
- $view_args = '';
2442
- }
2443
-
2444
- if ( isset( $_REQUEST['paged'] ) ) {
2445
- $view_args .= sprintf( '<input type="hidden" name="paged" value="%1$s" />', $_REQUEST['paged'] ) . "\n";
2446
- }
2447
-
2448
- $side_info_column = '';
2449
- $taxonomies = get_object_taxonomies( 'attachment', 'objects' );
2450
-
2451
- foreach ( $taxonomies as $tax_name => $tax_object ) {
2452
- ob_start();
2453
-
2454
- if ( $tax_object->hierarchical && $tax_object->show_ui ) {
2455
- $box = array(
2456
- 'id' => $tax_name . 'div',
2457
- 'title' => esc_html( $tax_object->labels->name ),
2458
- 'callback' => 'categories_meta_box',
2459
- 'args' => array(
2460
- 'taxonomy' => $tax_name
2461
- ),
2462
- 'inside_html' => ''
2463
- );
2464
- post_categories_meta_box( $post, $box );
2465
- } elseif ( $tax_object->show_ui ) {
2466
- $box = array(
2467
- 'id' => 'tagsdiv-' . $tax_name,
2468
- 'title' => esc_html( $tax_object->labels->name ),
2469
- 'callback' => 'post_tags_meta_box',
2470
- 'args' => array(
2471
- 'taxonomy' => $tax_name
2472
- ),
2473
- 'inside_html' => ''
2474
- );
2475
- post_tags_meta_box( $post, $box );
2476
- }
2477
-
2478
- $box['inside_html'] = ob_get_contents();
2479
- ob_end_clean();
2480
- $side_info_column .= MLAData::mla_parse_template( $postbox_template, $box );
2481
- }
2482
-
2483
- $page_values = array(
2484
- 'form_url' => admin_url( 'upload.php' ) . '?page=' . self::ADMIN_PAGE_SLUG . $url_args,
2485
- 'ID' => $post_data['ID'],
2486
- 'post_mime_type' => $post_data['post_mime_type'],
2487
- 'menu_order' => $post_data['menu_order'],
2488
- 'mla_admin_action' => self::MLA_ADMIN_SINGLE_EDIT_UPDATE,
2489
- 'view_args' => $view_args,
2490
- 'wpnonce' => wp_nonce_field( self::MLA_ADMIN_NONCE, '_wpnonce', true, false ),
2491
- 'Cancel' => __( 'Cancel', 'media-library-assistant' ),
2492
- 'Update' => __( 'Update', 'media-library-assistant' ),
2493
- 'Map IPTC/EXIF metadata' => __( 'Map IPTC/EXIF metadata', 'media-library-assistant' ),
2494
- 'attachment_icon' => wp_get_attachment_image( $post_id, array( 160, 120 ), true ),
2495
- 'File name' => __( 'File name', 'media-library-assistant' ),
2496
- 'file_name' => esc_html( $post_data['mla_references']['file'] ),
2497
- 'File type' => __( 'File type', 'media-library-assistant' ),
2498
- 'Upload date' => __( 'Upload date', 'media-library-assistant' ),
2499
- 'post_date' => $post_data['post_date'],
2500
- 'Last modified' => __( 'Last modified', 'media-library-assistant' ),
2501
- 'post_modified' => $post_data['post_modified'],
2502
- 'Dimensions' => __( 'Dimensions', 'media-library-assistant' ),
2503
- 'width' => $width,
2504
- 'height' => $height,
2505
- 'Title' => __( 'Title', 'media-library-assistant' ),
2506
- 'required' => __( 'required', 'media-library-assistant' ),
2507
- 'post_title_attr' => esc_attr( $post_data['post_title'] ),
2508
- 'Name/Slug' => __( 'Name/Slug', 'media-library-assistant' ),
2509
- 'post_name_attr' => esc_attr( $post_data['post_name'] ),
2510
- 'Must be unique' => __( 'Must be unique; will be validated.', 'media-library-assistant' ),
2511
- 'ALT Text' => __( 'ALT Text', 'media-library-assistant' ),
2512
- 'image_alt_attr' => '',
2513
- 'ALT Text Help' => __( 'Alternate text for the image, e.g. &#8220;The Mona Lisa&#8221;', 'media-library-assistant' ),
2514
- 'Caption' => __( 'Caption', 'media-library-assistant' ),
2515
- 'post_excerpt_attr' => esc_attr( $post_data['post_excerpt'] ),
2516
- 'Description' => __( 'Description', 'media-library-assistant' ),
2517
- 'post_content' => esc_textarea( $post_data['post_content'] ),
2518
- 'Parent Info' => __( 'Parent Info', 'media-library-assistant' ),
2519
- 'post_parent' => $post_data['post_parent'],
2520
- 'parent_info' => esc_attr( $parent_info ),
2521
- 'Parent Info Help' => __( 'ID, type and title of parent, if any.', 'media-library-assistant' ),
2522
- 'Menu Order' => __( 'Menu Order', 'media-library-assistant' ),
2523
- 'authors' => $authors,
2524
- 'File URL' => __( 'File URL', 'media-library-assistant' ),
2525
- 'guid_attr' => esc_attr( $post_data['guid'] ),
2526
- 'File URL Help' => __( 'Location of the uploaded file.', 'media-library-assistant' ),
2527
- 'Image Metadata' => __( 'Image Metadata', 'media-library-assistant' ),
2528
- 'image_meta' => esc_textarea( $image_meta ),
2529
- 'Featured in' => __( 'Featured in', 'media-library-assistant' ),
2530
- 'features' => esc_textarea( $features ),
2531
- 'Inserted in' => __( 'Inserted in', 'media-library-assistant' ),
2532
- 'inserts' => esc_textarea( $inserts ),
2533
- 'Gallery in' => __( 'Gallery in', 'media-library-assistant' ),
2534
- 'galleries' => esc_textarea( $galleries ),
2535
- 'MLA Gallery in' => __( 'MLA Gallery in', 'media-library-assistant' ),
2536
- 'mla_galleries' => esc_textarea( $mla_galleries ),
2537
- 'side_info_column' => $side_info_column
2538
- );
2539
-
2540
- if ( !empty( $post_data['mla_wp_attachment_image_alt'] ) ) {
2541
- $page_values['image_alt_attr'] = esc_attr( $post_data['mla_wp_attachment_image_alt'] );
2542
- }
2543
-
2544
- return array(
2545
- 'message' => '',
2546
- 'body' => MLAData::mla_parse_template( $page_template, $page_values )
2547
- );
2548
- }
2549
-
2550
  /**
2551
  * Restore a single item from the Trash
2552
  *
29
  *
30
  * @var string
31
  */
32
+ const CURRENT_MLA_VERSION = '2.11';
33
 
34
  /**
35
  * Current date for Development Version, empty for production versions
49
  */
50
  const STYLESHEET_SLUG = 'mla-style';
51
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52
  /**
53
  * Slug for localizing and enqueueing JavaScript - MLA List Table
54
  *
95
  const MLA_ADMIN_SINGLE_DELETE = 'single_item_delete';
96
 
97
  /**
98
+ * mla_admin_action value to display a single item for editing
99
+ *
100
+ * Used by class-mla-view-list-table.php and class-mla-upload-list-table.php
101
  *
102
  * @since 0.1
103
  *
108
  /**
109
  * mla_admin_action value for updating a single item
110
  *
111
+ * Used by class-mla-view-list-table.php and class-mla-upload-list-table.php
112
+ *
113
  * @since 0.1
114
  *
115
  * @var string
179
  */
180
  private static $page_hooks = array();
181
 
182
+ /**
183
+ * Accumulates error messages from name conflict tests
184
+ *
185
+ * @since 1.14
186
+ */
187
+ private static $mla_language_support_error_messages = '';
188
+
189
+ /**
190
+ * Displays name conflict error messages at the top of the Dashboard
191
+ *
192
+ * @since 2.11
193
+ */
194
+ public static function mla_name_conflict_reporting_action () {
195
+ $messages = self::$mla_language_support_error_messages;
196
+
197
+ echo '<div class="error"><p><strong>The Media Library Assistant cannot activate multi-language support.</strong> Another plugin or theme has declared conflicting class, function or constant names:</p>'."\r\n";
198
+ echo "<ul>{$messages}</ul>\r\n";
199
+ echo '<p>You must resolve these conflicts before multi-language support can be activated.</p></div>'."\r\n";
200
+ }
201
+
202
  /**
203
  * Initialization function, similar to __construct()
204
  *
211
  * @return void
212
  */
213
  public static function initialize( ) {
214
+ global $sitepress, $polylang;
215
+
216
+ /*
217
+ * Check for WPML/Polylang presence before loading language support class,
218
+ * then immediately initialize it since we're already in the "init" action.
219
+ */
220
+ if ( is_object( $sitepress ) ) {
221
+ if ( class_exists( 'MLA_WPML' ) ) {
222
+ self::$mla_language_support_error_messages .= "<li>class MLA_WPML</li>";
223
+ }
224
+
225
+ if ( class_exists( 'MLA_WPML_List_Table' ) ) {
226
+ self::$mla_language_support_error_messages .= "<li>class MLA_WPML_List_Table</li>";
227
+ }
228
+
229
+ if ( class_exists( 'MLA_WPML_Table' ) ) {
230
+ self::$mla_language_support_error_messages .= "<li>class MLA_WPML_Table</li>";
231
+ }
232
+
233
+ if ( empty( self::$mla_language_support_error_messages ) ) {
234
+ require_once( MLA_PLUGIN_PATH . 'includes/class-mla-wpml-support.php' );
235
+ MLA_WPML::initialize();
236
+ }
237
+ } elseif ( is_object( $polylang ) ) {
238
+ if ( class_exists( 'MLAPolylangSupport' ) ) {
239
+ self::$mla_language_support_error_messages .= '<li>class MLAPolylangSupport in plugin "MLA Polylang Support"</li>';
240
+ }
241
+
242
+ if ( class_exists( 'MLA_Polylang' ) ) {
243
+ self::$mla_language_support_error_messages .= "<li>class MLA_Polylang</li>";
244
+ }
245
+
246
+ if ( empty( self::$mla_language_support_error_messages ) ) {
247
+ require_once( MLA_PLUGIN_PATH . 'includes/class-mla-polylang-support.php' );
248
+ MLA_Polylang::initialize();
249
+ }
250
+ }
251
+
252
+ if ( ! empty( self::$mla_language_support_error_messages ) ) {
253
+ add_action( 'admin_notices', 'MLA::mla_name_conflict_reporting_action' );
254
+ }
255
+
256
  add_action( 'admin_init', 'MLA::mla_admin_init_action' );
257
  add_action( 'admin_enqueue_scripts', 'MLA::mla_admin_enqueue_scripts_action' );
258
  add_action( 'admin_menu', 'MLA::mla_admin_menu_action' );
322
  check_admin_referer( self::MLA_ADMIN_NONCE );
323
  }
324
 
325
+ if ( apply_filters( 'mla_list_table_admin_action', true, $_REQUEST['mla_admin_action'], ( isset( $_REQUEST['mla_item_ID'] ) ? $_REQUEST['mla_item_ID'] : 0 ) ) ) {
326
+ switch ( $_REQUEST['mla_admin_action'] ) {
327
+ case self::MLA_ADMIN_SINGLE_CUSTOM_FIELD_MAP:
328
+ do_action( 'mla_begin_mapping', 'single_custom', $_REQUEST['mla_item_ID'] );
329
+ $updates = MLAOptions::mla_evaluate_custom_field_mapping( $_REQUEST['mla_item_ID'], 'single_attachment_mapping' );
330
+ do_action( 'mla_end_mapping' );
331
 
332
+ if ( !empty( $updates ) ) {
333
+ $item_content = MLAData::mla_update_single_item( $_REQUEST['mla_item_ID'], $updates );
334
+ }
335
 
336
+ $view_args = isset( $_REQUEST['mla_source'] ) ? array( 'mla_source' => $_REQUEST['mla_source']) : array();
337
+ wp_redirect( add_query_arg( $view_args, admin_url( 'post.php' ) . '?post=' . $_REQUEST['mla_item_ID'] . '&action=edit&message=101' ), 302 );
338
+ exit;
339
+ case self::MLA_ADMIN_SINGLE_MAP:
340
+ $item = get_post( $_REQUEST['mla_item_ID'] );
341
+ do_action( 'mla_begin_mapping', 'single_iptc_exif', $_REQUEST['mla_item_ID'] );
342
+ $updates = MLAOptions::mla_evaluate_iptc_exif_mapping( $item, 'iptc_exif_mapping' );
343
+ do_action( 'mla_end_mapping' );
344
+ $page_content = MLAData::mla_update_single_item( $_REQUEST['mla_item_ID'], $updates );
345
+
346
+ $view_args = isset( $_REQUEST['mla_source'] ) ? array( 'mla_source' => $_REQUEST['mla_source']) : array();
347
+ wp_redirect( add_query_arg( $view_args, admin_url( 'post.php' ) . '?post=' . $_REQUEST['mla_item_ID'] . '&action=edit&message=102' ), 302 );
348
+ exit;
349
+ default:
350
+ do_action( 'mla_list_table_custom_admin_action', $_REQUEST['mla_admin_action'], ( isset( $_REQUEST['mla_item_ID'] ) ? $_REQUEST['mla_item_ID'] : 0 ) );
351
+ // ignore the rest
352
+ } // switch ($_REQUEST['mla_admin_action'])
353
+ } // apply_filters mla_list_table_admin_action
354
  } // (!empty($_REQUEST['mla_admin_action'])
355
 
356
  if ( ( defined('WP_ADMIN') && WP_ADMIN ) && ( defined('DOING_AJAX') && DOING_AJAX ) ) {
393
  wp_register_style( self::STYLESHEET_SLUG . '-set-parent', MLA_PLUGIN_URL . 'css/mla-style-set-parent.css', false, self::CURRENT_MLA_VERSION );
394
  wp_enqueue_style( self::STYLESHEET_SLUG . '-set-parent' );
395
 
396
+ wp_enqueue_script( self::JAVASCRIPT_INLINE_EDIT_SLUG, MLA_PLUGIN_URL . "js/mla-inline-edit-scripts{$suffix}.js",
397
+ array( 'wp-lists', 'suggest', 'jquery' ), self::CURRENT_MLA_VERSION, false );
398
+
399
+ wp_enqueue_script( self::JAVASCRIPT_INLINE_EDIT_SLUG . '-set-parent', MLA_PLUGIN_URL . "js/mla-set-parent-scripts{$suffix}.js",
400
+ array( 'wp-lists', 'suggest', 'jquery', self::JAVASCRIPT_INLINE_EDIT_SLUG ), self::CURRENT_MLA_VERSION, false );
401
+
402
+ MLAModal::mla_add_terms_search_scripts();
403
+
404
+ $fields = array( 'post_title', 'post_name', 'post_excerpt', 'post_content', 'image_alt', 'post_parent', 'post_parent_title', 'menu_order', 'post_author' );
405
+ $custom_fields = MLAOptions::mla_custom_field_support( 'quick_edit' );
406
+ $custom_fields = array_merge( $custom_fields, MLAOptions::mla_custom_field_support( 'bulk_edit' ) );
407
+ foreach ($custom_fields as $slug => $label ) {
408
+ $fields[] = $slug;
409
+ }
410
+
411
+ $fields = apply_filters( 'mla_list_table_inline_fields', $fields );
412
+
413
+ $script_variables = array(
414
+ 'fields' => $fields,
415
+ 'ajaxFailError' => __( 'An ajax.fail error has occurred. Please reload the page and try again.', 'media-library-assistant' ),
416
+ 'ajaxDoneError' => __( 'An ajax.done error has occurred. Please reload the page and try again.', 'media-library-assistant' ),
417
+ 'error' => __( 'Error while saving the changes.', 'media-library-assistant' ),
418
+ 'ntdelTitle' => __( 'Remove From Bulk Edit', 'media-library-assistant' ),
419
+ 'noTitle' => __( '(no title)', 'media-library-assistant' ),
420
+ 'bulkTitle' => __( 'Bulk Edit items', 'media-library-assistant' ),
421
+ 'bulkWaiting' => __( 'Waiting', 'media-library-assistant' ),
422
+ 'bulkComplete' => __( 'Complete', 'media-library-assistant' ),
423
+ 'bulkUnchanged' => __( 'Unchanged', 'media-library-assistant' ),
424
+ 'bulkSuccess' => __( 'Succeeded', 'media-library-assistant' ),
425
+ 'bulkFailure' => __( 'Failed', 'media-library-assistant' ),
426
+ 'bulkCanceled' => __( 'CANCELED', 'media-library-assistant' ),
427
+ 'bulkChunkSize' => MLAOptions::mla_get_option( MLAOptions::MLA_BULK_CHUNK_SIZE ),
428
+ 'comma' => _x( ',', 'tag_delimiter', 'media-library-assistant' ),
429
+ 'useSpinnerClass' => false,
430
+ 'ajax_action' => self::JAVASCRIPT_INLINE_EDIT_SLUG,
431
+ 'ajax_nonce' => wp_create_nonce( self::MLA_ADMIN_NONCE )
432
+ );
 
 
 
 
 
 
 
 
433
 
434
+ if ( version_compare( get_bloginfo( 'version' ), '4.2', '>=' ) ) {
435
+ $script_variables['useSpinnerClass'] = true;
436
  }
437
+
438
+ wp_localize_script( self::JAVASCRIPT_INLINE_EDIT_SLUG, self::JAVASCRIPT_INLINE_EDIT_OBJECT, $script_variables );
439
  }
440
 
441
  /**
445
  * add settings page in the "Settings" section.
446
  * add settings link in the Plugins section entry for MLA.
447
  *
 
 
 
 
448
  * @since 0.1
449
  *
450
  * @return void
474
  $taxonomies = get_object_taxonomies( 'attachment', 'objects' );
475
  if ( !empty( $taxonomies ) ) {
476
  foreach ( $taxonomies as $tax_name => $tax_object ) {
 
 
 
 
 
 
 
 
477
  /*
478
  * The page_hook we need for taxonomy edits is slightly different
479
  */
581
  $file_suffix = $screen->id;
582
 
583
  /*
584
+ * Use a generic page for edit taxonomy screens
585
  */
586
+ if ( 't_' == substr( self::$page_hooks[ $file_suffix ], 0, 2 ) ) {
587
+ $taxonomy = substr( self::$page_hooks[ $file_suffix ], 2 );
588
+ switch ( $taxonomy ) {
589
+ case 'attachment_category':
590
+ case 'attachment_tag':
591
  break;
592
+ default:
593
+ $tax_object = get_taxonomy( $taxonomy );
 
 
 
 
 
 
 
 
 
 
 
594
 
595
+ if ( $tax_object->hierarchical ) {
596
+ $file_suffix = 'edit-hierarchical-taxonomy';
597
+ } else {
598
+ $file_suffix = 'edit-flat-taxonomy';
599
+ }
600
+ } // $taxonomy switch
601
+ } // is taxonomy
 
602
 
603
  $template_array = MLAData::mla_load_template( 'help-for-' . $file_suffix . '.tpl' );
604
  if ( empty( $template_array ) ) {
665
  * @return boolean True to display "Screen Options", false to suppress them
666
  */
667
  public static function mla_screen_options_show_screen_filter( $show_screen, $this_screen ) {
 
 
 
 
668
  return $show_screen;
669
  }
670
 
687
  }
688
  }
689
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
690
  /**
691
  * Cleanup menus for Edit Tags/Categories page
692
  *
693
+ * Fixes the submenu bolding when going to the Edit Media screen.
 
 
 
 
 
694
  *
695
  * @since 0.1
696
  *
723
  $submenu_file = 'upload.php?page=' . self::ADMIN_PAGE_SLUG;
724
  }
725
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
726
  return $parent_file;
727
  }
728
 
814
  return $new_value;
815
  }
816
 
817
+ /**
818
+ * Prepare Bulk Edit field-level updates
819
+ *
820
+ * @since 2.11
821
+ *
822
+ * @param integer $post_id Current post ID
823
+ * @param array $request Form elements, e.g., from $_REQUEST
824
+ * @param array $custom_field_map Form id to field name mapping
825
+ *
826
+ * @return array Non-empty form elements
827
+ */
828
+ public static function mla_prepare_bulk_edits( $post_id, $request, $custom_field_map ) {
829
+ /*
830
+ * Copy the edit form contents to $new_data
831
+ * Trim text values for testing purposes only
832
+ */
833
+ $new_data = array() ;
834
+ if ( isset( $request['post_title'] ) ) {
835
+ $test_value = self::_process_bulk_value( $post_id, $request['post_title'] );
836
+ if ( ! empty( $test_value ) ) {
837
+ $new_data['post_title'] = $test_value;
838
+ } elseif ( is_null( $test_value ) ) {
839
+ $new_data['post_title'] = '';
840
+ }
841
+ }
842
+
843
+ if ( isset( $request['post_excerpt'] ) ) {
844
+ $test_value = self::_process_bulk_value( $post_id, $request['post_excerpt'] );
845
+ if ( ! empty( $test_value ) ) {
846
+ $new_data['post_excerpt'] = $test_value;
847
+ } elseif ( is_null( $test_value ) ) {
848
+ $new_data['post_excerpt'] = '';
849
+ }
850
+ }
851
+
852
+ if ( isset( $request['post_content'] ) ) {
853
+ $test_value = self::_process_bulk_value( $post_id, $request['post_content'] );
854
+ if ( ! empty( $test_value ) ) {
855
+ $new_data['post_content'] = $test_value;
856
+ } elseif ( is_null( $test_value ) ) {
857
+ $new_data['post_content'] = '';
858
+ }
859
+ }
860
+
861
+ /*
862
+ * image_alt requires a separate key because some attachment types
863
+ * should not get a value, e.g., text or PDF documents
864
+ */
865
+ if ( isset( $request['image_alt'] ) ) {
866
+ $test_value = self::_process_bulk_value( $post_id, $request['image_alt'] );
867
+ if ( ! empty( $test_value ) ) {
868
+ $new_data['bulk_image_alt'] = $test_value;
869
+ } elseif ( is_null( $test_value ) ) {
870
+ $new_data['bulk_image_alt'] = '';
871
+ }
872
+ }
873
+
874
+ if ( isset( $request['post_parent'] ) ) {
875
+ if ( is_numeric( $request['post_parent'] ) ) {
876
+ $new_data['post_parent'] = $request['post_parent'];
877
+ }
878
+ }
879
+
880
+ if ( isset( $request['post_author'] ) ) {
881
+ if ( -1 != $request['post_author'] ) {
882
+ $new_data['post_author'] = $request['post_author'];
883
+ }
884
+ }
885
+
886
+ if ( isset( $request['comment_status'] ) ) {
887
+ if ( -1 != $request['comment_status'] ) {
888
+ $new_data['comment_status'] = $request['comment_status'];
889
+ }
890
+ }
891
+
892
+ if ( isset( $request['ping_status'] ) ) {
893
+ if ( -1 != $request['ping_status'] ) {
894
+ $new_data['ping_status'] = $request['ping_status'];
895
+ }
896
+ }
897
+
898
+ /*
899
+ * Custom field support
900
+ */
901
+ $custom_fields = array();
902
+ foreach ( $custom_field_map as $slug => $label ) {
903
+ if ( isset( $request[ $slug ] ) ) {
904
+ $test_value = self::_process_bulk_value( $post_id, $request[ $slug ] );
905
+ if ( ! empty( $test_value ) ) {
906
+ $custom_fields[ $label ] = $test_value;
907
+ } elseif ( is_null( $test_value ) ) {
908
+ $custom_fields[ $label ] = '';
909
+ }
910
+ }
911
+ } // foreach
912
+
913
+ if ( ! empty( $custom_fields ) ) {
914
+ $new_data[ 'custom_updates' ] = $custom_fields;
915
+ }
916
+
917
+ /*
918
+ * Taxonomy Support
919
+ */
920
+ $tax_input = array();
921
+ foreach ( $request['tax_input'] as $taxonomy => $terms ) {
922
+ if ( ! empty( $request['tax_action'] ) ) {
923
+ $tax_action = $request['tax_action'][ $taxonomy ];
924
+ } else {
925
+ $tax_action = 'replace';
926
+ }
927
+
928
+ /*
929
+ * Ignore empty updates
930
+ */
931
+ if ( $hierarchical = is_array( $terms ) ) {
932
+ if ( false !== ( $index = array_search( 0, $terms ) ) ) {
933
+ unset( $terms[ $index ] );
934
+ }
935
+ } else {
936
+ /*
937
+ * Parse out individual terms
938
+ */
939
+ $comma = _x( ',', 'tag_delimiter', 'media-library-assistant' );
940
+ if ( ',' !== $comma ) {
941
+ $tags = str_replace( $comma, ',', $terms );
942
+ }
943
+
944
+ $fragments = explode( ',', trim( $terms, " \n\t\r\0\x0B," ) );
945
+ $terms = array();
946
+ foreach( $fragments as $fragment ) {
947
+ // WordPress encodes special characters, e.g., "&" as HTML entities in term names
948
+ $fragment = _wp_specialchars( trim( wp_unslash( $fragment ) ) );
949
+ if ( ! empty( $fragment ) ) {
950
+ $terms[] = $fragment;
951
+ }
952
+ } // foreach fragment
953
+
954
+ $terms = array_unique( $terms );
955
+ }
956
+
957
+ if ( empty( $terms ) && 'replace' != $tax_action ) {
958
+ continue;
959
+ }
960
+
961
+ $post_terms = get_object_term_cache( $post_id, $taxonomy );
962
+ if ( false === $post_terms ) {
963
+ $post_terms = wp_get_object_terms( $post_id, $taxonomy );
964
+ wp_cache_add( $post_id, $post_terms, $taxonomy . '_relationships' );
965
+ }
966
+
967
+ $current_terms = array();
968
+ foreach( $post_terms as $new_term ) {
969
+ if ( $hierarchical ) {
970
+ $current_terms[ $new_term->term_id ] = $new_term->term_id;
971
+ } else {
972
+ $current_terms[ $new_term->name ] = $new_term->name;
973
+ }
974
+ }
975
+
976
+ if ( 'add' == $tax_action ) {
977
+ /*
978
+ * Add new terms; remove existing terms
979
+ */
980
+ foreach ( $terms as $index => $new_term ) {
981
+ if ( isset( $current_terms[ $new_term ] ) ) {
982
+ unset( $terms[ $index ] );
983
+ }
984
+ }
985
+
986
+ $do_update = ! empty( $terms );
987
+ } elseif ( 'remove' == $tax_action ) {
988
+ /*
989
+ * Remove only the existing terms
990
+ */
991
+ foreach ( $terms as $index => $new_term ) {
992
+ if ( ! isset( $current_terms[ $new_term ] ) ) {
993
+ unset( $terms[ $index ] );
994
+ }
995
+ }
996
+
997
+ $do_update = ! empty( $terms );
998
+ } else {
999
+ /*
1000
+ * Replace all terms; if the new terms match the term
1001
+ * cache, we can skip the update
1002
+ */
1003
+ foreach ( $terms as $new_term ) {
1004
+ if ( isset( $current_terms[ $new_term ] ) ) {
1005
+ unset( $current_terms[ $new_term ] );
1006
+ } else {
1007
+ $current_terms[ $new_term ] = $new_term;
1008
+ break; // not a match; stop checking
1009
+ }
1010
+ }
1011
+
1012
+ $do_update = ! empty( $current_terms );
1013
+ }
1014
+
1015
+ if ( $do_update ) {
1016
+ $tax_input[ $taxonomy ] = $terms;
1017
+ }
1018
+ } // foreach taxonomy
1019
+
1020
+ $new_data[ 'tax_input' ] = $tax_input;
1021
+ $new_data[ 'tax_action' ] = $tax_action;
1022
+
1023
+ return $new_data;
1024
+ }
1025
+
1026
  /**
1027
  * Process bulk action for one or more attachments
1028
  *
1112
  break;
1113
  }
1114
 
1115
+ $new_data = self::mla_prepare_bulk_edits( $post_id, $request, $custom_field_map );
1116
+ $tax_input = $new_data['tax_input'];
1117
+ unset( $new_data['tax_input'] );
1118
+ unset( $new_data['tax_action'] );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1119
 
1120
  $item_content = MLAData::mla_update_single_item( $post_id, $new_data, $tax_input, $request['tax_action'] );
1121
  break;
1343
  case self::MLA_ADMIN_SINGLE_DELETE:
1344
  $page_content = self::_delete_single_item( $_REQUEST['mla_item_ID'] );
1345
  break;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1346
  case self::MLA_ADMIN_SINGLE_RESTORE:
1347
  $page_content = self::_restore_single_item( $_REQUEST['mla_item_ID'] );
1348
  break;
1675
  $new_item = (object) MLAData::mla_get_attachment_by_id( $post_id );
1676
 
1677
  // Create an instance of our package class and echo the new HTML
1678
+ $MLAListTable = apply_filters( 'mla_list_table_new_instance', NULL );
1679
+ if ( is_null( $MLAListTable ) ) {
1680
+ $MLAListTable = new MLA_List_Table();
1681
+ }
1682
+
1683
  $MLAListTable->single_row( $new_item );
1684
  die(); // this is required to return a proper result
1685
  }
1830
  $new_item = (object) MLAData::mla_get_attachment_by_id( $post_id );
1831
 
1832
  // Create an instance of our package class and echo the new HTML
1833
+ $MLAListTable = apply_filters( 'mla_list_table_new_instance', NULL );
1834
+ if ( is_null( $MLAListTable ) ) {
1835
+ $MLAListTable = new MLA_List_Table();
1836
+ }
1837
+
1838
  $MLAListTable->single_row( $new_item );
1839
  die(); // this is required to return a proper result
1840
  }
2235
  );
2236
  }
2237
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2238
  /**
2239
  * Restore a single item from the Trash
2240
  *
includes/class-mla-media-modal.php CHANGED
@@ -110,7 +110,7 @@ class MLAModal {
110
  * documented as: "Filter the attachment fields to edit."
111
  */
112
 
113
- if ( MLATest::$wordpress_3point5_plus && ( ( 'checked' == MLAOptions::mla_get_option( MLAOptions::MLA_MEDIA_MODAL_TOOLBAR ) ) || ( 'checked' == MLAOptions::mla_get_option( MLAOptions::MLA_MEDIA_GRID_TOOLBAR ) ) ) ) {
114
  add_filter( 'get_media_item_args', 'MLAModal::mla_get_media_item_args_filter', 10, 1 );
115
  add_filter( 'attachment_fields_to_edit', 'MLAModal::mla_attachment_fields_to_edit_filter', 0x7FFFFFFF, 2 );
116
 
@@ -123,7 +123,7 @@ class MLAModal {
123
  add_action( 'wp_ajax_' . self::JAVASCRIPT_QUERY_ATTACHMENTS_ACTION, 'MLAModal::mla_query_attachments_action' );
124
  add_action( 'wp_ajax_' . self::JAVASCRIPT_FILL_COMPAT_ACTION, 'MLAModal::mla_fill_compat_fields_action' );
125
  add_action( 'wp_ajax_' . self::JAVASCRIPT_UPDATE_COMPAT_ACTION, 'MLAModal::mla_update_compat_fields_action' );
126
- } // $wordpress_3point5_plus
127
  }
128
 
129
  /**
@@ -257,6 +257,8 @@ class MLAModal {
257
  $form_fields[ 'mla-' . $key ] = array( 'tr' => $row );
258
  } // is supported
259
  } // foreach
 
 
260
  } // in_modal
261
 
262
  self::$media_item_args = array( 'errors' => null, 'in_modal' => false );
@@ -303,7 +305,7 @@ class MLAModal {
303
  sprintf( __( '%1$s %2$d', 'media-library-assistant' ), $wp_locale->get_month( $month ), $year );
304
  }
305
 
306
- return $month_array;
307
  }
308
 
309
  /**
@@ -338,7 +340,7 @@ class MLAModal {
338
 
339
  } // foreach
340
 
341
- return array( 'class' => $class_array, 'value' => $value_array, 'text' => $text_array );
342
  }
343
 
344
  /**
@@ -413,7 +415,8 @@ class MLAModal {
413
  self::$mla_media_modal_settings['comma'] = _x( ',', 'tag_delimiter', 'media-library-assistant' );
414
  self::$mla_media_modal_settings['ajaxNonce'] = wp_create_nonce( MLA::MLA_ADMIN_NONCE );
415
  self::$mla_media_modal_settings['mimeTypes'] = MLAMime::mla_pluck_table_views();
416
- self::$mla_media_modal_settings['mimeTypes']['detached'] = MLAOptions::$mla_option_definitions[ MLAOptions::MLA_POST_MIME_TYPES ]['std']['unattached']['plural'];
 
417
 
418
  if ( EMPTY_TRASH_DAYS && MEDIA_TRASH ) {
419
  self::$mla_media_modal_settings['mimeTypes']['trash'] = MLAOptions::$mla_option_definitions[ MLAOptions::MLA_POST_MIME_TYPES ]['std']['trash']['plural'];
@@ -483,7 +486,7 @@ class MLAModal {
483
  //'termsSearch' => ''
484
  );
485
 
486
- $initial_values = apply_filters( 'mla_media_modal_initial_filters', $initial_values );
487
 
488
  /*
489
  * Except for filterMime/post_mime_type, these will be passed
@@ -499,11 +502,11 @@ class MLAModal {
499
  self::$mla_media_modal_settings['query']['initial']['searchClicks'] = 0; // mla_search_clicks, to force transmission
500
 
501
  $settings = array_merge( $settings, array( 'mla_settings' => self::$mla_media_modal_settings ) );
502
- return $settings;
503
  } // mla_mla_media_view_settings_filter
504
 
505
  /**
506
- * Adds strings values to be passed to the Media Manager in /wp-includes/js/media-views.js.
507
  * Declared public because it is a filter.
508
  *
509
  * @since 1.20
@@ -521,7 +524,7 @@ class MLAModal {
521
  );
522
 
523
  $strings = array_merge( $strings, array( 'mla_strings' => $mla_strings ) );
524
- return $strings;
525
  } // mla_mla_media_view_strings_filter
526
 
527
  /**
@@ -584,10 +587,16 @@ class MLAModal {
584
  } elseif ( 'checked' != MLAOptions::mla_get_option( MLAOptions::MLA_MEDIA_MODAL_TOOLBAR ) ) {
585
  return;
586
  }
 
 
587
  }
588
 
589
  // Include mla javascript templates
590
- require_once MLA_PLUGIN_PATH . 'includes/mla-media-modal-js-template.php';
 
 
 
 
591
  } // mla_print_media_templates_action
592
 
593
  /**
@@ -752,7 +761,10 @@ class MLAModal {
752
  wp_send_json_error();
753
  }
754
 
755
- $results = array();
 
 
 
756
 
757
  /*
758
  * Match all supported taxonomies against the requested list
@@ -903,7 +915,7 @@ class MLAModal {
903
  $results[ $key ] = $row;
904
  }
905
 
906
- wp_send_json_success( $results );
907
  } // mla_fill_compat_fields_action
908
 
909
  /**
@@ -917,14 +929,24 @@ class MLAModal {
917
  */
918
  public static function mla_update_compat_fields_action() {
919
  global $post;
920
- if ( empty( $_REQUEST['id'] ) || ! $id = absint( $_REQUEST['id'] ) ) {
 
921
  wp_send_json_error();
922
  }
 
 
 
 
923
 
 
 
 
924
  $results = array();
925
 
926
  foreach ( get_taxonomies( array ( 'show_ui' => true ), 'objects' ) as $key => $value ) {
927
  if ( isset( $_REQUEST[ $key ] ) && MLAOptions::mla_taxonomy_support( $key ) ) {
 
 
928
  if ( ! $use_checklist = $value->hierarchical ) {
929
  $use_checklist = MLAOptions::mla_taxonomy_support( $key, 'flat-checklist' );
930
  }
@@ -935,14 +957,14 @@ class MLAModal {
935
  $terms = array_map( 'trim', preg_split( '/,+/', $_REQUEST[ $key ] ) );
936
  }
937
 
938
- wp_set_object_terms( $id, $terms, $key, false );
939
- delete_transient( MLA_OPTION_PREFIX . 't_term_counts_' . $key );
940
-
 
 
 
 
941
  if ( $use_checklist ) {
942
- if ( empty( $post ) ) {
943
- $post = get_post( $id ); // for wp_popular_terms_checklist
944
- }
945
-
946
  ob_start();
947
  $popular_ids = wp_popular_terms_checklist( $key );
948
  $results[$key]["mla-{$key}-checklist-pop"] = ob_get_clean();
@@ -950,19 +972,19 @@ class MLAModal {
950
  ob_start();
951
 
952
  if ( $value->hierarchical ) {
953
- wp_terms_checklist( $id, array( 'taxonomy' => $key, 'popular_cats' => $popular_ids ) );
954
  } else {
955
  $checklist_walker = new MLA_Checklist_Walker;
956
- wp_terms_checklist( $id, array( 'taxonomy' => $key, 'popular_cats' => $popular_ids, 'walker' => $checklist_walker ) );
957
  }
958
 
959
  $results[$key]["mla-{$key}-checklist"] = ob_get_clean();
960
  } else {
961
- $terms = get_object_term_cache( $id, $key );
962
 
963
  if ( false === $terms ) {
964
- $terms = wp_get_object_terms( $id, $key );
965
- wp_cache_add( $id, $terms, $key . '_relationships' );
966
  }
967
 
968
  if ( is_wp_error( $terms ) || empty( $terms ) ) {
@@ -978,15 +1000,15 @@ class MLAModal {
978
 
979
  sort( $list );
980
  $hidden_list = join( ',', $list );
981
-
982
  $results[$key]["object-terms"] = $object_terms;
983
- $results[$key]["mla-attachments-{$id}-{$key}"] = "\t\t<input name='attachments[{$id}][{$key}]' class='the-tags' id='mla-attachments-{$id}-{$key}' type='hidden' value='{$hidden_list}'>\n";
984
- $results[$key]["mla-tags-{$id}-{$key}"] = "\t\t<input name='mla_tags[{$id}][{$key}]' class='server-tags' id='mla-tags-{$id}-{$key}' type='hidden' value='{$hidden_list}'>\n";
985
  }
986
  } // set and supported
987
  } // foreach taxonomy
988
 
989
- wp_send_json_success( $results );
990
  } // mla_update_compat_fields_action
991
 
992
  /**
@@ -1006,18 +1028,23 @@ class MLAModal {
1006
  /*
1007
  * Pick out and clean up the query terms we can process
1008
  */
1009
- $query = isset( $_REQUEST['query'] ) ? (array) $_REQUEST['query'] : array();
1010
- $query = array_intersect_key( $query, array_flip( array(
1011
  'order', 'orderby', 'posts_per_page', 'paged', 'post_mime_type',
1012
  'post_parent', 'post__in', 'post__not_in',
1013
  'mla_filter_month', 'mla_filter_term', 'mla_terms_search',
1014
  'mla_search_value', 's', 'mla_search_fields', 'mla_search_connector'
1015
  ) ) );
1016
 
 
 
1017
  if ( isset( $query['post_mime_type'] ) ) {
1018
  if ( 'detached' == $query['post_mime_type'] ) {
1019
  $query['detached'] = '1';
1020
  unset( $query['post_mime_type'] );
 
 
 
1021
  } elseif ( 'trash' == $query['post_mime_type'] ) {
1022
  $query['status'] = 'trash';
1023
  unset( $query['post_mime_type'] );
@@ -1097,6 +1124,8 @@ class MLAModal {
1097
  }
1098
  }
1099
 
 
 
1100
  $query = MLAData::mla_query_media_modal_items( $query, $offset, $count );
1101
  $posts = array_map( 'wp_prepare_attachment_for_js', $query->posts );
1102
  $posts = array_filter( $posts );
@@ -1125,12 +1154,16 @@ class MLAModal {
1125
  array( 'jquery' ), MLA::CURRENT_MLA_VERSION, false );
1126
 
1127
  $script_variables = array(
 
 
1128
  );
1129
 
1130
  if ( version_compare( get_bloginfo( 'version' ), '3.8', '>=' ) ) {
1131
  $script_variables['useDashicons'] = true;
1132
- } else {
1133
- $script_variables['useDashicons'] = false;
 
 
1134
  }
1135
 
1136
  wp_localize_script( MLA::JAVASCRIPT_INLINE_EDIT_SLUG . '-terms-search', self::JAVASCRIPT_TERMS_SEARCH_OBJECT, $script_variables );
110
  * documented as: "Filter the attachment fields to edit."
111
  */
112
 
113
+ if ( ( ( 'checked' == MLAOptions::mla_get_option( MLAOptions::MLA_MEDIA_MODAL_TOOLBAR ) ) || ( 'checked' == MLAOptions::mla_get_option( MLAOptions::MLA_MEDIA_GRID_TOOLBAR ) ) ) ) {
114
  add_filter( 'get_media_item_args', 'MLAModal::mla_get_media_item_args_filter', 10, 1 );
115
  add_filter( 'attachment_fields_to_edit', 'MLAModal::mla_attachment_fields_to_edit_filter', 0x7FFFFFFF, 2 );
116
 
123
  add_action( 'wp_ajax_' . self::JAVASCRIPT_QUERY_ATTACHMENTS_ACTION, 'MLAModal::mla_query_attachments_action' );
124
  add_action( 'wp_ajax_' . self::JAVASCRIPT_FILL_COMPAT_ACTION, 'MLAModal::mla_fill_compat_fields_action' );
125
  add_action( 'wp_ajax_' . self::JAVASCRIPT_UPDATE_COMPAT_ACTION, 'MLAModal::mla_update_compat_fields_action' );
126
+ } // Media Modal support enabled
127
  }
128
 
129
  /**
257
  $form_fields[ 'mla-' . $key ] = array( 'tr' => $row );
258
  } // is supported
259
  } // foreach
260
+
261
+ $form_fields = apply_filters( 'mla_media_modal_form_fields', $form_fields, $post );
262
  } // in_modal
263
 
264
  self::$media_item_args = array( 'errors' => null, 'in_modal' => false );
305
  sprintf( __( '%1$s %2$d', 'media-library-assistant' ), $wp_locale->get_month( $month ), $year );
306
  }
307
 
308
+ return apply_filters( 'mla_media_modal_months_dropdown', $month_array, $post_type );
309
  }
310
 
311
  /**
340
 
341
  } // foreach
342
 
343
+ return apply_filters( 'mla_media_modal_terms_options', array( 'class' => $class_array, 'value' => $value_array, 'text' => $text_array ) );
344
  }
345
 
346
  /**
415
  self::$mla_media_modal_settings['comma'] = _x( ',', 'tag_delimiter', 'media-library-assistant' );
416
  self::$mla_media_modal_settings['ajaxNonce'] = wp_create_nonce( MLA::MLA_ADMIN_NONCE );
417
  self::$mla_media_modal_settings['mimeTypes'] = MLAMime::mla_pluck_table_views();
418
+ self::$mla_media_modal_settings['mimeTypes']['detached'] = MLAOptions::$mla_option_definitions[ MLAOptions::MLA_POST_MIME_TYPES ]['std']['detached']['plural'];
419
+ self::$mla_media_modal_settings['mimeTypes']['attached'] = MLAOptions::$mla_option_definitions[ MLAOptions::MLA_POST_MIME_TYPES ]['std']['attached']['plural'];
420
 
421
  if ( EMPTY_TRASH_DAYS && MEDIA_TRASH ) {
422
  self::$mla_media_modal_settings['mimeTypes']['trash'] = MLAOptions::$mla_option_definitions[ MLAOptions::MLA_POST_MIME_TYPES ]['std']['trash']['plural'];
486
  //'termsSearch' => ''
487
  );
488
 
489
+ $initial_values = apply_filters( 'mla_media_modal_initial_filters', $initial_values, $post );
490
 
491
  /*
492
  * Except for filterMime/post_mime_type, these will be passed
502
  self::$mla_media_modal_settings['query']['initial']['searchClicks'] = 0; // mla_search_clicks, to force transmission
503
 
504
  $settings = array_merge( $settings, array( 'mla_settings' => self::$mla_media_modal_settings ) );
505
+ return apply_filters( 'mla_media_modal_settings', $settings, $post );
506
  } // mla_mla_media_view_settings_filter
507
 
508
  /**
509
+ * Adds string values to be passed to the Media Manager in /wp-includes/js/media-views.js.
510
  * Declared public because it is a filter.
511
  *
512
  * @since 1.20
524
  );
525
 
526
  $strings = array_merge( $strings, array( 'mla_strings' => $mla_strings ) );
527
+ return apply_filters( 'mla_media_modal_strings', $strings, $post );
528
  } // mla_mla_media_view_strings_filter
529
 
530
  /**
587
  } elseif ( 'checked' != MLAOptions::mla_get_option( MLAOptions::MLA_MEDIA_MODAL_TOOLBAR ) ) {
588
  return;
589
  }
590
+ } else {
591
+ $screen = NULL;
592
  }
593
 
594
  // Include mla javascript templates
595
+ $template_path = apply_filters( 'mla_media_modal_template_path', MLA_PLUGIN_PATH . 'includes/mla-media-modal-js-template.php', $screen);
596
+
597
+ if ( ! empty( $template_path ) ) {
598
+ require_once $template_path;
599
+ }
600
  } // mla_print_media_templates_action
601
 
602
  /**
761
  wp_send_json_error();
762
  }
763
 
764
+ $results = apply_filters( 'mla_media_modal_begin_fill_compat_fields', array(), $requested, $post );
765
+ if ( ! empty( $results ) ) {
766
+ wp_send_json_success( $results );
767
+ }
768
 
769
  /*
770
  * Match all supported taxonomies against the requested list
915
  $results[ $key ] = $row;
916
  }
917
 
918
+ wp_send_json_success( apply_filters( 'mla_media_modal_end_fill_compat_fields', $results, $_REQUEST['query'], $requested, $post ) );
919
  } // mla_fill_compat_fields_action
920
 
921
  /**
929
  */
930
  public static function mla_update_compat_fields_action() {
931
  global $post;
932
+
933
+ if ( empty( $_REQUEST['id'] ) || ! $post_id = absint( $_REQUEST['id'] ) ) {
934
  wp_send_json_error();
935
  }
936
+
937
+ if ( empty( $post ) ) {
938
+ $post = get_post( $post_id ); // for filters and wp_popular_terms_checklist
939
+ }
940
 
941
+ do_action( 'mla_media_modal_begin_update_compat_fields', $post );
942
+
943
+ $taxonomies = array();
944
  $results = array();
945
 
946
  foreach ( get_taxonomies( array ( 'show_ui' => true ), 'objects' ) as $key => $value ) {
947
  if ( isset( $_REQUEST[ $key ] ) && MLAOptions::mla_taxonomy_support( $key ) ) {
948
+ $taxonomies[ $key ] = $value;
949
+
950
  if ( ! $use_checklist = $value->hierarchical ) {
951
  $use_checklist = MLAOptions::mla_taxonomy_support( $key, 'flat-checklist' );
952
  }
957
  $terms = array_map( 'trim', preg_split( '/,+/', $_REQUEST[ $key ] ) );
958
  }
959
 
960
+ $terms = apply_filters( 'mla_media_modal_update_compat_fields_terms', $terms, $key, $value, $post_id );
961
+
962
+ if ( is_array( $terms ) ) {
963
+ wp_set_object_terms( $post_id, $terms, $key, false );
964
+ delete_transient( MLA_OPTION_PREFIX . 't_term_counts_' . $key );
965
+ }
966
+
967
  if ( $use_checklist ) {
 
 
 
 
968
  ob_start();
969
  $popular_ids = wp_popular_terms_checklist( $key );
970
  $results[$key]["mla-{$key}-checklist-pop"] = ob_get_clean();
972
  ob_start();
973
 
974
  if ( $value->hierarchical ) {
975
+ wp_terms_checklist( $post_id, array( 'taxonomy' => $key, 'popular_cats' => $popular_ids ) );
976
  } else {
977
  $checklist_walker = new MLA_Checklist_Walker;
978
+ wp_terms_checklist( $post_id, array( 'taxonomy' => $key, 'popular_cats' => $popular_ids, 'walker' => $checklist_walker ) );
979
  }
980
 
981
  $results[$key]["mla-{$key}-checklist"] = ob_get_clean();
982
  } else {
983
+ $terms = get_object_term_cache( $post_id, $key );
984
 
985
  if ( false === $terms ) {
986
+ $terms = wp_get_object_terms( $post_id, $key );
987
+ wp_cache_add( $post_id, $terms, $key . '_relationships' );
988
  }
989
 
990
  if ( is_wp_error( $terms ) || empty( $terms ) ) {
1000
 
1001
  sort( $list );
1002
  $hidden_list = join( ',', $list );
1003
+
1004
  $results[$key]["object-terms"] = $object_terms;
1005
+ $results[$key]["mla-attachments-{$post_id}-{$key}"] = "\t\t<input name='attachments[{$post_id}][{$key}]' class='the-tags' id='mla-attachments-{$post_id}-{$key}' type='hidden' value='{$hidden_list}'>\n";
1006
+ $results[$key]["mla-tags-{$post_id}-{$key}"] = "\t\t<input name='mla_tags[{$post_id}][{$key}]' class='server-tags' id='mla-tags-{$post_id}-{$key}' type='hidden' value='{$hidden_list}'>\n";
1007
  }
1008
  } // set and supported
1009
  } // foreach taxonomy
1010
 
1011
+ wp_send_json_success( apply_filters( 'mla_media_modal_end_update_compat_fields', $results, $taxonomies, $post ) );
1012
  } // mla_update_compat_fields_action
1013
 
1014
  /**
1028
  /*
1029
  * Pick out and clean up the query terms we can process
1030
  */
1031
+ $raw_query = isset( $_REQUEST['query'] ) ? (array) $_REQUEST['query'] : array();
1032
+ $query = array_intersect_key( $raw_query, array_flip( array(
1033
  'order', 'orderby', 'posts_per_page', 'paged', 'post_mime_type',
1034
  'post_parent', 'post__in', 'post__not_in',
1035
  'mla_filter_month', 'mla_filter_term', 'mla_terms_search',
1036
  'mla_search_value', 's', 'mla_search_fields', 'mla_search_connector'
1037
  ) ) );
1038
 
1039
+ $query = apply_filters( 'mla_media_modal_query_initial_terms', $query, $raw_query );
1040
+
1041
  if ( isset( $query['post_mime_type'] ) ) {
1042
  if ( 'detached' == $query['post_mime_type'] ) {
1043
  $query['detached'] = '1';
1044
  unset( $query['post_mime_type'] );
1045
+ } elseif ( 'attached' == $query['post_mime_type'] ) {
1046
+ $query['detached'] = '0';
1047
+ unset( $query['post_mime_type'] );
1048
  } elseif ( 'trash' == $query['post_mime_type'] ) {
1049
  $query['status'] = 'trash';
1050
  unset( $query['post_mime_type'] );
1124
  }
1125
  }
1126
 
1127
+ $query = apply_filters( 'mla_media_modal_query_filtered_terms', $query, $raw_query );
1128
+
1129
  $query = MLAData::mla_query_media_modal_items( $query, $offset, $count );
1130
  $posts = array_map( 'wp_prepare_attachment_for_js', $query->posts );
1131
  $posts = array_filter( $posts );
1154
  array( 'jquery' ), MLA::CURRENT_MLA_VERSION, false );
1155
 
1156
  $script_variables = array(
1157
+ 'useDashicons' => false,
1158
+ 'useSpinnerClass' => false,
1159
  );
1160
 
1161
  if ( version_compare( get_bloginfo( 'version' ), '3.8', '>=' ) ) {
1162
  $script_variables['useDashicons'] = true;
1163
+ }
1164
+
1165
+ if ( version_compare( get_bloginfo( 'version' ), '4.2', '>=' ) ) {
1166
+ $script_variables['useSpinnerClass'] = true;
1167
  }
1168
 
1169
  wp_localize_script( MLA::JAVASCRIPT_INLINE_EDIT_SLUG . '-terms-search', self::JAVASCRIPT_TERMS_SEARCH_OBJECT, $script_variables );
includes/class-mla-mime-types.php CHANGED
@@ -41,7 +41,7 @@ class MLAMime {
41
  add_filter( 'icon_dir', 'MLAMime::mla_icon_dir_filter', 0x7FFFFFFF, 1 );
42
  add_filter( 'icon_dir_uri', 'MLAMime::mla_icon_dir_uri_filter', 0x7FFFFFFF, 1 );
43
  add_filter( 'icon_dirs', 'MLAMime::mla_icon_dirs_filter', 0x7FFFFFFF, 1 );
44
- // add_filter( 'wp_mime_type_icon', 'MLAMime::mla_wp_mime_type_icon_filter', 0x7FFFFFFF, 3 );
45
  }
46
 
47
  /**
@@ -456,7 +456,7 @@ class MLAMime {
456
  * @param string MIME type represented by the icon
457
  * @param integer Attachment ID or zero (0) if MIME type passed in
458
  *
459
- * @return array Updated (path => URI) array
460
  */
461
  public static function mla_wp_mime_type_icon_filter( $icon, $mime, $post_id ) {
462
  return $icon;
@@ -679,7 +679,7 @@ class MLAMime {
679
  */
680
  $results = array();
681
  foreach ( $mla_types as $value ) {
682
- if ( in_array( $value->slug, array( 'all', 'trash', 'unattached' ) ) ) {
683
  continue;
684
  }
685
 
@@ -874,15 +874,21 @@ class MLAMime {
874
  $result['prefix'] = trim( strtolower( $matches[1] ) );
875
  $tail = $matches[2];
876
 
877
- $match_count = preg_match( '/([^,=]+)((,|=)(.+))$/', $tail, $matches );
878
  if ( 1 == $match_count ) {
879
  $result['name'] = $matches[1];
880
 
881
  if ( ',' == $matches[3] ) {
882
  $result['option'] = trim( strtolower( $matches[4] ));
883
  } else {
884
- $result['option'] = 'match';
885
- $result['value'] = $matches[4];
 
 
 
 
 
 
886
  }
887
  } else {
888
  $result['option'] = 'any';
@@ -1709,27 +1715,15 @@ class MLAMime {
1709
 
1710
  /*
1711
  * Find the WordPress-standard (unfiltered) extensions
1712
- * WordPress 3.4.x and earlier do not implement wp_get_mime_types
1713
  */
1714
  global $wp_filter;
1715
- if ( function_exists('wp_get_mime_types') ) {
1716
- if ( isset( $wp_filter['mime_types'] ) ) {
1717
- $save_filters = $wp_filter['mime_types'];
1718
- unset( $wp_filter['mime_types'] );
1719
- $core_types = wp_get_mime_types();
1720
- $wp_filter['mime_types'] = $save_filters;
1721
- } else {
1722
- $core_types = wp_get_mime_types();
1723
- }
1724
  } else {
1725
- if ( isset( $wp_filter['upload_mimes'] ) ) {
1726
- $save_filters = $wp_filter['upload_mimes'];
1727
- unset( $wp_filter['upload_mimes'] );
1728
- $core_types = get_allowed_mime_types();
1729
- $wp_filter['upload_mimes'] = $save_filters;
1730
- } else {
1731
- $core_types = get_allowed_mime_types();
1732
- }
1733
  }
1734
 
1735
  /*
@@ -1810,7 +1804,7 @@ class MLAMime {
1810
  );
1811
 
1812
  if ( 'checked' == MLAOptions::mla_get_option( MLAOptions::MLA_ENABLE_MLA_ICONS ) ) {
1813
- self::$mla_upload_mime_templates[ $key ]['icon_type'] = self::$mla_upload_mime_templates[ $array[0] ]['mla_icon_type'];
1814
  }
1815
  }
1816
  }
@@ -1833,16 +1827,16 @@ class MLAMime {
1833
  $mla_type = '';
1834
  $description = '';
1835
 
1836
- if ( NULL == $icon_type = wp_ext2type( $key ) ) {
1837
- $icon_type = 'default';
1838
- }
 
1839
 
1840
  $wp_icon_type = $icon_type;
1841
  $mla_icon_type = $icon_type;
1842
- $core_icon_type = self::mla_get_core_icon_type( $key );
1843
  }
1844
 
1845
-
1846
  self::$mla_upload_mime_templates[ $key ] = array(
1847
  'post_ID' => $post_ID,
1848
  'mime_type' => $value,
@@ -1859,7 +1853,7 @@ class MLAMime {
1859
  );
1860
 
1861
  if ( 'checked' == MLAOptions::mla_get_option( MLAOptions::MLA_ENABLE_MLA_ICONS ) ) {
1862
- self::$mla_upload_mime_templates[ $array[0] ]['icon_type'] = self::$mla_upload_mime_templates[ $array[0] ]['mla_icon_type'];
1863
  }
1864
  }
1865
 
41
  add_filter( 'icon_dir', 'MLAMime::mla_icon_dir_filter', 0x7FFFFFFF, 1 );
42
  add_filter( 'icon_dir_uri', 'MLAMime::mla_icon_dir_uri_filter', 0x7FFFFFFF, 1 );
43
  add_filter( 'icon_dirs', 'MLAMime::mla_icon_dirs_filter', 0x7FFFFFFF, 1 );
44
+ //add_filter( 'wp_mime_type_icon', 'MLAMime::mla_wp_mime_type_icon_filter', 0x7FFFFFFF, 3 );
45
  }
46
 
47
  /**
456
  * @param string MIME type represented by the icon
457
  * @param integer Attachment ID or zero (0) if MIME type passed in
458
  *
459
+ * @return array Updated URI to the MIME type icon
460
  */
461
  public static function mla_wp_mime_type_icon_filter( $icon, $mime, $post_id ) {
462
  return $icon;
679
  */
680
  $results = array();
681
  foreach ( $mla_types as $value ) {
682
+ if ( in_array( $value->slug, array( 'all', 'trash', 'detached' ) ) ) {
683
  continue;
684
  }
685
 
874
  $result['prefix'] = trim( strtolower( $matches[1] ) );
875
  $tail = $matches[2];
876
 
877
+ $match_count = preg_match( '/([^,=]+)((,|=)(.*))$/', $tail, $matches );
878
  if ( 1 == $match_count ) {
879
  $result['name'] = $matches[1];
880
 
881
  if ( ',' == $matches[3] ) {
882
  $result['option'] = trim( strtolower( $matches[4] ));
883
  } else {
884
+ if ( empty( $matches[4] ) ) {
885
+ $result['option'] = 'null';
886
+ } elseif ( '*' == $matches[4] ) {
887
+ $result['option'] = 'any';
888
+ } else {
889
+ $result['option'] = 'match';
890
+ $result['value'] = $matches[4];
891
+ }
892
  }
893
  } else {
894
  $result['option'] = 'any';
1715
 
1716
  /*
1717
  * Find the WordPress-standard (unfiltered) extensions
 
1718
  */
1719
  global $wp_filter;
1720
+ if ( isset( $wp_filter['mime_types'] ) ) {
1721
+ $save_filters = $wp_filter['mime_types'];
1722
+ unset( $wp_filter['mime_types'] );
1723
+ $core_types = wp_get_mime_types();
1724
+ $wp_filter['mime_types'] = $save_filters;
 
 
 
 
1725
  } else {
1726
+ $core_types = wp_get_mime_types();
 
 
 
 
 
 
 
1727
  }
1728
 
1729
  /*
1804
  );
1805
 
1806
  if ( 'checked' == MLAOptions::mla_get_option( MLAOptions::MLA_ENABLE_MLA_ICONS ) ) {
1807
+ self::$mla_upload_mime_templates[ $key ]['icon_type'] = self::$mla_upload_mime_templates[ $key ]['mla_icon_type'];
1808
  }
1809
  }
1810
  }
1827
  $mla_type = '';
1828
  $description = '';
1829
 
1830
+ // if ( NULL == $icon_type = wp_ext2type( $key ) ) {
1831
+ // $icon_type = 'default';
1832
+ // }
1833
+ $icon_type = self::mla_get_core_icon_type( $key );
1834
 
1835
  $wp_icon_type = $icon_type;
1836
  $mla_icon_type = $icon_type;
1837
+ $core_icon_type = $icon_type; //self::mla_get_core_icon_type( $key );
1838
  }
1839
 
 
1840
  self::$mla_upload_mime_templates[ $key ] = array(
1841
  'post_ID' => $post_ID,
1842
  'mime_type' => $value,
1853
  );
1854
 
1855
  if ( 'checked' == MLAOptions::mla_get_option( MLAOptions::MLA_ENABLE_MLA_ICONS ) ) {
1856
+ self::$mla_upload_mime_templates[ $key ]['icon_type'] = self::$mla_upload_mime_templates[ $key ]['mla_icon_type'];
1857
  }
1858
  }
1859
 
includes/class-mla-options.php CHANGED
@@ -1190,7 +1190,7 @@ class MLAOptions {
1190
  'menu_order' => 0,
1191
  'description' => _x( 'All application subtypes', 'post_mime_types_description', 'media-library-assistant' )
1192
  ),
1193
- 'unattached' => array(
1194
  'singular' => _x( 'Unattached', 'table_view_singular', 'media-library-assistant' ),
1195
  'plural' => _x( 'Unattached', 'table_view_plural', 'media-library-assistant' ),
1196
  'specification' => '',
@@ -1199,6 +1199,15 @@ class MLAOptions {
1199
  'menu_order' => 0,
1200
  'description' => _x( 'Built-in view', 'post_mime_types_description', 'media-library-assistant' )
1201
  ),
 
 
 
 
 
 
 
 
 
1202
  'trash' => array(
1203
  'singular' => _x( 'Trash', 'table_view_singular', 'media-library-assistant' ),
1204
  'plural' => _x( 'Trash', 'table_view_plural', 'media-library-assistant' ),
@@ -1418,24 +1427,30 @@ class MLAOptions {
1418
  * @param string Name of the desired option
1419
  * @param boolean True to ignore current setting and return default values
1420
  * @param boolean True to ignore default values and return only stored values
 
 
1421
  *
1422
  * @return mixed Value(s) for the option or false if the option is not a defined MLA option
1423
  */
1424
- public static function mla_get_option( $option, $get_default = false, $get_stored = false ) {
1425
- if ( ! array_key_exists( $option, self::$mla_option_definitions ) ) {
 
 
 
 
1426
  return false;
1427
  }
1428
 
1429
  if ( $get_default ) {
1430
- if ( array_key_exists( 'std', self::$mla_option_definitions[ $option ] ) ) {
1431
- return self::$mla_option_definitions[ $option ]['std'];
1432
  }
1433
 
1434
  return false;
1435
  } // $get_default
1436
 
1437
- if ( ! $get_stored && array_key_exists( 'std', self::$mla_option_definitions[ $option ] ) ) {
1438
- return get_option( MLA_OPTION_PREFIX . $option, self::$mla_option_definitions[ $option ]['std'] );
1439
  }
1440
 
1441
  return get_option( MLA_OPTION_PREFIX . $option, false );
@@ -1448,11 +1463,16 @@ class MLAOptions {
1448
  *
1449
  * @param string Name of the desired option
1450
  * @param mixed New value for the desired option
 
1451
  *
1452
  * @return boolean True if the value was changed or false if the update failed
1453
  */
1454
- public static function mla_update_option( $option, $newvalue ) {
1455
- if ( array_key_exists( $option, self::$mla_option_definitions ) ) {
 
 
 
 
1456
  return update_option( MLA_OPTION_PREFIX . $option, $newvalue );
1457
  }
1458
 
@@ -1465,11 +1485,16 @@ class MLAOptions {
1465
  * @since 0.1
1466
  *
1467
  * @param string Name of the desired option
 
1468
  *
1469
  * @return boolean True if the option was deleted, otherwise false
1470
  */
1471
- public static function mla_delete_option( $option ) {
1472
- if ( array_key_exists( $option, self::$mla_option_definitions ) ) {
 
 
 
 
1473
  return delete_option( MLA_OPTION_PREFIX . $option );
1474
  }
1475
 
@@ -2261,8 +2286,21 @@ class MLAOptions {
2261
  $base_file = isset( $wp_attached_files[ $post_id ]->meta_value ) ? $wp_attached_files[ $post_id ]->meta_value : '';
2262
  $sizes = array();
2263
 
2264
- $attachment_metadata = isset( $wp_attachment_metadata[ $post_id ]->meta_value ) ? unserialize( $wp_attachment_metadata[ $post_id ]->meta_value ) : array();
 
 
 
 
 
 
 
 
2265
  if ( !empty( $attachment_metadata ) ) {
 
 
 
 
 
2266
  $sizes = isset( $attachment_metadata['sizes'] ) ? $attachment_metadata['sizes'] : array();
2267
 
2268
  if ( isset( $attachment_metadata['width'] ) ) {
@@ -2284,11 +2322,6 @@ class MLAOptions {
2284
  }
2285
 
2286
  $results['hwstring_small'] = isset( $attachment_metadata['hwstring_small'] ) ? $attachment_metadata['hwstring_small'] : '';
2287
-
2288
- if ( isset( $attachment_metadata['image_meta'] ) ) {
2289
- foreach ( $attachment_metadata['image_meta'] as $key => $value )
2290
- $results[ $key ] = $value;
2291
- }
2292
  }
2293
 
2294
  if ( ! empty( $base_file ) ) {
@@ -3820,6 +3853,9 @@ class MLAOptions {
3820
  'option' => 'text' );
3821
 
3822
  $exif_value = self::_evaluate_data_source( $post->ID, 'single_attachment_mapping', $data_value, $attachment_metadata );
 
 
 
3823
  } else {
3824
  $exif_value = MLAData::mla_exif_metadata_value( $setting_value['exif_value'], $image_metadata );
3825
  }
@@ -3925,6 +3961,9 @@ class MLAOptions {
3925
  'option' => 'array' );
3926
 
3927
  $exif_value = self::_evaluate_data_source( $post->ID, 'single_attachment_mapping', $data_value, $attachment_metadata );
 
 
 
3928
  } else {
3929
  $exif_value = MLAData::mla_exif_metadata_value( $setting_value['exif_value'], $image_metadata );
3930
  }
@@ -4083,6 +4122,9 @@ class MLAOptions {
4083
  'option' => 'text' );
4084
 
4085
  $exif_value = self::_evaluate_data_source( $post->ID, 'single_attachment_mapping', $data_value, $attachment_metadata );
 
 
 
4086
  } else {
4087
  $exif_value = MLAData::mla_exif_metadata_value( $setting_value['exif_value'], $image_metadata );
4088
  }
1190
  'menu_order' => 0,
1191
  'description' => _x( 'All application subtypes', 'post_mime_types_description', 'media-library-assistant' )
1192
  ),
1193
+ 'detached' => array(
1194
  'singular' => _x( 'Unattached', 'table_view_singular', 'media-library-assistant' ),
1195
  'plural' => _x( 'Unattached', 'table_view_plural', 'media-library-assistant' ),
1196
  'specification' => '',
1199
  'menu_order' => 0,
1200
  'description' => _x( 'Built-in view', 'post_mime_types_description', 'media-library-assistant' )
1201
  ),
1202
+ 'attached' => array(
1203
+ 'singular' => _x( 'Attached', 'table_view_singular', 'media-library-assistant' ),
1204
+ 'plural' => _x( 'Attached', 'table_view_plural', 'media-library-assistant' ),
1205
+ 'specification' => '',
1206
+ 'post_mime_type' => false,
1207
+ 'table_view' => true,
1208
+ 'menu_order' => 0,
1209
+ 'description' => _x( 'Built-in view', 'post_mime_types_description', 'media-library-assistant' )
1210
+ ),
1211
  'trash' => array(
1212
  'singular' => _x( 'Trash', 'table_view_singular', 'media-library-assistant' ),
1213
  'plural' => _x( 'Trash', 'table_view_plural', 'media-library-assistant' ),
1427
  * @param string Name of the desired option
1428
  * @param boolean True to ignore current setting and return default values
1429
  * @param boolean True to ignore default values and return only stored values
1430
+ * @param array Custom option definitions
1431
+ *
1432
  *
1433
  * @return mixed Value(s) for the option or false if the option is not a defined MLA option
1434
  */
1435
+ public static function mla_get_option( $option, $get_default = false, $get_stored = false, $option_table = NULL ) {
1436
+ if ( NULL == $option_table ) {
1437
+ $option_table = self::$mla_option_definitions;
1438
+ }
1439
+
1440
+ if ( ! array_key_exists( $option, $option_table ) ) {
1441
  return false;
1442
  }
1443
 
1444
  if ( $get_default ) {
1445
+ if ( array_key_exists( 'std', $option_table[ $option ] ) ) {
1446
+ return $option_table[ $option ]['std'];
1447
  }
1448
 
1449
  return false;
1450
  } // $get_default
1451
 
1452
+ if ( ! $get_stored && array_key_exists( 'std', $option_table[ $option ] ) ) {
1453
+ return get_option( MLA_OPTION_PREFIX . $option, $option_table[ $option ]['std'] );
1454
  }
1455
 
1456
  return get_option( MLA_OPTION_PREFIX . $option, false );
1463
  *
1464
  * @param string Name of the desired option
1465
  * @param mixed New value for the desired option
1466
+ * @param array Custom option definitions
1467
  *
1468
  * @return boolean True if the value was changed or false if the update failed
1469
  */
1470
+ public static function mla_update_option( $option, $newvalue, $option_table = NULL ) {
1471
+ if ( NULL == $option_table ) {
1472
+ $option_table = self::$mla_option_definitions;
1473
+ }
1474
+
1475
+ if ( array_key_exists( $option, $option_table ) ) {
1476
  return update_option( MLA_OPTION_PREFIX . $option, $newvalue );
1477
  }
1478
 
1485
  * @since 0.1
1486
  *
1487
  * @param string Name of the desired option
1488
+ * @param array Custom option definitions
1489
  *
1490
  * @return boolean True if the option was deleted, otherwise false
1491
  */
1492
+ public static function mla_delete_option( $option, $option_table = NULL ) {
1493
+ if ( NULL == $option_table ) {
1494
+ $option_table = self::$mla_option_definitions;
1495
+ }
1496
+
1497
+ if ( array_key_exists( $option, $option_table ) ) {
1498
  return delete_option( MLA_OPTION_PREFIX . $option );
1499
  }
1500
 
2286
  $base_file = isset( $wp_attached_files[ $post_id ]->meta_value ) ? $wp_attached_files[ $post_id ]->meta_value : '';
2287
  $sizes = array();
2288
 
2289
+ if ( isset( $wp_attachment_metadata[ $post_id ]->meta_value ) ) {
2290
+ $attachment_metadata = @unserialize( $wp_attachment_metadata[ $post_id ]->meta_value );
2291
+ if ( ! is_array( $attachment_metadata ) ) {
2292
+ $attachment_metadata = array();
2293
+ }
2294
+ } else {
2295
+ $attachment_metadata = array();
2296
+ }
2297
+
2298
  if ( !empty( $attachment_metadata ) ) {
2299
+ if ( isset( $attachment_metadata['image_meta'] ) ) {
2300
+ foreach ( $attachment_metadata['image_meta'] as $key => $value )
2301
+ $results[ $key ] = $value;
2302
+ }
2303
+
2304
  $sizes = isset( $attachment_metadata['sizes'] ) ? $attachment_metadata['sizes'] : array();
2305
 
2306
  if ( isset( $attachment_metadata['width'] ) ) {
2322
  }
2323
 
2324
  $results['hwstring_small'] = isset( $attachment_metadata['hwstring_small'] ) ? $attachment_metadata['hwstring_small'] : '';
 
 
 
 
 
2325
  }
2326
 
2327
  if ( ! empty( $base_file ) ) {
3853
  'option' => 'text' );
3854
 
3855
  $exif_value = self::_evaluate_data_source( $post->ID, 'single_attachment_mapping', $data_value, $attachment_metadata );
3856
+ if ( ' ' == $exif_value ) {
3857
+ $exif_value = '';
3858
+ }
3859
  } else {
3860
  $exif_value = MLAData::mla_exif_metadata_value( $setting_value['exif_value'], $image_metadata );
3861
  }
3961
  'option' => 'array' );
3962
 
3963
  $exif_value = self::_evaluate_data_source( $post->ID, 'single_attachment_mapping', $data_value, $attachment_metadata );
3964
+ if ( ' ' == $exif_value ) {
3965
+ $exif_value = '';
3966
+ }
3967
  } else {
3968
  $exif_value = MLAData::mla_exif_metadata_value( $setting_value['exif_value'], $image_metadata );
3969
  }
4122
  'option' => 'text' );
4123
 
4124
  $exif_value = self::_evaluate_data_source( $post->ID, 'single_attachment_mapping', $data_value, $attachment_metadata );
4125
+ if ( ' ' == $exif_value ) {
4126
+ $exif_value = '';
4127
+ }
4128
  } else {
4129
  $exif_value = MLAData::mla_exif_metadata_value( $setting_value['exif_value'], $image_metadata );
4130
  }
includes/class-mla-polylang-support.php ADDED
@@ -0,0 +1,2184 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Media Library Assistant Polylang Support classes
4
+ *
5
+ * This file is conditionally loaded in MLA::initialize after a check for Polylang presence.
6
+ *
7
+ * @package Media Library Assistant
8
+ * @since 2.11
9
+ */
10
+
11
+ /**
12
+ * Class MLA (Media Library Assistant) Polylang provides support for the
13
+ * Polylang Multilingual plugin
14
+ *
15
+ * @package Media Library Assistant
16
+ * @since 2.11
17
+ */
18
+ class MLA_Polylang {
19
+ /**
20
+ * Uniquely identifies the Quick Translate action
21
+ *
22
+ * @since 2.11
23
+ *
24
+ * @var string
25
+ */
26
+ const MLA_PLL_QUICK_TRANSLATE = 'mla-polylang-quick-translate';
27
+
28
+ /**
29
+ * Initialization function, similar to __construct()
30
+ *
31
+ * @since 2.11
32
+ *
33
+ * @return void
34
+ */
35
+ public static function initialize() {
36
+ /*
37
+ * The remaining filters are only useful for the admin section;
38
+ * exit in the front-end posts/pages
39
+ */
40
+ if ( ! is_admin() ) {
41
+ /*
42
+ * Defined in /media-library-assistant/includes/class-mla-shortcodes.php
43
+ */
44
+ add_filter( 'mla_get_terms_query_arguments', 'MLA_Polylang::mla_get_terms_query_arguments', 10, 1 );
45
+ add_filter( 'mla_get_terms_clauses', 'MLA_Polylang::mla_get_terms_clauses', 10, 1 );
46
+
47
+ return;
48
+ }
49
+
50
+ /*
51
+ * Defined in /wp-admin/admin.php
52
+ */
53
+ add_action( 'admin_init', 'MLA_Polylang::admin_init' );
54
+
55
+ /*
56
+ * Defined in /wp-admin/admin-header.php
57
+ */
58
+ add_action( 'admin_enqueue_scripts', 'MLA_Polylang::admin_enqueue_scripts', 10, 1 );
59
+
60
+ /*
61
+ * Defined in wp-includes/post.php function wp_insert_post
62
+ */
63
+ add_filter( 'wp_insert_post_empty_content', 'MLA_Polylang::wp_insert_post_empty_content', 10, 2 );
64
+ add_action( 'edit_attachment', 'MLA_Polylang::edit_attachment', 10, 1 );
65
+
66
+ /*
67
+ * Defined in /wp-admin/includes/class-wp-list-table.php
68
+ */
69
+ add_filter( 'views_media_page_mla-menu', 'MLA_Polylang::views_media_page_mla_menu', 10, 1 );
70
+
71
+ /*
72
+ * Defined in /media-library-assistant/includes/class-mla-media-modal.php
73
+ */
74
+ add_action( 'mla_media_modal_begin_update_compat_fields', 'MLA_Polylang::mla_media_modal_begin_update_compat_fields', 10, 1 );
75
+ add_filter( 'mla_media_modal_update_compat_fields_terms', 'MLA_Polylang::mla_media_modal_update_compat_fields_terms', 10, 4 );
76
+ add_filter( 'mla_media_modal_end_update_compat_fields', 'MLA_Polylang::mla_media_modal_end_update_compat_fields', 10, 3 );
77
+
78
+ /*
79
+ * Defined in /media-library-assistant/includes/class-mla-main.php
80
+ */
81
+ add_filter( 'mla_list_table_inline_fields', 'MLA_Polylang::mla_list_table_inline_fields', 10, 1 );
82
+ add_filter( 'mla_list_table_inline_action', 'MLA_Polylang::mla_list_table_inline_action', 10, 2 );
83
+ add_filter( 'mla_list_table_bulk_action_initial_request', 'MLA_Polylang::mla_list_table_bulk_action_initial_request', 10, 3 );
84
+ add_filter( 'mla_list_table_bulk_action_item_request', 'MLA_Polylang::mla_list_table_bulk_action_item_request', 10, 4 );
85
+ add_filter( 'mla_list_table_bulk_action', 'MLA_Polylang::mla_list_table_bulk_action', 10, 3 );
86
+ add_filter( 'mla_list_table_custom_bulk_action', 'MLA_Polylang::mla_list_table_custom_bulk_action', 10, 3 );
87
+ add_filter( 'mla_list_table_inline_values', 'MLA_Polylang::mla_list_table_inline_values', 10, 1 );
88
+ add_filter( 'mla_list_table_inline_parse', 'MLA_Polylang::mla_list_table_inline_parse', 10, 3 );
89
+
90
+ /*
91
+ * Defined in /media-library-assistant/includes/class-mla-list-table.php
92
+ */
93
+ add_filter( 'mla_list_table_get_columns', 'MLA_Polylang::mla_list_table_get_columns', 10, 1 );
94
+ add_filter( 'mla_list_table_get_bulk_actions', 'MLA_Polylang::mla_list_table_get_bulk_actions', 10, 1 );
95
+ add_filter( 'mla_list_table_column_default', 'MLA_Polylang::mla_list_table_column_default', 10, 3 );
96
+
97
+ add_filter( 'mla_list_table_submenu_arguments', 'MLA_Polylang::mla_list_table_submenu_arguments', 10, 2 );
98
+
99
+ add_filter( 'mla_list_table_prepare_items_pagination', 'MLA_Polylang::mla_list_table_prepare_items_pagination', 10, 2 );
100
+ add_filter( 'mla_list_table_prepare_items_total_items', 'MLA_Polylang::mla_list_table_prepare_items_total_items', 10, 2 );
101
+
102
+ add_filter( 'mla_list_table_build_rollover_actions', 'MLA_Polylang::mla_list_table_build_rollover_actions', 10, 3 );
103
+ add_filter( 'mla_list_table_build_inline_data', 'MLA_Polylang::mla_list_table_build_inline_data', 10, 2 );
104
+
105
+ /*
106
+ * Defined in /media-library-assistant/includes/class-mla-settings.php
107
+ */
108
+ add_filter( 'mla_get_options_tablist', 'MLA_Polylang::mla_get_options_tablist', 10, 3 );
109
+
110
+ /*
111
+ * Defined in /polylang/admin/admin-filters-media.php
112
+ */
113
+ add_action( 'pll_translate_media', 'MLA_Polylang::pll_translate_media', 10, 3 );
114
+ }
115
+
116
+ /**
117
+ * MLA Tag Cloud Query Arguments
118
+ *
119
+ * Saves [mla_tag_cloud] query parameters for use in MLA_Polylang::mla_get_terms_clauses.
120
+ *
121
+ * @since 2.11
122
+ * @uses MLA_Polylang::$all_query_parameters
123
+ *
124
+ * @param array shortcode arguments merged with attachment selection defaults, so every possible parameter is present
125
+ *
126
+ * @return array updated attachment query arguments
127
+ */
128
+ public static function mla_get_terms_query_arguments( $all_query_parameters ) {
129
+ MLA_Polylang::$all_query_parameters = $all_query_parameters;
130
+
131
+ return $all_query_parameters;
132
+ } // mla_get_terms_query_arguments
133
+
134
+ /**
135
+ * Save the query arguments
136
+ *
137
+ * @since 2.11
138
+ *
139
+ * @var array
140
+ */
141
+ private static $all_query_parameters = array();
142
+
143
+ /**
144
+ * MLA Tag Cloud Query Clauses
145
+ *
146
+ * Adds language-specific clauses to filter the cloud terms.
147
+ *
148
+ * @since 2.11
149
+ *
150
+ * @param array SQL clauses ( 'fields', 'join', 'where', 'order', 'orderby', 'limits' )
151
+ *
152
+ * @return array updated SQL clauses
153
+ */
154
+ public static function mla_get_terms_clauses( $clauses ) {
155
+ global $polylang;
156
+
157
+ $clauses = $polylang->filters->terms_clauses($clauses, MLA_Polylang::$all_query_parameters['taxonomy'], MLA_Polylang::$all_query_parameters );
158
+
159
+ return $clauses;
160
+ } // mla_get_terms_clauses
161
+
162
+ /**
163
+ * Load the plugin's Ajax handler(s)
164
+ *
165
+ * @since 2.11
166
+ *
167
+ * @return void
168
+ */
169
+ public static function admin_init() {
170
+ /*
171
+ * Add styles for the language management column
172
+ */
173
+ if ( isset( $_REQUEST['page'] ) && ( MLA::ADMIN_PAGE_SLUG == $_REQUEST['page'] ) ) {
174
+ add_action( 'admin_print_styles', 'MLA_Polylang::mla_list_table_add_pll_styles' );
175
+ }
176
+
177
+ if ( ( defined('WP_ADMIN') && WP_ADMIN ) && ( defined('DOING_AJAX') && DOING_AJAX ) ) {
178
+ add_action( 'wp_ajax_' . 'mla-polylang-quick-translate', 'MLA_Polylang::quick_translate' );
179
+ }
180
+
181
+ /*
182
+ * Localize $mla_language_option_definitions array
183
+ */
184
+ MLA_Polylang::mla_localize_language_option_definitions();
185
+ }
186
+
187
+ /**
188
+ * Find or create an item translation
189
+ *
190
+ * @since 2.11
191
+ *
192
+ * @param integer item ID
193
+ * @param string Slug of the desired language
194
+ *
195
+ * @return integer ID of the corresponding item in the desired language
196
+ */
197
+ private static function _get_translation( $post_id, $new_language ) {
198
+ global $polylang;
199
+
200
+ /*
201
+ * Get the existing translations, if any
202
+ */
203
+ $translations = $polylang->model->get_translations( 'post', $post_id );
204
+ if ( ! $translations && $lang = $polylang->model->get_post_language( $post_id ) ) {
205
+ $translations[ $lang->slug ] = $post_id;
206
+ }
207
+
208
+ if ( array_key_exists( $new_language, $translations ) ) {
209
+ $new_id = $translations[ $new_language ];
210
+ } else {
211
+ /*
212
+ * create a new attachment (translate attachment parent if exists)
213
+ * modeled after /polylang/admin/admin-filters-media.php
214
+ * function translate_media()
215
+ */
216
+ $post = get_post( $post_id );
217
+ $post->ID = null; // will force the creation
218
+ $post->post_parent = ( $post->post_parent && $tr_parent = $polylang->model->get_translation( 'post', $post->post_parent, $new_language ) ) ? $tr_parent : 0;
219
+ $new_id = wp_insert_attachment( $post );
220
+ add_post_meta( $new_id, '_wp_attachment_metadata', get_post_meta( $post_id, '_wp_attachment_metadata', true ) );
221
+ add_post_meta( $new_id, '_wp_attached_file', get_post_meta( $post_id, '_wp_attached_file', true ) );
222
+
223
+ if ( 'checked' == MLAOptions::mla_get_option( 'term_synchronization', false, false, MLA_Polylang::$mla_language_option_definitions ) ) {
224
+ self::_build_existing_terms( $post_id );
225
+ self::_build_tax_input( $post_id );
226
+ $tax_inputs = self::_apply_tax_input( 0, $new_language );
227
+ } else {
228
+ $tax_inputs = NULL;
229
+ }
230
+
231
+ if ( !empty( $tax_inputs ) ) {
232
+ MLAData::mla_update_single_item( $new_id, array(), $tax_inputs );
233
+ }
234
+
235
+ self::$existing_terms = array( 'element_id' => 0 );
236
+ self::$relevant_terms = array();
237
+
238
+ $polylang->model->set_post_language($new_id, $new_language);
239
+
240
+ $translations = $polylang->model->get_translations( 'post', $post_id );
241
+ if ( ! $translations && $lang = $polylang->model->get_post_language( $post_id ) )
242
+ $translations[ $lang->slug ] = $post_id;
243
+
244
+ $translations[ $new_language ] = $new_id;
245
+ $polylang->model->save_translations( 'post', $new_id, $translations );
246
+ } // add new translation
247
+
248
+ return (integer) $new_id;
249
+ } // _get_translation
250
+
251
+ /**
252
+ * Ajax handler to Quick Translate a single attachment
253
+ *
254
+ * @since 2.11
255
+ *
256
+ * @return void echo HTML <td> innerHTML for updated call or error message, then die()
257
+ */
258
+ public static function quick_translate() {
259
+ global $polylang;
260
+
261
+ check_ajax_referer( MLA::MLA_ADMIN_NONCE, 'nonce' );
262
+
263
+ if ( empty( $_REQUEST['post_ID'] ) ) {
264
+ echo __( 'ERROR: No post ID found', 'media-library-assistant' );
265
+ die();
266
+ } else {
267
+ $post_id = (integer) $_REQUEST['post_ID'];
268
+ }
269
+
270
+ if ( ! current_user_can( 'edit_post', $post_id ) ) {
271
+ wp_die( __( 'You are not allowed to edit this Attachment.', 'media-library-assistant' ) );
272
+ }
273
+
274
+ self::_build_existing_terms( $post_id );
275
+
276
+ /*
277
+ * pll_quick_language is used by the translation status links; edit or add the selected translation
278
+ * inline_lang_choice is the value of the Language dropdown control; change the value of the current item
279
+ */
280
+ if ( ! empty( $_REQUEST['pll_quick_language'] ) ) {
281
+ $new_id = MLA_Polylang::_get_translation( $post_id, $_REQUEST['pll_quick_language'] );
282
+ } else {
283
+ $new_id = $post_id;
284
+
285
+ // Language dropdown in Quick Edit area
286
+ if ( isset( $_REQUEST['inline_lang_choice'] ) ) {
287
+ $translations = $polylang->model->get_translations( 'post', $post_id );
288
+
289
+ if ( ! array_key_exists( $_REQUEST['inline_lang_choice'], $translations ) ) {
290
+ $post = get_post( $post_id );
291
+ // save_post() does a check_admin_referer() security test
292
+ $_REQUEST['_inline_edit'] = wp_create_nonce( 'inlineeditnonce' );
293
+ $polylang->filters_post->save_post( $post_id, $post, true );
294
+
295
+ if ( 'checked' == MLAOptions::mla_get_option( 'term_assignment', false, false, MLA_Polylang::$mla_language_option_definitions ) ) {
296
+ // Record new language for Term Assignment and Synchronization
297
+ if ( ! empty( $_REQUEST['tax_input'] ) ) {
298
+ // Discard the old translation, which is gone
299
+ unset( self::$existing_terms[ self::$existing_terms['slug'] ] );
300
+ self::$existing_terms['slug'] = $_REQUEST['inline_lang_choice'];
301
+ }
302
+
303
+ self::_build_existing_terms( $post_id );
304
+ self::_build_tax_input( $post_id );
305
+ $tax_inputs = self::_apply_tax_input( 0, $_REQUEST['inline_lang_choice'] );
306
+ } else {
307
+ $tax_inputs = NULL;
308
+ }
309
+
310
+ if ( !empty( $tax_inputs ) ) {
311
+ MLAData::mla_update_single_item( $post_id, array(), $tax_inputs );
312
+ }
313
+ } // change language
314
+ }
315
+
316
+ }
317
+
318
+ // Create an instance of our package class and echo the new HTML for all translations
319
+ $translations = $polylang->model->get_translations( 'post', $post_id );
320
+
321
+ $MLAListTable = new MLA_List_Table();
322
+ $new_item = (object) MLAData::mla_get_attachment_by_id( $new_id );
323
+ $MLAListTable->single_row( $new_item );
324
+
325
+ foreach( $translations as $language => $post_id ) {
326
+ if ( $new_id == $post_id ) {
327
+ continue;
328
+ }
329
+
330
+ $new_item = (object) MLAData::mla_get_attachment_by_id( $post_id );
331
+ $MLAListTable->single_row( $new_item );
332
+ echo "\n";
333
+ }
334
+
335
+ die(); // this is required to return a proper result
336
+ } // quick_translate
337
+
338
+ /**
339
+ * Load the plugin's Style Sheet and Javascript files
340
+ *
341
+ * @since 2.11
342
+ *
343
+ * @param string Name of the page being loaded
344
+ *
345
+ * @return void
346
+ */
347
+ public static function admin_enqueue_scripts( $page_hook ) {
348
+ $suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
349
+
350
+ if ( 'media_page_mla-menu' != $page_hook ) {
351
+ return;
352
+ }
353
+
354
+ wp_register_style( 'mla-polylang-support', MLA_PLUGIN_URL . 'css/mla-polylang-support.css', false, MLA::CURRENT_MLA_VERSION );
355
+ wp_enqueue_style( 'mla-polylang-support' );
356
+
357
+ wp_enqueue_script( 'mla-polylang-support-scripts', MLA_PLUGIN_URL . "js/mla-polylang-support-scripts{$suffix}.js",
358
+ array( 'jquery' ), MLA::CURRENT_MLA_VERSION, false );
359
+
360
+ // For Quick and Bulk Translate
361
+ $fields = array( 'old_lang', 'inline_lang_choice', 'inline_translations' );
362
+
363
+ $script_variables = array(
364
+ 'fields' => $fields,
365
+ 'error' => __( 'Error while saving the translations.', 'media-library-assistant' ),
366
+ 'ntdelTitle' => __( 'Remove From Bulk Translate', 'media-library-assistant' ),
367
+ 'noTitle' => __( '(no title)', 'media-library-assistant' ),
368
+ 'bulkTitle' => __( 'Bulk Translate items', 'media-library-assistant' ),
369
+ 'addNew' => __( 'Add new', 'media-library-assistant' ),
370
+ 'edit' => __( 'Edit', 'media-library-assistant' ),
371
+ 'comma' => _x( ',', 'tag_delimiter', 'media-library-assistant' ),
372
+ 'useSpinnerClass' => false,
373
+ 'ajax_action' => MLA_Polylang::MLA_PLL_QUICK_TRANSLATE,
374
+ 'ajax_nonce' => wp_create_nonce( MLA::MLA_ADMIN_NONCE )
375
+ );
376
+
377
+ if ( version_compare( get_bloginfo( 'version' ), '4.2', '>=' ) ) {
378
+ $script_variables['useSpinnerClass'] = true;
379
+ }
380
+
381
+ wp_localize_script( 'mla-polylang-support-scripts', 'mla_polylang_support_vars', $script_variables );
382
+ }
383
+
384
+ /**
385
+ * Duplicates created during media upload
386
+ *
387
+ * @since 2.11
388
+ *
389
+ * @var array [ $post_id ] => $language;
390
+ */
391
+ private static $duplicate_attachments = array();
392
+
393
+ /**
394
+ * Copies taxonomy terms from the source item to the new translated item
395
+ *
396
+ * @since 2.11
397
+ *
398
+ * @param integer ID of the new item
399
+ * @param object post object of the new item
400
+ * @param array an associative array of translations with language code as key and translation id as value
401
+ */
402
+ public static function pll_translate_media( $duplicated_attachment_id, $duplicated_attachment_object, $translations ) { //$attachment_id, $duplicated_attachment_id ) {
403
+ global $polylang;
404
+ static $already_adding = 0;
405
+
406
+ if ( $already_adding == $duplicated_attachment_id ) {
407
+ return;
408
+ } else {
409
+ $already_adding = $duplicated_attachment_id;
410
+ }
411
+
412
+ $attachment_id = absint( isset( $_REQUEST['from_media'] ) ? $_REQUEST['from_media'] : $duplicated_attachment_id );
413
+ $language_code = array_search( $duplicated_attachment_id, $translations );
414
+ self::$duplicate_attachments [ $duplicated_attachment_id ] = $language_code;
415
+
416
+ if ( isset( $_REQUEST['action'] ) && 'translate_media' == $_REQUEST['action'] ) {
417
+ if ( 'checked' == MLAOptions::mla_get_option( 'term_synchronization', false, false, MLA_Polylang::$mla_language_option_definitions ) ) {
418
+ // Clone the existing common terms to the new translation
419
+ self::_build_existing_terms( $attachment_id );
420
+ self::_build_tax_input( $attachment_id );
421
+ $tax_inputs = self::_apply_tax_input( 0, $language_code );
422
+ } else {
423
+ $tax_inputs = NULL;
424
+ }
425
+
426
+ if ( !empty( $tax_inputs ) ) {
427
+ MLAData::mla_update_single_item( $duplicated_attachment_id, array(), $tax_inputs );
428
+ }
429
+
430
+ self::$existing_terms = array( 'element_id' => 0 );
431
+ self::$relevant_terms = array();
432
+ } // translate_media
433
+ } // pll_translate_media
434
+
435
+ /**
436
+ * Taxonomy terms and translations
437
+ *
438
+ * @since 2.11
439
+ *
440
+ * @var array [ $term_taxonomy_id ] => array( $term, $translations )
441
+ */
442
+ private static $relevant_terms = array();
443
+
444
+ /**
445
+ * Adds a term and its translations to $relevant_terms
446
+ *
447
+ * @since 2.11
448
+ * @uses MLA_Polylang::$relevant_terms
449
+ *
450
+ * @param object WordPress term object
451
+ * @param object Polylang translations object; optional
452
+ */
453
+ private static function _add_relevant_term( $term, $translations = NULL ) {
454
+ global $polylang;
455
+
456
+ if ( ! array_key_exists( $term->term_taxonomy_id, self::$relevant_terms ) ) {
457
+ if ( empty( $translations ) ) {
458
+ $translations = array();
459
+ foreach ( $polylang->model->get_translations( 'term', $term->term_id ) as $language_code => $translation ) {
460
+ $translations[ $language_code ] = (object) array( 'element_id' => $translation );
461
+ }
462
+ }
463
+
464
+ self::$relevant_terms[ $term->term_taxonomy_id ]['term'] = $term;
465
+ self::$relevant_terms[ $term->term_taxonomy_id ]['translations'] = $translations;
466
+ }
467
+
468
+ return self::$relevant_terms[ $term->term_taxonomy_id ];
469
+ } // mla_post_updated_messages_filter
470
+
471
+ /**
472
+ * Finds a $relevant_term (if defined) given a key and (optional) a language
473
+ *
474
+ * @since 2.11
475
+ * @uses MLA_Polylang::$relevant_terms
476
+ *
477
+ * @param string $field to search in; 'id', 'name', or 'term_taxonomy_id'
478
+ * @param mixed $value to search for; integer, string or integer
479
+ * @param string $taxonomy to search in; slug
480
+ * @param string $language code; string; optional
481
+ */
482
+ private static function _get_relevant_term( $field, $value, $taxonomy, $language = NULL ) {
483
+ /*
484
+ * WordPress encodes special characters, e.g., "&" as HTML entities in term names
485
+ */
486
+ if ( 'name' == $field ) {
487
+ $value = _wp_specialchars( $value );
488
+ }
489
+
490
+ $relevant_term = false;
491
+ foreach( self::$relevant_terms as $term_taxonomy_id => $candidate ) {
492
+ if ( $taxonomy != $candidate['term']->taxonomy ) {
493
+ continue;
494
+ }
495
+
496
+ switch ( $field ) {
497
+ case 'id':
498
+ if ( $value == $candidate['term']->term_id ) {
499
+ $relevant_term = $candidate;
500
+ }
501
+ break;
502
+ case 'name':
503
+ if ( $value == $candidate['term']->name ) {
504
+ $relevant_term = $candidate;
505
+ }
506
+ break;
507
+ case 'term_taxonomy_id':
508
+ if ( $value == $term_taxonomy_id ) {
509
+ $relevant_term = $candidate;
510
+ }
511
+ break;
512
+ } // field
513
+
514
+ if ( ! empty( $relevant_term ) ) {
515
+ break;
516
+ }
517
+ } // relevant term
518
+
519
+ /*
520
+ * If no match; try to add it and its translations
521
+ */
522
+ if ( ( false === $relevant_term ) && $candidate = get_term_by( $field, $value, $taxonomy ) ) {
523
+ $relevant_term = self::_add_relevant_term( $candidate );
524
+
525
+ foreach ( $relevant_term['translations'] as $translation ) {
526
+ if ( array_key_exists( $translation->element_id, self::$relevant_terms ) ) {
527
+ continue;
528
+ }
529
+
530
+ $term_object = get_term_by( 'term_taxonomy_id', $translation->element_id, $taxonomy );
531
+ self::_add_relevant_term( $term_object, $relevant_term['translations'] );
532
+ } // translation
533
+ } // new term
534
+
535
+ /*
536
+ * Find the language-specific value, if requested
537
+ */
538
+ if ( $relevant_term && ! empty( $language ) ) {
539
+ if ( $relevant_term && array_key_exists( $language, $relevant_term['translations'] ) ) {
540
+ $relevant_term = self::$relevant_terms[ $relevant_term['translations'][ $language ]->element_id ];
541
+ } else {
542
+ $relevant_term = false;
543
+ }
544
+ }
545
+
546
+ return $relevant_term;
547
+ }
548
+
549
+ /**
550
+ * Taxonomy terms for the current item translation in the database
551
+ *
552
+ * @since 2.11
553
+ *
554
+ * @var array ['element_id'] => $post_id;
555
+ * [ $language ][ translation_details ]
556
+ * [ $language ][ $taxonomy ][ $term_taxonomy_id ] => $term
557
+ */
558
+ private static $existing_terms = array( 'element_id' => 0 );
559
+
560
+ /**
561
+ * Build the $existing_terms array
562
+ *
563
+ * Takes each translatable taxonomy and builds an array of
564
+ * language-specific term_id to term_id/term_name mappings
565
+ * for terms already assigned to the item translation.
566
+ *
567
+ * @since 2.11
568
+ * @uses MLA_Polylang::$existing_terms
569
+ * @uses MLA_Polylang::$relevant_terms
570
+ *
571
+ * @param integer $post_id ID of the current post
572
+ *
573
+ */
574
+ private static function _build_existing_terms( $post_id ) {
575
+ global $polylang;
576
+
577
+ if ( $post_id == self::$existing_terms['element_id'] ) {
578
+ return;
579
+ }
580
+
581
+ $language_details = (array) $polylang->model->get_post_language( $post_id );
582
+ $translations = array();
583
+ foreach ( $polylang->model->get_translations( 'post', $post_id ) as $language_code => $translation ) {
584
+ $translations[ $language_code ] = array( 'element_id' => $translation );
585
+ }
586
+
587
+ self::$existing_terms = array_merge( array( 'element_id' => $post_id, 'slug' => $language_details['slug'] ), $translations );
588
+ $taxonomies = $polylang->model->get_translated_taxonomies();
589
+
590
+ /*
591
+ * Find all assigned terms and build term_master array
592
+ */
593
+ foreach ( $translations as $language_code => $translation ) {
594
+ foreach ( $taxonomies as $taxonomy_name ) {
595
+ if ( $terms = get_the_terms( $translation['element_id'], $taxonomy_name ) ) {
596
+ foreach ( $terms as $term ) {
597
+ self::_add_relevant_term( $term );
598
+ self::$existing_terms[ $language_code ][ $taxonomy_name ][ $term->term_taxonomy_id ] = $term;
599
+ } // term
600
+ } else {
601
+ self::$existing_terms[ $language_code ][ $taxonomy_name ] = array();
602
+ }
603
+ } // taxonomy
604
+ } // translation
605
+
606
+ /*
607
+ * Add missing translated terms to the term_master array
608
+ */
609
+ foreach ( self::$relevant_terms as $term ) {
610
+ foreach ( $term['translations'] as $translation ) {
611
+ if ( array_key_exists( $translation->element_id, self::$relevant_terms ) ) {
612
+ continue;
613
+ }
614
+
615
+ $term_object = get_term_by( 'term_taxonomy_id', $translation->element_id, $term['term']->taxonomy );
616
+ self::_add_relevant_term( $term_object, $term['translations'] );
617
+ } // translation
618
+ } // term
619
+
620
+ return;
621
+ }
622
+
623
+ /**
624
+ * Update the $existing_terms array
625
+ *
626
+ * Takes each translatable taxonomy and rebuilds the array of
627
+ * language-specific term_id to term_id/term_name mappings
628
+ * for the "current translation" represented by the $post_id.
629
+ *
630
+ * @since 2.11
631
+ * @uses MLA_Polylang::$existing_terms
632
+ * @uses MLA_Polylang::$relevant_terms
633
+ *
634
+ * @param integer $post_id ID of the current post
635
+ *
636
+ * @return array ( taxonomy => term assignments ) before the update
637
+ */
638
+ private static function _update_existing_terms( $post_id ) {
639
+ global $polylang;
640
+
641
+ if ( $post_id != self::$existing_terms['element_id'] ) {
642
+ return false;
643
+ }
644
+
645
+ $language_code = self::$existing_terms['slug'];
646
+ $translation = self::$existing_terms[ $language_code ];
647
+ $terms_before = array();
648
+
649
+ /*
650
+ * Find all assigned terms and update the array
651
+ */
652
+ $taxonomies = $polylang->model->get_translated_taxonomies();
653
+ foreach ( $taxonomies as $taxonomy_name ) {
654
+ $terms_before[ $taxonomy_name ] = isset( $translation[ $taxonomy_name ] ) ? $translation[ $taxonomy_name ] : array();
655
+ $translation[ $taxonomy_name ] = array();
656
+ if ( $terms = get_the_terms( $post_id, $taxonomy_name ) ) {
657
+ foreach ( $terms as $term ) {
658
+ self::_add_relevant_term( $term );
659
+ $translation[ $taxonomy_name ][ $term->term_taxonomy_id ] = $term;
660
+ } // term
661
+ }
662
+ } // taxonomy
663
+
664
+ self::$existing_terms[ $language_code ] = $translation;
665
+
666
+ /*
667
+ * Add missing translated terms to the term_master array
668
+ */
669
+ foreach ( self::$relevant_terms as $term ) {
670
+ foreach ( $term['translations'] as $translation ) {
671
+ if ( array_key_exists( $translation->element_id, self::$relevant_terms ) ) {
672
+ continue;
673
+ }
674
+
675
+ $term_object = get_term_by( 'term_taxonomy_id', $translation->element_id, $term['term']->taxonomy );
676
+ self::_add_relevant_term( $term_object, $term['translations'] );
677
+ } // translation
678
+ } // term
679
+
680
+ return $terms_before;
681
+ }
682
+
683
+ /**
684
+ * Replacement tax_input values in all languages
685
+ *
686
+ * @since 2.11
687
+ *
688
+ * @var array ['tax_input_post_id'] => $post_id;
689
+ * [ $language ][ $taxonomy ] => array of integer term_ids (hierarchical)
690
+ * [ $language ][ $taxonomy ] => comma-delimited string of term names (flat)
691
+ */
692
+ private static $tax_input = array( 'tax_input_post_id' => 0 );
693
+
694
+ /**
695
+ * Build the $tax_input array
696
+ *
697
+ * Takes each term from the $tax_inputs parameter and builds an array of
698
+ * language-specific term_id to term_id/term_name mappings for all languages.
699
+ *
700
+ * @since 2.11
701
+ * @uses MLA_Polylang::$tax_input
702
+ * @uses MLA_Polylang::$existing_terms
703
+ *
704
+ * @param integer $post_id ID of the current post
705
+ * @param array $tax_inputs 'tax_input' request parameter
706
+ * @param array $tax_actions 'tax_action' request parameter
707
+ */
708
+ private static function _build_tax_input( $post_id, $tax_inputs = NULL, $tax_actions = NULL ) {
709
+ global $polylang;
710
+
711
+ if ( $post_id == self::$tax_input['tax_input_post_id'] ) {
712
+ return;
713
+ }
714
+
715
+ self::$tax_input = array( 'tax_input_post_id' => $post_id );
716
+ $active_languages = $polylang->model->get_languages_list();
717
+
718
+ /*
719
+ * See if we are cloning/"replacing" the existing assignments
720
+ */
721
+ if ( ( NULL == $tax_inputs ) && ( NULL == $tax_actions ) && isset( self::$existing_terms['element_id'] ) && ($post_id == self::$existing_terms['element_id'] ) ) {
722
+ $translation = self::$existing_terms[ self::$existing_terms['slug'] ];
723
+ $taxonomies = $polylang->model->get_translated_taxonomies();
724
+ $tax_inputs = array();
725
+ $no_terms = true;
726
+ foreach ( $taxonomies as $taxonomy_name ) {
727
+ $terms = isset( $translation[ $taxonomy_name ] ) ? $translation[ $taxonomy_name ] : array();
728
+ if ( ! empty( $terms ) ) {
729
+ $no_terms = false;
730
+ $taxonomy = get_taxonomy( $taxonomy_name );
731
+ $input_terms = array();
732
+ foreach ( $terms as $term ) {
733
+ if ( $taxonomy->hierarchical ) {
734
+ $input_terms[] = $term->term_id;
735
+ } else {
736
+ $input_terms[] = $term->name;
737
+ }
738
+ } // term
739
+
740
+ if ( $taxonomy->hierarchical ) {
741
+ $tax_inputs[ $taxonomy_name ] = $input_terms;
742
+ } else {
743
+ $tax_inputs[ $taxonomy_name ] = implode( ',', $input_terms );
744
+ }
745
+ } else {
746
+ $tax_inputs[ $taxonomy_name ] = array();
747
+ }
748
+ } // taxonomy_name
749
+
750
+ if ( $no_terms ) {
751
+ foreach( $active_languages as $language => $language_details ) {
752
+ self::$tax_input[ $language_details->slug ] = array();
753
+ }
754
+
755
+ return;
756
+ }
757
+ } // cloning
758
+
759
+ foreach ( $tax_inputs as $taxonomy => $terms ) {
760
+ $tax_action = isset( $tax_actions[ $taxonomy ] ) ? $tax_actions[ $taxonomy ] : 'replace';
761
+ $input_terms = array();
762
+ // hierarchical taxonomy => array of term_id integer values; flat => comma-delimited string of names
763
+ if ( $hierarchical = is_array( $terms ) ) {
764
+
765
+ foreach( $terms as $term ) {
766
+ if ( 0 == $term ) {
767
+ continue;
768
+ }
769
+
770
+ $relevant_term = self::_get_relevant_term( 'term_id', $term, $taxonomy );
771
+ if ( isset( $relevant_term['translations'] ) ) {
772
+ foreach ( $relevant_term['translations'] as $language => $translation ) {
773
+ if ($translated_term = self::_get_relevant_term( 'term_taxonomy_id', $translation->element_id, $taxonomy ) ) {
774
+ $input_terms[ $language ][ $translation->element_id ] = $translated_term['term'];
775
+ }
776
+ } // for each language
777
+ } // translations exist
778
+ } // foreach term
779
+ } else {
780
+ // Convert names to an array
781
+ $term_names = array_map( 'trim', explode( ',', $terms ) );
782
+
783
+ foreach ( $term_names as $term_name ) {
784
+ if ( ! empty( $term_name ) ) {
785
+ $relevant_term = self::_get_relevant_term( 'name', $term_name, $taxonomy );
786
+ if ( isset( $relevant_term['translations'] ) ) {
787
+ foreach ( $relevant_term['translations'] as $language => $translation ) {
788
+ if ( $translated_term = self::_get_relevant_term( 'term_taxonomy_id', $translation->element_id, $taxonomy ) ) {
789
+ $input_terms[ $language ][ $translation->element_id ] = $translated_term['term'];
790
+ }
791
+ } // for each language
792
+ } // translations exist
793
+ } // not empty
794
+ } // foreach name
795
+ } // flat taxonomy
796
+
797
+ foreach( $active_languages as $language => $language_details ) {
798
+ $language = $language_details->slug;
799
+ /*
800
+ * Apply the tax_action to the terms_before to find the terms_after
801
+ */
802
+ $term_changes = isset( $input_terms[ $language ] ) ? $input_terms[ $language ] : array();
803
+ if ( 'replace' == $tax_action ) {
804
+ $terms_after = $term_changes;
805
+ } else {
806
+ $terms_after = isset( self::$existing_terms[ $language ][ $taxonomy ] ) ? self::$existing_terms[ $language ][ $taxonomy ] : array();
807
+
808
+ foreach( $term_changes as $term_taxonomy_id => $input_term ) {
809
+ if ( 'add' == $tax_action ) {
810
+ $terms_after[ $term_taxonomy_id ] = $input_term;
811
+ } else {
812
+ unset( $terms_after[ $term_taxonomy_id ] );
813
+ }
814
+ } // input_term
815
+ }
816
+
817
+ /*
818
+ * Convert terms_after to tax_input format
819
+ */
820
+ $term_changes = array();
821
+ foreach( $terms_after as $input_term ) {
822
+ if ( $hierarchical ) {
823
+ $term_changes[] = $input_term->term_id;
824
+ } else {
825
+ $term_changes[] = $input_term->name;
826
+ }
827
+ } // input_term
828
+
829
+ if ( $hierarchical ) {
830
+ self::$tax_input[ $language ][ $taxonomy ] = $term_changes;
831
+ } else {
832
+ self::$tax_input[ $language ][ $taxonomy ] = implode( ',', $term_changes );
833
+ }
834
+ } // language
835
+
836
+ } // foreach taxonomy
837
+ } // _build_tax_input
838
+
839
+ /**
840
+ * Filter the $tax_input array to a specific language
841
+ *
842
+ * @since 2.11
843
+ * @uses MLA_Polylang::$tax_input
844
+ * @uses MLA_Polylang::$existing_terms
845
+ *
846
+ * @param integer $post_id ID of the post to be updated
847
+ * @param string $post_language explicit language_code; optional
848
+ *
849
+ * @return array language-specific $tax_inputs
850
+ */
851
+ private static function _apply_tax_input( $post_id, $post_language = NULL ) {
852
+ global $polylang;
853
+
854
+ if ( NULL == $post_language ) {
855
+ if ( isset( self::$existing_terms['element_id'] ) && $post_id == self::$existing_terms['element_id'] ) {
856
+ $post_language = self::$existing_terms['slug'];
857
+ } else {
858
+ $post_language = $polylang->model->get_post_language( $post_id );
859
+ $post_language = $post_language->slug;
860
+ }
861
+ }
862
+
863
+ return self::$tax_input[ $post_language ];
864
+ } // _apply_tax_input
865
+
866
+ /**
867
+ * Compute Term Synchronization replacement $tax_inputs
868
+ *
869
+ * Assumes the "current post" in $existing_terms is the source
870
+ * and $existing_terms contains the target translation
871
+ *
872
+ * @since 2.11
873
+ * @uses MLA_Polylang::$existing_terms
874
+ *
875
+ * @param string $language the target translation code
876
+ * @param array $terms_before source terms before updates/Term Assignment
877
+ *
878
+ * @return array $tax_inputs for Term Synchronization
879
+ */
880
+ private static function _apply_synch_input( $language, $terms_before ) {
881
+ // Make sure there IS a target translation
882
+ if ( empty( self::$existing_terms[ $language ] ) ) {
883
+ return false;
884
+ }
885
+
886
+ $terms_after = self::$existing_terms[ self::$existing_terms['slug'] ];
887
+
888
+ /*
889
+ * Remove terms in common, leaving terms_after => add, terms_before => remove
890
+ */
891
+ foreach ( $terms_before as $taxonomy => $terms ) {
892
+ foreach ( $terms as $ttid => $term ) {
893
+ if ( isset( $terms_after[ $taxonomy ][ $ttid ] ) ) {
894
+ unset( $terms_before[ $taxonomy ][ $ttid ] );
895
+ unset( $terms_after[ $taxonomy ][ $ttid ] );
896
+ }
897
+ } // terms
898
+ } // taxonomies
899
+
900
+ /*
901
+ * Compute "replace" tax_inputs for the target translation
902
+ */
903
+ $translation = self::$existing_terms[ $language ];
904
+ $synch_inputs = array();
905
+
906
+ foreach ( $terms_before as $taxonomy => $terms ) {
907
+ $translation_terms = isset( $translation[ $taxonomy ] ) ? $translation[ $taxonomy ] : array();
908
+ $terms_changed = false;
909
+
910
+ // Remove common terms
911
+ foreach ( $terms_before[ $taxonomy ] as $ttid => $term ) {
912
+ if ( isset( self::$relevant_terms[ $ttid ]['translations'][ $language ] ) ) {
913
+ $ttid = self::$relevant_terms[ $ttid ]['translations'][ $language ]->element_id;
914
+ if ( isset( $translation_terms[ $ttid ] ) ) {
915
+ unset( $translation_terms[ $ttid ] );
916
+ $terms_changed = true;
917
+ }
918
+ }
919
+ }
920
+
921
+ // Add common terms
922
+ foreach ( $terms_after[ $taxonomy ] as $ttid => $term ) {
923
+ if ( isset( self::$relevant_terms[ $ttid ]['translations'][ $language ] ) ) {
924
+ $term_translation = self::$relevant_terms[ $ttid ]['translations'][ $language ];
925
+ $term_translation = self::$relevant_terms[ $term_translation->element_id ]['term'];
926
+ $ttid = $term_translation->term_taxonomy_id;
927
+ if ( ! isset( $translation_terms[ $ttid ] ) ) {
928
+ $translation_terms[ $ttid ] = (object) array( 'term_id' => absint( $term_translation->term_id ), 'name' => $term_translation->name );
929
+ $terms_changed = true;
930
+ }
931
+ }
932
+ }
933
+
934
+ if ( $terms_changed ) {
935
+ $synch_inputs[ $taxonomy ] = $translation_terms;
936
+ }
937
+ } // taxonomies
938
+
939
+ /*
940
+ * Convert synch terms to $tax_inputs format
941
+ */
942
+ $tax_inputs = array();
943
+ foreach ( $synch_inputs as $taxonomy_name => $terms ) {
944
+ $taxonomy = get_taxonomy( $taxonomy_name );
945
+ $input_terms = array();
946
+ foreach ( $terms as $term ) {
947
+ if ( $taxonomy->hierarchical ) {
948
+ $input_terms[] = $term->term_id;
949
+ } else {
950
+ $input_terms[] = $term->name;
951
+ }
952
+ } // term
953
+
954
+ if ( $taxonomy->hierarchical ) {
955
+ $tax_inputs[ $taxonomy_name ] = $input_terms;
956
+ } else {
957
+ $tax_inputs[ $taxonomy_name ] = implode( ',', $input_terms );
958
+ }
959
+ } // synch_inputs
960
+
961
+ return $tax_inputs;
962
+ } // _apply_synch_input
963
+
964
+ /**
965
+ * Captures "before update" term assignments from the Media/Edit Media screen
966
+ *
967
+ * @since 2.11
968
+ *
969
+ * @param bool $maybe_empty Whether the post should be considered "empty".
970
+ * @param array $postarr Array of post data.
971
+ */
972
+ public static function wp_insert_post_empty_content( $maybe_empty, $postarr ) {
973
+ if ( isset( $_REQUEST['action'] ) && 'editpost' == $_REQUEST['action'] && isset( $_REQUEST['post_ID'] ) ) {
974
+ self::_build_existing_terms( $_REQUEST['post_ID'] );
975
+ }
976
+
977
+ return $maybe_empty;
978
+ } // wp_insert_post_empty_content
979
+
980
+ /**
981
+ * Filters taxonomy updates by language.
982
+ *
983
+ * @since 2.11
984
+ *
985
+ * @param integer ID of the current post
986
+ */
987
+ public static function edit_attachment( $post_id ) {
988
+ static $already_updating = 0;
989
+
990
+ /*
991
+ * mla_update_single_item eventually calls this action again
992
+ */
993
+ if ( $already_updating == $post_id ) {
994
+ return;
995
+ } else {
996
+ $already_updating = $post_id;
997
+ }
998
+
999
+ /*
1000
+ * Check for Bulk Edit during Add New Media
1001
+ */
1002
+ if ( is_array( self::$upload_bulk_edit_args ) ) {
1003
+ if ( ! empty( self::$upload_bulk_edit_args['tax_input'] ) ) {
1004
+ $tax_inputs = self::$upload_bulk_edit_args['tax_input'];
1005
+ if ( 'checked' == MLAOptions::mla_get_option( 'term_assignment', false, false, MLA_Polylang::$mla_language_option_definitions ) ) {
1006
+ self::_build_tax_input( $post_id, $tax_inputs, self::$upload_bulk_edit_args['tax_action'] );
1007
+ $tax_inputs = self::_apply_tax_input( $post_id );
1008
+ }
1009
+ } else {
1010
+ $tax_inputs = NULL;
1011
+ }
1012
+
1013
+ $updates = MLA::mla_prepare_bulk_edits( $post_id, self::$upload_bulk_edit_args, self::$upload_bulk_edit_map );
1014
+ unset( $updates['tax_input'] );
1015
+ unset( $updates['tax_action'] );
1016
+
1017
+ MLAData::mla_update_single_item( $post_id, $updates, $tax_inputs );
1018
+
1019
+ /*
1020
+ * Synchronize the changes to all other translations
1021
+ */
1022
+ if ( 'checked' == MLAOptions::mla_get_option( 'term_synchronization', false, false, MLA_Polylang::$mla_language_option_definitions ) ) {
1023
+ foreach( self::$tax_input as $language => $tax_inputs ) {
1024
+ /*
1025
+ * Skip 'tax_input_post_id' and the language we've already updated
1026
+ */
1027
+ if ( ( ! isset( self::$existing_terms[ $language ] ) ) || ( self::$existing_terms[ 'slug' ] == $language ) ) {
1028
+ continue;
1029
+ }
1030
+
1031
+ // Other translations have no existing terms, so we don't need _apply_synch_input()
1032
+ $translation = self::$existing_terms[ $language ];
1033
+ $tax_inputs = self::_apply_tax_input( $translation['element_id'], $language );
1034
+ $already_updating = $translation['element_id']; // prevent recursion
1035
+ MLAData::mla_update_single_item( $translation['element_id'], $updates, $tax_inputs );
1036
+ $already_updating = $post_id;
1037
+ } // translation
1038
+ } // do synchronization
1039
+
1040
+ return;
1041
+ } // Upload New Media Bulk Edit
1042
+
1043
+ /*
1044
+ * The category taxonomy (edit screens) is a special case because
1045
+ * post_categories_meta_box() changes the input name
1046
+ */
1047
+ if ( isset( $_REQUEST['tax_input'] ) ) {
1048
+ $tax_inputs = $_REQUEST['tax_input'];
1049
+ } else {
1050
+ $tax_inputs = array();
1051
+ }
1052
+
1053
+ if ( isset( $_REQUEST['post_category'] ) ) {
1054
+ $tax_inputs['category'] = $_REQUEST['post_category'];
1055
+ }
1056
+
1057
+ if ( isset( $_REQUEST['tax_action'] ) ) {
1058
+ $tax_actions = $_REQUEST['tax_action'];
1059
+ } else {
1060
+ $tax_actions = NULL;
1061
+ }
1062
+
1063
+ if ( ( ! empty( $tax_inputs ) ) && ( 'checked' == MLAOptions::mla_get_option( 'term_assignment', false, false, MLA_Polylang::$mla_language_option_definitions ) ) ) {
1064
+ self::_build_tax_input( $post_id, $tax_inputs, $tax_actions );
1065
+ $tax_inputs = self::_apply_tax_input( $post_id );
1066
+ }
1067
+
1068
+ if ( ! empty( $tax_inputs ) ) {
1069
+ MLAData::mla_update_single_item( $post_id, array(), $tax_inputs );
1070
+
1071
+ /*
1072
+ * Synchronize the changes to all other translations
1073
+ */
1074
+ if ( 'checked' == MLAOptions::mla_get_option( 'term_synchronization', false, false, MLA_Polylang::$mla_language_option_definitions ) ) {
1075
+
1076
+ /*
1077
+ * Update terms because they have changed
1078
+ */
1079
+ $terms_before = self::_update_existing_terms( $post_id );
1080
+
1081
+ // $tax_input is a convenient source of language codes; ignore $tax_inputs
1082
+ foreach( self::$tax_input as $language => $tax_inputs ) {
1083
+ /*
1084
+ * Skip 'tax_input_post_id' and the language we've already updated
1085
+ */
1086
+ if ( ( ! isset( self::$existing_terms[ $language ] ) ) || ( self::$existing_terms[ 'slug' ] == $language ) ) {
1087
+ continue;
1088
+ }
1089
+
1090
+ $tax_inputs = self::_apply_synch_input( $language, $terms_before );
1091
+ $translation = self::$existing_terms[ $language ]['element_id'];
1092
+ $already_updating = $translation; // prevent recursion
1093
+ MLAData::mla_update_single_item( $translation, array(), $tax_inputs );
1094
+ $already_updating = $post_id;
1095
+ } // translation
1096
+ } // do synchronization
1097
+ } // $tax_inputs
1098
+ } // edit_attachment
1099
+
1100
+ /**
1101
+ * PolyMLA custom views for the Media/Assistant submenu
1102
+ *
1103
+ * @since 2.11
1104
+ *
1105
+ * @param string The slug for the custom view to evaluate
1106
+ * @param string The slug for the current custom view, or ''
1107
+ *
1108
+ * @return mixed HTML for link to display the view, false if count = zero
1109
+ */
1110
+ private static function _get_view( $view_slug, $current_view ) {
1111
+ global $wpdb;
1112
+ static $posts_per_view = NULL, $view_singular = array (), $view_plural = array ();
1113
+
1114
+ /*
1115
+ * Calculate the common values once per page load
1116
+ */
1117
+ if ( is_null( $posts_per_view ) ) {
1118
+ if ( empty( MLA_Polylang::$list_table_parameters['total_items'] ) ) {
1119
+ MLA_Polylang::$list_table_parameters['total_items'] = (integer) $wpdb->get_var( "SELECT COUNT(*) FROM {$wpdb->posts} WHERE post_parent > 0 AND post_type = 'attachment' AND post_status = 'inherit'" );
1120
+ }
1121
+
1122
+ $posts_per_view = array( 'attached' => MLA_Polylang::$list_table_parameters['total_items'] );
1123
+
1124
+ $view_singular = array (
1125
+ 'attached' => __( 'Attached', 'media-library-assistant' ),
1126
+ );
1127
+ $view_plural = array (
1128
+ 'attached' => __( 'Attached', 'media-library-assistant' ),
1129
+ );
1130
+ }
1131
+
1132
+ /*
1133
+ * Make sure the slug is in our list and has posts
1134
+ */
1135
+ if ( array_key_exists( $view_slug, $posts_per_view ) ) {
1136
+ $post_count = $posts_per_view[ $view_slug ];
1137
+ $singular = sprintf('%s <span class="count">(%%s)</span>', $view_singular[ $view_slug ] );
1138
+ $plural = sprintf('%s <span class="count">(%%s)</span>', $view_plural[ $view_slug ] );
1139
+ $nooped_plural = _n_noop( $singular, $plural, 'media-library-assistant' );
1140
+ } else {
1141
+ return false;
1142
+ }
1143
+
1144
+ if ( $post_count ) {
1145
+ $query = array( 'pll_view' => $view_slug );
1146
+ $base_url = 'upload.php?page=mla-menu';
1147
+ $class = ( $view_slug == $current_view ) ? ' class="current"' : '';
1148
+
1149
+ return "<a href='" . add_query_arg( $query, $base_url ) . "'$class>" . sprintf( translate_nooped_plural( $nooped_plural, $post_count, 'media-library-assistant' ), number_format_i18n( $post_count ) ) . '</a>';
1150
+ }
1151
+
1152
+ return false;
1153
+ }
1154
+
1155
+ /**
1156
+ * Views for media page MLA Menu
1157
+ *
1158
+ * This filter gives you an opportunity to filter the list of available list table views.
1159
+ *
1160
+ * @since 2.11
1161
+ *
1162
+ * @param array $views An array of available list table views.
1163
+ * format: view_slug => link to the view, with count
1164
+ *
1165
+ * @return array updated list table views.
1166
+ */
1167
+ public static function views_media_page_mla_menu( $views ) {
1168
+ if ( isset( $_REQUEST['pll_view'] ) ) {
1169
+ switch( $_REQUEST['pll_view'] ) {
1170
+ case 'attached':
1171
+ $current_view = 'attached';
1172
+ break;
1173
+ default:
1174
+ $current_view = '';
1175
+ } // pll_view
1176
+ } else {
1177
+ $current_view = '';
1178
+ }
1179
+
1180
+ foreach ( $views as $slug => $view ) {
1181
+ // Find/update the current view
1182
+ if ( strpos( $view, ' class="current"' ) ) {
1183
+ if ( ! empty( $current_view ) ) {
1184
+ $views[ $slug ] = str_replace( ' class="current"', '', $view );
1185
+ } else {
1186
+ $current_view = $slug;
1187
+ }
1188
+ }
1189
+ } // each view
1190
+
1191
+ $value = MLA_Polylang::_get_view( 'attached', $current_view );
1192
+ if ( $value ) {
1193
+ //$views['attached'] = $value;
1194
+ }
1195
+
1196
+ return $views;
1197
+ } // views_media_page_mla_menu
1198
+
1199
+ /**
1200
+ * Captures the existing term assignments before the
1201
+ * Media Manager Modal Window ATTACHMENT DETAILS taxonomy meta boxes updates
1202
+ *
1203
+ * @since 2.11
1204
+ *
1205
+ * @param object the current post
1206
+ */
1207
+ public static function mla_media_modal_begin_update_compat_fields( $post ) {
1208
+ $post_id = $post->ID;
1209
+
1210
+ // Accumulate for possible term_assignment or term_synchronization
1211
+ self::_build_existing_terms( $post_id );
1212
+ } // mla_media_modal_begin_update_compat_fields
1213
+
1214
+ /**
1215
+ * Applies Term Assignment to the terms assigned to one
1216
+ * Media Manager Modal Window ATTACHMENT DETAILS taxonomy
1217
+ *
1218
+ * @since 2.11
1219
+ *
1220
+ * @param array assigned term id/name values
1221
+ * @param string taxonomy slug
1222
+ * @param object taxonomy object
1223
+ * @param integer current post ID
1224
+ */
1225
+ public static function mla_media_modal_update_compat_fields_terms( $terms, $key, $value, $post_id ) {
1226
+ // Accumulate for possible term_assignment or term_synchronization
1227
+ if ( $value->hierarchical ) {
1228
+ $tax_inputs = array( $key => $terms );
1229
+ } else {
1230
+ $tax_inputs = array( $key => implode( ',', $terms ) );
1231
+ }
1232
+
1233
+ if ( 'checked' == MLAOptions::mla_get_option( 'term_assignment', false, false, MLA_Polylang::$mla_language_option_definitions ) ) {
1234
+ self::_build_tax_input( $post_id, $tax_inputs );
1235
+ $tax_inputs = self::_apply_tax_input( $post_id );
1236
+
1237
+ if ( $value->hierarchical ) {
1238
+ $terms = $tax_inputs[ $key ];
1239
+ } else {
1240
+ $terms = explode( ',', $tax_inputs[ $key ] );
1241
+ }
1242
+ } // term_assignment
1243
+
1244
+ return $terms;
1245
+ } // mla_media_modal_update_compat_fields_terms
1246
+
1247
+ /**
1248
+ * Applies Term Synchronization after the
1249
+ * Media Manager Modal Window taxonomy updates
1250
+ *
1251
+ * @since 2.11
1252
+ *
1253
+ * @param string HTML markup for the taxonomy meta box elements
1254
+ * @param array supported taxonomy objects
1255
+ * @param object current post object
1256
+ */
1257
+ public static function mla_media_modal_end_update_compat_fields( $results, $taxonomies, $post ) {
1258
+ /*
1259
+ * Synchronize the changes to all other translations
1260
+ */
1261
+ if ( 'checked' == MLAOptions::mla_get_option( 'term_synchronization', false, false, MLA_Polylang::$mla_language_option_definitions ) ) {
1262
+
1263
+ /*
1264
+ * Update terms because they have changed
1265
+ */
1266
+ $post_id = $post->ID;
1267
+ $terms_before = self::_update_existing_terms( $post_id );
1268
+
1269
+ // $tax_input is a convenient source of language codes; ignore $tax_inputs
1270
+ foreach( self::$tax_input as $language => $tax_inputs ) {
1271
+ /*
1272
+ * Skip 'tax_input_post_id' and the language we've already updated
1273
+ */
1274
+ if ( ( ! isset( self::$existing_terms[ $language ] ) ) || ( self::$existing_terms[ 'slug' ] == $language ) ) {
1275
+ continue;
1276
+ }
1277
+
1278
+ $tax_inputs = self::_apply_synch_input( $language, $terms_before );
1279
+ if ( ! empty( $tax_inputs ) ) {
1280
+ MLAData::mla_update_single_item( self::$existing_terms[ $language ]['element_id'], array(), $tax_inputs );
1281
+ }
1282
+ } // translation
1283
+ } // do synchronization
1284
+
1285
+ return $results;
1286
+ } // mla_media_modal_end_update_compat_fields
1287
+
1288
+ /**
1289
+ * Captures the Quick Edit "before update" term assignments and
1290
+ * process the Language dropdown selection, if changed
1291
+ *
1292
+ * @since 2.11
1293
+ *
1294
+ * @param array $item_content NULL, to indicate no handler.
1295
+ * @param integer $post_id the affected attachment.
1296
+ *
1297
+ * @return object updated $item_content. NULL if no handler, otherwise
1298
+ * ( 'message' => error or status message(s), 'body' => '',
1299
+ * 'prevent_default' => true to bypass the MLA handler )
1300
+ */
1301
+ public static function mla_list_table_inline_action( $item_content, $post_id ) {
1302
+ global $polylang;
1303
+
1304
+ self::_build_existing_terms( $post_id );
1305
+
1306
+ // Language dropdown in Quick Edit area
1307
+ if ( isset( $_REQUEST['inline_lang_choice'] ) ) {
1308
+ $translations = $polylang->model->get_translations( 'post', $post_id );
1309
+
1310
+ if ( ! array_key_exists( $_REQUEST['inline_lang_choice'], $translations ) ) {
1311
+ $post = get_post( $post_id );
1312
+ // save_post() does a check_admin_referer() security test
1313
+ $_REQUEST['_inline_edit'] = wp_create_nonce( 'inlineeditnonce' );
1314
+ $polylang->filters_post->save_post( $post_id, $post, true );
1315
+
1316
+ // Record new language for Term Assignment and Synchronization
1317
+ if ( ( ! empty( $_REQUEST['tax_input'] ) ) && ( 'checked' == MLAOptions::mla_get_option( 'term_assignment', false, false, MLA_Polylang::$mla_language_option_definitions ) ) ) {
1318
+ // Discard the old translation, which is gone
1319
+ unset( self::$existing_terms[ self::$existing_terms['slug'] ] );
1320
+ self::$existing_terms['slug'] = $_REQUEST['inline_lang_choice'];
1321
+ }
1322
+
1323
+ } // change language
1324
+ }
1325
+
1326
+ return $item_content;
1327
+ } // mla_list_table_inline_action
1328
+
1329
+ /**
1330
+ * Captures the Bulk Edit parameters during "Upload New Media"
1331
+ *
1332
+ * @since 2.11
1333
+ *
1334
+ * @param array $request bulk action request parameters, including ['mla_bulk_action_do_cleanup'].
1335
+ * @param string $bulk_action the requested action.
1336
+ * @param array $custom_field_map [ slug => field_name ]
1337
+ *
1338
+ * @return array updated bulk action request parameters
1339
+ */
1340
+ public static function mla_list_table_bulk_action_initial_request( $request, $bulk_action, $custom_field_map ) {
1341
+ /*
1342
+ * Check for Bulk Edit processing during Upload New Media
1343
+ */
1344
+ if ( ( NULL == self::$upload_bulk_edit_args ) && ( 'edit' == $bulk_action ) && ! empty( $_REQUEST['mlaAddNewBulkEdit']['formString'] ) ) {
1345
+ /*
1346
+ * Suppress WPML processing in wpml-media.class.php function save_attachment_actions,
1347
+ * which wipes out attachment meta data.
1348
+ */
1349
+ //global $action;
1350
+ //$action = 'upload-plugin';
1351
+
1352
+ self::$upload_bulk_edit_args = $request;
1353
+ self::$upload_bulk_edit_map = $custom_field_map;
1354
+ }
1355
+
1356
+ return $request;
1357
+ } // mla_list_table_bulk_action_initial_request
1358
+
1359
+ /**
1360
+ * Custom Field Map during "Upload New Media"
1361
+ *
1362
+ * @since 2.11
1363
+ *
1364
+ * @var array [ id ] => field name
1365
+ */
1366
+ private static $upload_bulk_edit_map = NULL;
1367
+
1368
+ /**
1369
+ * Bulk Edit parameters during "Upload New Media"
1370
+ *
1371
+ * @since 2.11
1372
+ *
1373
+ * @var array [ field ] => new value
1374
+ */
1375
+ private static $upload_bulk_edit_args = NULL;
1376
+
1377
+ /**
1378
+ * Converts Bulk Edit taxonomy inputs to language-specific values
1379
+ *
1380
+ * @since 2.11
1381
+ *
1382
+ * @param array $request bulk action request parameters, including ['mla_bulk_action_do_cleanup'].
1383
+ * @param string $bulk_action the requested action.
1384
+ * @param integer $post_id the affected attachment.
1385
+ * @param array $custom_field_map [ slug => field_name ]
1386
+ *
1387
+ * @return array updated bulk action request parameters
1388
+ */
1389
+ public static function mla_list_table_bulk_action_item_request( $request, $bulk_action, $post_id, $custom_field_map ) {
1390
+ if ( 'edit' == $bulk_action && ( ! empty( $request['tax_input'] ) ) && ( 'checked' == MLAOptions::mla_get_option( 'term_assignment', false, false, MLA_Polylang::$mla_language_option_definitions ) ) ) {
1391
+ self::_build_existing_terms( $post_id );
1392
+ self::_build_tax_input( $post_id, $request['tax_input'], $request['tax_action'] );
1393
+ $request['tax_input'] = self::_apply_tax_input( $post_id );
1394
+ }
1395
+
1396
+ return $request;
1397
+ } // mla_list_table_bulk_action_item_request
1398
+
1399
+ /**
1400
+ * Process an MLA_List_Table bulk action
1401
+ *
1402
+ * Sets the new item language from the Language dropdown selection.
1403
+ *
1404
+ * @since 2.11
1405
+ *
1406
+ * @param array $item_content NULL, to indicate no handler.
1407
+ * @param string $bulk_action the requested action.
1408
+ * @param integer $post_id the affected attachment.
1409
+ *
1410
+ * @return object updated $item_content. NULL if no handler, otherwise
1411
+ * ( 'message' => error or status message(s), 'body' => '',
1412
+ * 'prevent_default' => true to bypass the MLA handler )
1413
+ */
1414
+ public static function mla_list_table_bulk_action( $item_content, $bulk_action, $post_id ) {
1415
+ global $polylang;
1416
+
1417
+ // Language dropdown in Bulk Edit area
1418
+ if ( isset( $_POST['inline_lang_choice'] ) ) {
1419
+ $post = get_post( $post_id );
1420
+ // save_post() does a check_admin_referer() security test
1421
+ $_REQUEST['_wpnonce'] = wp_create_nonce( 'bulk-posts' );
1422
+ $_REQUEST['bulk_edit'] = 'Update';
1423
+ $polylang->filters_post->save_post( $post_id, $post, true );
1424
+
1425
+ if ( $_REQUEST['inline_lang_choice'] != -1 ) {
1426
+ $item_content = array( 'message' => "Item {$post_id}, language updated." );
1427
+ }
1428
+ }
1429
+
1430
+ return $item_content;
1431
+ } // mla_list_table_bulk_action
1432
+
1433
+ /**
1434
+ * Items returned by custom bulk action(s)
1435
+ *
1436
+ * @since 2.11
1437
+ *
1438
+ * @var array
1439
+ */
1440
+ private static $bulk_action_includes = array();
1441
+
1442
+ /**
1443
+ * Process an MLA_List_Table custom bulk action
1444
+ *
1445
+ * Creates new items from the "Bulk Translate" list.
1446
+ *
1447
+ * @since 2.11
1448
+ *
1449
+ * @param array $item_content NULL, to indicate no handler.
1450
+ * @param string $bulk_action the requested action.
1451
+ * @param integer $post_id the affected attachment.
1452
+ *
1453
+ * @return object updated $item_content. NULL if no handler, otherwise
1454
+ * ( 'message' => error or status message(s), 'body' => '' )
1455
+ */
1456
+ public static function mla_list_table_custom_bulk_action( $item_content, $bulk_action, $post_id ) {
1457
+ global $polylang;
1458
+
1459
+ if ( 'pll-translate' == $bulk_action ) {
1460
+ $translations = array();
1461
+ if ( isset( $_REQUEST['bulk_tr_languages'] ) ) {
1462
+ $bulk_tr_languages = $_REQUEST['bulk_tr_languages'];
1463
+
1464
+ // Expand All Languages selection
1465
+ if ( isset( $bulk_tr_languages['all'] ) ) {
1466
+ foreach ($polylang->model->get_languages_list() as $language) {
1467
+ $bulk_tr_languages[ $language->slug ] = 'translate';
1468
+ }
1469
+
1470
+ unset( $bulk_tr_languages['all'] );
1471
+ }
1472
+
1473
+ // Process language selection(s)
1474
+ foreach( $bulk_tr_languages as $language => $action ) {
1475
+ $new_id = MLA_Polylang::_get_translation( $post_id, $language );
1476
+ $translations[] = $new_id;
1477
+ }
1478
+ }
1479
+
1480
+ // Clear all the "Filter-by" parameters
1481
+ if ( isset( $_REQUEST['bulk_tr_options']['clear_filters'] ) ) {
1482
+ unset( $_REQUEST['heading_suffix'] );
1483
+ unset( $_REQUEST['parent'] );
1484
+ unset( $_REQUEST['author'] );
1485
+ unset( $_REQUEST['mla-tax'] );
1486
+ unset( $_REQUEST['mla-term'] );
1487
+ unset( $_REQUEST['mla-metakey'] );
1488
+ unset( $_REQUEST['mla-metavalue'] );
1489
+ }
1490
+
1491
+ if ( empty( $translations ) ) {
1492
+ $item_content = array( 'message' => "Item {$post_id}, no translations." );
1493
+ } else {
1494
+ $_REQUEST['heading_suffix'] = __( 'Bulk Translations', 'media-library-assistant' );
1495
+ MLA_Polylang::$bulk_action_includes = array_merge( MLA_Polylang::$bulk_action_includes, $translations );
1496
+ $translations = implode( ',', $translations );
1497
+ $item_content = array( 'message' => "Item {$post_id}, translation(s): {$translations}." );
1498
+ }
1499
+ }
1500
+
1501
+ return $item_content;
1502
+ } // mla_list_table_custom_bulk_action
1503
+
1504
+ /**
1505
+ * Filter the MLA_List_Table bulk actions
1506
+ *
1507
+ * Adds the "Translate" action to the Bulk Actions list.
1508
+ *
1509
+ * @since 2.11
1510
+ *
1511
+ * @param array $actions An array of bulk actions.
1512
+ * Format: 'slug' => 'Label'
1513
+ *
1514
+ * @return array updated array of actions.
1515
+ */
1516
+ public static function mla_list_table_get_bulk_actions( $actions ) {
1517
+ if ( 'checked' == MLAOptions::mla_get_option( 'bulk_translate', false, false, MLA_Polylang::$mla_language_option_definitions ) ) {
1518
+ $actions['pll-translate'] = __( 'Translate', 'media-library-assistant' );
1519
+ }
1520
+ return $actions;
1521
+ } // mla_list_table_get_bulk_actions
1522
+
1523
+ /**
1524
+ * MLA_List_Table inline edit item values
1525
+ *
1526
+ * Builds the Language dropdown and edit ttranslation links
1527
+ * for the Quick and Bulk Edit forms.
1528
+ *
1529
+ * @since 2.11
1530
+ *
1531
+ * @param array $item_values parameter_name => parameter_value pairs
1532
+ *
1533
+ * @return array updated substitution parameter name => value pairs
1534
+ */
1535
+ public static function mla_list_table_inline_values( $item_values ) {
1536
+ global $polylang;
1537
+
1538
+ // Find the first "language" column slug
1539
+ foreach ( $polylang->filters_columns->model->get_languages_list() as $language) {
1540
+ if ( empty($polylang->filters_columns->curlang) || $language->slug != $polylang->filters_columns->curlang->slug) {
1541
+ $language_column = 'language_'.$language->slug;
1542
+ break;
1543
+ }
1544
+ }
1545
+
1546
+ // do_action is required because the Polylang function uses "current_filter()" to compose its output
1547
+ ob_start();
1548
+ do_action( 'quick_edit_custom_box', $language_column, 'attachment' );
1549
+ $value = ob_get_clean();
1550
+
1551
+ // Strip off <fieldset> and <div> tags around the <input> and <label> tags
1552
+ preg_match('/\<input|\<label/', $value, $match_start, PREG_OFFSET_CAPTURE );
1553
+ preg_match('/\<\/label[^\>]*\>/', $value, $match_end, PREG_OFFSET_CAPTURE );
1554
+ $item_values['custom_fields'] .= substr( $value, $match_start[0][1], ( $match_end[0][1] + strlen( $match_end[0][0] ) ) - $match_start[0][1] );
1555
+
1556
+ // Add the Translate links to the Quick Edit values
1557
+ if ( array_key_exists( 'Quick Edit', $item_values ) ) {
1558
+ $actions = "<input name=\"inline_translations\" type=\"hidden\" value=\"\">\n";
1559
+ $actions .= "<input name=\"pll_quick_language\" type=\"hidden\" value=\"\">\n";
1560
+ $actions .= "<input name=\"pll_quick_id\" type=\"hidden\" value=\"\">\n";
1561
+ $actions .= "<label class=\"alignleft\" style=\"clear: both;\">\n<span class=\"title\">Translate</span>\n";
1562
+ $actions .= "<table class=\"pll-media-action-table\">\n";
1563
+ foreach ($polylang->model->get_languages_list() as $language) {
1564
+ $actions .= '<tr class = "pll-media-action-row-' . $language->slug . "\">\n";
1565
+ $actions .= '<td class = "pll-media-language-column"><span class = "pll-translation-flag">'. $language->flag . '</span>' . esc_html( $language->name ) . "</td>\n";
1566
+ $actions .= '<td class = "pll-media-action-column pll-media-action-column-' . $language->slug . '">';
1567
+ $actions .= sprintf( '<input type="hidden" name="media_tr_lang[%s]" value="" /><a href="#pll-quick-translate-edit" title="" class=""></a>', esc_attr($language->slug) );
1568
+ $actions .= "</td>\n";
1569
+ $actions .= "</tr>\n";
1570
+ }
1571
+ $actions .= "</table>\n</label>\n";
1572
+ $actions .= "<div class=\"pll-quick-translate-save\"><span class=\"spinner\" style=\"float: left;\"></span></div>\n";
1573
+ $item_values['custom_fields'] .= $actions;
1574
+ }
1575
+
1576
+ ob_start();
1577
+ do_action( 'bulk_edit_custom_box', $language_column, 'attachment' );
1578
+ $value = ob_get_clean();
1579
+
1580
+ // Strip off <fieldset> and <div> tags around the <input> and <label> tags
1581
+ preg_match('/\<input|\<label/', $value, $match_start, PREG_OFFSET_CAPTURE );
1582
+ preg_match('/\<\/label[^\>]*\>/', $value, $match_end, PREG_OFFSET_CAPTURE );
1583
+ $item_values['bulk_custom_fields'] .= substr( $value, $match_start[0][1], ( $match_end[0][1] + strlen( $match_end[0][0] ) ) - $match_start[0][1] );
1584
+
1585
+ return $item_values;
1586
+ } // mla_list_table_inline_values
1587
+
1588
+ /**
1589
+ * MLA_List_Table inline edit parse
1590
+ *
1591
+ * @since 2.11
1592
+ *
1593
+ * Adds Bulk Translate form and the Language dropdown
1594
+ * markup used for the Quick and Bulk Edit forms.
1595
+ *
1596
+ * @param string HTML markup returned by the template parser
1597
+ * @param string template used to generate the HTML markup
1598
+ * @param array parameter_name => parameter_value pairs
1599
+ *
1600
+ * @return array updated HTML markup for the Quick and Bulk Edit forms
1601
+ */
1602
+ public static function mla_list_table_inline_parse( $html_markup, $item_template, $item_values ) {
1603
+ global $polylang, $post_ID;
1604
+
1605
+ /*
1606
+ * Add the Quick and Bulk Translate Markup
1607
+ */
1608
+ $page_template_array = MLAData::mla_load_template( 'mla-polylang-support.tpl' );
1609
+ if ( ! is_array( $page_template_array ) ) {
1610
+ error_log( 'ERROR: mla-polylang-support.tpl path = ' . var_export( plugin_dir_path( __FILE__ ) . 'mla-polylang-support.tpl', true ), 0 );
1611
+ error_log( 'ERROR: mla-polylang-support.tpl non-array result = ' . var_export( $page_template_array, true ), 0 );
1612
+ return $html_markup;
1613
+ }
1614
+
1615
+ $language_dropdowns = MLA_Polylang::mla_list_table_inline_values( array( 'custom_fields' => '', 'bulk_custom_fields' => '' ) );
1616
+
1617
+ $quick_actions = "<table class=\"pll-media-action-table\">\n";
1618
+ $bulk_actions = "<table class=\"pll-media-action-table\">\n";
1619
+ foreach ($polylang->model->get_languages_list() as $language) {
1620
+ $page_values = array(
1621
+ 'language_slug' => $language->slug,
1622
+ 'language_flag' => $language->flag,
1623
+ 'language_name' => $language->name,
1624
+ );
1625
+ $quick_actions .= MLAData::mla_parse_template( $page_template_array['quick_action'], $page_values );
1626
+ $bulk_actions .= MLAData::mla_parse_template( $page_template_array['bulk_action'], $page_values );
1627
+ }
1628
+
1629
+ $quick_actions .= "</table>\n";
1630
+
1631
+ $page_values = array(
1632
+ 'language_slug' => 'all',
1633
+ 'language_flag' => '&nbsp;',
1634
+ 'language_name' => __( 'All Languages', 'media-library-assistant' ),
1635
+ );
1636
+ $bulk_actions .= MLAData::mla_parse_template( $page_template_array['bulk_action'], $page_values );
1637
+ $bulk_actions .= "</table>\n";
1638
+
1639
+ $page_values = array(
1640
+ 'colspan' => $item_values['colspan'],
1641
+ 'Quick Translate' => __( 'Quick Translate', 'media-library-assistant' ),
1642
+ 'quick_translate_actions' => $quick_actions,
1643
+ 'quick_translate_language' => $language_dropdowns['custom_fields'],
1644
+ 'Cancel' => __( 'Cancel', 'media-library-assistant' ),
1645
+ 'Update' => __( 'Set Language', 'media-library-assistant' ),
1646
+ 'Bulk Translate' => __( 'Bulk Translate', 'media-library-assistant' ),
1647
+ 'Add or Modify' => __( 'Add or Modify Translation', 'media-library-assistant' ),
1648
+ 'Language' => __( 'Language', 'media-library-assistant' ),
1649
+ 'bulk_translate_actions' => $bulk_actions,
1650
+ 'Options' => __( 'Options', 'media-library-assistant' ),
1651
+ 'Clear Filter-by' => __( 'Clear Filter-by', 'media-library-assistant' ),
1652
+ );
1653
+ $parse_value = MLAData::mla_parse_template( $page_template_array['page'], $page_values );
1654
+
1655
+ return $html_markup . "\n" . $parse_value;
1656
+ } // mla_list_table_inline_parse
1657
+
1658
+ /**
1659
+ * Table language column definitions
1660
+ *
1661
+ * @since 2.11
1662
+ *
1663
+ * @var array
1664
+ */
1665
+ protected static $language_columns = NULL;
1666
+
1667
+ /**
1668
+ * Filter the MLA_List_Table columns
1669
+ *
1670
+ * Inserts the language columns just after the item thumbnail column
1671
+ *
1672
+ * @since 2.11
1673
+ *
1674
+ * @param array $columns An array of columns.
1675
+ * format: column_slug => Column Label
1676
+ *
1677
+ * @return array updated array of columns.
1678
+ */
1679
+ public static function mla_list_table_get_columns( $columns ) {
1680
+ if ( is_null( MLA_Polylang::$language_columns ) ) {
1681
+ global $polylang;
1682
+
1683
+ $show_language = 'checked' == MLAOptions::mla_get_option( 'language_column', false, false, MLA_Polylang::$mla_language_option_definitions );
1684
+ $show_translations = 'checked' == MLAOptions::mla_get_option( 'translations_column', false, false, MLA_Polylang::$mla_language_option_definitions );
1685
+
1686
+ MLA_Polylang::$language_columns = array();
1687
+
1688
+ if ( $show_language && empty( $polylang->curlang ) ) {
1689
+ MLA_Polylang::$language_columns[ 'language' ] = __( 'Language', 'media-library-assistant' );
1690
+ }
1691
+
1692
+ if ( $show_translations ) {
1693
+ $flags_column = $polylang->filters_columns->add_post_column( array() );
1694
+ if ( is_array($flags_column ) ) {
1695
+ $flags_column = implode( '', $flags_column );
1696
+ MLA_Polylang::$language_columns['pll_translations'] = $flags_column;
1697
+ }
1698
+ }
1699
+ }
1700
+
1701
+ if ( ! empty( MLA_Polylang::$language_columns ) ) {
1702
+ $end = array_slice( $columns, 2) ;
1703
+ $columns = array_slice( $columns, 0, 2 );
1704
+ $columns = array_merge( $columns, MLA_Polylang::$language_columns, $end );
1705
+ }
1706
+
1707
+ return $columns;
1708
+ } // mla_list_table_get_columns_filter
1709
+
1710
+ /**
1711
+ * Add styles for the pll_translations table column
1712
+ *
1713
+ * @since 2.11
1714
+ *
1715
+ * @return void echoes CSS styles before returning
1716
+ */
1717
+ public static function mla_list_table_add_pll_styles() {
1718
+ global $polylang;
1719
+
1720
+ $current_language = $polylang->curlang;
1721
+ $languages = count( $polylang->model->get_languages_list() );
1722
+ $view_status = isset( $_REQUEST['status'] ) ? $_REQUEST['status'] : '';
1723
+
1724
+ if ( 1 < $languages && $view_status != 'trash' ) {
1725
+ $w = 22 * ( empty( $current_language ) ? $languages : $languages - 1 );
1726
+ echo '<style type="text/css">.column-pll_translations{width:' . $w . 'px;}.column-pll_translations img{margin:2px;}</style>';
1727
+ }
1728
+ }
1729
+
1730
+ /**
1731
+ * Supply a column value if no column-specific function has been defined
1732
+ *
1733
+ * Fills in the Language columns with the item's translation status values.
1734
+ *
1735
+ * @since 2.11
1736
+ *
1737
+ * @param string NULL, indicating no default content
1738
+ * @param array A singular item (one full row's worth of data)
1739
+ * @param array The name/slug of the column to be processed
1740
+ * @return string Text or HTML to be placed inside the column
1741
+ */
1742
+ public static function mla_list_table_column_default( $content, $item, $column_name ) {
1743
+ global $polylang;
1744
+ static $languages = NULL, $current_language;
1745
+
1746
+ if ( 'language' == $column_name ) {
1747
+ $item_language = $polylang->model->get_post_language( $item->ID );
1748
+ $content = $item_language->name;
1749
+ } elseif ('pll_translations' == $column_name ) {
1750
+ if ( is_null( $languages ) ) {
1751
+ $current_language = $polylang->curlang;
1752
+ $languages = $polylang->model->get_languages_list();
1753
+ }
1754
+
1755
+ $content = '';
1756
+ foreach ($polylang->model->get_languages_list() as $language) {
1757
+ // don't add the column for the filtered language
1758
+ if ( empty($current_language) || $language->slug != $current_language->slug ) {
1759
+ // Polylang post_column() function applies this test for 'inline-save' before updating "language"
1760
+ $inline = defined('DOING_AJAX') && isset($_POST['inline_lang_choice']) && in_array( $_REQUEST['action'], array( MLA_Polylang::MLA_PLL_QUICK_TRANSLATE, MLA::JAVASCRIPT_INLINE_EDIT_SLUG ) );
1761
+
1762
+ if ( $inline ) {
1763
+ $save_action = $_REQUEST['action'];
1764
+ $_REQUEST['action'] = 'inline-save';
1765
+ }
1766
+
1767
+ // post_column echoes the content and returns NULL
1768
+ ob_start();
1769
+ $polylang->filters_columns->post_column( 'language_' . $language->slug, $item->ID );
1770
+ $content .= ob_get_clean();
1771
+
1772
+ if ( $inline ) {
1773
+ $_REQUEST['action'] = $save_action;
1774
+ }
1775
+ } // include language
1776
+ } // each language
1777
+ }
1778
+
1779
+ return $content;
1780
+ } // mla_list_table_column_default_filter
1781
+
1782
+ /**
1783
+ * Data selection parameters for custom views
1784
+ *
1785
+ * @since 2.11
1786
+ *
1787
+ * @var array
1788
+ */
1789
+ private static $list_table_parameters = array(
1790
+ 'total_items' => NULL,
1791
+ 'per_page' => NULL,
1792
+ 'current_page' => NULL,
1793
+ );
1794
+
1795
+ /**
1796
+ * Filter the "sticky" submenu URL parameters
1797
+ *
1798
+ * Maintains the pll_view and list of Bulk Translate items in the URLs for paging through the results.
1799
+ *
1800
+ * @since 2.11
1801
+ *
1802
+ * @param array $submenu_arguments Current view, pagination and sort parameters.
1803
+ * @param object $include_filters True to include "filter-by" parameters, e.g., year/month dropdown.
1804
+ *
1805
+ * @return array updated submenu_arguments.
1806
+ */
1807
+ public static function mla_list_table_submenu_arguments( $submenu_arguments, $include_filters ) {
1808
+ if ( isset( $_REQUEST['pll_view'] ) ) {
1809
+ $submenu_arguments['pll_view'] = $_REQUEST['pll_view'];
1810
+ }
1811
+
1812
+ if ( $include_filters && ( ! empty( MLA_Polylang::$bulk_action_includes ) ) ) {
1813
+ $submenu_arguments['ids'] = implode( ',', MLA_Polylang::$bulk_action_includes );
1814
+ $submenu_arguments['heading_suffix'] = __( 'Bulk Translations', 'media-library-assistant' );
1815
+ }
1816
+
1817
+ return $submenu_arguments;
1818
+ } // mla_list_table_submenu_arguments
1819
+
1820
+ /**
1821
+ * Filter the pagination parameters for prepare_items()
1822
+ *
1823
+ * Records the pagination parameters for use with custom table views, e.g., "attached".
1824
+ *
1825
+ * @since 2.11
1826
+ *
1827
+ * @param array $pagination Contains 'per_page', 'current_page'.
1828
+ * @param object $mla_list_table The MLA_List_Table object, passed by reference.
1829
+ *
1830
+ * @return array updated pagination array.
1831
+ */
1832
+ public static function mla_list_table_prepare_items_pagination( $pagination, $mla_list_table ) {
1833
+ MLA_Polylang::$list_table_parameters = array_merge( MLA_Polylang::$list_table_parameters, $pagination );
1834
+
1835
+ return $pagination;
1836
+ } // mla_list_table_prepare_items_pagination_filter
1837
+
1838
+ /**
1839
+ * Filter the total items count for prepare_items()
1840
+ *
1841
+ * A convenient place to add the query argument required for the "attached" custom view.
1842
+ *
1843
+ * @since 2.11
1844
+ *
1845
+ * @param integer $total_items NULL, indicating no substitution.
1846
+ * @param object $mla_list_table The MLA_List_Table object, passed by reference.
1847
+ *
1848
+ * @return integer updated total_items.
1849
+ */
1850
+ public static function mla_list_table_prepare_items_total_items( $total_items, $mla_list_table ) {
1851
+ global $wpdb;
1852
+
1853
+ if ( isset( $_REQUEST['pll-bulk-translate'] ) ) {
1854
+ $_REQUEST['ids'] = MLA_Polylang::$bulk_action_includes;
1855
+ }
1856
+
1857
+ if ( isset( $_REQUEST['pll_view'] ) ) {
1858
+ switch( $_REQUEST['pll_view'] ) {
1859
+ case 'attached':
1860
+ $_REQUEST['detached'] = '0';
1861
+ break;
1862
+ default:
1863
+ } // pll_view
1864
+ }
1865
+
1866
+ return $total_items;
1867
+ } // mla_list_table_prepare_items_total_items_filter
1868
+
1869
+ /**
1870
+ * Filter the list of item "Rollover" actions
1871
+ *
1872
+ * Adds "Quick Translate" to the list of item-level "Rollover" actions.
1873
+ *
1874
+ * @since 2.11
1875
+ *
1876
+ * @param array $actions The list of item "Rollover" actions.
1877
+ * @param object $item The current Media Library item.
1878
+ * @param string $column The List Table column slug.
1879
+ *
1880
+ * @return array updated "Rollover" actions.
1881
+ */
1882
+ public static function mla_list_table_build_rollover_actions( $actions, $item, $column ) {
1883
+ if ( 'checked' == MLAOptions::mla_get_option( 'quick_translate', false, false, MLA_Polylang::$mla_language_option_definitions ) ) {
1884
+ /*
1885
+ * Add the Quick Translate action
1886
+ */
1887
+ $actions['translate hide-if-no-js'] = '<a class="inlineTranslate" href="#" title="' . __( 'Translate this item inline', 'media-library-assistant' ) . '">' . __( 'Quick Translate', 'media-library-assistant' ) . '</a>';
1888
+ }
1889
+
1890
+ return $actions;
1891
+ } // mla_list_table_build_rollover_actions_filter
1892
+
1893
+ /**
1894
+ * Define the fields for inline (Quick) editing
1895
+ *
1896
+ * Adds Language dropdown and Quick Translate links.
1897
+ *
1898
+ * @since 2.11
1899
+ *
1900
+ * @param array $fields The field names for inline data.
1901
+ *
1902
+ * @return string updated fields for inline data.
1903
+ */
1904
+ public static function mla_list_table_inline_fields( $fields ) {
1905
+ $fields[] = 'old_lang';
1906
+ $fields[] = 'inline_lang_choice';
1907
+ $fields[] = 'inline_translations';
1908
+
1909
+ return $fields;
1910
+ } // mla_list_table_inline_fields
1911
+
1912
+ /**
1913
+ * Filter the data for inline (Quick and Bulk) editing
1914
+ *
1915
+ * Adds item-specific translations data for the JS quick and bulk edit functions.
1916
+ *
1917
+ * @since 2.11
1918
+ *
1919
+ * @param string $inline_data The HTML markup for inline data.
1920
+ * @param object $item The current Media Library item.
1921
+ *
1922
+ * @return string updated HTML markup for inline data.
1923
+ */
1924
+ public static function mla_list_table_build_inline_data( $inline_data, $item ) {
1925
+ global $polylang;
1926
+
1927
+ $item_id = $item->ID;
1928
+ $old_lang = $polylang->model->get_post_language( $item_id );
1929
+ if ( isset( $old_lang->slug ) ) {
1930
+ $old_lang = $old_lang->slug;
1931
+ } else {
1932
+ $old_lang = '';
1933
+ }
1934
+
1935
+ $translations = $polylang->model->get_translations( 'post', $item_id );
1936
+ $translations[ $old_lang ] = $item_id;
1937
+ $translations = json_encode( $translations );
1938
+
1939
+ $inline_data .= "\n\t<div class=\"old_lang\">{$old_lang}</div>";
1940
+ $inline_data .= "\n\t<div class=\"inline_lang_choice\">{$old_lang}</div>";
1941
+ $inline_data .= "\n\t<div class=\"inline_translations\">{$translations}</div>";
1942
+
1943
+ return $inline_data;
1944
+ } // mla_list_table_build_inline_data_filter
1945
+
1946
+ /**
1947
+ * Adds the "Language" tab to the Settings/Media Library Assistant list
1948
+ *
1949
+ * @since 2.11
1950
+ *
1951
+ * @param array|false The entire tablist ( $tab = NULL ), a single tab entry or false if not found/not allowed.
1952
+ * @param array The entire default tablist
1953
+ * @param string|NULL tab slug for single-element return or NULL to return entire tablist
1954
+ *
1955
+ * @return array updated tablist or single tab element
1956
+ */
1957
+ public static function mla_get_options_tablist( $results, $mla_tablist, $tab ) {
1958
+ $language_key = 'language';
1959
+ $language_value = array( 'title' => __( 'Language', 'media-library-assistant' ), 'render' => array( 'MLA_Polylang', 'mla_render_language_tab' ) );
1960
+
1961
+ if ( $language_key == $tab ) {
1962
+ return $language_value;
1963
+ }
1964
+
1965
+ return array_merge( $results, array( $language_key => $language_value ) );
1966
+ }
1967
+
1968
+ /**
1969
+ * $mla_language_option_definitions defines the language-specific database options and
1970
+ * admin page areas for setting/updating them
1971
+ *
1972
+ * The array must be populated at runtime in MLA_Polylang::mla_localize_language_option_definitions(),
1973
+ * because localization calls cannot be placed in the "public static" array definition itself.
1974
+ *
1975
+ * Each option is defined by an array with the elements documented in class-mla-options.php
1976
+ */
1977
+
1978
+ public static $mla_language_option_definitions = array ();
1979
+
1980
+ /**
1981
+ * Localize $mla_language_option_definitions array
1982
+ *
1983
+ * Localization must be done at runtime, and these calls cannot be placed
1984
+ * in the "public static" array definition itself.
1985
+ *
1986
+ * @since 2.11
1987
+ *
1988
+ * @return void
1989
+ */
1990
+ public static function mla_localize_language_option_definitions() {
1991
+ MLA_Polylang::$mla_language_option_definitions = array (
1992
+ 'media_assistant_table_header' =>
1993
+ array('tab' => 'language',
1994
+ 'name' => __( 'Media/Assistant submenu table', 'media-library-assistant' ),
1995
+ 'type' => 'header'),
1996
+
1997
+ 'language_column' =>
1998
+ array('tab' => 'language',
1999
+ 'name' => __( 'Language Column', 'media-library-assistant' ),
2000
+ 'type' => 'checkbox',
2001
+ 'std' => 'checked',
2002
+ 'help' => __( 'Check this option to add a Language column to the Media/Assistant submenu table.', 'media-library-assistant' )),
2003
+
2004
+ 'translations_column' =>
2005
+ array('tab' => 'language',
2006
+ 'name' => __( 'Translations Column', 'media-library-assistant' ),
2007
+ 'type' => 'checkbox',
2008
+ 'std' => 'checked',
2009
+ 'help' => __( 'Check this option to add a Translation Status column to the Media/Assistant submenu table.', 'media-library-assistant' )),
2010
+
2011
+ 'quick_translate' =>
2012
+ array('tab' => 'language',
2013
+ 'name' => __( 'Quick Translate', 'media-library-assistant' ),
2014
+ 'type' => 'checkbox',
2015
+ 'std' => 'unchecked',
2016
+ 'help' => __( 'Check this option to add a Quick Translate rollover action to the Media/Assistant submenu table.', 'media-library-assistant' )),
2017
+
2018
+ 'bulk_translate' =>
2019
+ array('tab' => 'language',
2020
+ 'name' => __( 'Bulk Translate', 'media-library-assistant' ),
2021
+ 'type' => 'checkbox',
2022
+ 'std' => 'checked',
2023
+ 'help' => __( 'Check this option to add "Translate" to the "Bulk Actions" control on the Media/Assistant submenu table.', 'media-library-assistant' )),
2024
+
2025
+ 'term_translation_header' =>
2026
+ array('tab' => 'language',
2027
+ 'name' => __( 'Term Management', 'media-library-assistant' ),
2028
+ 'type' => 'header'),
2029
+
2030
+ 'term_assignment' =>
2031
+ array('tab' => 'language',
2032
+ 'name' => __( 'Term Assignment', 'media-library-assistant' ),
2033
+ 'type' => 'checkbox',
2034
+ 'std' => 'checked',
2035
+ 'help' => __( 'Check this option to assign language-specific terms when items are updated.'), 'media-library-assistant' ),
2036
+
2037
+ 'term_synchronization' =>
2038
+ array('tab' => 'language',
2039
+ 'name' => __( 'Term Synchronization', 'media-library-assistant' ),
2040
+ 'type' => 'checkbox',
2041
+ 'std' => 'checked',
2042
+ 'help' => __( 'Check this option to synchronize common terms among all item translations.'), 'media-library-assistant' ),
2043
+ );
2044
+ }
2045
+
2046
+ /**
2047
+ * Renders the Settings/Media Library Assistant "Language" tab
2048
+ *
2049
+ * @since 2.11
2050
+ *
2051
+ * @return array ( 'message' => '', 'body' => '' )
2052
+ */
2053
+ public static function mla_render_language_tab() {
2054
+ $page_content = array(
2055
+ 'message' => '',
2056
+ 'body' => '<h3>Language</h3>'
2057
+ );
2058
+
2059
+ /*
2060
+ * Check for submit buttons to change or reset settings.
2061
+ * Initialize page messages and content.
2062
+ */
2063
+ if ( !empty( $_REQUEST['mla-language-options-save'] ) ) {
2064
+ check_admin_referer( MLA::MLA_ADMIN_NONCE, '_wpnonce' );
2065
+ $page_content = MLA_Polylang::_save_language_settings( );
2066
+ } elseif ( !empty( $_REQUEST['mla-language-options-reset'] ) ) {
2067
+ check_admin_referer( MLA::MLA_ADMIN_NONCE, '_wpnonce' );
2068
+ $page_content = MLA_Polylang::_reset_language_settings( );
2069
+ } else {
2070
+ $page_content = array(
2071
+ 'message' => '',
2072
+ 'body' => ''
2073
+ );
2074
+ }
2075
+
2076
+ if ( !empty( $page_content['body'] ) ) {
2077
+ return $page_content;
2078
+ }
2079
+
2080
+ $page_values = array(
2081
+ 'Language Options' => __( 'Language Options', 'media-library-assistant' ),
2082
+ /* translators: 1: - 4: page subheader values */
2083
+ 'In this tab' => sprintf( __( 'In this tab you can find a number of options for controlling Polylang-specific operations. Scroll down to find options for %1$s and %2$s. Be sure to click "Save Changes" at the bottom of the tab to save any changes you make.', 'media-library-assistant' ), '<strong>' . __( 'Media/Assistant submenu table', 'media-library-assistant' ) . '</strong>', '<strong>' . __( 'Term Management', 'media-library-assistant' ) . '</strong>' ),
2084
+ /* translators: 1: Documentation hyperlink */
2085
+ 'You can find' => sprintf( __( 'You can find more information about multilingual features in the %1$s section of the Documentation.', 'media-library-assistant' ), '<a href="[+settingsURL+]?page=mla-settings-menu-documentation&amp;mla_tab=documentation#mla_language_tab" title="' . __( 'Language Options documentation', 'media-library-assistant' ) . '">' . __( 'WPML &amp; Polylang Multilingual Support; the MLA Language Tab', 'media-library-assistant' ) . '</a>' ),
2086
+ 'settingsURL' => admin_url('options-general.php'),
2087
+ 'Save Changes' => __( 'Save Changes', 'media-library-assistant' ),
2088
+ 'Delete Language options' => __( 'Delete Language options and restore default settings', 'media-library-assistant' ),
2089
+ '_wpnonce' => wp_nonce_field( MLA::MLA_ADMIN_NONCE, '_wpnonce', true, false ),
2090
+ '_wp_http_referer' => wp_referer_field( false ),
2091
+ 'Go to Top' => __( 'Go to Top', 'media-library-assistant' ),
2092
+ 'form_url' => admin_url( 'options-general.php' ) . '?page=mla-settings-menu-language&mla_tab=language',
2093
+ 'options_list' => '',
2094
+ );
2095
+
2096
+ $options_list = '';
2097
+ foreach ( MLA_Polylang::$mla_language_option_definitions as $key => $value ) {
2098
+ if ( 'language' == $value['tab'] ) {
2099
+ $options_list .= MLASettings::mla_compose_option_row( $key, $value, MLA_Polylang::$mla_language_option_definitions );
2100
+ }
2101
+ }
2102
+
2103
+ $page_values['options_list'] = $options_list;
2104
+ $page_template = MLAData::mla_load_template( 'admin-display-language-tab.tpl' );
2105
+ $page_content['body'] = MLAData::mla_parse_template( $page_template, $page_values );
2106
+ return $page_content;
2107
+ }
2108
+
2109
+ /**
2110
+ * Save Language settings to the options table
2111
+ *
2112
+ * @since 2.11
2113
+ *
2114
+ * @uses $_REQUEST
2115
+ *
2116
+ * @return array Message(s) reflecting the results of the operation
2117
+ */
2118
+ private static function _save_language_settings( ) {
2119
+ $message_list = '';
2120
+
2121
+ foreach ( MLA_Polylang::$mla_language_option_definitions as $key => $value ) {
2122
+ if ( 'language' == $value['tab'] ) {
2123
+ $message_list .= MLASettings::mla_update_option_row( $key, $value, MLA_Polylang::$mla_language_option_definitions );
2124
+ } // language option
2125
+ } // foreach mla_options
2126
+
2127
+ $page_content = array(
2128
+ 'message' => __( 'Language settings saved.', 'media-library-assistant' ) . "\n",
2129
+ 'body' => ''
2130
+ );
2131
+
2132
+ /*
2133
+ * Uncomment this for debugging.
2134
+ */
2135
+ //$page_content['message'] .= $message_list;
2136
+
2137
+ return $page_content;
2138
+ } // _save_language_settings
2139
+
2140
+ /**
2141
+ * Delete saved settings, restoring default values
2142
+ *
2143
+ * @since 2.11
2144
+ *
2145
+ * @return array Message(s) reflecting the results of the operation
2146
+ */
2147
+ private static function _reset_language_settings( ) {
2148
+ $message_list = '';
2149
+
2150
+ foreach ( MLA_Polylang::$mla_language_option_definitions as $key => $value ) {
2151
+ if ( 'language' == $value['tab'] ) {
2152
+ if ( 'custom' == $value['type'] && isset( $value['reset'] ) ) {
2153
+ $message = MLA_Polylang::$value['reset']( 'reset', $key, $value, $_REQUEST );
2154
+ } elseif ( ('header' == $value['type']) || ('hidden' == $value['type']) ) {
2155
+ $message = '';
2156
+ } else {
2157
+ MLAOptions::mla_delete_option( $key, MLA_Polylang::$mla_language_option_definitions );
2158
+ /* translators: 1: option name */
2159
+ $message = '<br>' . sprintf( _x( 'delete_option "%1$s"', 'message_list', 'media-library-assistant'), $key );
2160
+ }
2161
+
2162
+ $message_list .= $message;
2163
+ }
2164
+ }
2165
+
2166
+ $page_content = array(
2167
+ 'message' => __( 'Language settings reset to default values.', 'media-library-assistant' ) . "\n",
2168
+ 'body' => ''
2169
+ );
2170
+
2171
+ /*
2172
+ * Uncomment this for debugging.
2173
+ */
2174
+ //$page_content['message'] .= $message_list;
2175
+
2176
+ return $page_content;
2177
+ } // _reset_language_settings
2178
+ } // Class MLA_Polylang
2179
+
2180
+ /*
2181
+ * Install the filters at an early opportunity
2182
+ */
2183
+ add_action('init', 'MLA_Polylang::initialize');
2184
+ ?>
includes/class-mla-settings.php CHANGED
@@ -338,9 +338,14 @@ class MLASettings {
338
  'ntdeltitle' => __( 'Remove From Bulk Edit', 'media-library-assistant' ),
339
  'notitle' => '(' . __( 'no slug', 'media-library-assistant' ) . ')',
340
  'comma' => _x( ',', 'tag_delimiter', 'media-library-assistant' ),
 
341
  'ajax_nonce' => wp_create_nonce( MLA::MLA_ADMIN_NONCE )
342
  );
343
 
 
 
 
 
344
  $mapping_variables = array(
345
  'page' => 'mla-settings-menu-custom_field',
346
  'mla_tab' => 'custom_field',
@@ -967,31 +972,32 @@ class MLASettings {
967
  *
968
  * @param string HTML id/name attribute and option database key (OMIT MLA_OPTION_PREFIX)
969
  * @param array Option parameters, e.g., 'type', 'std'
 
970
  *
971
  * @return string HTML markup for the option's table row
972
  */
973
- private static function _update_option_row( $key, $value ) {
974
  if ( isset( $_REQUEST[ MLA_OPTION_PREFIX . $key ] ) ) {
975
  $message = '<br>update_option(' . $key . ")\r\n";
976
  switch ( $value['type'] ) {
977
  case 'checkbox':
978
- MLAOptions::mla_update_option( $key, 'checked' );
979
  break;
980
  case 'header':
981
  case 'subheader':
982
  $message = '';
983
  break;
984
  case 'radio':
985
- MLAOptions::mla_update_option( $key, $_REQUEST[ MLA_OPTION_PREFIX . $key ] );
986
  break;
987
  case 'select':
988
- MLAOptions::mla_update_option( $key, $_REQUEST[ MLA_OPTION_PREFIX . $key ] );
989
  break;
990
  case 'text':
991
- MLAOptions::mla_update_option( $key, stripslashes( trim( $_REQUEST[ MLA_OPTION_PREFIX . $key ] ) ) );
992
  break;
993
  case 'textarea':
994
- MLAOptions::mla_update_option( $key, stripslashes( trim( $_REQUEST[ MLA_OPTION_PREFIX . $key ] ) ) );
995
  break;
996
  case 'custom':
997
  $message = MLAOptions::$value['update']( 'update', $key, $value, $_REQUEST );
@@ -1007,23 +1013,24 @@ class MLASettings {
1007
  $message = '<br>delete_option(' . $key . ')';
1008
  switch ( $value['type'] ) {
1009
  case 'checkbox':
1010
- MLAOptions::mla_update_option( $key, 'unchecked' );
 
1011
  break;
1012
  case 'header':
1013
  case 'subheader':
1014
  $message = '';
1015
  break;
1016
  case 'radio':
1017
- MLAOptions::mla_delete_option( $key );
1018
  break;
1019
  case 'select':
1020
- MLAOptions::mla_delete_option( $key );
1021
  break;
1022
  case 'text':
1023
- MLAOptions::mla_delete_option( $key );
1024
  break;
1025
  case 'textarea':
1026
- MLAOptions::mla_delete_option( $key );
1027
  break;
1028
  case 'custom':
1029
  $message = MLAOptions::$value['delete']( 'delete', $key, $value, $_REQUEST );
@@ -1047,10 +1054,11 @@ class MLASettings {
1047
  *
1048
  * @param string HTML id/name attribute and option database key (OMIT MLA_OPTION_PREFIX)
1049
  * @param array Option parameters, e.g., 'type', 'std'
 
1050
  *
1051
  * @return string HTML markup for the option's table row
1052
  */
1053
- private static function _compose_option_row( $key, $value ) {
1054
  switch ( $value['type'] ) {
1055
  case 'checkbox':
1056
  $option_values = array(
@@ -1060,7 +1068,7 @@ class MLASettings {
1060
  'help' => $value['help']
1061
  );
1062
 
1063
- if ( 'checked' == MLAOptions::mla_get_option( $key ) ) {
1064
  $option_values['checked'] = 'checked="checked"';
1065
  }
1066
 
@@ -1084,7 +1092,7 @@ class MLASettings {
1084
  'value' => $value['texts'][$optid]
1085
  );
1086
 
1087
- if ( $option == MLAOptions::mla_get_option( $key ) ) {
1088
  $option_values['checked'] = 'checked="checked"';
1089
  }
1090
 
@@ -1107,7 +1115,7 @@ class MLASettings {
1107
  'text' => $value['texts'][$optid]
1108
  );
1109
 
1110
- if ( $option == MLAOptions::mla_get_option( $key ) ) {
1111
  $option_values['selected'] = 'selected="selected"';
1112
  }
1113
 
@@ -1135,7 +1143,7 @@ class MLASettings {
1135
  $option_values['size'] = $value['size'];
1136
  }
1137
 
1138
- $option_values['text'] = MLAOptions::mla_get_option( $key );
1139
 
1140
  return MLAData::mla_parse_template( self::$page_template_array['text'], $option_values );
1141
  case 'textarea':
@@ -1157,7 +1165,7 @@ class MLASettings {
1157
  $option_values['rows'] = $value['rows'];
1158
  }
1159
 
1160
- $option_values['text'] = stripslashes( MLAOptions::mla_get_option( $key ) );
1161
 
1162
  return MLAData::mla_parse_template( self::$page_template_array['textarea'], $option_values );
1163
  case 'custom':
@@ -1208,7 +1216,7 @@ class MLASettings {
1208
  private static $mla_tablist = array();
1209
 
1210
  /**
1211
- * Localize $mla_option_definitions array
1212
  *
1213
  * Localization must be done at runtime, and these calls cannot be placed
1214
  * in the "public static" array definition itself.
@@ -1219,22 +1227,19 @@ class MLASettings {
1219
  */
1220
  public static function mla_localize_tablist() {
1221
  self::$mla_tablist = array(
1222
- 'general' => array( 'title' => __ ( 'General', 'media-library-assistant' ), 'render' => '_compose_general_tab' ),
1223
- 'view' => array( 'title' => __ ( 'Views', 'media-library-assistant' ), 'render' => '_compose_view_tab' ),
1224
- 'upload' => array( 'title' => __ ( 'Uploads', 'media-library-assistant' ), 'render' => '_compose_upload_tab' ),
1225
- 'mla_gallery' => array( 'title' => __ ( 'MLA Gallery', 'media-library-assistant' ), 'render' => '_compose_mla_gallery_tab' ),
1226
- 'custom_field' => array( 'title' => __ ( 'Custom Fields', 'media-library-assistant' ), 'render' => '_compose_custom_field_tab' ),
1227
- 'iptc_exif' => array( 'title' => 'IPTC/EXIF', 'render' => '_compose_iptc_exif_tab' ),
1228
- 'documentation' => array( 'title' => __ ( 'Documentation', 'media-library-assistant' ), 'render' => '_compose_documentation_tab' ),
1229
- 'debug' => array( 'title' => __ ( 'Debug', 'media-library-assistant' ), 'render' => '_compose_debug_tab' ),
1230
  );
1231
  }
1232
 
1233
  /**
1234
- * Localize $mla_option_definitions array
1235
- *
1236
- * Localization must be done at runtime, and these calls cannot be placed
1237
- * in the "public static" array definition itself.
1238
  *
1239
  * @since 1.82
1240
  *
@@ -1246,15 +1251,19 @@ class MLASettings {
1246
  if ( is_string( $tab ) ) {
1247
  if ( isset( self::$mla_tablist[ $tab ] ) ) {
1248
  $results = self::$mla_tablist[ $tab ];
 
 
 
 
1249
  } else {
1250
- return false;
1251
  }
1252
  } else {
1253
  $results = self::$mla_tablist;
1254
- }
1255
 
1256
- if ( 0 == ( MLA_DEBUG_LEVEL & 1 ) ) {
1257
- unset ( $results['debug'] );
 
1258
  }
1259
 
1260
  return apply_filters( 'mla_get_options_tablist', $results, self::$mla_tablist, $tab );
@@ -1429,7 +1438,7 @@ class MLASettings {
1429
  $options_list = '';
1430
  foreach ( MLAOptions::$mla_option_definitions as $key => $value ) {
1431
  if ( 'general' == $value['tab'] ) {
1432
- $options_list .= self::_compose_option_row( $key, $value );
1433
  }
1434
  }
1435
 
@@ -1678,7 +1687,7 @@ class MLASettings {
1678
  $options_list = '';
1679
  foreach ( MLAOptions::$mla_option_definitions as $key => $value ) {
1680
  if ( 'view' == $value['tab'] ) {
1681
- $options_list .= self::_compose_option_row( $key, $value );
1682
  }
1683
  }
1684
 
@@ -1723,7 +1732,7 @@ class MLASettings {
1723
  $options_list = '';
1724
  foreach ( MLAOptions::$mla_option_definitions as $key => $value ) {
1725
  if ( 'view' == $value['tab'] ) {
1726
- $options_list .= self::_compose_option_row( $key, $value );
1727
  }
1728
  }
1729
 
@@ -2147,7 +2156,7 @@ class MLASettings {
2147
  $options_list = '';
2148
  foreach ( MLAOptions::$mla_option_definitions as $key => $value ) {
2149
  if ( 'upload' == $value['tab'] ) {
2150
- $options_list .= self::_compose_option_row( $key, $value );
2151
  }
2152
  }
2153
 
@@ -2190,7 +2199,7 @@ class MLASettings {
2190
  $options_list = '';
2191
  foreach ( MLAOptions::$mla_option_definitions as $key => $value ) {
2192
  if ( 'upload' == $value['tab'] ) {
2193
- $options_list .= self::_compose_option_row( $key, $value );
2194
  }
2195
  }
2196
 
@@ -2334,7 +2343,7 @@ class MLASettings {
2334
  $options_list = '';
2335
  foreach ( MLAOptions::$mla_option_definitions as $key => $value ) {
2336
  if ( 'mla_gallery' == $value['tab'] ) {
2337
- $options_list .= self::_compose_option_row( $key, $value );
2338
  }
2339
  }
2340
 
@@ -2732,7 +2741,7 @@ class MLASettings {
2732
  $options_list = '';
2733
  foreach ( MLAOptions::$mla_option_definitions as $key => $value ) {
2734
  if ( 'custom_field' == $value['tab'] ) {
2735
- $options_list .= self::_compose_option_row( $key, $value );
2736
  }
2737
  }
2738
 
@@ -2871,7 +2880,7 @@ class MLASettings {
2871
  $options_list = '';
2872
  foreach ( MLAOptions::$mla_option_definitions as $key => $value ) {
2873
  if ( 'iptc_exif' == $value['tab'] ) {
2874
- $options_list .= self::_compose_option_row( $key, $value );
2875
  }
2876
  }
2877
 
@@ -2926,7 +2935,7 @@ class MLASettings {
2926
 
2927
  foreach ( MLAOptions::$mla_option_definitions as $key => $value ) {
2928
  if ( 'debug' == $value['tab'] ) {
2929
- $message_list .= self::_update_option_row( $key, $value );
2930
  } // view option
2931
  } // foreach mla_options
2932
 
@@ -2989,7 +2998,7 @@ class MLASettings {
2989
  $options_list = '';
2990
  foreach ( MLAOptions::$mla_option_definitions as $key => $value ) {
2991
  if ( 'debug' == $value['tab'] ) {
2992
- $options_list .= self::_compose_option_row( $key, $value );
2993
  }
2994
  }
2995
 
@@ -3093,7 +3102,8 @@ class MLASettings {
3093
  if ( $current_tab ) {
3094
  if ( isset( $current_tab['render'] ) ) {
3095
  $handler = $current_tab['render'];
3096
- $page_content = self::$handler( );
 
3097
  } else {
3098
  $page_content = array( 'message' => __( 'ERROR', 'media-library-assistant' ) . ': ' . __( 'Cannot render content tab', 'media-library-assistant' ), 'body' => '' );
3099
  }
@@ -3141,7 +3151,7 @@ class MLASettings {
3141
  $old_value = MLAOptions::mla_get_option( $key );
3142
  if ( $old_value != $_REQUEST[ MLA_OPTION_PREFIX . $key ] ) {
3143
  $settings_changed = true;
3144
- $message_list .= self::_update_option_row( $key, $value );
3145
  }
3146
  } elseif ( 'text' == $value['type'] ) {
3147
  if ( '' == $_REQUEST[ MLA_OPTION_PREFIX . $key ] ) {
@@ -3151,7 +3161,7 @@ class MLASettings {
3151
  $old_value = MLAOptions::mla_get_option( $key );
3152
  if ( $old_value != $_REQUEST[ MLA_OPTION_PREFIX . $key ] ) {
3153
  $settings_changed = true;
3154
- $message_list .= self::_update_option_row( $key, $value );
3155
  }
3156
  } elseif ( 'checkbox' == $value['type'] ) {
3157
  $old_value = MLAOptions::mla_get_option( $key );
@@ -3163,7 +3173,7 @@ class MLASettings {
3163
 
3164
  if ( $checkbox_changed ) {
3165
  $settings_changed = true;
3166
- $message_list .= self::_update_option_row( $key, $value );
3167
  }
3168
  }
3169
  } // mla_gallery option
@@ -3410,7 +3420,7 @@ class MLASettings {
3410
 
3411
  foreach ( MLAOptions::$mla_option_definitions as $key => $value ) {
3412
  if ( 'view' == $value['tab'] ) {
3413
- $message_list .= self::_update_option_row( $key, $value );
3414
  } // view option
3415
  } // foreach mla_options
3416
 
@@ -3444,7 +3454,7 @@ class MLASettings {
3444
 
3445
  foreach ( MLAOptions::$mla_option_definitions as $key => $value ) {
3446
  if ( 'upload' == $value['tab'] ) {
3447
- $message_list .= self::_update_option_row( $key, $value );
3448
  } // upload option
3449
  } // foreach mla_options
3450
 
@@ -3584,7 +3594,7 @@ class MLASettings {
3584
  */
3585
  foreach ( MLAOptions::$mla_option_definitions as $key => $value ) {
3586
  if ( 'custom_field' == $value['tab'] ) {
3587
- $option_messages .= self::_update_option_row( $key, $value );
3588
  }
3589
  }
3590
 
@@ -3867,7 +3877,7 @@ class MLASettings {
3867
  */
3868
  foreach ( MLAOptions::$mla_option_definitions as $key => $value ) {
3869
  if ( 'iptc_exif' == $value['tab'] ) {
3870
- $option_messages .= self::_update_option_row( $key, $value );
3871
  }
3872
  }
3873
 
@@ -3962,7 +3972,7 @@ class MLASettings {
3962
  // ignore everything else
3963
  } // switch
3964
 
3965
- $message_list .= self::_update_option_row( $key, $value );
3966
  } // general option
3967
  } // foreach mla_options
3968
 
338
  'ntdeltitle' => __( 'Remove From Bulk Edit', 'media-library-assistant' ),
339
  'notitle' => '(' . __( 'no slug', 'media-library-assistant' ) . ')',
340
  'comma' => _x( ',', 'tag_delimiter', 'media-library-assistant' ),
341
+ 'useSpinnerClass' => false,
342
  'ajax_nonce' => wp_create_nonce( MLA::MLA_ADMIN_NONCE )
343
  );
344
 
345
+ if ( version_compare( get_bloginfo( 'version' ), '4.2', '>=' ) ) {
346
+ $script_variables['useSpinnerClass'] = true;
347
+ }
348
+
349
  $mapping_variables = array(
350
  'page' => 'mla-settings-menu-custom_field',
351
  'mla_tab' => 'custom_field',
972
  *
973
  * @param string HTML id/name attribute and option database key (OMIT MLA_OPTION_PREFIX)
974
  * @param array Option parameters, e.g., 'type', 'std'
975
+ * @param array Custom option definitions
976
  *
977
  * @return string HTML markup for the option's table row
978
  */
979
+ public static function mla_update_option_row( $key, $value, $option_table = NULL ) {
980
  if ( isset( $_REQUEST[ MLA_OPTION_PREFIX . $key ] ) ) {
981
  $message = '<br>update_option(' . $key . ")\r\n";
982
  switch ( $value['type'] ) {
983
  case 'checkbox':
984
+ MLAOptions::mla_update_option( $key, 'checked', $option_table );
985
  break;
986
  case 'header':
987
  case 'subheader':
988
  $message = '';
989
  break;
990
  case 'radio':
991
+ MLAOptions::mla_update_option( $key, $_REQUEST[ MLA_OPTION_PREFIX . $key ], $option_table );
992
  break;
993
  case 'select':
994
+ MLAOptions::mla_update_option( $key, $_REQUEST[ MLA_OPTION_PREFIX . $key ], $option_table );
995
  break;
996
  case 'text':
997
+ MLAOptions::mla_update_option( $key, stripslashes( trim( $_REQUEST[ MLA_OPTION_PREFIX . $key ], $option_table ) ) );
998
  break;
999
  case 'textarea':
1000
+ MLAOptions::mla_update_option( $key, stripslashes( trim( $_REQUEST[ MLA_OPTION_PREFIX . $key ], $option_table ) ) );
1001
  break;
1002
  case 'custom':
1003
  $message = MLAOptions::$value['update']( 'update', $key, $value, $_REQUEST );
1013
  $message = '<br>delete_option(' . $key . ')';
1014
  switch ( $value['type'] ) {
1015
  case 'checkbox':
1016
+ $message = '<br>uncheck_option(' . $key . ')';
1017
+ MLAOptions::mla_update_option( $key, 'unchecked', $option_table );
1018
  break;
1019
  case 'header':
1020
  case 'subheader':
1021
  $message = '';
1022
  break;
1023
  case 'radio':
1024
+ MLAOptions::mla_delete_option( $key, $option_table );
1025
  break;
1026
  case 'select':
1027
+ MLAOptions::mla_delete_option( $key, $option_table );
1028
  break;
1029
  case 'text':
1030
+ MLAOptions::mla_delete_option( $key, $option_table );
1031
  break;
1032
  case 'textarea':
1033
+ MLAOptions::mla_delete_option( $key, $option_table );
1034
  break;
1035
  case 'custom':
1036
  $message = MLAOptions::$value['delete']( 'delete', $key, $value, $_REQUEST );
1054
  *
1055
  * @param string HTML id/name attribute and option database key (OMIT MLA_OPTION_PREFIX)
1056
  * @param array Option parameters, e.g., 'type', 'std'
1057
+ * @param array Custom option definitions
1058
  *
1059
  * @return string HTML markup for the option's table row
1060
  */
1061
+ public static function mla_compose_option_row( $key, $value, $option_table = NULL ) {
1062
  switch ( $value['type'] ) {
1063
  case 'checkbox':
1064
  $option_values = array(
1068
  'help' => $value['help']
1069
  );
1070
 
1071
+ if ( 'checked' == MLAOptions::mla_get_option( $key, false, false, $option_table ) ) {
1072
  $option_values['checked'] = 'checked="checked"';
1073
  }
1074
 
1092
  'value' => $value['texts'][$optid]
1093
  );
1094
 
1095
+ if ( $option == MLAOptions::mla_get_option( $key, false, false, $option_table ) ) {
1096
  $option_values['checked'] = 'checked="checked"';
1097
  }
1098
 
1115
  'text' => $value['texts'][$optid]
1116
  );
1117
 
1118
+ if ( $option == MLAOptions::mla_get_option( $key, false, false, $option_table ) ) {
1119
  $option_values['selected'] = 'selected="selected"';
1120
  }
1121
 
1143
  $option_values['size'] = $value['size'];
1144
  }
1145
 
1146
+ $option_values['text'] = MLAOptions::mla_get_option( $key, false, false, $option_table );
1147
 
1148
  return MLAData::mla_parse_template( self::$page_template_array['text'], $option_values );
1149
  case 'textarea':
1165
  $option_values['rows'] = $value['rows'];
1166
  }
1167
 
1168
+ $option_values['text'] = stripslashes( MLAOptions::mla_get_option( $key, false, false, $option_table ) );
1169
 
1170
  return MLAData::mla_parse_template( self::$page_template_array['textarea'], $option_values );
1171
  case 'custom':
1216
  private static $mla_tablist = array();
1217
 
1218
  /**
1219
+ * Localize $mla_tablist array
1220
  *
1221
  * Localization must be done at runtime, and these calls cannot be placed
1222
  * in the "public static" array definition itself.
1227
  */
1228
  public static function mla_localize_tablist() {
1229
  self::$mla_tablist = array(
1230
+ 'general' => array( 'title' => __ ( 'General', 'media-library-assistant' ), 'render' => array( 'MLASettings', '_compose_general_tab' ) ),
1231
+ 'view' => array( 'title' => __ ( 'Views', 'media-library-assistant' ), 'render' => array( 'MLASettings', '_compose_view_tab' ) ),
1232
+ 'upload' => array( 'title' => __ ( 'Uploads', 'media-library-assistant' ), 'render' => array( 'MLASettings', '_compose_upload_tab' ) ),
1233
+ 'mla_gallery' => array( 'title' => __ ( 'MLA Gallery', 'media-library-assistant' ), 'render' => array( 'MLASettings', '_compose_mla_gallery_tab' ) ),
1234
+ 'custom_field' => array( 'title' => __ ( 'Custom Fields', 'media-library-assistant' ), 'render' => array( 'MLASettings', '_compose_custom_field_tab' ) ),
1235
+ 'iptc_exif' => array( 'title' => 'IPTC/EXIF', 'render' => array( 'MLASettings', '_compose_iptc_exif_tab' ) ),
1236
+ 'documentation' => array( 'title' => __ ( 'Documentation', 'media-library-assistant' ), 'render' => array( 'MLASettings', '_compose_documentation_tab' ) ),
1237
+ 'debug' => array( 'title' => __ ( 'Debug', 'media-library-assistant' ), 'render' => array( 'MLASettings', '_compose_debug_tab' ) ),
1238
  );
1239
  }
1240
 
1241
  /**
1242
+ * Retrieve the list of options tabs or a specific tab value
 
 
 
1243
  *
1244
  * @since 1.82
1245
  *
1251
  if ( is_string( $tab ) ) {
1252
  if ( isset( self::$mla_tablist[ $tab ] ) ) {
1253
  $results = self::$mla_tablist[ $tab ];
1254
+
1255
+ if ( ( 'debug' == $tab ) && ( 0 == ( MLA_DEBUG_LEVEL & 1 ) ) ) {
1256
+ $results = false;
1257
+ }
1258
  } else {
1259
+ $results = false;
1260
  }
1261
  } else {
1262
  $results = self::$mla_tablist;
 
1263
 
1264
+ if ( 0 == ( MLA_DEBUG_LEVEL & 1 ) ) {
1265
+ unset ( $results['debug'] );
1266
+ }
1267
  }
1268
 
1269
  return apply_filters( 'mla_get_options_tablist', $results, self::$mla_tablist, $tab );
1438
  $options_list = '';
1439
  foreach ( MLAOptions::$mla_option_definitions as $key => $value ) {
1440
  if ( 'general' == $value['tab'] ) {
1441
+ $options_list .= self::mla_compose_option_row( $key, $value );
1442
  }
1443
  }
1444
 
1687
  $options_list = '';
1688
  foreach ( MLAOptions::$mla_option_definitions as $key => $value ) {
1689
  if ( 'view' == $value['tab'] ) {
1690
+ $options_list .= self::mla_compose_option_row( $key, $value );
1691
  }
1692
  }
1693
 
1732
  $options_list = '';
1733
  foreach ( MLAOptions::$mla_option_definitions as $key => $value ) {
1734
  if ( 'view' == $value['tab'] ) {
1735
+ $options_list .= self::mla_compose_option_row( $key, $value );
1736
  }
1737
  }
1738
 
2156
  $options_list = '';
2157
  foreach ( MLAOptions::$mla_option_definitions as $key => $value ) {
2158
  if ( 'upload' == $value['tab'] ) {
2159
+ $options_list .= self::mla_compose_option_row( $key, $value );
2160
  }
2161
  }
2162
 
2199
  $options_list = '';
2200
  foreach ( MLAOptions::$mla_option_definitions as $key => $value ) {
2201
  if ( 'upload' == $value['tab'] ) {
2202
+ $options_list .= self::mla_compose_option_row( $key, $value );
2203
  }
2204
  }
2205
 
2343
  $options_list = '';
2344
  foreach ( MLAOptions::$mla_option_definitions as $key => $value ) {
2345
  if ( 'mla_gallery' == $value['tab'] ) {
2346
+ $options_list .= self::mla_compose_option_row( $key, $value );
2347
  }
2348
  }
2349
 
2741
  $options_list = '';
2742
  foreach ( MLAOptions::$mla_option_definitions as $key => $value ) {
2743
  if ( 'custom_field' == $value['tab'] ) {
2744
+ $options_list .= self::mla_compose_option_row( $key, $value );
2745
  }
2746
  }
2747
 
2880
  $options_list = '';
2881
  foreach ( MLAOptions::$mla_option_definitions as $key => $value ) {
2882
  if ( 'iptc_exif' == $value['tab'] ) {
2883
+ $options_list .= self::mla_compose_option_row( $key, $value );
2884
  }
2885
  }
2886
 
2935
 
2936
  foreach ( MLAOptions::$mla_option_definitions as $key => $value ) {
2937
  if ( 'debug' == $value['tab'] ) {
2938
+ $message_list .= self::mla_update_option_row( $key, $value );
2939
  } // view option
2940
  } // foreach mla_options
2941
 
2998
  $options_list = '';
2999
  foreach ( MLAOptions::$mla_option_definitions as $key => $value ) {
3000
  if ( 'debug' == $value['tab'] ) {
3001
+ $options_list .= self::mla_compose_option_row( $key, $value );
3002
  }
3003
  }
3004
 
3102
  if ( $current_tab ) {
3103
  if ( isset( $current_tab['render'] ) ) {
3104
  $handler = $current_tab['render'];
3105
+ // $page_content = self::$handler( );
3106
+ $page_content = call_user_func( $handler );
3107
  } else {
3108
  $page_content = array( 'message' => __( 'ERROR', 'media-library-assistant' ) . ': ' . __( 'Cannot render content tab', 'media-library-assistant' ), 'body' => '' );
3109
  }
3151
  $old_value = MLAOptions::mla_get_option( $key );
3152
  if ( $old_value != $_REQUEST[ MLA_OPTION_PREFIX . $key ] ) {
3153
  $settings_changed = true;
3154
+ $message_list .= self::mla_update_option_row( $key, $value );
3155
  }
3156
  } elseif ( 'text' == $value['type'] ) {
3157
  if ( '' == $_REQUEST[ MLA_OPTION_PREFIX . $key ] ) {
3161
  $old_value = MLAOptions::mla_get_option( $key );
3162
  if ( $old_value != $_REQUEST[ MLA_OPTION_PREFIX . $key ] ) {
3163
  $settings_changed = true;
3164
+ $message_list .= self::mla_update_option_row( $key, $value );
3165
  }
3166
  } elseif ( 'checkbox' == $value['type'] ) {
3167
  $old_value = MLAOptions::mla_get_option( $key );
3173
 
3174
  if ( $checkbox_changed ) {
3175
  $settings_changed = true;
3176
+ $message_list .= self::mla_update_option_row( $key, $value );
3177
  }
3178
  }
3179
  } // mla_gallery option
3420
 
3421
  foreach ( MLAOptions::$mla_option_definitions as $key => $value ) {
3422
  if ( 'view' == $value['tab'] ) {
3423
+ $message_list .= self::mla_update_option_row( $key, $value );
3424
  } // view option
3425
  } // foreach mla_options
3426
 
3454
 
3455
  foreach ( MLAOptions::$mla_option_definitions as $key => $value ) {
3456
  if ( 'upload' == $value['tab'] ) {
3457
+ $message_list .= self::mla_update_option_row( $key, $value );
3458
  } // upload option
3459
  } // foreach mla_options
3460
 
3594
  */
3595
  foreach ( MLAOptions::$mla_option_definitions as $key => $value ) {
3596
  if ( 'custom_field' == $value['tab'] ) {
3597
+ $option_messages .= self::mla_update_option_row( $key, $value );
3598
  }
3599
  }
3600
 
3877
  */
3878
  foreach ( MLAOptions::$mla_option_definitions as $key => $value ) {
3879
  if ( 'iptc_exif' == $value['tab'] ) {
3880
+ $option_messages .= self::mla_update_option_row( $key, $value );
3881
  }
3882
  }
3883
 
3972
  // ignore everything else
3973
  } // switch
3974
 
3975
+ $message_list .= self::mla_update_option_row( $key, $value );
3976
  } // general option
3977
  } // foreach mla_options
3978
 
includes/class-mla-shortcodes.php CHANGED
@@ -457,7 +457,12 @@ class MLAShortcodes {
457
  /*
458
  * Replace data-selection parameters with the "ids" list
459
  */
460
- $blacklist = array_merge( $mla_arguments, self::$mla_get_shortcode_attachments_parameters );
 
 
 
 
 
461
  $new_args = '';
462
  foreach ( $attr as $key => $value ) {
463
  if ( array_key_exists( $key, $blacklist ) ) {
@@ -694,9 +699,17 @@ class MLAShortcodes {
694
  $open_template = '';
695
  }
696
 
697
- $row_open_template = MLAOptions::mla_fetch_gallery_template( $markup_values['mla_markup'] . '-row-open', 'markup' );
698
- if ( empty( $row_open_template ) ) {
 
 
699
  $row_open_template = '';
 
 
 
 
 
 
700
  }
701
 
702
  $item_template = MLAOptions::mla_fetch_gallery_template( $markup_values['mla_markup'] . '-item', 'markup' );
@@ -704,9 +717,17 @@ class MLAShortcodes {
704
  $item_template = '';
705
  }
706
 
707
- $row_close_template = MLAOptions::mla_fetch_gallery_template( $markup_values['mla_markup'] . '-row-close', 'markup' );
708
- if ( empty( $row_close_template ) ) {
 
 
709
  $row_close_template = '';
 
 
 
 
 
 
710
  }
711
 
712
  $close_template = MLAOptions::mla_fetch_gallery_template( $markup_values['mla_markup'] . '-close', 'markup' );
@@ -720,7 +741,6 @@ class MLAShortcodes {
720
  $new_text = $open_template . $row_open_template . $row_close_template . $close_template;
721
 
722
  $markup_values = MLAData::mla_expand_field_level_parameters( $new_text, $attr, $markup_values );
723
-
724
  if ( self::$mla_debug ) {
725
  $output = self::$mla_debug_messages;
726
  self::$mla_debug_messages = '';
@@ -953,13 +973,14 @@ class MLAShortcodes {
953
  }
954
 
955
  /*
956
- * As of WP 3.7, this function returns "<a href='$url'>$link_text</a>", where $link_text
957
- * can be an image thumbnail or a text link. The "title=" attribute was dropped.
958
- * The function is defined in /wp-includes/post-template.php.
959
  *
960
- * As of WP 4.1, this function has an additional optional parameter, an "Array or string of attributes",
961
- * used in the [gallery] shortcode to tie the link to a caption with 'aria-describedby'. The caption
962
- * has a matching 'id' attribute "$selector-#id".
 
963
  */
964
  $item_values['pagelink'] = wp_get_attachment_link($attachment->ID, $size, true, $show_icon, $link_text);
965
  $item_values['filelink'] = wp_get_attachment_link($attachment->ID, $size, false, $show_icon, $link_text);
@@ -1034,6 +1055,14 @@ class MLAShortcodes {
1034
  $image_attributes = '';
1035
  }
1036
 
 
 
 
 
 
 
 
 
1037
  if ( ! empty( $arguments['mla_image_class'] ) ) {
1038
  $image_class = esc_attr( self::_process_shortcode_parameter( $arguments['mla_image_class'], $item_values ) );
1039
  } else {
@@ -1288,7 +1317,9 @@ class MLAShortcodes {
1288
  $args['mla_stream_type'] = $arguments['mla_viewer_type'];
1289
  }
1290
 
1291
- //$icon_url = add_query_arg( $args, wp_nonce_url( admin_url( 'upload.php' ), MLA::MLA_ADMIN_NONCE ) );
 
 
1292
  $icon_url = add_query_arg( $args, wp_nonce_url( MLA_PLUGIN_URL . 'includes/mla-stream-image.php', MLA::MLA_ADMIN_NONCE ) );
1293
  }
1294
  }
@@ -1334,7 +1365,7 @@ class MLAShortcodes {
1334
  } // has extension
1335
  } // mla_viewer
1336
 
1337
- if ($is_gallery ) {
1338
  /*
1339
  * Start of row markup
1340
  */
@@ -1354,7 +1385,17 @@ class MLAShortcodes {
1354
  } else {
1355
  $item_values['last_in_row'] = '';
1356
  }
1357
-
 
 
 
 
 
 
 
 
 
 
1358
  $item_values = apply_filters( 'mla_gallery_item_values', $item_values );
1359
  $item_template = apply_filters( 'mla_gallery_item_template', $item_template );
1360
  $parse_value = MLAData::mla_parse_template( $item_template, $item_values );
457
  /*
458
  * Replace data-selection parameters with the "ids" list
459
  */
460
+ if ( 'mla_tag_cloud' == $arguments['mla_alt_shortcode'] ) {
461
+ $blacklist = self::$mla_get_shortcode_attachments_parameters;
462
+ } else {
463
+ $blacklist = array_merge( $mla_arguments, self::$mla_get_shortcode_attachments_parameters );
464
+ }
465
+
466
  $new_args = '';
467
  foreach ( $attr as $key => $value ) {
468
  if ( array_key_exists( $key, $blacklist ) ) {
699
  $open_template = '';
700
  }
701
 
702
+ /*
703
+ * Emulate [gallery] handling of row open markup for the default template only
704
+ */
705
+ if ( $html5 && ( 'default' == $markup_values['mla_markup'] ) ) {
706
  $row_open_template = '';
707
+ } else{
708
+ $row_open_template = MLAOptions::mla_fetch_gallery_template( $markup_values['mla_markup'] . '-row-open', 'markup' );
709
+
710
+ if ( empty( $row_open_template ) ) {
711
+ $row_open_template = '';
712
+ }
713
  }
714
 
715
  $item_template = MLAOptions::mla_fetch_gallery_template( $markup_values['mla_markup'] . '-item', 'markup' );
717
  $item_template = '';
718
  }
719
 
720
+ /*
721
+ * Emulate [gallery] handling of row close markup for the default template only
722
+ */
723
+ if ( $html5 && ( 'default' == $markup_values['mla_markup'] ) ) {
724
  $row_close_template = '';
725
+ } else{
726
+ $row_close_template = MLAOptions::mla_fetch_gallery_template( $markup_values['mla_markup'] . '-row-close', 'markup' );
727
+
728
+ if ( empty( $row_close_template ) ) {
729
+ $row_close_template = '';
730
+ }
731
  }
732
 
733
  $close_template = MLAOptions::mla_fetch_gallery_template( $markup_values['mla_markup'] . '-close', 'markup' );
741
  $new_text = $open_template . $row_open_template . $row_close_template . $close_template;
742
 
743
  $markup_values = MLAData::mla_expand_field_level_parameters( $new_text, $attr, $markup_values );
 
744
  if ( self::$mla_debug ) {
745
  $output = self::$mla_debug_messages;
746
  self::$mla_debug_messages = '';
973
  }
974
 
975
  /*
976
+ * As of WP 3.7, this function returns "<a href='$url'>$link_text</a>", where
977
+ * $link_text can be an image thumbnail or a text link. The "title=" attribute
978
+ * was dropped. The function is defined in /wp-includes/post-template.php.
979
  *
980
+ * As of WP 4.1, this function has an additional optional parameter, an "Array or
981
+ * string of attributes", used in the [gallery] shortcode to tie the link to a
982
+ * caption with 'aria-describedby'. The caption has a matching 'id' attribute
983
+ * "$selector-#id". See below for the MLA equivalent processing.
984
  */
985
  $item_values['pagelink'] = wp_get_attachment_link($attachment->ID, $size, true, $show_icon, $link_text);
986
  $item_values['filelink'] = wp_get_attachment_link($attachment->ID, $size, false, $show_icon, $link_text);
1055
  $image_attributes = '';
1056
  }
1057
 
1058
+ /*
1059
+ * WordPress 4.1 ties the <img> tag to the caption with 'aria-describedby'
1060
+ * has a matching 'id' attribute "$selector-#id".
1061
+ */
1062
+ if ( trim( $item_values['caption'] ) && ( false === strpos( $image_attributes, 'aria-describedby=' ) ) && ( 'default' == $item_values['mla_markup'] ) ) {
1063
+ $image_attributes .= 'aria-describedby="' . $item_values['selector'] . '-' . $item_values['attachment_ID'] . '" ';
1064
+ }
1065
+
1066
  if ( ! empty( $arguments['mla_image_class'] ) ) {
1067
  $image_class = esc_attr( self::_process_shortcode_parameter( $arguments['mla_image_class'], $item_values ) );
1068
  } else {
1317
  $args['mla_stream_type'] = $arguments['mla_viewer_type'];
1318
  }
1319
 
1320
+ /*
1321
+ * For efficiency, image streaming is done outside WordPress
1322
+ */
1323
  $icon_url = add_query_arg( $args, wp_nonce_url( MLA_PLUGIN_URL . 'includes/mla-stream-image.php', MLA::MLA_ADMIN_NONCE ) );
1324
  }
1325
  }
1365
  } // has extension
1366
  } // mla_viewer
1367
 
1368
+ if ( $is_gallery ) {
1369
  /*
1370
  * Start of row markup
1371
  */
1385
  } else {
1386
  $item_values['last_in_row'] = '';
1387
  }
1388
+
1389
+ /*
1390
+ * Conditional caption tag to replicate WP 4.1+,
1391
+ * now used in the default markup template.
1392
+ */
1393
+ if ( $item_values['captiontag'] && trim( $item_values['caption'] ) ) {
1394
+ $item_values['captiontag_content'] = '<' . $item_values['captiontag'] . " class='wp-caption-text gallery-caption' id='" . $item_values['selector'] . '-' . $item_values['attachment_ID'] . "'>\n\t\t" . $item_values['caption'] . "\n\t</" . $item_values['captiontag'] . ">\n";
1395
+ } else {
1396
+ $item_values['captiontag_content'] = '';
1397
+ }
1398
+
1399
  $item_values = apply_filters( 'mla_gallery_item_values', $item_values );
1400
  $item_template = apply_filters( 'mla_gallery_item_template', $item_template );
1401
  $parse_value = MLAData::mla_parse_template( $item_template, $item_values );
includes/class-mla-stream-image.php DELETED
@@ -1,363 +0,0 @@
1
- <?php
2
- /**
3
- * Ajax handler for the mla_viewer
4
- *
5
- * @package Media Library Assistant
6
- * @since 2.10
7
- */
8
-
9
- /**
10
- * Class MLA (Media Library Assistant) Stream Image provides PDF thumbnails.
11
- *
12
- * @package Media Library Assistant
13
- * @since 2.10
14
- */
15
- class MLAStreamImage {
16
- /**
17
- * Action name; uniquely identifies the nonce
18
- *
19
- * @since 2.10
20
- *
21
- * @var string
22
- */
23
- const MLA_ADMIN_NONCE = 'mla_admin';
24
-
25
- /**
26
- * Load the plugin's Ajax handler
27
- *
28
- * @since 2.10
29
- *
30
- * @return void
31
- */
32
- public static function initialize() {
33
- /*
34
- * Process mla_viewer image stream requests
35
- */
36
- if ( isset( $_REQUEST['mla_stream_file'] ) ) {
37
- check_admin_referer( self::MLA_ADMIN_NONCE );
38
- self::_process_mla_stream_image();
39
- exit();
40
- }
41
- }
42
-
43
- /**
44
- * Process Imagick image stream request, e.g., for a PDF thumbnail
45
- *
46
- * Requires _wpnonce and mla_stream_file (relative to wp_upload_dir ) in $_REQUEST; optional parameters are:
47
- * mla_stream_width, mla_stream_height, mla_stream_frame, mla_stream_type
48
- *
49
- * @since 2.10
50
- *
51
- * @param array $editors List of the implemented image editor classes
52
- *
53
- * @return void echos image content and calls exit();
54
- */
55
- public static function _wp_image_editors_filter( $editors ) {
56
- array_unshift( $editors, "MLA_Image_Editor" );
57
-
58
- return $editors;
59
- }
60
-
61
- /**
62
- * Holds Imagick image resolution for class MLA_Image_Editor
63
- *
64
- * @since 2.10
65
- *
66
- * @var array
67
- */
68
- public static $mla_imagick_args = array();
69
-
70
- /**
71
- * Process Imagick image stream request, e.g., for a PDF thumbnail
72
- *
73
- * Requires _wpnonce and mla_stream_file (relative to wp_upload_dir ) in $_REQUEST;
74
- * optional $_REQUEST parameters are:
75
- * mla_stream_width, mla_stream_height, mla_stream_frame,
76
- * mla_stream_resolution, mla_stream_quality, mla_stream_type
77
- *
78
- * @since 2.10
79
- *
80
- * @return void echos image content and calls exit();
81
- */
82
- private static function _process_mla_stream_image() {
83
- //error_log( __LINE__ . " _process_mla_stream_image \$_REQUEST = " . var_export( $_REQUEST, true ), 0 );
84
- //error_log( __LINE__ . " _process_mla_stream_image memory_get_usage = " . var_export( memory_get_usage ( true ), true ), 0 );
85
- if ( isset( $_REQUEST['mla_stream_file'] ) ) {
86
- //$microtime = microtime( true );
87
- //error_log( __LINE__ . " _process_mla_stream_image {$_REQUEST['mla_stream_file']}", 0 );
88
- if( ini_get( 'zlib.output_compression' ) ) {
89
- ini_set( 'zlib.output_compression', 'Off' );
90
- }
91
-
92
- $file = stripslashes( $_REQUEST['mla_stream_file'] );
93
- $width = isset( $_REQUEST['mla_stream_width'] ) ? absint( $_REQUEST['mla_stream_width'] ) : 0;
94
- $height = isset( $_REQUEST['mla_stream_height'] ) ? absint( $_REQUEST['mla_stream_height'] ) : 0;
95
- $type = isset( $_REQUEST['mla_stream_type'] ) ? stripslashes( $_REQUEST['mla_stream_type'] ) : 'image/jpeg';
96
- $quality = isset( $_REQUEST['mla_stream_quality'] ) ? absint( $_REQUEST['mla_stream_quality'] ) : 0;
97
-
98
- /*
99
- * Frame, resolution and type are required in the load() function, which we
100
- * can't explicitly pass parameters to.
101
- */
102
- if ( isset( $_REQUEST['mla_stream_frame'] ) ) {
103
- self::$mla_imagick_args['frame'] = absint( $_REQUEST['mla_stream_frame'] );
104
- }
105
-
106
- if ( isset( $_REQUEST['mla_stream_resolution'] ) ) {
107
- self::$mla_imagick_args['resolution'] = absint( $_REQUEST['mla_stream_resolution'] );
108
- }
109
-
110
- self::$mla_imagick_args['type'] = $type;
111
-
112
- $upload_dir = wp_upload_dir();
113
- $file = $upload_dir['basedir'] . '/' . $file;
114
-
115
- if ( ! file_exists( $file ) ) {
116
- wp_die( 'File not found', '', array( 'response' => 404 ) );
117
- }
118
-
119
- /*
120
- * Supplementary Imagick functions for the image editor
121
- */
122
- require_once ABSPATH . WPINC . '/class-wp-image-editor.php';
123
- require_once ABSPATH . WPINC . '/class-wp-image-editor-gd.php';
124
- require_once ABSPATH . WPINC . '/class-wp-image-editor-imagick.php';
125
-
126
- require_once( MLA_PLUGIN_PATH . 'includes/class-mla-image-editor.php' );
127
-
128
- try {
129
- /* * * * * * * * *
130
- $upload_dir = wp_upload_dir();
131
- $upload_dir = $upload_dir['basedir'] . '/';
132
-
133
- $mutex = new MLAMutex();
134
- $mutex->init( 1, $upload_dir . 'mla-mutex.txt' );
135
- $mutex->acquire();
136
- * * * * * * * * */
137
- //$acquired = microtime( true ) - $microtime;
138
- //error_log( __LINE__ . " _process_mla_stream_image {$_REQUEST['mla_stream_file']} acquired at {$acquired}", 0 );
139
-
140
- add_filter( 'wp_image_editors', 'MLAStreamImage::_wp_image_editors_filter', 10, 1 );
141
- $image_editor = wp_get_image_editor( $file );
142
- remove_filter( 'wp_image_editors', 'MLAStreamImage::_wp_image_editors_filter', 10 );
143
-
144
- //$mutex->release();
145
- //$elapsed = ( $released = microtime( true ) - $microtime ) - $acquired;
146
- //error_log( __LINE__ . " _process_mla_stream_image {$_REQUEST['mla_stream_file']} released at {$released} after {$elapsed}", 0 );
147
-
148
- if ( is_wp_error( $image_editor ) ) {
149
- error_log( 'Image load failure = ' . var_export( $image_editor->get_error_messages(), true ), 0 );
150
- wp_die( 'File not loaded', '', array( 'response' => 404 ) );
151
- }
152
-
153
- /*
154
- * Prepare the output image; resize and flatten, if necessary
155
- */
156
- if ( isset( $_REQUEST['mla_stream_fit'] ) ) {
157
- $best_fit = ( '1' == $_REQUEST['mla_stream_fit'] );
158
- } else {
159
- $best_fit = false;
160
- }
161
-
162
- $image_editor->mla_prepare_image( $width, $height, $best_fit, $type, $quality );
163
- }
164
- catch ( Exception $e ) {
165
- error_log( 'Image load Exception = ' . var_export( $e->getMessage(), true ), 0 );
166
- wp_die( 'Image load exception', '', array( 'response' => 404 ) );
167
- }
168
-
169
- try {
170
- $image_editor->stream( $type );
171
- }
172
- catch ( Exception $e ) {
173
- error_log( 'stream Exception = ' . var_export( $e->getMessage(), true ), 0 );
174
- wp_die( 'Image stream exception', '', array( 'response' => 404 ) );
175
- }
176
-
177
- unset( $image_editor );
178
- //$elapsed = ( $unset = microtime( true ) - $microtime ) - $released;
179
- //error_log( __LINE__ . " _process_mla_stream_image {$_REQUEST['mla_stream_file']} unset at {$unset} after {$elapsed}", 0 );
180
- exit();
181
- } else {
182
- wp_die( 'mla_stream_file not set', '', array( 'response' => 404 ) );
183
- }
184
-
185
- // Should not be possible
186
- wp_die( '_process_mla_stream_image error', '', array( 'response' => 500 ) );
187
- }
188
- } // Class MLAStreamImage
189
-
190
- /**
191
- * Class MLA (Media Library Assistant) Mutex provides a simple "mutual exclusion" semaphore
192
- * for the [mla_gallery] mla_viewer=single option
193
- *
194
- * Adapted from the example by mr.smaon@gmail.com in the PHP Manual "Semaphore Functions" page.
195
- *
196
- * @package Media Library Assistant
197
- * @since 2.10
198
- */
199
- class MLAMutex {
200
- /**
201
- * Semaphore identifier returned by sem_get()
202
- *
203
- * @since 2.10
204
- *
205
- * @var resource
206
- */
207
- private $sem_id;
208
-
209
- /**
210
- * True if the semaphore has been acquired
211
- *
212
- * @since 2.10
213
- *
214
- * @var boolean
215
- */
216
- private $is_acquired = false;
217
-
218
- /**
219
- * True if using a file lock instead of a semaphore
220
- *
221
- * @since 2.10
222
- *
223
- * @var boolean
224
- */
225
- private $use_file_lock = false;
226
-
227
- /**
228
- * Name of the (locked) file used as a semaphore
229
- *
230
- * @since 2.10
231
- *
232
- * @var string
233
- */
234
- private $filename = '';
235
-
236
- /**
237
- * File system pointer resource of the (locked) file used as a semaphore
238
- *
239
- * @since 2.10
240
- *
241
- * @var resource
242
- */
243
- private $filepointer;
244
-
245
- /**
246
- * Initializes the choice of semaphore Vs file lock
247
- *
248
- * @since 2.10
249
- *
250
- * @param boolean $use_lock True to force use of file locking
251
- *
252
- * @return void
253
- */
254
- function __construct( $use_lock = false ) {
255
- /*
256
- * If sem_ functions are not available require file locking
257
- */
258
- if ( ! is_callable( 'sem_get' ) ) {
259
- $use_lock = true;
260
- }
261
-
262
- if ( $use_lock || 'WIN' == substr( PHP_OS, 0, 3 ) ) {
263
- $this->use_file_lock = true;
264
- }
265
- }
266
-
267
- /**
268
- * Creates the semaphore or sets the (lock) file name
269
- *
270
- * @since 2.10
271
- *
272
- * @param integer $id Key to identify the semaphore
273
- * @param string $filename Absolute path and name of the file for locking
274
- *
275
- * @return boolean True if the initialization succeeded
276
- */
277
- public function init( $id, $filename = '' ) {
278
-
279
- if( $this->use_file_lock ) {
280
- if( empty( $filename ) ) {
281
- return false;
282
- } else {
283
- $this->filename = $filename;
284
- }
285
- } else {
286
- if( ! ( $this->sem_id = sem_get( $id, 1) ) ) {
287
- return false;
288
- }
289
- }
290
-
291
- return true;
292
- }
293
-
294
- /**
295
- * Acquires the semaphore or opens and locks the file
296
- *
297
- * @since 2.10
298
- *
299
- * @return boolean True if the acquisition succeeded
300
- */
301
- public function acquire() {
302
- if( $this->use_file_lock ) {
303
- if ( empty( $this->filename ) ) {
304
- return true;
305
- }
306
-
307
- if( false == ( $this->filepointer = @fopen( $this->filename, "w+" ) ) ) {
308
- return false;
309
- }
310
-
311
- if( false == flock( $this->filepointer, LOCK_EX ) ) {
312
- return false;
313
- }
314
- } else {
315
- if ( ! sem_acquire( $this->sem_id ) ) {
316
- return false;
317
- }
318
- }
319
-
320
- $this->is_acquired = true;
321
- return true;
322
- }
323
-
324
- /**
325
- * Releases the semaphore or unlocks and closes (but does not unlink) the file
326
- *
327
- * @since 2.10
328
- *
329
- * @return boolean True if the release succeeded
330
- */
331
- public function release() {
332
- if( ! $this->is_acquired ) {
333
- return true;
334
- }
335
-
336
- if( $this->use_file_lock ) {
337
- if( false == flock( $this->filepointer, LOCK_UN ) ) {
338
- return false;
339
- }
340
-
341
- fclose( $this->filepointer );
342
- } else {
343
- if ( ! sem_release( $this->sem_id ) ) {
344
- return false;
345
- }
346
- }
347
-
348
- $this->is_acquired = false;
349
- return true;
350
- }
351
-
352
- /**
353
- * Returns the semaphore identifier, if it exists, else NULL
354
- *
355
- * @since 2.10
356
- *
357
- * @return resource Semaphore identifier or NULL
358
- */
359
- public function getId() {
360
- return $this->sem_id;
361
- }
362
- } // MLAMutex
363
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/class-mla-wpml-support.php ADDED
@@ -0,0 +1,1758 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Media Library Assistant WPML Support classes
4
+ *
5
+ * This file is conditionally loaded in MLA::initialize after a check for WPML presence.
6
+ *
7
+ * @package Media Library Assistant
8
+ * @since 2.11
9
+ */
10
+
11
+ /**
12
+ * Class MLA (Media Library Assistant) WPML provides support for the WPML Multilingual CMS
13
+ * family of plugins, including WPML Media
14
+ *
15
+ * @package Media Library Assistant
16
+ * @since 2.11
17
+ */
18
+ class MLA_WPML {
19
+ /**
20
+ * Initialization function, similar to __construct()
21
+ *
22
+ * This function contains add_action and add_filter calls.
23
+ *
24
+ * @since 2.11
25
+ *
26
+ * @return void
27
+ */
28
+ public static function initialize() {
29
+ /*
30
+ * The remaining filters are only useful for the admin section; exit in the front-end posts/pages
31
+ */
32
+ if ( ! is_admin() ) {
33
+ /*
34
+ * Defined in /media-library-assistant/includes/class-mla-shortcodes.php
35
+ */
36
+ add_filter( 'mla_get_terms_query_arguments', 'MLA_WPML::mla_get_terms_query_arguments', 10, 1 );
37
+ add_filter( 'mla_get_terms_clauses', 'MLA_WPML::mla_get_terms_clauses', 10, 1 );
38
+
39
+ return;
40
+ }
41
+
42
+ /*
43
+ * Defined in /wp-admin/admin.php
44
+ */
45
+ add_action( 'admin_init', 'MLA_WPML::admin_init' );
46
+
47
+ /*
48
+ * Defined in wp-admin/edit-form-advanced.php
49
+ */
50
+ add_filter( 'post_updated_messages', 'MLA_WPML::post_updated_messages', 10, 1 );
51
+
52
+ /*
53
+ * Defined in wp-includes/post.php function wp_insert_post
54
+ */
55
+ add_filter( 'wp_insert_post_empty_content', 'MLA_WPML::wp_insert_post_empty_content', 10, 2 );
56
+ add_action( 'edit_attachment', 'MLA_WPML::edit_attachment', 10, 1 );
57
+
58
+ /*
59
+ * Defined in /media-library-assistant/includes/class-mla-media-modal.php
60
+ */
61
+ add_action( 'mla_media_modal_begin_update_compat_fields', 'MLA_WPML::mla_media_modal_begin_update_compat_fields', 10, 1 );
62
+ add_filter( 'mla_media_modal_update_compat_fields_terms', 'MLA_WPML::mla_media_modal_update_compat_fields_terms', 10, 4 );
63
+ add_filter( 'mla_media_modal_end_update_compat_fields', 'MLA_WPML::mla_media_modal_end_update_compat_fields', 10, 3 );
64
+
65
+ /*
66
+ * Defined in /media-library-assistant/includes/class-mla-main.php
67
+ */
68
+ add_filter( 'mla_list_table_new_instance', 'MLA_WPML_Table::mla_list_table_new_instance', 10, 1 );
69
+ add_action( 'mla_list_table_custom_admin_action', 'MLA_WPML::mla_list_table_custom_admin_action', 10, 2 );
70
+ add_filter( 'mla_list_table_inline_action', 'MLA_WPML::mla_list_table_inline_action', 10, 2 );
71
+ add_filter( 'mla_list_table_bulk_action_initial_request', 'MLA_WPML::mla_list_table_bulk_action_initial_request', 10, 3 );
72
+ add_filter( 'mla_list_table_bulk_action_item_request', 'MLA_WPML::mla_list_table_bulk_action_item_request', 10, 4 );
73
+
74
+ /*
75
+ * Defined in /media-library-assistant/includes/class-mla-settings.php
76
+ */
77
+ add_filter( 'mla_get_options_tablist', 'MLA_WPML::mla_get_options_tablist', 10, 3 );
78
+
79
+ /*
80
+ * Defined in /wpml-media/inc/wpml-media-class.php
81
+ */
82
+ add_action( 'wpml_media_create_duplicate_attachment', 'MLA_WPML::wpml_media_create_duplicate_attachment', 10, 2 );
83
+ }
84
+
85
+ /**
86
+ * MLA Tag Cloud Query Arguments
87
+ *
88
+ * Saves [mla_tag_cloud] query parameters for use in MLA_WPML::mla_get_terms_clauses.
89
+ *
90
+ * @since 2.11
91
+ * @uses MLA_WPML::$all_query_parameters
92
+ *
93
+ * @param array shortcode arguments merged with attachment selection defaults, so every possible parameter is present
94
+ *
95
+ * @return array updated attachment query arguments
96
+ */
97
+ public static function mla_get_terms_query_arguments( $all_query_parameters ) {
98
+ self::$all_query_parameters = $all_query_parameters;
99
+
100
+ return $all_query_parameters;
101
+ } // mla_get_terms_query_arguments
102
+
103
+ /**
104
+ * Save the query arguments
105
+ *
106
+ * @since 2.11
107
+ *
108
+ * @var array
109
+ */
110
+ private static $all_query_parameters = array();
111
+
112
+ /**
113
+ * MLA Tag Cloud Query Clauses
114
+ *
115
+ * Adds language-specific clauses to filter the cloud terms.
116
+ *
117
+ * @since 2.11
118
+ *
119
+ * @param array SQL clauses ( 'fields', 'join', 'where', 'order', 'orderby', 'limits' )
120
+ *
121
+ * @return array updated SQL clauses
122
+ */
123
+ public static function mla_get_terms_clauses( $clauses ) {
124
+ global $wpdb, $sitepress;
125
+
126
+ if ( 'all' != ( $current_language = $sitepress->get_current_language() ) ) {
127
+ $clauses['join'] = preg_replace( '/(^.* AS tt ON t.term_id = tt.term_id)/m', '${1}' . ' JOIN `' . $wpdb->prefix . 'icl_translations` AS icl_t ON icl_t.element_id = tt.term_taxonomy_id', $clauses['join'] );
128
+
129
+ $clauses['where'] .= " AND icl_t.language_code = '" . $current_language . "'";
130
+
131
+ if ( is_string( $query_taxonomies = self::$all_query_parameters['taxonomy'] ) ) {
132
+ $query_taxonomies = array ( $query_taxonomies );
133
+ }
134
+
135
+ $taxonomies = array();
136
+ foreach ( $query_taxonomies as $taxonomy) {
137
+ $taxonomies[] = 'tax_' . $taxonomy;
138
+ }
139
+
140
+ $clauses['where'] .= "AND icl_t.element_type IN ( '" . join( "','", $taxonomies ) . "' )";
141
+ }
142
+
143
+ return $clauses;
144
+ } // mla_get_terms_clauses
145
+
146
+ /**
147
+ * Add the plugin's admin-mode filter/action handlers
148
+ *
149
+ * @since 2.11
150
+ *
151
+ * @return void
152
+ */
153
+ public static function admin_init() {
154
+ /*
155
+ * Add styles for the language management column
156
+ */
157
+ if ( isset( $_REQUEST['page'] ) && ( MLA::ADMIN_PAGE_SLUG == $_REQUEST['page'] ) ) {
158
+ add_action( 'admin_print_styles', 'MLA_WPML_Table::mla_list_table_add_icl_styles' );
159
+ }
160
+
161
+ /*
162
+ * Localize $mla_language_option_definitions array
163
+ */
164
+ self::mla_localize_language_option_definitions();
165
+ }
166
+
167
+ /**
168
+ * Captures the existing term assignments before the
169
+ * Media Manager Modal Window ATTACHMENT DETAILS taxonomy meta boxes updates
170
+ *
171
+ * @since 2.11
172
+ *
173
+ * @param object the current post
174
+ */
175
+ public static function mla_media_modal_begin_update_compat_fields( $post ) {
176
+ $post_id = $post->ID;
177
+
178
+ // Accumulate for possible term_assignment or term_synchronization
179
+ self::_build_existing_terms( $post_id );
180
+ } // mla_media_modal_begin_update_compat_fields
181
+
182
+ /**
183
+ * Applies Term Assignment to the terms assigned to one
184
+ * Media Manager Modal Window ATTACHMENT DETAILS taxonomy
185
+ *
186
+ * @since 2.11
187
+ *
188
+ * @param array assigned term id/name values
189
+ * @param string taxonomy slug
190
+ * @param object taxonomy object
191
+ * @param integer current post ID
192
+ */
193
+ public static function mla_media_modal_update_compat_fields_terms( $terms, $key, $value, $post_id ) {
194
+ // Accumulate for possible term_assignment or term_synchronization
195
+ if ( $value->hierarchical ) {
196
+ $tax_inputs = array( $key => $terms );
197
+ } else {
198
+ $tax_inputs = array( $key => implode( ',', $terms ) );
199
+ }
200
+
201
+ if ( 'checked' == MLAOptions::mla_get_option( 'term_assignment', false, false, MLA_WPML::$mla_language_option_definitions ) ) {
202
+ self::_build_tax_input( $post_id, $tax_inputs );
203
+ $tax_inputs = self::_apply_tax_input( $post_id );
204
+
205
+ if ( $value->hierarchical ) {
206
+ $terms = $tax_inputs[ $key ];
207
+ } else {
208
+ $terms = explode( ',', $tax_inputs[ $key ] );
209
+ }
210
+ } // term_assignment
211
+
212
+ return $terms;
213
+ } // mla_media_modal_update_compat_fields_terms
214
+
215
+ /**
216
+ * Applies Term Synchronization after the
217
+ * Media Manager Modal Window taxonomy updates
218
+ *
219
+ * @since 2.11
220
+ *
221
+ * @param string HTML markup for the taxonomy meta box elements
222
+ * @param array supported taxonomy objects
223
+ * @param object current post object
224
+ */
225
+ public static function mla_media_modal_end_update_compat_fields( $results, $taxonomies, $post ) {
226
+ /*
227
+ * Synchronize the changes to all other translations
228
+ */
229
+ if ( 'checked' == MLAOptions::mla_get_option( 'term_synchronization', false, false, MLA_WPML::$mla_language_option_definitions ) ) {
230
+
231
+ /*
232
+ * Update terms because they have changed
233
+ */
234
+ $post_id = $post->ID;
235
+ $terms_before = self::_update_existing_terms( $post_id );
236
+
237
+ // $tax_input is a convenient source of language codes; ignore $tax_inputs
238
+ foreach( self::$tax_input as $language => $tax_inputs ) {
239
+ /*
240
+ * Skip ['tax_input_post_id'] and the language we've already updated
241
+ */
242
+ if ( ( ! isset( self::$existing_terms[ $language ] ) ) || ( self::$existing_terms['language_code'] == $language ) ) {
243
+ continue;
244
+ }
245
+
246
+ $tax_inputs = self::_apply_synch_input( $language, $terms_before );
247
+ if ( ! empty( $tax_inputs ) ) {
248
+ MLAData::mla_update_single_item( self::$existing_terms[ $language ]['element_id'], array(), $tax_inputs );
249
+ }
250
+ } // translation
251
+ } // do synchronization
252
+
253
+ return $results;
254
+ } // mla_media_modal_end_update_compat_fields
255
+
256
+ /**
257
+ * Captures the Quick Edit "before update" term assignments
258
+ *
259
+ * @since 2.11
260
+ *
261
+ * @param array $item_content NULL, to indicate no handler.
262
+ * @param integer $post_id the affected attachment.
263
+ *
264
+ * @return object updated $item_content. NULL if no handler, otherwise
265
+ * ( 'message' => error or status message(s), 'body' => '',
266
+ * 'prevent_default' => true to bypass the MLA handler )
267
+ */
268
+ public static function mla_list_table_inline_action( $item_content, $post_id ) {
269
+ self::_build_existing_terms( $post_id );
270
+
271
+ return $item_content;
272
+ } // mla_list_table_inline_action
273
+
274
+ /**
275
+ * Captures the Bulk Edit parameters during "Upload New Media"
276
+ *
277
+ * @since 2.11
278
+ *
279
+ * @param array $request bulk action request parameters, including ['mla_bulk_action_do_cleanup'].
280
+ * @param string $bulk_action the requested action.
281
+ * @param array $custom_field_map [ slug => field_name ]
282
+ *
283
+ * @return array updated bulk action request parameters
284
+ */
285
+ public static function mla_list_table_bulk_action_initial_request( $request, $bulk_action, $custom_field_map ) {
286
+ /*
287
+ * Check for Bulk Edit processing during Upload New Media
288
+ */
289
+ if ( ( NULL == self::$upload_bulk_edit_args ) && ( 'edit' == $bulk_action ) && ! empty( $_REQUEST['mlaAddNewBulkEdit']['formString'] ) ) {
290
+ /*
291
+ * Suppress WPML processing in wpml-media.class.php function save_attachment_actions,
292
+ * which wipes out attachment meta data.
293
+ */
294
+ global $action;
295
+ $action = 'upload-plugin';
296
+
297
+ self::$upload_bulk_edit_args = $request;
298
+ self::$upload_bulk_edit_map = $custom_field_map;
299
+ }
300
+
301
+ return $request;
302
+ } // mla_list_table_bulk_action_initial_request
303
+
304
+ /**
305
+ * Custom Field Map during "Upload New Media"
306
+ *
307
+ * @since 2.11
308
+ *
309
+ * @var array [ id ] => field name
310
+ */
311
+ private static $upload_bulk_edit_map = NULL;
312
+
313
+ /**
314
+ * Bulk Edit parameters during "Upload New Media"
315
+ *
316
+ * @since 2.11
317
+ *
318
+ * @var array [ field ] => new value
319
+ */
320
+ private static $upload_bulk_edit_args = NULL;
321
+
322
+ /**
323
+ * Converts Bulk Edit taxonomy inputs to language-specific values
324
+ *
325
+ * @since 2.11
326
+ *
327
+ * @param array $request bulk action request parameters, including ['mla_bulk_action_do_cleanup'].
328
+ * @param string $bulk_action the requested action.
329
+ * @param integer $post_id the affected attachment.
330
+ * @param array $custom_field_map [ slug => field_name ]
331
+ *
332
+ * @return array updated bulk action request parameters
333
+ */
334
+ public static function mla_list_table_bulk_action_item_request( $request, $bulk_action, $post_id, $custom_field_map ) {
335
+ if ( 'edit' == $bulk_action && ( ! empty( $request['tax_input'] ) ) && ( 'checked' == MLAOptions::mla_get_option( 'term_assignment', false, false, MLA_WPML::$mla_language_option_definitions ) ) ) {
336
+ self::_build_existing_terms( $post_id );
337
+ self::_build_tax_input( $post_id, $request['tax_input'], $request['tax_action'] );
338
+ $request['tax_input'] = self::_apply_tax_input( $post_id );
339
+ }
340
+
341
+ return $request;
342
+ } // mla_list_table_bulk_action_item_request
343
+
344
+ /**
345
+ * Add a duplicate translation for an item, then redirect to the Media/Edit Media screen
346
+ *
347
+ * @since 2.11
348
+ *
349
+ * @param string $mla_admin_action the requested action.
350
+ * @param integer $mla_item_ID zero (0), or the affected attachment.
351
+ */
352
+ public static function mla_list_table_custom_admin_action( $mla_admin_action, $mla_item_ID ) {
353
+ if ( 'wpml_create_translation' == $mla_admin_action ) {
354
+ $new_item = WPML_Media::create_duplicate_attachment( $mla_item_ID, $_REQUEST['mla_parent_ID'], $_REQUEST['lang'] );
355
+ $view_args = isset( $_REQUEST['mla_source'] ) ? array( 'mla_source' => $_REQUEST['mla_source']) : array();
356
+ wp_redirect( add_query_arg( $view_args, admin_url( 'post.php' ) . '?action=edit&post=' . $new_item . '&message=201' ), 302 );
357
+ exit;
358
+ }
359
+ } // mla_list_table_custom_admin_action
360
+
361
+ /**
362
+ * Adds translation update message for display at the top of the Edit Media screen
363
+ *
364
+ * @since 2.11
365
+ *
366
+ * @param array messages for the Edit screen
367
+ *
368
+ * @return array updated messages
369
+ */
370
+ public static function post_updated_messages( $messages ) {
371
+ if ( isset( $messages['attachment'] ) ) {
372
+ $messages['attachment'][201] = __( 'Duplicate translation created; update as desired.', 'media-library-assistant' );
373
+ }
374
+
375
+ return $messages;
376
+ } // mla_post_updated_messages_filter
377
+
378
+ /**
379
+ * Taxonomy terms and translations
380
+ *
381
+ * @since 2.11
382
+ *
383
+ * @var array [ $term_taxonomy_id ] => array( $term, $details, $translations )
384
+ */
385
+ private static $relevant_terms = array();
386
+
387
+ /**
388
+ * Adds a term and its translations to $relevant_terms
389
+ *
390
+ * @since 2.11
391
+ * @uses MLA_WPML::$relevant_terms
392
+ *
393
+ * @param object WordPress term object
394
+ * @param object Sitepress translations object; optional
395
+ */
396
+ private static function _add_relevant_term( $term, $translations = NULL ) {
397
+ global $sitepress;
398
+
399
+ if ( ! array_key_exists( $term->term_taxonomy_id, self::$relevant_terms ) ) {
400
+ $taxonomy_name = 'tax_' . $term->taxonomy;
401
+ $details = $sitepress->get_element_language_details( $term->term_taxonomy_id, $taxonomy_name );
402
+
403
+ if ( empty( $translations ) ) {
404
+ $translations = $sitepress->get_element_translations( $details->trid, $taxonomy_name );
405
+ }
406
+
407
+ self::$relevant_terms[ $term->term_taxonomy_id ]['term'] = $term;
408
+ self::$relevant_terms[ $term->term_taxonomy_id ]['translations'] = $translations;
409
+ }
410
+
411
+ return self::$relevant_terms[ $term->term_taxonomy_id ];
412
+ } // mla_post_updated_messages_filter
413
+
414
+ /**
415
+ * Finds a $relevant_term (if defined) given a key and (optional) a language
416
+ *
417
+ * @since 2.11
418
+ * @uses MLA_WPML::$relevant_terms
419
+ *
420
+ * @param string $field to search in; 'id', 'name', or 'term_taxonomy_id'
421
+ * @param mixed $value to search for; integer, string or integer
422
+ * @param string $taxonomy to search in; slug
423
+ * @param string $language code; string; optional
424
+ */
425
+ private static function _get_relevant_term( $field, $value, $taxonomy, $language = NULL ) {
426
+ /*
427
+ * WordPress encodes special characters, e.g., "&" as HTML entities in term names
428
+ */
429
+ if ( 'name' == $field ) {
430
+ $value = _wp_specialchars( $value );
431
+ }
432
+
433
+ $relevant_term = false;
434
+ foreach( self::$relevant_terms as $term_taxonomy_id => $candidate ) {
435
+ if ( $taxonomy != $candidate['term']->taxonomy ) {
436
+ continue;
437
+ }
438
+
439
+ switch ( $field ) {
440
+ case 'id':
441
+ if ( $value == $candidate['term']->term_id ) {
442
+ $relevant_term = $candidate;
443
+ }
444
+ break;
445
+ case 'name':
446
+ if ( $value == $candidate['term']->name ) {
447
+ $relevant_term = $candidate;
448
+ }
449
+ break;
450
+ case 'term_taxonomy_id':
451
+ if ( $value == $term_taxonomy_id ) {
452
+ $relevant_term = $candidate;
453
+ }
454
+ break;
455
+ } // field
456
+
457
+ if ( ! empty( $relevant_term ) ) {
458
+ break;
459
+ }
460
+ } // relevant term
461
+
462
+ /*
463
+ * If no match; try to add it and its translations
464
+ */
465
+ if ( ( false === $relevant_term ) && $candidate = get_term_by( $field, $value, $taxonomy ) ) {
466
+ $relevant_term = self::_add_relevant_term( $candidate );
467
+
468
+ foreach ( $relevant_term['translations'] as $translation ) {
469
+ if ( array_key_exists( $translation->element_id, self::$relevant_terms ) ) {
470
+ continue;
471
+ }
472
+
473
+ $term_object = get_term_by( 'term_taxonomy_id', $translation->element_id, $taxonomy );
474
+ self::_add_relevant_term( $term_object, $relevant_term['translations'] );
475
+ } // translation
476
+ } // new term
477
+
478
+ /*
479
+ * Find the language-specific value, if requested
480
+ */
481
+ if ( $relevant_term && ! empty( $language ) ) {
482
+ if ( $relevant_term && array_key_exists( $language, $relevant_term['translations'] ) ) {
483
+ $relevant_term = self::$relevant_terms[ $relevant_term['translations'][ $language ]->element_id ];
484
+ } else {
485
+ $relevant_term = false;
486
+ }
487
+ }
488
+
489
+ return $relevant_term;
490
+ }
491
+
492
+ /**
493
+ * Taxonomy terms for the current item translation in the database
494
+ *
495
+ * @since 2.11
496
+ *
497
+ * @var array ['element_id'] => $post_id;
498
+ * [ $language ][ translation_details ]
499
+ * [ $language ][ $taxonomy ][ $term_taxonomy_id ] => $term
500
+ */
501
+ private static $existing_terms = array( 'element_id' => 0 );
502
+
503
+ /**
504
+ * Build the $existing_terms array
505
+ *
506
+ * Takes each translatable taxonomy and builds an array of
507
+ * language-specific term_id to term_id/term_name mappings
508
+ * for terms already assigned to the item translation.
509
+ *
510
+ * @since 2.11
511
+ * @uses MLA_WPML::$existing_terms
512
+ * @uses MLA_WPML::$relevant_terms
513
+ *
514
+ * @param integer $post_id ID of the current post
515
+ *
516
+ */
517
+ private static function _build_existing_terms( $post_id ) {
518
+ global $sitepress;
519
+
520
+ if ( $post_id == self::$existing_terms['element_id'] ) {
521
+ return;
522
+ }
523
+
524
+ $language_details = (array) $sitepress->get_element_language_details( $post_id, 'post_attachment' );
525
+ $translations = array();
526
+ foreach ( $sitepress->get_element_translations( $language_details['trid'], 'post_attachment' ) as $language_code => $translation ) {
527
+ $translations[ $language_code ] = (array) $translation;
528
+ }
529
+
530
+ self::$existing_terms = array_merge( array( 'element_id' => $post_id ), $language_details, $translations );
531
+ $taxonomies = $sitepress->get_translatable_taxonomies( true, 'attachment' );
532
+
533
+ /*
534
+ * Find all assigned terms and build term_master array
535
+ */
536
+ foreach ( $translations as $language_code => $translation ) {
537
+ foreach ( $taxonomies as $taxonomy_name ) {
538
+ if ( $terms = get_the_terms( $translation['element_id'], $taxonomy_name ) ) {
539
+ foreach ( $terms as $term ) {
540
+ self::_add_relevant_term( $term );
541
+ self::$existing_terms[ $language_code ][ $taxonomy_name ][ $term->term_taxonomy_id ] = $term;
542
+ } // term
543
+ } else {
544
+ self::$existing_terms[ $language_code ][ $taxonomy_name ] = array();
545
+ }
546
+ } // taxonomy
547
+ } // translation
548
+
549
+ /*
550
+ * Add missing translated terms to the term_master array
551
+ */
552
+ foreach ( self::$relevant_terms as $term ) {
553
+ foreach ( $term['translations'] as $translation ) {
554
+ if ( array_key_exists( $translation->element_id, self::$relevant_terms ) ) {
555
+ continue;
556
+ }
557
+
558
+ $term_object = get_term_by( 'term_taxonomy_id', $translation->element_id, $term['term']->taxonomy );
559
+ self::_add_relevant_term( $term_object, $term['translations'] );
560
+ } // translation
561
+ } // term
562
+
563
+ return;
564
+ }
565
+
566
+ /**
567
+ * Update the $existing_terms array
568
+ *
569
+ * Takes each translatable taxonomy and rebuilds the array of
570
+ * language-specific term_id to term_id/term_name mappings
571
+ * for the "current translation" represented by the $post_id.
572
+ *
573
+ * @since 2.11
574
+ * @uses MLA_WPML::$existing_terms
575
+ * @uses MLA_WPML::$relevant_terms
576
+ *
577
+ * @param integer $post_id ID of the current post
578
+ *
579
+ * @return array ( taxonomy => term assignments ) before the update
580
+ */
581
+ private static function _update_existing_terms( $post_id ) {
582
+ global $sitepress;
583
+
584
+ if ( $post_id != self::$existing_terms['element_id'] ) {
585
+ return false;
586
+ }
587
+
588
+ $language_code = self::$existing_terms['language_code'];
589
+ $translation = self::$existing_terms[ $language_code ];
590
+ $terms_before = array();
591
+
592
+ /*
593
+ * Find all assigned terms and update the array
594
+ */
595
+ $taxonomies = $sitepress->get_translatable_taxonomies( true, 'attachment' );
596
+ foreach ( $taxonomies as $taxonomy_name ) {
597
+ $terms_before[ $taxonomy_name ] = isset( $translation[ $taxonomy_name ] ) ? $translation[ $taxonomy_name ] : array();
598
+ $translation[ $taxonomy_name ] = array();
599
+ if ( $terms = get_the_terms( $post_id, $taxonomy_name ) ) {
600
+ foreach ( $terms as $term ) {
601
+ self::_add_relevant_term( $term );
602
+ $translation[ $taxonomy_name ][ $term->term_taxonomy_id ] = $term;
603
+ } // term
604
+ }
605
+ } // taxonomy
606
+
607
+ self::$existing_terms[ $language_code ] = $translation;
608
+
609
+ /*
610
+ * Add missing translated terms to the term_master array
611
+ */
612
+ foreach ( self::$relevant_terms as $term ) {
613
+ foreach ( $term['translations'] as $translation ) {
614
+ if ( array_key_exists( $translation->element_id, self::$relevant_terms ) ) {
615
+ continue;
616
+ }
617
+
618
+ $term_object = get_term_by( 'term_taxonomy_id', $translation->element_id, $term['term']->taxonomy );
619
+ self::_add_relevant_term( $term_object, $term['translations'] );
620
+ } // translation
621
+ } // term
622
+
623
+ return $terms_before;
624
+ }
625
+
626
+ /**
627
+ * Replacement tax_input values in all languages
628
+ *
629
+ * @since 2.11
630
+ *
631
+ * @var array ['tax_input_post_id'] => $post_id;
632
+ * [ $language ][ $taxonomy ] => array of integer term_ids (hierarchical)
633
+ * [ $language ][ $taxonomy ] => comma-delimited string of term names (flat)
634
+ */
635
+ private static $tax_input = array( 'tax_input_post_id' => 0 );
636
+
637
+ /**
638
+ * Build the $tax_input array
639
+ *
640
+ * Takes each term from the $tax_inputs parameter and builds an array of
641
+ * language-specific term_id to term_id/term_name mappings for all languages.
642
+ *
643
+ * @since 2.11
644
+ * @uses MLA_WPML::$tax_input
645
+ * @uses MLA_WPML::$existing_terms
646
+ *
647
+ * @param integer $post_id ID of the current post
648
+ * @param array $tax_inputs 'tax_input' request parameter
649
+ * @param array $tax_actions 'tax_action' request parameter
650
+ */
651
+ private static function _build_tax_input( $post_id, $tax_inputs = NULL, $tax_actions = NULL ) {
652
+ global $sitepress;
653
+
654
+ if ( $post_id == self::$tax_input['tax_input_post_id'] ) {
655
+ return;
656
+ }
657
+
658
+ self::$tax_input = array( 'tax_input_post_id' => $post_id );
659
+ $active_languages = $sitepress->get_active_languages();
660
+
661
+ /*
662
+ * See if we are cloning/"replacing" the existing assignments
663
+ */
664
+ if ( ( NULL == $tax_inputs ) && ( NULL == $tax_actions ) && isset( self::$existing_terms['element_id'] ) && ($post_id == self::$existing_terms['element_id'] ) ) {
665
+ $translation = self::$existing_terms[ self::$existing_terms['language_code'] ];
666
+ $taxonomies = $sitepress->get_translatable_taxonomies( true, 'attachment' );
667
+ $tax_inputs = array();
668
+ $no_terms = true;
669
+ foreach ( $taxonomies as $taxonomy_name ) {
670
+ $terms = isset( $translation[ $taxonomy_name ] ) ? $translation[ $taxonomy_name ] : array();
671
+ if ( ! empty( $terms ) ) {
672
+ $no_terms = false;
673
+ $taxonomy = get_taxonomy( $taxonomy_name );
674
+ $input_terms = array();
675
+ foreach ( $terms as $term ) {
676
+ if ( $taxonomy->hierarchical ) {
677
+ $input_terms[] = $term->term_id;
678
+ } else {
679
+ $input_terms[] = $term->name;
680
+ }
681
+ } // term
682
+
683
+ if ( $taxonomy->hierarchical ) {
684
+ $tax_inputs[ $taxonomy_name ] = $input_terms;
685
+ } else {
686
+ $tax_inputs[ $taxonomy_name ] = implode( ',', $input_terms );
687
+ }
688
+ } else {
689
+ $tax_inputs[ $taxonomy_name ] = array();
690
+ }
691
+ } // taxonomy_name
692
+
693
+ if ( $no_terms ) {
694
+ foreach( $active_languages as $language => $language_details ) {
695
+ self::$tax_input[ $language ] = array();
696
+ }
697
+
698
+ return;
699
+ }
700
+ } // cloning
701
+
702
+ foreach ( $tax_inputs as $taxonomy => $terms ) {
703
+ $tax_action = isset( $tax_actions[ $taxonomy ] ) ? $tax_actions[ $taxonomy ] : 'replace';
704
+ $input_terms = array();
705
+ // hierarchical taxonomy => array of term_id integer values; flat => comma-delimited string of names
706
+ if ( $hierarchical = is_array( $terms ) ) {
707
+
708
+ foreach( $terms as $term ) {
709
+ if ( 0 == $term ) {
710
+ continue;
711
+ }
712
+
713
+ $relevant_term = self::_get_relevant_term( 'term_id', $term, $taxonomy );
714
+ if ( isset( $relevant_term['translations'] ) ) {
715
+ foreach ( $relevant_term['translations'] as $language => $translation ) {
716
+ if ($translated_term = self::_get_relevant_term( 'term_taxonomy_id', $translation->element_id, $taxonomy ) ) {
717
+ $input_terms[ $language ][ $translation->element_id ] = $translated_term['term'];
718
+ }
719
+ } // for each language
720
+ } // translations exist
721
+ } // foreach term
722
+ } else {
723
+ // Convert names to an array
724
+ $term_names = array_map( 'trim', explode( ',', $terms ) );
725
+
726
+ foreach ( $term_names as $term_name ) {
727
+ if ( ! empty( $term_name ) ) {
728
+ $relevant_term = self::_get_relevant_term( 'name', $term_name, $taxonomy );
729
+ if ( isset( $relevant_term['translations'] ) ) {
730
+ foreach ( $relevant_term['translations'] as $language => $translation ) {
731
+ if ( $translated_term = self::_get_relevant_term( 'term_taxonomy_id', $translation->element_id, $taxonomy ) ) {
732
+ $input_terms[ $language ][ $translation->element_id ] = $translated_term['term'];
733
+ }
734
+ } // for each language
735
+ } // translations exist
736
+ } // not empty
737
+ } // foreach name
738
+ } // flat taxonomy
739
+
740
+ foreach( $active_languages as $language => $language_details ) {
741
+ /*
742
+ * Apply the tax_action to the terms_before to find the terms_after
743
+ */
744
+ $term_changes = isset( $input_terms[ $language ] ) ? $input_terms[ $language ] : array();
745
+ if ( 'replace' == $tax_action ) {
746
+ $terms_after = $term_changes;
747
+ } else {
748
+ $terms_after = isset( self::$existing_terms[ $language ][ $taxonomy ] ) ? self::$existing_terms[ $language ][ $taxonomy ] : array();
749
+
750
+ foreach( $term_changes as $term_taxonomy_id => $input_term ) {
751
+ if ( 'add' == $tax_action ) {
752
+ $terms_after[ $term_taxonomy_id ] = $input_term;
753
+ } else {
754
+ unset( $terms_after[ $term_taxonomy_id ] );
755
+ }
756
+ } // input_term
757
+ }
758
+
759
+ /*
760
+ * Convert terms_after to tax_input format
761
+ */
762
+ $term_changes = array();
763
+ foreach( $terms_after as $input_term ) {
764
+ if ( $hierarchical ) {
765
+ $term_changes[] = $input_term->term_id;
766
+ } else {
767
+ $term_changes[] = $input_term->name;
768
+ }
769
+ } // input_term
770
+
771
+ if ( $hierarchical ) {
772
+ self::$tax_input[ $language ][ $taxonomy ] = $term_changes;
773
+ } else {
774
+ self::$tax_input[ $language ][ $taxonomy ] = implode( ',', $term_changes );
775
+ }
776
+ } // language
777
+
778
+ } // foreach taxonomy
779
+ } // _build_tax_input
780
+
781
+ /**
782
+ * Filter the $tax_input array to a specific language
783
+ *
784
+ * @since 2.11
785
+ * @uses MLA_WPML::$tax_input
786
+ * @uses MLA_WPML::$existing_terms
787
+ *
788
+ * @param integer $post_id ID of the post to be updated
789
+ * @param string $post_language explicit language_code; optional
790
+ *
791
+ * @return array language-specific $tax_inputs
792
+ */
793
+ private static function _apply_tax_input( $post_id, $post_language = NULL ) {
794
+ global $sitepress;
795
+
796
+ if ( NULL == $post_language ) {
797
+ if ( isset( self::$existing_terms['element_id'] ) && $post_id == self::$existing_terms['element_id'] ) {
798
+ $post_language = self::$existing_terms['language_code'];
799
+ } else {
800
+ $post_language = $sitepress->get_element_language_details( $post_id, 'post_attachment' );
801
+ $post_language = $post_language->language_code;
802
+ }
803
+ }
804
+
805
+ return self::$tax_input[ $post_language ];
806
+ } // _apply_tax_input
807
+
808
+ /**
809
+ * Compute Term Synchronization replacement $tax_inputs
810
+ *
811
+ * Assumes the "current post" in $existing_terms is the source
812
+ * and $existing_terms contains the target translation
813
+ *
814
+ * @since 2.11
815
+ * @uses MLA_WPML::$existing_terms
816
+ *
817
+ * @param string $language the target translation code
818
+ * @param array $terms_before source terms before updates/Term Assignment
819
+ *
820
+ * @return array $tax_inputs for Term Synchronization
821
+ */
822
+ private static function _apply_synch_input( $language, $terms_before ) {
823
+ // Make sure there IS a target translation
824
+ if ( empty( self::$existing_terms[ $language ] ) ) {
825
+ return false;
826
+ }
827
+
828
+ $terms_after = self::$existing_terms[ self::$existing_terms['language_code'] ];
829
+
830
+ /*
831
+ * Remove terms in common, leaving terms_after => add, terms_before => remove
832
+ */
833
+ foreach ( $terms_before as $taxonomy => $terms ) {
834
+ foreach ( $terms as $ttid => $term ) {
835
+ if ( isset( $terms_after[ $taxonomy ][ $ttid ] ) ) {
836
+ unset( $terms_before[ $taxonomy ][ $ttid ] );
837
+ unset( $terms_after[ $taxonomy ][ $ttid ] );
838
+ }
839
+ } // terms
840
+ } // taxonomies
841
+
842
+ /*
843
+ * Compute "replace" tax_inputs for the target translation
844
+ */
845
+ $translation = self::$existing_terms[ $language ];
846
+ $synch_inputs = array();
847
+
848
+ foreach ( $terms_before as $taxonomy => $terms ) {
849
+ $translation_terms = isset( $translation[ $taxonomy ] ) ? $translation[ $taxonomy ] : array();
850
+ $terms_changed = false;
851
+
852
+ // Remove common terms
853
+ foreach ( $terms_before[ $taxonomy ] as $ttid => $term ) {
854
+ if ( isset( self::$relevant_terms[ $ttid ]['translations'][ $language ] ) ) {
855
+ $ttid = self::$relevant_terms[ $ttid ]['translations'][ $language ]->element_id;
856
+ if ( isset( $translation_terms[ $ttid ] ) ) {
857
+ unset( $translation_terms[ $ttid ] );
858
+ $terms_changed = true;
859
+ }
860
+ }
861
+ }
862
+
863
+ // Add common terms
864
+ foreach ( $terms_after[ $taxonomy ] as $ttid => $term ) {
865
+ if ( isset( self::$relevant_terms[ $ttid ]['translations'][ $language ] ) ) {
866
+ $term_translation = self::$relevant_terms[ $ttid ]['translations'][ $language ];
867
+ $ttid = $term_translation->element_id;
868
+ if ( ! isset( $translation_terms[ $ttid ] ) ) {
869
+ $translation_terms[ $ttid ] = (object) array( 'term_id' => absint( $term_translation->term_id ), 'name' => $term_translation->name );
870
+ $terms_changed = true;
871
+ }
872
+ }
873
+ }
874
+
875
+ if ( $terms_changed ) {
876
+ $synch_inputs[ $taxonomy ] = $translation_terms;
877
+ }
878
+ } // taxonomies
879
+
880
+ /*
881
+ * Convert synch terms to $tax_inputs format
882
+ */
883
+ $tax_inputs = array();
884
+ foreach ( $synch_inputs as $taxonomy_name => $terms ) {
885
+ $taxonomy = get_taxonomy( $taxonomy_name );
886
+ $input_terms = array();
887
+ foreach ( $terms as $term ) {
888
+ if ( $taxonomy->hierarchical ) {
889
+ $input_terms[] = $term->term_id;
890
+ } else {
891
+ $input_terms[] = $term->name;
892
+ }
893
+ } // term
894
+
895
+ if ( $taxonomy->hierarchical ) {
896
+ $tax_inputs[ $taxonomy_name ] = $input_terms;
897
+ } else {
898
+ $tax_inputs[ $taxonomy_name ] = implode( ',', $input_terms );
899
+ }
900
+ } // synch_inputs
901
+
902
+ return $tax_inputs;
903
+ } // _apply_synch_input
904
+
905
+ /**
906
+ * Captures "before update" term assignments from the Media/Edit Media screen
907
+ *
908
+ * @since 2.11
909
+ *
910
+ * @param bool $maybe_empty Whether the post should be considered "empty".
911
+ * @param array $postarr Array of post data.
912
+ */
913
+ public static function wp_insert_post_empty_content( $maybe_empty, $postarr ) {
914
+ global $sitepress;
915
+
916
+ if ( isset( $_REQUEST['action'] ) && 'editpost' == $_REQUEST['action'] && isset( $_REQUEST['post_ID'] ) ) {
917
+ self::_build_existing_terms( $_REQUEST['post_ID'] );
918
+ }
919
+
920
+ return $maybe_empty;
921
+ } // wp_insert_post_empty_content
922
+
923
+ /**
924
+ * Duplicates created during media upload
925
+ *
926
+ * @since 2.11
927
+ *
928
+ * @var array [ $post_id ] => $language;
929
+ */
930
+ private static $duplicate_attachments = array();
931
+
932
+ /**
933
+ * Copies taxonomy terms from the source item to the new translated item
934
+ *
935
+ * @since 2.11
936
+ *
937
+ * @param integer ID of the source item
938
+ * @param integer ID of the new item
939
+ */
940
+ public static function wpml_media_create_duplicate_attachment( $attachment_id, $duplicated_attachment_id ) {
941
+ global $sitepress;
942
+ static $already_adding = 0;
943
+
944
+ if ( $already_adding == $duplicated_attachment_id ) {
945
+ return;
946
+ } else {
947
+ $already_adding = $duplicated_attachment_id;
948
+ }
949
+
950
+ $language_details = $sitepress->get_element_language_details( $duplicated_attachment_id, 'post_attachment' );
951
+ self::$duplicate_attachments [ $duplicated_attachment_id ] = $language_details->language_code;
952
+
953
+ if ( isset( $_REQUEST['mla_admin_action'] ) && 'wpml_create_translation' == $_REQUEST['mla_admin_action'] ) {
954
+ if ( 'checked' == MLAOptions::mla_get_option( 'term_synchronization', false, false, MLA_WPML::$mla_language_option_definitions ) ) {
955
+ // Clone the existing common terms to the new translation
956
+ self::_build_existing_terms( $attachment_id );
957
+ self::_build_tax_input( $attachment_id );
958
+ $tax_inputs = self::_apply_tax_input( 0, $language_details->language_code );
959
+ } else {
960
+ $tax_inputs = NULL;
961
+ }
962
+
963
+ if ( !empty( $tax_inputs ) ) {
964
+ MLAData::mla_update_single_item( $duplicated_attachment_id, array(), $tax_inputs );
965
+ }
966
+
967
+ self::$existing_terms = array( 'element_id' => 0 );
968
+ self::$relevant_terms = array();
969
+ } // wpml_create_translation
970
+ } // wpml_media_create_duplicate_attachment
971
+
972
+ /**
973
+ * Filters taxonomy updates by language.
974
+ *
975
+ * @since 2.11
976
+ *
977
+ * @param integer ID of the current post
978
+ */
979
+ public static function edit_attachment( $post_id ) {
980
+ static $already_updating = 0;
981
+
982
+ /*
983
+ * mla_update_single_item eventually calls this action again
984
+ */
985
+ if ( $already_updating == $post_id ) {
986
+ return;
987
+ } else {
988
+ $already_updating = $post_id;
989
+ }
990
+
991
+ /*
992
+ * Check for Bulk Edit during Add New Media
993
+ */
994
+ if ( is_array( self::$upload_bulk_edit_args ) ) {
995
+ if ( ! empty( self::$upload_bulk_edit_args['tax_input'] ) ) {
996
+ $tax_inputs = self::$upload_bulk_edit_args['tax_input'];
997
+ if ( 'checked' == MLAOptions::mla_get_option( 'term_assignment', false, false, MLA_WPML::$mla_language_option_definitions ) ) {
998
+ self::_build_tax_input( $post_id, $tax_inputs, self::$upload_bulk_edit_args['tax_action'] );
999
+ $tax_inputs = self::_apply_tax_input( $post_id );
1000
+ }
1001
+ } else {
1002
+ $tax_inputs = NULL;
1003
+ }
1004
+
1005
+ $updates = MLA::mla_prepare_bulk_edits( $post_id, self::$upload_bulk_edit_args, self::$upload_bulk_edit_map );
1006
+ unset( $updates['tax_input'] );
1007
+ unset( $updates['tax_action'] );
1008
+
1009
+ MLAData::mla_update_single_item( $post_id, $updates, $tax_inputs );
1010
+
1011
+ /*
1012
+ * Synchronize the changes to all other translations
1013
+ */
1014
+ if ( 'checked' == MLAOptions::mla_get_option( 'term_synchronization', false, false, MLA_WPML::$mla_language_option_definitions ) ) {
1015
+ foreach( self::$tax_input as $language => $tax_inputs ) {
1016
+ /*
1017
+ * Skip 'tax_input_post_id' and the language we've already updated
1018
+ */
1019
+ if ( ( ! isset( self::$existing_terms[ $language ] ) ) || ( self::$existing_terms['language_code'] == $language ) ) {
1020
+ continue;
1021
+ }
1022
+
1023
+ // Other translations have no existing terms, so we don't need _apply_synch_input()
1024
+ $translation = self::$existing_terms[ $language ];
1025
+ $tax_inputs = self::_apply_tax_input( $translation['element_id'], $language );
1026
+ $already_updating = $translation['element_id']; // prevent recursion
1027
+ MLAData::mla_update_single_item( $translation['element_id'], $updates, $tax_inputs );
1028
+ $already_updating = $post_id;
1029
+ } // translation
1030
+ } // do synchronization
1031
+
1032
+ return;
1033
+ } // Upload New Media Bulk Edit
1034
+
1035
+ /*
1036
+ * The category taxonomy (edit screens) is a special case because
1037
+ * post_categories_meta_box() changes the input name
1038
+ */
1039
+ if ( isset( $_REQUEST['tax_input'] ) ) {
1040
+ $tax_inputs = $_REQUEST['tax_input'];
1041
+ } else {
1042
+ $tax_inputs = array();
1043
+ }
1044
+
1045
+ if ( isset( $_REQUEST['post_category'] ) ) {
1046
+ $tax_inputs['category'] = $_REQUEST['post_category'];
1047
+ }
1048
+
1049
+ if ( isset( $_REQUEST['tax_action'] ) ) {
1050
+ $tax_actions = $_REQUEST['tax_action'];
1051
+ } else {
1052
+ $tax_actions = NULL;
1053
+ }
1054
+
1055
+ if ( ( ! empty( $tax_inputs ) ) && ( 'checked' == MLAOptions::mla_get_option( 'term_assignment', false, false, MLA_WPML::$mla_language_option_definitions ) ) ) {
1056
+ self::_build_tax_input( $post_id, $tax_inputs, $tax_actions );
1057
+ $tax_inputs = self::_apply_tax_input( $post_id );
1058
+ }
1059
+
1060
+ if ( ! empty( $tax_inputs ) ) {
1061
+ MLAData::mla_update_single_item( $post_id, array(), $tax_inputs );
1062
+
1063
+ /*
1064
+ * Synchronize the changes to all other translations
1065
+ */
1066
+ if ( 'checked' == MLAOptions::mla_get_option( 'term_synchronization', false, false, MLA_WPML::$mla_language_option_definitions ) ) {
1067
+
1068
+ /*
1069
+ * Update terms because they have changed
1070
+ */
1071
+ $terms_before = self::_update_existing_terms( $post_id );
1072
+
1073
+ // $tax_input is a convenient source of language codes; ignore $tax_inputs
1074
+ foreach( self::$tax_input as $language => $tax_inputs ) {
1075
+ /*
1076
+ * Skip 'tax_input_post_id' and the language we've already updated
1077
+ */
1078
+ if ( ( ! isset( self::$existing_terms[ $language ] ) ) || ( self::$existing_terms['language_code'] == $language ) ) {
1079
+ continue;
1080
+ }
1081
+
1082
+ $tax_inputs = self::_apply_synch_input( $language, $terms_before );
1083
+ $translation = self::$existing_terms[ $language ]['element_id'];
1084
+ $already_updating = $translation; // prevent recursion
1085
+ MLAData::mla_update_single_item( $translation, array(), $tax_inputs );
1086
+ $already_updating = $post_id;
1087
+ } // translation
1088
+ } // do synchronization
1089
+ } // $tax_inputs
1090
+ } // edit_attachment
1091
+
1092
+ /**
1093
+ * Adds the "Language" tab to the Settings/Media Library Assistant list
1094
+ *
1095
+ * @since 2.11
1096
+ *
1097
+ * @param array|false The entire tablist ( $tab = NULL ), a single tab entry or false if not found/not allowed.
1098
+ * @param array The entire default tablist
1099
+ * @param string|NULL tab slug for single-element return or NULL to return entire tablist
1100
+ *
1101
+ * @return array updated tablist or single tab element
1102
+ */
1103
+ public static function mla_get_options_tablist( $results, $mla_tablist, $tab ) {
1104
+ $language_key = 'language';
1105
+ $language_value = array( 'title' => __( 'Language', 'media-library-assistant' ), 'render' => array( 'MLA_WPML', 'mla_render_language_tab' ) );
1106
+
1107
+ if ( $language_key == $tab ) {
1108
+ return $language_value;
1109
+ }
1110
+
1111
+ return array_merge( $results, array( $language_key => $language_value ) );
1112
+ }
1113
+
1114
+ /**
1115
+ * $mla_language_option_definitions defines the language-specific database options and
1116
+ * admin page areas for setting/updating them
1117
+ *
1118
+ * The array must be populated at runtime in MLA_WPML::mla_localize_language_option_definitions(),
1119
+ * because localization calls cannot be placed in the "public static" array definition itself.
1120
+ *
1121
+ * Each option is defined by an array with the elements documented in class-mla-options.php
1122
+ */
1123
+
1124
+ public static $mla_language_option_definitions = array ();
1125
+
1126
+ /**
1127
+ * Localize $mla_language_option_definitions array
1128
+ *
1129
+ * Localization must be done at runtime, and these calls cannot be placed
1130
+ * in the "public static" array definition itself.
1131
+ *
1132
+ * @since 2.11
1133
+ *
1134
+ * @return void
1135
+ */
1136
+ public static function mla_localize_language_option_definitions() {
1137
+ MLA_WPML::$mla_language_option_definitions = array (
1138
+ 'media_assistant_table_header' =>
1139
+ array('tab' => 'language',
1140
+ 'name' => __( 'Media/Assistant submenu table', 'media-library-assistant' ),
1141
+ 'type' => 'header'),
1142
+
1143
+ 'language_column' =>
1144
+ array('tab' => 'language',
1145
+ 'name' => __( 'Language Column', 'media-library-assistant' ),
1146
+ 'type' => 'checkbox',
1147
+ 'std' => 'checked',
1148
+ 'help' => __( 'Check this option to add a Language column to the Media/Assistant submenu table.', 'media-library-assistant' )),
1149
+
1150
+ 'translations_column' =>
1151
+ array('tab' => 'language',
1152
+ 'name' => __( 'Translations Column', 'media-library-assistant' ),
1153
+ 'type' => 'checkbox',
1154
+ 'std' => 'checked',
1155
+ 'help' => __( 'Check this option to add a Translation Status column to the Media/Assistant submenu table.', 'media-library-assistant' )),
1156
+
1157
+ 'term_translation_header' =>
1158
+ array('tab' => 'language',
1159
+ 'name' => __( 'Term Management', 'media-library-assistant' ),
1160
+ 'type' => 'header'),
1161
+
1162
+ 'term_assignment' =>
1163
+ array('tab' => 'language',
1164
+ 'name' => __( 'Term Assignment', 'media-library-assistant' ),
1165
+ 'type' => 'checkbox',
1166
+ 'std' => 'checked',
1167
+ 'help' => __( 'Check this option to assign language-specific terms when items are updated.'), 'media-library-assistant' ),
1168
+
1169
+ 'term_synchronization' =>
1170
+ array('tab' => 'language',
1171
+ 'name' => __( 'Term Synchronization', 'media-library-assistant' ),
1172
+ 'type' => 'checkbox',
1173
+ 'std' => 'checked',
1174
+ 'help' => __( 'Check this option to synchronize common terms among all item translations.'), 'media-library-assistant' ),
1175
+ );
1176
+ }
1177
+
1178
+ /**
1179
+ * Renders the Settings/Media Library Assistant "Language" tab
1180
+ *
1181
+ * @since 2.11
1182
+ *
1183
+ * @return array ( 'message' => '', 'body' => '' )
1184
+ */
1185
+ public static function mla_render_language_tab() {
1186
+ $page_content = array(
1187
+ 'message' => '',
1188
+ 'body' => '<h3>Language</h3>'
1189
+ );
1190
+
1191
+ /*
1192
+ * Check for submit buttons to change or reset settings.
1193
+ * Initialize page messages and content.
1194
+ */
1195
+ if ( !empty( $_REQUEST['mla-language-options-save'] ) ) {
1196
+ check_admin_referer( MLA::MLA_ADMIN_NONCE, '_wpnonce' );
1197
+ $page_content = self::_save_language_settings( );
1198
+ } elseif ( !empty( $_REQUEST['mla-language-options-reset'] ) ) {
1199
+ check_admin_referer( MLA::MLA_ADMIN_NONCE, '_wpnonce' );
1200
+ $page_content = self::_reset_language_settings( );
1201
+ } else {
1202
+ $page_content = array(
1203
+ 'message' => '',
1204
+ 'body' => ''
1205
+ );
1206
+ }
1207
+
1208
+ if ( !empty( $page_content['body'] ) ) {
1209
+ return $page_content;
1210
+ }
1211
+
1212
+ $page_values = array(
1213
+ 'Language Options' => __( 'Language Options', 'media-library-assistant' ),
1214
+ /* translators: 1: - 4: page subheader values */
1215
+ 'In this tab' => sprintf( __( 'In this tab you can find a number of options for controlling WPML-specific operations. Scroll down to find options for %1$s and %2$s. Be sure to click "Save Changes" at the bottom of the tab to save any changes you make.', 'media-library-assistant' ), '<strong>' . __( 'Media/Assistant submenu table', 'media-library-assistant' ) . '</strong>', '<strong>' . __( 'Term Management', 'media-library-assistant' ) . '</strong>' ),
1216
+ /* translators: 1: Documentation hyperlink */
1217
+ 'You can find' => sprintf( __( 'You can find more information about multilingual features in the %1$s section of the Documentation.', 'media-library-assistant' ), '<a href="[+settingsURL+]?page=mla-settings-menu-documentation&amp;mla_tab=documentation#mla_language_tab" title="' . __( 'Language Options documentation', 'media-library-assistant' ) . '">' . __( 'WPML &amp; Polylang Multilingual Support; the MLA Language Tab', 'media-library-assistant' ) . '</a>' ),
1218
+ 'settingsURL' => admin_url('options-general.php'),
1219
+ 'Save Changes' => __( 'Save Changes', 'media-library-assistant' ),
1220
+ 'Delete Language options' => __( 'Delete Language options and restore default settings', 'media-library-assistant' ),
1221
+ '_wpnonce' => wp_nonce_field( MLA::MLA_ADMIN_NONCE, '_wpnonce', true, false ),
1222
+ '_wp_http_referer' => wp_referer_field( false ),
1223
+ 'Go to Top' => __( 'Go to Top', 'media-library-assistant' ),
1224
+ 'form_url' => admin_url( 'options-general.php' ) . '?page=mla-settings-menu-language&mla_tab=language',
1225
+ 'options_list' => '',
1226
+ );
1227
+
1228
+ $options_list = '';
1229
+ foreach ( MLA_WPML::$mla_language_option_definitions as $key => $value ) {
1230
+ if ( 'language' == $value['tab'] ) {
1231
+ $options_list .= MLASettings::mla_compose_option_row( $key, $value, MLA_WPML::$mla_language_option_definitions );
1232
+ }
1233
+ }
1234
+
1235
+ $page_values['options_list'] = $options_list;
1236
+ $page_template = MLAData::mla_load_template( 'admin-display-language-tab.tpl' );
1237
+ $page_content['body'] = MLAData::mla_parse_template( $page_template, $page_values );
1238
+ return $page_content;
1239
+ }
1240
+
1241
+ /**
1242
+ * Save Language settings to the options table
1243
+ *
1244
+ * @since 2.11
1245
+ *
1246
+ * @uses $_REQUEST
1247
+ *
1248
+ * @return array Message(s) reflecting the results of the operation
1249
+ */
1250
+ private static function _save_language_settings( ) {
1251
+ $message_list = '';
1252
+
1253
+ foreach ( MLA_WPML::$mla_language_option_definitions as $key => $value ) {
1254
+ if ( 'language' == $value['tab'] ) {
1255
+ $message_list .= MLASettings::mla_update_option_row( $key, $value, MLA_WPML::$mla_language_option_definitions );
1256
+ } // language option
1257
+ } // foreach mla_options
1258
+
1259
+ $page_content = array(
1260
+ 'message' => __( 'Language settings saved.', 'media-library-assistant' ) . "\n",
1261
+ 'body' => ''
1262
+ );
1263
+
1264
+ /*
1265
+ * Uncomment this for debugging.
1266
+ */
1267
+ //$page_content['message'] .= $message_list;
1268
+
1269
+ return $page_content;
1270
+ } // _save_language_settings
1271
+
1272
+ /**
1273
+ * Delete saved settings, restoring default values
1274
+ *
1275
+ * @since 2.11
1276
+ *
1277
+ * @return array Message(s) reflecting the results of the operation
1278
+ */
1279
+ private static function _reset_language_settings( ) {
1280
+ $message_list = '';
1281
+
1282
+ foreach ( MLA_WPML::$mla_language_option_definitions as $key => $value ) {
1283
+ if ( 'language' == $value['tab'] ) {
1284
+ if ( 'custom' == $value['type'] && isset( $value['reset'] ) ) {
1285
+ $message = self::$value['reset']( 'reset', $key, $value, $_REQUEST );
1286
+ } elseif ( ('header' == $value['type']) || ('hidden' == $value['type']) ) {
1287
+ $message = '';
1288
+ } else {
1289
+ MLAOptions::mla_delete_option( $key, MLA_WPML::$mla_language_option_definitions );
1290
+ /* translators: 1: option name */
1291
+ $message = '<br>' . sprintf( _x( 'delete_option "%1$s"', 'message_list', 'media-library-assistant'), $key );
1292
+ }
1293
+
1294
+ $message_list .= $message;
1295
+ }
1296
+ }
1297
+
1298
+ $page_content = array(
1299
+ 'message' => __( 'Language settings reset to default values.', 'media-library-assistant' ) . "\n",
1300
+ 'body' => ''
1301
+ );
1302
+
1303
+ /*
1304
+ * Uncomment this for debugging.
1305
+ */
1306
+ //$page_content['message'] .= $message_list;
1307
+
1308
+ return $page_content;
1309
+ } // _reset_language_settings
1310
+ } // Class MLA_WPML
1311
+
1312
+ /**
1313
+ * Class MLA (Media Library Assistant) WPML List Table adds a reference to an MLA_WPML object
1314
+ *
1315
+ * Extends the MLA_List_Table class.
1316
+ *
1317
+ * @package Media Library Assistant
1318
+ * @since 2.11
1319
+ */
1320
+ class MLA_WPML_List_Table extends MLA_List_Table {
1321
+ /**
1322
+ * The MLA_WPML_Table support object
1323
+ *
1324
+ * @since 2.11
1325
+ *
1326
+ * @var object
1327
+ */
1328
+ protected $mla_wpml_table = NULL;
1329
+ }
1330
+
1331
+ /**
1332
+ * Class MLA (Media Library Assistant) WPML Table provides support for the WPML Multilingual CMS
1333
+ * family of plugins, including WPML Media, for an MLA_List_Table object.
1334
+ *
1335
+ * An instance of this class is created in the class MLA_List_Table constructor (class-mla-list-table.php).
1336
+ *
1337
+ * @package Media Library Assistant
1338
+ * @since 2.11
1339
+ */
1340
+ class MLA_WPML_Table {
1341
+ /**
1342
+ * Reference to the MLA_List_Table object this object supports
1343
+ *
1344
+ * @since 2.11
1345
+ *
1346
+ * @var object
1347
+ */
1348
+ protected $mla_list_table = NULL;
1349
+
1350
+ /**
1351
+ * The constructor contains add_action and add_filter calls.
1352
+ *
1353
+ * @since 2.11
1354
+ *
1355
+ * @param object $table The MLA_List_Table object this object supports
1356
+ *
1357
+ * @return void
1358
+ */
1359
+ function __construct( $table ) {
1360
+ /*
1361
+ * Save a reference to the parent MLA_List_Table object
1362
+ */
1363
+ $this->mla_list_table = $table;
1364
+
1365
+ /*
1366
+ * Defined in /wp-admin/includes/class-wp-list-table.php
1367
+ */
1368
+ // filter "views_{$this->screen->id}"
1369
+ add_filter( 'views_media_page_mla-menu', 'MLA_WPML_Table::mla_views_media_page_mla_menu_filter', 10, 1 );
1370
+
1371
+ /*
1372
+ * Defined in /media-library-assistant/includes/class-mla-list-table.php
1373
+ */
1374
+ add_filter( 'mla_list_table_submenu_arguments', array( $this, 'mla_list_table_submenu_arguments' ), 10, 2 );
1375
+ add_filter( 'mla_list_table_get_columns', array( $this, 'mla_list_table_get_columns' ), 10, 1 );
1376
+ add_filter( 'mla_list_table_column_default', array( $this, 'mla_list_table_column_default' ), 10, 3 );
1377
+
1378
+ /*
1379
+ * Defined in /plugins/wpml-media/inc/wpml-media.class.php
1380
+ */
1381
+ add_filter( 'wpml-media_view-upload-sql', array( $this, 'mla_wpml_media_view_upload_sql_filter' ), 10, 2 );
1382
+ add_filter( 'wpml-media_view-upload-count', array( $this, 'mla_wpml_media_view_upload_count_filter' ), 10, 4 );
1383
+ add_filter( 'wpml-media_view-upload-page-sql', array( $this, 'mla_wpml_media_view_upload_page_sql_filter' ), 10, 2 );
1384
+ add_filter( 'wpml-media_view-upload-page-count', array( $this, 'mla_wpml_media_view_upload_page_count_filter' ), 10, 2 );
1385
+ }
1386
+
1387
+ /**
1388
+ * Handler for filter "views_{$this->screen->id}" in /wp-admin/includes/class-wp-list-table.php
1389
+ *
1390
+ * Filter the list of available list table views, calling the WPML filter that adds language-specific views.
1391
+ *
1392
+ * @since 2.11
1393
+ *
1394
+ * @param array A list of available list table views
1395
+ *
1396
+ * @return array Updated list of available list table views
1397
+ */
1398
+ public static function mla_views_media_page_mla_menu_filter( $views ) {
1399
+ // hooked by WPML Media in wpml-media.class.php
1400
+ $views = apply_filters( 'views_upload', $views );
1401
+ return $views;
1402
+ }
1403
+
1404
+ /**
1405
+ * Extend the MLA_List_Table class
1406
+ *
1407
+ * Adds a protected variable holding a reference to the WPML_List_Table object,
1408
+ * then creates the WPML_List_Table passing it a reference to the new "parent" object.
1409
+ *
1410
+ * @since 2.11
1411
+ *
1412
+ * @param object $mla_list_table NULL, to indicate no extension/use the base class.
1413
+ *
1414
+ * @return object updated mla_list_table object.
1415
+ */
1416
+ public static function mla_list_table_new_instance( $mla_list_table ) {
1417
+ $mla_list_table = new MLA_WPML_List_Table;
1418
+ $mla_list_table->mla_wpml_table = new MLA_WPML_Table( $mla_list_table );
1419
+
1420
+ return $mla_list_table;
1421
+ }
1422
+
1423
+ /**
1424
+ * Handler for filter "wpml-media_view-upload-sql" in /plugins/wpml-media/inc/wpml-media.class.php
1425
+ *
1426
+ * Computes the number of language-specific attachments that satisfy a meta_query specification.
1427
+ * The count is made language-specific by WPML filters when the current_language is set.
1428
+ *
1429
+ * @since 2.11
1430
+ *
1431
+ * @param string SQL query string
1432
+ * @param string language code, e.g., 'en', 'es'
1433
+ *
1434
+ * @return mixed updated SQL query string
1435
+ */
1436
+ public function mla_wpml_media_view_upload_sql_filter( $sql, $lang ) {
1437
+ if ( isset( $_GET['detached'] ) && ( '0' == $_GET['detached'] ) ) {
1438
+ $sql = str_replace( "post_mime_type LIKE 'attached%'", 'post_parent > 0', $sql );
1439
+ }
1440
+
1441
+ return $sql;
1442
+ }
1443
+
1444
+ /**
1445
+ * Handler for filter "wpml-media_view-upload-count" in
1446
+ * /plugins/wpml-media/inc/wpml-media.class.php
1447
+ *
1448
+ * Computes the number of attachments that satisfy a meta_query specification.
1449
+ * The count is automatically made language-specific by WPML filters.
1450
+ *
1451
+ * @since 2.11
1452
+ *
1453
+ * @param NULL default return value if not replacing count
1454
+ * @param string key/slug value for the selected view
1455
+ * @param string HTML <a></a> tag for the link to the selected view
1456
+ * @param string language code, e.g., 'en', 'es'
1457
+ *
1458
+ * @return mixed NULL to allow SQL query or replacement count value
1459
+ */
1460
+ public function mla_wpml_media_view_upload_count_filter( $count, $key, $view, $lang ) {
1461
+ // extract the base URL and query parameters
1462
+ $href_count = preg_match( '/(href=["\'])([\s\S]+?)\?([\s\S]+?)(["\'])/', $view, $href_matches );
1463
+ if ( $href_count ) {
1464
+ wp_parse_str( $href_matches[3], $href_args );
1465
+
1466
+ // esc_url() converts & to #038;, which wp_parse_str does not strip
1467
+ if ( isset( $href_args['meta_query'] ) || isset( $href_args['#038;meta_query'] ) ) {
1468
+ $meta_view = $this->mla_list_table->mla_get_view( $key, '' );
1469
+ // extract the count value
1470
+ $href_count = preg_match( '/class="count">\(([^\)]*)\)/', $meta_view, $href_matches );
1471
+ if ( $href_count ) {
1472
+ $count = array( $href_matches[1] );
1473
+ }
1474
+ }
1475
+ }
1476
+
1477
+ return $count;
1478
+ }
1479
+
1480
+ /**
1481
+ * Handler for filter "wpml-media_view-upload-page-sql" in /plugins/wpml-media/inc/wpml-media.class.php
1482
+ *
1483
+ * Computes the number of language-specific attachments that satisfy a meta_query specification.
1484
+ * The count is made language-specific by WPML filters when the current_language is set.
1485
+ *
1486
+ * @since 2.11
1487
+ *
1488
+ * @param string SQL query string
1489
+ * @param string language code, e.g., 'en', 'es'
1490
+ *
1491
+ * @return mixed updated SQL query string
1492
+ */
1493
+ public function mla_wpml_media_view_upload_page_sql_filter( $sql, $lang ) {
1494
+ if ( isset( $_GET['detached'] ) && ( '0' == $_GET['detached'] ) ) {
1495
+ $sql = str_replace( 'post_parent = 0', 'post_parent > 0', $sql );
1496
+ }
1497
+
1498
+ return $sql;
1499
+ }
1500
+
1501
+ /**
1502
+ * Handler for filter "wpml-media_view-upload-page-count" in /plugins/wpml-media/inc/wpml-media.class.php
1503
+ *
1504
+ * Computes the number of language-specific attachments that satisfy a meta_query specification.
1505
+ * The count is made language-specific by WPML filters when the current_language is set.
1506
+ *
1507
+ * @since 2.11
1508
+ *
1509
+ * @param NULL default return value if not replacing count
1510
+ * @param string language code, e.g., 'en', 'es'
1511
+ *
1512
+ * @return mixed NULL to allow SQL query or replacement count value
1513
+ */
1514
+ public function mla_wpml_media_view_upload_page_count_filter( $count, $lang ) {
1515
+ global $sitepress;
1516
+
1517
+ if ( isset( $_GET['meta_slug'] ) ) {
1518
+ $save_lang = $sitepress->get_current_language();
1519
+ $sitepress->switch_lang( $lang['code'] );
1520
+ $meta_view = $this->mla_list_table->mla_get_view( $_GET['meta_slug'], '' );
1521
+ $sitepress->switch_lang( $save_lang );
1522
+
1523
+ if ( false !== $meta_view ) {
1524
+ // extract the count value
1525
+ $href_count = preg_match( '/class="count">\(([^\)]*)\)/', $meta_view, $href_matches );
1526
+ if ( $href_count ) {
1527
+ $count = array( $href_matches[1] );
1528
+ }
1529
+ } else {
1530
+ $count = '0';
1531
+ }
1532
+ }
1533
+
1534
+ return $count;
1535
+ }
1536
+
1537
+ /**
1538
+ * Table language column definitions
1539
+ *
1540
+ * Defined as static because it is used before the List_Table object is created.
1541
+ *
1542
+ * @since 2.11
1543
+ *
1544
+ * @var array
1545
+ */
1546
+ protected static $language_columns = NULL;
1547
+
1548
+ /**
1549
+ * Filter the MLA_List_Table columns
1550
+ *
1551
+ * Inserts the language columns just after the item thumbnail column.
1552
+ * Defined as static because it is called before the List_Table object is created.
1553
+ * Added as a filter when the file is loaded.
1554
+ *
1555
+ * @since 2.11
1556
+ *
1557
+ * @param array $submenu_arguments An array of query arguments.
1558
+ * format: attribute => value
1559
+ * @param boolean Include the "click filter" values in the results
1560
+ *
1561
+ * @return array updated array of query arguments.
1562
+ */
1563
+ public static function mla_list_table_submenu_arguments( $submenu_arguments, $include_filters ) {
1564
+ global $sitepress;
1565
+
1566
+ if ( isset( $_REQUEST['lang'] ) ) {
1567
+ $submenu_arguments['lang'] = $_REQUEST['lang'];
1568
+ } elseif ( is_object( $sitepress ) ) {
1569
+ $submenu_arguments['lang'] = $sitepress->get_current_language();
1570
+ }
1571
+
1572
+ return $submenu_arguments;
1573
+ }
1574
+
1575
+ /**
1576
+ * Filter the MLA_List_Table columns
1577
+ *
1578
+ * Inserts the language columns just after the item thumbnail column.
1579
+ * Defined as static because it is called before the List_Table object is created.
1580
+ * Added as a filter when the file is loaded.
1581
+ *
1582
+ * @since 2.11
1583
+ *
1584
+ * @param array $columns An array of columns.
1585
+ * format: column_slug => Column Label
1586
+ *
1587
+ * @return array updated array of columns.
1588
+ */
1589
+ public static function mla_list_table_get_columns( $columns ) {
1590
+ global $sitepress, $wpdb;
1591
+
1592
+ if ( is_null( self::$language_columns ) && $sitepress->is_translated_post_type( 'attachment' ) ) {
1593
+ /*
1594
+ * Build language management columns
1595
+ */
1596
+ $current_language = $sitepress->get_current_language();
1597
+ $languages = $sitepress->get_active_languages();
1598
+ $view_status = isset( $_REQUEST['status'] ) ? $_REQUEST['status'] : '';
1599
+ $show_language = 'checked' == MLAOptions::mla_get_option( 'language_column', false, false, MLA_WPML::$mla_language_option_definitions );
1600
+ $show_translations = 'checked' == MLAOptions::mla_get_option( 'translations_column', false, false, MLA_WPML::$mla_language_option_definitions );
1601
+
1602
+ if ( $show_language && 'all' == $current_language ) {
1603
+ self::$language_columns['language'] = __( 'Language', 'wpml-media' );
1604
+ }
1605
+
1606
+ if ( $show_translations && 1 < count( $languages ) && $view_status != 'trash' ) {
1607
+ $language_codes = array();
1608
+ foreach ( $languages as $language ) {
1609
+ if ( $current_language != $language['code'] ) {
1610
+ $language_codes[] = $language['code'];
1611
+ }
1612
+ }
1613
+
1614
+ $results = $wpdb->get_results( $wpdb->prepare("
1615
+ SELECT f.lang_code, f.flag, f.from_template, l.name
1616
+ FROM {$wpdb->prefix}icl_flags f
1617
+ JOIN {$wpdb->prefix}icl_languages_translations l ON f.lang_code = l.language_code
1618
+ WHERE l.display_language_code = %s AND f.lang_code IN(" . wpml_prepare_in( $language_codes ) . ")", $sitepress->get_admin_language() ) );
1619
+
1620
+ $wp_upload_dir = wp_upload_dir();
1621
+ foreach ( $results as $result ) {
1622
+ if ( $result->from_template ) {
1623
+ $flag_path = $wp_upload_dir['baseurl'] . '/flags/';
1624
+ } else {
1625
+ $flag_path = ICL_PLUGIN_URL . '/res/flags/';
1626
+ }
1627
+
1628
+ $flags[ $result->lang_code ] = '<img src="' . $flag_path . $result->flag . '" width="18" height="12" alt="' . $result->name . '" title="' . $result->name . '" />';
1629
+ }
1630
+
1631
+ $flags_column = '';
1632
+ foreach ( $languages as $language ) {
1633
+ if ( isset( $flags[ $language['code'] ] ) ) {
1634
+ $flags_column .= $flags[ $language['code'] ];
1635
+ }
1636
+ }
1637
+
1638
+ self::$language_columns['icl_translations'] = $flags_column;
1639
+ } // multi-language not trash
1640
+ } // add columns
1641
+
1642
+ if ( ! empty( self::$language_columns ) ) {
1643
+ $end = array_slice( $columns, 2) ;
1644
+ $columns = array_slice( $columns, 0, 2 );
1645
+ $columns = array_merge( $columns, self::$language_columns, $end );
1646
+ }
1647
+
1648
+ return $columns;
1649
+ } // mla_list_table_get_columns_filter
1650
+
1651
+ /**
1652
+ * Add styles for the icl_translations table column
1653
+ *
1654
+ * @since 2.11
1655
+ *
1656
+ * @return void echoes CSS styles before returning
1657
+ */
1658
+ public static function mla_list_table_add_icl_styles() {
1659
+ global $sitepress;
1660
+
1661
+ $current_language = $sitepress->get_current_language();
1662
+ $languages = count( $sitepress->get_active_languages() );
1663
+ $view_status = isset( $_REQUEST['status'] ) ? $_REQUEST['status'] : '';
1664
+
1665
+ if ( 1 < $languages && $view_status != 'trash' ) {
1666
+ $w = 22 * ( 'all' == $current_language ? $languages : $languages - 1 );
1667
+ echo '<style type="text/css">.column-icl_translations{width:' . $w . 'px;}.column-icl_translations img{margin:2px;}</style>';
1668
+ }
1669
+ }
1670
+
1671
+ /**
1672
+ * Supply a column value if no column-specific function has been defined
1673
+ *
1674
+ * Fills in the Language columns with the item's translation status values.
1675
+ *
1676
+ * @since 2.11
1677
+ *
1678
+ * @param string NULL, indicating no default content
1679
+ * @param array A singular item (one full row's worth of data)
1680
+ * @param array The name/slug of the column to be processed
1681
+ *
1682
+ * @return string Text or HTML to be placed inside the column
1683
+ */
1684
+ public function mla_list_table_column_default( $content, $item, $column_name ) {
1685
+ global $sitepress;
1686
+ static $languages = NULL, $default_language, $current_language;
1687
+
1688
+ if ( 'language' == $column_name ) {
1689
+ $item_language = $sitepress->get_language_for_element( $item->ID, 'post_attachment' );
1690
+ $content = $sitepress->get_display_language_name( $item_language, $sitepress->get_admin_language() );
1691
+ } elseif ('icl_translations' == $column_name ) {
1692
+ if ( is_null( $languages ) ) {
1693
+ $default_language = $sitepress->get_default_language();
1694
+ $current_language = $sitepress->get_current_language();
1695
+ $languages = $sitepress->get_active_languages();
1696
+ }
1697
+
1698
+ $trid = $sitepress->get_element_trid( $item->ID, 'post_attachment' );
1699
+ $translations = $sitepress->get_element_translations( $trid, 'post_attachment' );
1700
+
1701
+ $content = '';
1702
+ foreach( $languages as $language ) {
1703
+ if ( $language['code'] == $current_language ) {
1704
+ continue;
1705
+ }
1706
+
1707
+ if ( isset( $translations[ $language['code'] ] ) && $translations[ $language['code'] ]->element_id == $item->ID ) {
1708
+ // The item's own language
1709
+ $img = 'yes.png';
1710
+ $alt = sprintf( __( 'Edit the %s translation', 'sitepress' ), $language['display_name'] );
1711
+
1712
+ $link = 'post.php?action=edit&amp;mla_source=edit&amp;post=' . $translations[ $language['code'] ]->element_id . '&amp;lang=' . $language['code'];
1713
+ } elseif ( isset( $translations[ $language['code'] ] ) && $translations[ $language['code'] ]->element_id ) {
1714
+ // Translation exists
1715
+ $img = 'edit_translation.png';
1716
+ $alt = sprintf( __( 'Edit the %s translation', 'sitepress' ), $language['display_name'] );
1717
+
1718
+ $link = 'post.php?action=edit&amp;mla_source=edit&amp;post=' . $translations[ $language['code'] ]->element_id . '&amp;lang=' . $language['code'];
1719
+ } else {
1720
+ // Translation does not exist
1721
+ $img = 'add_translation.png';
1722
+ $alt = sprintf( __( 'Add translation to %s', 'sitepress' ), $language['display_name'] );
1723
+ $src_lang = $current_language;
1724
+
1725
+ if ( 'all' == $src_lang ) {
1726
+ foreach( $translations as $translation ) {
1727
+ if ( $translation->original ) {
1728
+ $src_lang = $translation->language_code;
1729
+ break;
1730
+ }
1731
+ }
1732
+ }
1733
+
1734
+ $args = array ( 'page' => MLA::ADMIN_PAGE_SLUG, 'mla_admin_action' => 'wpml_create_translation', 'mla_item_ID' => $item->ID, 'mla_parent_ID' => $item->post_parent, 'lang' => $language['code'] );
1735
+ $link = add_query_arg( $args, wp_nonce_url( 'upload.php', MLA::MLA_ADMIN_NONCE ) );
1736
+ }
1737
+
1738
+ $link = apply_filters( 'wpml_link_to_translation', $link, false, $language['code'] );
1739
+ $content .= '<a href="' . $link . '" title="' . $alt . '">';
1740
+ $content .= '<img style="padding:1px;margin:2px;" border="0" src="' . ICL_PLUGIN_URL . '/res/img/' . $img . '" alt="' . $alt . '" width="16" height="16" />';
1741
+ $content .= '</a>';
1742
+ } // foreach language
1743
+ }
1744
+
1745
+ return $content;
1746
+ } // mla_list_table_column_default_filter
1747
+
1748
+ } // Class MLA_WPML_Table
1749
+ /*
1750
+ * Some actions and filters are added here, when the source file is loaded, because the
1751
+ * MLA_List_Table object is created too late to be useful.
1752
+ */
1753
+
1754
+ /*
1755
+ * Defined in /media-library-assistant/includes/class-mla-list-table.php
1756
+ */
1757
+ add_filter( 'mla_list_table_get_columns', 'MLA_WPML_Table::mla_list_table_get_columns', 10, 1 );
1758
+ ?>
includes/mla-main-search-box-template.php CHANGED
@@ -31,8 +31,8 @@ if ( 'checked' == MLAOptions::mla_get_option( MLAOptions::MLA_SEARCH_MEDIA_FILTE
31
  }
32
  ?>
33
  <p class="search-box">
34
- <label class="screen-reader-text" for="media-search-input"><?php _e( 'Search Media', 'media-library-assistant' ); ?></label>
35
- <input name="s" id="media-search-input" type="text" size="45" value="<?php echo $search_value ?>" />
36
  <input name="mla-search-submit" class="button" id="search-submit" type="submit" value="<?php _e( 'Search Media', 'media-library-assistant' ); ?>" /><br />
37
  <span <?php echo $controls_style ?>>
38
  <input name="mla_search_connector" type="radio" <?php echo ( 'OR' === $search_connector ) ? '' : 'checked="checked"'; ?> value="AND" /><?php _e( 'and', 'media-library-assistant' ); ?>
31
  }
32
  ?>
33
  <p class="search-box">
34
+ <label class="screen-reader-text" for="mla-media-search-input"><?php _e( 'Search Media', 'media-library-assistant' ); ?></label>
35
+ <input name="s" id="mla-media-search-input" type="text" size="45" value="<?php echo $search_value ?>" />
36
  <input name="mla-search-submit" class="button" id="search-submit" type="submit" value="<?php _e( 'Search Media', 'media-library-assistant' ); ?>" /><br />
37
  <span <?php echo $controls_style ?>>
38
  <input name="mla_search_connector" type="radio" <?php echo ( 'OR' === $search_connector ) ? '' : 'checked="checked"'; ?> value="AND" /><?php _e( 'and', 'media-library-assistant' ); ?>
includes/mla-media-modal-js-template.php CHANGED
@@ -14,9 +14,9 @@
14
  global $post;
15
  ?>
16
  <script type="text/html" id="tmpl-mla-search-box">
17
- <label class="screen-reader-text" for="media-search-input"><?php _e( 'Search Media', 'media-library-assistant' ); ?>:</label>
18
 
19
- <input type="search" id="media-search-input" name="s[mla_search_value]" class="search" value="{{ data.searchValue }}" placeholder="{{ data.searchBoxPlaceholder }}" size="22" />
20
  <input type="submit" name="mla_search_submit" id="mla-search-submit" class="button media-button mla-search-submit-button" value="<?php _e( 'Search', 'media-library-assistant' ); ?>" /><br>
21
  <ul class="mla-search-options" style="{{ data.searchBoxControlsStyle }}">
22
  <li>
14
  global $post;
15
  ?>
16
  <script type="text/html" id="tmpl-mla-search-box">
17
+ <label class="screen-reader-text" for="mla-media-search-input"><?php _e( 'Search Media', 'media-library-assistant' ); ?>:</label>
18
 
19
+ <input type="search" id="mla-media-search-input" name="s[mla_search_value]" class="search" value="{{ data.searchValue }}" placeholder="{{ data.searchBoxPlaceholder }}" size="22" />
20
  <input type="submit" name="mla_search_submit" id="mla-search-submit" class="button media-button mla-search-submit-button" value="<?php _e( 'Search', 'media-library-assistant' ); ?>" /><br>
21
  <ul class="mla-search-options" style="{{ data.searchBoxControlsStyle }}">
22
  <li>
includes/mla-plugin-loader.php CHANGED
@@ -59,95 +59,83 @@ if ( ! empty( $mla_plugin_loader_error_messages ) ) {
59
  add_action( 'init', 'MLATest::initialize', 0x7FFFFFFF );
60
 
61
  /*
62
- * If we're responding to an mla_viewer request, shortcut the process
63
  */
64
- if ( isset( $_REQUEST['mla_stream_file'] ) ) {
65
- require_once( MLA_PLUGIN_PATH . 'includes/class-mla-stream-image.php' );
66
- add_action( 'init', 'MLAStreamImage::initialize', 0x7FFFFFFF );
67
- } else {
68
- /*
69
- * Template file and database access functions.
70
- */
71
- require_once( MLA_PLUGIN_PATH . 'includes/class-mla-data.php' );
72
- add_action( 'init', 'MLAData::initialize', 0x7FFFFFFF );
73
- require_once( MLA_PLUGIN_PATH . 'includes/class-mla-data-pdf.php' );
74
-
75
- /*
76
- * Custom Taxonomies and WordPress objects.
77
- */
78
- require_once( MLA_PLUGIN_PATH . 'includes/class-mla-objects.php' );
79
- add_action( 'init', 'MLAObjects::initialize', 0x7FFFFFFF );
80
-
81
- /*
82
- * MIME Type functions.
83
- */
84
- require_once( MLA_PLUGIN_PATH . 'includes/class-mla-mime-types.php' );
85
- add_action( 'init', 'MLAMime::initialize', 0x7FFFFFFF );
86
-
87
- /*
88
- * Shortcodes
89
- */
90
- require_once( MLA_PLUGIN_PATH . 'includes/class-mla-shortcodes.php' );
91
- add_action( 'init', 'MLAShortcodes::initialize', 0x7FFFFFFF );
92
-
93
- /*
94
- * WordPress 3.5 and later Edit Media screen additions, e.g., meta boxes
95
- */
96
- if ( version_compare( get_bloginfo( 'version' ), '3.5', '>=' ) ) {
97
- require_once( MLA_PLUGIN_PATH . 'includes/class-mla-edit-media.php' );
98
- add_action( 'init', 'MLAEdit::initialize', 0x7FFFFFFF );
99
- }
100
-
101
- /*
102
- * WordPress 3.5 and later Media Manager (Modal window) additions
103
- */
104
- if ( version_compare( get_bloginfo( 'version' ), '3.5', '>=' ) ) {
105
- require_once( MLA_PLUGIN_PATH . 'includes/class-mla-media-modal.php' );
106
- add_action( 'init', 'MLAModal::initialize', 0x7FFFFFFF );
107
- }
108
-
109
- /*
110
- * Plugin settings management
111
- */
112
- require_once( MLA_PLUGIN_PATH . 'includes/class-mla-options.php' );
113
- add_action( 'init', 'MLAOptions::initialize', 0x7FFFFFFF );
114
-
115
- /*
116
- * Plugin settings management page
117
- */
118
- require_once( MLA_PLUGIN_PATH . 'includes/class-mla-settings.php' );
119
- add_action( 'init', 'MLASettings::initialize', 0x7FFFFFFF );
120
-
121
- /*
122
- * Main program
123
- */
124
- require_once( MLA_PLUGIN_PATH . 'includes/class-mla-main.php' );
125
- add_action( 'init', 'MLA::initialize', 0x7FFFFFFF );
126
- add_action( 'plugins_loaded', 'MLA::mla_plugins_loaded_action', 0x7FFFFFFF );
127
-
128
- /*
129
- * Custom list table package that extends the core WP_List_Table class.
130
- * Doesn't need an initialize function; has a constructor.
131
- */
132
- require_once( MLA_PLUGIN_PATH . 'includes/class-mla-list-table.php' );
133
-
134
- /*
135
- * Custom list table package for the Post MIME Type Views.
136
- * Doesn't need an initialize function; has a constructor.
137
- */
138
- require_once( MLA_PLUGIN_PATH . 'includes/class-mla-view-list-table.php' );
139
-
140
- /*
141
- * Custom list table package for the Optional Upload MIME Type Views.
142
- * Doesn't need an initialize function; has a constructor.
143
- */
144
- require_once( MLA_PLUGIN_PATH . 'includes/class-mla-upload-optional-list-table.php' );
145
-
146
- /*
147
- * Custom list table package for the Upoload MIME Type Views.
148
- * Doesn't need an initialize function; has a constructor.
149
- */
150
- require_once( MLA_PLUGIN_PATH . 'includes/class-mla-upload-list-table.php' );
151
- } // Not mla_stream_image
152
  }
153
  ?>
59
  add_action( 'init', 'MLATest::initialize', 0x7FFFFFFF );
60
 
61
  /*
62
+ * Template file and database access functions.
63
  */
64
+ require_once( MLA_PLUGIN_PATH . 'includes/class-mla-data.php' );
65
+ add_action( 'init', 'MLAData::initialize', 0x7FFFFFFF );
66
+ require_once( MLA_PLUGIN_PATH . 'includes/class-mla-data-pdf.php' );
67
+
68
+ /*
69
+ * Custom Taxonomies and WordPress objects.
70
+ */
71
+ require_once( MLA_PLUGIN_PATH . 'includes/class-mla-objects.php' );
72
+ add_action( 'init', 'MLAObjects::initialize', 0x7FFFFFFF );
73
+
74
+ /*
75
+ * MIME Type functions.
76
+ */
77
+ require_once( MLA_PLUGIN_PATH . 'includes/class-mla-mime-types.php' );
78
+ add_action( 'init', 'MLAMime::initialize', 0x7FFFFFFF );
79
+
80
+ /*
81
+ * Shortcodes
82
+ */
83
+ require_once( MLA_PLUGIN_PATH . 'includes/class-mla-shortcodes.php' );
84
+ add_action( 'init', 'MLAShortcodes::initialize', 0x7FFFFFFF );
85
+
86
+ /*
87
+ * Edit Media screen additions, e.g., meta boxes
88
+ */
89
+ require_once( MLA_PLUGIN_PATH . 'includes/class-mla-edit-media.php' );
90
+ add_action( 'init', 'MLAEdit::initialize', 0x7FFFFFFF );
91
+
92
+ /*
93
+ * Media Manager (Modal window) additions
94
+ */
95
+ require_once( MLA_PLUGIN_PATH . 'includes/class-mla-media-modal.php' );
96
+ add_action( 'init', 'MLAModal::initialize', 0x7FFFFFFF );
97
+
98
+ /*
99
+ * Plugin settings management
100
+ */
101
+ require_once( MLA_PLUGIN_PATH . 'includes/class-mla-options.php' );
102
+ add_action( 'init', 'MLAOptions::initialize', 0x7FFFFFFF );
103
+
104
+ /*
105
+ * Plugin settings management page
106
+ */
107
+ require_once( MLA_PLUGIN_PATH . 'includes/class-mla-settings.php' );
108
+ add_action( 'init', 'MLASettings::initialize', 0x7FFFFFFF );
109
+
110
+ /*
111
+ * Main program
112
+ */
113
+ require_once( MLA_PLUGIN_PATH . 'includes/class-mla-main.php' );
114
+ add_action( 'init', 'MLA::initialize', 0x7FFFFFFF );
115
+ add_action( 'plugins_loaded', 'MLA::mla_plugins_loaded_action', 0x7FFFFFFF );
116
+
117
+ /*
118
+ * Custom list table package that extends the core WP_List_Table class.
119
+ * Doesn't need an initialize function; has a constructor.
120
+ */
121
+ require_once( MLA_PLUGIN_PATH . 'includes/class-mla-list-table.php' );
122
+
123
+ /*
124
+ * Custom list table package for the Post MIME Type Views.
125
+ * Doesn't need an initialize function; has a constructor.
126
+ */
127
+ require_once( MLA_PLUGIN_PATH . 'includes/class-mla-view-list-table.php' );
128
+
129
+ /*
130
+ * Custom list table package for the Optional Upload MIME Type Views.
131
+ * Doesn't need an initialize function; has a constructor.
132
+ */
133
+ require_once( MLA_PLUGIN_PATH . 'includes/class-mla-upload-optional-list-table.php' );
134
+
135
+ /*
136
+ * Custom list table package for the Upoload MIME Type Views.
137
+ * Doesn't need an initialize function; has a constructor.
138
+ */
139
+ require_once( MLA_PLUGIN_PATH . 'includes/class-mla-upload-list-table.php' );
 
 
 
 
 
 
 
 
 
 
 
 
140
  }
141
  ?>
includes/mla-stream-image.php CHANGED
@@ -426,7 +426,7 @@ class MLAMutex {
426
  * @var resource
427
  */
428
  private $sem_id;
429
-
430
  /**
431
  * True if the semaphore has been acquired
432
  *
@@ -435,7 +435,7 @@ class MLAMutex {
435
  * @var boolean
436
  */
437
  private $is_acquired = false;
438
-
439
  /**
440
  * True if using a file lock instead of a semaphore
441
  *
@@ -444,7 +444,7 @@ class MLAMutex {
444
  * @var boolean
445
  */
446
  private $use_file_lock = false;
447
-
448
  /**
449
  * Name of the (locked) file used as a semaphore
450
  *
@@ -453,7 +453,7 @@ class MLAMutex {
453
  * @var string
454
  */
455
  private $filename = '';
456
-
457
  /**
458
  * File system pointer resource of the (locked) file used as a semaphore
459
  *
426
  * @var resource
427
  */
428
  private $sem_id;
429
+
430
  /**
431
  * True if the semaphore has been acquired
432
  *
435
  * @var boolean
436
  */
437
  private $is_acquired = false;
438
+
439
  /**
440
  * True if using a file lock instead of a semaphore
441
  *
444
  * @var boolean
445
  */
446
  private $use_file_lock = false;
447
+
448
  /**
449
  * Name of the (locked) file used as a semaphore
450
  *
453
  * @var string
454
  */
455
  private $filename = '';
456
+
457
  /**
458
  * File system pointer resource of the (locked) file used as a semaphore
459
  *
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 2.10
10
  */
11
 
12
  /*
@@ -16,7 +16,7 @@ Description: Enhances the Media Library; powerful [mla_gallery], taxonomy suppor
16
  Author: David Lingren, Fair Trade Judaica
17
  Text Domain: media-library-assistant
18
  Domain Path: /languages
19
- Version: 2.10
20
  Author URI: http://fairtradejudaica.org/our-story/staff/
21
 
22
  Copyright 2011-2014 David Lingren
@@ -93,9 +93,8 @@ if ( ! defined( 'MLA_BACKUP_DIR' ) ) {
93
  $mla_name_conflict_candidates =
94
  array (
95
  'MLA' => 'class',
96
- 'MLAStreamImage' => 'class',
97
- 'MLA_Image_Editor' => 'class',
98
  'MLAData' => 'class',
 
99
  'MLAEdit' => 'class',
100
  'MLA_Checklist_Walker' => 'class',
101
  'MLAMime' => 'class',
@@ -103,12 +102,17 @@ $mla_name_conflict_candidates =
103
  'MLAObjects' => 'class',
104
  'MLATextWidget' => 'class',
105
  'MLASettings' => 'class',
 
106
  'MLAShortcodes' => 'class',
107
  'MLATest' => 'class',
 
 
 
108
  'MLA_List_Table' => 'class',
109
  'MLA_View_List_Table' => 'class',
110
  'MLA_Optional_Upload_List_Table' => 'class',
111
- 'MLA_Upload_List_Table' => 'class'
 
112
  );
113
 
114
  /*
6
  * will the rest of the plugin be loaded and run.
7
  *
8
  * @package Media Library Assistant
9
+ * @version 2.11
10
  */
11
 
12
  /*
16
  Author: David Lingren, Fair Trade Judaica
17
  Text Domain: media-library-assistant
18
  Domain Path: /languages
19
+ Version: 2.11
20
  Author URI: http://fairtradejudaica.org/our-story/staff/
21
 
22
  Copyright 2011-2014 David Lingren
93
  $mla_name_conflict_candidates =
94
  array (
95
  'MLA' => 'class',
 
 
96
  'MLAData' => 'class',
97
+ 'MLAPDF' => 'class',
98
  'MLAEdit' => 'class',
99
  'MLA_Checklist_Walker' => 'class',
100
  'MLAMime' => 'class',
102
  'MLAObjects' => 'class',
103
  'MLATextWidget' => 'class',
104
  'MLASettings' => 'class',
105
+ 'MLAOptions' => 'class',
106
  'MLAShortcodes' => 'class',
107
  'MLATest' => 'class',
108
+ 'MLA_WPML' => 'class',
109
+ 'MLA_WPML_List_Table' => 'class',
110
+ 'MLA_WPML_Table' => 'class',
111
  'MLA_List_Table' => 'class',
112
  'MLA_View_List_Table' => 'class',
113
  'MLA_Optional_Upload_List_Table' => 'class',
114
+ 'MLA_Upload_List_Table' => 'class',
115
+ //'MLA_BACKUP_DIR' => 'constant'
116
  );
117
 
118
  /*
js/mla-add-new-bulk-edit-scripts.js CHANGED
@@ -9,6 +9,7 @@ var jQuery,
9
  // mla.settings.ajaxFailError for setParent
10
  // mla.settings.ajaxDoneError for setParent
11
  // mla.settings.useDashicons for setParent
 
12
  settings: {},
13
 
14
  // Utility functions
9
  // mla.settings.ajaxFailError for setParent
10
  // mla.settings.ajaxDoneError for setParent
11
  // mla.settings.useDashicons for setParent
12
+ // mla.settings.useSpinnerClass for setParent
13
  settings: {},
14
 
15
  // Utility functions
js/mla-inline-edit-scripts.js CHANGED
@@ -127,16 +127,6 @@ var jQuery,
127
  });
128
  },
129
 
130
- /* toggle : function(el){
131
- var t = this;
132
-
133
- if ( 'none' == $( t.what + mla.utility.getId( el ) ).css('display') ) {
134
- t.revert();
135
- } else {
136
- t.edit( el );
137
- }
138
- }, // */
139
-
140
  bulkEdit : function(){
141
  var te = '', c = true;
142
  this.revert();
@@ -281,7 +271,13 @@ var jQuery,
281
 
282
  // make ajax request
283
  mla.bulkEdit.inProcess = true;
284
- spinner.show();
 
 
 
 
 
 
285
  statusMessage = mla.settings.bulkWaiting + ': ' + mla.bulkEdit.waiting
286
  + ', ' + mla.settings.bulkComplete + ': ' + mla.bulkEdit.complete
287
  + ', ' + mla.settings.bulkUnchanged + ': ' + mla.bulkEdit.unchanged
@@ -294,11 +290,22 @@ var jQuery,
294
  data: params,
295
  dataType: 'json'
296
  }).always( function() {
297
- spinner.hide();
 
 
 
 
 
 
298
  }).done( function( response, status ) {
299
  var responseData = 'no response.data', responseMessage, items;
300
 
301
- spinner.hide();
 
 
 
 
 
302
  if ( response ) {
303
  if ( ! response.success ) {
304
  if ( response.responseData ) {
@@ -423,8 +430,9 @@ var jQuery,
423
  textarea.suggest( ajaxurl + '?action=ajax-tag-search&tax=' + taxname, { delay: 500, minchars: 2, multiple: true, multipleSep: mla.settings.comma + ' ' } );
424
  });
425
 
426
- $(editRow).attr('id', 'edit-'+id).addClass('inline-editor').show();
427
  $('.ptitle', editRow).focus();
 
428
 
429
  return false;
430
  },
@@ -435,8 +443,12 @@ var jQuery,
435
  if ( typeof(id) == 'object' )
436
  id = mla.utility.getId(id);
437
 
438
- $('table.widefat .inline-edit-save .spinner').show();
439
-
 
 
 
 
440
  params = {
441
  action: mla.settings.ajax_action,
442
  nonce: mla.settings.ajax_nonce,
@@ -452,7 +464,11 @@ var jQuery,
452
  // make ajax request
453
  $.post( ajaxurl, params,
454
  function( response ) {
455
- $( 'table.widefat .inline-edit-save .spinner' ).hide();
 
 
 
 
456
 
457
  if ( response ) {
458
  if ( -1 != response.indexOf( '<tr' ) ) {
@@ -558,7 +574,12 @@ var jQuery,
558
  tableCell = $( '#attachment-' + postId + " td.attached_to" ).clone( true );
559
  tableCell.html( '<span class="spinner"></span>' );
560
  $( '#attachment-' + postId + " td.attached_to" ).replaceWith( tableCell );
561
- $( '#attachment-' + postId + " td.attached_to .spinner" ).show();
 
 
 
 
 
562
 
563
  params = $.param( {
564
  action: mla.settings.ajax_action + '-set-parent',
@@ -593,7 +614,11 @@ var jQuery,
593
  var id = $('table.widefat tr.inline-editor').attr('id');
594
 
595
  if ( id ) {
596
- $('table.widefat .inline-edit-save .spinner').hide();
 
 
 
 
597
 
598
  if ( 'bulk-edit' == id ) {
599
  $('table.widefat #bulk-edit').removeClass('inline-editor').hide();
127
  });
128
  },
129
 
 
 
 
 
 
 
 
 
 
 
130
  bulkEdit : function(){
131
  var te = '', c = true;
132
  this.revert();
271
 
272
  // make ajax request
273
  mla.bulkEdit.inProcess = true;
274
+
275
+ if ( mla.settings.useSpinnerClass ) {
276
+ spinner.addClass("is-active");
277
+ } else {
278
+ spinner.show();
279
+ }
280
+
281
  statusMessage = mla.settings.bulkWaiting + ': ' + mla.bulkEdit.waiting
282
  + ', ' + mla.settings.bulkComplete + ': ' + mla.bulkEdit.complete
283
  + ', ' + mla.settings.bulkUnchanged + ': ' + mla.bulkEdit.unchanged
290
  data: params,
291
  dataType: 'json'
292
  }).always( function() {
293
+
294
+ if ( mla.settings.useSpinnerClass ) {
295
+ spinner.removeClass("is-active");
296
+ } else {
297
+ spinner.hide();
298
+ }
299
+
300
  }).done( function( response, status ) {
301
  var responseData = 'no response.data', responseMessage, items;
302
 
303
+ if ( mla.settings.useSpinnerClass ) {
304
+ spinner.removeClass("is-active");
305
+ } else {
306
+ spinner.hide();
307
+ }
308
+
309
  if ( response ) {
310
  if ( ! response.success ) {
311
  if ( response.responseData ) {
430
  textarea.suggest( ajaxurl + '?action=ajax-tag-search&tax=' + taxname, { delay: 500, minchars: 2, multiple: true, multipleSep: mla.settings.comma + ' ' } );
431
  });
432
 
433
+ rowData = $(editRow).attr('id', 'edit-'+id).addClass('inline-editor').show().position().top;
434
  $('.ptitle', editRow).focus();
435
+ $( 'html, body' ).animate( { scrollTop: rowData }, 'fast' );
436
 
437
  return false;
438
  },
443
  if ( typeof(id) == 'object' )
444
  id = mla.utility.getId(id);
445
 
446
+ if ( mla.settings.useSpinnerClass ) {
447
+ $('table.widefat .inline-edit-save .spinner').addClass("is-active");
448
+ } else {
449
+ $('table.widefat .inline-edit-save .spinner').show();
450
+ }
451
+
452
  params = {
453
  action: mla.settings.ajax_action,
454
  nonce: mla.settings.ajax_nonce,
464
  // make ajax request
465
  $.post( ajaxurl, params,
466
  function( response ) {
467
+ if ( mla.settings.useSpinnerClass ) {
468
+ $('table.widefat .inline-edit-save .spinner').removeClass("is-active");
469
+ } else {
470
+ $('table.widefat .inline-edit-save .spinner').hide();
471
+ }
472
 
473
  if ( response ) {
474
  if ( -1 != response.indexOf( '<tr' ) ) {
574
  tableCell = $( '#attachment-' + postId + " td.attached_to" ).clone( true );
575
  tableCell.html( '<span class="spinner"></span>' );
576
  $( '#attachment-' + postId + " td.attached_to" ).replaceWith( tableCell );
577
+
578
+ if ( mla.settings.useSpinnerClass ) {
579
+ $( '#attachment-' + postId + " td.attached_to .spinner" ).addClass("is-active");
580
+ } else {
581
+ $( '#attachment-' + postId + " td.attached_to .spinner" ).show();
582
+ }
583
 
584
  params = $.param( {
585
  action: mla.settings.ajax_action + '-set-parent',
614
  var id = $('table.widefat tr.inline-editor').attr('id');
615
 
616
  if ( id ) {
617
+ if ( mla.settings.useSpinnerClass ) {
618
+ $('table.widefat .inline-edit-save .spinner').removeClass("is-active");
619
+ } else {
620
+ $('table.widefat .inline-edit-save .spinner').hide();
621
+ }
622
 
623
  if ( 'bulk-edit' == id ) {
624
  $('table.widefat #bulk-edit').removeClass('inline-editor').hide();
js/mla-inline-edit-scripts.min.js CHANGED
@@ -1 +1 @@
1
- var jQuery,mla_inline_edit_vars,mla={settings:{},bulkEdit:{inProcess:false,doCancel:false},utility:{getId:function(b){var c=jQuery(b).closest("tr").attr("id"),a=c.split("-");return a[a.length-1]}},setParent:null,inlineEditAttachment:null};(function(a){mla.settings=typeof mla_inline_edit_vars==="undefined"?{}:mla_inline_edit_vars;mla_inline_edit_vars=void 0;mla.inlineEditAttachment={init:function(){var d=this,e=a("#inline-edit"),c=a("#bulk-edit"),b=a("#bulk-progress");d.type="attachment";d.what="#attachment-";e.keyup(function(f){if(f.which==27){return mla.inlineEditAttachment.revert()}});c.keyup(function(f){if(f.which==27){return mla.inlineEditAttachment.revert()}});b.keyup(function(f){if(f.which==27){return mla.inlineEditAttachment.revert()}});a("#inline-edit-post-set-parent",e).on("click",function(){return mla.inlineEditAttachment.inlineParentOpen(this)});a("a.cancel",e).click(function(){return mla.inlineEditAttachment.revert()});a("a.save",e).click(function(){return mla.inlineEditAttachment.quickSave(this)});a("td",e).keydown(function(f){if(f.which==13){return mla.inlineEditAttachment.quickSave(this)}});a("#bulk-edit-set-parent",c).on("click",function(){return mla.inlineEditAttachment.bulkParentOpen()});a("a.cancel",c).click(function(){return mla.inlineEditAttachment.revert()});a('input[type="submit"]',c).click(function(f){f.preventDefault();return mla.inlineEditAttachment.bulkSave(f)});a("a.cancel",b).click(function(){if(mla.bulkEdit.inProcess){mla.bulkEdit.doCancel=true;return false}else{return mla.inlineEditAttachment.revert()}});a("#bulk_refresh",b).click(function(){a("#bulk-progress a").prop("disabled",true);a("#bulk-progress").css("opacity","0.5")});a("#the-list").on("click","a.editinline",function(){mla.inlineEditAttachment.quickEdit(this);return false});a("span.catshow").click(function(){a(this).hide().next().show().parent().next().addClass("cat-hover")});a("span.cathide").click(function(){a(this).hide().prev().show().parent().next().removeClass("cat-hover")});a('select[name="_status"] option[value="future"]',c).remove();a("#doaction, #doaction2").click(function(f){var g=a(this).attr("id").substr(2);if(a('select[name="'+g+'"]').val()=="edit"){f.preventDefault();d.bulkEdit()}else{if(a("form#posts-filter tr.inline-editor").length>0){d.revert()}}});a("#post-query-submit").mousedown(function(){d.revert();a('select[name^="action"]').val("-1")})},bulkEdit:function(){var b="",d=true;this.revert();a("#bulk-edit td").attr("colspan",a(".widefat:first thead th:visible").length);a("table.widefat tbody").prepend(a("#bulk-edit"));a("#bulk-edit").addClass("inline-editor").show();a('tbody th.check-column input[type="checkbox"]').each(function(){if(a(this).prop("checked")){d=false;var e=a(this).val(),c;c=a("#inline_"+e+" .post_title").text()||mla.settings.noTitle;b+='<div id="ttle'+e+'"><a id="_'+e+'" class="ntdelbutton" title="'+mla.settings.ntdelTitle+'">X</a>'+c+"</div>"}});if(d){return this.revert()}a("#bulk-titles").html(b);a("#bulk-titles a").click(function(){var c=a(this).attr("id").substr(1);a('table.widefat input[value="'+c+'"]').prop("checked",false);a("#ttle"+c).remove()});a("textarea.mla_tags").each(function(){var c=a(this).attr("name").replace("]","").replace("tax_input[","");a(this).suggest(ajaxurl+"?action=ajax-tag-search&tax="+c,{delay:500,minchars:2,multiple:true,multipleSep:mla.settings.comma+" "})});a("html, body").animate({scrollTop:0},"fast")},bulkSave:function(c){var b;mla.bulkEdit={inProcess:false,doCancel:false,chunkSize:0,targetName:"",fields:"",ids:[],idsCount:0,offset:0,waiting:0,running:0,complete:0,unchanged:0,success:0,failure:0};mla.bulkEdit.chunkSize=+mla.settings.bulkChunkSize;mla.bulkEdit.targetName=c.target.name;mla.bulkEdit.fields=a("#bulk-edit :input").serialize();b=a('tbody th.check-column input[type="checkbox"]').serializeArray();a.each(b,function(d,e){mla.bulkEdit.ids[d]=+e.value});mla.bulkEdit.idsCount=mla.bulkEdit.waiting=mla.bulkEdit.ids.length;mla.inlineEditAttachment.bulkProgressOpen();mla.inlineEditAttachment.bulkPost();return false},bulkProgressOpen:function(){var b="",d=true;this.revert();a("#bulk-progress td").attr("colspan",a(".widefat:first thead th:visible").length);a("table.widefat tbody").prepend(a("#bulk-progress"));a("#bulk-progress").addClass("inline-editor").show();a("#cb-select-all-1").removeAttr("checked");a("#cb-select-all-2").removeAttr("checked");a('tbody th.check-column input[type="checkbox"]').each(function(){if(a(this).prop("checked")){d=false;var e=a(this).val(),c;c=a("#inline_"+e+" .post_title").text()||mla.settings.noTitle;b+='<div id="ttle'+e+'"><a id="_'+e+'" class="ntdelbutton" title="'+mla.settings.ntdelTitle+'">X</a>'+c+"</div>"}});if(d){return this.revert()}a("#bulk-progress-running").html("");a("#bulk-progress-complete").html("");a("#bulk-progress-waiting").html(b);a("#bulk-progress-waiting a").click(function(){var c=a(this).attr("id").substr(1);a('table.widefat input[value="'+c+'"]').prop("checked",false);a("#ttle"+c).remove()});a("#bulk-progress .inline-edit-save .error").html("");a("#bulk_refresh").prop("disabled",true).css("opacity","0.5");a("html, body").animate({scrollTop:0},"fast")},bulkPost:function(){var b,g,f,i,c,h=a("table.widefat .inline-edit-save .spinner"),d=a("#bulk-progress .inline-edit-save .error"),j=a("#bulk-progress-waiting"),e=a("#bulk-progress-running");g=mla.bulkEdit.ids.slice(mla.bulkEdit.offset,mla.bulkEdit.offset+mla.bulkEdit.chunkSize);mla.bulkEdit.offset+=mla.bulkEdit.chunkSize;for(f=0;f<g.length;f++){i=a("#ttle"+g[f],j).remove();a("a",i).hide();e.append(i)}mla.bulkEdit.waiting-=g.length;mla.bulkEdit.running=g.length;b={action:mla.settings.ajax_action,nonce:mla.settings.ajax_nonce,bulk_action:mla.bulkEdit.targetName,cb_attachment:g};b=a.param(b)+"&"+mla.bulkEdit.fields;mla.bulkEdit.inProcess=true;h.show();c=mla.settings.bulkWaiting+": "+mla.bulkEdit.waiting+", "+mla.settings.bulkComplete+": "+mla.bulkEdit.complete+", "+mla.settings.bulkUnchanged+": "+mla.bulkEdit.unchanged+", "+mla.settings.bulkSuccess+": "+mla.bulkEdit.success+", "+mla.settings.bulkFailure+": "+mla.bulkEdit.failure;d.html(c).show();a.ajax(ajaxurl,{type:"POST",data:b,dataType:"json"}).always(function(){h.hide()}).done(function(n,l){var o="no response.data",k,m;h.hide();if(n){if(!n.success){if(n.responseData){o=n.data}d.html(JSON.stringify(n)).show();mla.bulkEdit.offset=mla.bulkEdit.idsCount}else{m=a("#bulk-progress-running div").remove();a.each(m,function(){var p,q=a(this).html(),r=a(this).attr("id").substr(4);if("string"===typeof(n.data.item_results[r]["result"])){p=n.data.item_results[r]["result"];a(this).html(q+" ("+r+") - "+p)}a("#attachment-"+r).remove()});a("#bulk-progress-complete").append(m);mla.bulkEdit.complete+=mla.bulkEdit.running;mla.bulkEdit.running=0;mla.bulkEdit.unchanged+=n.data.unchanged;mla.bulkEdit.success+=n.data.success;mla.bulkEdit.failure+=n.data.failure;k=mla.settings.bulkWaiting+": "+mla.bulkEdit.waiting+", "+mla.settings.bulkComplete+": "+mla.bulkEdit.complete+", "+mla.settings.bulkUnchanged+": "+mla.bulkEdit.unchanged+", "+mla.settings.bulkSuccess+": "+mla.bulkEdit.success+", "+mla.settings.bulkFailure+": "+mla.bulkEdit.failure;d.html(k).show()}}else{d.html(mla.settings.error).show();mla.bulkEdit.offset=mla.bulkEdit.idsCount}if(mla.bulkEdit.doCancel){d.html(mla.settings.bulkCanceled+". "+k).show()}else{if(mla.bulkEdit.offset<mla.bulkEdit.idsCount){mla.inlineEditAttachment.bulkPost();return}}a("#bulk_refresh").prop("disabled",false).css("opacity","1.0");mla.bulkEdit.inProcess=false}).fail(function(l,k){if(200==l.status){d.text("("+k+") "+l.responseText)}else{d.text(mla.settings.ajaxFailError+" ("+k+"), jqXHR( "+l.status+", "+l.statusText+", "+l.responseText+")")}})},quickEdit:function(g){var d=this,b,c,e,f;d.revert();if(typeof(g)=="object"){g=mla.utility.getId(g)}b=mla.settings.fields;c=a("#inline-edit").clone(true);a("td",c).attr("colspan",a(".widefat:first thead th:visible").length);if(a(d.what+g).hasClass("alternate")){a(c).addClass("alternate")}a(d.what+g).hide().after(c);e=a("#inline_"+g);if(!a(':input[name="post_author"] option[value="'+a(".post_author",e).text()+'"]',c).val()){a(':input[name="post_author"]',c).prepend('<option value="'+a(".post_author",e).text()+'">'+a("#"+d.type+"-"+g+" .author").text()+"</option>")}if(a(':input[name="post_author"] option',c).length==1){a("label.inline-edit-author",c).hide()}for(f=0;f<b.length;f++){a(':input[name="'+b[f]+'"]',c).val(a("."+b[f],e).text())}if(a(".image_alt",e).length===0){a("label.inline-edit-image-alt",c).hide()}a(".mla_category",e).each(function(){var h=a(this).text(),i;if(h){i=a(this).attr("id").replace("_"+g,"");a("ul."+i+"-checklist :checkbox",c).val(h.split(","))}});a(".mla_tags",e).each(function(){var j=a(this).text(),k=a(this).attr("id").replace("_"+g,""),i=a("textarea.tax_input_"+k,c),h=mla.settings.comma;if(j){if(","!==h){j=j.replace(/,/g,h)}i.val(j)}i.suggest(ajaxurl+"?action=ajax-tag-search&tax="+k,{delay:500,minchars:2,multiple:true,multipleSep:mla.settings.comma+" "})});a(c).attr("id","edit-"+g).addClass("inline-editor").show();a(".ptitle",c).focus();return false},quickSave:function(e){var d,b,c=a(".post_status_page").val()||"";if(typeof(e)=="object"){e=mla.utility.getId(e)}a("table.widefat .inline-edit-save .spinner").show();d={action:mla.settings.ajax_action,nonce:mla.settings.ajax_nonce,post_type:"attachment",post_ID:e,edit_date:"true",post_status:c};b=a("#edit-"+e+" :input").serialize();d=b+"&"+a.param(d);a.post(ajaxurl,d,function(f){a("table.widefat .inline-edit-save .spinner").hide();if(f){if(-1!=f.indexOf("<tr")){a(mla.inlineEditAttachment.what+e).remove();a("#edit-"+e).before(f).remove();a(mla.inlineEditAttachment.what+e).hide().fadeIn()}else{f=f.replace(/<.[^<>]*?>/g,"");a("#edit-"+e+" .inline-edit-save .error").html(f).show()}}else{a("#edit-"+e+" .inline-edit-save .error").html(mla.settings.error).show()}},"html");return false},inlineParentOpen:function(e){var d,b,c;if(typeof(e)=="object"){b=mla.utility.getId(e);d=a("#edit-"+b+' :input[name="post_parent"]').val()||"";c=a("#edit-"+b+' :input[name="post_title"]').val()||"";mla.setParent.open(d,b,c);a("#mla-set-parent-submit").on("click",function(f){f.preventDefault();mla.inlineEditAttachment.inlineParentSave(b);return false})}},inlineParentSave:function(b){var f=a("#mla-set-parent-response-div input:checked").closest("tr"),h,e,c=a("#edit-"+b),d,g;if(f.length){h=a(":radio",f).val()||"";e=a("label",f).html()||"";d=a(':input[name="post_parent"]',c).clone(true).val(h);g=a(':input[name="post_parent_title"]',c).clone(true).val(e);a(':input[name="post_parent"]',c).replaceWith(d);a(':input[name="post_parent_title"]',c).replaceWith(g)}mla.setParent.close();a("#mla-set-parent-submit").off("click")},bulkParentOpen:function(){var d,b,c;b=-1;c=mla.settings.bulkTitle;d=a('#bulk-edit :input[name="post_parent"]').val()||-1;mla.setParent.open(d,b,c);a("#mla-set-parent-submit").on("click",function(e){e.preventDefault();mla.inlineEditAttachment.bulkParentSave();return false})},bulkParentSave:function(){var c=a("#mla-set-parent-response-div input:checked").closest("tr"),d,b;if(c.length){d=a(":radio",c).val()||"";b=a('#bulk-edit :input[name="post_parent"]').clone(true).val(d);a('#bulk-edit :input[name="post_parent"]').replaceWith(b)}mla.setParent.close();a("#mla-set-parent-submit").off("click")},tableParentOpen:function(d,b,c){mla.setParent.open(d,b,c);a("#mla-set-parent-submit").on("click",function(e){e.preventDefault();mla.inlineEditAttachment.tableParentSave(b);return false})},tableParentSave:function(b){var d=a("#mla-set-parent-response-div input:checked").closest("tr"),f=a(":radio",d).val()||"-1",c,e=a("#attachment-"+b+" td.attached_to").clone(true);if(d.length&&(f>=0)){e=a("#attachment-"+b+" td.attached_to").clone(true);e.html('<span class="spinner"></span>');a("#attachment-"+b+" td.attached_to").replaceWith(e);a("#attachment-"+b+" td.attached_to .spinner").show();c=a.param({action:mla.settings.ajax_action+"-set-parent",nonce:mla.settings.ajax_nonce,post_ID:b,post_parent:f,});a.post(ajaxurl,c,function(g){if(g){if(-1==g.indexOf("tableParentOpen(")){g=g.replace(/<.[^<>]*?>/g,"")}}else{g=mla.settings.ajaxFailError}a("#attachment-"+b).before(g).remove();a("#attachment-"+b).hide().fadeIn()},"html")}else{e.html(mla.settings.error);a("#attachment-"+b+" td.attached_to").replaceWith(e)}a("#mla-set-parent-submit").off("click");mla.setParent.close()},revert:function(){var b=a("table.widefat tr.inline-editor").attr("id");if(b){a("table.widefat .inline-edit-save .spinner").hide();if("bulk-edit"==b){a("table.widefat #bulk-edit").removeClass("inline-editor").hide();a("#bulk-titles").html("");a("#inlineedit").append(a("#bulk-edit"))}else{if("bulk-progress"==b){a("table.widefat #bulk-progress").removeClass("inline-editor").hide();a("#bulk-progress-waiting").html("");a("#inlineedit").append(a("#bulk-progress"))}else{a("#"+b).remove();b=b.substr(b.lastIndexOf("-")+1);a(this.what+b).show()}}}return false}};a(document).ready(function(){mla.inlineEditAttachment.init()})})(jQuery);
1
+ var jQuery,mla_inline_edit_vars,mla={settings:{},bulkEdit:{inProcess:false,doCancel:false},utility:{getId:function(b){var c=jQuery(b).closest("tr").attr("id"),a=c.split("-");return a[a.length-1]}},setParent:null,inlineEditAttachment:null};(function(a){mla.settings=typeof mla_inline_edit_vars==="undefined"?{}:mla_inline_edit_vars;mla_inline_edit_vars=void 0;mla.inlineEditAttachment={init:function(){var d=this,e=a("#inline-edit"),c=a("#bulk-edit"),b=a("#bulk-progress");d.type="attachment";d.what="#attachment-";e.keyup(function(f){if(f.which==27){return mla.inlineEditAttachment.revert()}});c.keyup(function(f){if(f.which==27){return mla.inlineEditAttachment.revert()}});b.keyup(function(f){if(f.which==27){return mla.inlineEditAttachment.revert()}});a("#inline-edit-post-set-parent",e).on("click",function(){return mla.inlineEditAttachment.inlineParentOpen(this)});a("a.cancel",e).click(function(){return mla.inlineEditAttachment.revert()});a("a.save",e).click(function(){return mla.inlineEditAttachment.quickSave(this)});a("td",e).keydown(function(f){if(f.which==13){return mla.inlineEditAttachment.quickSave(this)}});a("#bulk-edit-set-parent",c).on("click",function(){return mla.inlineEditAttachment.bulkParentOpen()});a("a.cancel",c).click(function(){return mla.inlineEditAttachment.revert()});a('input[type="submit"]',c).click(function(f){f.preventDefault();return mla.inlineEditAttachment.bulkSave(f)});a("a.cancel",b).click(function(){if(mla.bulkEdit.inProcess){mla.bulkEdit.doCancel=true;return false}else{return mla.inlineEditAttachment.revert()}});a("#bulk_refresh",b).click(function(){a("#bulk-progress a").prop("disabled",true);a("#bulk-progress").css("opacity","0.5")});a("#the-list").on("click","a.editinline",function(){mla.inlineEditAttachment.quickEdit(this);return false});a("span.catshow").click(function(){a(this).hide().next().show().parent().next().addClass("cat-hover")});a("span.cathide").click(function(){a(this).hide().prev().show().parent().next().removeClass("cat-hover")});a('select[name="_status"] option[value="future"]',c).remove();a("#doaction, #doaction2").click(function(f){var g=a(this).attr("id").substr(2);if(a('select[name="'+g+'"]').val()=="edit"){f.preventDefault();d.bulkEdit()}else{if(a("form#posts-filter tr.inline-editor").length>0){d.revert()}}});a("#post-query-submit").mousedown(function(){d.revert();a('select[name^="action"]').val("-1")})},bulkEdit:function(){var b="",d=true;this.revert();a("#bulk-edit td").attr("colspan",a(".widefat:first thead th:visible").length);a("table.widefat tbody").prepend(a("#bulk-edit"));a("#bulk-edit").addClass("inline-editor").show();a('tbody th.check-column input[type="checkbox"]').each(function(){if(a(this).prop("checked")){d=false;var e=a(this).val(),c;c=a("#inline_"+e+" .post_title").text()||mla.settings.noTitle;b+='<div id="ttle'+e+'"><a id="_'+e+'" class="ntdelbutton" title="'+mla.settings.ntdelTitle+'">X</a>'+c+"</div>"}});if(d){return this.revert()}a("#bulk-titles").html(b);a("#bulk-titles a").click(function(){var c=a(this).attr("id").substr(1);a('table.widefat input[value="'+c+'"]').prop("checked",false);a("#ttle"+c).remove()});a("textarea.mla_tags").each(function(){var c=a(this).attr("name").replace("]","").replace("tax_input[","");a(this).suggest(ajaxurl+"?action=ajax-tag-search&tax="+c,{delay:500,minchars:2,multiple:true,multipleSep:mla.settings.comma+" "})});a("html, body").animate({scrollTop:0},"fast")},bulkSave:function(c){var b;mla.bulkEdit={inProcess:false,doCancel:false,chunkSize:0,targetName:"",fields:"",ids:[],idsCount:0,offset:0,waiting:0,running:0,complete:0,unchanged:0,success:0,failure:0};mla.bulkEdit.chunkSize=+mla.settings.bulkChunkSize;mla.bulkEdit.targetName=c.target.name;mla.bulkEdit.fields=a("#bulk-edit :input").serialize();b=a('tbody th.check-column input[type="checkbox"]').serializeArray();a.each(b,function(d,e){mla.bulkEdit.ids[d]=+e.value});mla.bulkEdit.idsCount=mla.bulkEdit.waiting=mla.bulkEdit.ids.length;mla.inlineEditAttachment.bulkProgressOpen();mla.inlineEditAttachment.bulkPost();return false},bulkProgressOpen:function(){var b="",d=true;this.revert();a("#bulk-progress td").attr("colspan",a(".widefat:first thead th:visible").length);a("table.widefat tbody").prepend(a("#bulk-progress"));a("#bulk-progress").addClass("inline-editor").show();a("#cb-select-all-1").removeAttr("checked");a("#cb-select-all-2").removeAttr("checked");a('tbody th.check-column input[type="checkbox"]').each(function(){if(a(this).prop("checked")){d=false;var e=a(this).val(),c;c=a("#inline_"+e+" .post_title").text()||mla.settings.noTitle;b+='<div id="ttle'+e+'"><a id="_'+e+'" class="ntdelbutton" title="'+mla.settings.ntdelTitle+'">X</a>'+c+"</div>"}});if(d){return this.revert()}a("#bulk-progress-running").html("");a("#bulk-progress-complete").html("");a("#bulk-progress-waiting").html(b);a("#bulk-progress-waiting a").click(function(){var c=a(this).attr("id").substr(1);a('table.widefat input[value="'+c+'"]').prop("checked",false);a("#ttle"+c).remove()});a("#bulk-progress .inline-edit-save .error").html("");a("#bulk_refresh").prop("disabled",true).css("opacity","0.5");a("html, body").animate({scrollTop:0},"fast")},bulkPost:function(){var b,g,f,i,c,h=a("table.widefat .inline-edit-save .spinner"),d=a("#bulk-progress .inline-edit-save .error"),j=a("#bulk-progress-waiting"),e=a("#bulk-progress-running");g=mla.bulkEdit.ids.slice(mla.bulkEdit.offset,mla.bulkEdit.offset+mla.bulkEdit.chunkSize);mla.bulkEdit.offset+=mla.bulkEdit.chunkSize;for(f=0;f<g.length;f++){i=a("#ttle"+g[f],j).remove();a("a",i).hide();e.append(i)}mla.bulkEdit.waiting-=g.length;mla.bulkEdit.running=g.length;b={action:mla.settings.ajax_action,nonce:mla.settings.ajax_nonce,bulk_action:mla.bulkEdit.targetName,cb_attachment:g};b=a.param(b)+"&"+mla.bulkEdit.fields;mla.bulkEdit.inProcess=true;if(mla.settings.useSpinnerClass){h.addClass("is-active")}else{h.show()}c=mla.settings.bulkWaiting+": "+mla.bulkEdit.waiting+", "+mla.settings.bulkComplete+": "+mla.bulkEdit.complete+", "+mla.settings.bulkUnchanged+": "+mla.bulkEdit.unchanged+", "+mla.settings.bulkSuccess+": "+mla.bulkEdit.success+", "+mla.settings.bulkFailure+": "+mla.bulkEdit.failure;d.html(c).show();a.ajax(ajaxurl,{type:"POST",data:b,dataType:"json"}).always(function(){if(mla.settings.useSpinnerClass){h.removeClass("is-active")}else{h.hide()}}).done(function(n,l){var o="no response.data",k,m;if(mla.settings.useSpinnerClass){h.removeClass("is-active")}else{h.hide()}if(n){if(!n.success){if(n.responseData){o=n.data}d.html(JSON.stringify(n)).show();mla.bulkEdit.offset=mla.bulkEdit.idsCount}else{m=a("#bulk-progress-running div").remove();a.each(m,function(){var p,q=a(this).html(),r=a(this).attr("id").substr(4);if("string"===typeof(n.data.item_results[r]["result"])){p=n.data.item_results[r]["result"];a(this).html(q+" ("+r+") - "+p)}a("#attachment-"+r).remove()});a("#bulk-progress-complete").append(m);mla.bulkEdit.complete+=mla.bulkEdit.running;mla.bulkEdit.running=0;mla.bulkEdit.unchanged+=n.data.unchanged;mla.bulkEdit.success+=n.data.success;mla.bulkEdit.failure+=n.data.failure;k=mla.settings.bulkWaiting+": "+mla.bulkEdit.waiting+", "+mla.settings.bulkComplete+": "+mla.bulkEdit.complete+", "+mla.settings.bulkUnchanged+": "+mla.bulkEdit.unchanged+", "+mla.settings.bulkSuccess+": "+mla.bulkEdit.success+", "+mla.settings.bulkFailure+": "+mla.bulkEdit.failure;d.html(k).show()}}else{d.html(mla.settings.error).show();mla.bulkEdit.offset=mla.bulkEdit.idsCount}if(mla.bulkEdit.doCancel){d.html(mla.settings.bulkCanceled+". "+k).show()}else{if(mla.bulkEdit.offset<mla.bulkEdit.idsCount){mla.inlineEditAttachment.bulkPost();return}}a("#bulk_refresh").prop("disabled",false).css("opacity","1.0");mla.bulkEdit.inProcess=false}).fail(function(l,k){if(200==l.status){d.text("("+k+") "+l.responseText)}else{d.text(mla.settings.ajaxFailError+" ("+k+"), jqXHR( "+l.status+", "+l.statusText+", "+l.responseText+")")}})},quickEdit:function(g){var d=this,b,c,e,f;d.revert();if(typeof(g)=="object"){g=mla.utility.getId(g)}b=mla.settings.fields;c=a("#inline-edit").clone(true);a("td",c).attr("colspan",a(".widefat:first thead th:visible").length);if(a(d.what+g).hasClass("alternate")){a(c).addClass("alternate")}a(d.what+g).hide().after(c);e=a("#inline_"+g);if(!a(':input[name="post_author"] option[value="'+a(".post_author",e).text()+'"]',c).val()){a(':input[name="post_author"]',c).prepend('<option value="'+a(".post_author",e).text()+'">'+a("#"+d.type+"-"+g+" .author").text()+"</option>")}if(a(':input[name="post_author"] option',c).length==1){a("label.inline-edit-author",c).hide()}for(f=0;f<b.length;f++){a(':input[name="'+b[f]+'"]',c).val(a("."+b[f],e).text())}if(a(".image_alt",e).length===0){a("label.inline-edit-image-alt",c).hide()}a(".mla_category",e).each(function(){var h=a(this).text(),i;if(h){i=a(this).attr("id").replace("_"+g,"");a("ul."+i+"-checklist :checkbox",c).val(h.split(","))}});a(".mla_tags",e).each(function(){var j=a(this).text(),k=a(this).attr("id").replace("_"+g,""),i=a("textarea.tax_input_"+k,c),h=mla.settings.comma;if(j){if(","!==h){j=j.replace(/,/g,h)}i.val(j)}i.suggest(ajaxurl+"?action=ajax-tag-search&tax="+k,{delay:500,minchars:2,multiple:true,multipleSep:mla.settings.comma+" "})});e=a(c).attr("id","edit-"+g).addClass("inline-editor").show().position().top;a(".ptitle",c).focus();a("html, body").animate({scrollTop:e},"fast");return false},quickSave:function(e){var d,b,c=a(".post_status_page").val()||"";if(typeof(e)=="object"){e=mla.utility.getId(e)}if(mla.settings.useSpinnerClass){a("table.widefat .inline-edit-save .spinner").addClass("is-active")}else{a("table.widefat .inline-edit-save .spinner").show()}d={action:mla.settings.ajax_action,nonce:mla.settings.ajax_nonce,post_type:"attachment",post_ID:e,edit_date:"true",post_status:c};b=a("#edit-"+e+" :input").serialize();d=b+"&"+a.param(d);a.post(ajaxurl,d,function(f){if(mla.settings.useSpinnerClass){a("table.widefat .inline-edit-save .spinner").removeClass("is-active")}else{a("table.widefat .inline-edit-save .spinner").hide()}if(f){if(-1!=f.indexOf("<tr")){a(mla.inlineEditAttachment.what+e).remove();a("#edit-"+e).before(f).remove();a(mla.inlineEditAttachment.what+e).hide().fadeIn()}else{f=f.replace(/<.[^<>]*?>/g,"");a("#edit-"+e+" .inline-edit-save .error").html(f).show()}}else{a("#edit-"+e+" .inline-edit-save .error").html(mla.settings.error).show()}},"html");return false},inlineParentOpen:function(e){var d,b,c;if(typeof(e)=="object"){b=mla.utility.getId(e);d=a("#edit-"+b+' :input[name="post_parent"]').val()||"";c=a("#edit-"+b+' :input[name="post_title"]').val()||"";mla.setParent.open(d,b,c);a("#mla-set-parent-submit").on("click",function(f){f.preventDefault();mla.inlineEditAttachment.inlineParentSave(b);return false})}},inlineParentSave:function(b){var f=a("#mla-set-parent-response-div input:checked").closest("tr"),h,e,c=a("#edit-"+b),d,g;if(f.length){h=a(":radio",f).val()||"";e=a("label",f).html()||"";d=a(':input[name="post_parent"]',c).clone(true).val(h);g=a(':input[name="post_parent_title"]',c).clone(true).val(e);a(':input[name="post_parent"]',c).replaceWith(d);a(':input[name="post_parent_title"]',c).replaceWith(g)}mla.setParent.close();a("#mla-set-parent-submit").off("click")},bulkParentOpen:function(){var d,b,c;b=-1;c=mla.settings.bulkTitle;d=a('#bulk-edit :input[name="post_parent"]').val()||-1;mla.setParent.open(d,b,c);a("#mla-set-parent-submit").on("click",function(e){e.preventDefault();mla.inlineEditAttachment.bulkParentSave();return false})},bulkParentSave:function(){var c=a("#mla-set-parent-response-div input:checked").closest("tr"),d,b;if(c.length){d=a(":radio",c).val()||"";b=a('#bulk-edit :input[name="post_parent"]').clone(true).val(d);a('#bulk-edit :input[name="post_parent"]').replaceWith(b)}mla.setParent.close();a("#mla-set-parent-submit").off("click")},tableParentOpen:function(d,b,c){mla.setParent.open(d,b,c);a("#mla-set-parent-submit").on("click",function(e){e.preventDefault();mla.inlineEditAttachment.tableParentSave(b);return false})},tableParentSave:function(b){var d=a("#mla-set-parent-response-div input:checked").closest("tr"),f=a(":radio",d).val()||"-1",c,e=a("#attachment-"+b+" td.attached_to").clone(true);if(d.length&&(f>=0)){e=a("#attachment-"+b+" td.attached_to").clone(true);e.html('<span class="spinner"></span>');a("#attachment-"+b+" td.attached_to").replaceWith(e);if(mla.settings.useSpinnerClass){a("#attachment-"+b+" td.attached_to .spinner").addClass("is-active")}else{a("#attachment-"+b+" td.attached_to .spinner").show()}c=a.param({action:mla.settings.ajax_action+"-set-parent",nonce:mla.settings.ajax_nonce,post_ID:b,post_parent:f,});a.post(ajaxurl,c,function(g){if(g){if(-1==g.indexOf("tableParentOpen(")){g=g.replace(/<.[^<>]*?>/g,"")}}else{g=mla.settings.ajaxFailError}a("#attachment-"+b).before(g).remove();a("#attachment-"+b).hide().fadeIn()},"html")}else{e.html(mla.settings.error);a("#attachment-"+b+" td.attached_to").replaceWith(e)}a("#mla-set-parent-submit").off("click");mla.setParent.close()},revert:function(){var b=a("table.widefat tr.inline-editor").attr("id");if(b){if(mla.settings.useSpinnerClass){a("table.widefat .inline-edit-save .spinner").removeClass("is-active")}else{a("table.widefat .inline-edit-save .spinner").hide()}if("bulk-edit"==b){a("table.widefat #bulk-edit").removeClass("inline-editor").hide();a("#bulk-titles").html("");a("#inlineedit").append(a("#bulk-edit"))}else{if("bulk-progress"==b){a("table.widefat #bulk-progress").removeClass("inline-editor").hide();a("#bulk-progress-waiting").html("");a("#inlineedit").append(a("#bulk-progress"))}else{a("#"+b).remove();b=b.substr(b.lastIndexOf("-")+1);a(this.what+b).show()}}}return false}};a(document).ready(function(){mla.inlineEditAttachment.init()})})(jQuery);
js/mla-inline-edit-upload-scripts.js CHANGED
@@ -140,7 +140,11 @@ inlineEditUpload = {
140
  if ( typeof(id) == 'object' )
141
  id = this.getId(id);
142
 
143
- $('table.widefat .spinner').show();
 
 
 
 
144
 
145
  params = {
146
  action: mla_inline_edit_upload_vars.ajax_action,
@@ -154,7 +158,11 @@ inlineEditUpload = {
154
  // make ajax request
155
  $.post( ajaxurl, params,
156
  function(r) {
157
- $('table.widefat .spinner').hide();
 
 
 
 
158
 
159
  if (r) {
160
  if ( -1 != r.indexOf('<tr') ) {
@@ -183,7 +191,12 @@ inlineEditUpload = {
183
  $('#bulk-titles').html('');
184
  $('#inlineedit').append( $('#bulk-edit') );
185
  } else {
186
- $('table.widefat .spinner').hide();
 
 
 
 
 
187
  $('#'+id).remove();
188
  id = id.substr( id.lastIndexOf('-') + 1 );
189
  $(this.what+id).show();
140
  if ( typeof(id) == 'object' )
141
  id = this.getId(id);
142
 
143
+ if ( mla.settings.useSpinnerClass ) {
144
+ $('table.widefat .spinner').addClass("is-active");
145
+ } else {
146
+ $('table.widefat .spinner').show();
147
+ }
148
 
149
  params = {
150
  action: mla_inline_edit_upload_vars.ajax_action,
158
  // make ajax request
159
  $.post( ajaxurl, params,
160
  function(r) {
161
+ if ( mla.settings.useSpinnerClass ) {
162
+ $('table.widefat .spinner').removeClass("is-active");
163
+ } else {
164
+ $('table.widefat .spinner').hide();
165
+ }
166
 
167
  if (r) {
168
  if ( -1 != r.indexOf('<tr') ) {
191
  $('#bulk-titles').html('');
192
  $('#inlineedit').append( $('#bulk-edit') );
193
  } else {
194
+ if ( mla.settings.useSpinnerClass ) {
195
+ $('table.widefat .spinner').removeClass("is-active");
196
+ } else {
197
+ $('table.widefat .spinner').hide();
198
+ }
199
+
200
  $('#'+id).remove();
201
  id = id.substr( id.lastIndexOf('-') + 1 );
202
  $(this.what+id).show();
js/mla-inline-edit-upload-scripts.min.js CHANGED
@@ -1 +1 @@
1
- var ajaxurl,jQuery,inlineEditUpload,mla_inline_edit_upload_vars;(function(a){inlineEditUpload={init:function(){var c=this,d=a("#inline-edit"),b=a("#bulk-edit");c.type="upload";c.what="#upload-";d.keyup(function(f){if(f.which==27){return inlineEditUpload.revert()}});b.keyup(function(f){if(f.which==27){return inlineEditUpload.revert()}});a("a.cancel",d).click(function(){return inlineEditUpload.revert()});a("a.save",d).click(function(){return inlineEditUpload.save(this)});a("td",d).keydown(function(f){if(f.which==13){return inlineEditUpload.save(this)}});a("a.cancel",b).click(function(){return inlineEditUpload.revert()});a("a.editinline").live("click",function(){inlineEditUpload.edit(this);return false});a("#doaction, #doaction2").click(function(f){var g=a(this).attr("id").substr(2);if(a('select[name="'+g+'"]').val()=="edit"){f.preventDefault();c.setBulk()}else{if(a("form#posts-filter tr.inline-editor").length>0){c.revert()}}})},toggle:function(c){var b=this;if("none"==a(b.what+b.getId(c)).css("display")){b.revert()}else{b.edit(c)}},setBulk:function(){var b="",d=true;this.revert();a("#bulk-edit td").attr("colspan",a(".widefat:first thead th:visible").length);a("table.widefat tbody").prepend(a("#bulk-edit"));a("#bulk-edit").addClass("inline-editor").show();a('tbody th.check-column input[type="checkbox"]').each(function(){if(a(this).prop("checked")){d=false;var e=a(this).val(),c;c=a("#inline_"+e+" .slug").text()||mla_inline_edit_upload_vars.notitle;b+='<div id="ttle'+e+'"><a id="_'+e+'" class="ntdelbutton" title="'+mla_inline_edit_upload_vars.ntdeltitle+'">X</a>'+c+"</div>"}});if(d){return this.revert()}a("#bulk-titles").html(b);a("#bulk-titles a").click(function(){var c=a(this).attr("id").substr(1);a('table.widefat input[value="'+c+'"]').prop("checked",false);a("#ttle"+c).remove()});a("html, body").animate({scrollTop:0},"fast")},edit:function(h){var d=this,b,f,c,e,g;d.revert();if(typeof(h)=="object"){h=d.getId(h)}b=mla_inline_edit_upload_vars.fields;f=mla_inline_edit_upload_vars.checkboxes;c=a("#inline-edit").clone(true);a("td",c).attr("colspan",a(".widefat:first thead th:visible").length);if(a(d.what+h).hasClass("alternate")){a(c).addClass("alternate")}a(d.what+h).hide().after(c);e=a("#inline_"+h);for(g=0;g<b.length;g++){a(':input[name="'+b[g]+'"]',c).val(a("."+b[g],e).text())}for(g=0;g<b.length;g++){if("1"==a("."+f[g],e).text()){a(':input[name="'+f[g]+'"]',c).attr("checked","checked")}else{a(':input[name="'+f[g]+'"]',c).removeAttr("checked")}}a(c).attr("id","edit-"+h).addClass("inline-editor").show();a(".ptitle",c).focus();return false},save:function(d){var c,b;if(typeof(d)=="object"){d=this.getId(d)}a("table.widefat .spinner").show();c={action:mla_inline_edit_upload_vars.ajax_action,nonce:mla_inline_edit_upload_vars.ajax_nonce,post_ID:d};b=a("#edit-"+d+" :input").serialize();c=b+"&"+a.param(c);a.post(ajaxurl,c,function(e){a("table.widefat .spinner").hide();if(e){if(-1!=e.indexOf("<tr")){a(inlineEditUpload.what+d).remove();a("#edit-"+d).before(e).remove();a(inlineEditUpload.what+d).hide().fadeIn()}else{e=e.replace(/<.[^<>]*?>/g,"");a("#edit-"+d+" .inline-edit-save .error").html(e).show()}}else{a("#edit-"+d+" .inline-edit-save .error").html(mla_inline_edit_upload_vars.error).show()}},"html");return false},revert:function(){var b=a("table.widefat tr.inline-editor").attr("id");if(b){a("table.widefat .inline-edit-save .waiting").hide();if("bulk-edit"==b){a("table.widefat #bulk-edit").removeClass("inline-editor").hide();a("#bulk-titles").html("");a("#inlineedit").append(a("#bulk-edit"))}else{a("table.widefat .spinner").hide();a("#"+b).remove();b=b.substr(b.lastIndexOf("-")+1);a(this.what+b).show()}}return false},getId:function(c){var d=a(c).closest("tr").attr("id"),b=d.split("-");return b[b.length-1]}};a(document).ready(function(){inlineEditUpload.init()})})(jQuery);
1
+ var ajaxurl,jQuery,inlineEditUpload,mla_inline_edit_upload_vars;(function(a){inlineEditUpload={init:function(){var c=this,d=a("#inline-edit"),b=a("#bulk-edit");c.type="upload";c.what="#upload-";d.keyup(function(f){if(f.which==27){return inlineEditUpload.revert()}});b.keyup(function(f){if(f.which==27){return inlineEditUpload.revert()}});a("a.cancel",d).click(function(){return inlineEditUpload.revert()});a("a.save",d).click(function(){return inlineEditUpload.save(this)});a("td",d).keydown(function(f){if(f.which==13){return inlineEditUpload.save(this)}});a("a.cancel",b).click(function(){return inlineEditUpload.revert()});a("a.editinline").live("click",function(){inlineEditUpload.edit(this);return false});a("#doaction, #doaction2").click(function(f){var g=a(this).attr("id").substr(2);if(a('select[name="'+g+'"]').val()=="edit"){f.preventDefault();c.setBulk()}else{if(a("form#posts-filter tr.inline-editor").length>0){c.revert()}}})},toggle:function(c){var b=this;if("none"==a(b.what+b.getId(c)).css("display")){b.revert()}else{b.edit(c)}},setBulk:function(){var b="",d=true;this.revert();a("#bulk-edit td").attr("colspan",a(".widefat:first thead th:visible").length);a("table.widefat tbody").prepend(a("#bulk-edit"));a("#bulk-edit").addClass("inline-editor").show();a('tbody th.check-column input[type="checkbox"]').each(function(){if(a(this).prop("checked")){d=false;var e=a(this).val(),c;c=a("#inline_"+e+" .slug").text()||mla_inline_edit_upload_vars.notitle;b+='<div id="ttle'+e+'"><a id="_'+e+'" class="ntdelbutton" title="'+mla_inline_edit_upload_vars.ntdeltitle+'">X</a>'+c+"</div>"}});if(d){return this.revert()}a("#bulk-titles").html(b);a("#bulk-titles a").click(function(){var c=a(this).attr("id").substr(1);a('table.widefat input[value="'+c+'"]').prop("checked",false);a("#ttle"+c).remove()});a("html, body").animate({scrollTop:0},"fast")},edit:function(h){var d=this,b,f,c,e,g;d.revert();if(typeof(h)=="object"){h=d.getId(h)}b=mla_inline_edit_upload_vars.fields;f=mla_inline_edit_upload_vars.checkboxes;c=a("#inline-edit").clone(true);a("td",c).attr("colspan",a(".widefat:first thead th:visible").length);if(a(d.what+h).hasClass("alternate")){a(c).addClass("alternate")}a(d.what+h).hide().after(c);e=a("#inline_"+h);for(g=0;g<b.length;g++){a(':input[name="'+b[g]+'"]',c).val(a("."+b[g],e).text())}for(g=0;g<b.length;g++){if("1"==a("."+f[g],e).text()){a(':input[name="'+f[g]+'"]',c).attr("checked","checked")}else{a(':input[name="'+f[g]+'"]',c).removeAttr("checked")}}a(c).attr("id","edit-"+h).addClass("inline-editor").show();a(".ptitle",c).focus();return false},save:function(d){var c,b;if(typeof(d)=="object"){d=this.getId(d)}if(mla.settings.useSpinnerClass){a("table.widefat .spinner").addClass("is-active")}else{a("table.widefat .spinner").show()}c={action:mla_inline_edit_upload_vars.ajax_action,nonce:mla_inline_edit_upload_vars.ajax_nonce,post_ID:d};b=a("#edit-"+d+" :input").serialize();c=b+"&"+a.param(c);a.post(ajaxurl,c,function(e){if(mla.settings.useSpinnerClass){a("table.widefat .spinner").removeClass("is-active")}else{a("table.widefat .spinner").hide()}if(e){if(-1!=e.indexOf("<tr")){a(inlineEditUpload.what+d).remove();a("#edit-"+d).before(e).remove();a(inlineEditUpload.what+d).hide().fadeIn()}else{e=e.replace(/<.[^<>]*?>/g,"");a("#edit-"+d+" .inline-edit-save .error").html(e).show()}}else{a("#edit-"+d+" .inline-edit-save .error").html(mla_inline_edit_upload_vars.error).show()}},"html");return false},revert:function(){var b=a("table.widefat tr.inline-editor").attr("id");if(b){a("table.widefat .inline-edit-save .waiting").hide();if("bulk-edit"==b){a("table.widefat #bulk-edit").removeClass("inline-editor").hide();a("#bulk-titles").html("");a("#inlineedit").append(a("#bulk-edit"))}else{if(mla.settings.useSpinnerClass){a("table.widefat .spinner").removeClass("is-active")}else{a("table.widefat .spinner").hide()}a("#"+b).remove();b=b.substr(b.lastIndexOf("-")+1);a(this.what+b).show()}}return false},getId:function(c){var d=a(c).closest("tr").attr("id"),b=d.split("-");return b[b.length-1]}};a(document).ready(function(){inlineEditUpload.init()})})(jQuery);
js/mla-inline-edit-view-scripts.js CHANGED
@@ -140,7 +140,11 @@ inlineEditView = {
140
  if ( typeof(id) == 'object' )
141
  id = this.getId(id);
142
 
143
- $('table.widefat .spinner').show();
 
 
 
 
144
 
145
  params = {
146
  action: mla_inline_edit_view_vars.ajax_action,
@@ -154,7 +158,11 @@ inlineEditView = {
154
  // make ajax request
155
  $.post( ajaxurl, params,
156
  function(r) {
157
- $('table.widefat .spinner').hide();
 
 
 
 
158
 
159
  if (r) {
160
  if ( -1 != r.indexOf('<tr') ) {
@@ -183,7 +191,12 @@ inlineEditView = {
183
  $('#bulk-titles').html('');
184
  $('#inlineedit').append( $('#bulk-edit') );
185
  } else {
186
- $('table.widefat .spinner').hide();
 
 
 
 
 
187
  $('#'+id).remove();
188
  id = id.substr( id.lastIndexOf('-') + 1 );
189
  $(this.what+id).show();
140
  if ( typeof(id) == 'object' )
141
  id = this.getId(id);
142
 
143
+ if ( mla.settings.useSpinnerClass ) {
144
+ $('table.widefat .spinner').addClass("is-active");
145
+ } else {
146
+ $('table.widefat .spinner').show();
147
+ }
148
 
149
  params = {
150
  action: mla_inline_edit_view_vars.ajax_action,
158
  // make ajax request
159
  $.post( ajaxurl, params,
160
  function(r) {
161
+ if ( mla.settings.useSpinnerClass ) {
162
+ $('table.widefat .spinner').removeClass("is-active");
163
+ } else {
164
+ $('table.widefat .spinner').hide();
165
+ }
166
 
167
  if (r) {
168
  if ( -1 != r.indexOf('<tr') ) {
191
  $('#bulk-titles').html('');
192
  $('#inlineedit').append( $('#bulk-edit') );
193
  } else {
194
+ if ( mla.settings.useSpinnerClass ) {
195
+ $('table.widefat .spinner').removeClass("is-active");
196
+ } else {
197
+ $('table.widefat .spinner').hide();
198
+ }
199
+
200
  $('#'+id).remove();
201
  id = id.substr( id.lastIndexOf('-') + 1 );
202
  $(this.what+id).show();
js/mla-inline-edit-view-scripts.min.js CHANGED
@@ -1 +1 @@
1
- var ajaxurl,jQuery,inlineEditView,mla_inline_edit_view_vars;(function(a){inlineEditView={init:function(){var c=this,d=a("#inline-edit"),b=a("#bulk-edit");c.type="view";c.what="#view-";d.keyup(function(f){if(f.which==27){return inlineEditView.revert()}});b.keyup(function(f){if(f.which==27){return inlineEditView.revert()}});a("a.cancel",d).click(function(){return inlineEditView.revert()});a("a.save",d).click(function(){return inlineEditView.save(this)});a("td",d).keydown(function(f){if(f.which==13){return inlineEditView.save(this)}});a("a.cancel",b).click(function(){return inlineEditView.revert()});a("a.editinline").live("click",function(){inlineEditView.edit(this);return false});a("#doaction, #doaction2").click(function(f){var g=a(this).attr("id").substr(2);if(a('select[name="'+g+'"]').val()=="edit"){f.preventDefault();c.setBulk()}else{if(a("form#posts-filter tr.inline-editor").length>0){c.revert()}}})},toggle:function(c){var b=this;if("none"==a(b.what+b.getId(c)).css("display")){b.revert()}else{b.edit(c)}},setBulk:function(){var b="",d=true;this.revert();a("#bulk-edit td").attr("colspan",a(".widefat:first thead th:visible").length);a("table.widefat tbody").prepend(a("#bulk-edit"));a("#bulk-edit").addClass("inline-editor").show();a('tbody th.check-column input[type="checkbox"]').each(function(){if(a(this).prop("checked")){d=false;var e=a(this).val(),c;c=a("#inline_"+e+" .slug").text()||mla_inline_edit_view_vars.notitle;b+='<div id="ttle'+e+'"><a id="_'+e+'" class="ntdelbutton" title="'+mla_inline_edit_view_vars.ntdeltitle+'">X</a>'+c+"</div>"}});if(d){return this.revert()}a("#bulk-titles").html(b);a("#bulk-titles a").click(function(){var c=a(this).attr("id").substr(1);a('table.widefat input[value="'+c+'"]').prop("checked",false);a("#ttle"+c).remove()});a("html, body").animate({scrollTop:0},"fast")},edit:function(h){var d=this,b,f,c,e,g;d.revert();if(typeof(h)=="object"){h=d.getId(h)}b=mla_inline_edit_view_vars.fields;f=mla_inline_edit_view_vars.checkboxes;c=a("#inline-edit").clone(true);a("td",c).attr("colspan",a(".widefat:first thead th:visible").length);if(a(d.what+h).hasClass("alternate")){a(c).addClass("alternate")}a(d.what+h).hide().after(c);e=a("#inline_"+h);for(g=0;g<b.length;g++){a(':input[name="'+b[g]+'"]',c).val(a("."+b[g],e).text())}for(g=0;g<b.length;g++){if("1"==a("."+f[g],e).text()){a(':input[name="'+f[g]+'"]',c).attr("checked","checked")}else{a(':input[name="'+f[g]+'"]',c).removeAttr("checked")}}a(c).attr("id","edit-"+h).addClass("inline-editor").show();a(".ptitle",c).focus();return false},save:function(d){var c,b;if(typeof(d)=="object"){d=this.getId(d)}a("table.widefat .spinner").show();c={action:mla_inline_edit_view_vars.ajax_action,nonce:mla_inline_edit_view_vars.ajax_nonce,post_ID:d};b=a("#edit-"+d+" :input").serialize();c=b+"&"+a.param(c);a.post(ajaxurl,c,function(e){a("table.widefat .spinner").hide();if(e){if(-1!=e.indexOf("<tr")){a(inlineEditView.what+d).remove();a("#edit-"+d).before(e).remove();a(inlineEditView.what+d).hide().fadeIn()}else{e=e.replace(/<.[^<>]*?>/g,"");a("#edit-"+d+" .inline-edit-save .error").html(e).show()}}else{a("#edit-"+d+" .inline-edit-save .error").html(mla_inline_edit_view_vars.error).show()}},"html");return false},revert:function(){var b=a("table.widefat tr.inline-editor").attr("id");if(b){a("table.widefat .inline-edit-save .waiting").hide();if("bulk-edit"==b){a("table.widefat #bulk-edit").removeClass("inline-editor").hide();a("#bulk-titles").html("");a("#inlineedit").append(a("#bulk-edit"))}else{a("table.widefat .spinner").hide();a("#"+b).remove();b=b.substr(b.lastIndexOf("-")+1);a(this.what+b).show()}}return false},getId:function(c){var d=a(c).closest("tr").attr("id"),b=d.split("-");return b[b.length-1]}};a(document).ready(function(){inlineEditView.init()})})(jQuery);
1
+ var ajaxurl,jQuery,inlineEditView,mla_inline_edit_view_vars;(function(a){inlineEditView={init:function(){var c=this,d=a("#inline-edit"),b=a("#bulk-edit");c.type="view";c.what="#view-";d.keyup(function(f){if(f.which==27){return inlineEditView.revert()}});b.keyup(function(f){if(f.which==27){return inlineEditView.revert()}});a("a.cancel",d).click(function(){return inlineEditView.revert()});a("a.save",d).click(function(){return inlineEditView.save(this)});a("td",d).keydown(function(f){if(f.which==13){return inlineEditView.save(this)}});a("a.cancel",b).click(function(){return inlineEditView.revert()});a("a.editinline").live("click",function(){inlineEditView.edit(this);return false});a("#doaction, #doaction2").click(function(f){var g=a(this).attr("id").substr(2);if(a('select[name="'+g+'"]').val()=="edit"){f.preventDefault();c.setBulk()}else{if(a("form#posts-filter tr.inline-editor").length>0){c.revert()}}})},toggle:function(c){var b=this;if("none"==a(b.what+b.getId(c)).css("display")){b.revert()}else{b.edit(c)}},setBulk:function(){var b="",d=true;this.revert();a("#bulk-edit td").attr("colspan",a(".widefat:first thead th:visible").length);a("table.widefat tbody").prepend(a("#bulk-edit"));a("#bulk-edit").addClass("inline-editor").show();a('tbody th.check-column input[type="checkbox"]').each(function(){if(a(this).prop("checked")){d=false;var e=a(this).val(),c;c=a("#inline_"+e+" .slug").text()||mla_inline_edit_view_vars.notitle;b+='<div id="ttle'+e+'"><a id="_'+e+'" class="ntdelbutton" title="'+mla_inline_edit_view_vars.ntdeltitle+'">X</a>'+c+"</div>"}});if(d){return this.revert()}a("#bulk-titles").html(b);a("#bulk-titles a").click(function(){var c=a(this).attr("id").substr(1);a('table.widefat input[value="'+c+'"]').prop("checked",false);a("#ttle"+c).remove()});a("html, body").animate({scrollTop:0},"fast")},edit:function(h){var d=this,b,f,c,e,g;d.revert();if(typeof(h)=="object"){h=d.getId(h)}b=mla_inline_edit_view_vars.fields;f=mla_inline_edit_view_vars.checkboxes;c=a("#inline-edit").clone(true);a("td",c).attr("colspan",a(".widefat:first thead th:visible").length);if(a(d.what+h).hasClass("alternate")){a(c).addClass("alternate")}a(d.what+h).hide().after(c);e=a("#inline_"+h);for(g=0;g<b.length;g++){a(':input[name="'+b[g]+'"]',c).val(a("."+b[g],e).text())}for(g=0;g<b.length;g++){if("1"==a("."+f[g],e).text()){a(':input[name="'+f[g]+'"]',c).attr("checked","checked")}else{a(':input[name="'+f[g]+'"]',c).removeAttr("checked")}}a(c).attr("id","edit-"+h).addClass("inline-editor").show();a(".ptitle",c).focus();return false},save:function(d){var c,b;if(typeof(d)=="object"){d=this.getId(d)}if(mla.settings.useSpinnerClass){a("table.widefat .spinner").addClass("is-active")}else{a("table.widefat .spinner").show()}c={action:mla_inline_edit_view_vars.ajax_action,nonce:mla_inline_edit_view_vars.ajax_nonce,post_ID:d};b=a("#edit-"+d+" :input").serialize();c=b+"&"+a.param(c);a.post(ajaxurl,c,function(e){if(mla.settings.useSpinnerClass){a("table.widefat .spinner").removeClass("is-active")}else{a("table.widefat .spinner").hide()}if(e){if(-1!=e.indexOf("<tr")){a(inlineEditView.what+d).remove();a("#edit-"+d).before(e).remove();a(inlineEditView.what+d).hide().fadeIn()}else{e=e.replace(/<.[^<>]*?>/g,"");a("#edit-"+d+" .inline-edit-save .error").html(e).show()}}else{a("#edit-"+d+" .inline-edit-save .error").html(mla_inline_edit_view_vars.error).show()}},"html");return false},revert:function(){var b=a("table.widefat tr.inline-editor").attr("id");if(b){a("table.widefat .inline-edit-save .waiting").hide();if("bulk-edit"==b){a("table.widefat #bulk-edit").removeClass("inline-editor").hide();a("#bulk-titles").html("");a("#inlineedit").append(a("#bulk-edit"))}else{if(mla.settings.useSpinnerClass){a("table.widefat .spinner").removeClass("is-active")}else{a("table.widefat .spinner").hide()}a("#"+b).remove();b=b.substr(b.lastIndexOf("-")+1);a(this.what+b).show()}}return false},getId:function(c){var d=a(c).closest("tr").attr("id"),b=d.split("-");return b[b.length-1]}};a(document).ready(function(){inlineEditView.init()})})(jQuery);
js/mla-inline-mapping-scripts.js CHANGED
@@ -188,7 +188,12 @@ var jQuery,
188
  statusMessage += ', ' + mla.settings.bulkRedone + ': ' + mla.bulkMap.redone;
189
  }
190
 
191
- spinner.show();
 
 
 
 
 
192
  statusMessage = mla.settings.bulkWaiting + ': ' + mla.bulkMap.waiting
193
  + ', ' + mla.settings.bulkRunning + ': ' + mla.bulkMap.running
194
  + ', ' + mla.settings.bulkComplete + ': ' + mla.bulkMap.complete
@@ -202,7 +207,11 @@ var jQuery,
202
  data: params,
203
  dataType: 'json'
204
  }).always( function() {
205
- spinner.hide();
 
 
 
 
206
  }).done( function( response, status ) {
207
  var responseData = 'no response.data', responseMessage = '';
208
 
@@ -288,7 +297,11 @@ var jQuery,
288
  var progressDiv = $( '#mla-progress-div' );
289
 
290
  if ( progressDiv ) {
291
- $('p.inline-edit-save .spinner', progressDiv ).hide();
 
 
 
 
292
 
293
  // Reset Div content to initial values
294
 
188
  statusMessage += ', ' + mla.settings.bulkRedone + ': ' + mla.bulkMap.redone;
189
  }
190
 
191
+ if ( mla.settings.useSpinnerClass ) {
192
+ spinner.addClass("is-active");
193
+ } else {
194
+ spinner.show();
195
+ }
196
+
197
  statusMessage = mla.settings.bulkWaiting + ': ' + mla.bulkMap.waiting
198
  + ', ' + mla.settings.bulkRunning + ': ' + mla.bulkMap.running
199
  + ', ' + mla.settings.bulkComplete + ': ' + mla.bulkMap.complete
207
  data: params,
208
  dataType: 'json'
209
  }).always( function() {
210
+ if ( mla.settings.useSpinnerClass ) {
211
+ spinner.removeClass("is-active");
212
+ } else {
213
+ spinner.hide();
214
+ }
215
  }).done( function( response, status ) {
216
  var responseData = 'no response.data', responseMessage = '';
217
 
297
  var progressDiv = $( '#mla-progress-div' );
298
 
299
  if ( progressDiv ) {
300
+ if ( mla.settings.useSpinnerClass ) {
301
+ $('p.inline-edit-save .spinner', progressDiv ).removeClass("is-active");
302
+ } else {
303
+ $('p.inline-edit-save .spinner', progressDiv ).hide();
304
+ }
305
 
306
  // Reset Div content to initial values
307
 
js/mla-inline-mapping-scripts.min.js CHANGED
@@ -1 +1 @@
1
- var jQuery,mla_inline_mapping_vars,mla={settings:{},bulkMap:{inProcess:false,doCancel:false},utility:{},inlineMapAttachment:null};(function(a){mla.settings=typeof mla_inline_mapping_vars==="undefined"?{}:mla_inline_mapping_vars;mla_inline_mapping_vars=void 0;mla.inlineMapAttachment={init:function(){var b=a("#mla-progress-div");a("#mla-progress-cancel",b).off("click");a("#mla-progress-cancel",b).click(function(){if(mla.bulkMap.inProcess){mla.bulkMap.doCancel=true;return false}else{return mla.inlineMapAttachment.revert()}});a("#mla-progress-resume",b).off("click");a("#mla-progress-resume",b).click(function(){var c=+mla.settings.totalItems,d=+a("#mla-progress-offset").val();if(c<d){d=c}else{if(0>d){d=0}}if(mla.bulkMap.inProcess){mla.bulkMap.doCancel=true;return false}else{return mla.inlineMapAttachment.bulkMap(mla.bulkMap.targetName,d)}});a("#mla-progress-refresh",b).off("click");a("#mla-progress-refresh",b).click(function(){a("#mla-progress-refresh").prop("disabled",true);a("#mla-progress-refresh").css("opacity","0.5")});a("#mla-progress-close",b).off("click");a("#mla-progress-close",b).click(function(c){if(mla.bulkMap.inProcess){return false}return mla.inlineMapAttachment.revert()});a('input[type="submit"].mla-mapping').click(function(c){c.preventDefault();return mla.inlineMapAttachment.bulkMap(c.target.name,0)})},bulkMap:function(e,b){var d=0,c=0,g=0,f=0,h=0;b=+b;if(0<b){d=typeof mla.bulkMap.complete==="undefined"?0:mla.bulkMap.complete;c=typeof mla.bulkMap.unchanged==="undefined"?0:mla.bulkMap.unchanged;g=typeof mla.bulkMap.success==="undefined"?0:mla.bulkMap.success;f=typeof mla.bulkMap.skip==="undefined"?0:mla.bulkMap.skip;h=typeof mla.bulkMap.redone==="undefined"?0:mla.bulkMap.redone}if(d<b){f+=b-d}else{if(d>b){h+=d-b}}mla.bulkMap={inProcess:false,doCancel:false,chunkSize:+mla.settings.bulkChunkSize,targetName:e,fields:a(mla.settings.fieldsId+" :input").serialize(),offset:b,waiting:mla.settings.totalItems-b,running:0,complete:b,unchanged:c,success:g,skip:f,redone:h,refresh:false};mla.inlineMapAttachment.progressOpen();mla.inlineMapAttachment.bulkPost();return false},progressOpen:function(){this.revert();a("#mla-progress-meter").css("width","0%");a("#mla-progress-meter").html("0%");a("#mla-progress-message").html("");a("#mla-progress-error").html("");a("#mla-progress-div").show();a("#mla-progress-cancel").prop("disabled",false).css("opacity","1.0");a("#mla-progress-resume").hide();a("#mla-progress-offset").hide();a("#mla-progress-refresh").hide();a("#mla-progress-close").prop("disabled",true).css("opacity","0.5").show();a("html, body").animate({scrollTop:0},"fast")},bulkPost:function(){var g,c,f="",e=a("#mla-progress-div p.inline-edit-save .spinner"),d=a("#mla-progress-message"),b=a("#mla-progress-error");if(mla.bulkMap.waiting<mla.bulkMap.chunkSize){c=mla.bulkMap.waiting}else{c=mla.bulkMap.chunkSize}mla.bulkMap.waiting-=c;mla.bulkMap.running=c;g={page:mla.settings.page,mla_tab:mla.settings.mla_tab,screen:mla.settings.screen,action:mla.settings.ajax_action,nonce:mla.settings.ajax_nonce,bulk_action:mla.bulkMap.targetName,offset:mla.bulkMap.complete,length:c};g=a.param(g)+"&"+mla.bulkMap.fields;mla.bulkMap.inProcess=true;percentComplete=Math.floor((100*mla.bulkMap.complete)/mla.settings.totalItems)+"%";a("#mla-progress-meter").css("width",percentComplete);a("#mla-progress-meter").html(percentComplete);if(0<mla.bulkMap.skip){f+=", "+mla.settings.bulkSkip+": "+mla.bulkMap.skip}if(0<mla.bulkMap.redone){f+=", "+mla.settings.bulkRedone+": "+mla.bulkMap.redone}e.show();f=mla.settings.bulkWaiting+": "+mla.bulkMap.waiting+", "+mla.settings.bulkRunning+": "+mla.bulkMap.running+", "+mla.settings.bulkComplete+": "+mla.bulkMap.complete+f+", "+mla.settings.bulkUnchanged+": "+mla.bulkMap.unchanged+", "+mla.settings.bulkSuccess+": "+mla.bulkMap.success;d.html(f).show();a.ajax(ajaxurl,{type:"POST",data:g,dataType:"json"}).always(function(){e.hide()}).done(function(j,i){var k="no response.data",h="";if(j){if(!j.success){if(j.responseData){k=j.data}b.html(JSON.stringify(j));mla.bulkMap.waiting=0}else{if(0==j.data.processed){h=j.data.message;mla.bulkMap.waiting=0}else{mla.bulkMap.complete+=j.data.processed;mla.bulkMap.running=0;mla.bulkMap.unchanged+=j.data.unchanged;mla.bulkMap.success+=j.data.success;if("undefined"!==typeof j.data.refresh){mla.bulkMap.refresh=j.data.refresh}percentComplete=Math.floor((100*mla.bulkMap.complete)/mla.settings.totalItems)+"%";a("#mla-progress-meter").css("width",percentComplete);a("#mla-progress-meter").html(percentComplete);if(0<mla.bulkMap.skip){h+=", "+mla.settings.bulkSkip+": "+mla.bulkMap.skip}if(0<mla.bulkMap.redone){h+=", "+mla.settings.bulkRedone+": "+mla.bulkMap.redone}h=mla.settings.bulkWaiting+": "+mla.bulkMap.waiting+", "+mla.settings.bulkComplete+": "+mla.bulkMap.complete+h+", "+mla.settings.bulkUnchanged+": "+mla.bulkMap.unchanged+", "+mla.settings.bulkSuccess+": "+mla.bulkMap.success}d.html(h).show()}}else{b.html(mla.settings.error);mla.bulkMap.waiting=0}if(mla.bulkMap.doCancel){d.html(mla.settings.bulkCanceled+". "+h).show();a("#mla-progress-resume").show();a("#mla-progress-offset").val(mla.bulkMap.complete).show()}else{if(mla.bulkMap.waiting){mla.inlineMapAttachment.bulkPost();return}}if(mla.bulkMap.refresh){a("#mla-progress-close").hide();a("#mla-progress-refresh").prop("disabled",false).css("opacity","1.0").show()}else{a("#mla-progress-close").prop("disabled",false).css("opacity","1.0")}a("#mla-progress-cancel").prop("disabled",true).css("opacity","0.5");mla.bulkMap.inProcess=false}).fail(function(i,h){if(200==i.status){b.html("("+h+") "+i.responseText)}else{b.html(mla.settings.ajaxFailError+" ("+h+"), jqXHR( "+i.status+", "+i.statusText+", "+i.responseText+")")}})},revert:function(){var b=a("#mla-progress-div");if(b){a("p.inline-edit-save .spinner",b).hide();a(b).hide()}return false}};a(document).ready(function(){mla.inlineMapAttachment.init()})})(jQuery);
1
+ var jQuery,mla_inline_mapping_vars,mla={settings:{},bulkMap:{inProcess:false,doCancel:false},utility:{},inlineMapAttachment:null};(function(a){mla.settings=typeof mla_inline_mapping_vars==="undefined"?{}:mla_inline_mapping_vars;mla_inline_mapping_vars=void 0;mla.inlineMapAttachment={init:function(){var b=a("#mla-progress-div");a("#mla-progress-cancel",b).off("click");a("#mla-progress-cancel",b).click(function(){if(mla.bulkMap.inProcess){mla.bulkMap.doCancel=true;return false}else{return mla.inlineMapAttachment.revert()}});a("#mla-progress-resume",b).off("click");a("#mla-progress-resume",b).click(function(){var c=+mla.settings.totalItems,d=+a("#mla-progress-offset").val();if(c<d){d=c}else{if(0>d){d=0}}if(mla.bulkMap.inProcess){mla.bulkMap.doCancel=true;return false}else{return mla.inlineMapAttachment.bulkMap(mla.bulkMap.targetName,d)}});a("#mla-progress-refresh",b).off("click");a("#mla-progress-refresh",b).click(function(){a("#mla-progress-refresh").prop("disabled",true);a("#mla-progress-refresh").css("opacity","0.5")});a("#mla-progress-close",b).off("click");a("#mla-progress-close",b).click(function(c){if(mla.bulkMap.inProcess){return false}return mla.inlineMapAttachment.revert()});a('input[type="submit"].mla-mapping').click(function(c){c.preventDefault();return mla.inlineMapAttachment.bulkMap(c.target.name,0)})},bulkMap:function(e,b){var d=0,c=0,g=0,f=0,h=0;b=+b;if(0<b){d=typeof mla.bulkMap.complete==="undefined"?0:mla.bulkMap.complete;c=typeof mla.bulkMap.unchanged==="undefined"?0:mla.bulkMap.unchanged;g=typeof mla.bulkMap.success==="undefined"?0:mla.bulkMap.success;f=typeof mla.bulkMap.skip==="undefined"?0:mla.bulkMap.skip;h=typeof mla.bulkMap.redone==="undefined"?0:mla.bulkMap.redone}if(d<b){f+=b-d}else{if(d>b){h+=d-b}}mla.bulkMap={inProcess:false,doCancel:false,chunkSize:+mla.settings.bulkChunkSize,targetName:e,fields:a(mla.settings.fieldsId+" :input").serialize(),offset:b,waiting:mla.settings.totalItems-b,running:0,complete:b,unchanged:c,success:g,skip:f,redone:h,refresh:false};mla.inlineMapAttachment.progressOpen();mla.inlineMapAttachment.bulkPost();return false},progressOpen:function(){this.revert();a("#mla-progress-meter").css("width","0%");a("#mla-progress-meter").html("0%");a("#mla-progress-message").html("");a("#mla-progress-error").html("");a("#mla-progress-div").show();a("#mla-progress-cancel").prop("disabled",false).css("opacity","1.0");a("#mla-progress-resume").hide();a("#mla-progress-offset").hide();a("#mla-progress-refresh").hide();a("#mla-progress-close").prop("disabled",true).css("opacity","0.5").show();a("html, body").animate({scrollTop:0},"fast")},bulkPost:function(){var g,c,f="",e=a("#mla-progress-div p.inline-edit-save .spinner"),d=a("#mla-progress-message"),b=a("#mla-progress-error");if(mla.bulkMap.waiting<mla.bulkMap.chunkSize){c=mla.bulkMap.waiting}else{c=mla.bulkMap.chunkSize}mla.bulkMap.waiting-=c;mla.bulkMap.running=c;g={page:mla.settings.page,mla_tab:mla.settings.mla_tab,screen:mla.settings.screen,action:mla.settings.ajax_action,nonce:mla.settings.ajax_nonce,bulk_action:mla.bulkMap.targetName,offset:mla.bulkMap.complete,length:c};g=a.param(g)+"&"+mla.bulkMap.fields;mla.bulkMap.inProcess=true;percentComplete=Math.floor((100*mla.bulkMap.complete)/mla.settings.totalItems)+"%";a("#mla-progress-meter").css("width",percentComplete);a("#mla-progress-meter").html(percentComplete);if(0<mla.bulkMap.skip){f+=", "+mla.settings.bulkSkip+": "+mla.bulkMap.skip}if(0<mla.bulkMap.redone){f+=", "+mla.settings.bulkRedone+": "+mla.bulkMap.redone}if(mla.settings.useSpinnerClass){e.addClass("is-active")}else{e.show()}f=mla.settings.bulkWaiting+": "+mla.bulkMap.waiting+", "+mla.settings.bulkRunning+": "+mla.bulkMap.running+", "+mla.settings.bulkComplete+": "+mla.bulkMap.complete+f+", "+mla.settings.bulkUnchanged+": "+mla.bulkMap.unchanged+", "+mla.settings.bulkSuccess+": "+mla.bulkMap.success;d.html(f).show();a.ajax(ajaxurl,{type:"POST",data:g,dataType:"json"}).always(function(){if(mla.settings.useSpinnerClass){e.removeClass("is-active")}else{e.hide()}}).done(function(j,i){var k="no response.data",h="";if(j){if(!j.success){if(j.responseData){k=j.data}b.html(JSON.stringify(j));mla.bulkMap.waiting=0}else{if(0==j.data.processed){h=j.data.message;mla.bulkMap.waiting=0}else{mla.bulkMap.complete+=j.data.processed;mla.bulkMap.running=0;mla.bulkMap.unchanged+=j.data.unchanged;mla.bulkMap.success+=j.data.success;if("undefined"!==typeof j.data.refresh){mla.bulkMap.refresh=j.data.refresh}percentComplete=Math.floor((100*mla.bulkMap.complete)/mla.settings.totalItems)+"%";a("#mla-progress-meter").css("width",percentComplete);a("#mla-progress-meter").html(percentComplete);if(0<mla.bulkMap.skip){h+=", "+mla.settings.bulkSkip+": "+mla.bulkMap.skip}if(0<mla.bulkMap.redone){h+=", "+mla.settings.bulkRedone+": "+mla.bulkMap.redone}h=mla.settings.bulkWaiting+": "+mla.bulkMap.waiting+", "+mla.settings.bulkComplete+": "+mla.bulkMap.complete+h+", "+mla.settings.bulkUnchanged+": "+mla.bulkMap.unchanged+", "+mla.settings.bulkSuccess+": "+mla.bulkMap.success}d.html(h).show()}}else{b.html(mla.settings.error);mla.bulkMap.waiting=0}if(mla.bulkMap.doCancel){d.html(mla.settings.bulkCanceled+". "+h).show();a("#mla-progress-resume").show();a("#mla-progress-offset").val(mla.bulkMap.complete).show()}else{if(mla.bulkMap.waiting){mla.inlineMapAttachment.bulkPost();return}}if(mla.bulkMap.refresh){a("#mla-progress-close").hide();a("#mla-progress-refresh").prop("disabled",false).css("opacity","1.0").show()}else{a("#mla-progress-close").prop("disabled",false).css("opacity","1.0")}a("#mla-progress-cancel").prop("disabled",true).css("opacity","0.5");mla.bulkMap.inProcess=false}).fail(function(i,h){if(200==i.status){b.html("("+h+") "+i.responseText)}else{b.html(mla.settings.ajaxFailError+" ("+h+"), jqXHR( "+i.status+", "+i.statusText+", "+i.responseText+")")}})},revert:function(){var b=a("#mla-progress-div");if(b){if(mla.settings.useSpinnerClass){a("p.inline-edit-save .spinner",b).removeClass("is-active")}else{a("p.inline-edit-save .spinner",b).hide()}a(b).hide()}return false}};a(document).ready(function(){mla.inlineMapAttachment.init()})})(jQuery);
js/mla-media-modal-scripts.js CHANGED
@@ -486,6 +486,11 @@ var wp, wpAjax, ajaxurl, jQuery, _,
486
  }); // wp.media.view.MlaTermsSearch
487
  } // mlaModal.settings.enableTermsSearch
488
 
 
 
 
 
 
489
  /**
490
  * Extended wp.media.view.Search
491
  */
@@ -509,6 +514,10 @@ var wp, wpAjax, ajaxurl, jQuery, _,
509
 
510
  initialize: function() {
511
  var state = this.controller._state;
 
 
 
 
512
 
513
  if ( 'undefined' === typeof mlaModal.settings.query[ state ] ) {
514
  mlaModal.settings.query[ state ] = _.clone( mlaModal.settings.query.initial );
@@ -634,21 +643,16 @@ var wp, wpAjax, ajaxurl, jQuery, _,
634
  }); // Simulated search
635
  } // mlaModal.settings.enableSearchBox
636
 
637
- /* for debug : trace every event triggered in the wp.media.frame * /
638
- function mediaFrameOn( eventName ) {
639
- //console.log('wp.media.frame Event: ', eventName);
640
- } // */
641
-
642
  /**
643
  * Add/replace media-toolbar controls with our own
644
  */
645
  if ( mlaModal.settings.enableMimeTypes || mlaModal.settings.enableMonthsDropdown || mlaModal.settings.enableTermsDropdown || mlaModal.settings.enableTermsSearch || mlaModal.settings.enableSearchBox ) {
646
  wp.media.view.AttachmentsBrowser = wp.media.view.AttachmentsBrowser.extend({
647
- /* for debug : trace every event triggered in the wp.media.frame * /
648
- toolbarEvent: function(eventName ) {
649
  var id = this.model.attributes.id;
650
- //console.log('toolbarEvent this.model.attributes: ', JSON.stringify( this.model.attributes ));
651
- //console.log('toolbarEvent( ', id, ' ) Event: ', eventName);
652
  }, // */
653
 
654
  createToolbar: function() {
@@ -661,14 +665,9 @@ function mediaFrameOn( eventName ) {
661
  mlaModal.settings.query[ state ].searchFields = _.clone( mlaModal.settings.query.initial.searchFields );
662
  }
663
 
664
- /* for debug : trace every event triggered in the wp.media.frame * /
665
- wp.media.frame.off( 'all', mediaFrameOn );
666
- wp.media.frame.on( 'all', mediaFrameOn );
667
- // */
668
-
669
- /* for debug : trace every event triggered in the wp.media.frame */
670
- //this.stopListening( wp.media.frame );
671
- //this.listenTo( wp.media.frame, 'all', this.toolbarEvent );
672
  // */
673
 
674
  // Apply the original method to create the toolbar
@@ -712,7 +711,8 @@ wp.media.frame.on( 'all', mediaFrameOn );
712
 
713
  if ( this.options.search ) {
714
  if ( mlaModal.settings.enableSearchBox ) {
715
- this.toolbar.unset( 'search', { silent: true } );
 
716
  this.toolbar.set( 'MlaSearch', new wp.media.view.MlaSearch({
717
  controller: this.controller,
718
  model: this.collection.props,
@@ -728,6 +728,10 @@ wp.media.frame.on( 'all', mediaFrameOn );
728
  }
729
  },
730
 
 
 
 
 
731
  updateFilters: function( taxonomy, selectMarkup ) {
732
  var newOptions = {};
733
 
@@ -1068,7 +1072,7 @@ wp.media.frame.on( 'all', mediaFrameOn );
1068
  query[ taxonomy ] = termList;
1069
 
1070
  wp.media.post( mlaModal.settings.ajaxUpdateCompatAction, query ).done( function( results ) {
1071
- var taxonomy, list;
1072
 
1073
  for ( taxonomy in results ) {
1074
  if ( 'object' === typeof( results[ taxonomy][ 'object-terms' ] ) ) {
@@ -1082,6 +1086,9 @@ wp.media.frame.on( 'all', mediaFrameOn );
1082
  for ( list in results[ taxonomy ] ) {
1083
  $( "#" + list, tableData ).replaceWith( results[ taxonomy ][ list ] );
1084
  }
 
 
 
1085
  }
1086
 
1087
  $( tableData ).css( 'opacity', '1.0' );
486
  }); // wp.media.view.MlaTermsSearch
487
  } // mlaModal.settings.enableTermsSearch
488
 
489
+ /* for debug : trace every event triggered in the wp.media.view.MlaSearch * /
490
+ function MlaSearchOn( eventName ) {
491
+ console.log('wp.media.view.MlaSearch Event: ', eventName);
492
+ } // */
493
+
494
  /**
495
  * Extended wp.media.view.Search
496
  */
514
 
515
  initialize: function() {
516
  var state = this.controller._state;
517
+ /* for debug : trace every event triggered in the wp.media.view.MlaSearch * /
518
+ wp.media.view.MlaSearch.off( 'all', MlaSearchOn );
519
+ wp.media.view.MlaSearch.on( 'all', MlaSearchOn );
520
+ // */
521
 
522
  if ( 'undefined' === typeof mlaModal.settings.query[ state ] ) {
523
  mlaModal.settings.query[ state ] = _.clone( mlaModal.settings.query.initial );
643
  }); // Simulated search
644
  } // mlaModal.settings.enableSearchBox
645
 
 
 
 
 
 
646
  /**
647
  * Add/replace media-toolbar controls with our own
648
  */
649
  if ( mlaModal.settings.enableMimeTypes || mlaModal.settings.enableMonthsDropdown || mlaModal.settings.enableTermsDropdown || mlaModal.settings.enableTermsSearch || mlaModal.settings.enableSearchBox ) {
650
  wp.media.view.AttachmentsBrowser = wp.media.view.AttachmentsBrowser.extend({
651
+ /* for debug : trace every event triggered in this.controller * /
652
+ toolbarEvent: function( eventName ) {
653
  var id = this.model.attributes.id;
654
+ console.log('toolbarEvent this.model.attributes: ', JSON.stringify( this.model.attributes ));
655
+ console.log('toolbarEvent( ', id, ' ) Event: ', eventName);
656
  }, // */
657
 
658
  createToolbar: function() {
665
  mlaModal.settings.query[ state ].searchFields = _.clone( mlaModal.settings.query.initial.searchFields );
666
  }
667
 
668
+ /* for debug : trace every event triggered in the this.controller * /
669
+ this.stopListening( this.controller );
670
+ this.listenTo( this.controller, 'all', this.toolbarEvent );
 
 
 
 
 
671
  // */
672
 
673
  // Apply the original method to create the toolbar
711
 
712
  if ( this.options.search ) {
713
  if ( mlaModal.settings.enableSearchBox ) {
714
+ this.listenTo( this.controller, 'uploader:ready', this.hideDefaultSearch );
715
+ //this.toolbar.unset( 'search', { silent: true } );
716
  this.toolbar.set( 'MlaSearch', new wp.media.view.MlaSearch({
717
  controller: this.controller,
718
  model: this.collection.props,
728
  }
729
  },
730
 
731
+ hideDefaultSearch: function() {
732
+ $( '#media-search-input' ).hide();
733
+ },
734
+
735
  updateFilters: function( taxonomy, selectMarkup ) {
736
  var newOptions = {};
737
 
1072
  query[ taxonomy ] = termList;
1073
 
1074
  wp.media.post( mlaModal.settings.ajaxUpdateCompatAction, query ).done( function( results ) {
1075
+ var tagsDiv, taxonomy, list;
1076
 
1077
  for ( taxonomy in results ) {
1078
  if ( 'object' === typeof( results[ taxonomy][ 'object-terms' ] ) ) {
1086
  for ( list in results[ taxonomy ] ) {
1087
  $( "#" + list, tableData ).replaceWith( results[ taxonomy ][ list ] );
1088
  }
1089
+
1090
+ tagsDiv = $( '#mla-taxonomy-' + taxonomy, tableData );
1091
+ mlaModal.tagBox.quickClicks( tagsDiv );
1092
  }
1093
 
1094
  $( tableData ).css( 'opacity', '1.0' );
js/mla-media-modal-scripts.min.js CHANGED
@@ -1 +1 @@
1
- var wp,wpAjax,ajaxurl,jQuery,_,getUserSetting,setUserSetting,deleteUserSetting,mlaTaxonomy,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.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"?{screen:"unknown",enableMediaGrid:false,enableMediaModal:false}:wp.media.view.settings.mla_settings;delete wp.media.view.settings.mla_settings;if(!(mlaModal.settings.enableMediaGrid||mlaModal.settings.enableMediaModal)){return}if(("grid"===mlaModal.settings.screen)&&false===mlaModal.settings.enableMediaGrid){return}if(("modal"===mlaModal.settings.screen)&&false===mlaModal.settings.enableMediaModal){return}mlaModal.utility.originalMediaAjax=wp.media.ajax;wp.media.ajax=function(h,d){var g=mlaModal.settings.state,f,c,e,b;if(_.isObject(h)){d=h}else{d=d||{};d.data=_.extend(d.data||{},{action:h})}if("query-attachments"==d.data.action){f=d.data.query;c=typeof f.s;if("object"==c){e=f.s}else{if("string"==c){e={mla_search_value:f.s}}else{e={mla_search_value:""}}}if("undefined"!=typeof f.post_mime_type){mlaModal.settings.query[g].filterMime=f.post_mime_type}else{mlaModal.settings.query[g].filterMime="all"}if("undefined"!=typeof e.mla_filter_month){mlaModal.settings.query[g].filterMonth=e.mla_filter_month}else{if("undefined"!=typeof f.year){mlaModal.settings.query[g].filterMonth=(100*f.year)+(1*f.monthnum)}else{}}if("undefined"!=typeof e.mla_filter_term){mlaModal.settings.query[g].filterTerm=e.mla_filter_term}if("undefined"!=typeof e.mla_search_value){mlaModal.settings.query[g].searchValue=e.mla_search_value}b={mla_filter_month:mlaModal.settings.query[g].filterMonth,mla_filter_term:mlaModal.settings.query[g].filterTerm,mla_terms_search:mlaModal.settings.query[g].termsSearch,mla_search_clicks:mlaModal.settings.query[g].searchClicks,mla_search_value:mlaModal.settings.query[g].searchValue,mla_search_fields:mlaModal.settings.query[g].searchFields,mla_search_connector:mlaModal.settings.query[g].searchConnector};mlaModal.settings.query[g].termsSearch="";a("#mla-terms-search-input").html("").val("");d.data.query.s=b}return mlaModal.utility.originalMediaAjax.call(this,d)};if(mlaModal.settings.enableMimeTypes){wp.media.view.AttachmentFilters.Mla=wp.media.view.AttachmentFilters.extend({createFilters:function(){var c=this.controller._state,b={};_.each(mlaModal.settings.mimeTypes||{},function(e,d){if(("grid"===mlaModal.settings.screen)||("trash"!==d)){b[d]={text:e,props:{type:d,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};if(wp.media.view.settings.post.id){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("undefined"===typeof b[mlaModal.settings.query[c].filterMime]){mlaModal.settings.query[c].filterMime="all"}if(mlaModal.settings.query[c].filterMime!="all"){this.model.set(b[mlaModal.settings.query[c].filterMime].props,{silent:false})}},select:function(){var e=this.controller._state,b=this.model,d=mlaModal.settings.query[e].filterMime,c=b.toJSON();if(false===mlaModal.settings.enableSearchBox){if("string"==typeof c.search){mlaModal.settings.query[e].searchValue=c.search}else{mlaModal.settings.query[e].searchValue=""}}_.find(this.filters,function(g,h){var f=_.all(g.props,function(j,i){return j===(_.isUndefined(c[i])?null:c[i])});if(f){return d=h}});this.$el.val(d)},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-filters",id:"media-attachment-date-filters",createFilters:function(){var c=this.controller._state,b={};_.each(mlaModal.settings.months||{},function(e,d){b[d]={text:e,props:{s:{mla_filter_month:d}}}});this.filters=b;if("undefined"===typeof b[mlaModal.settings.query[c].filterMonth]){mlaModal.settings.query[c].filterMonth=0}if(mlaModal.settings.query[c].filterMonth>0){this.model.set(b[mlaModal.settings.query[c].filterMonth].props,{silent:false})}},select:function(){var e=this.controller._state,b=this.model,d=mlaModal.settings.query[e].filterMonth,c=b.toJSON();if(_.isUndefined(c.s)){c.s={}}if(false===mlaModal.settings.enableSearchBox){if("string"==typeof c.search){mlaModal.settings.query[e].searchValue=c.search}else{mlaModal.settings.query[e].searchValue=""}}if(_.isUndefined(c.s.mla_filter_month)){c.s.mla_filter_month=mlaModal.settings.query[e].filterMonth}else{mlaModal.settings.query[e].filterMonth=c.s.mla_filter_month}_.find(this.filters,function(g,h){var f=_.all(g.props,function(i){return i.mla_filter_month==mlaModal.settings.query[e].filterMonth});if(f){return d=h}});this.$el.val(d)},change:function(){var b=this.filters[this.el.value],c;if(b){c={s:{mla_filter_month:b.props.s.mla_filter_month}};this.model.set(c);a("#mla-search-submit").click()}}})}if(mlaModal.settings.enableTermsDropdown){wp.media.view.AttachmentFilters.MlaTerms=wp.media.view.AttachmentFilters.extend({className:"attachment-filters",id:"media-attachment-term-filters",createFilters:function(){var d=this.controller._state,b,c={};_.each(mlaModal.settings.termsText||{},function(f,e){c[e]={text:f,props:{s:{mla_filter_term:parseInt(mlaModal.settings.termsValue[e])}}}});this.filters=c;b=_.indexOf(mlaModal.settings.termsValue,mlaModal.settings.query[d].filterTerm);if(b>0){this.model.set(c[b].props,{silent:false})}},select:function(){var e=this.controller._state,b=this.model,d=mlaModal.settings.query[e].filterTerm,c=b.toJSON();if(_.isUndefined(c.s)){c.s={}}if(false===mlaModal.settings.enableSearchBox){if("string"==typeof c.search){mlaModal.settings.query[e].searchValue=c.search}else{mlaModal.settings.query[e].searchValue=""}}if(_.isUndefined(c.s.mla_filter_term)){c.s.mla_filter_term=mlaModal.settings.query[e].filterTerm}else{mlaModal.settings.query[e].filterTerm=c.s.mla_filter_term}_.find(this.filters,function(g,h){var f=_.all(g.props,function(i){return i.mla_filter_term==mlaModal.settings.query[e].filterTerm});if(f){return d=h}});this.$el.val(d)},change:function(){var b=this.filters[this.el.value],c;if(b){c={s:{mla_filter_term:b.props.s.mla_filter_term}};this.model.set(c);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.query[mlaModal.settings.state].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:{input:"search",change:"search",click:"search",search:"search",MlaSearch:"search"},initialize:function(){var b=this.controller._state;if("undefined"===typeof mlaModal.settings.query[b]){mlaModal.settings.query[b]=_.clone(mlaModal.settings.query.initial);mlaModal.settings.query[b].searchFields=_.clone(mlaModal.settings.query.initial.searchFields)}},render:function(){var c=this.controller._state,b=_.extend(mlaModal.strings,mlaModal.settings.query[c]);this.$el.html(this.template(b));return this},search:function(d){var e=this.controller._state,b,f,c;if(("input"==d.type)&&("s[mla_search_value]"==d.target.name)){mlaModal.settings.query[e].searchValue=d.target.value;return}if(("click"==d.type)&&("mla_search_submit"!=d.target.name)){return}switch(d.target.name){case"s[mla_search_value]":mlaModal.settings.query[e].searchValue=d.target.value;break;case"mla_search_submit":b={mla_filter_month:mlaModal.settings.query[e].filterMonth,mla_filter_term:mlaModal.settings.query[e].filterTerm,mla_terms_search:mlaModal.settings.query[e].termsSearch,mla_search_clicks:mlaModal.settings.query[e].searchClicks++,mla_search_value:mlaModal.settings.query[e].searchValue,mla_search_fields:mlaModal.settings.query[e].searchFields,mla_search_connector:mlaModal.settings.query[e].searchConnector};this.model.set({s:b});break;case"s[mla_search_connector]":mlaModal.settings.query[e].searchConnector=d.target.value;break;case"s[mla_search_title]":f=mlaModal.settings.query[e].searchFields;c=f.indexOf("title");if(-1==c){f.push("title")}else{f.splice(c,1)}mlaModal.settings.query[e].searchFields=f;break;case"s[mla_search_name]":c=mlaModal.settings.query[e].searchFields.indexOf("name");if(-1==c){mlaModal.settings.query[e].searchFields.push("name")}else{mlaModal.settings.query[e].searchFields.splice(c,1)}break;case"s[mla_search_alt_text]":c=mlaModal.settings.query[e].searchFields.indexOf("alt-text");if(-1==c){mlaModal.settings.query[e].searchFields.push("alt-text")}else{mlaModal.settings.query[e].searchFields.splice(c,1)}break;case"s[mla_search_excerpt]":c=mlaModal.settings.query[e].searchFields.indexOf("excerpt");if(-1==c){mlaModal.settings.query[e].searchFields.push("excerpt")}else{mlaModal.settings.query[e].searchFields.splice(c,1)}break;case"s[mla_search_content]":c=mlaModal.settings.query[e].searchFields.indexOf("content");if(-1==c){mlaModal.settings.query[e].searchFields.push("content")}else{mlaModal.settings.query[e].searchFields.splice(c,1)}break;case"s[mla_search_terms]":c=mlaModal.settings.query[e].searchFields.indexOf("terms");if(-1==c){mlaModal.settings.query[e].searchFields.push("terms")}else{mlaModal.settings.query[e].searchFields.splice(c,1)}break}}})}else{wp.media.view.MlaSearch=wp.media.View.extend({tagName:"span",className:"mla-simulate-search-button",template:wp.media.template("mla-simulate-search-button"),attributes:{type:"mla-simulate-search-button"},events:{click:"simulateSearch",},render:function(){this.$el.html(this.template(mlaModal.strings));return this},simulateSearch:function(){var c=this.controller._state,b={mla_filter_month:mlaModal.settings.query[c].filterMonth,mla_filter_term:mlaModal.settings.query[c].filterTerm,mla_terms_search:mlaModal.settings.query[c].termsSearch,mla_search_clicks:mlaModal.settings.query[c].searchClicks++,mla_search_value:mlaModal.settings.query[c].searchValue,mla_search_fields:mlaModal.settings.query[c].searchFields,mla_search_connector:mlaModal.settings.query[c].searchConnector};this.model.set({s:b})}})}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,c=this.controller._state;mlaModal.settings.state=c;if("undefined"===typeof mlaModal.settings.query[c]){mlaModal.settings.query[c]=_.clone(mlaModal.settings.query.initial);mlaModal.settings.query[c].searchFields=_.clone(mlaModal.settings.query.initial.searchFields)}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.unset("dateFilter",{silent:true});this.toolbar.set("dateFilter",new wp.media.view.AttachmentFilters.MlaMonths({controller:this.controller,model:this.collection.props,priority:-75}).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:-50}).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:-50}).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())}else{this.toolbar.set("MlaSearch",new wp.media.view.MlaSearch({controller:this.controller,model:this.collection.props,priority:70}).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("&nbsp;",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("&nbsp;").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(){var j,h=this,g=mlaModal.utility.arrayCleanup(a(".server-tags",h).val()),i=mlaModal.utility.arrayCleanup(a(".the-tags",h).val());if(g===i){return}a(h).css("opacity","0.5");j={id:f,};j[b]=i;wp.media.post(mlaModal.settings.ajaxUpdateCompatAction,j).done(function(l){var k,m;for(k in l){if("object"===typeof(l[k]["object-terms"])){if(null!==mlaModal.utility.mlaAttachmentsBrowser){mlaModal.utility.mlaAttachmentsBrowser.updateFilters(k,l[k]["object-terms"])}delete l[k]["object-terms"]}for(m in l[k]){a("#"+m,h).replaceWith(l[k][m])}}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(){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(){mlaModal.cid=null});this.on("selection:unsingle",function(){mlaModal.cid=null});this.on("selection:single",function(b){mlaModal.cid=b.cid});this.on("change:uploading",function(){mlaModal.uploading=true});this.on("change",function(b){var c=false,d;if(mlaModal.uploading&&mlaModal.cid===b.cid){mlaModal.uploading=false;c=true}else{if(false===b.attributes.uploading){d=_.clone(b.changed);delete d.title;delete d.caption;delete d.alt;delete d.description;if(!_.isEmpty(d)){c=true}}}if(true===c){mlaModal.utility.hookCompatTaxonomies(b.get("id"),wp.media.frame.$el)}})}})}mlaModal.utility.hookCompatTaxonomies=function(e,c){var b,d=null;a(".mla-taxonomy-field .categorydiv",c).each(function(){b=mlaModal.utility.parseTaxonomyId(a(this).attr("id"));if(-1!=mlaModal.settings.enhancedTaxonomies.indexOf(b)){a(".compat-field-"+b+" th",c).click({id:e,currentTaxonomy:b,el:c},function(f){mlaModal.utility.fillCompatTaxonomies(f.data)});a("tr.compat-field-"+b,c).each(function(){if(a(this).hasClass("mla-taxonomy-row")){a(this).show()}else{a(this).remove()}});if(null===d){d=b}}else{a("tr.compat-field-"+b,c).each(function(){if(a(this).hasClass("mla-taxonomy-row")){a(this).remove()}})}});a(".mla-taxonomy-field .tagsdiv",c).each(function(){b=mlaModal.utility.parseTaxonomyId(a(this).attr("id"));if(-1!=mlaModal.settings.enhancedTaxonomies.indexOf(b)){a(".compat-field-"+b+" th",c).click({id:e,currentTaxonomy:b,el:c},function(f){mlaModal.utility.fillCompatTaxonomies(f.data)});a("tr.compat-field-"+b,c).each(function(){if(a(this).hasClass("mla-taxonomy-row")){a(this).show()}else{a(this).remove()}});if(null===d){d=b}}else{a("tr.compat-field-"+b,c).each(function(){if(a(this).hasClass("mla-taxonomy-row")){a(this).remove()}})}});if(mlaModal.settings.enableTermsAutofill&&null!==d){a(".compat-field-"+d+" th",c).click()}};mlaModal.utility.fillCompatTaxonomies=function(f){var c=f.el,e=[],b,d;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)});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(){var q,n,p=[],o=g.find(i+"-checklist input:checked");o.each(function(){p[p.length]=a(this).val()});p.sort(function(s,r){return s-r});p=p.join(",");n=g.siblings(j).val();if(n===p){return}g.siblings(j).val(p);g.prop("disabled",true);q={id:c,};q[f]=p;wp.media.post(mlaModal.settings.ajaxUpdateCompatAction,q).done(function(s){var r,t;for(r in s){for(t in s[r]){g.find("#"+t).html(s[r][t])}}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 r,q,s,o,n;if(13===p.keyCode){p.preventDefault();g.find(i+"-search-toggle").focus();return}r=g.find(l).val();q=g.find(i+"-checklist li");s=g.find(i+"-checklist-pop li");if(0<r.length){q.hide();s.hide()}else{q.show();s.show()}o=g.find(i+"-checklist label:matchTerms('"+r+"')");o.closest("li").find("li").andSelf().show();o.parents(i+"-checklist li").show();n=g.find(i+"-checklist-pop label:matchTerms('"+r+"')");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 wp,wpAjax,ajaxurl,jQuery,_,getUserSetting,setUserSetting,deleteUserSetting,mlaTaxonomy,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.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"?{screen:"unknown",enableMediaGrid:false,enableMediaModal:false}:wp.media.view.settings.mla_settings;delete wp.media.view.settings.mla_settings;if(!(mlaModal.settings.enableMediaGrid||mlaModal.settings.enableMediaModal)){return}if(("grid"===mlaModal.settings.screen)&&false===mlaModal.settings.enableMediaGrid){return}if(("modal"===mlaModal.settings.screen)&&false===mlaModal.settings.enableMediaModal){return}mlaModal.utility.originalMediaAjax=wp.media.ajax;wp.media.ajax=function(h,d){var g=mlaModal.settings.state,f,c,e,b;if(_.isObject(h)){d=h}else{d=d||{};d.data=_.extend(d.data||{},{action:h})}if("query-attachments"==d.data.action){f=d.data.query;c=typeof f.s;if("object"==c){e=f.s}else{if("string"==c){e={mla_search_value:f.s}}else{e={mla_search_value:""}}}if("undefined"!=typeof f.post_mime_type){mlaModal.settings.query[g].filterMime=f.post_mime_type}else{mlaModal.settings.query[g].filterMime="all"}if("undefined"!=typeof e.mla_filter_month){mlaModal.settings.query[g].filterMonth=e.mla_filter_month}else{if("undefined"!=typeof f.year){mlaModal.settings.query[g].filterMonth=(100*f.year)+(1*f.monthnum)}else{}}if("undefined"!=typeof e.mla_filter_term){mlaModal.settings.query[g].filterTerm=e.mla_filter_term}if("undefined"!=typeof e.mla_search_value){mlaModal.settings.query[g].searchValue=e.mla_search_value}b={mla_filter_month:mlaModal.settings.query[g].filterMonth,mla_filter_term:mlaModal.settings.query[g].filterTerm,mla_terms_search:mlaModal.settings.query[g].termsSearch,mla_search_clicks:mlaModal.settings.query[g].searchClicks,mla_search_value:mlaModal.settings.query[g].searchValue,mla_search_fields:mlaModal.settings.query[g].searchFields,mla_search_connector:mlaModal.settings.query[g].searchConnector};mlaModal.settings.query[g].termsSearch="";a("#mla-terms-search-input").html("").val("");d.data.query.s=b}return mlaModal.utility.originalMediaAjax.call(this,d)};if(mlaModal.settings.enableMimeTypes){wp.media.view.AttachmentFilters.Mla=wp.media.view.AttachmentFilters.extend({createFilters:function(){var c=this.controller._state,b={};_.each(mlaModal.settings.mimeTypes||{},function(e,d){if(("grid"===mlaModal.settings.screen)||("trash"!==d)){b[d]={text:e,props:{type:d,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};if(wp.media.view.settings.post.id){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("undefined"===typeof b[mlaModal.settings.query[c].filterMime]){mlaModal.settings.query[c].filterMime="all"}if(mlaModal.settings.query[c].filterMime!="all"){this.model.set(b[mlaModal.settings.query[c].filterMime].props,{silent:false})}},select:function(){var e=this.controller._state,b=this.model,d=mlaModal.settings.query[e].filterMime,c=b.toJSON();if(false===mlaModal.settings.enableSearchBox){if("string"==typeof c.search){mlaModal.settings.query[e].searchValue=c.search}else{mlaModal.settings.query[e].searchValue=""}}_.find(this.filters,function(g,h){var f=_.all(g.props,function(j,i){return j===(_.isUndefined(c[i])?null:c[i])});if(f){return d=h}});this.$el.val(d)},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-filters",id:"media-attachment-date-filters",createFilters:function(){var c=this.controller._state,b={};_.each(mlaModal.settings.months||{},function(e,d){b[d]={text:e,props:{s:{mla_filter_month:d}}}});this.filters=b;if("undefined"===typeof b[mlaModal.settings.query[c].filterMonth]){mlaModal.settings.query[c].filterMonth=0}if(mlaModal.settings.query[c].filterMonth>0){this.model.set(b[mlaModal.settings.query[c].filterMonth].props,{silent:false})}},select:function(){var e=this.controller._state,b=this.model,d=mlaModal.settings.query[e].filterMonth,c=b.toJSON();if(_.isUndefined(c.s)){c.s={}}if(false===mlaModal.settings.enableSearchBox){if("string"==typeof c.search){mlaModal.settings.query[e].searchValue=c.search}else{mlaModal.settings.query[e].searchValue=""}}if(_.isUndefined(c.s.mla_filter_month)){c.s.mla_filter_month=mlaModal.settings.query[e].filterMonth}else{mlaModal.settings.query[e].filterMonth=c.s.mla_filter_month}_.find(this.filters,function(g,h){var f=_.all(g.props,function(i){return i.mla_filter_month==mlaModal.settings.query[e].filterMonth});if(f){return d=h}});this.$el.val(d)},change:function(){var b=this.filters[this.el.value],c;if(b){c={s:{mla_filter_month:b.props.s.mla_filter_month}};this.model.set(c);a("#mla-search-submit").click()}}})}if(mlaModal.settings.enableTermsDropdown){wp.media.view.AttachmentFilters.MlaTerms=wp.media.view.AttachmentFilters.extend({className:"attachment-filters",id:"media-attachment-term-filters",createFilters:function(){var d=this.controller._state,b,c={};_.each(mlaModal.settings.termsText||{},function(f,e){c[e]={text:f,props:{s:{mla_filter_term:parseInt(mlaModal.settings.termsValue[e])}}}});this.filters=c;b=_.indexOf(mlaModal.settings.termsValue,mlaModal.settings.query[d].filterTerm);if(b>0){this.model.set(c[b].props,{silent:false})}},select:function(){var e=this.controller._state,b=this.model,d=mlaModal.settings.query[e].filterTerm,c=b.toJSON();if(_.isUndefined(c.s)){c.s={}}if(false===mlaModal.settings.enableSearchBox){if("string"==typeof c.search){mlaModal.settings.query[e].searchValue=c.search}else{mlaModal.settings.query[e].searchValue=""}}if(_.isUndefined(c.s.mla_filter_term)){c.s.mla_filter_term=mlaModal.settings.query[e].filterTerm}else{mlaModal.settings.query[e].filterTerm=c.s.mla_filter_term}_.find(this.filters,function(g,h){var f=_.all(g.props,function(i){return i.mla_filter_term==mlaModal.settings.query[e].filterTerm});if(f){return d=h}});this.$el.val(d)},change:function(){var b=this.filters[this.el.value],c;if(b){c={s:{mla_filter_term:b.props.s.mla_filter_term}};this.model.set(c);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.query[mlaModal.settings.state].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:{input:"search",change:"search",click:"search",search:"search",MlaSearch:"search"},initialize:function(){var b=this.controller._state;if("undefined"===typeof mlaModal.settings.query[b]){mlaModal.settings.query[b]=_.clone(mlaModal.settings.query.initial);mlaModal.settings.query[b].searchFields=_.clone(mlaModal.settings.query.initial.searchFields)}},render:function(){var c=this.controller._state,b=_.extend(mlaModal.strings,mlaModal.settings.query[c]);this.$el.html(this.template(b));return this},search:function(d){var e=this.controller._state,b,f,c;if(("input"==d.type)&&("s[mla_search_value]"==d.target.name)){mlaModal.settings.query[e].searchValue=d.target.value;return}if(("click"==d.type)&&("mla_search_submit"!=d.target.name)){return}switch(d.target.name){case"s[mla_search_value]":mlaModal.settings.query[e].searchValue=d.target.value;break;case"mla_search_submit":b={mla_filter_month:mlaModal.settings.query[e].filterMonth,mla_filter_term:mlaModal.settings.query[e].filterTerm,mla_terms_search:mlaModal.settings.query[e].termsSearch,mla_search_clicks:mlaModal.settings.query[e].searchClicks++,mla_search_value:mlaModal.settings.query[e].searchValue,mla_search_fields:mlaModal.settings.query[e].searchFields,mla_search_connector:mlaModal.settings.query[e].searchConnector};this.model.set({s:b});break;case"s[mla_search_connector]":mlaModal.settings.query[e].searchConnector=d.target.value;break;case"s[mla_search_title]":f=mlaModal.settings.query[e].searchFields;c=f.indexOf("title");if(-1==c){f.push("title")}else{f.splice(c,1)}mlaModal.settings.query[e].searchFields=f;break;case"s[mla_search_name]":c=mlaModal.settings.query[e].searchFields.indexOf("name");if(-1==c){mlaModal.settings.query[e].searchFields.push("name")}else{mlaModal.settings.query[e].searchFields.splice(c,1)}break;case"s[mla_search_alt_text]":c=mlaModal.settings.query[e].searchFields.indexOf("alt-text");if(-1==c){mlaModal.settings.query[e].searchFields.push("alt-text")}else{mlaModal.settings.query[e].searchFields.splice(c,1)}break;case"s[mla_search_excerpt]":c=mlaModal.settings.query[e].searchFields.indexOf("excerpt");if(-1==c){mlaModal.settings.query[e].searchFields.push("excerpt")}else{mlaModal.settings.query[e].searchFields.splice(c,1)}break;case"s[mla_search_content]":c=mlaModal.settings.query[e].searchFields.indexOf("content");if(-1==c){mlaModal.settings.query[e].searchFields.push("content")}else{mlaModal.settings.query[e].searchFields.splice(c,1)}break;case"s[mla_search_terms]":c=mlaModal.settings.query[e].searchFields.indexOf("terms");if(-1==c){mlaModal.settings.query[e].searchFields.push("terms")}else{mlaModal.settings.query[e].searchFields.splice(c,1)}break}}})}else{wp.media.view.MlaSearch=wp.media.View.extend({tagName:"span",className:"mla-simulate-search-button",template:wp.media.template("mla-simulate-search-button"),attributes:{type:"mla-simulate-search-button"},events:{click:"simulateSearch",},render:function(){this.$el.html(this.template(mlaModal.strings));return this},simulateSearch:function(){var c=this.controller._state,b={mla_filter_month:mlaModal.settings.query[c].filterMonth,mla_filter_term:mlaModal.settings.query[c].filterTerm,mla_terms_search:mlaModal.settings.query[c].termsSearch,mla_search_clicks:mlaModal.settings.query[c].searchClicks++,mla_search_value:mlaModal.settings.query[c].searchValue,mla_search_fields:mlaModal.settings.query[c].searchFields,mla_search_connector:mlaModal.settings.query[c].searchConnector};this.model.set({s:b})}})}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,c=this.controller._state;mlaModal.settings.state=c;if("undefined"===typeof mlaModal.settings.query[c]){mlaModal.settings.query[c]=_.clone(mlaModal.settings.query.initial);mlaModal.settings.query[c].searchFields=_.clone(mlaModal.settings.query.initial.searchFields)}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.unset("dateFilter",{silent:true});this.toolbar.set("dateFilter",new wp.media.view.AttachmentFilters.MlaMonths({controller:this.controller,model:this.collection.props,priority:-75}).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:-50}).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:-50}).render())}if(this.options.search){if(mlaModal.settings.enableSearchBox){this.listenTo(this.controller,"uploader:ready",this.hideDefaultSearch);this.toolbar.set("MlaSearch",new wp.media.view.MlaSearch({controller:this.controller,model:this.collection.props,priority:60}).render())}else{this.toolbar.set("MlaSearch",new wp.media.view.MlaSearch({controller:this.controller,model:this.collection.props,priority:70}).render())}}},hideDefaultSearch:function(){a("#media-search-input").hide()},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("&nbsp;",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("&nbsp;").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(){var j,h=this,g=mlaModal.utility.arrayCleanup(a(".server-tags",h).val()),i=mlaModal.utility.arrayCleanup(a(".the-tags",h).val());if(g===i){return}a(h).css("opacity","0.5");j={id:f,};j[b]=i;wp.media.post(mlaModal.settings.ajaxUpdateCompatAction,j).done(function(l){var m,k,n;for(k in l){if("object"===typeof(l[k]["object-terms"])){if(null!==mlaModal.utility.mlaAttachmentsBrowser){mlaModal.utility.mlaAttachmentsBrowser.updateFilters(k,l[k]["object-terms"])}delete l[k]["object-terms"]}for(n in l[k]){a("#"+n,h).replaceWith(l[k][n])}m=a("#mla-taxonomy-"+k,h);mlaModal.tagBox.quickClicks(m)}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(){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(){mlaModal.cid=null});this.on("selection:unsingle",function(){mlaModal.cid=null});this.on("selection:single",function(b){mlaModal.cid=b.cid});this.on("change:uploading",function(){mlaModal.uploading=true});this.on("change",function(b){var c=false,d;if(mlaModal.uploading&&mlaModal.cid===b.cid){mlaModal.uploading=false;c=true}else{if(false===b.attributes.uploading){d=_.clone(b.changed);delete d.title;delete d.caption;delete d.alt;delete d.description;if(!_.isEmpty(d)){c=true}}}if(true===c){mlaModal.utility.hookCompatTaxonomies(b.get("id"),wp.media.frame.$el)}})}})}mlaModal.utility.hookCompatTaxonomies=function(e,c){var b,d=null;a(".mla-taxonomy-field .categorydiv",c).each(function(){b=mlaModal.utility.parseTaxonomyId(a(this).attr("id"));if(-1!=mlaModal.settings.enhancedTaxonomies.indexOf(b)){a(".compat-field-"+b+" th",c).click({id:e,currentTaxonomy:b,el:c},function(f){mlaModal.utility.fillCompatTaxonomies(f.data)});a("tr.compat-field-"+b,c).each(function(){if(a(this).hasClass("mla-taxonomy-row")){a(this).show()}else{a(this).remove()}});if(null===d){d=b}}else{a("tr.compat-field-"+b,c).each(function(){if(a(this).hasClass("mla-taxonomy-row")){a(this).remove()}})}});a(".mla-taxonomy-field .tagsdiv",c).each(function(){b=mlaModal.utility.parseTaxonomyId(a(this).attr("id"));if(-1!=mlaModal.settings.enhancedTaxonomies.indexOf(b)){a(".compat-field-"+b+" th",c).click({id:e,currentTaxonomy:b,el:c},function(f){mlaModal.utility.fillCompatTaxonomies(f.data)});a("tr.compat-field-"+b,c).each(function(){if(a(this).hasClass("mla-taxonomy-row")){a(this).show()}else{a(this).remove()}});if(null===d){d=b}}else{a("tr.compat-field-"+b,c).each(function(){if(a(this).hasClass("mla-taxonomy-row")){a(this).remove()}})}});if(mlaModal.settings.enableTermsAutofill&&null!==d){a(".compat-field-"+d+" th",c).click()}};mlaModal.utility.fillCompatTaxonomies=function(f){var c=f.el,e=[],b,d;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)});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(){var q,n,p=[],o=g.find(i+"-checklist input:checked");o.each(function(){p[p.length]=a(this).val()});p.sort(function(s,r){return s-r});p=p.join(",");n=g.siblings(j).val();if(n===p){return}g.siblings(j).val(p);g.prop("disabled",true);q={id:c,};q[f]=p;wp.media.post(mlaModal.settings.ajaxUpdateCompatAction,q).done(function(s){var r,t;for(r in s){for(t in s[r]){g.find("#"+t).html(s[r][t])}}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 r,q,s,o,n;if(13===p.keyCode){p.preventDefault();g.find(i+"-search-toggle").focus();return}r=g.find(l).val();q=g.find(i+"-checklist li");s=g.find(i+"-checklist-pop li");if(0<r.length){q.hide();s.hide()}else{q.show();s.show()}o=g.find(i+"-checklist label:matchTerms('"+r+"')");o.closest("li").find("li").andSelf().show();o.parents(i+"-checklist li").show();n=g.find(i+"-checklist-pop label:matchTerms('"+r+"')");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));
js/mla-polylang-support-scripts.js ADDED
@@ -0,0 +1,390 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* global ajaxurl */
2
+
3
+ var jQuery,
4
+ mla_polylang_support_vars,
5
+ mlaPolylang = {
6
+ // Properties
7
+ // mlaPolylang.settings.noTitle
8
+ // mlaPolylang.settings.ntdelTitle
9
+ // mlaPolylang.settings.fields
10
+ // mlaPolylang.settings.comma
11
+ // mlaPolylang.settings.ajax_action
12
+ // mlaPolylang.settings.ajax_nonce
13
+ // mlaPolylang.settings.error
14
+ settings: {},
15
+
16
+ // Utility functions
17
+ utility: {
18
+ getId : function( o ) {
19
+ var id = jQuery( o ).closest( 'tr' ).attr( 'id' ),
20
+ parts = id.split( '-' );
21
+ return parts[ parts.length - 1 ];
22
+ }
23
+ },
24
+
25
+ // Components
26
+ inlineTranslate: null
27
+ };
28
+
29
+ ( function( $ ) {
30
+ /**
31
+ * Localized settings and strings
32
+ */
33
+ mlaPolylang.settings = typeof mla_polylang_support_vars === 'undefined' ? {} : mla_polylang_support_vars;
34
+ mla_polylang_support_vars = void 0; // delete won't work on Globals
35
+
36
+ mlaPolylang.inlineTranslate = {
37
+ init : function(){
38
+ var t = this, qtRow = $( '#pll-quick-translate' ), btRow = $( '#pll-bulk-translate' );
39
+
40
+ t.type = 'attachment';
41
+ t.what = '#attachment-';
42
+
43
+ // prepare the quick-translate row
44
+ qtRow.keyup( function( e ){
45
+ if ( e.which == 27 )
46
+ return mlaPolylang.inlineTranslate.revert();
47
+ });
48
+
49
+ $( 'a.cancel', qtRow ).click( function(){
50
+ return mlaPolylang.inlineTranslate.revert();
51
+ });
52
+
53
+ $( 'a.save', qtRow ).click( function(){
54
+ return mlaPolylang.inlineTranslate.save( this );
55
+ });
56
+
57
+ $( 'td', qtRow ).keydown( function(e){
58
+ if ( e.which == 13 )
59
+ return mlaPolylang.inlineTranslate.save( this );
60
+ });
61
+
62
+ // add event to the Quick Translate links
63
+ $( '#the-list' ).on( 'click', 'a.inlineTranslate', function(){
64
+ mlaPolylang.inlineTranslate.edit( this );
65
+ return false;
66
+ });
67
+
68
+ /*
69
+ * Add event to the Quick Edit links. This click function runs before
70
+ * the Quick Edit row is created; the focusin() event delays action until
71
+ * everything is ready.
72
+ */
73
+ $( '#the-list' ).on( 'click', 'a.editinline', function(){
74
+ $( '.quick-edit-row' ).one( 'focusin', function() {
75
+ mlaPolylang.inlineTranslate.openQuickEdit( this );
76
+ return false;
77
+ });
78
+
79
+ return false;
80
+ });
81
+
82
+ // prepare the bulk-translate row
83
+ btRow.keyup( function( e ){
84
+ if ( e.which == 27 )
85
+ return mlaPolylang.inlineTranslate.revert();
86
+ });
87
+
88
+ $( 'a.cancel', btRow ).click( function(){
89
+ return mlaPolylang.inlineTranslate.revert();
90
+ });
91
+
92
+ $( '#doaction, #doaction2' ).click( function( e ){
93
+ var n = $( this ).attr( 'id' ).substr( 2 );
94
+
95
+ if ( $( 'select[name="'+n+'"]' ).val() == 'pll-translate' ) {
96
+ e.preventDefault();
97
+ t.openBulkTranslate();
98
+ } else if ( $( 'form#posts-filter tr.inline-translator' ).length > 0 ) {
99
+ t.revert();
100
+ }
101
+ });
102
+
103
+ // Filter button (dates, categories) in top nav bar
104
+ $( '#post-query-submit' ).mousedown( function(){
105
+ t.revert();
106
+ $( 'select[name^="action"]' ).val( '-1' );
107
+ });
108
+ },
109
+
110
+ toggle : function( el ){
111
+ var t = this;
112
+
113
+ if ( 'none' == $( t.what + mlaPolylang.utility.getId( el ) ).css( 'display' ) ) {
114
+ t.revert();
115
+ } else {
116
+ t.edit( el );
117
+ }
118
+ },
119
+
120
+ openBulkTranslate : function(){
121
+ var te = '', c = true;
122
+ this.revert();
123
+
124
+ // Open up the Bulk Translate area
125
+ $( '#pll-bulk-translate td' ).attr( 'colspan', $( '.widefat:first thead th:visible' ).length );
126
+ $( 'table.widefat tbody' ).prepend( $( '#pll-bulk-translate' ) );
127
+ $( '#pll-bulk-translate' ).addClass( 'inline-translator' ).show();
128
+
129
+ // Make sure at least one item has been selected
130
+ $( 'tbody th.check-column input[type="checkbox"]' ).each( function(){
131
+ if ( $( this ).prop( 'checked' ) ) {
132
+ c = false;
133
+ var id = $( this ).val(), theTitle;
134
+ theTitle = $( '#inline_'+id+' .post_title' ).text() || mlaPolylang.settings.noTitle;
135
+ te += '<div id="ttle'+id+'"><a id="_'+id+'" class="ntdelbutton" title="'+mlaPolylang.settings.ntdelTitle+'">X</a>'+theTitle+'</div>';
136
+ }
137
+ });
138
+
139
+ if ( c ) {
140
+ return this.revert();
141
+ }
142
+
143
+ // Populate the list of selected items
144
+ $( '#pll-bulk-titles' ).html( te );
145
+ $( '#pll-bulk-titles a' ).click(function(){
146
+ var id = $( this ).attr( 'id' ).substr( 1 );
147
+
148
+ $( 'table.widefat input[value="' + id + '"]' ).prop( 'checked', false );
149
+ $( '#ttle'+id ).remove();
150
+ });
151
+
152
+ // Capture Language links
153
+ $( '#pll-bulk-translate .pll-media-action-table tr' ).each( function ( idx ){
154
+ //$( '.pll-media-action-column a', this ).off( 'click' );
155
+ $( '.pll-media-action-column a', this ).click( function( e ){
156
+ var bulkLanguage = $( this ).attr( 'pll_bulk_language' );
157
+
158
+ $( ':input[name="pll_bulk_language"]', '#pll-bulk-translate' ).val( bulkLanguage );
159
+ $( '#pll-bulk-translate .pll-media-action-table a' ).prop( 'disabled', true );
160
+ $( '#pll-bulk-translate' ).css( 'opacity', '0.5' );
161
+ $( this ).hide();
162
+ return $( '#pll-bulk-translate-submit', '#pll-bulk-translate' ).click();
163
+ });
164
+ });
165
+
166
+ $( 'html, body' ).animate( { scrollTop: 0 }, 'fast' );
167
+ },
168
+
169
+ openQuickEdit : function( id ) {
170
+ var translateRow, translations, currentLanguage;
171
+
172
+ if ( typeof( id ) == 'object' )
173
+ id = mlaPolylang.utility.getId( id );
174
+
175
+ // find the Quick Edit row
176
+ translateRow = $( '#edit-' + id );
177
+
178
+ // set up the quick translate entries
179
+ currentLanguage = $( ':input[name="old_lang"]', translateRow ).val();
180
+ translations = JSON.parse( $( ':input[name="inline_translations"]', translateRow ).val() );
181
+
182
+ $( '.pll-media-action-table tr', translateRow ).each( function ( idx ){
183
+ var parts = $( this ).attr( 'class' ).split( '-' ), slug = parts[ parts.length - 1 ];
184
+
185
+ if ( slug === currentLanguage ) {
186
+ $( '.pll-media-action-column input', this ).val( translations[ slug ] );
187
+ $( this ).hide();
188
+ } else if ( 'undefined' != typeof translations[ slug ] ) {
189
+ $( '.pll-media-action-column input', this ).val( translations[ slug ] );
190
+ $( '.pll-media-action-column a', this ).addClass( 'pll_icon_edit' );
191
+ $( '.pll-media-action-column a', this ).attr( 'title', mlaPolylang.settings.edit );
192
+ $( '.pll-media-action-column a', this ).attr( 'pll_quick_language', slug );
193
+ $( '.pll-media-action-column a', this ).attr( 'pll_quick_id', translations[ slug ] );
194
+ } else {
195
+ $( '.pll-media-action-column input', this ).val( 0 );
196
+ $( '.pll-media-action-column a', this ).addClass( 'pll_icon_add' );
197
+ $( '.pll-media-action-column a', this ).attr( 'title', mlaPolylang.settings.addNew );
198
+ $( '.pll-media-action-column a', this ).attr( 'pll_quick_language', slug );
199
+ $( '.pll-media-action-column a', this ).attr( 'pll_quick_id', 0 );
200
+ }
201
+
202
+ $( '.pll-media-action-column a', this ).off( 'click' );
203
+ $( '.pll-media-action-column a', this ).click( function( e ){
204
+ var quickLanguage = $( this ).attr( 'pll_quick_language' ), quickId = $( this ).attr( 'pll_quick_id' );
205
+
206
+ $( ':input[name="pll_quick_language"]', translateRow ).val( quickLanguage );
207
+ $( ':input[name="pll_quick_id"]', translateRow ).val( quickId );
208
+ e.preventDefault();
209
+ return mlaPolylang.inlineTranslate.save( translateRow );
210
+ });
211
+ });
212
+
213
+ return false;
214
+ },
215
+
216
+ edit : function( id ) {
217
+ var t = this, fields, translateRow, rowData, fIndex, translations, currentLanguage;
218
+ t.revert();
219
+
220
+ if ( typeof( id ) == 'object' )
221
+ id = mlaPolylang.utility.getId( id );
222
+
223
+ fields = mlaPolylang.settings.fields;
224
+
225
+ // add the new Quick Translate row before its corresponding item
226
+ translateRow = $( '#pll-quick-translate' ).clone( true );
227
+ $( 'td', translateRow ).attr( 'colspan', $( '.widefat:first thead th:visible' ).length );
228
+
229
+ if ( $( t.what+id ).hasClass( 'alternate' ) )
230
+ $( translateRow ).addClass( 'alternate' );
231
+
232
+ $( t.what+id ).before( translateRow );
233
+
234
+ // populate the data
235
+ rowData = $( '#inline_'+id );
236
+
237
+ for ( fIndex = 0; fIndex < fields.length; fIndex++ ) {
238
+ $( ':input[name="' + fields[fIndex] + '"]', translateRow ).val( $( '.'+fields[fIndex], rowData ).text() );
239
+ }
240
+
241
+ // set up the quick translate entries
242
+ currentLanguage = $( ':input[name="old_lang"]', translateRow ).val();
243
+ translations = JSON.parse( $( ':input[name="inline_translations"]', translateRow ).val() );
244
+
245
+ $( '.pll-media-action-table tr', translateRow ).each( function ( idx ){
246
+ var parts = $( this ).attr( 'class' ).split( '-' ), slug = parts[ parts.length - 1 ];
247
+
248
+ if ( slug === currentLanguage ) {
249
+ $( '.pll-media-action-column input', this ).val( translations[ slug ] );
250
+ $( this ).hide();
251
+ } else if ( 'undefined' != typeof translations[ slug ] ) {
252
+ $( '.pll-media-action-column input', this ).val( translations[ slug ] );
253
+ $( '.pll-media-action-column a', this ).addClass( 'pll_icon_edit' );
254
+ $( '.pll-media-action-column a', this ).attr( 'title', mlaPolylang.settings.edit );
255
+ $( '.pll-media-action-column a', this ).attr( 'pll_quick_language', slug );
256
+ $( '.pll-media-action-column a', this ).attr( 'pll_quick_id', translations[ slug ] );
257
+ } else {
258
+ $( '.pll-media-action-column input', this ).val( 0 );
259
+ $( '.pll-media-action-column a', this ).addClass( 'pll_icon_add' );
260
+ $( '.pll-media-action-column a', this ).attr( 'title', mlaPolylang.settings.addNew );
261
+ $( '.pll-media-action-column a', this ).attr( 'pll_quick_language', slug );
262
+ $( '.pll-media-action-column a', this ).attr( 'pll_quick_id', 0 );
263
+ }
264
+
265
+ $( '.pll-media-action-column a', this ).off( 'click' );
266
+ $( '.pll-media-action-column a', this ).click( function( e ){
267
+ var quickLanguage = $( this ).attr( 'pll_quick_language' ), quickId = $( this ).attr( 'pll_quick_id' );
268
+
269
+ $( ':input[name="pll_quick_language"]', translateRow ).val( quickLanguage );
270
+ $( ':input[name="pll_quick_id"]', translateRow ).val( quickId );
271
+ return mlaPolylang.inlineTranslate.save( translateRow );
272
+ });
273
+ });
274
+
275
+ rowData = $( translateRow ).attr( 'id', 'edit-'+id ).addClass( 'inline-translator' ).show().position().top;
276
+ $( 'html, body' ).animate( { scrollTop: rowData }, 'fast' );
277
+
278
+ return false;
279
+ },
280
+
281
+ save : function( id ) {
282
+ var params, fields, page = $( '.post_status_page' ).val() || '';
283
+
284
+ if ( typeof( id ) == 'object' )
285
+ id = mlaPolylang.utility.getId( id );
286
+
287
+ if ( mla.settings.useSpinnerClass ) {
288
+ $( 'table.widefat .pll-quick-translate-save .spinner' ).addClass("is-active");
289
+ } else {
290
+ $( 'table.widefat .pll-quick-translate-save .spinner' ).show();
291
+ }
292
+
293
+ params = {
294
+ action: mlaPolylang.settings.ajax_action,
295
+ nonce: mlaPolylang.settings.ajax_nonce,
296
+ post_type: 'attachment',
297
+ post_ID: id,
298
+ edit_date: 'true',
299
+ post_status: page
300
+ };
301
+
302
+ fields = $( '#edit-' + id + ' :input' ).serialize();
303
+ params = fields + '&' + $.param( params );
304
+
305
+ // make ajax request
306
+ $.post( ajaxurl, params,
307
+ function( response ) {
308
+ var newId, oldRow, rowId, rows, rIndex;
309
+
310
+ if ( mla.settings.useSpinnerClass ) {
311
+ $( 'table.widefat .pll-quick-translate-save .spinner' ).removeClass("is-active");
312
+ } else {
313
+ $( 'table.widefat .pll-quick-translate-save .spinner' ).hide();
314
+ }
315
+
316
+ if ( response ) {
317
+ if ( -1 != response.indexOf( '<tr id="attachment' ) ) {
318
+ // Find all the rows in the response
319
+ rows = $( response ).closest( 'tr' );
320
+
321
+ // Remove the selected item
322
+ newId = mlaPolylang.utility.getId( rows[ 0 ] );
323
+ oldRow = $( mlaPolylang.inlineTranslate.what + newId )
324
+ if ( 'undefined' != typeof oldRow ) {
325
+ oldRow.remove();
326
+ }
327
+
328
+ // Replace the Quick Translate area with the selected item
329
+ $( '#edit-' + id ).before( rows[ 0 ] ).remove();
330
+ $( mlaPolylang.inlineTranslate.what + newId ).hide().fadeIn();
331
+
332
+ // Update any other translations in the table
333
+ if ( 1 < rows.length ) {
334
+ for ( rIndex = 1; rIndex < rows.length; rIndex++ ) {
335
+ rowId = mlaPolylang.utility.getId( rows[ rIndex ] );
336
+ oldRow = $( mlaPolylang.inlineTranslate.what + rowId )
337
+
338
+ if ( 'undefined' != typeof oldRow ) {
339
+ oldRow.before( rows[ rIndex ] ).remove();
340
+ oldRow = $( mlaPolylang.inlineTranslate.what + rowId )
341
+ oldRow.hide().fadeIn();
342
+ }
343
+ }
344
+ } // other translations
345
+
346
+ // Quick Edit a new selected item
347
+ if ( newId != id ) {
348
+ $( 'a.editinline', mlaPolylang.inlineTranslate.what + newId ).click();
349
+ }
350
+ } else {
351
+ response = response.replace( /<.[^<>]*?>/g, '' );
352
+ $( '#edit-' + id + ' .pll-quick-translate-save .error' ).html( response ).show();
353
+ }
354
+ } else {
355
+ $( '#edit-' + id + ' .pll-quick-translate-save .error' ).html( mlaPolylang.settings.error ).show();
356
+ }
357
+ }, 'html' );
358
+
359
+ return false;
360
+ },
361
+
362
+ revert : function(){
363
+ var id = $( 'table.widefat tr.inline-translator ').attr( 'id' );
364
+
365
+ if ( id ) {
366
+ if ( mla.settings.useSpinnerClass ) {
367
+ $( 'table.widefat .pll-quick-translate-save .spinner' ).removeClass("is-active");
368
+ } else {
369
+ $( 'table.widefat .pll-quick-translate-save .spinner' ).hide();
370
+ }
371
+
372
+ if ( 'pll-bulk-translate' == id ) {
373
+ $( 'table.widefat #pll-bulk-translate ').removeClass( 'inline-translator' ).hide();
374
+ $( '#pll-bulk-titles' ).html( '' );
375
+ $( '#pll-inline-translate' ).append( $('#pll-bulk-translate') );
376
+ } else {
377
+ $( '#'+id ).remove();
378
+ id = id.substr( id.lastIndexOf( '-' ) + 1 );
379
+ $( this.what+id ).show();
380
+ }
381
+ }
382
+
383
+ return false;
384
+ }
385
+ }; // mlaPolylang.inlineTranslate
386
+
387
+ $( document ).ready( function() {
388
+ mlaPolylang.inlineTranslate.init();
389
+ });
390
+ })( jQuery );
js/mla-polylang-support-scripts.min.js ADDED
@@ -0,0 +1 @@
 
1
+ var jQuery,mla_polylang_support_vars,mlaPolylang={settings:{},utility:{getId:function(b){var c=jQuery(b).closest("tr").attr("id"),a=c.split("-");return a[a.length-1]}},inlineTranslate:null};(function(a){mlaPolylang.settings=typeof mla_polylang_support_vars==="undefined"?{}:mla_polylang_support_vars;mla_polylang_support_vars=void 0;mlaPolylang.inlineTranslate={init:function(){var c=this,d=a("#pll-quick-translate"),b=a("#pll-bulk-translate");c.type="attachment";c.what="#attachment-";d.keyup(function(f){if(f.which==27){return mlaPolylang.inlineTranslate.revert()}});a("a.cancel",d).click(function(){return mlaPolylang.inlineTranslate.revert()});a("a.save",d).click(function(){return mlaPolylang.inlineTranslate.save(this)});a("td",d).keydown(function(f){if(f.which==13){return mlaPolylang.inlineTranslate.save(this)}});a("#the-list").on("click","a.inlineTranslate",function(){mlaPolylang.inlineTranslate.edit(this);return false});a("#the-list").on("click","a.editinline",function(){a(".quick-edit-row").one("focusin",function(){mlaPolylang.inlineTranslate.openQuickEdit(this);return false});return false});b.keyup(function(f){if(f.which==27){return mlaPolylang.inlineTranslate.revert()}});a("a.cancel",b).click(function(){return mlaPolylang.inlineTranslate.revert()});a("#doaction, #doaction2").click(function(f){var g=a(this).attr("id").substr(2);if(a('select[name="'+g+'"]').val()=="pll-translate"){f.preventDefault();c.openBulkTranslate()}else{if(a("form#posts-filter tr.inline-translator").length>0){c.revert()}}});a("#post-query-submit").mousedown(function(){c.revert();a('select[name^="action"]').val("-1")})},toggle:function(c){var b=this;if("none"==a(b.what+mlaPolylang.utility.getId(c)).css("display")){b.revert()}else{b.edit(c)}},openBulkTranslate:function(){var b="",d=true;this.revert();a("#pll-bulk-translate td").attr("colspan",a(".widefat:first thead th:visible").length);a("table.widefat tbody").prepend(a("#pll-bulk-translate"));a("#pll-bulk-translate").addClass("inline-translator").show();a('tbody th.check-column input[type="checkbox"]').each(function(){if(a(this).prop("checked")){d=false;var e=a(this).val(),c;c=a("#inline_"+e+" .post_title").text()||mlaPolylang.settings.noTitle;b+='<div id="ttle'+e+'"><a id="_'+e+'" class="ntdelbutton" title="'+mlaPolylang.settings.ntdelTitle+'">X</a>'+c+"</div>"}});if(d){return this.revert()}a("#pll-bulk-titles").html(b);a("#pll-bulk-titles a").click(function(){var c=a(this).attr("id").substr(1);a('table.widefat input[value="'+c+'"]').prop("checked",false);a("#ttle"+c).remove()});a("#pll-bulk-translate .pll-media-action-table tr").each(function(c){a(".pll-media-action-column a",this).click(function(g){var f=a(this).attr("pll_bulk_language");a(':input[name="pll_bulk_language"]',"#pll-bulk-translate").val(f);a("#pll-bulk-translate .pll-media-action-table a").prop("disabled",true);a("#pll-bulk-translate").css("opacity","0.5");a(this).hide();return a("#pll-bulk-translate-submit","#pll-bulk-translate").click()})});a("html, body").animate({scrollTop:0},"fast")},openQuickEdit:function(e){var d,b,c;if(typeof(e)=="object"){e=mlaPolylang.utility.getId(e)}d=a("#edit-"+e);c=a(':input[name="old_lang"]',d).val();b=JSON.parse(a(':input[name="inline_translations"]',d).val());a(".pll-media-action-table tr",d).each(function(f){var h=a(this).attr("class").split("-"),g=h[h.length-1];if(g===c){a(".pll-media-action-column input",this).val(b[g]);a(this).hide()}else{if("undefined"!=typeof b[g]){a(".pll-media-action-column input",this).val(b[g]);a(".pll-media-action-column a",this).addClass("pll_icon_edit");a(".pll-media-action-column a",this).attr("title",mlaPolylang.settings.edit);a(".pll-media-action-column a",this).attr("pll_quick_language",g);a(".pll-media-action-column a",this).attr("pll_quick_id",b[g])}else{a(".pll-media-action-column input",this).val(0);a(".pll-media-action-column a",this).addClass("pll_icon_add");a(".pll-media-action-column a",this).attr("title",mlaPolylang.settings.addNew);a(".pll-media-action-column a",this).attr("pll_quick_language",g);a(".pll-media-action-column a",this).attr("pll_quick_id",0)}}a(".pll-media-action-column a",this).off("click");a(".pll-media-action-column a",this).click(function(k){var j=a(this).attr("pll_quick_language"),i=a(this).attr("pll_quick_id");a(':input[name="pll_quick_language"]',d).val(j);a(':input[name="pll_quick_id"]',d).val(i);k.preventDefault();return mlaPolylang.inlineTranslate.save(d)})});return false},edit:function(i){var d=this,b,g,f,h,c,e;d.revert();if(typeof(i)=="object"){i=mlaPolylang.utility.getId(i)}b=mlaPolylang.settings.fields;g=a("#pll-quick-translate").clone(true);a("td",g).attr("colspan",a(".widefat:first thead th:visible").length);if(a(d.what+i).hasClass("alternate")){a(g).addClass("alternate")}a(d.what+i).before(g);f=a("#inline_"+i);for(h=0;h<b.length;h++){a(':input[name="'+b[h]+'"]',g).val(a("."+b[h],f).text())}e=a(':input[name="old_lang"]',g).val();c=JSON.parse(a(':input[name="inline_translations"]',g).val());a(".pll-media-action-table tr",g).each(function(j){var l=a(this).attr("class").split("-"),k=l[l.length-1];if(k===e){a(".pll-media-action-column input",this).val(c[k]);a(this).hide()}else{if("undefined"!=typeof c[k]){a(".pll-media-action-column input",this).val(c[k]);a(".pll-media-action-column a",this).addClass("pll_icon_edit");a(".pll-media-action-column a",this).attr("title",mlaPolylang.settings.edit);a(".pll-media-action-column a",this).attr("pll_quick_language",k);a(".pll-media-action-column a",this).attr("pll_quick_id",c[k])}else{a(".pll-media-action-column input",this).val(0);a(".pll-media-action-column a",this).addClass("pll_icon_add");a(".pll-media-action-column a",this).attr("title",mlaPolylang.settings.addNew);a(".pll-media-action-column a",this).attr("pll_quick_language",k);a(".pll-media-action-column a",this).attr("pll_quick_id",0)}}a(".pll-media-action-column a",this).off("click");a(".pll-media-action-column a",this).click(function(o){var n=a(this).attr("pll_quick_language"),m=a(this).attr("pll_quick_id");a(':input[name="pll_quick_language"]',g).val(n);a(':input[name="pll_quick_id"]',g).val(m);return mlaPolylang.inlineTranslate.save(g)})});f=a(g).attr("id","edit-"+i).addClass("inline-translator").show().position().top;a("html, body").animate({scrollTop:f},"fast");return false},save:function(e){var d,b,c=a(".post_status_page").val()||"";if(typeof(e)=="object"){e=mlaPolylang.utility.getId(e)}if(mla.settings.useSpinnerClass){a("table.widefat .pll-quick-translate-save .spinner").addClass("is-active")}else{a("table.widefat .pll-quick-translate-save .spinner").show()}d={action:mlaPolylang.settings.ajax_action,nonce:mlaPolylang.settings.ajax_nonce,post_type:"attachment",post_ID:e,edit_date:"true",post_status:c};b=a("#edit-"+e+" :input").serialize();d=b+"&"+a.param(d);a.post(ajaxurl,d,function(g){var h,f,k,j,i;if(mla.settings.useSpinnerClass){a("table.widefat .pll-quick-translate-save .spinner").removeClass("is-active")}else{a("table.widefat .pll-quick-translate-save .spinner").hide()}if(g){if(-1!=g.indexOf('<tr id="attachment')){j=a(g).closest("tr");h=mlaPolylang.utility.getId(j[0]);f=a(mlaPolylang.inlineTranslate.what+h);if("undefined"!=typeof f){f.remove()}a("#edit-"+e).before(j[0]).remove();a(mlaPolylang.inlineTranslate.what+h).hide().fadeIn();if(1<j.length){for(i=1;i<j.length;i++){k=mlaPolylang.utility.getId(j[i]);f=a(mlaPolylang.inlineTranslate.what+k);if("undefined"!=typeof f){f.before(j[i]).remove();f=a(mlaPolylang.inlineTranslate.what+k);f.hide().fadeIn()}}}if(h!=e){a("a.editinline",mlaPolylang.inlineTranslate.what+h).click()}}else{g=g.replace(/<.[^<>]*?>/g,"");a("#edit-"+e+" .pll-quick-translate-save .error").html(g).show()}}else{a("#edit-"+e+" .pll-quick-translate-save .error").html(mlaPolylang.settings.error).show()}},"html");return false},revert:function(){var b=a("table.widefat tr.inline-translator ").attr("id");if(b){if(mla.settings.useSpinnerClass){a("table.widefat .pll-quick-translate-save .spinner").removeClass("is-active")}else{a("table.widefat .pll-quick-translate-save .spinner").hide()}if("pll-bulk-translate"==b){a("table.widefat #pll-bulk-translate ").removeClass("inline-translator").hide();a("#pll-bulk-titles").html("");a("#pll-inline-translate").append(a("#pll-bulk-translate"))}else{a("#"+b).remove();b=b.substr(b.lastIndexOf("-")+1);a(this.what+b).show()}}return false}};a(document).ready(function(){mlaPolylang.inlineTranslate.init()})})(jQuery);
js/mla-set-parent-scripts.js CHANGED
@@ -152,14 +152,22 @@ var jQuery;
152
  },
153
  spinner = $( '#mla-set-parent-search-div .spinner' );
154
 
155
- spinner.show();
 
 
 
 
156
 
157
  $.ajax( ajaxurl, {
158
  type: 'POST',
159
  data: post,
160
  dataType: 'json'
161
  }).always( function() {
162
- spinner.hide();
 
 
 
 
163
  }).done( function( response ) {
164
  var responseData = 'no response.data', id = 0;
165
 
152
  },
153
  spinner = $( '#mla-set-parent-search-div .spinner' );
154
 
155
+ if ( mla.settings.useSpinnerClass ) {
156
+ spinner.addClass("is-active");
157
+ } else {
158
+ spinner.show();
159
+ }
160
 
161
  $.ajax( ajaxurl, {
162
  type: 'POST',
163
  data: post,
164
  dataType: 'json'
165
  }).always( function() {
166
+ if ( mla.settings.useSpinnerClass ) {
167
+ spinner.removeClass("is-active");
168
+ } else {
169
+ spinner.hide();
170
+ }
171
  }).done( function( response ) {
172
  var responseData = 'no response.data', id = 0;
173
 
js/mla-set-parent-scripts.min.js CHANGED
@@ -1 +1 @@
1
- var jQuery;(function(a){mla.setParent={init:function(){a("#mla-set-parent-submit").click(function(b){if(!a('#mla-set-parent-response-div input[type="radio"]:checked').length){b.preventDefault()}});a("#mla-set-parent-search").click(function(){a("#mla-set-parent-paged").val(1);mla.setParent.send()});a("#mla-set-parent-search-div :input").keypress(function(){if(13==event.which){mla.setParent.send();return false}});a("#mla-set-parent-post-type").change(function(){a("#mla-set-parent-paged").val(1);mla.setParent.send()});a("#mla-set-parent-previous").click(function(){var b=+a("#mla-set-parent-paged").val();if(b>1){a("#mla-set-parent-paged").val(b-1)}else{a("#mla-set-parent-paged").val(1)}mla.setParent.send()});a("#mla-set-parent-next").click(function(){var c=+a("#mla-set-parent-count").val(),b=+a("#mla-set-parent-paged").val(),d=+a("#mla-set-parent-found").val();if(d<c){a("#mla-set-parent-paged").val(1)}else{a("#mla-set-parent-paged").val(b+1)}mla.setParent.send()});a("#mla-set-parent-close-div").click(mla.setParent.close);a("#mla-set-parent-cancel").click(function(b){b.preventDefault();return mla.setParent.close()});a("#mla-set-parent-inside-div").on("click","tr",function(){a(this).find(".found-radio input").prop("checked",true)})},open:function(e,d,b){var c=a("#mla-set-parent-overlay");if(c.length===0){a("body").append('<div id="mla-set-parent-overlay"></div>');mla.setParent.overlay()}c.show();if(e&&d){a("#mla-set-parent-parent").val(e);a("#mla-set-parent-children").val(d)}if(b){a("#mla-set-parent-titles").html(b)}if(mla.settings.useDashicons){a("#mla-set-parent-close-div").addClass("mla-set-parent-close-div-dashicons")}else{a("#mla-set-parent-close-div").html("x")}a("#mla-set-parent-div").show();a("#mla-set-parent-input ").focus().keyup(function(f){if(f.which==27){mla.setParent.close()}});mla.setParent.send();return false},close:function(){a("#mla-set-parent-input").val("");a("#mla-set-parent-post-type").val("all");a("#mla-set-parent-response-div").html("");a("#mla-set-parent-div").hide();a("#mla-set-parent-overlay").hide()},overlay:function(){a("#mla-set-parent-overlay").on("click",function(){mla.setParent.close()})},send:function(){var b={mla_set_parent_search_text:a("#mla-set-parent-input").val(),mla_set_parent_post_type:a("#mla-set-parent-post-type").val(),mla_set_parent_count:a("#mla-set-parent-count").val(),mla_set_parent_paged:a("#mla-set-parent-paged").val(),action:"mla_find_posts",_ajax_nonce:a("#mla-set-parent-ajax-nonce").val()},c=a("#mla-set-parent-search-div .spinner");c.show();a.ajax(ajaxurl,{type:"POST",data:b,dataType:"json"}).always(function(){c.hide()}).done(function(d){var e="no response.data",f=0;if(!d.success){if(d.responseData){e=d.data}a("#mla-set-parent-response-div").text(mla.settings.ajaxDoneError+" ("+e+")")}else{a("#mla-set-parent-response-div").html(d.data);a("#mla-set-parent-response-div table tbody tr:eq(0)").before(a("#found-0-row").clone());f=a("#mla-set-parent-parent").val();a("#mla-set-parent-response-div #found-"+f).each(function(){a(this).prop("checked",true)})}}).fail(function(e,d){if(200==e.status){a("#mla-set-parent-response-div").text("("+d+") "+e.responseText)}else{a("#mla-set-parent-response-div").text(mla.settings.ajaxFailError+" ("+d+"), jqXHR( "+e.status+", "+e.statusText+", "+e.responseText+")")}})}};a(document).ready(function(){mla.setParent.init()})})(jQuery);
1
+ var jQuery;(function(a){mla.setParent={init:function(){a("#mla-set-parent-submit").click(function(b){if(!a('#mla-set-parent-response-div input[type="radio"]:checked').length){b.preventDefault()}});a("#mla-set-parent-search").click(function(){a("#mla-set-parent-paged").val(1);mla.setParent.send()});a("#mla-set-parent-search-div :input").keypress(function(){if(13==event.which){mla.setParent.send();return false}});a("#mla-set-parent-post-type").change(function(){a("#mla-set-parent-paged").val(1);mla.setParent.send()});a("#mla-set-parent-previous").click(function(){var b=+a("#mla-set-parent-paged").val();if(b>1){a("#mla-set-parent-paged").val(b-1)}else{a("#mla-set-parent-paged").val(1)}mla.setParent.send()});a("#mla-set-parent-next").click(function(){var c=+a("#mla-set-parent-count").val(),b=+a("#mla-set-parent-paged").val(),d=+a("#mla-set-parent-found").val();if(d<c){a("#mla-set-parent-paged").val(1)}else{a("#mla-set-parent-paged").val(b+1)}mla.setParent.send()});a("#mla-set-parent-close-div").click(mla.setParent.close);a("#mla-set-parent-cancel").click(function(b){b.preventDefault();return mla.setParent.close()});a("#mla-set-parent-inside-div").on("click","tr",function(){a(this).find(".found-radio input").prop("checked",true)})},open:function(e,d,b){var c=a("#mla-set-parent-overlay");if(c.length===0){a("body").append('<div id="mla-set-parent-overlay"></div>');mla.setParent.overlay()}c.show();if(e&&d){a("#mla-set-parent-parent").val(e);a("#mla-set-parent-children").val(d)}if(b){a("#mla-set-parent-titles").html(b)}if(mla.settings.useDashicons){a("#mla-set-parent-close-div").addClass("mla-set-parent-close-div-dashicons")}else{a("#mla-set-parent-close-div").html("x")}a("#mla-set-parent-div").show();a("#mla-set-parent-input ").focus().keyup(function(f){if(f.which==27){mla.setParent.close()}});mla.setParent.send();return false},close:function(){a("#mla-set-parent-input").val("");a("#mla-set-parent-post-type").val("all");a("#mla-set-parent-response-div").html("");a("#mla-set-parent-div").hide();a("#mla-set-parent-overlay").hide()},overlay:function(){a("#mla-set-parent-overlay").on("click",function(){mla.setParent.close()})},send:function(){var b={mla_set_parent_search_text:a("#mla-set-parent-input").val(),mla_set_parent_post_type:a("#mla-set-parent-post-type").val(),mla_set_parent_count:a("#mla-set-parent-count").val(),mla_set_parent_paged:a("#mla-set-parent-paged").val(),action:"mla_find_posts",_ajax_nonce:a("#mla-set-parent-ajax-nonce").val()},c=a("#mla-set-parent-search-div .spinner");if(mla.settings.useSpinnerClass){c.addClass("is-active")}else{c.show()}a.ajax(ajaxurl,{type:"POST",data:b,dataType:"json"}).always(function(){if(mla.settings.useSpinnerClass){c.removeClass("is-active")}else{c.hide()}}).done(function(d){var e="no response.data",f=0;if(!d.success){if(d.responseData){e=d.data}a("#mla-set-parent-response-div").text(mla.settings.ajaxDoneError+" ("+e+")")}else{a("#mla-set-parent-response-div").html(d.data);a("#mla-set-parent-response-div table tbody tr:eq(0)").before(a("#found-0-row").clone());f=a("#mla-set-parent-parent").val();a("#mla-set-parent-response-div #found-"+f).each(function(){a(this).prop("checked",true)})}}).fail(function(e,d){if(200==e.status){a("#mla-set-parent-response-div").text("("+d+") "+e.responseText)}else{a("#mla-set-parent-response-div").text(mla.settings.ajaxFailError+" ("+d+"), jqXHR( "+e.status+", "+e.statusText+", "+e.responseText+")")}})}};a(document).ready(function(){mla.setParent.init()})})(jQuery);
js/mla-single-edit-scripts.js DELETED
@@ -1,276 +0,0 @@
1
- // These functions are adapted from wp-admin/js/post.js
2
-
3
- var jQuery, wpAjax, ajaxurl, tagBox,
4
- getUserSetting, setUserSetting, deleteUserSetting,
5
- mla_single_edit_vars;
6
-
7
- // return an array with any duplicate, whitespace or values removed
8
- function array_unique_noempty(a) {
9
- var out = [];
10
- jQuery.each( a, function(key, val) {
11
- val = jQuery.trim(val);
12
- if ( val && jQuery.inArray(val, out) == -1 )
13
- out.push(val);
14
- } );
15
- return out;
16
- }
17
-
18
- (function($){
19
-
20
- tagBox = {
21
- clean : function(tags) {
22
- var comma = mla_single_edit_vars.comma;
23
- if ( ',' !== comma )
24
- tags = tags.replace(new RegExp(comma, 'g'), ',');
25
- tags = tags.replace(/\s*,\s*/g, ',').replace(/,+/g, ',').replace(/[,\s]+$/, '').replace(/^[,\s]+/, '');
26
- if ( ',' !== comma )
27
- tags = tags.replace(/,/g, comma);
28
- return tags;
29
- },
30
-
31
- parseTags : function(el) {
32
- var id = el.id, num = id.split('-check-num-')[1], taxbox = $(el).closest('.tagsdiv'),
33
- thetags = taxbox.find('.the-tags'), comma = mla_single_edit_vars.comma,
34
- current_tags = thetags.val().split(comma), new_tags = [];
35
- delete current_tags[num];
36
-
37
- $.each( current_tags, function(key, val) {
38
- val = $.trim(val);
39
- if ( val ) {
40
- new_tags.push(val);
41
- }
42
- });
43
-
44
- thetags.val( this.clean( new_tags.join(comma) ) );
45
-
46
- this.quickClicks(taxbox);
47
- return false;
48
- },
49
-
50
- quickClicks : function(el) {
51
- var thetags = $('.the-tags', el),
52
- tagchecklist = $('.tagchecklist', el),
53
- id = $(el).attr('id'),
54
- current_tags, disabled;
55
-
56
- if ( !thetags.length )
57
- return;
58
-
59
- disabled = thetags.prop('disabled');
60
-
61
- current_tags = thetags.val().split(mla_single_edit_vars.comma);
62
- tagchecklist.empty();
63
-
64
- $.each( current_tags, function( key, val ) {
65
- var span, xbutton;
66
-
67
- val = $.trim( val );
68
-
69
- if ( ! val )
70
- return;
71
-
72
- // Create a new span, and ensure the text is properly escaped.
73
- span = $('<span />').text( val );
74
-
75
- // If tags editing isn't disabled, create the X button.
76
- if ( ! disabled ) {
77
- xbutton = $( '<a id="' + id + '-check-num-' + key + '" class="ntdelbutton">X</a>' );
78
- xbutton.click( function(){ tagBox.parseTags(this); });
79
- span.prepend('&nbsp;').prepend( xbutton );
80
- }
81
-
82
- // Append the span to the tag list.
83
- tagchecklist.append( span );
84
- });
85
- },
86
-
87
- flushTags : function(el, a, f) {
88
- a = a || false;
89
- var tags = $('.the-tags', el),
90
- newtag = $('input.newtag', el),
91
- comma = mla_single_edit_vars.comma,
92
- tagsval, newtags, text;
93
-
94
- text = a ? $(a).text() : newtag.val();
95
- tagsval = tags.val();
96
- newtags = tagsval ? tagsval + comma + text : text;
97
-
98
- newtags = this.clean( newtags );
99
- newtags = array_unique_noempty( newtags.split(comma) ).join(comma);
100
- tags.val(newtags);
101
- this.quickClicks(el);
102
-
103
- if ( !a )
104
- newtag.val('');
105
- if ( 'undefined' == typeof(f) )
106
- newtag.focus();
107
-
108
- return false;
109
- },
110
-
111
- get : function(id) {
112
- var tax = id.substr(id.indexOf('-')+1);
113
-
114
- $.post(ajaxurl, {'action':'get-tagcloud', 'tax':tax}, function(r, stat) {
115
- if ( 0 === r || 'success' != stat )
116
- r = wpAjax.broken;
117
-
118
- r = $('<p id="tagcloud-'+tax+'" class="the-tagcloud">'+r+'</p>');
119
- $('a', r).click(function(){
120
- tagBox.flushTags( $(this).closest('.inside').children('.tagsdiv'), this);
121
- return false;
122
- });
123
-
124
- $('#'+id).after(r);
125
- });
126
- },
127
-
128
- init : function() {
129
- var t = this, ajaxtag = $('div.ajaxtag');
130
-
131
- $('.tagsdiv').each( function() {
132
- tagBox.quickClicks(this);
133
- });
134
-
135
- $('input.tagadd', ajaxtag).click(function(){
136
- t.flushTags( $(this).closest('.tagsdiv') );
137
- });
138
-
139
- $('div.taghint', ajaxtag).click(function(){
140
- $(this).css('visibility', 'hidden').parent().siblings('.newtag').focus();
141
- });
142
-
143
- $('input.newtag', ajaxtag).blur(function() {
144
- if ( this.value === '' )
145
- $(this).parent().siblings('.taghint').css('visibility', '');
146
- }).focus(function(){
147
- $(this).parent().siblings('.taghint').css('visibility', 'hidden');
148
- }).keyup(function(e){
149
- if ( 13 == e.which ) {
150
- tagBox.flushTags( $(this).closest('.tagsdiv') );
151
- return false;
152
- }
153
- }).keypress(function(e){
154
- if ( 13 == e.which ) {
155
- e.preventDefault();
156
- return false;
157
- }
158
- }).each(function(){
159
- var tax = $(this).closest('div.tagsdiv').attr('id');
160
- $(this).suggest( ajaxurl + '?action=ajax-tag-search&tax=' + tax, { delay: 500, minchars: 2, multiple: true, multipleSep: mla_single_edit_vars.comma + ' ' } );
161
- });
162
-
163
- // save tags on post save/publish
164
- $('#post').submit(function(){
165
- $('div.tagsdiv').each( function() {
166
- tagBox.flushTags(this, false, 1);
167
- });
168
- });
169
-
170
- // tag cloud
171
- $('a.tagcloud-link').click(function(){
172
- tagBox.get( $(this).attr('id') );
173
- $(this).unbind().click(function(){
174
- $(this).siblings('.the-tagcloud').toggle();
175
- return false;
176
- });
177
- return false;
178
- });
179
- }
180
- };
181
-
182
- })(jQuery);
183
-
184
- jQuery(document).ready( function($) {
185
- // alert('jQuery(document).ready(function($)');
186
- // console.log('jQuery(document).ready(function($)');
187
-
188
- // multi-taxonomies
189
- $('#side-info-column').children('div.postbox').each(function(){
190
- if ( this.id.indexOf('tagsdiv-') === 0 ) {
191
- tagBox.init();
192
- return false;
193
- }
194
- });
195
-
196
- // categories
197
- $('.categorydiv').each( function(){
198
- var this_id = $(this).attr('id'), noSyncChecks = false, syncChecks, catAddBefore, catAddAfter, taxonomyParts, taxonomy, settingName;
199
-
200
- taxonomyParts = this_id.split('-');
201
- taxonomyParts.shift();
202
- taxonomy = taxonomyParts.join('-');
203
- settingName = taxonomy + '_tab';
204
- // if ( taxonomy == 'category' )
205
- // settingName = 'cats';
206
-
207
- // TODO: move to jQuery 1.3+, support for multiple hierarchical taxonomies, see wp-lists.dev.js
208
- $('a', '#' + taxonomy + '-tabs').click( function(){
209
- var t = $(this).attr('href');
210
- $(this).parent().addClass('tabs').siblings('li').removeClass('tabs');
211
- $('#' + taxonomy + '-tabs').siblings('.tabs-panel').hide();
212
- $(t).show();
213
- if ( '#' + taxonomy + '-all' == t )
214
- deleteUserSetting(settingName);
215
- else
216
- setUserSetting(settingName, 'pop');
217
- return false;
218
- });
219
-
220
- if ( getUserSetting(settingName) )
221
- $('a[href="#' + taxonomy + '-pop"]', '#' + taxonomy + '-tabs').click();
222
-
223
- // Ajax Cat
224
- $('#new' + taxonomy).one( 'focus', function() { $(this).val( '' ).removeClass( 'form-input-tip' ); } );
225
- $('#' + taxonomy + '-add-submit').click( function(){ $('#new' + taxonomy).focus(); });
226
-
227
- syncChecks = function() {
228
- if ( noSyncChecks )
229
- return;
230
- noSyncChecks = true;
231
- var th = jQuery(this), c = th.is(':checked'), id = th.val().toString();
232
- $('#in-' + taxonomy + '-' + id + ', #in-' + taxonomy + '-category-' + id).prop( 'checked', c );
233
- noSyncChecks = false;
234
- };
235
-
236
- catAddBefore = function( s ) {
237
- if ( !$('#new'+taxonomy).val() )
238
- return false;
239
- s.data += '&' + $( ':checked', '#'+taxonomy+'checklist' ).serialize();
240
- $( '#' + taxonomy + '-add-submit' ).prop( 'disabled', true );
241
- return s;
242
- };
243
-
244
- catAddAfter = function( r, s ) {
245
- var sup, drop = $('#new'+taxonomy+'_parent');
246
-
247
- $( '#' + taxonomy + '-add-submit' ).prop( 'disabled', false );
248
- if ( 'undefined' != s.parsed.responses[0] && (sup = s.parsed.responses[0].supplemental.newcat_parent) ) {
249
- drop.before(sup);
250
- drop.remove();
251
- }
252
- };
253
-
254
- $('#' + taxonomy + 'checklist').wpList({
255
- alt: '',
256
- response: taxonomy + '-ajax-response',
257
- addBefore: catAddBefore,
258
- addAfter: catAddAfter
259
- });
260
-
261
- $('#' + taxonomy + '-add-toggle').click( function() {
262
- $('#' + taxonomy + '-adder').toggleClass( 'mla-hidden-children' );
263
- $('a[href="#' + taxonomy + '-all"]', '#' + taxonomy + '-tabs').click();
264
- $('#new'+taxonomy).focus();
265
- return false;
266
- });
267
-
268
- $('#' + taxonomy + 'checklist li.popular-category :checkbox, #' + taxonomy + 'checklist-pop :checkbox').live( 'click', function(){
269
- var t = $(this), c = t.is(':checked'), id = t.val();
270
- if ( id && t.parents('#taxonomy-'+taxonomy).length )
271
- $('#in-' + taxonomy + '-' + id + ', #in-popular-' + taxonomy + '-' + id).prop( 'checked', c );
272
- });
273
-
274
- }); // end cats
275
-
276
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/mla-single-edit-scripts.min.js DELETED
@@ -1 +0,0 @@
1
- var jQuery,wpAjax,ajaxurl,tagBox,getUserSetting,setUserSetting,deleteUserSetting,mla_single_edit_vars;function array_unique_noempty(b){var c=[];jQuery.each(b,function(a,d){d=jQuery.trim(d);if(d&&jQuery.inArray(d,c)==-1){c.push(d)}});return c}(function(a){tagBox={clean:function(c){var b=mla_single_edit_vars.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(f){var i=f.id,c=i.split("-check-num-")[1],e=a(f).closest(".tagsdiv"),h=e.find(".the-tags"),b=mla_single_edit_vars.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.clean(g.join(b)));this.quickClicks(e);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(mla_single_edit_vars.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(){tagBox.parseTags(this)});j.prepend("&nbsp;").prepend(h)}e.append(j)})},flushTags:function(b,e,d){e=e||false;var j=a(".the-tags",b),h=a("input.newtag",b),k=mla_single_edit_vars.comma,i,c,g;g=e?a(e).text():h.val();i=j.val();c=i?i+k+g:g;c=this.clean(c);c=array_unique_noempty(c.split(k)).join(k);j.val(c);this.quickClicks(b);if(!e){h.val("")}if("undefined"==typeof(d)){h.focus()}return false},get:function(c){var b=c.substr(c.indexOf("-")+1);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(){tagBox.flushTags(a(this).closest(".inside").children(".tagsdiv"),this);return false});a("#"+c).after(e)})},init:function(){var b=this,c=a("div.ajaxtag");a(".tagsdiv").each(function(){tagBox.quickClicks(this)});a("input.tagadd",c).click(function(){b.flushTags(a(this).closest(".tagsdiv"))});a("div.taghint",c).click(function(){a(this).css("visibility","hidden").parent().siblings(".newtag").focus()});a("input.newtag",c).blur(function(){if(this.value===""){a(this).parent().siblings(".taghint").css("visibility","")}}).focus(function(){a(this).parent().siblings(".taghint").css("visibility","hidden")}).keyup(function(d){if(13==d.which){tagBox.flushTags(a(this).closest(".tagsdiv"));return false}}).keypress(function(d){if(13==d.which){d.preventDefault();return false}}).each(function(){var d=a(this).closest("div.tagsdiv").attr("id");a(this).suggest(ajaxurl+"?action=ajax-tag-search&tax="+d,{delay:500,minchars:2,multiple:true,multipleSep:mla_single_edit_vars.comma+" "})});a("#post").submit(function(){a("div.tagsdiv").each(function(){tagBox.flushTags(this,false,1)})});a("a.tagcloud-link").click(function(){tagBox.get(a(this).attr("id"));a(this).unbind().click(function(){a(this).siblings(".the-tagcloud").toggle();return false});return false})}}})(jQuery);jQuery(document).ready(function(a){a("#side-info-column").children("div.postbox").each(function(){if(this.id.indexOf("tagsdiv-")===0){tagBox.init();return false}});a(".categorydiv").each(function(){var h=a(this).attr("id"),c=false,g,f,i,e,b,d;e=h.split("-");e.shift();b=e.join("-");d=b+"_tab";a("a","#"+b+"-tabs").click(function(){var j=a(this).attr("href");a(this).parent().addClass("tabs").siblings("li").removeClass("tabs");a("#"+b+"-tabs").siblings(".tabs-panel").hide();a(j).show();if("#"+b+"-all"==j){deleteUserSetting(d)}else{setUserSetting(d,"pop")}return false});if(getUserSetting(d)){a('a[href="#'+b+'-pop"]',"#"+b+"-tabs").click()}a("#new"+b).one("focus",function(){a(this).val("").removeClass("form-input-tip")});a("#"+b+"-add-submit").click(function(){a("#new"+b).focus()});g=function(){if(c){return}c=true;var j=jQuery(this),l=j.is(":checked"),k=j.val().toString();a("#in-"+b+"-"+k+", #in-"+b+"-category-"+k).prop("checked",l);c=false};f=function(j){if(!a("#new"+b).val()){return false}j.data+="&"+a(":checked","#"+b+"checklist").serialize();a("#"+b+"-add-submit").prop("disabled",true);return j};i=function(m,l){var k,j=a("#new"+b+"_parent");a("#"+b+"-add-submit").prop("disabled",false);if("undefined"!=l.parsed.responses[0]&&(k=l.parsed.responses[0].supplemental.newcat_parent)){j.before(k);j.remove()}};a("#"+b+"checklist").wpList({alt:"",response:b+"-ajax-response",addBefore:f,addAfter:i});a("#"+b+"-add-toggle").click(function(){a("#"+b+"-adder").toggleClass("mla-hidden-children");a('a[href="#'+b+'-all"]',"#"+b+"-tabs").click();a("#new"+b).focus();return false});a("#"+b+"checklist li.popular-category :checkbox, #"+b+"checklist-pop :checkbox").live("click",function(){var j=a(this),l=j.is(":checked"),k=j.val();if(k&&j.parents("#taxonomy-"+b).length){a("#in-"+b+"-"+k+", #in-popular-"+b+"-"+k).prop("checked",l)}})})});
 
js/mla-terms-search-scripts.js CHANGED
@@ -33,7 +33,6 @@ var jQuery, wpAjax,
33
  });
34
 
35
  $( '#mla-terms-search-submit' ).click( function() {
36
- // $( '#mla-terms-search-search-div .spinner' ).show();
37
  mlaTaxonomy.termsSearch.close();
38
  });
39
 
@@ -93,14 +92,22 @@ var jQuery, wpAjax,
93
  spinner = $( '#mla-terms-search-search-div .spinner' ),
94
  ajaxResponse = null;
95
 
96
- spinner.show();
 
 
 
 
97
 
98
  $.ajax( ajaxurl, {
99
  type: 'POST',
100
  data: post,
101
  dataType: mlaTaxonomy.settings.termsSearchDataType
102
  }).always( function() {
103
- spinner.hide();
 
 
 
 
104
  }).done( function( response ) {
105
  var responseData = 'no response.data', id = 0;
106
 
33
  });
34
 
35
  $( '#mla-terms-search-submit' ).click( function() {
 
36
  mlaTaxonomy.termsSearch.close();
37
  });
38
 
92
  spinner = $( '#mla-terms-search-search-div .spinner' ),
93
  ajaxResponse = null;
94
 
95
+ if ( mla.settings.useSpinnerClass ) {
96
+ spinner.addClass("is-active");
97
+ } else {
98
+ spinner.show();
99
+ }
100
 
101
  $.ajax( ajaxurl, {
102
  type: 'POST',
103
  data: post,
104
  dataType: mlaTaxonomy.settings.termsSearchDataType
105
  }).always( function() {
106
+ if ( mla.settings.useSpinnerClass ) {
107
+ spinner.removeClass("is-active");
108
+ } else {
109
+ spinner.hide();
110
+ }
111
  }).done( function( response ) {
112
  var responseData = 'no response.data', id = 0;
113
 
js/mla-terms-search-scripts.min.js CHANGED
@@ -1 +1 @@
1
- var jQuery,wpAjax,mla_terms_search_vars,mlaTaxonomy={settings:{},utility:{},termsSearch:null};(function(a){mlaTaxonomy.settings=typeof mla_terms_search_vars==="undefined"?{}:mla_terms_search_vars;mla_terms_search_vars=void 0;mlaTaxonomy.termsSearch={init:function(){a("#mla-terms-search-open").click(function(b){b.preventDefault()});a("#mla-terms-search-submit").click(function(){mlaTaxonomy.termsSearch.close()});a("#mla-terms-search-close-div").click(mlaTaxonomy.termsSearch.close)},open:function(){var b=a("#mla-terms-search-overlay");if(b.length===0){a("body").append('<div id="mla-terms-search-overlay"></div>');mlaTaxonomy.termsSearch.overlay()}b.show();if(mlaTaxonomy.settings.useDashicons){a("#mla-terms-search-close-div").addClass("mla-terms-search-close-div-dashicons")}else{a("#mla-terms-search-close-div").html("x")}a("#mla-terms-search-div").show();a("#mla-terms-search-input ").focus().keyup(function(c){if(c.which==27){mlaTaxonomy.termsSearch.close()}});return false},close:function(){a("#mla-terms-search-response-div").html("");a("#mla-terms-search-div").hide();a("#mla-terms-search-overlay").hide()},overlay:function(){a("#mla-terms-search-overlay").on("click",function(){mlaTaxonomy.termsSearch.close()})},send:function(){var b={ps:a("#mla-terms-search-input").val(),action:"find_posts",_ajax_nonce:a("#mla-terms-search-ajax-nonce").val()},d=a("#mla-terms-search-search-div .spinner"),c=null;d.show();a.ajax(ajaxurl,{type:"POST",data:b,dataType:mlaTaxonomy.settings.termsSearchDataType}).always(function(){d.hide()}).done(function(e){var f="no response.data",g=0;if("xml"===mlaTaxonomy.settings.termsSearchDataType){if("string"===typeof(e)){e={success:false,data:e}}else{c=wpAjax.parseAjaxResponse(e);if(c.errors){e={success:false,data:wpAjax.broken}}else{e={success:true,data:c.responses[0].data}}}}if(!e.success){if(e.responseData){f=e.data}a("#mla-terms-search-response-div").text(mlaTaxonomy.settings.ajaxDoneError+" ("+f+")")}else{a("#mla-terms-search-response-div").html(e.data);a("#mla-terms-search-response-div table tbody tr:eq(0)").before(a("#found-0-row").clone());g=a("#mla-terms-search-parent").val();a("#mla-terms-search-response-div #found-"+g).each(function(){a(this).prop("checked",true)})}}).fail(function(f,e){if(200==f.status){a("#mla-terms-search-response-div").text("("+e+") "+f.responseText)}else{a("#mla-terms-search-response-div").text(mlaTaxonomy.settings.ajaxFailError+" ("+e+"), jqXHR( "+f.status+", "+f.statusText+", "+f.responseText+")")}})}};a(document).ready(function(){mlaTaxonomy.termsSearch.init()})})(jQuery);
1
+ var jQuery,wpAjax,mla_terms_search_vars,mlaTaxonomy={settings:{},utility:{},termsSearch:null};(function(a){mlaTaxonomy.settings=typeof mla_terms_search_vars==="undefined"?{}:mla_terms_search_vars;mla_terms_search_vars=void 0;mlaTaxonomy.termsSearch={init:function(){a("#mla-terms-search-open").click(function(b){b.preventDefault()});a("#mla-terms-search-submit").click(function(){mlaTaxonomy.termsSearch.close()});a("#mla-terms-search-close-div").click(mlaTaxonomy.termsSearch.close)},open:function(){var b=a("#mla-terms-search-overlay");if(b.length===0){a("body").append('<div id="mla-terms-search-overlay"></div>');mlaTaxonomy.termsSearch.overlay()}b.show();if(mlaTaxonomy.settings.useDashicons){a("#mla-terms-search-close-div").addClass("mla-terms-search-close-div-dashicons")}else{a("#mla-terms-search-close-div").html("x")}a("#mla-terms-search-div").show();a("#mla-terms-search-input ").focus().keyup(function(c){if(c.which==27){mlaTaxonomy.termsSearch.close()}});return false},close:function(){a("#mla-terms-search-response-div").html("");a("#mla-terms-search-div").hide();a("#mla-terms-search-overlay").hide()},overlay:function(){a("#mla-terms-search-overlay").on("click",function(){mlaTaxonomy.termsSearch.close()})},send:function(){var b={ps:a("#mla-terms-search-input").val(),action:"find_posts",_ajax_nonce:a("#mla-terms-search-ajax-nonce").val()},d=a("#mla-terms-search-search-div .spinner"),c=null;if(mla.settings.useSpinnerClass){d.addClass("is-active")}else{d.show()}a.ajax(ajaxurl,{type:"POST",data:b,dataType:mlaTaxonomy.settings.termsSearchDataType}).always(function(){if(mla.settings.useSpinnerClass){d.removeClass("is-active")}else{d.hide()}}).done(function(e){var f="no response.data",g=0;if("xml"===mlaTaxonomy.settings.termsSearchDataType){if("string"===typeof(e)){e={success:false,data:e}}else{c=wpAjax.parseAjaxResponse(e);if(c.errors){e={success:false,data:wpAjax.broken}}else{e={success:true,data:c.responses[0].data}}}}if(!e.success){if(e.responseData){f=e.data}a("#mla-terms-search-response-div").text(mlaTaxonomy.settings.ajaxDoneError+" ("+f+")")}else{a("#mla-terms-search-response-div").html(e.data);a("#mla-terms-search-response-div table tbody tr:eq(0)").before(a("#found-0-row").clone());g=a("#mla-terms-search-parent").val();a("#mla-terms-search-response-div #found-"+g).each(function(){a(this).prop("checked",true)})}}).fail(function(f,e){if(200==f.status){a("#mla-terms-search-response-div").text("("+e+") "+f.responseText)}else{a("#mla-terms-search-response-div").text(mlaTaxonomy.settings.ajaxFailError+" ("+e+"), jqXHR( "+f.status+", "+f.statusText+", "+f.responseText+")")}})}};a(document).ready(function(){mlaTaxonomy.termsSearch.init()})})(jQuery);
languages/media-library-assistant-en_US.pot CHANGED
@@ -1,8 +1,8 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Media Library Assistant\n"
4
- "POT-Creation-Date: 2015-04-19 11:54-0800\n"
5
- "PO-Revision-Date: 2015-04-19 11:55-0800\n"
6
  "Last-Translator: David Lingren <david@fairtradejudaica.org>\n"
7
  "Language-Team: David Lingren <david@fairtradejudaica.org>\n"
8
  "Language: en_US\n"
@@ -33,82 +33,81 @@ msgstr ""
33
  #: includes/class-mla-data.php:389 includes/class-mla-data.php:492
34
  #: includes/class-mla-data.php:648 includes/class-mla-data.php:711
35
  #: includes/class-mla-data.php:1266 includes/class-mla-data.php:1528
36
- #: includes/class-mla-data.php:2679 includes/class-mla-data.php:2685
37
- #: includes/class-mla-data.php:4033 includes/class-mla-data.php:4036
38
- #: includes/class-mla-data.php:5039 includes/class-mla-data.php:5066
39
- #: includes/class-mla-data.php:5386 includes/class-mla-data.php:5399
40
- #: includes/class-mla-data.php:5421 includes/class-mla-data.php:5610
41
- #: includes/class-mla-data.php:5651 includes/class-mla-data.php:5683
42
- #: includes/class-mla-data.php:5699 includes/class-mla-data.php:5878
43
- #: includes/class-mla-edit-media.php:310 includes/class-mla-edit-media.php:677
44
- #: includes/class-mla-main.php:613 includes/class-mla-main.php:804
45
- #: includes/class-mla-main.php:911 includes/class-mla-main.php:1149
46
- #: includes/class-mla-main.php:1174 includes/class-mla-main.php:1267
47
- #: includes/class-mla-main.php:1326 includes/class-mla-main.php:1438
48
- #: includes/class-mla-main.php:1469 includes/class-mla-main.php:1696
49
- #: includes/class-mla-main.php:1703 includes/class-mla-main.php:1707
50
- #: includes/class-mla-main.php:1777 includes/class-mla-main.php:1784
51
- #: includes/class-mla-main.php:1924 includes/class-mla-main.php:1999
52
- #: includes/class-mla-main.php:2246 includes/class-mla-main.php:2254
53
- #: includes/class-mla-main.php:2287 includes/class-mla-main.php:2321
54
- #: includes/class-mla-main.php:2562 includes/class-mla-main.php:2570
55
- #: includes/class-mla-main.php:2602 includes/class-mla-main.php:2610
56
- #: includes/class-mla-media-modal.php:1186
57
  #: includes/class-mla-mime-types.php:483 includes/class-mla-mime-types.php:906
58
  #: includes/class-mla-mime-types.php:912 includes/class-mla-mime-types.php:916
59
  #: includes/class-mla-mime-types.php:961
60
  #: includes/class-mla-mime-types.php:1049
61
  #: includes/class-mla-mime-types.php:1195
62
  #: includes/class-mla-mime-types.php:1218
63
- #: includes/class-mla-mime-types.php:1972
64
- #: includes/class-mla-mime-types.php:1983
65
- #: includes/class-mla-mime-types.php:1996
66
- #: includes/class-mla-mime-types.php:2004
67
- #: includes/class-mla-mime-types.php:2009
68
- #: includes/class-mla-mime-types.php:2052
69
- #: includes/class-mla-mime-types.php:2071
70
- #: includes/class-mla-mime-types.php:2122
71
- #: includes/class-mla-mime-types.php:2156
72
- #: includes/class-mla-mime-types.php:2241
73
- #: includes/class-mla-mime-types.php:2320
74
- #: includes/class-mla-mime-types.php:2329
75
- #: includes/class-mla-mime-types.php:2361 includes/class-mla-objects.php:201
76
- #: includes/class-mla-options.php:1685 includes/class-mla-options.php:1862
77
- #: includes/class-mla-options.php:1938 includes/class-mla-options.php:3264
78
- #: includes/class-mla-options.php:3704 includes/class-mla-options.php:3717
79
- #: includes/class-mla-options.php:3721 includes/class-mla-options.php:4248
80
- #: includes/class-mla-options.php:4470 includes/class-mla-options.php:4909
81
- #: includes/class-mla-options.php:4953 includes/class-mla-options.php:4961
82
- #: includes/class-mla-options.php:4978 includes/class-mla-options.php:4988
83
- #: includes/class-mla-options.php:4998 includes/class-mla-options.php:5006
84
- #: includes/class-mla-options.php:5010 includes/class-mla-settings.php:555
85
- #: includes/class-mla-settings.php:619 includes/class-mla-settings.php:633
86
- #: includes/class-mla-settings.php:662 includes/class-mla-settings.php:673
87
- #: includes/class-mla-settings.php:763 includes/class-mla-settings.php:897
88
- #: includes/class-mla-settings.php:1003 includes/class-mla-settings.php:1035
89
- #: includes/class-mla-settings.php:1173 includes/class-mla-settings.php:1535
90
- #: includes/class-mla-settings.php:1567 includes/class-mla-settings.php:1644
91
- #: includes/class-mla-settings.php:1981 includes/class-mla-settings.php:2032
92
- #: includes/class-mla-settings.php:2111 includes/class-mla-settings.php:2665
93
- #: includes/class-mla-settings.php:2807 includes/class-mla-settings.php:2979
94
- #: includes/class-mla-settings.php:3009 includes/class-mla-settings.php:3064
95
- #: includes/class-mla-settings.php:3098 includes/class-mla-settings.php:3101
96
- #: includes/class-mla-settings.php:3105 includes/class-mla-settings.php:3204
97
- #: includes/class-mla-settings.php:3210 includes/class-mla-settings.php:3224
98
- #: includes/class-mla-settings.php:3231 includes/class-mla-settings.php:3253
99
- #: includes/class-mla-settings.php:3295 includes/class-mla-settings.php:3301
100
- #: includes/class-mla-settings.php:3315 includes/class-mla-settings.php:3322
101
- #: includes/class-mla-settings.php:3374 includes/class-mla-settings.php:3495
102
- #: includes/class-mla-settings.php:3625 includes/class-mla-settings.php:3696
103
- #: includes/class-mla-settings.php:3782 includes/class-mla-settings.php:4116
104
- #: includes/class-mla-settings.php:4120 includes/class-mla-settings.php:4131
105
- #: includes/class-mla-settings.php:4138 includes/class-mla-settings.php:4147
106
- #: includes/class-mla-settings.php:4184 includes/class-mla-settings.php:4192
107
- #: includes/class-mla-settings.php:4201 includes/class-mla-shortcodes.php:1651
108
- #: includes/class-mla-shortcodes.php:1725
109
- #: includes/class-mla-shortcodes.php:3016
110
- #: includes/class-mla-shortcodes.php:3344
111
- #: includes/class-mla-shortcodes.php:3375
112
  msgid "ERROR"
113
  msgstr ""
114
 
@@ -212,13 +211,13 @@ msgid ""
212
  msgstr ""
213
 
214
  #. translators: 1: ERROR tag 2: function name 3: non-array value
215
- #: includes/class-mla-data.php:1528 includes/class-mla-edit-media.php:310
216
- #: includes/class-mla-main.php:1924 includes/class-mla-main.php:1999
217
- #: includes/class-mla-media-modal.php:1186
218
  #: includes/class-mla-mime-types.php:483
219
  #: includes/class-mla-mime-types.php:1218
220
- #: includes/class-mla-mime-types.php:2361 includes/class-mla-settings.php:1535
221
- #: includes/class-mla-settings.php:1981
222
  #, php-format
223
  msgctxt "error_log"
224
  msgid "%1$s: %2$s non-array \"%3$s\""
@@ -233,12 +232,12 @@ msgstr ""
233
  #: includes/class-mla-data.php:1967 includes/class-mla-data.php:1970
234
  #: includes/class-mla-data.php:1987 includes/class-mla-data.php:1989
235
  #: includes/class-mla-data.php:1992 includes/class-mla-data.php:1994
236
- #: includes/class-mla-data.php:2354 includes/class-mla-data.php:2357
237
- #: includes/class-mla-data.php:2423 includes/class-mla-data.php:2426
238
- #: includes/class-mla-data.php:2477 includes/class-mla-data.php:2480
239
- #: includes/class-mla-data.php:2579 includes/class-mla-data.php:2582
240
- #: includes/class-mla-data.php:2618 includes/class-mla-data.php:2621
241
- #: includes/class-mla-data.php:2642 includes/class-mla-data.php:2645
242
  msgid "DEBUG"
243
  msgstr ""
244
 
@@ -276,156 +275,156 @@ msgid "%1$s: _execute_list_table_query SQL_request = \"%2$s\"."
276
  msgstr ""
277
 
278
  #. translators: 1: DEBUG tag 2: search filter details
279
- #: includes/class-mla-data.php:2354
280
  #, php-format
281
  msgid "%1$s: mla_query_posts_search_filter = \"%2$s\"."
282
  msgstr ""
283
 
284
  #. translators: 1: DEBUG tag 2: search filter details
285
- #: includes/class-mla-data.php:2357
286
  #, php-format
287
  msgctxt "error_log"
288
  msgid "%1$s: mla_query_posts_search_filter = \"%2$s\"."
289
  msgstr ""
290
 
291
  #. translators: 1: DEBUG tag 2: where filter details
292
- #: includes/class-mla-data.php:2423
293
  #, php-format
294
  msgid "%1$s: mla_query_posts_where_filter = \"%2$s\"."
295
  msgstr ""
296
 
297
  #. translators: 1: DEBUG tag 2: where filter details
298
- #: includes/class-mla-data.php:2426
299
  #, php-format
300
  msgctxt "error_log"
301
  msgid "%1$s: mla_query_posts_where_filter = \"%2$s\"."
302
  msgstr ""
303
 
304
  #. translators: 1: DEBUG tag 2: join filter details
305
- #: includes/class-mla-data.php:2477
306
  #, php-format
307
  msgid "%1$s: mla_query_posts_join_filter = \"%2$s\"."
308
  msgstr ""
309
 
310
  #. translators: 1: DEBUG tag 2: join filter details
311
- #: includes/class-mla-data.php:2480
312
  #, php-format
313
  msgctxt "error_log"
314
  msgid "%1$s: mla_query_posts_join_filter = \"%2$s\"."
315
  msgstr ""
316
 
317
  #. translators: 1: DEBUG tag 2: orderby details details
318
- #: includes/class-mla-data.php:2579
319
  #, php-format
320
  msgid "%1$s: mla_query_posts_orderby_filter = \"%2$s\"."
321
  msgstr ""
322
 
323
  #. translators: 1: DEBUG tag 2: orderby details details
324
- #: includes/class-mla-data.php:2582
325
  #, php-format
326
  msgctxt "error_log"
327
  msgid "%1$s: mla_query_posts_orderby_filter = \"%2$s\"."
328
  msgstr ""
329
 
330
  #. translators: 1: DEBUG tag 2: SQL clauses
331
- #: includes/class-mla-data.php:2618
332
  #, php-format
333
  msgid "%1$s: mla_query_posts_clauses_filter = \"%2$s\"."
334
  msgstr ""
335
 
336
  #. translators: 1: DEBUG tag 2: SQL clauses
337
- #: includes/class-mla-data.php:2621
338
  #, php-format
339
  msgctxt "error_log"
340
  msgid "%1$s: mla_query_posts_clauses_filter = \"%2$s\"."
341
  msgstr ""
342
 
343
  #. translators: 1: DEBUG tag 2: SQL clauses
344
- #: includes/class-mla-data.php:2642
345
  #, php-format
346
  msgid "%1$s: mla_query_posts_clauses_request_filter = \"%2$s\"."
347
  msgstr ""
348
 
349
  #. translators: 1: DEBUG tag 2: SQL clauses
350
- #: includes/class-mla-data.php:2645
351
  #, php-format
352
  msgctxt "error_log"
353
  msgid "%1$s: mla_query_posts_clauses_request_filter = \"%2$s\"."
354
  msgstr ""
355
 
356
  #. translators: 1: ERROR tag 2: post ID
357
- #: includes/class-mla-data.php:2679
358
  #, php-format
359
  msgctxt "error_log"
360
  msgid "%1$s: mla_get_attachment_by_id(%2$d) not found."
361
  msgstr ""
362
 
363
  #. translators: 1: ERROR tag 2: post ID 3: post_type
364
- #: includes/class-mla-data.php:2685
365
  #, php-format
366
  msgctxt "error_log"
367
  msgid "%1$s: mla_get_attachment_by_id(%2$d) wrong post_type \"%3$s\"."
368
  msgstr ""
369
 
370
- #: includes/class-mla-data.php:3300 includes/class-mla-data.php:3644
371
- #: includes/class-mla-list-table.php:1004
372
  msgid "NO REFERENCE TESTS"
373
  msgstr ""
374
 
375
- #: includes/class-mla-data.php:3306 includes/class-mla-data.php:3650
376
- #: includes/class-mla-options.php:2805 includes/class-mla-options.php:2806
377
  msgid "ORPHAN"
378
  msgstr ""
379
 
380
- #: includes/class-mla-data.php:3310 includes/class-mla-data.php:3654
381
  msgid "UNUSED"
382
  msgstr ""
383
 
384
- #: includes/class-mla-data.php:3315 includes/class-mla-data.php:3659
385
  msgid "UNATTACHED"
386
  msgstr ""
387
 
388
- #: includes/class-mla-data.php:3317 includes/class-mla-data.php:3661
389
  msgid "INVALID PARENT"
390
  msgstr ""
391
 
392
  #. translators: 1: post_type, 2: post_title, 3: post ID, 4: query string, 5: error message
393
- #: includes/class-mla-data.php:3842
394
  #, php-format
395
  msgid "(%1$s) %2$s (ID %3$d) query \"%4$s\" failed, returning \"%5$s\""
396
  msgstr ""
397
 
398
- #: includes/class-mla-data.php:4033
399
  msgctxt "error_log"
400
  msgid "mla_parse_xmp_metadata xml_parse_into_struct failed."
401
  msgstr ""
402
 
403
- #: includes/class-mla-data.php:4036
404
  msgctxt "error_log"
405
  msgid "mla_parse_xmp_metadata set option failed."
406
  msgstr ""
407
 
408
- #: includes/class-mla-data.php:5123 includes/class-mla-settings.php:1768
409
  #: includes/class-mla-view-list-table.php:377
410
  #: includes/class-mla-view-list-table.php:393
411
  msgid "Yes"
412
  msgstr ""
413
 
414
- #: includes/class-mla-data.php:5125 includes/class-mla-list-table.php:241
415
- #: includes/class-mla-settings.php:1767
416
  #: includes/class-mla-view-list-table.php:379
417
  #: includes/class-mla-view-list-table.php:395
418
  msgid "No"
419
  msgstr ""
420
 
421
  #. translators: 1: meta_key
422
- #: includes/class-mla-data.php:5383 includes/class-mla-data.php:5481
423
  #, php-format
424
  msgid "Deleting %1$s"
425
  msgstr ""
426
 
427
  #. translators: 1: ERROR tag 2: meta_key
428
- #: includes/class-mla-data.php:5386
429
  #, php-format
430
  msgid "%1$s: meta:%2$s not found"
431
  msgstr ""
@@ -433,479 +432,463 @@ msgstr ""
433
  #. translators: 1: meta_key 2: meta_value
434
  #. translators: 1: meta_key 2: new_value
435
  #. translators: 1: meta_key 2: meta_value
436
- #: includes/class-mla-data.php:5395 includes/class-mla-data.php:5492
437
- #: includes/class-mla-data.php:5498
438
  #, php-format
439
  msgid "Adding %1$s = %2$s"
440
  msgstr ""
441
 
442
  #. translators: 1: ERROR tag 2: meta_key
443
- #: includes/class-mla-data.php:5399
444
  #, php-format
445
  msgid "%1$s: Adding meta:%2$s; not found"
446
  msgstr ""
447
 
448
  #. translators: 1: meta_key
449
- #: includes/class-mla-data.php:5406
450
  #, php-format
451
  msgid "Deleting Null meta:%1$s"
452
  msgstr ""
453
 
454
  #. translators: 1: element name 2: old_value 3: new_value
455
- #: includes/class-mla-data.php:5416 includes/class-mla-data.php:5567
456
- #: includes/class-mla-data.php:5628 includes/class-mla-data.php:5654
457
- #: includes/class-mla-data.php:5696 includes/class-mla-data.php:5709
458
- #: includes/class-mla-data.php:5718 includes/class-mla-data.php:5729
459
- #: includes/class-mla-data.php:5740 includes/class-mla-data.php:5753
460
- #: includes/class-mla-data.php:5762 includes/class-mla-data.php:5771
461
  #: includes/class-mla-mime-types.php:1052
462
- #: includes/class-mla-mime-types.php:2125
463
  #, php-format
464
  msgid "Changing %1$s from \"%2$s\" to \"%3$s\""
465
  msgstr ""
466
 
467
  #. translators: 1: ERROR tag 2: meta_key
468
- #: includes/class-mla-data.php:5421
469
  #, php-format
470
  msgid "%1$s: Changing meta:%2$s; not found"
471
  msgstr ""
472
 
473
  #. translators: 1: meta_key
474
- #: includes/class-mla-data.php:5522
475
  #, php-format
476
  msgid "Deleting old %1$s values"
477
  msgstr ""
478
 
479
  #. translators: 1: meta_key 2: old_value 3: new_value 4: update count
480
- #: includes/class-mla-data.php:5552
481
  #, php-format
482
  msgid "Changing %1$s from \"%2$s\" to \"%3$s\"; %4$d updates"
483
  msgstr ""
484
 
485
- #: includes/class-mla-data.php:5610 includes/class-mla-main.php:2287
486
  msgid "Could not retrieve Attachment."
487
  msgstr ""
488
 
489
- #: includes/class-mla-data.php:5628 includes/class-mla-edit-media.php:418
490
- #: includes/class-mla-main.php:1638 includes/class-mla-main.php:1938
491
- #: includes/class-mla-main.php:2128 includes/class-mla-main.php:2505
492
- #: includes/class-mla-objects.php:278 includes/class-mla-options.php:1077
493
- #: includes/class-mla-options.php:1892
494
  #: includes/mla-main-search-box-template.php:42
495
  #: includes/mla-media-modal-js-template.php:32
496
  msgid "Title"
497
  msgstr ""
498
 
499
  #. translators: 1: ERROR tag 2: old_value
500
- #: includes/class-mla-data.php:5651
501
  #, php-format
502
  msgid "%1$s: Could not change Name/Slug \"%2$s\"; name already exists"
503
  msgstr ""
504
 
505
- #: includes/class-mla-data.php:5654 includes/class-mla-edit-media.php:419
506
- #: includes/class-mla-main.php:2129 includes/class-mla-main.php:2508
507
- #: includes/class-mla-options.php:1084
508
  msgid "Name/Slug"
509
  msgstr ""
510
 
511
  #. translators: 1: old_value
512
- #: includes/class-mla-data.php:5680
513
  #, php-format
514
  msgid "Deleting ALT Text, was \"%1$s\""
515
  msgstr ""
516
 
517
  #. translators: 1: ERROR tag 2: old_value
518
- #: includes/class-mla-data.php:5683
519
  #, php-format
520
  msgid "%1$s: Could not delete ALT Text, remains \"%2$s\""
521
  msgstr ""
522
 
523
- #: includes/class-mla-data.php:5696 includes/class-mla-edit-media.php:422
524
- #: includes/class-mla-list-table.php:1294 includes/class-mla-main.php:2132
525
- #: includes/class-mla-main.php:2511 includes/class-mla-options.php:1091
526
- #: includes/class-mla-options.php:1898
527
  #: includes/mla-main-search-box-template.php:44
528
  #: includes/mla-media-modal-js-template.php:40
529
  msgid "ALT Text"
530
  msgstr ""
531
 
532
  #. translators: 1: ERROR tag 2: old_value 3: new_value
533
- #: includes/class-mla-data.php:5699
534
  #, php-format
535
  msgid "%1$s: Could not change ALT Text from \"%2$s\" to \"%3$s\""
536
  msgstr ""
537
 
538
- #: includes/class-mla-data.php:5709 includes/class-mla-edit-media.php:420
539
- #: includes/class-mla-main.php:2130 includes/class-mla-main.php:2514
540
- #: includes/class-mla-options.php:1098 includes/class-mla-options.php:1901
541
  #: includes/mla-main-search-box-template.php:45
542
  #: includes/mla-media-modal-js-template.php:45
543
  msgid "Caption"
544
  msgstr ""
545
 
546
- #: includes/class-mla-data.php:5718 includes/class-mla-edit-media.php:421
547
- #: includes/class-mla-main.php:2131 includes/class-mla-main.php:2516
548
- #: includes/class-mla-options.php:1105 includes/class-mla-options.php:1904
549
- #: includes/class-mla-settings.php:1501 includes/class-mla-settings.php:1758
550
- #: includes/class-mla-settings.php:1856 includes/class-mla-settings.php:2220
551
  #: includes/mla-main-search-box-template.php:46
552
  #: includes/mla-media-modal-js-template.php:49
553
  msgid "Description"
554
  msgstr ""
555
 
556
- #: includes/class-mla-data.php:5729 includes/class-mla-list-table.php:978
557
- #: includes/class-mla-list-table.php:1070 includes/class-mla-options.php:4418
558
- #: includes/class-mla-options.php:4765
559
  msgid "Parent"
560
  msgstr ""
561
 
562
- #: includes/class-mla-data.php:5740 includes/class-mla-edit-media.php:611
563
- #: includes/class-mla-edit-media.php:764 includes/class-mla-main.php:2135
564
- #: includes/class-mla-main.php:2522 includes/class-mla-settings.php:1499
565
- #: includes/class-mla-settings.php:1756
566
  msgid "Menu Order"
567
  msgstr ""
568
 
569
- #: includes/class-mla-data.php:5753 includes/class-mla-edit-media.php:389
570
- #: includes/class-mla-list-table.php:1450
571
- #: includes/class-mla-list-table.php:1453 includes/class-mla-main.php:2005
572
- #: includes/class-mla-main.php:2107 includes/class-mla-main.php:2336
573
  msgid "Author"
574
  msgstr ""
575
 
576
- #: includes/class-mla-data.php:5762 includes/class-mla-edit-media.php:412
577
- #: includes/class-mla-main.php:2146
578
  msgid "Comments"
579
  msgstr ""
580
 
581
- #: includes/class-mla-data.php:5771 includes/class-mla-edit-media.php:413
582
- #: includes/class-mla-main.php:2147
583
  msgid "Pings"
584
  msgstr ""
585
 
586
- #: includes/class-mla-data.php:5802
587
  msgid "Adding"
588
  msgstr ""
589
 
590
- #: includes/class-mla-data.php:5806
591
  msgid "Removing"
592
  msgstr ""
593
 
594
- #: includes/class-mla-data.php:5815
595
  msgid "Replacing"
596
  msgstr ""
597
 
598
- #: includes/class-mla-data.php:5823
599
  msgid "Ignoring"
600
  msgstr ""
601
 
602
  #. translators: 1: action_name, 2: taxonomy
603
- #: includes/class-mla-data.php:5836
604
  #, php-format
605
  msgid "%1$s \"%2$s\" terms"
606
  msgstr ""
607
 
608
  #. translators: 1: taxonomy
609
- #: includes/class-mla-data.php:5840
610
  #, php-format
611
  msgid "You cannot assign \"%1$s\" terms"
612
  msgstr ""
613
 
614
  #. translators: 1: post ID
615
- #: includes/class-mla-data.php:5852 includes/class-mla-main.php:1159
616
  #, php-format
617
  msgid "Item %1$d, no changes detected."
618
  msgstr ""
619
 
620
  #. translators: 1: post ID
621
- #: includes/class-mla-data.php:5864
622
  #, php-format
623
  msgid "Item %1$d updated."
624
  msgstr ""
625
 
626
  #. translators: 1: ERROR tag 2: post ID
627
- #: includes/class-mla-data.php:5878
628
  #, php-format
629
  msgid "%1$s: Item %2$d update failed."
630
  msgstr ""
631
 
632
- #: includes/class-mla-edit-media.php:150 includes/class-mla-edit-media.php:186
633
- #: includes/class-mla-edit-media.php:235 includes/class-mla-main.php:349
634
- #: includes/class-mla-main.php:386 includes/class-mla-main.php:1055
635
- #: includes/class-mla-main.php:1821 includes/class-mla-media-modal.php:413
636
- #: includes/class-mla-options.php:3962 includes/class-mla-settings.php:340
 
637
  msgctxt "tag_delimiter"
638
  msgid ","
639
  msgstr ""
640
 
641
- #: includes/class-mla-edit-media.php:185
642
  msgid "Upload New Media items"
643
  msgstr ""
644
 
645
- #: includes/class-mla-edit-media.php:187 includes/class-mla-edit-media.php:237
646
- #: includes/class-mla-main.php:373
647
  msgid "An ajax.fail error has occurred. Please reload the page and try again."
648
  msgstr ""
649
 
650
- #: includes/class-mla-edit-media.php:188 includes/class-mla-edit-media.php:238
651
- #: includes/class-mla-main.php:374
652
  msgid "An ajax.done error has occurred. Please reload the page and try again."
653
  msgstr ""
654
 
655
- #: includes/class-mla-edit-media.php:190 includes/class-mla-edit-media.php:408
656
  msgid "Open Bulk Edit area"
657
  msgstr ""
658
 
659
- #: includes/class-mla-edit-media.php:191
660
  msgid "Close Bulk Edit area"
661
  msgstr ""
662
 
663
- #: includes/class-mla-edit-media.php:332 includes/class-mla-main.php:2040
664
  msgid "more"
665
  msgstr ""
666
 
667
- #: includes/class-mla-edit-media.php:333 includes/class-mla-main.php:2041
668
  msgid "less"
669
  msgstr ""
670
 
671
- #: includes/class-mla-edit-media.php:336 includes/class-mla-edit-media.php:367
672
- #: includes/class-mla-main.php:2044 includes/class-mla-main.php:2082
673
  msgid "Add"
674
  msgstr ""
675
 
676
- #: includes/class-mla-edit-media.php:337 includes/class-mla-edit-media.php:368
677
- #: includes/class-mla-main.php:2045 includes/class-mla-main.php:2083
678
  msgid "Remove"
679
  msgstr ""
680
 
681
- #: includes/class-mla-edit-media.php:338 includes/class-mla-edit-media.php:369
682
- #: includes/class-mla-main.php:2046 includes/class-mla-main.php:2084
683
- #: includes/class-mla-options.php:3498 includes/class-mla-options.php:3601
684
- #: includes/class-mla-options.php:3645 includes/class-mla-options.php:4654
685
- #: includes/class-mla-options.php:4704 includes/class-mla-options.php:4823
686
- #: includes/class-mla-options.php:4865 includes/class-mla-options.php:4890
687
  msgid "Replace"
688
  msgstr ""
689
 
690
- #: includes/class-mla-edit-media.php:414 includes/class-mla-main.php:2148
691
- #: includes/class-mla-main.php:2194 includes/class-mla-settings.php:1766
692
- #: includes/class-mla-settings.php:1804 includes/class-mla-settings.php:2231
693
  msgid "No Change"
694
  msgstr ""
695
 
696
- #: includes/class-mla-edit-media.php:415 includes/class-mla-main.php:2149
697
  msgid "Allow"
698
  msgstr ""
699
 
700
- #: includes/class-mla-edit-media.php:416 includes/class-mla-main.php:2150
701
  msgid "Do not allow"
702
  msgstr ""
703
 
704
- #: includes/class-mla-edit-media.php:423 includes/class-mla-list-table.php:975
705
- #: includes/class-mla-list-table.php:1067 includes/class-mla-main.php:2133
706
  msgid "Parent ID"
707
  msgstr ""
708
 
709
- #: includes/class-mla-edit-media.php:424 includes/class-mla-edit-media.php:744
710
- #: includes/class-mla-main.php:2134
711
  #: includes/class-mla-upload-optional-list-table.php:281
712
  msgid "Select"
713
  msgstr ""
714
 
715
- #: includes/class-mla-edit-media.php:501
716
  msgid "Custom field mapping updated."
717
  msgstr ""
718
 
719
- #: includes/class-mla-edit-media.php:502
720
  msgid "IPTC/EXIF mapping updated."
721
  msgstr ""
722
 
723
  #. translators: date_i18n format for last modified date and time
724
- #: includes/class-mla-edit-media.php:520
725
  msgid "M j, Y @ G:i"
726
  msgstr ""
727
 
728
- #: includes/class-mla-edit-media.php:522 includes/class-mla-main.php:2500
729
  msgid "Last modified"
730
  msgstr ""
731
 
732
- #: includes/class-mla-edit-media.php:533
733
  msgid "Map Custom Field metadata for this item"
734
  msgstr ""
735
 
736
- #: includes/class-mla-edit-media.php:533 includes/class-mla-main.php:1745
737
- #: includes/class-mla-main.php:2153
738
  msgid "Map Custom Field metadata"
739
  msgstr ""
740
 
741
- #: includes/class-mla-edit-media.php:535
742
  msgid "Map IPTC/EXIF metadata for this item"
743
  msgstr ""
744
 
745
- #: includes/class-mla-edit-media.php:535 includes/class-mla-main.php:1748
746
- #: includes/class-mla-main.php:2152 includes/class-mla-main.php:2493
747
  msgid "Map IPTC/EXIF metadata"
748
  msgstr ""
749
 
750
- #: includes/class-mla-edit-media.php:607 includes/class-mla-edit-media.php:745
751
- #: includes/class-mla-main.php:2518
752
  msgid "Parent Info"
753
  msgstr ""
754
 
755
- #: includes/class-mla-edit-media.php:617 includes/class-mla-edit-media.php:788
756
  msgid "Attachment Metadata"
757
  msgstr ""
758
 
759
- #: includes/class-mla-edit-media.php:622 includes/class-mla-edit-media.php:822
760
- #: includes/class-mla-main.php:2529 includes/class-mla-options.php:472
761
  msgid "Featured in"
762
  msgstr ""
763
 
764
- #: includes/class-mla-edit-media.php:626 includes/class-mla-edit-media.php:861
765
- #: includes/class-mla-main.php:2531 includes/class-mla-options.php:481
766
  msgid "Inserted in"
767
  msgstr ""
768
 
769
- #: includes/class-mla-edit-media.php:630 includes/class-mla-edit-media.php:896
770
- #: includes/class-mla-main.php:2533 includes/class-mla-options.php:490
771
- #: includes/class-mla-settings.php:3917
772
  msgid "Gallery in"
773
  msgstr ""
774
 
775
- #: includes/class-mla-edit-media.php:634 includes/class-mla-edit-media.php:931
776
- #: includes/class-mla-main.php:2535 includes/class-mla-options.php:499
777
- #: includes/class-mla-settings.php:3927
778
  msgid "MLA Gallery in"
779
  msgstr ""
780
 
781
  #. translators: 1: ERROR tag 2: function name 3: template key
782
- #: includes/class-mla-edit-media.php:677 includes/class-mla-main.php:613
783
- #: includes/class-mla-settings.php:555
784
  #, php-format
785
  msgctxt "error_log"
786
  msgid "%1$s: %2$s discarding \"%3$s\"; no title/order"
787
  msgstr ""
788
 
789
- #: includes/class-mla-edit-media.php:723 includes/class-mla-list-table.php:773
790
- #: includes/class-mla-main.php:1651
791
  msgid "Scheduled"
792
  msgstr ""
793
 
794
- #: includes/class-mla-edit-media.php:726 includes/class-mla-list-table.php:776
795
  msgctxt "post state"
796
  msgid "Pending"
797
  msgstr ""
798
 
799
- #: includes/class-mla-edit-media.php:729 includes/class-mla-list-table.php:770
800
- #: includes/class-mla-main.php:1657
801
  msgid "Draft"
802
  msgstr ""
803
 
804
- #: includes/class-mla-edit-media.php:743
805
  msgid "Post Parent"
806
  msgstr ""
807
 
808
- #: includes/class-mla-edit-media.php:744 includes/class-mla-main.php:1929
809
  msgid "Select Parent"
810
  msgstr ""
811
 
812
- #: includes/class-mla-edit-media.php:811 includes/class-mla-edit-media.php:849
813
- #: includes/class-mla-edit-media.php:885 includes/class-mla-edit-media.php:920
814
- #: includes/class-mla-list-table.php:1117
815
- #: includes/class-mla-list-table.php:1166
816
- #: includes/class-mla-list-table.php:1212
817
- #: includes/class-mla-list-table.php:1257 includes/class-mla-main.php:2349
818
- #: includes/class-mla-main.php:2368 includes/class-mla-main.php:2385
819
- #: includes/class-mla-main.php:2401
820
  msgid "PARENT"
821
  msgstr ""
822
 
823
- #: includes/class-mla-edit-media.php:1114
824
  msgid "Most Used"
825
  msgstr ""
826
 
827
  #. translators: %s: add new taxonomy label
828
- #: includes/class-mla-edit-media.php:1143
829
  #, php-format
830
  msgid "+ %s"
831
  msgstr ""
832
 
833
- #: includes/class-mla-edit-media.php:1149 includes/class-mla-main.php:1930
834
- #: includes/class-mla-media-modal.php:1216
835
  #: includes/mla-media-modal-js-template.php:20
836
  #: includes/mla-media-modal-js-template.php:61
837
  msgid "Search"
838
  msgstr ""
839
 
840
- #: includes/class-mla-image-editor.php:141
841
- msgid "File doesn&#8217;t exist?"
842
- msgstr ""
843
-
844
- #: includes/class-mla-image-editor.php:198
845
- msgid "File is not an image."
846
- msgstr ""
847
-
848
- #: includes/class-mla-list-table.php:200
849
  msgctxt "list_table_column"
850
  msgid "ID/Parent"
851
  msgstr ""
852
 
853
- #: includes/class-mla-list-table.php:201
854
  msgctxt "list_table_column"
855
  msgid "Title/Name"
856
  msgstr ""
857
 
858
- #: includes/class-mla-list-table.php:202
859
  msgctxt "list_table_column"
860
  msgid "Title"
861
  msgstr ""
862
 
863
- #: includes/class-mla-list-table.php:203
864
  msgctxt "list_table_column"
865
  msgid "Name"
866
  msgstr ""
867
 
868
- #: includes/class-mla-list-table.php:204
869
  msgctxt "list_table_column"
870
  msgid "Parent ID"
871
  msgstr ""
872
 
873
- #: includes/class-mla-list-table.php:205
874
  msgctxt "list_table_column"
875
  msgid "Menu Order"
876
  msgstr ""
877
 
878
- #: includes/class-mla-list-table.php:206
879
  msgctxt "list_table_column"
880
  msgid "Featured in"
881
  msgstr ""
882
 
883
- #: includes/class-mla-list-table.php:207
884
  msgctxt "list_table_column"
885
  msgid "Inserted in"
886
  msgstr ""
887
 
888
- #: includes/class-mla-list-table.php:208
889
  msgctxt "list_table_column"
890
  msgid "Gallery in"
891
  msgstr ""
892
 
893
- #: includes/class-mla-list-table.php:209
894
  msgctxt "list_table_column"
895
  msgid "MLA Gallery in"
896
  msgstr ""
897
 
898
- #: includes/class-mla-list-table.php:210
899
  msgctxt "list_table_column"
900
  msgid "ALT Text"
901
  msgstr ""
902
 
903
- #: includes/class-mla-list-table.php:211
904
  msgctxt "list_table_column"
905
  msgid "Caption"
906
  msgstr ""
907
 
908
- #: includes/class-mla-list-table.php:212
909
  #: includes/class-mla-upload-list-table.php:186
910
  #: includes/class-mla-upload-optional-list-table.php:171
911
  #: includes/class-mla-view-list-table.php:179
@@ -913,71 +896,70 @@ msgctxt "list_table_column"
913
  msgid "Description"
914
  msgstr ""
915
 
916
- #: includes/class-mla-list-table.php:213
917
  #: includes/class-mla-upload-list-table.php:178
918
  #: includes/class-mla-upload-optional-list-table.php:168
919
  msgctxt "list_table_column"
920
  msgid "MIME Type"
921
  msgstr ""
922
 
923
- #: includes/class-mla-list-table.php:214
924
  msgctxt "list_table_column"
925
  msgid "File URL"
926
  msgstr ""
927
 
928
- #: includes/class-mla-list-table.php:215
929
  msgctxt "list_table_column"
930
  msgid "Base File"
931
  msgstr ""
932
 
933
- #: includes/class-mla-list-table.php:216
934
  msgctxt "list_table_column"
935
  msgid "Date"
936
  msgstr ""
937
 
938
- #: includes/class-mla-list-table.php:217
939
  msgctxt "list_table_column"
940
  msgid "Last Modified"
941
  msgstr ""
942
 
943
- #: includes/class-mla-list-table.php:218
944
  msgctxt "list_table_column"
945
  msgid "Author"
946
  msgstr ""
947
 
948
- #: includes/class-mla-list-table.php:219
949
  msgctxt "list_table_column"
950
  msgid "Attached to"
951
  msgstr ""
952
 
953
- #: includes/class-mla-list-table.php:240
954
  msgid "All"
955
  msgstr ""
956
 
957
- #: includes/class-mla-list-table.php:627
958
- #: includes/class-mla-list-table.php:1352 includes/class-mla-options.php:604
959
  #: includes/class-mla-options.php:806 includes/class-mla-options.php:830
960
- #: includes/class-mla-options.php:844 includes/class-mla-settings.php:2305
961
  msgid "None"
962
  msgstr ""
963
 
964
- #: includes/class-mla-list-table.php:633 includes/class-mla-list-table.php:665
965
- #: includes/class-mla-list-table.php:975
966
- #: includes/class-mla-list-table.php:1067
967
- #: includes/class-mla-list-table.php:1290
968
- #: includes/class-mla-list-table.php:1334
969
- #: includes/class-mla-list-table.php:1366
970
- #: includes/class-mla-list-table.php:1450
971
  msgid "Filter by"
972
  msgstr ""
973
 
974
- #: includes/class-mla-list-table.php:643
975
- #: includes/class-mla-media-modal.php:898
976
  msgid "Not Supported"
977
  msgstr ""
978
 
979
  #. translators: 1: column_name 2: column_values
980
- #: includes/class-mla-list-table.php:685
981
  #: includes/class-mla-upload-list-table.php:247
982
  #: includes/class-mla-upload-optional-list-table.php:228
983
  #: includes/class-mla-view-list-table.php:236
@@ -985,21 +967,14 @@ msgstr ""
985
  msgid "column_default: %1$s, %2$s"
986
  msgstr ""
987
 
988
- #: includes/class-mla-list-table.php:751 includes/class-mla-list-table.php:827
989
- #: includes/class-mla-list-table.php:829
990
- #: includes/class-mla-upload-list-table.php:312
991
- #: includes/class-mla-view-list-table.php:302
992
- msgid "Edit this item"
993
- msgstr ""
994
-
995
- #: includes/class-mla-list-table.php:751 includes/class-mla-list-table.php:754
996
- #: includes/class-mla-list-table.php:827 includes/class-mla-list-table.php:829
997
- #: includes/class-mla-list-table.php:1122
998
- #: includes/class-mla-list-table.php:1171
999
- #: includes/class-mla-list-table.php:1217
1000
- #: includes/class-mla-list-table.php:1262
1001
- #: includes/class-mla-list-table.php:1470
1002
- #: includes/class-mla-list-table.php:1774
1003
  #: includes/class-mla-upload-list-table.php:312
1004
  #: includes/class-mla-upload-list-table.php:610
1005
  #: includes/class-mla-view-list-table.php:302
@@ -1007,192 +982,198 @@ msgstr ""
1007
  msgid "Edit"
1008
  msgstr ""
1009
 
1010
- #: includes/class-mla-list-table.php:779
1011
  msgid "Trash"
1012
  msgstr ""
1013
 
1014
- #: includes/class-mla-list-table.php:815
1015
  msgid "Restore this item from the Trash"
1016
  msgstr ""
1017
 
1018
- #: includes/class-mla-list-table.php:815
1019
- #: includes/class-mla-list-table.php:1771
1020
  msgid "Restore"
1021
  msgstr ""
1022
 
1023
- #: includes/class-mla-list-table.php:832
 
 
 
 
 
 
1024
  #: includes/class-mla-upload-list-table.php:314
1025
  #: includes/class-mla-view-list-table.php:304
1026
  msgid "Edit this item inline"
1027
  msgstr ""
1028
 
1029
- #: includes/class-mla-list-table.php:832 includes/class-mla-main.php:2127
1030
- #: includes/class-mla-options.php:3375 includes/class-mla-options.php:3682
1031
  #: includes/class-mla-upload-list-table.php:314
1032
  #: includes/class-mla-view-list-table.php:304
1033
  msgid "Quick Edit"
1034
  msgstr ""
1035
 
1036
- #: includes/class-mla-list-table.php:838
1037
  msgid "Move this item to the Trash"
1038
  msgstr ""
1039
 
1040
- #: includes/class-mla-list-table.php:838
1041
- #: includes/class-mla-list-table.php:1777
1042
  msgid "Move to Trash"
1043
  msgstr ""
1044
 
1045
- #: includes/class-mla-list-table.php:843
1046
  #: includes/class-mla-upload-list-table.php:318
1047
  #: includes/class-mla-view-list-table.php:310
1048
  msgid "Delete this item Permanently"
1049
  msgstr ""
1050
 
1051
- #: includes/class-mla-list-table.php:843
1052
- #: includes/class-mla-list-table.php:1772
1053
- #: includes/class-mla-list-table.php:1779
1054
  #: includes/class-mla-upload-list-table.php:318
1055
  #: includes/class-mla-view-list-table.php:310
1056
  #: includes/class-mla-view-list-table.php:514
1057
  msgid "Delete Permanently"
1058
  msgstr ""
1059
 
1060
- #: includes/class-mla-list-table.php:851 includes/class-mla-settings.php:3021
1061
  msgid "Download"
1062
  msgstr ""
1063
 
1064
- #: includes/class-mla-list-table.php:854 includes/class-mla-settings.php:1744
1065
  msgid "View"
1066
  msgstr ""
1067
 
1068
- #: includes/class-mla-list-table.php:900 includes/class-mla-list-table.php:972
1069
- #: includes/class-mla-main.php:377 includes/class-mla-main.php:1642
 
1070
  msgid "(no title)"
1071
  msgstr ""
1072
 
1073
- #: includes/class-mla-list-table.php:1064
1074
  msgid "(no title: bad ID)"
1075
  msgstr ""
1076
 
1077
- #: includes/class-mla-list-table.php:1099
1078
- #: includes/class-mla-list-table.php:1144
1079
- #: includes/class-mla-list-table.php:1194
1080
- #: includes/class-mla-list-table.php:1239 includes/class-mla-main.php:2357
1081
- #: includes/class-mla-main.php:2377 includes/class-mla-main.php:2393
1082
- #: includes/class-mla-main.php:2409 includes/class-mla-options.php:476
1083
  #: includes/class-mla-options.php:485 includes/class-mla-options.php:494
1084
  #: includes/class-mla-options.php:503
1085
  msgid "Disabled"
1086
  msgstr ""
1087
 
1088
- #: includes/class-mla-list-table.php:1337 includes/class-mla-settings.php:1849
1089
- #: includes/class-mla-settings.php:2214
1090
  msgid "MIME Type"
1091
  msgstr ""
1092
 
1093
- #: includes/class-mla-list-table.php:1370
1094
  msgid "Base File"
1095
  msgstr ""
1096
 
1097
- #: includes/class-mla-list-table.php:1386
1098
- #: includes/class-mla-list-table.php:1419
1099
  msgid "Unpublished"
1100
  msgstr ""
1101
 
1102
  #. translators: 1: upload/last modified date and time
1103
- #: includes/class-mla-list-table.php:1395
1104
- #: includes/class-mla-list-table.php:1426
1105
  #, php-format
1106
  msgid "%1$s from now"
1107
  msgstr ""
1108
 
1109
  #. translators: 1: upload/last modified date and time
1110
- #: includes/class-mla-list-table.php:1398
1111
- #: includes/class-mla-list-table.php:1428
1112
  #, php-format
1113
  msgid "%1$s ago"
1114
  msgstr ""
1115
 
1116
  #. translators: format for upload/last modified date
1117
  #. translators: date format in table columns, see http://php.net/date
1118
- #: includes/class-mla-list-table.php:1402
1119
- #: includes/class-mla-list-table.php:1431
1120
- #: includes/class-mla-list-table.php:1487 includes/class-mla-main.php:1667
1121
  msgid "Y/m/d"
1122
  msgstr ""
1123
 
1124
- #: includes/class-mla-list-table.php:1489 includes/class-mla-options.php:1194
1125
  msgctxt "table_view_singular"
1126
  msgid "Unattached"
1127
  msgstr ""
1128
 
1129
- #: includes/class-mla-list-table.php:1492
1130
  msgid "Set Parent"
1131
  msgstr ""
1132
 
1133
- #: includes/class-mla-list-table.php:1623
1134
  msgctxt "uploaded files"
1135
  msgid "All"
1136
  msgid_plural "All"
1137
  msgstr[0] ""
1138
  msgstr[1] ""
1139
 
1140
- #: includes/class-mla-list-table.php:1805
1141
  msgid "Filter"
1142
  msgstr ""
1143
 
1144
- #: includes/class-mla-list-table.php:1809
1145
  #: includes/mla-media-modal-js-template.php:58
1146
  msgid "Terms Search"
1147
  msgstr ""
1148
 
1149
- #: includes/class-mla-list-table.php:1815
 
1150
  msgid "Clear Filter-by"
1151
  msgstr ""
1152
 
1153
- #: includes/class-mla-list-table.php:1819
1154
  msgid "Empty Trash"
1155
  msgstr ""
1156
 
1157
- #: includes/class-mla-main.php:375 includes/class-mla-settings.php:337
1158
  msgid "Error while saving the changes."
1159
  msgstr ""
1160
 
1161
- #: includes/class-mla-main.php:376 includes/class-mla-settings.php:338
1162
  msgid "Remove From Bulk Edit"
1163
  msgstr ""
1164
 
1165
- #: includes/class-mla-main.php:378
1166
  msgid "Bulk Edit items"
1167
  msgstr ""
1168
 
1169
- #: includes/class-mla-main.php:379 includes/class-mla-main.php:2154
1170
- #: includes/class-mla-settings.php:349
1171
  msgid "Waiting"
1172
  msgstr ""
1173
 
1174
- #: includes/class-mla-main.php:380 includes/class-mla-main.php:2156
1175
- #: includes/class-mla-settings.php:351
1176
  msgid "Complete"
1177
  msgstr ""
1178
 
1179
- #: includes/class-mla-main.php:381 includes/class-mla-settings.php:352
1180
  msgid "Unchanged"
1181
  msgstr ""
1182
 
1183
- #: includes/class-mla-main.php:382 includes/class-mla-settings.php:353
1184
  msgid "Succeeded"
1185
  msgstr ""
1186
 
1187
- #: includes/class-mla-main.php:383 includes/class-mla-settings.php:354
1188
  msgid "Failed"
1189
  msgstr ""
1190
 
1191
- #: includes/class-mla-main.php:384 includes/class-mla-settings.php:357
1192
  msgid "CANCELED"
1193
  msgstr ""
1194
 
1195
- #: includes/class-mla-main.php:495
1196
  #, php-format
1197
  msgid "Item permanently deleted."
1198
  msgid_plural "%d items permanently deleted."
@@ -1200,42 +1181,42 @@ msgstr[0] ""
1200
  msgstr[1] ""
1201
 
1202
  #. translators: 1: post ID
1203
- #: includes/class-mla-main.php:500 includes/class-mla-main.php:2617
1204
  #, php-format
1205
  msgid "Item %1$d moved to Trash."
1206
  msgstr ""
1207
 
1208
- #: includes/class-mla-main.php:519
1209
  msgid "Entries per page"
1210
  msgstr ""
1211
 
1212
- #: includes/class-mla-main.php:911
1213
  msgid "You are not allowed to edit Attachment: "
1214
  msgstr ""
1215
 
1216
  #. translators: 1: ERROR tag 2: bulk action
1217
- #: includes/class-mla-main.php:1149
1218
  #, php-format
1219
  msgid "%1$s: Unknown bulk action %2$s"
1220
  msgstr ""
1221
 
1222
- #: includes/class-mla-main.php:1171
1223
  msgid "no changes detected"
1224
  msgstr ""
1225
 
1226
  #. translators: 1: action name, e.g., edit
1227
- #: includes/class-mla-main.php:1217 includes/class-mla-settings.php:1623
1228
- #: includes/class-mla-settings.php:2090
1229
  #, php-format
1230
  msgid "Bulk Action %1$s - no items selected."
1231
  msgstr ""
1232
 
1233
- #: includes/class-mla-main.php:1268
1234
  msgid "You do not have permission to manage attachments."
1235
  msgstr ""
1236
 
1237
  #. translators: 1: number of items
1238
- #: includes/class-mla-main.php:1335
1239
  #, php-format
1240
  msgctxt "deleted items"
1241
  msgid "%s item deleted."
@@ -1243,280 +1224,220 @@ msgid_plural "%s items deleted."
1243
  msgstr[0] ""
1244
  msgstr[1] ""
1245
 
1246
- #: includes/class-mla-main.php:1337
1247
  msgid "No items deleted."
1248
  msgstr ""
1249
 
1250
- #: includes/class-mla-main.php:1362
1251
- msgid "Edit single item"
1252
- msgstr ""
1253
-
1254
- #. translators: 1: post ID
1255
- #: includes/class-mla-main.php:1377
1256
- #, php-format
1257
- msgid "Item %1$d cancelled."
1258
- msgstr ""
1259
-
1260
- #: includes/class-mla-main.php:1412
1261
  msgid "Empty Terms Search; ignored"
1262
  msgstr ""
1263
 
1264
  #. translators: 1: row-level action, e.g., single_item_delete, single_item_edit
1265
  #. translators: 1: bulk_action, e.g., single_item_delete, single_item_edit
1266
- #: includes/class-mla-main.php:1424 includes/class-mla-settings.php:1660
1267
- #: includes/class-mla-settings.php:2129
1268
  #, php-format
1269
  msgid "Unknown mla_admin_action - \"%1$s\""
1270
  msgstr ""
1271
 
1272
- #: includes/class-mla-main.php:1457
1273
  msgid "term search results for"
1274
  msgstr ""
1275
 
1276
- #: includes/class-mla-main.php:1460
1277
  msgid "post/parent results for"
1278
  msgstr ""
1279
 
1280
- #: includes/class-mla-main.php:1462
1281
  msgid "search results for"
1282
  msgstr ""
1283
 
1284
- #: includes/class-mla-main.php:1638 includes/class-mla-main.php:1939
1285
  msgid "Type"
1286
  msgstr ""
1287
 
1288
- #: includes/class-mla-main.php:1638 includes/class-mla-main.php:1940
1289
  msgid "Date"
1290
  msgstr ""
1291
 
1292
- #: includes/class-mla-main.php:1638 includes/class-mla-main.php:1941
1293
- #: includes/class-mla-settings.php:2230
1294
  msgid "Status"
1295
  msgstr ""
1296
 
1297
- #: includes/class-mla-main.php:1648
1298
  msgid "Published"
1299
  msgstr ""
1300
 
1301
- #: includes/class-mla-main.php:1654
1302
  msgid "Pending Review"
1303
  msgstr ""
1304
 
1305
- #: includes/class-mla-main.php:1696 includes/class-mla-main.php:1777
1306
  msgid "No post ID found"
1307
  msgstr ""
1308
 
1309
- #: includes/class-mla-main.php:1703 includes/class-mla-main.php:1784
1310
- #: includes/class-mla-main.php:2294
1311
  msgid "You are not allowed to edit this Attachment."
1312
  msgstr ""
1313
 
1314
- #: includes/class-mla-main.php:1751 includes/class-mla-main.php:1951
1315
- #: includes/class-mla-main.php:2141 includes/class-mla-main.php:2492
1316
- #: includes/class-mla-settings.php:1503 includes/class-mla-settings.php:1764
1317
- #: includes/class-mla-settings.php:1858 includes/class-mla-settings.php:2228
1318
  msgid "Update"
1319
  msgstr ""
1320
 
1321
- #: includes/class-mla-main.php:1886
1322
  msgid "All Post Types"
1323
  msgstr ""
1324
 
1325
- #: includes/class-mla-main.php:1932
1326
  msgid "For"
1327
  msgstr ""
1328
 
1329
- #: includes/class-mla-main.php:1942 includes/class-mla-shortcodes.php:833
1330
  msgid "Unattached"
1331
  msgstr ""
1332
 
1333
- #: includes/class-mla-main.php:1947 includes/class-mla-main.php:2140
1334
- #: includes/class-mla-main.php:2491 includes/class-mla-settings.php:1504
1335
- #: includes/class-mla-settings.php:1763 includes/class-mla-settings.php:1859
1336
- #: includes/class-mla-settings.php:1931 includes/class-mla-settings.php:2227
1337
- #: includes/class-mla-settings.php:2698 includes/class-mla-settings.php:2834
 
1338
  msgid "Cancel"
1339
  msgstr ""
1340
 
1341
- #: includes/class-mla-main.php:2142 includes/class-mla-options.php:3389
1342
- #: includes/class-mla-options.php:3683 includes/class-mla-settings.php:1765
1343
- #: includes/class-mla-settings.php:2229
1344
  msgid "Bulk Edit"
1345
  msgstr ""
1346
 
1347
- #: includes/class-mla-main.php:2155
1348
  msgid "In-process"
1349
  msgstr ""
1350
 
1351
- #: includes/class-mla-main.php:2157 includes/class-mla-options.php:494
1352
- #: includes/class-mla-options.php:503 includes/class-mla-settings.php:2701
1353
- #: includes/class-mla-settings.php:2837
1354
  msgid "Refresh"
1355
  msgstr ""
1356
 
1357
- #: includes/class-mla-main.php:2246
1358
  msgid "You are not allowed to delete this item."
1359
  msgstr ""
1360
 
1361
  #. translators: 1: ERROR tag 2: post ID
1362
- #: includes/class-mla-main.php:2254
1363
  #, php-format
1364
  msgid "%1$s: Item %2$d could NOT be deleted."
1365
  msgstr ""
1366
 
1367
  #. translators: 1: post ID
1368
- #: includes/class-mla-main.php:2261
1369
  #, php-format
1370
  msgid "Item %1$d permanently deleted."
1371
  msgstr ""
1372
 
1373
- #. translators: 1: ERROR tag 2: page_template_array
1374
- #: includes/class-mla-main.php:2321
1375
- #, php-format
1376
- msgctxt "error_log"
1377
- msgid "%1$s: MLA::_display_single_item \\$page_template_array = \"%2$s\""
1378
- msgstr ""
1379
-
1380
- #: includes/class-mla-main.php:2495
1381
- msgid "File name"
1382
- msgstr ""
1383
-
1384
- #: includes/class-mla-main.php:2497
1385
- msgid "File type"
1386
- msgstr ""
1387
-
1388
- #: includes/class-mla-main.php:2498
1389
- msgid "Upload date"
1390
- msgstr ""
1391
-
1392
- #: includes/class-mla-main.php:2502
1393
- msgid "Dimensions"
1394
- msgstr ""
1395
-
1396
- #: includes/class-mla-main.php:2506
1397
- msgid "required"
1398
- msgstr ""
1399
-
1400
- #: includes/class-mla-main.php:2510
1401
- msgid "Must be unique; will be validated."
1402
- msgstr ""
1403
-
1404
- #: includes/class-mla-main.php:2513
1405
- msgid "Alternate text for the image, e.g. &#8220;The Mona Lisa&#8221;"
1406
- msgstr ""
1407
-
1408
- #: includes/class-mla-main.php:2521
1409
- msgid "ID, type and title of parent, if any."
1410
- msgstr ""
1411
-
1412
- #: includes/class-mla-main.php:2524
1413
- msgid "File URL"
1414
- msgstr ""
1415
-
1416
- #: includes/class-mla-main.php:2526
1417
- msgid "Location of the uploaded file."
1418
- msgstr ""
1419
-
1420
- #: includes/class-mla-main.php:2527
1421
- msgid "Image Metadata"
1422
- msgstr ""
1423
-
1424
- #: includes/class-mla-main.php:2562
1425
  msgid "You are not allowed to move this item out of the Trash."
1426
  msgstr ""
1427
 
1428
  #. translators: 1: ERROR tag 2: post ID
1429
- #: includes/class-mla-main.php:2570
1430
  #, php-format
1431
  msgid "%1$s: Item %2$d could NOT be restored from Trash."
1432
  msgstr ""
1433
 
1434
  #. translators: 1: post ID
1435
- #: includes/class-mla-main.php:2585
1436
  #, php-format
1437
  msgid "Item %1$d restored from Trash."
1438
  msgstr ""
1439
 
1440
- #: includes/class-mla-main.php:2602
1441
  msgid "You are not allowed to move this item to the Trash."
1442
  msgstr ""
1443
 
1444
  #. translators: 1: ERROR tag 2: post ID
1445
- #: includes/class-mla-main.php:2610
1446
  #, php-format
1447
  msgid "%1$s: Item %2$d could NOT be moved to Trash."
1448
  msgstr ""
1449
 
1450
  #: includes/class-mla-media-modal.php:245
1451
  #: includes/class-mla-media-modal.php:251
1452
- #: includes/class-mla-media-modal.php:812
1453
- #: includes/class-mla-media-modal.php:847
1454
- #: includes/class-mla-media-modal.php:892
1455
  msgid "Click to toggle"
1456
  msgstr ""
1457
 
1458
- #: includes/class-mla-media-modal.php:288
1459
  msgid "Show all dates"
1460
  msgstr ""
1461
 
1462
  #. translators: 1: month name, 2: 4-digit year
1463
- #: includes/class-mla-media-modal.php:303
1464
  #, php-format
1465
  msgid "%1$s %2$d"
1466
  msgstr ""
1467
 
1468
- #: includes/class-mla-media-modal.php:518
1469
  msgid "Search Box"
1470
  msgstr ""
1471
 
1472
- #: includes/class-mla-media-modal.php:519
1473
  msgid "Loading..."
1474
  msgstr ""
1475
 
1476
- #: includes/class-mla-media-modal.php:858
1477
  msgid "Tags"
1478
  msgstr ""
1479
 
1480
  #. translators: %s: add new taxonomy label
1481
  #. translators: %s: add new View
1482
  #. translators: %s: add new Upload MIME Type
1483
- #: includes/class-mla-media-modal.php:860 includes/class-mla-objects.php:46
1484
- #: includes/class-mla-objects.php:76 includes/class-mla-settings.php:1744
1485
- #: includes/class-mla-settings.php:2210
1486
  #, php-format
1487
  msgid "Add New %1$s"
1488
  msgstr ""
1489
 
1490
- #: includes/class-mla-media-modal.php:876
1491
  msgid "Choose from the most used tags"
1492
  msgstr ""
1493
 
1494
- #: includes/class-mla-media-modal.php:1199
1495
- #: includes/class-mla-media-modal.php:1215
1496
  msgid "Search Terms"
1497
  msgstr ""
1498
 
1499
- #: includes/class-mla-media-modal.php:1200
1500
  msgid "There are no taxonomies to search"
1501
  msgstr ""
1502
 
1503
- #: includes/class-mla-media-modal.php:1218
1504
  msgid "All phrases"
1505
  msgstr ""
1506
 
1507
- #: includes/class-mla-media-modal.php:1220
1508
  msgid "Any phrase"
1509
  msgstr ""
1510
 
1511
- #: includes/class-mla-media-modal.php:1222
1512
  msgid "All terms"
1513
  msgstr ""
1514
 
1515
- #: includes/class-mla-media-modal.php:1224
1516
  msgid "Any term"
1517
  msgstr ""
1518
 
1519
- #: includes/class-mla-media-modal.php:1226
1520
  msgid "Exact"
1521
  msgstr ""
1522
 
@@ -1555,15 +1476,15 @@ msgstr ""
1555
 
1556
  #. translators: 1: element name 2: bad_value 3: good_value
1557
  #: includes/class-mla-mime-types.php:953
1558
- #: includes/class-mla-mime-types.php:1988
1559
  #, php-format
1560
  msgid "<br>Changing %1$s \"%2$s\" to valid value \"%3$s\""
1561
  msgstr ""
1562
 
1563
  #: includes/class-mla-mime-types.php:953
1564
  #: includes/class-mla-mime-types.php:1041
1565
- #: includes/class-mla-mime-types.php:1052 includes/class-mla-settings.php:1488
1566
- #: includes/class-mla-settings.php:1745
1567
  msgid "Slug"
1568
  msgstr ""
1569
 
@@ -1582,7 +1503,7 @@ msgstr ""
1582
 
1583
  #. translators: 1: element name 2: bad_value 3: good_value
1584
  #: includes/class-mla-mime-types.php:1041
1585
- #: includes/class-mla-mime-types.php:2114
1586
  #, php-format
1587
  msgid "<br>Changing new %1$s \"%2$s\" to valid value \"%3$s\""
1588
  msgstr ""
@@ -1681,83 +1602,83 @@ msgstr ""
1681
  msgid "icon"
1682
  msgstr ""
1683
 
1684
- #: includes/class-mla-mime-types.php:1972
1685
- #: includes/class-mla-mime-types.php:2071
1686
  msgid "Cannot load Upload MIME Types"
1687
  msgstr ""
1688
 
1689
- #: includes/class-mla-mime-types.php:1983
1690
  msgid "Extension is required"
1691
  msgstr ""
1692
 
1693
- #: includes/class-mla-mime-types.php:1988
1694
- #: includes/class-mla-mime-types.php:2114
1695
- #: includes/class-mla-mime-types.php:2125 includes/class-mla-settings.php:1847
1696
- #: includes/class-mla-settings.php:2212
1697
  msgid "Extension"
1698
  msgstr ""
1699
 
1700
  #. translators: 1: ERROR tag 2: slug
1701
- #: includes/class-mla-mime-types.php:1996
1702
  #, php-format
1703
  msgid "%1$s: Could not add extension \"%2$s\"; value already exists"
1704
  msgstr ""
1705
 
1706
- #: includes/class-mla-mime-types.php:2004
1707
  msgid "MIME type is required"
1708
  msgstr ""
1709
 
1710
  #. translators: 1: ERROR tag 2: clean_mime_type
1711
- #: includes/class-mla-mime-types.php:2009
1712
- #: includes/class-mla-mime-types.php:2156
1713
  #, php-format
1714
  msgid "%1$s: Bad MIME type; try \"%2$s\""
1715
  msgstr ""
1716
 
1717
  #. translators: 1: slug
1718
- #: includes/class-mla-mime-types.php:2046
1719
  #, php-format
1720
  msgid "Upload MIME Type \"%1$s\"; added"
1721
  msgstr ""
1722
 
1723
- #: includes/class-mla-mime-types.php:2052
1724
- #: includes/class-mla-mime-types.php:2241
1725
- #: includes/class-mla-mime-types.php:2320
1726
  msgid "Cannot update Upload MIME Types"
1727
  msgstr ""
1728
 
1729
  #. translators: 1: ERROR tag 2: slug
1730
- #: includes/class-mla-mime-types.php:2122
1731
  #, php-format
1732
  msgid "%1$s: Could not add new extension \"%2$s\"; value already exists"
1733
  msgstr ""
1734
 
1735
  #. translators: 1: slug
1736
- #: includes/class-mla-mime-types.php:2221
1737
  #, php-format
1738
  msgid "Edit type \"%1$s\"; no changes detected"
1739
  msgstr ""
1740
 
1741
  #. translators: 1: slug
1742
- #: includes/class-mla-mime-types.php:2235
1743
  #, php-format
1744
  msgid "Edit type \"%1$s\"; updated"
1745
  msgstr ""
1746
 
1747
  #. translators: 1: slug
1748
- #: includes/class-mla-mime-types.php:2308
1749
  #, php-format
1750
  msgid "Upload MIME Type \"%1$s\"; reverted to standard"
1751
  msgstr ""
1752
 
1753
  #. translators: 1: slug
1754
- #: includes/class-mla-mime-types.php:2314
1755
  #, php-format
1756
  msgid "Upload MIME Type \"%1$s\"; deleted"
1757
  msgstr ""
1758
 
1759
  #. translators: 1: ERROR tag 2: slug
1760
- #: includes/class-mla-mime-types.php:2329
1761
  #, php-format
1762
  msgid "%1$s: Did not find Upload type \"%2$s\""
1763
  msgstr ""
@@ -1874,7 +1795,7 @@ msgstr ""
1874
  msgid "tpls/mla-option-templates.tpl not found"
1875
  msgstr ""
1876
 
1877
- #: includes/class-mla-options.php:441 includes/class-mla-options.php:1719
1878
  msgid "Attachment Categories"
1879
  msgstr ""
1880
 
@@ -1882,7 +1803,7 @@ msgstr ""
1882
  msgid "Check this option to add support for Attachment Categories."
1883
  msgstr ""
1884
 
1885
- #: includes/class-mla-options.php:448 includes/class-mla-options.php:1734
1886
  msgid "Attachment Tags"
1887
  msgstr ""
1888
 
@@ -1890,7 +1811,7 @@ msgstr ""
1890
  msgid "Check this option to add support for Attachment Tags."
1891
  msgstr ""
1892
 
1893
- #: includes/class-mla-options.php:455 includes/class-mla-settings.php:1330
1894
  msgid "Where-used Reporting"
1895
  msgstr ""
1896
 
@@ -1948,7 +1869,7 @@ msgid ""
1948
  "Cached."
1949
  msgstr ""
1950
 
1951
- #: includes/class-mla-options.php:508 includes/class-mla-settings.php:1330
1952
  msgid "Taxonomy Support"
1953
  msgstr ""
1954
 
@@ -1981,12 +1902,12 @@ msgid ""
1981
  msgstr ""
1982
 
1983
  #: includes/class-mla-options.php:523 includes/class-mla-options.php:704
1984
- #: includes/class-mla-settings.php:1362 includes/class-mla-settings.php:1363
1985
  msgid "For complete documentation"
1986
  msgstr ""
1987
 
1988
  #: includes/class-mla-options.php:523 includes/class-mla-options.php:704
1989
- #: includes/class-mla-settings.php:1362 includes/class-mla-settings.php:1363
1990
  msgid "click here"
1991
  msgstr ""
1992
 
@@ -2026,8 +1947,8 @@ msgstr ""
2026
  msgid "Page Title"
2027
  msgstr ""
2028
 
2029
- #: includes/class-mla-options.php:566 includes/class-mla-settings.php:442
2030
- #: includes/class-mla-settings.php:3064 includes/class-mla-settings.php:3086
2031
  msgid "Media Library Assistant"
2032
  msgstr ""
2033
 
@@ -2321,7 +2242,7 @@ msgstr ""
2321
 
2322
  #: includes/class-mla-options.php:806 includes/class-mla-options.php:815
2323
  #: includes/class-mla-options.php:830 includes/class-mla-options.php:844
2324
- #: includes/class-mla-options.php:858 includes/class-mla-settings.php:1412
2325
  msgid "Media Manager Default"
2326
  msgstr ""
2327
 
@@ -2406,9 +2327,9 @@ msgstr ""
2406
 
2407
  #: includes/class-mla-options.php:872 includes/class-mla-options.php:878
2408
  #: includes/class-mla-options.php:916 includes/class-mla-options.php:922
2409
- #: includes/class-mla-settings.php:3193 includes/class-mla-settings.php:3204
2410
- #: includes/class-mla-settings.php:3210 includes/class-mla-settings.php:3214
2411
- #: includes/class-mla-settings.php:3242 includes/class-mla-settings.php:3253
2412
  msgid "Style Template"
2413
  msgstr ""
2414
 
@@ -2424,9 +2345,9 @@ msgid "Markup Template"
2424
  msgstr ""
2425
 
2426
  #: includes/class-mla-options.php:888 includes/class-mla-options.php:932
2427
- #: includes/class-mla-settings.php:3282 includes/class-mla-settings.php:3295
2428
- #: includes/class-mla-settings.php:3301 includes/class-mla-settings.php:3305
2429
- #: includes/class-mla-settings.php:3374
2430
  msgid "markup template"
2431
  msgstr ""
2432
 
@@ -2607,7 +2528,7 @@ msgid "Post MIME Types help."
2607
  msgstr ""
2608
 
2609
  #: includes/class-mla-options.php:1146 includes/class-mla-options.php:1200
2610
- #: includes/class-mla-options.php:1209
2611
  msgctxt "post_mime_types_description"
2612
  msgid "Built-in view"
2613
  msgstr ""
@@ -2694,611 +2615,837 @@ msgstr ""
2694
 
2695
  #: includes/class-mla-options.php:1203
2696
  msgctxt "table_view_singular"
2697
- msgid "Trash"
2698
  msgstr ""
2699
 
2700
  #: includes/class-mla-options.php:1204
2701
  msgctxt "table_view_plural"
 
 
 
 
 
2702
  msgid "Trash"
2703
  msgstr ""
2704
 
2705
- #: includes/class-mla-options.php:1215
 
 
 
 
 
2706
  msgid "Enable Upload MIME Type Support"
2707
  msgstr ""
2708
 
2709
- #: includes/class-mla-options.php:1218
2710
  msgid ""
2711
  "Check/uncheck this option to enable/disable Upload MIME Type Support, then "
2712
  "click <strong>Save Changes</strong> to record the new setting."
2713
  msgstr ""
2714
 
2715
- #: includes/class-mla-options.php:1227
2716
  msgid "Upload MIME Types help."
2717
  msgstr ""
2718
 
2719
- #: includes/class-mla-options.php:1232
2720
  msgid "Enable MLA File Type Icons Support"
2721
  msgstr ""
2722
 
2723
- #: includes/class-mla-options.php:1235
2724
  msgid ""
2725
  "Check/uncheck this option to enable/disable MLA File Type Icons Support, "
2726
  "then click <strong>Save Changes</strong> to record the new setting."
2727
  msgstr ""
2728
 
2729
- #: includes/class-mla-options.php:1287 includes/class-mla-options.php:1309
2730
- #: includes/class-mla-options.php:1351
2731
  msgid "no templates exist"
2732
  msgstr ""
2733
 
2734
- #: includes/class-mla-options.php:1295
2735
  msgid "not found"
2736
  msgstr ""
2737
 
2738
  #. translators: 1: ERROR tag 2: option name 3: action, e.g., update, delete, reset
2739
- #: includes/class-mla-options.php:1685 includes/class-mla-options.php:1862
2740
- #: includes/class-mla-options.php:1938 includes/class-mla-options.php:3721
2741
- #: includes/class-mla-options.php:5010
2742
  #, php-format
2743
  msgid "%1$s: Custom %2$s unknown action \"%3$s\""
2744
  msgstr ""
2745
 
2746
- #: includes/class-mla-options.php:1776
2747
  msgid "Support"
2748
  msgstr ""
2749
 
2750
- #: includes/class-mla-options.php:1777
2751
  msgid "Inline Edit"
2752
  msgstr ""
2753
 
2754
- #: includes/class-mla-options.php:1778
2755
  msgid "Term Search"
2756
  msgstr ""
2757
 
2758
- #: includes/class-mla-options.php:1779
2759
  msgid "Checklist"
2760
  msgstr ""
2761
 
2762
- #: includes/class-mla-options.php:1780
2763
  msgid "Checked On Top"
2764
  msgstr ""
2765
 
2766
- #: includes/class-mla-options.php:1781
2767
  msgid "List Filter"
2768
  msgstr ""
2769
 
2770
- #: includes/class-mla-options.php:1782
2771
  msgid "Taxonomy"
2772
  msgstr ""
2773
 
2774
  #. translators: 1: taxonomy name
2775
- #: includes/class-mla-options.php:1801
2776
  #, php-format
2777
  msgid "List Filter ignored; %1$s not supported."
2778
  msgstr ""
2779
 
2780
  #. translators: 1: taxonomy name
2781
- #: includes/class-mla-options.php:1808
2782
  #, php-format
2783
  msgid "Inline Edit ignored; %1$s not supported."
2784
  msgstr ""
2785
 
2786
  #. translators: 1: taxonomy name
2787
- #: includes/class-mla-options.php:1816
2788
  #, php-format
2789
  msgid "Term Search ignored; %1$s not supported."
2790
  msgstr ""
2791
 
2792
  #. translators: 1: taxonomy name
2793
- #: includes/class-mla-options.php:1826
2794
  #, php-format
2795
  msgid "Checklist ignored; %1$s not supported."
2796
  msgstr ""
2797
 
2798
  #. translators: 1: taxonomy name
2799
- #: includes/class-mla-options.php:1834
2800
  #, php-format
2801
  msgid "Checked On Top ignored; %1$s not supported."
2802
  msgstr ""
2803
 
2804
  #. translators: 1: option name, e.g., taxonomy_support
2805
- #: includes/class-mla-options.php:1852 includes/class-mla-options.php:1928
2806
  #, php-format
2807
  msgid "Update custom %1$s"
2808
  msgstr ""
2809
 
2810
  #. translators: 1: option name, e.g., taxonomy_support
2811
- #: includes/class-mla-options.php:1859 includes/class-mla-options.php:1935
2812
- #: includes/class-mla-options.php:5003
2813
  #, php-format
2814
  msgid "Reset custom %1$s"
2815
  msgstr ""
2816
 
2817
- #: includes/class-mla-options.php:1888
2818
  #: includes/mla-main-search-box-template.php:38
2819
  #: includes/mla-media-modal-js-template.php:24
2820
  msgid "and"
2821
  msgstr ""
2822
 
2823
- #: includes/class-mla-options.php:1890
2824
  #: includes/mla-main-search-box-template.php:40
2825
  #: includes/mla-media-modal-js-template.php:28
2826
  msgid "or"
2827
  msgstr ""
2828
 
2829
- #: includes/class-mla-options.php:1895 includes/class-mla-settings.php:2360
2830
- #: includes/class-mla-settings.php:2393 includes/class-mla-settings.php:2419
2831
- #: includes/class-mla-settings.php:2454 includes/class-mla-settings.php:2511
2832
- #: includes/class-mla-settings.php:2561
2833
  #: includes/mla-main-search-box-template.php:43
2834
  #: includes/mla-media-modal-js-template.php:36
2835
  msgid "Name"
2836
  msgstr ""
2837
 
2838
- #: includes/class-mla-options.php:1907
2839
  #: includes/mla-main-search-box-template.php:47
2840
  #: includes/mla-media-modal-js-template.php:53
2841
  msgid "Terms"
2842
  msgstr ""
2843
 
2844
- #: includes/class-mla-options.php:3053 includes/class-mla-options.php:3182
2845
- #: includes/class-mla-options.php:4162 includes/class-mla-options.php:4193
2846
- #: includes/class-mla-settings.php:1810
2847
  msgid "None (select a value)"
2848
  msgstr ""
2849
 
2850
- #: includes/class-mla-options.php:3189
2851
  msgid "Metadata (see below)"
2852
  msgstr ""
2853
 
2854
- #: includes/class-mla-options.php:3196
2855
  msgid "Template (see below)"
2856
  msgstr ""
2857
 
2858
  #. translators: 1: ERROR tag 2: custom field name
2859
- #: includes/class-mla-options.php:3264 includes/class-mla-options.php:4470
2860
  #, php-format
2861
  msgid "%1$s: New field %2$s already exists."
2862
  msgstr ""
2863
 
2864
  #. translators: 1: custom field name
2865
- #: includes/class-mla-options.php:3269 includes/class-mla-options.php:4475
2866
  #, php-format
2867
  msgid "Adding new field %1$s."
2868
  msgstr ""
2869
 
2870
  #. translators: 1: custom field name
2871
- #: includes/class-mla-options.php:3277 includes/class-mla-options.php:4483
2872
  #, php-format
2873
  msgid "Adding new rule for %1$s."
2874
  msgstr ""
2875
 
2876
  #. translators: 1: custom field name
2877
- #: includes/class-mla-options.php:3303 includes/class-mla-options.php:4344
2878
- #: includes/class-mla-options.php:4506
2879
  #, php-format
2880
  msgid "Deleting rule for %1$s."
2881
  msgstr ""
2882
 
2883
  #. translators: 1: custom field name 2: attribute 3: old value 4: new value
2884
- #: includes/class-mla-options.php:3326 includes/class-mla-options.php:3347
2885
- #: includes/class-mla-options.php:3397 includes/class-mla-options.php:3404
2886
- #: includes/class-mla-options.php:4260 includes/class-mla-options.php:4267
2887
- #: includes/class-mla-options.php:4274 includes/class-mla-options.php:4369
2888
- #: includes/class-mla-options.php:4376 includes/class-mla-options.php:4411
2889
- #: includes/class-mla-options.php:4418 includes/class-mla-options.php:4516
2890
- #: includes/class-mla-options.php:4523
2891
  #, php-format
2892
  msgid "%1$s changing %2$s from %3$s to %4$s."
2893
  msgstr ""
2894
 
2895
- #: includes/class-mla-options.php:3326 includes/class-mla-options.php:3678
2896
  msgid "Data Source"
2897
  msgstr ""
2898
 
2899
- #: includes/class-mla-options.php:3332 includes/class-mla-options.php:4294
2900
- #: includes/class-mla-options.php:4396 includes/class-mla-options.php:4543
2901
  msgid "Replace to Keep"
2902
  msgstr ""
2903
 
2904
- #: includes/class-mla-options.php:3335 includes/class-mla-options.php:4297
2905
- #: includes/class-mla-options.php:4399 includes/class-mla-options.php:4546
2906
  msgid "Keep to Replace"
2907
  msgstr ""
2908
 
2909
  #. translators: 1: custom field name 2: attribute 3: old value 'to' new value
2910
- #: includes/class-mla-options.php:3340 includes/class-mla-options.php:3361
2911
- #: includes/class-mla-options.php:3375 includes/class-mla-options.php:3389
2912
- #: includes/class-mla-options.php:3418 includes/class-mla-options.php:4288
2913
- #: includes/class-mla-options.php:4302 includes/class-mla-options.php:4390
2914
- #: includes/class-mla-options.php:4404 includes/class-mla-options.php:4537
2915
- #: includes/class-mla-options.php:4551
2916
  #, php-format
2917
  msgid "%1$s changing %2$s value from %3$s."
2918
  msgstr ""
2919
 
2920
- #: includes/class-mla-options.php:3340 includes/class-mla-options.php:3679
2921
- #: includes/class-mla-options.php:4302 includes/class-mla-options.php:4404
2922
- #: includes/class-mla-options.php:4551 includes/class-mla-options.php:4677
2923
- #: includes/class-mla-options.php:4763 includes/class-mla-options.php:4901
2924
  msgid "Existing Text"
2925
  msgstr ""
2926
 
2927
- #: includes/class-mla-options.php:3347 includes/class-mla-options.php:3680
2928
  msgid "Format"
2929
  msgstr ""
2930
 
2931
- #: includes/class-mla-options.php:3353 includes/class-mla-options.php:3367
2932
- #: includes/class-mla-options.php:3381 includes/class-mla-options.php:3410
2933
  msgid "unchecked to checked"
2934
  msgstr ""
2935
 
2936
- #: includes/class-mla-options.php:3356 includes/class-mla-options.php:3370
2937
- #: includes/class-mla-options.php:3384 includes/class-mla-options.php:3413
2938
  msgid "checked to unchecked"
2939
  msgstr ""
2940
 
2941
- #: includes/class-mla-options.php:3361 includes/class-mla-options.php:3681
2942
  msgid "MLA Column"
2943
  msgstr ""
2944
 
2945
- #: includes/class-mla-options.php:3397
2946
  msgid "Metavalue name"
2947
  msgstr ""
2948
 
2949
- #: includes/class-mla-options.php:3404 includes/class-mla-options.php:3512
2950
- #: includes/class-mla-options.php:3614 includes/class-mla-options.php:3658
2951
  msgid "Option"
2952
  msgstr ""
2953
 
2954
- #: includes/class-mla-options.php:3418 includes/class-mla-options.php:3524
2955
- #: includes/class-mla-options.php:3626 includes/class-mla-options.php:3670
2956
  msgid "Delete NULL values"
2957
  msgstr ""
2958
 
2959
- #: includes/class-mla-options.php:3457 includes/class-mla-options.php:4775
2960
  msgid "No Custom Field Mapping Rules Defined"
2961
  msgstr ""
2962
 
2963
- #: includes/class-mla-options.php:3496 includes/class-mla-options.php:3599
2964
- #: includes/class-mla-options.php:3643 includes/class-mla-options.php:4652
2965
- #: includes/class-mla-options.php:4702 includes/class-mla-options.php:4821
2966
- #: includes/class-mla-options.php:4863 includes/class-mla-options.php:4888
2967
  msgid "Keep"
2968
  msgstr ""
2969
 
2970
- #: includes/class-mla-options.php:3500 includes/class-mla-options.php:3603
2971
- #: includes/class-mla-options.php:3647
2972
  msgid "Native"
2973
  msgstr ""
2974
 
2975
- #: includes/class-mla-options.php:3502 includes/class-mla-options.php:3605
2976
- #: includes/class-mla-options.php:3649
2977
  msgid "Commas"
2978
  msgstr ""
2979
 
2980
- #: includes/class-mla-options.php:3504 includes/class-mla-options.php:3607
2981
- #: includes/class-mla-options.php:3651
2982
  msgid "Raw"
2983
  msgstr ""
2984
 
2985
- #: includes/class-mla-options.php:3514 includes/class-mla-options.php:3616
2986
- #: includes/class-mla-options.php:3660
2987
  msgid "Text"
2988
  msgstr ""
2989
 
2990
- #: includes/class-mla-options.php:3516 includes/class-mla-options.php:3618
2991
- #: includes/class-mla-options.php:3662
2992
  msgid "Single"
2993
  msgstr ""
2994
 
2995
- #: includes/class-mla-options.php:3518 includes/class-mla-options.php:3620
2996
- #: includes/class-mla-options.php:3664
2997
  msgid "Export"
2998
  msgstr ""
2999
 
3000
- #: includes/class-mla-options.php:3520 includes/class-mla-options.php:3622
3001
- #: includes/class-mla-options.php:3666
3002
  msgid "Array"
3003
  msgstr ""
3004
 
3005
- #: includes/class-mla-options.php:3522 includes/class-mla-options.php:3624
3006
- #: includes/class-mla-options.php:3668
3007
  msgid "Multi"
3008
  msgstr ""
3009
 
3010
- #: includes/class-mla-options.php:3525 includes/class-mla-options.php:4824
3011
  msgid "Delete Rule"
3012
  msgstr ""
3013
 
3014
- #: includes/class-mla-options.php:3526 includes/class-mla-options.php:4825
3015
  msgid "Delete Rule AND Field"
3016
  msgstr ""
3017
 
3018
- #: includes/class-mla-options.php:3527 includes/class-mla-options.php:4826
3019
  msgid "Update Rule"
3020
  msgstr ""
3021
 
3022
- #: includes/class-mla-options.php:3528 includes/class-mla-options.php:4827
3023
- #: includes/class-mla-settings.php:706 includes/class-mla-settings.php:837
3024
  msgid "Map All Attachments"
3025
  msgstr ""
3026
 
3027
- #: includes/class-mla-options.php:3594 includes/class-mla-options.php:4852
3028
  msgid "Add a new Mapping Rule"
3029
  msgstr ""
3030
 
3031
- #: includes/class-mla-options.php:3627 includes/class-mla-options.php:4866
3032
  msgid "Add Rule"
3033
  msgstr ""
3034
 
3035
- #: includes/class-mla-options.php:3628 includes/class-mla-options.php:4867
3036
  msgid "Add Rule and Map All Attachments"
3037
  msgstr ""
3038
 
3039
- #: includes/class-mla-options.php:3638 includes/class-mla-options.php:4877
3040
  msgid "Add a new Field and Mapping Rule"
3041
  msgstr ""
3042
 
3043
- #: includes/class-mla-options.php:3671 includes/class-mla-options.php:4891
3044
  msgid "Add Field"
3045
  msgstr ""
3046
 
3047
- #: includes/class-mla-options.php:3672 includes/class-mla-options.php:4892
3048
  msgid "Add Field and Map All Attachments"
3049
  msgstr ""
3050
 
3051
- #: includes/class-mla-options.php:3677 includes/class-mla-options.php:4260
3052
- #: includes/class-mla-options.php:4673 includes/class-mla-options.php:4759
3053
- #: includes/class-mla-options.php:4897
3054
  msgid "Field Title"
3055
  msgstr ""
3056
 
3057
- #: includes/class-mla-options.php:3702
3058
  msgid "Custom field mapping rules updated."
3059
  msgstr ""
3060
 
3061
- #: includes/class-mla-options.php:3704
3062
  msgid "Custom field mapping rules update failed."
3063
  msgstr ""
3064
 
3065
- #: includes/class-mla-options.php:3707 includes/class-mla-settings.php:751
3066
- #: includes/class-mla-settings.php:757
3067
  msgid "Custom field no mapping rule changes detected."
3068
  msgstr ""
3069
 
3070
- #: includes/class-mla-options.php:3715
3071
  msgid "Custom field mapping settings saved."
3072
  msgstr ""
3073
 
3074
- #: includes/class-mla-options.php:3717
3075
  msgid "Custom field mapping settings reset failed."
3076
  msgstr ""
3077
 
3078
  #. translators: 1: ERROR tag 2: custom field name
3079
- #: includes/class-mla-options.php:4248
3080
  #, php-format
3081
  msgid "%1$s: No old values for %2$s."
3082
  msgstr ""
3083
 
3084
- #: includes/class-mla-options.php:4267 includes/class-mla-options.php:4369
3085
- #: includes/class-mla-options.php:4516 includes/class-mla-options.php:4674
3086
- #: includes/class-mla-options.php:4760 includes/class-mla-options.php:4898
3087
  msgid "IPTC Value"
3088
  msgstr ""
3089
 
3090
- #: includes/class-mla-options.php:4274 includes/class-mla-options.php:4376
3091
- #: includes/class-mla-options.php:4523
3092
  msgid "EXIF Value"
3093
  msgstr ""
3094
 
3095
- #: includes/class-mla-options.php:4280 includes/class-mla-options.php:4382
3096
- #: includes/class-mla-options.php:4529
3097
  msgid "EXIF to IPTC"
3098
  msgstr ""
3099
 
3100
- #: includes/class-mla-options.php:4283 includes/class-mla-options.php:4385
3101
- #: includes/class-mla-options.php:4532
3102
  msgid "IPTC to EXIF"
3103
  msgstr ""
3104
 
3105
- #: includes/class-mla-options.php:4288 includes/class-mla-options.php:4390
3106
- #: includes/class-mla-options.php:4537 includes/class-mla-options.php:4676
3107
- #: includes/class-mla-options.php:4762 includes/class-mla-options.php:4900
3108
  msgid "Priority"
3109
  msgstr ""
3110
 
3111
- #: includes/class-mla-options.php:4411 includes/class-mla-options.php:4764
3112
  msgid "Delimiter(s)"
3113
  msgstr ""
3114
 
3115
- #: includes/class-mla-options.php:4648 includes/class-mla-options.php:4698
3116
- #: includes/class-mla-options.php:4817 includes/class-mla-options.php:4859
3117
- #: includes/class-mla-options.php:4884
3118
  msgid "IPTC"
3119
  msgstr ""
3120
 
3121
- #: includes/class-mla-options.php:4650 includes/class-mla-options.php:4700
3122
- #: includes/class-mla-options.php:4819 includes/class-mla-options.php:4861
3123
- #: includes/class-mla-options.php:4886
3124
  msgid "EXIF"
3125
  msgstr ""
3126
 
3127
- #: includes/class-mla-options.php:4675 includes/class-mla-options.php:4761
3128
- #: includes/class-mla-options.php:4899
3129
  msgid "EXIF/Template Value"
3130
  msgstr ""
3131
 
3132
  #. translators: 1: ERROR tag 2: option name
3133
- #: includes/class-mla-options.php:4909
3134
  #, php-format
3135
  msgid "%1$s: Render unknown custom %2$s."
3136
  msgstr ""
3137
 
3138
  #. translators: 1: ERROR tag 2: option name
3139
- #: includes/class-mla-options.php:4953
3140
  #, php-format
3141
  msgid "%1$s: Update/delete unknown custom %2$s."
3142
  msgstr ""
3143
 
3144
- #: includes/class-mla-options.php:4959
3145
  msgid "IPTC/EXIF mapping settings updated."
3146
  msgstr ""
3147
 
3148
- #: includes/class-mla-options.php:4961
3149
  msgid "IPTC/EXIF settings update failed."
3150
  msgstr ""
3151
 
3152
- #: includes/class-mla-options.php:4964 includes/class-mla-settings.php:885
3153
- #: includes/class-mla-settings.php:891
3154
  msgid "IPTC/EXIF no mapping changes detected."
3155
  msgstr ""
3156
 
3157
  #. translators: 1: field type
3158
- #: includes/class-mla-options.php:4975 includes/class-mla-options.php:4985
3159
- #: includes/class-mla-options.php:4995 includes/class-mla-settings.php:3380
3160
  #, php-format
3161
  msgid "%1$s settings saved."
3162
  msgstr ""
3163
 
3164
- #: includes/class-mla-options.php:4975 includes/class-mla-options.php:4978
3165
- #: includes/class-mla-settings.php:3625 includes/class-mla-settings.php:3664
3166
- #: includes/class-mla-settings.php:3667
3167
  msgid "Standard field"
3168
  msgstr ""
3169
 
3170
  #. translators: 1: ERROR tag 2: field type
3171
- #: includes/class-mla-options.php:4978 includes/class-mla-options.php:4988
3172
- #: includes/class-mla-options.php:4998
3173
  #, php-format
3174
  msgid "%1$s: IPTC/EXIF %2$s settings update failed."
3175
  msgstr ""
3176
 
3177
- #: includes/class-mla-options.php:4985 includes/class-mla-options.php:4988
3178
- #: includes/class-mla-settings.php:3696 includes/class-mla-settings.php:3735
3179
- #: includes/class-mla-settings.php:3738
3180
  msgid "Taxonomy term"
3181
  msgstr ""
3182
 
3183
- #: includes/class-mla-options.php:4995 includes/class-mla-options.php:4998
3184
- #: includes/class-mla-settings.php:3525 includes/class-mla-settings.php:3528
3185
- #: includes/class-mla-settings.php:3782 includes/class-mla-settings.php:3821
3186
- #: includes/class-mla-settings.php:3824
3187
  msgid "Custom field"
3188
  msgstr ""
3189
 
3190
  #. translators: 1: ERROR tag 2: option name, e.g., taxonomy_support
3191
- #: includes/class-mla-options.php:5006
3192
  #, php-format
3193
  msgid "%1$s: Reset unknown custom %2$s"
3194
  msgstr ""
3195
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3196
  #: includes/class-mla-settings.php:339
3197
  msgid "no slug"
3198
  msgstr ""
3199
 
3200
- #: includes/class-mla-settings.php:350
3201
  msgid "Running"
3202
  msgstr ""
3203
 
3204
- #: includes/class-mla-settings.php:355
3205
  msgid "Skipped"
3206
  msgstr ""
3207
 
3208
- #: includes/class-mla-settings.php:356
3209
  msgid "Reprocessed"
3210
  msgstr ""
3211
 
3212
- #: includes/class-mla-settings.php:442 includes/class-mla-settings.php:955
3213
- #: includes/class-mla-settings.php:3087
3214
  msgid "Settings"
3215
  msgstr ""
3216
 
3217
- #: includes/class-mla-settings.php:461
3218
  msgid "Views per page"
3219
  msgstr ""
3220
 
3221
- #: includes/class-mla-settings.php:472
3222
  msgid "Types per page"
3223
  msgstr ""
3224
 
3225
- #: includes/class-mla-settings.php:483
3226
  msgid "Upload types per page"
3227
  msgstr ""
3228
 
3229
- #: includes/class-mla-settings.php:619
3230
  msgid "No view slug found"
3231
  msgstr ""
3232
 
3233
- #: includes/class-mla-settings.php:662
3234
  msgid "No upload slug found"
3235
  msgstr ""
3236
 
3237
- #: includes/class-mla-settings.php:702 includes/class-mla-settings.php:2720
3238
- #: includes/class-mla-settings.php:2724
3239
  msgid "Map All Rules, All Attachments Now"
3240
  msgstr ""
3241
 
3242
- #: includes/class-mla-settings.php:826 includes/class-mla-settings.php:2853
3243
  msgid "Map All Attachments, Standard Fields Now"
3244
  msgstr ""
3245
 
3246
- #: includes/class-mla-settings.php:829 includes/class-mla-settings.php:2856
3247
  msgid "Map All Attachments, Taxonomy Terms Now"
3248
  msgstr ""
3249
 
3250
- #: includes/class-mla-settings.php:832 includes/class-mla-settings.php:2859
3251
  msgid "Map All Attachments, Custom Fields Now"
3252
  msgstr ""
3253
 
3254
  #. translators: 1: ERROR tag 2: function name 3: option type, e.g., radio, select, text
3255
- #: includes/class-mla-settings.php:1003 includes/class-mla-settings.php:1035
3256
- #: includes/class-mla-settings.php:1173
3257
  #, php-format
3258
  msgctxt "error_log"
3259
  msgid "%1$s: %2$s unknown type = \"%3$s\""
3260
  msgstr ""
3261
 
3262
- #: includes/class-mla-settings.php:1071 includes/class-mla-settings.php:1336
3263
- #: includes/class-mla-settings.php:2291
3264
- msgid "Go to Top"
3265
- msgstr ""
3266
-
3267
- #: includes/class-mla-settings.php:1222
3268
  msgid "General"
3269
  msgstr ""
3270
 
3271
- #: includes/class-mla-settings.php:1223
3272
  msgid "Views"
3273
  msgstr ""
3274
 
3275
- #: includes/class-mla-settings.php:1224
3276
  msgid "Uploads"
3277
  msgstr ""
3278
 
3279
- #: includes/class-mla-settings.php:1225 includes/class-mla-settings.php:3380
3280
- #: includes/class-mla-settings.php:3383
3281
  msgid "MLA Gallery"
3282
  msgstr ""
3283
 
3284
- #: includes/class-mla-settings.php:1226
3285
  msgid "Custom Fields"
3286
  msgstr ""
3287
 
3288
- #: includes/class-mla-settings.php:1228
3289
  msgid "Documentation"
3290
  msgstr ""
3291
 
3292
- #: includes/class-mla-settings.php:1229
3293
  msgid "Debug"
3294
  msgstr ""
3295
 
3296
- #: includes/class-mla-settings.php:1328
3297
  msgid "General Processing Options"
3298
  msgstr ""
3299
 
3300
  #. translators: 1: - 4: page subheader values
3301
- #: includes/class-mla-settings.php:1330
3302
  #, php-format
3303
  msgid ""
3304
  "In this tab you can find a number of options for controlling the "
@@ -3307,45 +3454,36 @@ msgid ""
3307
  "any changes you make."
3308
  msgstr ""
3309
 
3310
- #: includes/class-mla-settings.php:1330
3311
  msgid "Media/Assistant Table Defaults"
3312
  msgstr ""
3313
 
3314
- #: includes/class-mla-settings.php:1330
3315
  msgid "Media Manager Enhancements"
3316
  msgstr ""
3317
 
3318
- #: includes/class-mla-settings.php:1331 includes/class-mla-settings.php:1689
3319
- #: includes/class-mla-settings.php:1742 includes/class-mla-settings.php:2158
3320
- #: includes/class-mla-settings.php:2208 includes/class-mla-settings.php:2296
3321
- #: includes/class-mla-settings.php:2719 includes/class-mla-settings.php:2722
3322
- #: includes/class-mla-settings.php:2861 includes/class-mla-settings.php:2863
3323
- #: includes/class-mla-settings.php:3044 includes/class-mla-settings.php:3046
3324
- msgid "Save Changes"
3325
- msgstr ""
3326
-
3327
- #: includes/class-mla-settings.php:1332
3328
  msgid "Export ALL Settings"
3329
  msgstr ""
3330
 
3331
- #: includes/class-mla-settings.php:1333
3332
  msgid "Delete General options and restore default settings"
3333
  msgstr ""
3334
 
3335
- #: includes/class-mla-settings.php:1337
3336
  msgid "Support Our Work"
3337
  msgstr ""
3338
 
3339
- #: includes/class-mla-settings.php:1338 includes/class-mla-settings.php:1341
3340
  msgid "Donate to FTJ"
3341
  msgstr ""
3342
 
3343
- #: includes/class-mla-settings.php:1339 includes/class-mla-settings.php:3079
3344
  msgid "Donate"
3345
  msgstr ""
3346
 
3347
  #. translators: 1: donation hyperlink
3348
- #: includes/class-mla-settings.php:1341
3349
  #, php-format
3350
  msgid ""
3351
  "This plugin was inspired by my work on the WordPress web site for our "
@@ -3354,27 +3492,27 @@ msgid ""
3354
  "our work. Thank you!"
3355
  msgstr ""
3356
 
3357
- #: includes/class-mla-settings.php:1341
3358
  msgid "tax-deductible donation"
3359
  msgstr ""
3360
 
3361
- #: includes/class-mla-settings.php:1362
3362
  msgid "enhanced version of the WordPress [gallery] shortcode."
3363
  msgstr ""
3364
 
3365
- #: includes/class-mla-settings.php:1363
3366
  msgid "enhanced version of the WordPress Tag Cloud."
3367
  msgstr ""
3368
 
3369
- #: includes/class-mla-settings.php:1375
3370
  msgid "Shortcodes made available by this plugin"
3371
  msgstr ""
3372
 
3373
- #: includes/class-mla-settings.php:1483
3374
  msgid "Edit View"
3375
  msgstr ""
3376
 
3377
- #: includes/class-mla-settings.php:1489 includes/class-mla-settings.php:1746
3378
  msgid ""
3379
  "The &#8220;slug&#8221; is the URL-friendly, unique key for the view. It must "
3380
  "be all lowercase and contain only letters, numbers, periods (.), slashes (/) "
@@ -3383,25 +3521,25 @@ msgid ""
3383
  "MIME</strong> type, e.g., &#8220;image&#8221; or &#8220;image/jpeg&#8221;."
3384
  msgstr ""
3385
 
3386
- #: includes/class-mla-settings.php:1490 includes/class-mla-settings.php:1747
3387
  msgid "Singular Label"
3388
  msgstr ""
3389
 
3390
- #: includes/class-mla-settings.php:1491 includes/class-mla-settings.php:1748
3391
  msgid "Plural Label"
3392
  msgstr ""
3393
 
3394
- #: includes/class-mla-settings.php:1492 includes/class-mla-settings.php:1749
3395
  msgid ""
3396
  "The labels, e.g., &#8220;Image&#8221; and &#8220;Images&#8221; are used for "
3397
  "column headers and other display purposes."
3398
  msgstr ""
3399
 
3400
- #: includes/class-mla-settings.php:1493 includes/class-mla-settings.php:1750
3401
  msgid "Specification"
3402
  msgstr ""
3403
 
3404
- #: includes/class-mla-settings.php:1494 includes/class-mla-settings.php:1751
3405
  msgid ""
3406
  "If the MIME type specification differs from the slug, enter it here. You may "
3407
  "include multiple MIME types, e.g., &#8220;audio,video&#8221; and/or wildcard "
@@ -3409,60 +3547,60 @@ msgid ""
3409
  "MIME Type box is checked."
3410
  msgstr ""
3411
 
3412
- #: includes/class-mla-settings.php:1495 includes/class-mla-settings.php:1752
3413
  msgid "Post MIME Type"
3414
  msgstr ""
3415
 
3416
- #: includes/class-mla-settings.php:1496 includes/class-mla-settings.php:1753
3417
  msgid ""
3418
  "Check this box if you want to add this entry to the list of MIME types "
3419
  "returned by wp_get_mime_types()."
3420
  msgstr ""
3421
 
3422
- #: includes/class-mla-settings.php:1497 includes/class-mla-settings.php:1754
3423
  msgid "Table View"
3424
  msgstr ""
3425
 
3426
- #: includes/class-mla-settings.php:1498 includes/class-mla-settings.php:1755
3427
  msgid ""
3428
  "Check this box if you want to add this entry to the list of Media/Assistant "
3429
  "table views."
3430
  msgstr ""
3431
 
3432
- #: includes/class-mla-settings.php:1500 includes/class-mla-settings.php:1757
3433
  msgid ""
3434
  "You can choose your own table view order by entering a number (1 for first, "
3435
  "etc.) in this field."
3436
  msgstr ""
3437
 
3438
- #: includes/class-mla-settings.php:1502 includes/class-mla-settings.php:1759
3439
- #: includes/class-mla-settings.php:1857 includes/class-mla-settings.php:2221
3440
  msgid ""
3441
  "The description can contain any documentation or notes you need to "
3442
  "understand or use the item."
3443
  msgstr ""
3444
 
3445
  #. translators: 1: bulk_action, e.g., delete, edit, restore, trash
3446
- #: includes/class-mla-settings.php:1613 includes/class-mla-settings.php:2079
3447
  #, php-format
3448
  msgid "Unknown bulk action %1$s"
3449
  msgstr ""
3450
 
3451
  #. translators: 1: view name/slug
3452
- #: includes/class-mla-settings.php:1652 includes/class-mla-settings.php:2121
3453
  #, php-format
3454
  msgid "Edit view \"%1$s\" cancelled."
3455
  msgstr ""
3456
 
3457
- #: includes/class-mla-settings.php:1686
3458
  msgid "View and Post MIME Type Support is disabled"
3459
  msgstr ""
3460
 
3461
- #: includes/class-mla-settings.php:1731 includes/class-mla-settings.php:1734
3462
  msgid "Library Views/Post MIME Type Processing"
3463
  msgstr ""
3464
 
3465
- #: includes/class-mla-settings.php:1732
3466
  msgid ""
3467
  "In this tab you can manage the list of \"Post MIME Types\", which are used "
3468
  "by WordPress to define the views for the <em><strong>Media/Library</strong></"
@@ -3474,7 +3612,7 @@ msgid ""
3474
  msgstr ""
3475
 
3476
  #. translators: 1: Documentation hyperlink
3477
- #: includes/class-mla-settings.php:1734
3478
  #, php-format
3479
  msgid ""
3480
  "You can find more information about library views, Post MIME types and how "
@@ -3483,87 +3621,87 @@ msgid ""
3483
  "screen."
3484
  msgstr ""
3485
 
3486
- #: includes/class-mla-settings.php:1734
3487
  msgid "Library View Processing documentation"
3488
  msgstr ""
3489
 
3490
- #: includes/class-mla-settings.php:1738 includes/class-mla-settings.php:1927
3491
- #: includes/class-mla-settings.php:2233
3492
  msgid "Displaying search results for"
3493
  msgstr ""
3494
 
3495
- #: includes/class-mla-settings.php:1739
3496
  msgid "Search Views"
3497
  msgstr ""
3498
 
3499
- #: includes/class-mla-settings.php:1760
3500
  msgid "Add View"
3501
  msgstr ""
3502
 
3503
- #: includes/class-mla-settings.php:1762 includes/class-mla-settings.php:2226
3504
  msgid "<strong>Quick Edit</strong>"
3505
  msgstr ""
3506
 
3507
- #: includes/class-mla-settings.php:1842
3508
  msgid "Edit Upload MIME Type"
3509
  msgstr ""
3510
 
3511
- #: includes/class-mla-settings.php:1848
3512
  msgid ""
3513
  "The &#8220;extension&#8221; is the file extension for this type, and a "
3514
  "unique key for the item. It must be all lowercase and contain only letters "
3515
  "and numbers."
3516
  msgstr ""
3517
 
3518
- #: includes/class-mla-settings.php:1850 includes/class-mla-settings.php:2215
3519
  msgid ""
3520
  "The MIME Type must be all lowercase and contain only letters, numbers, "
3521
  "periods (.), slashes (/) and hyphens (-). It <strong>must be a valid MIME</"
3522
  "strong> type, e.g., &#8220;image&#8221; or &#8220;image/jpeg&#8221;."
3523
  msgstr ""
3524
 
3525
- #: includes/class-mla-settings.php:1851 includes/class-mla-settings.php:2216
3526
  msgid "Icon Type"
3527
  msgstr ""
3528
 
3529
- #: includes/class-mla-settings.php:1853 includes/class-mla-settings.php:2217
3530
  msgid ""
3531
  "The Icon Type selects a thumbnail image displayed for non-image file types, "
3532
  "such as PDF documents."
3533
  msgstr ""
3534
 
3535
- #: includes/class-mla-settings.php:1854 includes/class-mla-settings.php:2218
3536
  #: includes/class-mla-upload-list-table.php:415
3537
  msgid "Inactive"
3538
  msgstr ""
3539
 
3540
- #: includes/class-mla-settings.php:1855 includes/class-mla-settings.php:2219
3541
  msgid ""
3542
  "Check this box if you want to remove this entry from the list of Upload MIME "
3543
  "Types returned by get_allowed_mime_types()."
3544
  msgstr ""
3545
 
3546
- #: includes/class-mla-settings.php:1926
3547
  msgid "Known File Extension/MIME Type Associations"
3548
  msgstr ""
3549
 
3550
- #: includes/class-mla-settings.php:1928
3551
  msgid "Search Known MIME Types"
3552
  msgstr ""
3553
 
3554
- #: includes/class-mla-settings.php:1930 includes/class-mla-settings.php:2204
3555
  msgid "To search by extension, use \".\", e.g., \".doc\""
3556
  msgstr ""
3557
 
3558
- #: includes/class-mla-settings.php:2155
3559
  msgid "Upload MIME Type Support is disabled"
3560
  msgstr ""
3561
 
3562
- #: includes/class-mla-settings.php:2198 includes/class-mla-settings.php:2201
3563
  msgid "File Extension and MIME Type Processing"
3564
  msgstr ""
3565
 
3566
- #: includes/class-mla-settings.php:2199
3567
  msgid ""
3568
  "In this tab you can manage the list of file extension/MIME Type "
3569
  "associations, which are used by WordPress to decide what kind of files can "
@@ -3573,7 +3711,7 @@ msgid ""
3573
  msgstr ""
3574
 
3575
  #. translators: 1: Documentation hyperlink
3576
- #: includes/class-mla-settings.php:2201
3577
  #, php-format
3578
  msgid ""
3579
  "You can find more information about file extensions, MIME types and how "
@@ -3581,57 +3719,57 @@ msgid ""
3581
  "the <strong>\"Help\"</strong> tab in the upper-right corner of this screen."
3582
  msgstr ""
3583
 
3584
- #: includes/class-mla-settings.php:2201
3585
  msgid "File Extension Processing documentation"
3586
  msgstr ""
3587
 
3588
- #: includes/class-mla-settings.php:2203
3589
  msgid "Search Uploads"
3590
  msgstr ""
3591
 
3592
- #: includes/class-mla-settings.php:2210
3593
  msgid "Upload MIME Type"
3594
  msgstr ""
3595
 
3596
- #: includes/class-mla-settings.php:2211
3597
  msgid ""
3598
  "To search the database of over 1,500 known extension/type associations, "
3599
  "click \"Search Known Types\" below the form."
3600
  msgstr ""
3601
 
3602
- #: includes/class-mla-settings.php:2213
3603
  msgid ""
3604
  "The &#8220;extension&#8221; is the file extension for this type, and unique "
3605
  "key for the item. It must be all lowercase and contain only letters and "
3606
  "numbers."
3607
  msgstr ""
3608
 
3609
- #: includes/class-mla-settings.php:2222
3610
  msgid "Add Upload MIME Type"
3611
  msgstr ""
3612
 
3613
- #: includes/class-mla-settings.php:2224
3614
  msgid "Search Known Types"
3615
  msgstr ""
3616
 
3617
- #: includes/class-mla-settings.php:2232
3618
  #: includes/class-mla-upload-list-table.php:417
3619
  msgid "Active"
3620
  msgstr ""
3621
 
3622
- #: includes/class-mla-settings.php:2285
3623
  msgid "MLA Gallery Options"
3624
  msgstr ""
3625
 
3626
- #: includes/class-mla-settings.php:2286
3627
  msgid "Go to Style Templates"
3628
  msgstr ""
3629
 
3630
- #: includes/class-mla-settings.php:2287
3631
  msgid "Go to Markup Templates"
3632
  msgstr ""
3633
 
3634
- #: includes/class-mla-settings.php:2288
3635
  msgid ""
3636
  "In this tab you can view the default style and markup templates. You can "
3637
  "also define additional templates and use the <code>mla_style</code> and "
@@ -3641,150 +3779,150 @@ msgid ""
3641
  "Changes\" at the bottom of this page."
3642
  msgstr ""
3643
 
3644
- #: includes/class-mla-settings.php:2292
3645
  msgid "Style Templates"
3646
  msgstr ""
3647
 
3648
- #: includes/class-mla-settings.php:2294
3649
  msgid "Markup Templates"
3650
  msgstr ""
3651
 
3652
- #: includes/class-mla-settings.php:2307
3653
  msgid "Theme"
3654
  msgstr ""
3655
 
3656
- #: includes/class-mla-settings.php:2355
3657
  msgid ""
3658
  "This default template cannot be altered or deleted, but you can copy the "
3659
  "styles."
3660
  msgstr ""
3661
 
3662
- #: includes/class-mla-settings.php:2366 includes/class-mla-settings.php:2399
3663
- #: includes/class-mla-settings.php:2425
3664
  msgid "Styles"
3665
  msgstr ""
3666
 
3667
- #: includes/class-mla-settings.php:2370 includes/class-mla-settings.php:2403
3668
- #: includes/class-mla-settings.php:2429
3669
  msgid ""
3670
  "List of substitution parameters, e.g., [+selector+], on Documentation tab."
3671
  msgstr ""
3672
 
3673
- #: includes/class-mla-settings.php:2387 includes/class-mla-settings.php:2505
3674
  msgid "Delete this template"
3675
  msgstr ""
3676
 
3677
- #: includes/class-mla-settings.php:2388 includes/class-mla-settings.php:2506
3678
  msgid ""
3679
  "Check the box to delete this template when you press Update at the bottom of "
3680
  "the page."
3681
  msgstr ""
3682
 
3683
- #: includes/class-mla-settings.php:2414
3684
  msgid "Fill in a name and styles to add a new template."
3685
  msgstr ""
3686
 
3687
- #: includes/class-mla-settings.php:2449
3688
  msgid ""
3689
  "This default template cannot be altered or deleted, but you can copy the "
3690
  "markup."
3691
  msgstr ""
3692
 
3693
- #: includes/class-mla-settings.php:2461 includes/class-mla-settings.php:2518
3694
- #: includes/class-mla-settings.php:2568
3695
  msgid "Open"
3696
  msgstr ""
3697
 
3698
- #: includes/class-mla-settings.php:2465 includes/class-mla-settings.php:2522
3699
- #: includes/class-mla-settings.php:2572
3700
  msgid ""
3701
  "Markup for the beginning of the gallery. List of parameters, e.g., [+selector"
3702
  "+], on Documentation tab."
3703
  msgstr ""
3704
 
3705
- #: includes/class-mla-settings.php:2467 includes/class-mla-settings.php:2524
3706
- #: includes/class-mla-settings.php:2574
3707
  msgid "Row"
3708
  msgstr ""
3709
 
3710
- #: includes/class-mla-settings.php:2471 includes/class-mla-settings.php:2578
3711
  msgid "Markup for the beginning of each row in the gallery."
3712
  msgstr ""
3713
 
3714
- #: includes/class-mla-settings.php:2473 includes/class-mla-settings.php:2530
3715
- #: includes/class-mla-settings.php:2580
3716
  msgid "Item"
3717
  msgstr ""
3718
 
3719
- #: includes/class-mla-settings.php:2477 includes/class-mla-settings.php:2584
3720
  msgid "Markup for each item/cell of the gallery."
3721
  msgstr ""
3722
 
3723
- #: includes/class-mla-settings.php:2479 includes/class-mla-settings.php:2536
3724
- #: includes/class-mla-settings.php:2586 includes/class-mla-settings.php:2700
3725
- #: includes/class-mla-settings.php:2836
3726
  msgid "Close"
3727
  msgstr ""
3728
 
3729
- #: includes/class-mla-settings.php:2483 includes/class-mla-settings.php:2590
3730
  msgid "Markup for the end of each row in the gallery."
3731
  msgstr ""
3732
 
3733
- #: includes/class-mla-settings.php:2488 includes/class-mla-settings.php:2545
3734
- #: includes/class-mla-settings.php:2595
3735
  msgid "Markup for the end of the gallery."
3736
  msgstr ""
3737
 
3738
- #: includes/class-mla-settings.php:2528
3739
  msgid "Markup for the beginning of each row."
3740
  msgstr ""
3741
 
3742
- #: includes/class-mla-settings.php:2534
3743
  msgid "Markup for each item/cell."
3744
  msgstr ""
3745
 
3746
- #: includes/class-mla-settings.php:2540
3747
  msgid "Markup for the end of each row."
3748
  msgstr ""
3749
 
3750
- #: includes/class-mla-settings.php:2556
3751
  msgid "Fill in a name and markup to add a new template."
3752
  msgstr ""
3753
 
3754
- #: includes/class-mla-settings.php:2692
3755
  msgid "Custom Field Mapping Progress"
3756
  msgstr ""
3757
 
3758
- #: includes/class-mla-settings.php:2693 includes/class-mla-settings.php:2829
3759
  msgid "DO NOT DO THE FOLLOWING (they will cause mapping to fail)"
3760
  msgstr ""
3761
 
3762
- #: includes/class-mla-settings.php:2694 includes/class-mla-settings.php:2830
3763
  msgid "Close the window"
3764
  msgstr ""
3765
 
3766
- #: includes/class-mla-settings.php:2695 includes/class-mla-settings.php:2831
3767
  msgid "Reload the page"
3768
  msgstr ""
3769
 
3770
- #: includes/class-mla-settings.php:2696 includes/class-mla-settings.php:2832
3771
  msgid "Click the browser&rsquo;s Stop, Back or forward buttons"
3772
  msgstr ""
3773
 
3774
- #: includes/class-mla-settings.php:2697 includes/class-mla-settings.php:2833
3775
  msgid "Progress"
3776
  msgstr ""
3777
 
3778
- #: includes/class-mla-settings.php:2699 includes/class-mla-settings.php:2835
3779
  msgid "Resume"
3780
  msgstr ""
3781
 
3782
- #: includes/class-mla-settings.php:2709 includes/class-mla-settings.php:2713
3783
  msgid "Custom Field and Attachment Metadata Processing Options"
3784
  msgstr ""
3785
 
3786
  #. translators: 1: Documentation hyperlink
3787
- #: includes/class-mla-settings.php:2711
3788
  #, php-format
3789
  msgid ""
3790
  "In this tab you can define the rules for mapping several types of image "
@@ -3794,32 +3932,32 @@ msgid ""
3794
  "field. See the %1$s section of the Documentation for details."
3795
  msgstr ""
3796
 
3797
- #: includes/class-mla-settings.php:2711
3798
  msgid "Updating Attachment Metadata Documentation"
3799
  msgstr ""
3800
 
3801
- #: includes/class-mla-settings.php:2711
3802
  msgid "Adding or changing Attachment Metadata"
3803
  msgstr ""
3804
 
3805
  #. translators: 1: Documentation hyperlink
3806
- #: includes/class-mla-settings.php:2713 includes/class-mla-settings.php:2848
3807
  #, php-format
3808
  msgid ""
3809
  "You can find more information about using the controls in this tab to define "
3810
  "mapping rules and apply them in the %1$s section of the Documentation."
3811
  msgstr ""
3812
 
3813
- #: includes/class-mla-settings.php:2713
3814
  msgid "Custom Field Options documentation"
3815
  msgstr ""
3816
 
3817
- #: includes/class-mla-settings.php:2717 includes/class-mla-settings.php:2858
3818
  msgid "Custom field mapping"
3819
  msgstr ""
3820
 
3821
  #. translators: 1: "Save Changes"
3822
- #: includes/class-mla-settings.php:2722
3823
  #, php-format
3824
  msgid ""
3825
  "Click %1$s to update the \"Enable custom field mapping...\" checkbox and/or "
@@ -3828,22 +3966,22 @@ msgid ""
3828
  msgstr ""
3829
 
3830
  #. translators: 1: "Map All Rules..."
3831
- #: includes/class-mla-settings.php:2724
3832
  #, php-format
3833
  msgid ""
3834
  "Click %1$s to apply all the rules at once (rule changes will be applied but "
3835
  "not saved)."
3836
  msgstr ""
3837
 
3838
- #: includes/class-mla-settings.php:2828
3839
  msgid "IPTC &amp; EXIF Mapping Progress"
3840
  msgstr ""
3841
 
3842
- #: includes/class-mla-settings.php:2845 includes/class-mla-settings.php:2848
3843
  msgid "IPTC &amp; EXIF Processing Options"
3844
  msgstr ""
3845
 
3846
- #: includes/class-mla-settings.php:2846
3847
  msgid ""
3848
  "In this tab you can define the rules for mapping IPTC (International Press "
3849
  "Telecommunications Council) and EXIF (EXchangeable Image File) metadata to "
@@ -3852,20 +3990,20 @@ msgid ""
3852
  "click \"Save Changes\" at the bottom of this page."
3853
  msgstr ""
3854
 
3855
- #: includes/class-mla-settings.php:2848
3856
  msgid "IPTC/EXIF Options documentation"
3857
  msgstr ""
3858
 
3859
- #: includes/class-mla-settings.php:2852
3860
  msgid "Standard field mapping"
3861
  msgstr ""
3862
 
3863
- #: includes/class-mla-settings.php:2855
3864
  msgid "Taxonomy term mapping"
3865
  msgstr ""
3866
 
3867
  #. translators: 1: "Save Changes"
3868
- #: includes/class-mla-settings.php:2863
3869
  #, php-format
3870
  msgid ""
3871
  "Click %1$s to update the \"Enable IPTC/EXIF mapping...\" checkbox and/or all "
@@ -3873,192 +4011,192 @@ msgid ""
3873
  "performed.</strong>"
3874
  msgstr ""
3875
 
3876
- #: includes/class-mla-settings.php:2934
3877
  msgid "Debug settings saved."
3878
  msgstr ""
3879
 
3880
  #. translators: 1: ERROR tag 2: file type 3: file name
3881
- #: includes/class-mla-settings.php:2979
3882
  #, php-format
3883
  msgid "%1$s: The %2$s file ( %3$s ) could not be reset."
3884
  msgstr ""
3885
 
3886
- #: includes/class-mla-settings.php:2979 includes/class-mla-settings.php:3009
3887
- #: includes/class-mla-settings.php:3021 includes/class-mla-settings.php:3028
3888
- #: includes/class-mla-settings.php:3032
3889
  msgid "Error Log"
3890
  msgstr ""
3891
 
3892
  #. translators: 1: ERROR tag 2: file type 3: file name 4: error message
3893
- #: includes/class-mla-settings.php:3009
3894
  #, php-format
3895
  msgid "%1$s: Reading the %2$s file ( %3$s ) \"%4$s\"."
3896
  msgstr ""
3897
 
3898
- #: includes/class-mla-settings.php:3028
3899
  msgid "Reset"
3900
  msgstr ""
3901
 
3902
- #: includes/class-mla-settings.php:3037 includes/class-mla-settings.php:3046
3903
  msgid "Debug Options"
3904
  msgstr ""
3905
 
3906
  #. translators: 1: "Save Changes"
3907
- #: includes/class-mla-settings.php:3046
3908
  #, php-format
3909
  msgid "Click %1$s to update the %2$s."
3910
  msgstr ""
3911
 
3912
- #: includes/class-mla-settings.php:3065
3913
  msgid "You do not have permission to manage plugin settings."
3914
  msgstr ""
3915
 
3916
- #: includes/class-mla-settings.php:3098
3917
  msgid "Cannot render content tab"
3918
  msgstr ""
3919
 
3920
- #: includes/class-mla-settings.php:3101
3921
  msgid "Unknown content tab"
3922
  msgstr ""
3923
 
3924
  #. translators: 1: template type 2: template name
3925
- #: includes/class-mla-settings.php:3193 includes/class-mla-settings.php:3282
3926
  #, php-format
3927
  msgctxt "message_list"
3928
  msgid "Deleting %1$s \"%2$s\"."
3929
  msgstr ""
3930
 
3931
  #. translators: 1: ERROR tag 2: template name 3: template type
3932
- #: includes/class-mla-settings.php:3204 includes/class-mla-settings.php:3295
3933
  #, php-format
3934
  msgid "%1$s: Reserved name \"%2$s\", new %3$s discarded."
3935
  msgstr ""
3936
 
3937
  #. translators: 1: ERROR tag 2: template name 3: template type
3938
- #: includes/class-mla-settings.php:3210 includes/class-mla-settings.php:3301
3939
  #, php-format
3940
  msgid "%1$s: Duplicate name \"%2$s\", new %3$s discarded."
3941
  msgstr ""
3942
 
3943
  #. translators: 1: template type 2: template name
3944
- #: includes/class-mla-settings.php:3214 includes/class-mla-settings.php:3305
3945
  #, php-format
3946
  msgctxt "message_list"
3947
  msgid "Adding new %1$s \"%2$s\"."
3948
  msgstr ""
3949
 
3950
  #. translators: 1: ERROR tag 2: element name 3: old value
3951
- #: includes/class-mla-settings.php:3224 includes/class-mla-settings.php:3315
3952
  #, php-format
3953
  msgid "%1$s: Blank %2$s, reverting to \"%3$s\"."
3954
  msgstr ""
3955
 
3956
- #: includes/class-mla-settings.php:3224 includes/class-mla-settings.php:3231
3957
- #: includes/class-mla-settings.php:3235
3958
  msgid "style template name"
3959
  msgstr ""
3960
 
3961
  #. translators: 1: ERROR tag 2: element name 3: new value 4: old value
3962
- #: includes/class-mla-settings.php:3231 includes/class-mla-settings.php:3322
3963
  #, php-format
3964
  msgid "%1$s: Duplicate new %2$s \"%3$s\", reverting to \"%4$s\"."
3965
  msgstr ""
3966
 
3967
  #. translators: 1: element name 2: old_value 3: new_value
3968
- #: includes/class-mla-settings.php:3235 includes/class-mla-settings.php:3326
3969
  #, php-format
3970
  msgctxt "message_list"
3971
  msgid "Changing %1$s from \"%2$s\" to \"%3$s\""
3972
  msgstr ""
3973
 
3974
  #. translators: 1: template type 2: template name
3975
- #: includes/class-mla-settings.php:3242
3976
  #, php-format
3977
  msgctxt "message_list"
3978
  msgid "Updating contents of %1$s \"%2$s\"."
3979
  msgstr ""
3980
 
3981
  #. translators: 1: ERROR tag 2: template type
3982
- #: includes/class-mla-settings.php:3253 includes/class-mla-settings.php:3374
3983
  #, php-format
3984
  msgid "%1$s: Update of %2$s failed."
3985
  msgstr ""
3986
 
3987
- #: includes/class-mla-settings.php:3315 includes/class-mla-settings.php:3322
3988
- #: includes/class-mla-settings.php:3326
3989
  msgid "markup template name"
3990
  msgstr ""
3991
 
3992
  #. translators: 1: template name
3993
- #: includes/class-mla-settings.php:3334
3994
  #, php-format
3995
  msgctxt "message_list"
3996
  msgid "Updating open markup for \"%1$s\"."
3997
  msgstr ""
3998
 
3999
  #. translators: 1: template name
4000
- #: includes/class-mla-settings.php:3340
4001
  #, php-format
4002
  msgctxt "message_list"
4003
  msgid "Updating row open markup for \"%1$s\"."
4004
  msgstr ""
4005
 
4006
  #. translators: 1: template name
4007
- #: includes/class-mla-settings.php:3346
4008
  #, php-format
4009
  msgctxt "message_list"
4010
  msgid "Updating item markup for \"%1$s\"."
4011
  msgstr ""
4012
 
4013
  #. translators: 1: template name
4014
- #: includes/class-mla-settings.php:3352
4015
  #, php-format
4016
  msgctxt "message_list"
4017
  msgid "Updating row close markup for \"%1$s\"."
4018
  msgstr ""
4019
 
4020
  #. translators: 1: template name
4021
- #: includes/class-mla-settings.php:3358
4022
  #, php-format
4023
  msgctxt "message_list"
4024
  msgid "Updating close markup for \"%1$s\"."
4025
  msgstr ""
4026
 
4027
  #. translators: 1: field type
4028
- #: includes/class-mla-settings.php:3383
4029
  #, php-format
4030
  msgid "%1$s no changes detected."
4031
  msgstr ""
4032
 
4033
- #: includes/class-mla-settings.php:3418
4034
  msgid "View settings saved."
4035
  msgstr ""
4036
 
4037
- #: includes/class-mla-settings.php:3452
4038
  msgid "Upload MIME Type settings saved."
4039
  msgstr ""
4040
 
4041
- #: includes/class-mla-settings.php:3495
4042
  msgid "No custom field mapping rules to process."
4043
  msgstr ""
4044
 
4045
  #. translators: 1: field type 2: examined count 3: updated count
4046
- #: includes/class-mla-settings.php:3525 includes/class-mla-settings.php:3664
4047
- #: includes/class-mla-settings.php:3735 includes/class-mla-settings.php:3821
4048
  #, php-format
4049
  msgid "%1$s mapping completed; %2$d attachment(s) examined, %3$d updated."
4050
  msgstr ""
4051
 
4052
  #. translators: 1: field type 2: examined count
4053
- #: includes/class-mla-settings.php:3528 includes/class-mla-settings.php:3667
4054
- #: includes/class-mla-settings.php:3738 includes/class-mla-settings.php:3824
4055
  #, php-format
4056
  msgid ""
4057
  "%1$s mapping completed; %2$d attachment(s) examined, no changes detected."
4058
  msgstr ""
4059
 
4060
  #. translators: 1: number of attachments
4061
- #: includes/class-mla-settings.php:3559
4062
  #, php-format
4063
  msgid "%s attachment"
4064
  msgid_plural "%s attachments"
@@ -4066,160 +4204,153 @@ msgstr[0] ""
4066
  msgstr[1] ""
4067
 
4068
  #. translators: 1: singular/plural number of attachments
4069
- #: includes/class-mla-settings.php:3561
4070
  #, php-format
4071
  msgid "Deleted custom field value from %1$s."
4072
  msgstr ""
4073
 
4074
- #: includes/class-mla-settings.php:3564
4075
  msgid "No attachments contained this custom field."
4076
  msgstr ""
4077
 
4078
  #. translators: 1: ERROR tag 2: field type
4079
- #: includes/class-mla-settings.php:3625 includes/class-mla-settings.php:3696
4080
- #: includes/class-mla-settings.php:3782
4081
  #, php-format
4082
  msgid "%1$s: No %2$s settings to process."
4083
  msgstr ""
4084
 
4085
- #: includes/class-mla-settings.php:3655 includes/class-mla-settings.php:3726
4086
- #: includes/class-mla-settings.php:3812
4087
  msgid "updated."
4088
  msgstr ""
4089
 
4090
  #. translators: 1: reference type, e.g., Gallery in
4091
- #: includes/class-mla-settings.php:3917 includes/class-mla-settings.php:3927
4092
  #, php-format
4093
  msgctxt "message_list"
4094
  msgid "%1$s - references updated."
4095
  msgstr ""
4096
 
4097
- #: includes/class-mla-settings.php:3970
4098
  msgid "General settings saved."
4099
  msgstr ""
4100
 
4101
- #. translators: 1: option name
4102
- #: includes/class-mla-settings.php:4001
4103
- #, php-format
4104
- msgctxt "message_list"
4105
- msgid "delete_option \"%1$s\""
4106
- msgstr ""
4107
-
4108
- #: includes/class-mla-settings.php:4009
4109
  msgid "General settings reset to default values."
4110
  msgstr ""
4111
 
4112
- #: includes/class-mla-settings.php:4051
4113
  msgid "select settings"
4114
  msgstr ""
4115
 
4116
- #: includes/class-mla-settings.php:4071
4117
  msgid "Import ALL Settings"
4118
  msgstr ""
4119
 
4120
- #: includes/class-mla-settings.php:4096
4121
  msgctxt "message_list"
4122
  msgid "exported"
4123
  msgstr ""
4124
 
4125
- #: includes/class-mla-settings.php:4098
4126
  msgctxt "message_list"
4127
  msgid "skipped"
4128
  msgstr ""
4129
 
4130
- #: includes/class-mla-settings.php:4105
4131
  msgid "ALL settings exported."
4132
  msgstr ""
4133
 
4134
  #. translators: 1: ERROR tag 2: backup directory name
4135
- #: includes/class-mla-settings.php:4116
4136
  #, php-format
4137
  msgid "%1$s: The settings directory ( %2$s ) cannot be created."
4138
  msgstr ""
4139
 
4140
  #. translators: 1: ERROR tag 2: backup directory name
4141
- #: includes/class-mla-settings.php:4120
4142
  #, php-format
4143
  msgid "%1$s: The settings directory ( %2$s ) is not writable."
4144
  msgstr ""
4145
 
4146
  #. translators: 1: ERROR tag 2: backup file name
4147
- #: includes/class-mla-settings.php:4131
4148
  #, php-format
4149
  msgid "%1$s: The settings file ( %2$s ) could not be opened."
4150
  msgstr ""
4151
 
4152
  #. translators: 1: ERROR tag 2: PHP error information
4153
- #: includes/class-mla-settings.php:4138
4154
  #, php-format
4155
  msgctxt "error_log"
4156
  msgid "%1$s: _export_settings $error_info = \"%2$s\"."
4157
  msgstr ""
4158
 
4159
  #. translators: 1: ERROR tag 2: backup file name 3: error message
4160
- #: includes/class-mla-settings.php:4147
4161
  #, php-format
4162
  msgid "%1$s: Writing the settings file ( %2$s ) \"%3$s\"."
4163
  msgstr ""
4164
 
4165
  #. translators: 1: number of option settings
4166
- #: includes/class-mla-settings.php:4153
4167
  #, php-format
4168
  msgid "Settings exported; %1$s settings recorded."
4169
  msgstr ""
4170
 
4171
- #: includes/class-mla-settings.php:4171
4172
  msgid "No settings imported."
4173
  msgstr ""
4174
 
4175
- #: includes/class-mla-settings.php:4180
4176
  msgid "Please select an import settings file from the dropdown list."
4177
  msgstr ""
4178
 
4179
- #: includes/class-mla-settings.php:4184
4180
  msgid "The import settings dropdown selection is missing."
4181
  msgstr ""
4182
 
4183
  #. translators: 1: ERROR tag 2: PHP error information
4184
- #: includes/class-mla-settings.php:4192
4185
  #, php-format
4186
  msgctxt "error_log"
4187
  msgid "%1$s: _import_settings $error_info = \"%2$s\"."
4188
  msgstr ""
4189
 
4190
  #. translators: 1: ERROR tag 2: backup file name 3: error message
4191
- #: includes/class-mla-settings.php:4201
4192
  #, php-format
4193
  msgid "%1$s: Reading the settings file ( %2$s ) \"%3$s\"."
4194
  msgstr ""
4195
 
4196
- #: includes/class-mla-settings.php:4211
4197
  msgctxt "message_list"
4198
  msgid "updated"
4199
  msgstr ""
4200
 
4201
- #: includes/class-mla-settings.php:4214
4202
  msgctxt "message_list"
4203
  msgid "unchanged"
4204
  msgstr ""
4205
 
4206
  #. translators: 1: number of option settings updated 2: number of option settings unchanged
4207
- #: includes/class-mla-settings.php:4219
4208
  #, php-format
4209
  msgid "Settings imported; %1$s updated, %2$s unchanged."
4210
  msgstr ""
4211
 
4212
  #: includes/class-mla-shortcodes.php:334
4213
- #: includes/class-mla-shortcodes.php:1441
4214
- #: includes/class-mla-shortcodes.php:2348
4215
- #: includes/class-mla-shortcodes.php:2635
4216
  msgid "Previous"
4217
  msgstr ""
4218
 
4219
  #: includes/class-mla-shortcodes.php:335
4220
- #: includes/class-mla-shortcodes.php:1442
4221
- #: includes/class-mla-shortcodes.php:2397
4222
- #: includes/class-mla-shortcodes.php:2641
4223
  msgid "Next"
4224
  msgstr ""
4225
 
@@ -4227,95 +4358,95 @@ msgstr ""
4227
  msgid "mla_debug empty gallery"
4228
  msgstr ""
4229
 
4230
- #: includes/class-mla-shortcodes.php:506
4231
  msgid ""
4232
  "<strong>Photonic-enhanced [mla_gallery]</strong> type must be "
4233
  "<strong>default</strong>, query = "
4234
  msgstr ""
4235
 
4236
- #: includes/class-mla-shortcodes.php:854
4237
  msgid "unknown"
4238
  msgstr ""
4239
 
4240
- #: includes/class-mla-shortcodes.php:1574
4241
  msgid "mla_debug attributes"
4242
  msgstr ""
4243
 
4244
- #: includes/class-mla-shortcodes.php:1575
4245
  msgid "mla_debug arguments"
4246
  msgstr ""
4247
 
4248
- #: includes/class-mla-shortcodes.php:1667
4249
  msgid "mla_debug empty cloud"
4250
  msgstr ""
4251
 
4252
- #: includes/class-mla-shortcodes.php:3016
4253
- #: includes/class-mla-shortcodes.php:3344
4254
- #: includes/class-mla-shortcodes.php:3375
4255
  msgid "Invalid mla_gallery"
4256
  msgstr ""
4257
 
4258
- #: includes/class-mla-shortcodes.php:3623
4259
  msgid "mla_debug query"
4260
  msgstr ""
4261
 
4262
- #: includes/class-mla-shortcodes.php:3624
4263
  msgid "mla_debug request"
4264
  msgstr ""
4265
 
4266
- #: includes/class-mla-shortcodes.php:3625
4267
  msgid "mla_debug query_vars"
4268
  msgstr ""
4269
 
4270
- #: includes/class-mla-shortcodes.php:3626
4271
  msgid "mla_debug post_count"
4272
  msgstr ""
4273
 
4274
- #: includes/class-mla-shortcodes.php:3694
4275
  msgid "mla_debug WHERE filter"
4276
  msgstr ""
4277
 
4278
- #: includes/class-mla-shortcodes.php:3713
4279
  msgid "mla_debug modified WHERE filter"
4280
  msgstr ""
4281
 
4282
- #: includes/class-mla-shortcodes.php:3736
4283
  msgid "mla_debug ORDER BY filter, incoming"
4284
  msgstr ""
4285
 
4286
- #: includes/class-mla-shortcodes.php:3736
4287
  msgid "Replacement ORDER BY clause"
4288
  msgstr ""
4289
 
4290
- #: includes/class-mla-shortcodes.php:3759
4291
  msgid "mla_debug posts_clauses filter"
4292
  msgstr ""
4293
 
4294
- #: includes/class-mla-shortcodes.php:3777
4295
  msgid "mla_debug posts_clauses_request filter"
4296
  msgstr ""
4297
 
4298
- #: includes/class-mla-shortcodes.php:3967
4299
  msgid "Invalid taxonomy"
4300
  msgstr ""
4301
 
4302
- #: includes/class-mla-shortcodes.php:4173
4303
  msgid "mla_debug query arguments"
4304
  msgstr ""
4305
 
4306
- #: includes/class-mla-shortcodes.php:4174
4307
  msgid "mla_debug last_query"
4308
  msgstr ""
4309
 
4310
- #: includes/class-mla-shortcodes.php:4175
4311
  msgid "mla_debug last_error"
4312
  msgstr ""
4313
 
4314
- #: includes/class-mla-shortcodes.php:4176
4315
  msgid "mla_debug num_rows"
4316
  msgstr ""
4317
 
4318
- #: includes/class-mla-shortcodes.php:4177
4319
  msgid "mla_debug found_rows"
4320
  msgstr ""
4321
 
@@ -4414,6 +4545,30 @@ msgctxt "list_table_column"
4414
  msgid "Order"
4415
  msgstr ""
4416
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4417
  #: includes/mla-main-search-box-template.php:34
4418
  #: includes/mla-main-search-box-template.php:36
4419
  #: includes/mla-media-modal-js-template.php:17
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Media Library Assistant\n"
4
+ "POT-Creation-Date: 2015-06-06 20:01-0800\n"
5
+ "PO-Revision-Date: 2015-06-06 20:01-0800\n"
6
  "Last-Translator: David Lingren <david@fairtradejudaica.org>\n"
7
  "Language-Team: David Lingren <david@fairtradejudaica.org>\n"
8
  "Language: en_US\n"
33
  #: includes/class-mla-data.php:389 includes/class-mla-data.php:492
34
  #: includes/class-mla-data.php:648 includes/class-mla-data.php:711
35
  #: includes/class-mla-data.php:1266 includes/class-mla-data.php:1528
36
+ #: includes/class-mla-data.php:2692 includes/class-mla-data.php:2698
37
+ #: includes/class-mla-data.php:4046 includes/class-mla-data.php:4049
38
+ #: includes/class-mla-data.php:5052 includes/class-mla-data.php:5079
39
+ #: includes/class-mla-data.php:5399 includes/class-mla-data.php:5412
40
+ #: includes/class-mla-data.php:5434 includes/class-mla-data.php:5623
41
+ #: includes/class-mla-data.php:5664 includes/class-mla-data.php:5696
42
+ #: includes/class-mla-data.php:5712 includes/class-mla-data.php:5891
43
+ #: includes/class-mla-edit-media.php:316 includes/class-mla-edit-media.php:682
44
+ #: includes/class-mla-main.php:636 includes/class-mla-main.php:765
45
+ #: includes/class-mla-main.php:1081 includes/class-mla-main.php:1134
46
+ #: includes/class-mla-main.php:1159 includes/class-mla-main.php:1252
47
+ #: includes/class-mla-main.php:1311 includes/class-mla-main.php:1402
48
+ #: includes/class-mla-main.php:1433 includes/class-mla-main.php:1660
49
+ #: includes/class-mla-main.php:1667 includes/class-mla-main.php:1671
50
+ #: includes/class-mla-main.php:1745 includes/class-mla-main.php:1752
51
+ #: includes/class-mla-main.php:1896 includes/class-mla-main.php:1971
52
+ #: includes/class-mla-main.php:2218 includes/class-mla-main.php:2226
53
+ #: includes/class-mla-main.php:2250 includes/class-mla-main.php:2258
54
+ #: includes/class-mla-main.php:2290 includes/class-mla-main.php:2298
55
+ #: includes/class-mla-media-modal.php:1219
 
56
  #: includes/class-mla-mime-types.php:483 includes/class-mla-mime-types.php:906
57
  #: includes/class-mla-mime-types.php:912 includes/class-mla-mime-types.php:916
58
  #: includes/class-mla-mime-types.php:961
59
  #: includes/class-mla-mime-types.php:1049
60
  #: includes/class-mla-mime-types.php:1195
61
  #: includes/class-mla-mime-types.php:1218
62
+ #: includes/class-mla-mime-types.php:1960
63
+ #: includes/class-mla-mime-types.php:1971
64
+ #: includes/class-mla-mime-types.php:1984
65
+ #: includes/class-mla-mime-types.php:1992
66
+ #: includes/class-mla-mime-types.php:1997
67
+ #: includes/class-mla-mime-types.php:2040
68
+ #: includes/class-mla-mime-types.php:2059
69
+ #: includes/class-mla-mime-types.php:2110
70
+ #: includes/class-mla-mime-types.php:2144
71
+ #: includes/class-mla-mime-types.php:2229
72
+ #: includes/class-mla-mime-types.php:2308
73
+ #: includes/class-mla-mime-types.php:2317
74
+ #: includes/class-mla-mime-types.php:2349 includes/class-mla-objects.php:201
75
+ #: includes/class-mla-options.php:1710 includes/class-mla-options.php:1887
76
+ #: includes/class-mla-options.php:1963 includes/class-mla-options.php:3297
77
+ #: includes/class-mla-options.php:3737 includes/class-mla-options.php:3750
78
+ #: includes/class-mla-options.php:3754 includes/class-mla-options.php:4290
79
+ #: includes/class-mla-options.php:4512 includes/class-mla-options.php:4951
80
+ #: includes/class-mla-options.php:4995 includes/class-mla-options.php:5003
81
+ #: includes/class-mla-options.php:5020 includes/class-mla-options.php:5030
82
+ #: includes/class-mla-options.php:5040 includes/class-mla-options.php:5048
83
+ #: includes/class-mla-options.php:5052 includes/class-mla-settings.php:560
84
+ #: includes/class-mla-settings.php:624 includes/class-mla-settings.php:638
85
+ #: includes/class-mla-settings.php:667 includes/class-mla-settings.php:678
86
+ #: includes/class-mla-settings.php:768 includes/class-mla-settings.php:902
87
+ #: includes/class-mla-settings.php:1009 includes/class-mla-settings.php:1042
88
+ #: includes/class-mla-settings.php:1181 includes/class-mla-settings.php:1544
89
+ #: includes/class-mla-settings.php:1576 includes/class-mla-settings.php:1653
90
+ #: includes/class-mla-settings.php:1990 includes/class-mla-settings.php:2041
91
+ #: includes/class-mla-settings.php:2120 includes/class-mla-settings.php:2674
92
+ #: includes/class-mla-settings.php:2816 includes/class-mla-settings.php:2988
93
+ #: includes/class-mla-settings.php:3018 includes/class-mla-settings.php:3073
94
+ #: includes/class-mla-settings.php:3108 includes/class-mla-settings.php:3111
95
+ #: includes/class-mla-settings.php:3115 includes/class-mla-settings.php:3214
96
+ #: includes/class-mla-settings.php:3220 includes/class-mla-settings.php:3234
97
+ #: includes/class-mla-settings.php:3241 includes/class-mla-settings.php:3263
98
+ #: includes/class-mla-settings.php:3305 includes/class-mla-settings.php:3311
99
+ #: includes/class-mla-settings.php:3325 includes/class-mla-settings.php:3332
100
+ #: includes/class-mla-settings.php:3384 includes/class-mla-settings.php:3505
101
+ #: includes/class-mla-settings.php:3635 includes/class-mla-settings.php:3706
102
+ #: includes/class-mla-settings.php:3792 includes/class-mla-settings.php:4126
103
+ #: includes/class-mla-settings.php:4130 includes/class-mla-settings.php:4141
104
+ #: includes/class-mla-settings.php:4148 includes/class-mla-settings.php:4157
105
+ #: includes/class-mla-settings.php:4194 includes/class-mla-settings.php:4202
106
+ #: includes/class-mla-settings.php:4211 includes/class-mla-shortcodes.php:1658
107
+ #: includes/class-mla-shortcodes.php:1732
108
+ #: includes/class-mla-shortcodes.php:3023
109
+ #: includes/class-mla-shortcodes.php:3351
110
+ #: includes/class-mla-shortcodes.php:3382
111
  msgid "ERROR"
112
  msgstr ""
113
 
211
  msgstr ""
212
 
213
  #. translators: 1: ERROR tag 2: function name 3: non-array value
214
+ #: includes/class-mla-data.php:1528 includes/class-mla-edit-media.php:316
215
+ #: includes/class-mla-main.php:1896 includes/class-mla-main.php:1971
216
+ #: includes/class-mla-media-modal.php:1219
217
  #: includes/class-mla-mime-types.php:483
218
  #: includes/class-mla-mime-types.php:1218
219
+ #: includes/class-mla-mime-types.php:2349 includes/class-mla-settings.php:1544
220
+ #: includes/class-mla-settings.php:1990
221
  #, php-format
222
  msgctxt "error_log"
223
  msgid "%1$s: %2$s non-array \"%3$s\""
232
  #: includes/class-mla-data.php:1967 includes/class-mla-data.php:1970
233
  #: includes/class-mla-data.php:1987 includes/class-mla-data.php:1989
234
  #: includes/class-mla-data.php:1992 includes/class-mla-data.php:1994
235
+ #: includes/class-mla-data.php:2367 includes/class-mla-data.php:2370
236
+ #: includes/class-mla-data.php:2436 includes/class-mla-data.php:2439
237
+ #: includes/class-mla-data.php:2490 includes/class-mla-data.php:2493
238
+ #: includes/class-mla-data.php:2592 includes/class-mla-data.php:2595
239
+ #: includes/class-mla-data.php:2631 includes/class-mla-data.php:2634
240
+ #: includes/class-mla-data.php:2655 includes/class-mla-data.php:2658
241
  msgid "DEBUG"
242
  msgstr ""
243
 
275
  msgstr ""
276
 
277
  #. translators: 1: DEBUG tag 2: search filter details
278
+ #: includes/class-mla-data.php:2367
279
  #, php-format
280
  msgid "%1$s: mla_query_posts_search_filter = \"%2$s\"."
281
  msgstr ""
282
 
283
  #. translators: 1: DEBUG tag 2: search filter details
284
+ #: includes/class-mla-data.php:2370
285
  #, php-format
286
  msgctxt "error_log"
287
  msgid "%1$s: mla_query_posts_search_filter = \"%2$s\"."
288
  msgstr ""
289
 
290
  #. translators: 1: DEBUG tag 2: where filter details
291
+ #: includes/class-mla-data.php:2436
292
  #, php-format
293
  msgid "%1$s: mla_query_posts_where_filter = \"%2$s\"."
294
  msgstr ""
295
 
296
  #. translators: 1: DEBUG tag 2: where filter details
297
+ #: includes/class-mla-data.php:2439
298
  #, php-format
299
  msgctxt "error_log"
300
  msgid "%1$s: mla_query_posts_where_filter = \"%2$s\"."
301
  msgstr ""
302
 
303
  #. translators: 1: DEBUG tag 2: join filter details
304
+ #: includes/class-mla-data.php:2490
305
  #, php-format
306
  msgid "%1$s: mla_query_posts_join_filter = \"%2$s\"."
307
  msgstr ""
308
 
309
  #. translators: 1: DEBUG tag 2: join filter details
310
+ #: includes/class-mla-data.php:2493
311
  #, php-format
312
  msgctxt "error_log"
313
  msgid "%1$s: mla_query_posts_join_filter = \"%2$s\"."
314
  msgstr ""
315
 
316
  #. translators: 1: DEBUG tag 2: orderby details details
317
+ #: includes/class-mla-data.php:2592
318
  #, php-format
319
  msgid "%1$s: mla_query_posts_orderby_filter = \"%2$s\"."
320
  msgstr ""
321
 
322
  #. translators: 1: DEBUG tag 2: orderby details details
323
+ #: includes/class-mla-data.php:2595
324
  #, php-format
325
  msgctxt "error_log"
326
  msgid "%1$s: mla_query_posts_orderby_filter = \"%2$s\"."
327
  msgstr ""
328
 
329
  #. translators: 1: DEBUG tag 2: SQL clauses
330
+ #: includes/class-mla-data.php:2631
331
  #, php-format
332
  msgid "%1$s: mla_query_posts_clauses_filter = \"%2$s\"."
333
  msgstr ""
334
 
335
  #. translators: 1: DEBUG tag 2: SQL clauses
336
+ #: includes/class-mla-data.php:2634
337
  #, php-format
338
  msgctxt "error_log"
339
  msgid "%1$s: mla_query_posts_clauses_filter = \"%2$s\"."
340
  msgstr ""
341
 
342
  #. translators: 1: DEBUG tag 2: SQL clauses
343
+ #: includes/class-mla-data.php:2655
344
  #, php-format
345
  msgid "%1$s: mla_query_posts_clauses_request_filter = \"%2$s\"."
346
  msgstr ""
347
 
348
  #. translators: 1: DEBUG tag 2: SQL clauses
349
+ #: includes/class-mla-data.php:2658
350
  #, php-format
351
  msgctxt "error_log"
352
  msgid "%1$s: mla_query_posts_clauses_request_filter = \"%2$s\"."
353
  msgstr ""
354
 
355
  #. translators: 1: ERROR tag 2: post ID
356
+ #: includes/class-mla-data.php:2692
357
  #, php-format
358
  msgctxt "error_log"
359
  msgid "%1$s: mla_get_attachment_by_id(%2$d) not found."
360
  msgstr ""
361
 
362
  #. translators: 1: ERROR tag 2: post ID 3: post_type
363
+ #: includes/class-mla-data.php:2698
364
  #, php-format
365
  msgctxt "error_log"
366
  msgid "%1$s: mla_get_attachment_by_id(%2$d) wrong post_type \"%3$s\"."
367
  msgstr ""
368
 
369
+ #: includes/class-mla-data.php:3313 includes/class-mla-data.php:3657
370
+ #: includes/class-mla-list-table.php:929
371
  msgid "NO REFERENCE TESTS"
372
  msgstr ""
373
 
374
+ #: includes/class-mla-data.php:3319 includes/class-mla-data.php:3663
375
+ #: includes/class-mla-options.php:2838 includes/class-mla-options.php:2839
376
  msgid "ORPHAN"
377
  msgstr ""
378
 
379
+ #: includes/class-mla-data.php:3323 includes/class-mla-data.php:3667
380
  msgid "UNUSED"
381
  msgstr ""
382
 
383
+ #: includes/class-mla-data.php:3328 includes/class-mla-data.php:3672
384
  msgid "UNATTACHED"
385
  msgstr ""
386
 
387
+ #: includes/class-mla-data.php:3330 includes/class-mla-data.php:3674
388
  msgid "INVALID PARENT"
389
  msgstr ""
390
 
391
  #. translators: 1: post_type, 2: post_title, 3: post ID, 4: query string, 5: error message
392
+ #: includes/class-mla-data.php:3855
393
  #, php-format
394
  msgid "(%1$s) %2$s (ID %3$d) query \"%4$s\" failed, returning \"%5$s\""
395
  msgstr ""
396
 
397
+ #: includes/class-mla-data.php:4046
398
  msgctxt "error_log"
399
  msgid "mla_parse_xmp_metadata xml_parse_into_struct failed."
400
  msgstr ""
401
 
402
+ #: includes/class-mla-data.php:4049
403
  msgctxt "error_log"
404
  msgid "mla_parse_xmp_metadata set option failed."
405
  msgstr ""
406
 
407
+ #: includes/class-mla-data.php:5136 includes/class-mla-settings.php:1777
408
  #: includes/class-mla-view-list-table.php:377
409
  #: includes/class-mla-view-list-table.php:393
410
  msgid "Yes"
411
  msgstr ""
412
 
413
+ #: includes/class-mla-data.php:5138 includes/class-mla-list-table.php:282
414
+ #: includes/class-mla-settings.php:1776
415
  #: includes/class-mla-view-list-table.php:379
416
  #: includes/class-mla-view-list-table.php:395
417
  msgid "No"
418
  msgstr ""
419
 
420
  #. translators: 1: meta_key
421
+ #: includes/class-mla-data.php:5396 includes/class-mla-data.php:5494
422
  #, php-format
423
  msgid "Deleting %1$s"
424
  msgstr ""
425
 
426
  #. translators: 1: ERROR tag 2: meta_key
427
+ #: includes/class-mla-data.php:5399
428
  #, php-format
429
  msgid "%1$s: meta:%2$s not found"
430
  msgstr ""
432
  #. translators: 1: meta_key 2: meta_value
433
  #. translators: 1: meta_key 2: new_value
434
  #. translators: 1: meta_key 2: meta_value
435
+ #: includes/class-mla-data.php:5408 includes/class-mla-data.php:5505
436
+ #: includes/class-mla-data.php:5511
437
  #, php-format
438
  msgid "Adding %1$s = %2$s"
439
  msgstr ""
440
 
441
  #. translators: 1: ERROR tag 2: meta_key
442
+ #: includes/class-mla-data.php:5412
443
  #, php-format
444
  msgid "%1$s: Adding meta:%2$s; not found"
445
  msgstr ""
446
 
447
  #. translators: 1: meta_key
448
+ #: includes/class-mla-data.php:5419
449
  #, php-format
450
  msgid "Deleting Null meta:%1$s"
451
  msgstr ""
452
 
453
  #. translators: 1: element name 2: old_value 3: new_value
454
+ #: includes/class-mla-data.php:5429 includes/class-mla-data.php:5580
455
+ #: includes/class-mla-data.php:5641 includes/class-mla-data.php:5667
456
+ #: includes/class-mla-data.php:5709 includes/class-mla-data.php:5722
457
+ #: includes/class-mla-data.php:5731 includes/class-mla-data.php:5742
458
+ #: includes/class-mla-data.php:5753 includes/class-mla-data.php:5766
459
+ #: includes/class-mla-data.php:5775 includes/class-mla-data.php:5784
460
  #: includes/class-mla-mime-types.php:1052
461
+ #: includes/class-mla-mime-types.php:2113
462
  #, php-format
463
  msgid "Changing %1$s from \"%2$s\" to \"%3$s\""
464
  msgstr ""
465
 
466
  #. translators: 1: ERROR tag 2: meta_key
467
+ #: includes/class-mla-data.php:5434
468
  #, php-format
469
  msgid "%1$s: Changing meta:%2$s; not found"
470
  msgstr ""
471
 
472
  #. translators: 1: meta_key
473
+ #: includes/class-mla-data.php:5535
474
  #, php-format
475
  msgid "Deleting old %1$s values"
476
  msgstr ""
477
 
478
  #. translators: 1: meta_key 2: old_value 3: new_value 4: update count
479
+ #: includes/class-mla-data.php:5565
480
  #, php-format
481
  msgid "Changing %1$s from \"%2$s\" to \"%3$s\"; %4$d updates"
482
  msgstr ""
483
 
484
+ #: includes/class-mla-data.php:5623
485
  msgid "Could not retrieve Attachment."
486
  msgstr ""
487
 
488
+ #: includes/class-mla-data.php:5641 includes/class-mla-edit-media.php:424
489
+ #: includes/class-mla-main.php:1602 includes/class-mla-main.php:1910
490
+ #: includes/class-mla-main.php:2100 includes/class-mla-objects.php:278
491
+ #: includes/class-mla-options.php:1077 includes/class-mla-options.php:1917
 
492
  #: includes/mla-main-search-box-template.php:42
493
  #: includes/mla-media-modal-js-template.php:32
494
  msgid "Title"
495
  msgstr ""
496
 
497
  #. translators: 1: ERROR tag 2: old_value
498
+ #: includes/class-mla-data.php:5664
499
  #, php-format
500
  msgid "%1$s: Could not change Name/Slug \"%2$s\"; name already exists"
501
  msgstr ""
502
 
503
+ #: includes/class-mla-data.php:5667 includes/class-mla-edit-media.php:425
504
+ #: includes/class-mla-main.php:2101 includes/class-mla-options.php:1084
 
505
  msgid "Name/Slug"
506
  msgstr ""
507
 
508
  #. translators: 1: old_value
509
+ #: includes/class-mla-data.php:5693
510
  #, php-format
511
  msgid "Deleting ALT Text, was \"%1$s\""
512
  msgstr ""
513
 
514
  #. translators: 1: ERROR tag 2: old_value
515
+ #: includes/class-mla-data.php:5696
516
  #, php-format
517
  msgid "%1$s: Could not delete ALT Text, remains \"%2$s\""
518
  msgstr ""
519
 
520
+ #: includes/class-mla-data.php:5709 includes/class-mla-edit-media.php:428
521
+ #: includes/class-mla-list-table.php:1219 includes/class-mla-main.php:2104
522
+ #: includes/class-mla-options.php:1091 includes/class-mla-options.php:1923
 
523
  #: includes/mla-main-search-box-template.php:44
524
  #: includes/mla-media-modal-js-template.php:40
525
  msgid "ALT Text"
526
  msgstr ""
527
 
528
  #. translators: 1: ERROR tag 2: old_value 3: new_value
529
+ #: includes/class-mla-data.php:5712
530
  #, php-format
531
  msgid "%1$s: Could not change ALT Text from \"%2$s\" to \"%3$s\""
532
  msgstr ""
533
 
534
+ #: includes/class-mla-data.php:5722 includes/class-mla-edit-media.php:426
535
+ #: includes/class-mla-main.php:2102 includes/class-mla-options.php:1098
536
+ #: includes/class-mla-options.php:1926
537
  #: includes/mla-main-search-box-template.php:45
538
  #: includes/mla-media-modal-js-template.php:45
539
  msgid "Caption"
540
  msgstr ""
541
 
542
+ #: includes/class-mla-data.php:5731 includes/class-mla-edit-media.php:427
543
+ #: includes/class-mla-main.php:2103 includes/class-mla-options.php:1105
544
+ #: includes/class-mla-options.php:1929 includes/class-mla-settings.php:1510
545
+ #: includes/class-mla-settings.php:1767 includes/class-mla-settings.php:1865
546
+ #: includes/class-mla-settings.php:2229
547
  #: includes/mla-main-search-box-template.php:46
548
  #: includes/mla-media-modal-js-template.php:49
549
  msgid "Description"
550
  msgstr ""
551
 
552
+ #: includes/class-mla-data.php:5742 includes/class-mla-list-table.php:903
553
+ #: includes/class-mla-list-table.php:995 includes/class-mla-options.php:4460
554
+ #: includes/class-mla-options.php:4807
555
  msgid "Parent"
556
  msgstr ""
557
 
558
+ #: includes/class-mla-data.php:5753 includes/class-mla-edit-media.php:616
559
+ #: includes/class-mla-edit-media.php:769 includes/class-mla-main.php:2107
560
+ #: includes/class-mla-settings.php:1508 includes/class-mla-settings.php:1765
 
561
  msgid "Menu Order"
562
  msgstr ""
563
 
564
+ #: includes/class-mla-data.php:5766 includes/class-mla-edit-media.php:395
565
+ #: includes/class-mla-list-table.php:1375
566
+ #: includes/class-mla-list-table.php:1378 includes/class-mla-main.php:1977
567
+ #: includes/class-mla-main.php:2079
568
  msgid "Author"
569
  msgstr ""
570
 
571
+ #: includes/class-mla-data.php:5775 includes/class-mla-edit-media.php:418
572
+ #: includes/class-mla-main.php:2118
573
  msgid "Comments"
574
  msgstr ""
575
 
576
+ #: includes/class-mla-data.php:5784 includes/class-mla-edit-media.php:419
577
+ #: includes/class-mla-main.php:2119
578
  msgid "Pings"
579
  msgstr ""
580
 
581
+ #: includes/class-mla-data.php:5815
582
  msgid "Adding"
583
  msgstr ""
584
 
585
+ #: includes/class-mla-data.php:5819
586
  msgid "Removing"
587
  msgstr ""
588
 
589
+ #: includes/class-mla-data.php:5828
590
  msgid "Replacing"
591
  msgstr ""
592
 
593
+ #: includes/class-mla-data.php:5836
594
  msgid "Ignoring"
595
  msgstr ""
596
 
597
  #. translators: 1: action_name, 2: taxonomy
598
+ #: includes/class-mla-data.php:5849
599
  #, php-format
600
  msgid "%1$s \"%2$s\" terms"
601
  msgstr ""
602
 
603
  #. translators: 1: taxonomy
604
+ #: includes/class-mla-data.php:5853
605
  #, php-format
606
  msgid "You cannot assign \"%1$s\" terms"
607
  msgstr ""
608
 
609
  #. translators: 1: post ID
610
+ #: includes/class-mla-data.php:5865 includes/class-mla-main.php:1144
611
  #, php-format
612
  msgid "Item %1$d, no changes detected."
613
  msgstr ""
614
 
615
  #. translators: 1: post ID
616
+ #: includes/class-mla-data.php:5877
617
  #, php-format
618
  msgid "Item %1$d updated."
619
  msgstr ""
620
 
621
  #. translators: 1: ERROR tag 2: post ID
622
+ #: includes/class-mla-data.php:5891
623
  #, php-format
624
  msgid "%1$s: Item %2$d update failed."
625
  msgstr ""
626
 
627
+ #: includes/class-mla-edit-media.php:147 includes/class-mla-edit-media.php:183
628
+ #: includes/class-mla-edit-media.php:237 includes/class-mla-main.php:428
629
+ #: includes/class-mla-main.php:939 includes/class-mla-main.php:1789
630
+ #: includes/class-mla-media-modal.php:415 includes/class-mla-options.php:4001
631
+ #: includes/class-mla-polylang-support.php:371
632
+ #: includes/class-mla-settings.php:340
633
  msgctxt "tag_delimiter"
634
  msgid ","
635
  msgstr ""
636
 
637
+ #: includes/class-mla-edit-media.php:182
638
  msgid "Upload New Media items"
639
  msgstr ""
640
 
641
+ #: includes/class-mla-edit-media.php:184 includes/class-mla-edit-media.php:239
642
+ #: includes/class-mla-main.php:415
643
  msgid "An ajax.fail error has occurred. Please reload the page and try again."
644
  msgstr ""
645
 
646
+ #: includes/class-mla-edit-media.php:185 includes/class-mla-edit-media.php:240
647
+ #: includes/class-mla-main.php:416
648
  msgid "An ajax.done error has occurred. Please reload the page and try again."
649
  msgstr ""
650
 
651
+ #: includes/class-mla-edit-media.php:188 includes/class-mla-edit-media.php:414
652
  msgid "Open Bulk Edit area"
653
  msgstr ""
654
 
655
+ #: includes/class-mla-edit-media.php:189
656
  msgid "Close Bulk Edit area"
657
  msgstr ""
658
 
659
+ #: includes/class-mla-edit-media.php:338 includes/class-mla-main.php:2012
660
  msgid "more"
661
  msgstr ""
662
 
663
+ #: includes/class-mla-edit-media.php:339 includes/class-mla-main.php:2013
664
  msgid "less"
665
  msgstr ""
666
 
667
+ #: includes/class-mla-edit-media.php:342 includes/class-mla-edit-media.php:373
668
+ #: includes/class-mla-main.php:2016 includes/class-mla-main.php:2054
669
  msgid "Add"
670
  msgstr ""
671
 
672
+ #: includes/class-mla-edit-media.php:343 includes/class-mla-edit-media.php:374
673
+ #: includes/class-mla-main.php:2017 includes/class-mla-main.php:2055
674
  msgid "Remove"
675
  msgstr ""
676
 
677
+ #: includes/class-mla-edit-media.php:344 includes/class-mla-edit-media.php:375
678
+ #: includes/class-mla-main.php:2018 includes/class-mla-main.php:2056
679
+ #: includes/class-mla-options.php:3531 includes/class-mla-options.php:3634
680
+ #: includes/class-mla-options.php:3678 includes/class-mla-options.php:4696
681
+ #: includes/class-mla-options.php:4746 includes/class-mla-options.php:4865
682
+ #: includes/class-mla-options.php:4907 includes/class-mla-options.php:4932
683
  msgid "Replace"
684
  msgstr ""
685
 
686
+ #: includes/class-mla-edit-media.php:420 includes/class-mla-main.php:2120
687
+ #: includes/class-mla-main.php:2166 includes/class-mla-settings.php:1775
688
+ #: includes/class-mla-settings.php:1813 includes/class-mla-settings.php:2240
689
  msgid "No Change"
690
  msgstr ""
691
 
692
+ #: includes/class-mla-edit-media.php:421 includes/class-mla-main.php:2121
693
  msgid "Allow"
694
  msgstr ""
695
 
696
+ #: includes/class-mla-edit-media.php:422 includes/class-mla-main.php:2122
697
  msgid "Do not allow"
698
  msgstr ""
699
 
700
+ #: includes/class-mla-edit-media.php:429 includes/class-mla-list-table.php:900
701
+ #: includes/class-mla-list-table.php:992 includes/class-mla-main.php:2105
702
  msgid "Parent ID"
703
  msgstr ""
704
 
705
+ #: includes/class-mla-edit-media.php:430 includes/class-mla-edit-media.php:749
706
+ #: includes/class-mla-main.php:2106
707
  #: includes/class-mla-upload-optional-list-table.php:281
708
  msgid "Select"
709
  msgstr ""
710
 
711
+ #: includes/class-mla-edit-media.php:506
712
  msgid "Custom field mapping updated."
713
  msgstr ""
714
 
715
+ #: includes/class-mla-edit-media.php:507
716
  msgid "IPTC/EXIF mapping updated."
717
  msgstr ""
718
 
719
  #. translators: date_i18n format for last modified date and time
720
+ #: includes/class-mla-edit-media.php:525
721
  msgid "M j, Y @ G:i"
722
  msgstr ""
723
 
724
+ #: includes/class-mla-edit-media.php:527
725
  msgid "Last modified"
726
  msgstr ""
727
 
728
+ #: includes/class-mla-edit-media.php:538
729
  msgid "Map Custom Field metadata for this item"
730
  msgstr ""
731
 
732
+ #: includes/class-mla-edit-media.php:538 includes/class-mla-main.php:1713
733
+ #: includes/class-mla-main.php:2125
734
  msgid "Map Custom Field metadata"
735
  msgstr ""
736
 
737
+ #: includes/class-mla-edit-media.php:540
738
  msgid "Map IPTC/EXIF metadata for this item"
739
  msgstr ""
740
 
741
+ #: includes/class-mla-edit-media.php:540 includes/class-mla-main.php:1716
742
+ #: includes/class-mla-main.php:2124
743
  msgid "Map IPTC/EXIF metadata"
744
  msgstr ""
745
 
746
+ #: includes/class-mla-edit-media.php:612 includes/class-mla-edit-media.php:750
 
747
  msgid "Parent Info"
748
  msgstr ""
749
 
750
+ #: includes/class-mla-edit-media.php:622 includes/class-mla-edit-media.php:793
751
  msgid "Attachment Metadata"
752
  msgstr ""
753
 
754
+ #: includes/class-mla-edit-media.php:627 includes/class-mla-edit-media.php:827
755
+ #: includes/class-mla-options.php:472
756
  msgid "Featured in"
757
  msgstr ""
758
 
759
+ #: includes/class-mla-edit-media.php:631 includes/class-mla-edit-media.php:866
760
+ #: includes/class-mla-options.php:481
761
  msgid "Inserted in"
762
  msgstr ""
763
 
764
+ #: includes/class-mla-edit-media.php:635 includes/class-mla-edit-media.php:901
765
+ #: includes/class-mla-options.php:490 includes/class-mla-settings.php:3927
 
766
  msgid "Gallery in"
767
  msgstr ""
768
 
769
+ #: includes/class-mla-edit-media.php:639 includes/class-mla-edit-media.php:936
770
+ #: includes/class-mla-options.php:499 includes/class-mla-settings.php:3937
 
771
  msgid "MLA Gallery in"
772
  msgstr ""
773
 
774
  #. translators: 1: ERROR tag 2: function name 3: template key
775
+ #: includes/class-mla-edit-media.php:682 includes/class-mla-main.php:636
776
+ #: includes/class-mla-settings.php:560
777
  #, php-format
778
  msgctxt "error_log"
779
  msgid "%1$s: %2$s discarding \"%3$s\"; no title/order"
780
  msgstr ""
781
 
782
+ #: includes/class-mla-edit-media.php:728 includes/class-mla-list-table.php:703
783
+ #: includes/class-mla-main.php:1615
784
  msgid "Scheduled"
785
  msgstr ""
786
 
787
+ #: includes/class-mla-edit-media.php:731 includes/class-mla-list-table.php:706
788
  msgctxt "post state"
789
  msgid "Pending"
790
  msgstr ""
791
 
792
+ #: includes/class-mla-edit-media.php:734 includes/class-mla-list-table.php:700
793
+ #: includes/class-mla-main.php:1621
794
  msgid "Draft"
795
  msgstr ""
796
 
797
+ #: includes/class-mla-edit-media.php:748
798
  msgid "Post Parent"
799
  msgstr ""
800
 
801
+ #: includes/class-mla-edit-media.php:749 includes/class-mla-main.php:1901
802
  msgid "Select Parent"
803
  msgstr ""
804
 
805
+ #: includes/class-mla-edit-media.php:816 includes/class-mla-edit-media.php:854
806
+ #: includes/class-mla-edit-media.php:890 includes/class-mla-edit-media.php:925
807
+ #: includes/class-mla-list-table.php:1042
808
+ #: includes/class-mla-list-table.php:1091
809
+ #: includes/class-mla-list-table.php:1137
810
+ #: includes/class-mla-list-table.php:1182
 
 
811
  msgid "PARENT"
812
  msgstr ""
813
 
814
+ #: includes/class-mla-edit-media.php:1119
815
  msgid "Most Used"
816
  msgstr ""
817
 
818
  #. translators: %s: add new taxonomy label
819
+ #: includes/class-mla-edit-media.php:1148
820
  #, php-format
821
  msgid "+ %s"
822
  msgstr ""
823
 
824
+ #: includes/class-mla-edit-media.php:1154 includes/class-mla-main.php:1902
825
+ #: includes/class-mla-media-modal.php:1249
826
  #: includes/mla-media-modal-js-template.php:20
827
  #: includes/mla-media-modal-js-template.php:61
828
  msgid "Search"
829
  msgstr ""
830
 
831
+ #: includes/class-mla-list-table.php:241
 
 
 
 
 
 
 
 
832
  msgctxt "list_table_column"
833
  msgid "ID/Parent"
834
  msgstr ""
835
 
836
+ #: includes/class-mla-list-table.php:242
837
  msgctxt "list_table_column"
838
  msgid "Title/Name"
839
  msgstr ""
840
 
841
+ #: includes/class-mla-list-table.php:243
842
  msgctxt "list_table_column"
843
  msgid "Title"
844
  msgstr ""
845
 
846
+ #: includes/class-mla-list-table.php:244
847
  msgctxt "list_table_column"
848
  msgid "Name"
849
  msgstr ""
850
 
851
+ #: includes/class-mla-list-table.php:245
852
  msgctxt "list_table_column"
853
  msgid "Parent ID"
854
  msgstr ""
855
 
856
+ #: includes/class-mla-list-table.php:246
857
  msgctxt "list_table_column"
858
  msgid "Menu Order"
859
  msgstr ""
860
 
861
+ #: includes/class-mla-list-table.php:247
862
  msgctxt "list_table_column"
863
  msgid "Featured in"
864
  msgstr ""
865
 
866
+ #: includes/class-mla-list-table.php:248
867
  msgctxt "list_table_column"
868
  msgid "Inserted in"
869
  msgstr ""
870
 
871
+ #: includes/class-mla-list-table.php:249
872
  msgctxt "list_table_column"
873
  msgid "Gallery in"
874
  msgstr ""
875
 
876
+ #: includes/class-mla-list-table.php:250
877
  msgctxt "list_table_column"
878
  msgid "MLA Gallery in"
879
  msgstr ""
880
 
881
+ #: includes/class-mla-list-table.php:251
882
  msgctxt "list_table_column"
883
  msgid "ALT Text"
884
  msgstr ""
885
 
886
+ #: includes/class-mla-list-table.php:252
887
  msgctxt "list_table_column"
888
  msgid "Caption"
889
  msgstr ""
890
 
891
+ #: includes/class-mla-list-table.php:253
892
  #: includes/class-mla-upload-list-table.php:186
893
  #: includes/class-mla-upload-optional-list-table.php:171
894
  #: includes/class-mla-view-list-table.php:179
896
  msgid "Description"
897
  msgstr ""
898
 
899
+ #: includes/class-mla-list-table.php:254
900
  #: includes/class-mla-upload-list-table.php:178
901
  #: includes/class-mla-upload-optional-list-table.php:168
902
  msgctxt "list_table_column"
903
  msgid "MIME Type"
904
  msgstr ""
905
 
906
+ #: includes/class-mla-list-table.php:255
907
  msgctxt "list_table_column"
908
  msgid "File URL"
909
  msgstr ""
910
 
911
+ #: includes/class-mla-list-table.php:256
912
  msgctxt "list_table_column"
913
  msgid "Base File"
914
  msgstr ""
915
 
916
+ #: includes/class-mla-list-table.php:257
917
  msgctxt "list_table_column"
918
  msgid "Date"
919
  msgstr ""
920
 
921
+ #: includes/class-mla-list-table.php:258
922
  msgctxt "list_table_column"
923
  msgid "Last Modified"
924
  msgstr ""
925
 
926
+ #: includes/class-mla-list-table.php:259
927
  msgctxt "list_table_column"
928
  msgid "Author"
929
  msgstr ""
930
 
931
+ #: includes/class-mla-list-table.php:260
932
  msgctxt "list_table_column"
933
  msgid "Attached to"
934
  msgstr ""
935
 
936
+ #: includes/class-mla-list-table.php:281
937
  msgid "All"
938
  msgstr ""
939
 
940
+ #: includes/class-mla-list-table.php:566
941
+ #: includes/class-mla-list-table.php:1277 includes/class-mla-options.php:604
942
  #: includes/class-mla-options.php:806 includes/class-mla-options.php:830
943
+ #: includes/class-mla-options.php:844 includes/class-mla-settings.php:2314
944
  msgid "None"
945
  msgstr ""
946
 
947
+ #: includes/class-mla-list-table.php:572 includes/class-mla-list-table.php:605
948
+ #: includes/class-mla-list-table.php:900 includes/class-mla-list-table.php:992
949
+ #: includes/class-mla-list-table.php:1215
950
+ #: includes/class-mla-list-table.php:1259
951
+ #: includes/class-mla-list-table.php:1291
952
+ #: includes/class-mla-list-table.php:1375
 
953
  msgid "Filter by"
954
  msgstr ""
955
 
956
+ #: includes/class-mla-list-table.php:582
957
+ #: includes/class-mla-media-modal.php:910
958
  msgid "Not Supported"
959
  msgstr ""
960
 
961
  #. translators: 1: column_name 2: column_values
962
+ #: includes/class-mla-list-table.php:625
963
  #: includes/class-mla-upload-list-table.php:247
964
  #: includes/class-mla-upload-optional-list-table.php:228
965
  #: includes/class-mla-view-list-table.php:236
967
  msgid "column_default: %1$s, %2$s"
968
  msgstr ""
969
 
970
+ #: includes/class-mla-list-table.php:684 includes/class-mla-list-table.php:756
971
+ #: includes/class-mla-list-table.php:1047
972
+ #: includes/class-mla-list-table.php:1096
973
+ #: includes/class-mla-list-table.php:1142
974
+ #: includes/class-mla-list-table.php:1187
975
+ #: includes/class-mla-list-table.php:1395
976
+ #: includes/class-mla-list-table.php:1712
977
+ #: includes/class-mla-polylang-support.php:370
 
 
 
 
 
 
 
978
  #: includes/class-mla-upload-list-table.php:312
979
  #: includes/class-mla-upload-list-table.php:610
980
  #: includes/class-mla-view-list-table.php:302
982
  msgid "Edit"
983
  msgstr ""
984
 
985
+ #: includes/class-mla-list-table.php:709
986
  msgid "Trash"
987
  msgstr ""
988
 
989
+ #: includes/class-mla-list-table.php:745
990
  msgid "Restore this item from the Trash"
991
  msgstr ""
992
 
993
+ #: includes/class-mla-list-table.php:745
994
+ #: includes/class-mla-list-table.php:1709
995
  msgid "Restore"
996
  msgstr ""
997
 
998
+ #: includes/class-mla-list-table.php:756
999
+ #: includes/class-mla-upload-list-table.php:312
1000
+ #: includes/class-mla-view-list-table.php:302
1001
+ msgid "Edit this item"
1002
+ msgstr ""
1003
+
1004
+ #: includes/class-mla-list-table.php:757
1005
  #: includes/class-mla-upload-list-table.php:314
1006
  #: includes/class-mla-view-list-table.php:304
1007
  msgid "Edit this item inline"
1008
  msgstr ""
1009
 
1010
+ #: includes/class-mla-list-table.php:757 includes/class-mla-main.php:2099
1011
+ #: includes/class-mla-options.php:3408 includes/class-mla-options.php:3715
1012
  #: includes/class-mla-upload-list-table.php:314
1013
  #: includes/class-mla-view-list-table.php:304
1014
  msgid "Quick Edit"
1015
  msgstr ""
1016
 
1017
+ #: includes/class-mla-list-table.php:763
1018
  msgid "Move this item to the Trash"
1019
  msgstr ""
1020
 
1021
+ #: includes/class-mla-list-table.php:763
1022
+ #: includes/class-mla-list-table.php:1715
1023
  msgid "Move to Trash"
1024
  msgstr ""
1025
 
1026
+ #: includes/class-mla-list-table.php:768
1027
  #: includes/class-mla-upload-list-table.php:318
1028
  #: includes/class-mla-view-list-table.php:310
1029
  msgid "Delete this item Permanently"
1030
  msgstr ""
1031
 
1032
+ #: includes/class-mla-list-table.php:768
1033
+ #: includes/class-mla-list-table.php:1710
1034
+ #: includes/class-mla-list-table.php:1717
1035
  #: includes/class-mla-upload-list-table.php:318
1036
  #: includes/class-mla-view-list-table.php:310
1037
  #: includes/class-mla-view-list-table.php:514
1038
  msgid "Delete Permanently"
1039
  msgstr ""
1040
 
1041
+ #: includes/class-mla-list-table.php:776 includes/class-mla-settings.php:3030
1042
  msgid "Download"
1043
  msgstr ""
1044
 
1045
+ #: includes/class-mla-list-table.php:779 includes/class-mla-settings.php:1753
1046
  msgid "View"
1047
  msgstr ""
1048
 
1049
+ #: includes/class-mla-list-table.php:825 includes/class-mla-list-table.php:897
1050
+ #: includes/class-mla-main.php:419 includes/class-mla-main.php:1606
1051
+ #: includes/class-mla-polylang-support.php:367
1052
  msgid "(no title)"
1053
  msgstr ""
1054
 
1055
+ #: includes/class-mla-list-table.php:989
1056
  msgid "(no title: bad ID)"
1057
  msgstr ""
1058
 
1059
+ #: includes/class-mla-list-table.php:1024
1060
+ #: includes/class-mla-list-table.php:1069
1061
+ #: includes/class-mla-list-table.php:1119
1062
+ #: includes/class-mla-list-table.php:1164 includes/class-mla-options.php:476
 
 
1063
  #: includes/class-mla-options.php:485 includes/class-mla-options.php:494
1064
  #: includes/class-mla-options.php:503
1065
  msgid "Disabled"
1066
  msgstr ""
1067
 
1068
+ #: includes/class-mla-list-table.php:1262 includes/class-mla-settings.php:1858
1069
+ #: includes/class-mla-settings.php:2223
1070
  msgid "MIME Type"
1071
  msgstr ""
1072
 
1073
+ #: includes/class-mla-list-table.php:1295
1074
  msgid "Base File"
1075
  msgstr ""
1076
 
1077
+ #: includes/class-mla-list-table.php:1311
1078
+ #: includes/class-mla-list-table.php:1344
1079
  msgid "Unpublished"
1080
  msgstr ""
1081
 
1082
  #. translators: 1: upload/last modified date and time
1083
+ #: includes/class-mla-list-table.php:1320
1084
+ #: includes/class-mla-list-table.php:1351
1085
  #, php-format
1086
  msgid "%1$s from now"
1087
  msgstr ""
1088
 
1089
  #. translators: 1: upload/last modified date and time
1090
+ #: includes/class-mla-list-table.php:1323
1091
+ #: includes/class-mla-list-table.php:1353
1092
  #, php-format
1093
  msgid "%1$s ago"
1094
  msgstr ""
1095
 
1096
  #. translators: format for upload/last modified date
1097
  #. translators: date format in table columns, see http://php.net/date
1098
+ #: includes/class-mla-list-table.php:1327
1099
+ #: includes/class-mla-list-table.php:1356
1100
+ #: includes/class-mla-list-table.php:1412 includes/class-mla-main.php:1631
1101
  msgid "Y/m/d"
1102
  msgstr ""
1103
 
1104
+ #: includes/class-mla-list-table.php:1414 includes/class-mla-options.php:1194
1105
  msgctxt "table_view_singular"
1106
  msgid "Unattached"
1107
  msgstr ""
1108
 
1109
+ #: includes/class-mla-list-table.php:1417
1110
  msgid "Set Parent"
1111
  msgstr ""
1112
 
1113
+ #: includes/class-mla-list-table.php:1564
1114
  msgctxt "uploaded files"
1115
  msgid "All"
1116
  msgid_plural "All"
1117
  msgstr[0] ""
1118
  msgstr[1] ""
1119
 
1120
+ #: includes/class-mla-list-table.php:1743
1121
  msgid "Filter"
1122
  msgstr ""
1123
 
1124
+ #: includes/class-mla-list-table.php:1747
1125
  #: includes/mla-media-modal-js-template.php:58
1126
  msgid "Terms Search"
1127
  msgstr ""
1128
 
1129
+ #: includes/class-mla-list-table.php:1753
1130
+ #: includes/class-mla-polylang-support.php:1651
1131
  msgid "Clear Filter-by"
1132
  msgstr ""
1133
 
1134
+ #: includes/class-mla-list-table.php:1757
1135
  msgid "Empty Trash"
1136
  msgstr ""
1137
 
1138
+ #: includes/class-mla-main.php:417 includes/class-mla-settings.php:337
1139
  msgid "Error while saving the changes."
1140
  msgstr ""
1141
 
1142
+ #: includes/class-mla-main.php:418 includes/class-mla-settings.php:338
1143
  msgid "Remove From Bulk Edit"
1144
  msgstr ""
1145
 
1146
+ #: includes/class-mla-main.php:420
1147
  msgid "Bulk Edit items"
1148
  msgstr ""
1149
 
1150
+ #: includes/class-mla-main.php:421 includes/class-mla-main.php:2126
1151
+ #: includes/class-mla-settings.php:354
1152
  msgid "Waiting"
1153
  msgstr ""
1154
 
1155
+ #: includes/class-mla-main.php:422 includes/class-mla-main.php:2128
1156
+ #: includes/class-mla-settings.php:356
1157
  msgid "Complete"
1158
  msgstr ""
1159
 
1160
+ #: includes/class-mla-main.php:423 includes/class-mla-settings.php:357
1161
  msgid "Unchanged"
1162
  msgstr ""
1163
 
1164
+ #: includes/class-mla-main.php:424 includes/class-mla-settings.php:358
1165
  msgid "Succeeded"
1166
  msgstr ""
1167
 
1168
+ #: includes/class-mla-main.php:425 includes/class-mla-settings.php:359
1169
  msgid "Failed"
1170
  msgstr ""
1171
 
1172
+ #: includes/class-mla-main.php:426 includes/class-mla-settings.php:362
1173
  msgid "CANCELED"
1174
  msgstr ""
1175
 
1176
+ #: includes/class-mla-main.php:529
1177
  #, php-format
1178
  msgid "Item permanently deleted."
1179
  msgid_plural "%d items permanently deleted."
1181
  msgstr[1] ""
1182
 
1183
  #. translators: 1: post ID
1184
+ #: includes/class-mla-main.php:534 includes/class-mla-main.php:2305
1185
  #, php-format
1186
  msgid "Item %1$d moved to Trash."
1187
  msgstr ""
1188
 
1189
+ #: includes/class-mla-main.php:553
1190
  msgid "Entries per page"
1191
  msgstr ""
1192
 
1193
+ #: includes/class-mla-main.php:1081
1194
  msgid "You are not allowed to edit Attachment: "
1195
  msgstr ""
1196
 
1197
  #. translators: 1: ERROR tag 2: bulk action
1198
+ #: includes/class-mla-main.php:1134
1199
  #, php-format
1200
  msgid "%1$s: Unknown bulk action %2$s"
1201
  msgstr ""
1202
 
1203
+ #: includes/class-mla-main.php:1156
1204
  msgid "no changes detected"
1205
  msgstr ""
1206
 
1207
  #. translators: 1: action name, e.g., edit
1208
+ #: includes/class-mla-main.php:1202 includes/class-mla-settings.php:1632
1209
+ #: includes/class-mla-settings.php:2099
1210
  #, php-format
1211
  msgid "Bulk Action %1$s - no items selected."
1212
  msgstr ""
1213
 
1214
+ #: includes/class-mla-main.php:1253
1215
  msgid "You do not have permission to manage attachments."
1216
  msgstr ""
1217
 
1218
  #. translators: 1: number of items
1219
+ #: includes/class-mla-main.php:1320
1220
  #, php-format
1221
  msgctxt "deleted items"
1222
  msgid "%s item deleted."
1224
  msgstr[0] ""
1225
  msgstr[1] ""
1226
 
1227
+ #: includes/class-mla-main.php:1322
1228
  msgid "No items deleted."
1229
  msgstr ""
1230
 
1231
+ #: includes/class-mla-main.php:1376
 
 
 
 
 
 
 
 
 
 
1232
  msgid "Empty Terms Search; ignored"
1233
  msgstr ""
1234
 
1235
  #. translators: 1: row-level action, e.g., single_item_delete, single_item_edit
1236
  #. translators: 1: bulk_action, e.g., single_item_delete, single_item_edit
1237
+ #: includes/class-mla-main.php:1388 includes/class-mla-settings.php:1669
1238
+ #: includes/class-mla-settings.php:2138
1239
  #, php-format
1240
  msgid "Unknown mla_admin_action - \"%1$s\""
1241
  msgstr ""
1242
 
1243
+ #: includes/class-mla-main.php:1421
1244
  msgid "term search results for"
1245
  msgstr ""
1246
 
1247
+ #: includes/class-mla-main.php:1424
1248
  msgid "post/parent results for"
1249
  msgstr ""
1250
 
1251
+ #: includes/class-mla-main.php:1426
1252
  msgid "search results for"
1253
  msgstr ""
1254
 
1255
+ #: includes/class-mla-main.php:1602 includes/class-mla-main.php:1911
1256
  msgid "Type"
1257
  msgstr ""
1258
 
1259
+ #: includes/class-mla-main.php:1602 includes/class-mla-main.php:1912
1260
  msgid "Date"
1261
  msgstr ""
1262
 
1263
+ #: includes/class-mla-main.php:1602 includes/class-mla-main.php:1913
1264
+ #: includes/class-mla-settings.php:2239
1265
  msgid "Status"
1266
  msgstr ""
1267
 
1268
+ #: includes/class-mla-main.php:1612
1269
  msgid "Published"
1270
  msgstr ""
1271
 
1272
+ #: includes/class-mla-main.php:1618
1273
  msgid "Pending Review"
1274
  msgstr ""
1275
 
1276
+ #: includes/class-mla-main.php:1660 includes/class-mla-main.php:1745
1277
  msgid "No post ID found"
1278
  msgstr ""
1279
 
1280
+ #: includes/class-mla-main.php:1667 includes/class-mla-main.php:1752
1281
+ #: includes/class-mla-polylang-support.php:271
1282
  msgid "You are not allowed to edit this Attachment."
1283
  msgstr ""
1284
 
1285
+ #: includes/class-mla-main.php:1719 includes/class-mla-main.php:1923
1286
+ #: includes/class-mla-main.php:2113 includes/class-mla-settings.php:1512
1287
+ #: includes/class-mla-settings.php:1773 includes/class-mla-settings.php:1867
1288
+ #: includes/class-mla-settings.php:2237
1289
  msgid "Update"
1290
  msgstr ""
1291
 
1292
+ #: includes/class-mla-main.php:1858
1293
  msgid "All Post Types"
1294
  msgstr ""
1295
 
1296
+ #: includes/class-mla-main.php:1904
1297
  msgid "For"
1298
  msgstr ""
1299
 
1300
+ #: includes/class-mla-main.php:1914 includes/class-mla-shortcodes.php:838
1301
  msgid "Unattached"
1302
  msgstr ""
1303
 
1304
+ #: includes/class-mla-main.php:1919 includes/class-mla-main.php:2112
1305
+ #: includes/class-mla-polylang-support.php:1644
1306
+ #: includes/class-mla-settings.php:1513 includes/class-mla-settings.php:1772
1307
+ #: includes/class-mla-settings.php:1868 includes/class-mla-settings.php:1940
1308
+ #: includes/class-mla-settings.php:2236 includes/class-mla-settings.php:2707
1309
+ #: includes/class-mla-settings.php:2843
1310
  msgid "Cancel"
1311
  msgstr ""
1312
 
1313
+ #: includes/class-mla-main.php:2114 includes/class-mla-options.php:3422
1314
+ #: includes/class-mla-options.php:3716 includes/class-mla-settings.php:1774
1315
+ #: includes/class-mla-settings.php:2238
1316
  msgid "Bulk Edit"
1317
  msgstr ""
1318
 
1319
+ #: includes/class-mla-main.php:2127
1320
  msgid "In-process"
1321
  msgstr ""
1322
 
1323
+ #: includes/class-mla-main.php:2129 includes/class-mla-options.php:494
1324
+ #: includes/class-mla-options.php:503 includes/class-mla-settings.php:2710
1325
+ #: includes/class-mla-settings.php:2846
1326
  msgid "Refresh"
1327
  msgstr ""
1328
 
1329
+ #: includes/class-mla-main.php:2218
1330
  msgid "You are not allowed to delete this item."
1331
  msgstr ""
1332
 
1333
  #. translators: 1: ERROR tag 2: post ID
1334
+ #: includes/class-mla-main.php:2226
1335
  #, php-format
1336
  msgid "%1$s: Item %2$d could NOT be deleted."
1337
  msgstr ""
1338
 
1339
  #. translators: 1: post ID
1340
+ #: includes/class-mla-main.php:2233
1341
  #, php-format
1342
  msgid "Item %1$d permanently deleted."
1343
  msgstr ""
1344
 
1345
+ #: includes/class-mla-main.php:2250
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1346
  msgid "You are not allowed to move this item out of the Trash."
1347
  msgstr ""
1348
 
1349
  #. translators: 1: ERROR tag 2: post ID
1350
+ #: includes/class-mla-main.php:2258
1351
  #, php-format
1352
  msgid "%1$s: Item %2$d could NOT be restored from Trash."
1353
  msgstr ""
1354
 
1355
  #. translators: 1: post ID
1356
+ #: includes/class-mla-main.php:2273
1357
  #, php-format
1358
  msgid "Item %1$d restored from Trash."
1359
  msgstr ""
1360
 
1361
+ #: includes/class-mla-main.php:2290
1362
  msgid "You are not allowed to move this item to the Trash."
1363
  msgstr ""
1364
 
1365
  #. translators: 1: ERROR tag 2: post ID
1366
+ #: includes/class-mla-main.php:2298
1367
  #, php-format
1368
  msgid "%1$s: Item %2$d could NOT be moved to Trash."
1369
  msgstr ""
1370
 
1371
  #: includes/class-mla-media-modal.php:245
1372
  #: includes/class-mla-media-modal.php:251
1373
+ #: includes/class-mla-media-modal.php:824
1374
+ #: includes/class-mla-media-modal.php:859
1375
+ #: includes/class-mla-media-modal.php:904
1376
  msgid "Click to toggle"
1377
  msgstr ""
1378
 
1379
+ #: includes/class-mla-media-modal.php:290
1380
  msgid "Show all dates"
1381
  msgstr ""
1382
 
1383
  #. translators: 1: month name, 2: 4-digit year
1384
+ #: includes/class-mla-media-modal.php:305
1385
  #, php-format
1386
  msgid "%1$s %2$d"
1387
  msgstr ""
1388
 
1389
+ #: includes/class-mla-media-modal.php:521
1390
  msgid "Search Box"
1391
  msgstr ""
1392
 
1393
+ #: includes/class-mla-media-modal.php:522
1394
  msgid "Loading..."
1395
  msgstr ""
1396
 
1397
+ #: includes/class-mla-media-modal.php:870
1398
  msgid "Tags"
1399
  msgstr ""
1400
 
1401
  #. translators: %s: add new taxonomy label
1402
  #. translators: %s: add new View
1403
  #. translators: %s: add new Upload MIME Type
1404
+ #: includes/class-mla-media-modal.php:872 includes/class-mla-objects.php:46
1405
+ #: includes/class-mla-objects.php:76 includes/class-mla-settings.php:1753
1406
+ #: includes/class-mla-settings.php:2219
1407
  #, php-format
1408
  msgid "Add New %1$s"
1409
  msgstr ""
1410
 
1411
+ #: includes/class-mla-media-modal.php:888
1412
  msgid "Choose from the most used tags"
1413
  msgstr ""
1414
 
1415
+ #: includes/class-mla-media-modal.php:1232
1416
+ #: includes/class-mla-media-modal.php:1248
1417
  msgid "Search Terms"
1418
  msgstr ""
1419
 
1420
+ #: includes/class-mla-media-modal.php:1233
1421
  msgid "There are no taxonomies to search"
1422
  msgstr ""
1423
 
1424
+ #: includes/class-mla-media-modal.php:1251
1425
  msgid "All phrases"
1426
  msgstr ""
1427
 
1428
+ #: includes/class-mla-media-modal.php:1253
1429
  msgid "Any phrase"
1430
  msgstr ""
1431
 
1432
+ #: includes/class-mla-media-modal.php:1255
1433
  msgid "All terms"
1434
  msgstr ""
1435
 
1436
+ #: includes/class-mla-media-modal.php:1257
1437
  msgid "Any term"
1438
  msgstr ""
1439
 
1440
+ #: includes/class-mla-media-modal.php:1259
1441
  msgid "Exact"
1442
  msgstr ""
1443
 
1476
 
1477
  #. translators: 1: element name 2: bad_value 3: good_value
1478
  #: includes/class-mla-mime-types.php:953
1479
+ #: includes/class-mla-mime-types.php:1976
1480
  #, php-format
1481
  msgid "<br>Changing %1$s \"%2$s\" to valid value \"%3$s\""
1482
  msgstr ""
1483
 
1484
  #: includes/class-mla-mime-types.php:953
1485
  #: includes/class-mla-mime-types.php:1041
1486
+ #: includes/class-mla-mime-types.php:1052 includes/class-mla-settings.php:1497
1487
+ #: includes/class-mla-settings.php:1754
1488
  msgid "Slug"
1489
  msgstr ""
1490
 
1503
 
1504
  #. translators: 1: element name 2: bad_value 3: good_value
1505
  #: includes/class-mla-mime-types.php:1041
1506
+ #: includes/class-mla-mime-types.php:2102
1507
  #, php-format
1508
  msgid "<br>Changing new %1$s \"%2$s\" to valid value \"%3$s\""
1509
  msgstr ""
1602
  msgid "icon"
1603
  msgstr ""
1604
 
1605
+ #: includes/class-mla-mime-types.php:1960
1606
+ #: includes/class-mla-mime-types.php:2059
1607
  msgid "Cannot load Upload MIME Types"
1608
  msgstr ""
1609
 
1610
+ #: includes/class-mla-mime-types.php:1971
1611
  msgid "Extension is required"
1612
  msgstr ""
1613
 
1614
+ #: includes/class-mla-mime-types.php:1976
1615
+ #: includes/class-mla-mime-types.php:2102
1616
+ #: includes/class-mla-mime-types.php:2113 includes/class-mla-settings.php:1856
1617
+ #: includes/class-mla-settings.php:2221
1618
  msgid "Extension"
1619
  msgstr ""
1620
 
1621
  #. translators: 1: ERROR tag 2: slug
1622
+ #: includes/class-mla-mime-types.php:1984
1623
  #, php-format
1624
  msgid "%1$s: Could not add extension \"%2$s\"; value already exists"
1625
  msgstr ""
1626
 
1627
+ #: includes/class-mla-mime-types.php:1992
1628
  msgid "MIME type is required"
1629
  msgstr ""
1630
 
1631
  #. translators: 1: ERROR tag 2: clean_mime_type
1632
+ #: includes/class-mla-mime-types.php:1997
1633
+ #: includes/class-mla-mime-types.php:2144
1634
  #, php-format
1635
  msgid "%1$s: Bad MIME type; try \"%2$s\""
1636
  msgstr ""
1637
 
1638
  #. translators: 1: slug
1639
+ #: includes/class-mla-mime-types.php:2034
1640
  #, php-format
1641
  msgid "Upload MIME Type \"%1$s\"; added"
1642
  msgstr ""
1643
 
1644
+ #: includes/class-mla-mime-types.php:2040
1645
+ #: includes/class-mla-mime-types.php:2229
1646
+ #: includes/class-mla-mime-types.php:2308
1647
  msgid "Cannot update Upload MIME Types"
1648
  msgstr ""
1649
 
1650
  #. translators: 1: ERROR tag 2: slug
1651
+ #: includes/class-mla-mime-types.php:2110
1652
  #, php-format
1653
  msgid "%1$s: Could not add new extension \"%2$s\"; value already exists"
1654
  msgstr ""
1655
 
1656
  #. translators: 1: slug
1657
+ #: includes/class-mla-mime-types.php:2209
1658
  #, php-format
1659
  msgid "Edit type \"%1$s\"; no changes detected"
1660
  msgstr ""
1661
 
1662
  #. translators: 1: slug
1663
+ #: includes/class-mla-mime-types.php:2223
1664
  #, php-format
1665
  msgid "Edit type \"%1$s\"; updated"
1666
  msgstr ""
1667
 
1668
  #. translators: 1: slug
1669
+ #: includes/class-mla-mime-types.php:2296
1670
  #, php-format
1671
  msgid "Upload MIME Type \"%1$s\"; reverted to standard"
1672
  msgstr ""
1673
 
1674
  #. translators: 1: slug
1675
+ #: includes/class-mla-mime-types.php:2302
1676
  #, php-format
1677
  msgid "Upload MIME Type \"%1$s\"; deleted"
1678
  msgstr ""
1679
 
1680
  #. translators: 1: ERROR tag 2: slug
1681
+ #: includes/class-mla-mime-types.php:2317
1682
  #, php-format
1683
  msgid "%1$s: Did not find Upload type \"%2$s\""
1684
  msgstr ""
1795
  msgid "tpls/mla-option-templates.tpl not found"
1796
  msgstr ""
1797
 
1798
+ #: includes/class-mla-options.php:441 includes/class-mla-options.php:1744
1799
  msgid "Attachment Categories"
1800
  msgstr ""
1801
 
1803
  msgid "Check this option to add support for Attachment Categories."
1804
  msgstr ""
1805
 
1806
+ #: includes/class-mla-options.php:448 includes/class-mla-options.php:1759
1807
  msgid "Attachment Tags"
1808
  msgstr ""
1809
 
1811
  msgid "Check this option to add support for Attachment Tags."
1812
  msgstr ""
1813
 
1814
+ #: includes/class-mla-options.php:455 includes/class-mla-settings.php:1339
1815
  msgid "Where-used Reporting"
1816
  msgstr ""
1817
 
1869
  "Cached."
1870
  msgstr ""
1871
 
1872
+ #: includes/class-mla-options.php:508 includes/class-mla-settings.php:1339
1873
  msgid "Taxonomy Support"
1874
  msgstr ""
1875
 
1902
  msgstr ""
1903
 
1904
  #: includes/class-mla-options.php:523 includes/class-mla-options.php:704
1905
+ #: includes/class-mla-settings.php:1371 includes/class-mla-settings.php:1372
1906
  msgid "For complete documentation"
1907
  msgstr ""
1908
 
1909
  #: includes/class-mla-options.php:523 includes/class-mla-options.php:704
1910
+ #: includes/class-mla-settings.php:1371 includes/class-mla-settings.php:1372
1911
  msgid "click here"
1912
  msgstr ""
1913
 
1947
  msgid "Page Title"
1948
  msgstr ""
1949
 
1950
+ #: includes/class-mla-options.php:566 includes/class-mla-settings.php:447
1951
+ #: includes/class-mla-settings.php:3073 includes/class-mla-settings.php:3095
1952
  msgid "Media Library Assistant"
1953
  msgstr ""
1954
 
2242
 
2243
  #: includes/class-mla-options.php:806 includes/class-mla-options.php:815
2244
  #: includes/class-mla-options.php:830 includes/class-mla-options.php:844
2245
+ #: includes/class-mla-options.php:858 includes/class-mla-settings.php:1421
2246
  msgid "Media Manager Default"
2247
  msgstr ""
2248
 
2327
 
2328
  #: includes/class-mla-options.php:872 includes/class-mla-options.php:878
2329
  #: includes/class-mla-options.php:916 includes/class-mla-options.php:922
2330
+ #: includes/class-mla-settings.php:3203 includes/class-mla-settings.php:3214
2331
+ #: includes/class-mla-settings.php:3220 includes/class-mla-settings.php:3224
2332
+ #: includes/class-mla-settings.php:3252 includes/class-mla-settings.php:3263
2333
  msgid "Style Template"
2334
  msgstr ""
2335
 
2345
  msgstr ""
2346
 
2347
  #: includes/class-mla-options.php:888 includes/class-mla-options.php:932
2348
+ #: includes/class-mla-settings.php:3292 includes/class-mla-settings.php:3305
2349
+ #: includes/class-mla-settings.php:3311 includes/class-mla-settings.php:3315
2350
+ #: includes/class-mla-settings.php:3384
2351
  msgid "markup template"
2352
  msgstr ""
2353
 
2528
  msgstr ""
2529
 
2530
  #: includes/class-mla-options.php:1146 includes/class-mla-options.php:1200
2531
+ #: includes/class-mla-options.php:1209 includes/class-mla-options.php:1218
2532
  msgctxt "post_mime_types_description"
2533
  msgid "Built-in view"
2534
  msgstr ""
2615
 
2616
  #: includes/class-mla-options.php:1203
2617
  msgctxt "table_view_singular"
2618
+ msgid "Attached"
2619
  msgstr ""
2620
 
2621
  #: includes/class-mla-options.php:1204
2622
  msgctxt "table_view_plural"
2623
+ msgid "Attached"
2624
+ msgstr ""
2625
+
2626
+ #: includes/class-mla-options.php:1212
2627
+ msgctxt "table_view_singular"
2628
  msgid "Trash"
2629
  msgstr ""
2630
 
2631
+ #: includes/class-mla-options.php:1213
2632
+ msgctxt "table_view_plural"
2633
+ msgid "Trash"
2634
+ msgstr ""
2635
+
2636
+ #: includes/class-mla-options.php:1224
2637
  msgid "Enable Upload MIME Type Support"
2638
  msgstr ""
2639
 
2640
+ #: includes/class-mla-options.php:1227
2641
  msgid ""
2642
  "Check/uncheck this option to enable/disable Upload MIME Type Support, then "
2643
  "click <strong>Save Changes</strong> to record the new setting."
2644
  msgstr ""
2645
 
2646
+ #: includes/class-mla-options.php:1236
2647
  msgid "Upload MIME Types help."
2648
  msgstr ""
2649
 
2650
+ #: includes/class-mla-options.php:1241
2651
  msgid "Enable MLA File Type Icons Support"
2652
  msgstr ""
2653
 
2654
+ #: includes/class-mla-options.php:1244
2655
  msgid ""
2656
  "Check/uncheck this option to enable/disable MLA File Type Icons Support, "
2657
  "then click <strong>Save Changes</strong> to record the new setting."
2658
  msgstr ""
2659
 
2660
+ #: includes/class-mla-options.php:1296 includes/class-mla-options.php:1318
2661
+ #: includes/class-mla-options.php:1360
2662
  msgid "no templates exist"
2663
  msgstr ""
2664
 
2665
+ #: includes/class-mla-options.php:1304
2666
  msgid "not found"
2667
  msgstr ""
2668
 
2669
  #. translators: 1: ERROR tag 2: option name 3: action, e.g., update, delete, reset
2670
+ #: includes/class-mla-options.php:1710 includes/class-mla-options.php:1887
2671
+ #: includes/class-mla-options.php:1963 includes/class-mla-options.php:3754
2672
+ #: includes/class-mla-options.php:5052
2673
  #, php-format
2674
  msgid "%1$s: Custom %2$s unknown action \"%3$s\""
2675
  msgstr ""
2676
 
2677
+ #: includes/class-mla-options.php:1801
2678
  msgid "Support"
2679
  msgstr ""
2680
 
2681
+ #: includes/class-mla-options.php:1802
2682
  msgid "Inline Edit"
2683
  msgstr ""
2684
 
2685
+ #: includes/class-mla-options.php:1803
2686
  msgid "Term Search"
2687
  msgstr ""
2688
 
2689
+ #: includes/class-mla-options.php:1804
2690
  msgid "Checklist"
2691
  msgstr ""
2692
 
2693
+ #: includes/class-mla-options.php:1805
2694
  msgid "Checked On Top"
2695
  msgstr ""
2696
 
2697
+ #: includes/class-mla-options.php:1806
2698
  msgid "List Filter"
2699
  msgstr ""
2700
 
2701
+ #: includes/class-mla-options.php:1807
2702
  msgid "Taxonomy"
2703
  msgstr ""
2704
 
2705
  #. translators: 1: taxonomy name
2706
+ #: includes/class-mla-options.php:1826
2707
  #, php-format
2708
  msgid "List Filter ignored; %1$s not supported."
2709
  msgstr ""
2710
 
2711
  #. translators: 1: taxonomy name
2712
+ #: includes/class-mla-options.php:1833
2713
  #, php-format
2714
  msgid "Inline Edit ignored; %1$s not supported."
2715
  msgstr ""
2716
 
2717
  #. translators: 1: taxonomy name
2718
+ #: includes/class-mla-options.php:1841
2719
  #, php-format
2720
  msgid "Term Search ignored; %1$s not supported."
2721
  msgstr ""
2722
 
2723
  #. translators: 1: taxonomy name
2724
+ #: includes/class-mla-options.php:1851
2725
  #, php-format
2726
  msgid "Checklist ignored; %1$s not supported."
2727
  msgstr ""
2728
 
2729
  #. translators: 1: taxonomy name
2730
+ #: includes/class-mla-options.php:1859
2731
  #, php-format
2732
  msgid "Checked On Top ignored; %1$s not supported."
2733
  msgstr ""
2734
 
2735
  #. translators: 1: option name, e.g., taxonomy_support
2736
+ #: includes/class-mla-options.php:1877 includes/class-mla-options.php:1953
2737
  #, php-format
2738
  msgid "Update custom %1$s"
2739
  msgstr ""
2740
 
2741
  #. translators: 1: option name, e.g., taxonomy_support
2742
+ #: includes/class-mla-options.php:1884 includes/class-mla-options.php:1960
2743
+ #: includes/class-mla-options.php:5045
2744
  #, php-format
2745
  msgid "Reset custom %1$s"
2746
  msgstr ""
2747
 
2748
+ #: includes/class-mla-options.php:1913
2749
  #: includes/mla-main-search-box-template.php:38
2750
  #: includes/mla-media-modal-js-template.php:24
2751
  msgid "and"
2752
  msgstr ""
2753
 
2754
+ #: includes/class-mla-options.php:1915
2755
  #: includes/mla-main-search-box-template.php:40
2756
  #: includes/mla-media-modal-js-template.php:28
2757
  msgid "or"
2758
  msgstr ""
2759
 
2760
+ #: includes/class-mla-options.php:1920 includes/class-mla-settings.php:2369
2761
+ #: includes/class-mla-settings.php:2402 includes/class-mla-settings.php:2428
2762
+ #: includes/class-mla-settings.php:2463 includes/class-mla-settings.php:2520
2763
+ #: includes/class-mla-settings.php:2570
2764
  #: includes/mla-main-search-box-template.php:43
2765
  #: includes/mla-media-modal-js-template.php:36
2766
  msgid "Name"
2767
  msgstr ""
2768
 
2769
+ #: includes/class-mla-options.php:1932
2770
  #: includes/mla-main-search-box-template.php:47
2771
  #: includes/mla-media-modal-js-template.php:53
2772
  msgid "Terms"
2773
  msgstr ""
2774
 
2775
+ #: includes/class-mla-options.php:3086 includes/class-mla-options.php:3215
2776
+ #: includes/class-mla-options.php:4204 includes/class-mla-options.php:4235
2777
+ #: includes/class-mla-settings.php:1819
2778
  msgid "None (select a value)"
2779
  msgstr ""
2780
 
2781
+ #: includes/class-mla-options.php:3222
2782
  msgid "Metadata (see below)"
2783
  msgstr ""
2784
 
2785
+ #: includes/class-mla-options.php:3229
2786
  msgid "Template (see below)"
2787
  msgstr ""
2788
 
2789
  #. translators: 1: ERROR tag 2: custom field name
2790
+ #: includes/class-mla-options.php:3297 includes/class-mla-options.php:4512
2791
  #, php-format
2792
  msgid "%1$s: New field %2$s already exists."
2793
  msgstr ""
2794
 
2795
  #. translators: 1: custom field name
2796
+ #: includes/class-mla-options.php:3302 includes/class-mla-options.php:4517
2797
  #, php-format
2798
  msgid "Adding new field %1$s."
2799
  msgstr ""
2800
 
2801
  #. translators: 1: custom field name
2802
+ #: includes/class-mla-options.php:3310 includes/class-mla-options.php:4525
2803
  #, php-format
2804
  msgid "Adding new rule for %1$s."
2805
  msgstr ""
2806
 
2807
  #. translators: 1: custom field name
2808
+ #: includes/class-mla-options.php:3336 includes/class-mla-options.php:4386
2809
+ #: includes/class-mla-options.php:4548
2810
  #, php-format
2811
  msgid "Deleting rule for %1$s."
2812
  msgstr ""
2813
 
2814
  #. translators: 1: custom field name 2: attribute 3: old value 4: new value
2815
+ #: includes/class-mla-options.php:3359 includes/class-mla-options.php:3380
2816
+ #: includes/class-mla-options.php:3430 includes/class-mla-options.php:3437
2817
+ #: includes/class-mla-options.php:4302 includes/class-mla-options.php:4309
2818
+ #: includes/class-mla-options.php:4316 includes/class-mla-options.php:4411
2819
+ #: includes/class-mla-options.php:4418 includes/class-mla-options.php:4453
2820
+ #: includes/class-mla-options.php:4460 includes/class-mla-options.php:4558
2821
+ #: includes/class-mla-options.php:4565
2822
  #, php-format
2823
  msgid "%1$s changing %2$s from %3$s to %4$s."
2824
  msgstr ""
2825
 
2826
+ #: includes/class-mla-options.php:3359 includes/class-mla-options.php:3711
2827
  msgid "Data Source"
2828
  msgstr ""
2829
 
2830
+ #: includes/class-mla-options.php:3365 includes/class-mla-options.php:4336
2831
+ #: includes/class-mla-options.php:4438 includes/class-mla-options.php:4585
2832
  msgid "Replace to Keep"
2833
  msgstr ""
2834
 
2835
+ #: includes/class-mla-options.php:3368 includes/class-mla-options.php:4339
2836
+ #: includes/class-mla-options.php:4441 includes/class-mla-options.php:4588
2837
  msgid "Keep to Replace"
2838
  msgstr ""
2839
 
2840
  #. translators: 1: custom field name 2: attribute 3: old value 'to' new value
2841
+ #: includes/class-mla-options.php:3373 includes/class-mla-options.php:3394
2842
+ #: includes/class-mla-options.php:3408 includes/class-mla-options.php:3422
2843
+ #: includes/class-mla-options.php:3451 includes/class-mla-options.php:4330
2844
+ #: includes/class-mla-options.php:4344 includes/class-mla-options.php:4432
2845
+ #: includes/class-mla-options.php:4446 includes/class-mla-options.php:4579
2846
+ #: includes/class-mla-options.php:4593
2847
  #, php-format
2848
  msgid "%1$s changing %2$s value from %3$s."
2849
  msgstr ""
2850
 
2851
+ #: includes/class-mla-options.php:3373 includes/class-mla-options.php:3712
2852
+ #: includes/class-mla-options.php:4344 includes/class-mla-options.php:4446
2853
+ #: includes/class-mla-options.php:4593 includes/class-mla-options.php:4719
2854
+ #: includes/class-mla-options.php:4805 includes/class-mla-options.php:4943
2855
  msgid "Existing Text"
2856
  msgstr ""
2857
 
2858
+ #: includes/class-mla-options.php:3380 includes/class-mla-options.php:3713
2859
  msgid "Format"
2860
  msgstr ""
2861
 
2862
+ #: includes/class-mla-options.php:3386 includes/class-mla-options.php:3400
2863
+ #: includes/class-mla-options.php:3414 includes/class-mla-options.php:3443
2864
  msgid "unchecked to checked"
2865
  msgstr ""
2866
 
2867
+ #: includes/class-mla-options.php:3389 includes/class-mla-options.php:3403
2868
+ #: includes/class-mla-options.php:3417 includes/class-mla-options.php:3446
2869
  msgid "checked to unchecked"
2870
  msgstr ""
2871
 
2872
+ #: includes/class-mla-options.php:3394 includes/class-mla-options.php:3714
2873
  msgid "MLA Column"
2874
  msgstr ""
2875
 
2876
+ #: includes/class-mla-options.php:3430
2877
  msgid "Metavalue name"
2878
  msgstr ""
2879
 
2880
+ #: includes/class-mla-options.php:3437 includes/class-mla-options.php:3545
2881
+ #: includes/class-mla-options.php:3647 includes/class-mla-options.php:3691
2882
  msgid "Option"
2883
  msgstr ""
2884
 
2885
+ #: includes/class-mla-options.php:3451 includes/class-mla-options.php:3557
2886
+ #: includes/class-mla-options.php:3659 includes/class-mla-options.php:3703
2887
  msgid "Delete NULL values"
2888
  msgstr ""
2889
 
2890
+ #: includes/class-mla-options.php:3490 includes/class-mla-options.php:4817
2891
  msgid "No Custom Field Mapping Rules Defined"
2892
  msgstr ""
2893
 
2894
+ #: includes/class-mla-options.php:3529 includes/class-mla-options.php:3632
2895
+ #: includes/class-mla-options.php:3676 includes/class-mla-options.php:4694
2896
+ #: includes/class-mla-options.php:4744 includes/class-mla-options.php:4863
2897
+ #: includes/class-mla-options.php:4905 includes/class-mla-options.php:4930
2898
  msgid "Keep"
2899
  msgstr ""
2900
 
2901
+ #: includes/class-mla-options.php:3533 includes/class-mla-options.php:3636
2902
+ #: includes/class-mla-options.php:3680
2903
  msgid "Native"
2904
  msgstr ""
2905
 
2906
+ #: includes/class-mla-options.php:3535 includes/class-mla-options.php:3638
2907
+ #: includes/class-mla-options.php:3682
2908
  msgid "Commas"
2909
  msgstr ""
2910
 
2911
+ #: includes/class-mla-options.php:3537 includes/class-mla-options.php:3640
2912
+ #: includes/class-mla-options.php:3684
2913
  msgid "Raw"
2914
  msgstr ""
2915
 
2916
+ #: includes/class-mla-options.php:3547 includes/class-mla-options.php:3649
2917
+ #: includes/class-mla-options.php:3693
2918
  msgid "Text"
2919
  msgstr ""
2920
 
2921
+ #: includes/class-mla-options.php:3549 includes/class-mla-options.php:3651
2922
+ #: includes/class-mla-options.php:3695
2923
  msgid "Single"
2924
  msgstr ""
2925
 
2926
+ #: includes/class-mla-options.php:3551 includes/class-mla-options.php:3653
2927
+ #: includes/class-mla-options.php:3697
2928
  msgid "Export"
2929
  msgstr ""
2930
 
2931
+ #: includes/class-mla-options.php:3553 includes/class-mla-options.php:3655
2932
+ #: includes/class-mla-options.php:3699
2933
  msgid "Array"
2934
  msgstr ""
2935
 
2936
+ #: includes/class-mla-options.php:3555 includes/class-mla-options.php:3657
2937
+ #: includes/class-mla-options.php:3701
2938
  msgid "Multi"
2939
  msgstr ""
2940
 
2941
+ #: includes/class-mla-options.php:3558 includes/class-mla-options.php:4866
2942
  msgid "Delete Rule"
2943
  msgstr ""
2944
 
2945
+ #: includes/class-mla-options.php:3559 includes/class-mla-options.php:4867
2946
  msgid "Delete Rule AND Field"
2947
  msgstr ""
2948
 
2949
+ #: includes/class-mla-options.php:3560 includes/class-mla-options.php:4868
2950
  msgid "Update Rule"
2951
  msgstr ""
2952
 
2953
+ #: includes/class-mla-options.php:3561 includes/class-mla-options.php:4869
2954
+ #: includes/class-mla-settings.php:711 includes/class-mla-settings.php:842
2955
  msgid "Map All Attachments"
2956
  msgstr ""
2957
 
2958
+ #: includes/class-mla-options.php:3627 includes/class-mla-options.php:4894
2959
  msgid "Add a new Mapping Rule"
2960
  msgstr ""
2961
 
2962
+ #: includes/class-mla-options.php:3660 includes/class-mla-options.php:4908
2963
  msgid "Add Rule"
2964
  msgstr ""
2965
 
2966
+ #: includes/class-mla-options.php:3661 includes/class-mla-options.php:4909
2967
  msgid "Add Rule and Map All Attachments"
2968
  msgstr ""
2969
 
2970
+ #: includes/class-mla-options.php:3671 includes/class-mla-options.php:4919
2971
  msgid "Add a new Field and Mapping Rule"
2972
  msgstr ""
2973
 
2974
+ #: includes/class-mla-options.php:3704 includes/class-mla-options.php:4933
2975
  msgid "Add Field"
2976
  msgstr ""
2977
 
2978
+ #: includes/class-mla-options.php:3705 includes/class-mla-options.php:4934
2979
  msgid "Add Field and Map All Attachments"
2980
  msgstr ""
2981
 
2982
+ #: includes/class-mla-options.php:3710 includes/class-mla-options.php:4302
2983
+ #: includes/class-mla-options.php:4715 includes/class-mla-options.php:4801
2984
+ #: includes/class-mla-options.php:4939
2985
  msgid "Field Title"
2986
  msgstr ""
2987
 
2988
+ #: includes/class-mla-options.php:3735
2989
  msgid "Custom field mapping rules updated."
2990
  msgstr ""
2991
 
2992
+ #: includes/class-mla-options.php:3737
2993
  msgid "Custom field mapping rules update failed."
2994
  msgstr ""
2995
 
2996
+ #: includes/class-mla-options.php:3740 includes/class-mla-settings.php:756
2997
+ #: includes/class-mla-settings.php:762
2998
  msgid "Custom field no mapping rule changes detected."
2999
  msgstr ""
3000
 
3001
+ #: includes/class-mla-options.php:3748
3002
  msgid "Custom field mapping settings saved."
3003
  msgstr ""
3004
 
3005
+ #: includes/class-mla-options.php:3750
3006
  msgid "Custom field mapping settings reset failed."
3007
  msgstr ""
3008
 
3009
  #. translators: 1: ERROR tag 2: custom field name
3010
+ #: includes/class-mla-options.php:4290
3011
  #, php-format
3012
  msgid "%1$s: No old values for %2$s."
3013
  msgstr ""
3014
 
3015
+ #: includes/class-mla-options.php:4309 includes/class-mla-options.php:4411
3016
+ #: includes/class-mla-options.php:4558 includes/class-mla-options.php:4716
3017
+ #: includes/class-mla-options.php:4802 includes/class-mla-options.php:4940
3018
  msgid "IPTC Value"
3019
  msgstr ""
3020
 
3021
+ #: includes/class-mla-options.php:4316 includes/class-mla-options.php:4418
3022
+ #: includes/class-mla-options.php:4565
3023
  msgid "EXIF Value"
3024
  msgstr ""
3025
 
3026
+ #: includes/class-mla-options.php:4322 includes/class-mla-options.php:4424
3027
+ #: includes/class-mla-options.php:4571
3028
  msgid "EXIF to IPTC"
3029
  msgstr ""
3030
 
3031
+ #: includes/class-mla-options.php:4325 includes/class-mla-options.php:4427
3032
+ #: includes/class-mla-options.php:4574
3033
  msgid "IPTC to EXIF"
3034
  msgstr ""
3035
 
3036
+ #: includes/class-mla-options.php:4330 includes/class-mla-options.php:4432
3037
+ #: includes/class-mla-options.php:4579 includes/class-mla-options.php:4718
3038
+ #: includes/class-mla-options.php:4804 includes/class-mla-options.php:4942
3039
  msgid "Priority"
3040
  msgstr ""
3041
 
3042
+ #: includes/class-mla-options.php:4453 includes/class-mla-options.php:4806
3043
  msgid "Delimiter(s)"
3044
  msgstr ""
3045
 
3046
+ #: includes/class-mla-options.php:4690 includes/class-mla-options.php:4740
3047
+ #: includes/class-mla-options.php:4859 includes/class-mla-options.php:4901
3048
+ #: includes/class-mla-options.php:4926
3049
  msgid "IPTC"
3050
  msgstr ""
3051
 
3052
+ #: includes/class-mla-options.php:4692 includes/class-mla-options.php:4742
3053
+ #: includes/class-mla-options.php:4861 includes/class-mla-options.php:4903
3054
+ #: includes/class-mla-options.php:4928
3055
  msgid "EXIF"
3056
  msgstr ""
3057
 
3058
+ #: includes/class-mla-options.php:4717 includes/class-mla-options.php:4803
3059
+ #: includes/class-mla-options.php:4941
3060
  msgid "EXIF/Template Value"
3061
  msgstr ""
3062
 
3063
  #. translators: 1: ERROR tag 2: option name
3064
+ #: includes/class-mla-options.php:4951
3065
  #, php-format
3066
  msgid "%1$s: Render unknown custom %2$s."
3067
  msgstr ""
3068
 
3069
  #. translators: 1: ERROR tag 2: option name
3070
+ #: includes/class-mla-options.php:4995
3071
  #, php-format
3072
  msgid "%1$s: Update/delete unknown custom %2$s."
3073
  msgstr ""
3074
 
3075
+ #: includes/class-mla-options.php:5001
3076
  msgid "IPTC/EXIF mapping settings updated."
3077
  msgstr ""
3078
 
3079
+ #: includes/class-mla-options.php:5003
3080
  msgid "IPTC/EXIF settings update failed."
3081
  msgstr ""
3082
 
3083
+ #: includes/class-mla-options.php:5006 includes/class-mla-settings.php:890
3084
+ #: includes/class-mla-settings.php:896
3085
  msgid "IPTC/EXIF no mapping changes detected."
3086
  msgstr ""
3087
 
3088
  #. translators: 1: field type
3089
+ #: includes/class-mla-options.php:5017 includes/class-mla-options.php:5027
3090
+ #: includes/class-mla-options.php:5037 includes/class-mla-settings.php:3390
3091
  #, php-format
3092
  msgid "%1$s settings saved."
3093
  msgstr ""
3094
 
3095
+ #: includes/class-mla-options.php:5017 includes/class-mla-options.php:5020
3096
+ #: includes/class-mla-settings.php:3635 includes/class-mla-settings.php:3674
3097
+ #: includes/class-mla-settings.php:3677
3098
  msgid "Standard field"
3099
  msgstr ""
3100
 
3101
  #. translators: 1: ERROR tag 2: field type
3102
+ #: includes/class-mla-options.php:5020 includes/class-mla-options.php:5030
3103
+ #: includes/class-mla-options.php:5040
3104
  #, php-format
3105
  msgid "%1$s: IPTC/EXIF %2$s settings update failed."
3106
  msgstr ""
3107
 
3108
+ #: includes/class-mla-options.php:5027 includes/class-mla-options.php:5030
3109
+ #: includes/class-mla-settings.php:3706 includes/class-mla-settings.php:3745
3110
+ #: includes/class-mla-settings.php:3748
3111
  msgid "Taxonomy term"
3112
  msgstr ""
3113
 
3114
+ #: includes/class-mla-options.php:5037 includes/class-mla-options.php:5040
3115
+ #: includes/class-mla-settings.php:3535 includes/class-mla-settings.php:3538
3116
+ #: includes/class-mla-settings.php:3792 includes/class-mla-settings.php:3831
3117
+ #: includes/class-mla-settings.php:3834
3118
  msgid "Custom field"
3119
  msgstr ""
3120
 
3121
  #. translators: 1: ERROR tag 2: option name, e.g., taxonomy_support
3122
+ #: includes/class-mla-options.php:5048
3123
  #, php-format
3124
  msgid "%1$s: Reset unknown custom %2$s"
3125
  msgstr ""
3126
 
3127
+ #: includes/class-mla-polylang-support.php:264
3128
+ msgid "ERROR: No post ID found"
3129
+ msgstr ""
3130
+
3131
+ #: includes/class-mla-polylang-support.php:365
3132
+ msgid "Error while saving the translations."
3133
+ msgstr ""
3134
+
3135
+ #: includes/class-mla-polylang-support.php:366
3136
+ msgid "Remove From Bulk Translate"
3137
+ msgstr ""
3138
+
3139
+ #: includes/class-mla-polylang-support.php:368
3140
+ msgid "Bulk Translate items"
3141
+ msgstr ""
3142
+
3143
+ #: includes/class-mla-polylang-support.php:369
3144
+ msgid "Add new"
3145
+ msgstr ""
3146
+
3147
+ #: includes/class-mla-polylang-support.php:1125
3148
+ #: includes/class-mla-polylang-support.php:1128
3149
+ msgid "Attached"
3150
+ msgstr ""
3151
+
3152
+ #: includes/class-mla-polylang-support.php:1494
3153
+ #: includes/class-mla-polylang-support.php:1814
3154
+ msgid "Bulk Translations"
3155
+ msgstr ""
3156
+
3157
+ #: includes/class-mla-polylang-support.php:1518
3158
+ msgid "Translate"
3159
+ msgstr ""
3160
+
3161
+ #: includes/class-mla-polylang-support.php:1634
3162
+ msgid "All Languages"
3163
+ msgstr ""
3164
+
3165
+ #: includes/class-mla-polylang-support.php:1641
3166
+ #: includes/class-mla-polylang-support.php:1887
3167
+ #: includes/class-mla-polylang-support.php:2013
3168
+ msgid "Quick Translate"
3169
+ msgstr ""
3170
+
3171
+ #: includes/class-mla-polylang-support.php:1645
3172
+ msgid "Set Language"
3173
+ msgstr ""
3174
+
3175
+ #: includes/class-mla-polylang-support.php:1646
3176
+ #: includes/class-mla-polylang-support.php:2020
3177
+ msgid "Bulk Translate"
3178
+ msgstr ""
3179
+
3180
+ #: includes/class-mla-polylang-support.php:1647
3181
+ msgid "Add or Modify Translation"
3182
+ msgstr ""
3183
+
3184
+ #: includes/class-mla-polylang-support.php:1648
3185
+ #: includes/class-mla-polylang-support.php:1689
3186
+ #: includes/class-mla-polylang-support.php:1959
3187
+ #: includes/class-mla-wpml-support.php:1105
3188
+ #: includes/class-mla-wpml-support.php:1603
3189
+ msgid "Language"
3190
+ msgstr ""
3191
+
3192
+ #: includes/class-mla-polylang-support.php:1650
3193
+ msgid "Options"
3194
+ msgstr ""
3195
+
3196
+ #: includes/class-mla-polylang-support.php:1887
3197
+ msgid "Translate this item inline"
3198
+ msgstr ""
3199
+
3200
+ #: includes/class-mla-polylang-support.php:1994
3201
+ #: includes/class-mla-polylang-support.php:2083
3202
+ #: includes/class-mla-wpml-support.php:1140
3203
+ #: includes/class-mla-wpml-support.php:1215
3204
+ msgid "Media/Assistant submenu table"
3205
+ msgstr ""
3206
+
3207
+ #: includes/class-mla-polylang-support.php:1999
3208
+ #: includes/class-mla-wpml-support.php:1145
3209
+ msgid "Language Column"
3210
+ msgstr ""
3211
+
3212
+ #: includes/class-mla-polylang-support.php:2002
3213
+ #: includes/class-mla-wpml-support.php:1148
3214
+ msgid ""
3215
+ "Check this option to add a Language column to the Media/Assistant submenu "
3216
+ "table."
3217
+ msgstr ""
3218
+
3219
+ #: includes/class-mla-polylang-support.php:2006
3220
+ #: includes/class-mla-wpml-support.php:1152
3221
+ msgid "Translations Column"
3222
+ msgstr ""
3223
+
3224
+ #: includes/class-mla-polylang-support.php:2009
3225
+ #: includes/class-mla-wpml-support.php:1155
3226
+ msgid ""
3227
+ "Check this option to add a Translation Status column to the Media/Assistant "
3228
+ "submenu table."
3229
+ msgstr ""
3230
+
3231
+ #: includes/class-mla-polylang-support.php:2016
3232
+ msgid ""
3233
+ "Check this option to add a Quick Translate rollover action to the Media/"
3234
+ "Assistant submenu table."
3235
+ msgstr ""
3236
+
3237
+ #: includes/class-mla-polylang-support.php:2023
3238
+ msgid ""
3239
+ "Check this option to add \"Translate\" to the \"Bulk Actions\" control on "
3240
+ "the Media/Assistant submenu table."
3241
+ msgstr ""
3242
+
3243
+ #: includes/class-mla-polylang-support.php:2027
3244
+ #: includes/class-mla-polylang-support.php:2083
3245
+ #: includes/class-mla-wpml-support.php:1159
3246
+ #: includes/class-mla-wpml-support.php:1215
3247
+ msgid "Term Management"
3248
+ msgstr ""
3249
+
3250
+ #: includes/class-mla-polylang-support.php:2032
3251
+ #: includes/class-mla-wpml-support.php:1164
3252
+ msgid "Term Assignment"
3253
+ msgstr ""
3254
+
3255
+ #: includes/class-mla-polylang-support.php:2035
3256
+ #: includes/class-mla-wpml-support.php:1167
3257
+ msgid ""
3258
+ "Check this option to assign language-specific terms when items are updated."
3259
+ msgstr ""
3260
+
3261
+ #: includes/class-mla-polylang-support.php:2039
3262
+ #: includes/class-mla-wpml-support.php:1171
3263
+ msgid "Term Synchronization"
3264
+ msgstr ""
3265
+
3266
+ #: includes/class-mla-polylang-support.php:2042
3267
+ #: includes/class-mla-wpml-support.php:1174
3268
+ msgid ""
3269
+ "Check this option to synchronize common terms among all item translations."
3270
+ msgstr ""
3271
+
3272
+ #: includes/class-mla-polylang-support.php:2081
3273
+ #: includes/class-mla-wpml-support.php:1213
3274
+ msgid "Language Options"
3275
+ msgstr ""
3276
+
3277
+ #. translators: 1: - 4: page subheader values
3278
+ #: includes/class-mla-polylang-support.php:2083
3279
+ #, php-format
3280
+ msgid ""
3281
+ "In this tab you can find a number of options for controlling Polylang-"
3282
+ "specific operations. Scroll down to find options for %1$s and %2$s. Be sure "
3283
+ "to click \"Save Changes\" at the bottom of the tab to save any changes you "
3284
+ "make."
3285
+ msgstr ""
3286
+
3287
+ #. translators: 1: Documentation hyperlink
3288
+ #: includes/class-mla-polylang-support.php:2085
3289
+ #: includes/class-mla-wpml-support.php:1217
3290
+ #, php-format
3291
+ msgid ""
3292
+ "You can find more information about multilingual features in the %1$s "
3293
+ "section of the Documentation."
3294
+ msgstr ""
3295
+
3296
+ #: includes/class-mla-polylang-support.php:2085
3297
+ #: includes/class-mla-wpml-support.php:1217
3298
+ msgid "Language Options documentation"
3299
+ msgstr ""
3300
+
3301
+ #: includes/class-mla-polylang-support.php:2085
3302
+ #: includes/class-mla-wpml-support.php:1217
3303
+ msgid "WPML &amp; Polylang Multilingual Support; the MLA Language Tab"
3304
+ msgstr ""
3305
+
3306
+ #: includes/class-mla-polylang-support.php:2087
3307
+ #: includes/class-mla-settings.php:1340 includes/class-mla-settings.php:1698
3308
+ #: includes/class-mla-settings.php:1751 includes/class-mla-settings.php:2167
3309
+ #: includes/class-mla-settings.php:2217 includes/class-mla-settings.php:2305
3310
+ #: includes/class-mla-settings.php:2728 includes/class-mla-settings.php:2731
3311
+ #: includes/class-mla-settings.php:2870 includes/class-mla-settings.php:2872
3312
+ #: includes/class-mla-settings.php:3053 includes/class-mla-settings.php:3055
3313
+ #: includes/class-mla-wpml-support.php:1219
3314
+ msgid "Save Changes"
3315
+ msgstr ""
3316
+
3317
+ #: includes/class-mla-polylang-support.php:2088
3318
+ #: includes/class-mla-wpml-support.php:1220
3319
+ msgid "Delete Language options and restore default settings"
3320
+ msgstr ""
3321
+
3322
+ #: includes/class-mla-polylang-support.php:2091
3323
+ #: includes/class-mla-settings.php:1079 includes/class-mla-settings.php:1345
3324
+ #: includes/class-mla-settings.php:2300
3325
+ #: includes/class-mla-wpml-support.php:1223
3326
+ msgid "Go to Top"
3327
+ msgstr ""
3328
+
3329
+ #: includes/class-mla-polylang-support.php:2128
3330
+ #: includes/class-mla-wpml-support.php:1260
3331
+ msgid "Language settings saved."
3332
+ msgstr ""
3333
+
3334
+ #. translators: 1: option name
3335
+ #: includes/class-mla-polylang-support.php:2159
3336
+ #: includes/class-mla-settings.php:4011
3337
+ #: includes/class-mla-wpml-support.php:1291
3338
+ #, php-format
3339
+ msgctxt "message_list"
3340
+ msgid "delete_option \"%1$s\""
3341
+ msgstr ""
3342
+
3343
+ #: includes/class-mla-polylang-support.php:2167
3344
+ #: includes/class-mla-wpml-support.php:1299
3345
+ msgid "Language settings reset to default values."
3346
+ msgstr ""
3347
+
3348
  #: includes/class-mla-settings.php:339
3349
  msgid "no slug"
3350
  msgstr ""
3351
 
3352
+ #: includes/class-mla-settings.php:355
3353
  msgid "Running"
3354
  msgstr ""
3355
 
3356
+ #: includes/class-mla-settings.php:360
3357
  msgid "Skipped"
3358
  msgstr ""
3359
 
3360
+ #: includes/class-mla-settings.php:361
3361
  msgid "Reprocessed"
3362
  msgstr ""
3363
 
3364
+ #: includes/class-mla-settings.php:447 includes/class-mla-settings.php:960
3365
+ #: includes/class-mla-settings.php:3096
3366
  msgid "Settings"
3367
  msgstr ""
3368
 
3369
+ #: includes/class-mla-settings.php:466
3370
  msgid "Views per page"
3371
  msgstr ""
3372
 
3373
+ #: includes/class-mla-settings.php:477
3374
  msgid "Types per page"
3375
  msgstr ""
3376
 
3377
+ #: includes/class-mla-settings.php:488
3378
  msgid "Upload types per page"
3379
  msgstr ""
3380
 
3381
+ #: includes/class-mla-settings.php:624
3382
  msgid "No view slug found"
3383
  msgstr ""
3384
 
3385
+ #: includes/class-mla-settings.php:667
3386
  msgid "No upload slug found"
3387
  msgstr ""
3388
 
3389
+ #: includes/class-mla-settings.php:707 includes/class-mla-settings.php:2729
3390
+ #: includes/class-mla-settings.php:2733
3391
  msgid "Map All Rules, All Attachments Now"
3392
  msgstr ""
3393
 
3394
+ #: includes/class-mla-settings.php:831 includes/class-mla-settings.php:2862
3395
  msgid "Map All Attachments, Standard Fields Now"
3396
  msgstr ""
3397
 
3398
+ #: includes/class-mla-settings.php:834 includes/class-mla-settings.php:2865
3399
  msgid "Map All Attachments, Taxonomy Terms Now"
3400
  msgstr ""
3401
 
3402
+ #: includes/class-mla-settings.php:837 includes/class-mla-settings.php:2868
3403
  msgid "Map All Attachments, Custom Fields Now"
3404
  msgstr ""
3405
 
3406
  #. translators: 1: ERROR tag 2: function name 3: option type, e.g., radio, select, text
3407
+ #: includes/class-mla-settings.php:1009 includes/class-mla-settings.php:1042
3408
+ #: includes/class-mla-settings.php:1181
3409
  #, php-format
3410
  msgctxt "error_log"
3411
  msgid "%1$s: %2$s unknown type = \"%3$s\""
3412
  msgstr ""
3413
 
3414
+ #: includes/class-mla-settings.php:1230
 
 
 
 
 
3415
  msgid "General"
3416
  msgstr ""
3417
 
3418
+ #: includes/class-mla-settings.php:1231
3419
  msgid "Views"
3420
  msgstr ""
3421
 
3422
+ #: includes/class-mla-settings.php:1232
3423
  msgid "Uploads"
3424
  msgstr ""
3425
 
3426
+ #: includes/class-mla-settings.php:1233 includes/class-mla-settings.php:3390
3427
+ #: includes/class-mla-settings.php:3393
3428
  msgid "MLA Gallery"
3429
  msgstr ""
3430
 
3431
+ #: includes/class-mla-settings.php:1234
3432
  msgid "Custom Fields"
3433
  msgstr ""
3434
 
3435
+ #: includes/class-mla-settings.php:1236
3436
  msgid "Documentation"
3437
  msgstr ""
3438
 
3439
+ #: includes/class-mla-settings.php:1237
3440
  msgid "Debug"
3441
  msgstr ""
3442
 
3443
+ #: includes/class-mla-settings.php:1337
3444
  msgid "General Processing Options"
3445
  msgstr ""
3446
 
3447
  #. translators: 1: - 4: page subheader values
3448
+ #: includes/class-mla-settings.php:1339
3449
  #, php-format
3450
  msgid ""
3451
  "In this tab you can find a number of options for controlling the "
3454
  "any changes you make."
3455
  msgstr ""
3456
 
3457
+ #: includes/class-mla-settings.php:1339
3458
  msgid "Media/Assistant Table Defaults"
3459
  msgstr ""
3460
 
3461
+ #: includes/class-mla-settings.php:1339
3462
  msgid "Media Manager Enhancements"
3463
  msgstr ""
3464
 
3465
+ #: includes/class-mla-settings.php:1341
 
 
 
 
 
 
 
 
 
3466
  msgid "Export ALL Settings"
3467
  msgstr ""
3468
 
3469
+ #: includes/class-mla-settings.php:1342
3470
  msgid "Delete General options and restore default settings"
3471
  msgstr ""
3472
 
3473
+ #: includes/class-mla-settings.php:1346
3474
  msgid "Support Our Work"
3475
  msgstr ""
3476
 
3477
+ #: includes/class-mla-settings.php:1347 includes/class-mla-settings.php:1350
3478
  msgid "Donate to FTJ"
3479
  msgstr ""
3480
 
3481
+ #: includes/class-mla-settings.php:1348 includes/class-mla-settings.php:3088
3482
  msgid "Donate"
3483
  msgstr ""
3484
 
3485
  #. translators: 1: donation hyperlink
3486
+ #: includes/class-mla-settings.php:1350
3487
  #, php-format
3488
  msgid ""
3489
  "This plugin was inspired by my work on the WordPress web site for our "
3492
  "our work. Thank you!"
3493
  msgstr ""
3494
 
3495
+ #: includes/class-mla-settings.php:1350
3496
  msgid "tax-deductible donation"
3497
  msgstr ""
3498
 
3499
+ #: includes/class-mla-settings.php:1371
3500
  msgid "enhanced version of the WordPress [gallery] shortcode."
3501
  msgstr ""
3502
 
3503
+ #: includes/class-mla-settings.php:1372
3504
  msgid "enhanced version of the WordPress Tag Cloud."
3505
  msgstr ""
3506
 
3507
+ #: includes/class-mla-settings.php:1384
3508
  msgid "Shortcodes made available by this plugin"
3509
  msgstr ""
3510
 
3511
+ #: includes/class-mla-settings.php:1492
3512
  msgid "Edit View"
3513
  msgstr ""
3514
 
3515
+ #: includes/class-mla-settings.php:1498 includes/class-mla-settings.php:1755
3516
  msgid ""
3517
  "The &#8220;slug&#8221; is the URL-friendly, unique key for the view. It must "
3518
  "be all lowercase and contain only letters, numbers, periods (.), slashes (/) "
3521
  "MIME</strong> type, e.g., &#8220;image&#8221; or &#8220;image/jpeg&#8221;."
3522
  msgstr ""
3523
 
3524
+ #: includes/class-mla-settings.php:1499 includes/class-mla-settings.php:1756
3525
  msgid "Singular Label"
3526
  msgstr ""
3527
 
3528
+ #: includes/class-mla-settings.php:1500 includes/class-mla-settings.php:1757
3529
  msgid "Plural Label"
3530
  msgstr ""
3531
 
3532
+ #: includes/class-mla-settings.php:1501 includes/class-mla-settings.php:1758
3533
  msgid ""
3534
  "The labels, e.g., &#8220;Image&#8221; and &#8220;Images&#8221; are used for "
3535
  "column headers and other display purposes."
3536
  msgstr ""
3537
 
3538
+ #: includes/class-mla-settings.php:1502 includes/class-mla-settings.php:1759
3539
  msgid "Specification"
3540
  msgstr ""
3541
 
3542
+ #: includes/class-mla-settings.php:1503 includes/class-mla-settings.php:1760
3543
  msgid ""
3544
  "If the MIME type specification differs from the slug, enter it here. You may "
3545
  "include multiple MIME types, e.g., &#8220;audio,video&#8221; and/or wildcard "
3547
  "MIME Type box is checked."
3548
  msgstr ""
3549
 
3550
+ #: includes/class-mla-settings.php:1504 includes/class-mla-settings.php:1761
3551
  msgid "Post MIME Type"
3552
  msgstr ""
3553
 
3554
+ #: includes/class-mla-settings.php:1505 includes/class-mla-settings.php:1762
3555
  msgid ""
3556
  "Check this box if you want to add this entry to the list of MIME types "
3557
  "returned by wp_get_mime_types()."
3558
  msgstr ""
3559
 
3560
+ #: includes/class-mla-settings.php:1506 includes/class-mla-settings.php:1763
3561
  msgid "Table View"
3562
  msgstr ""
3563
 
3564
+ #: includes/class-mla-settings.php:1507 includes/class-mla-settings.php:1764
3565
  msgid ""
3566
  "Check this box if you want to add this entry to the list of Media/Assistant "
3567
  "table views."
3568
  msgstr ""
3569
 
3570
+ #: includes/class-mla-settings.php:1509 includes/class-mla-settings.php:1766
3571
  msgid ""
3572
  "You can choose your own table view order by entering a number (1 for first, "
3573
  "etc.) in this field."
3574
  msgstr ""
3575
 
3576
+ #: includes/class-mla-settings.php:1511 includes/class-mla-settings.php:1768
3577
+ #: includes/class-mla-settings.php:1866 includes/class-mla-settings.php:2230
3578
  msgid ""
3579
  "The description can contain any documentation or notes you need to "
3580
  "understand or use the item."
3581
  msgstr ""
3582
 
3583
  #. translators: 1: bulk_action, e.g., delete, edit, restore, trash
3584
+ #: includes/class-mla-settings.php:1622 includes/class-mla-settings.php:2088
3585
  #, php-format
3586
  msgid "Unknown bulk action %1$s"
3587
  msgstr ""
3588
 
3589
  #. translators: 1: view name/slug
3590
+ #: includes/class-mla-settings.php:1661 includes/class-mla-settings.php:2130
3591
  #, php-format
3592
  msgid "Edit view \"%1$s\" cancelled."
3593
  msgstr ""
3594
 
3595
+ #: includes/class-mla-settings.php:1695
3596
  msgid "View and Post MIME Type Support is disabled"
3597
  msgstr ""
3598
 
3599
+ #: includes/class-mla-settings.php:1740 includes/class-mla-settings.php:1743
3600
  msgid "Library Views/Post MIME Type Processing"
3601
  msgstr ""
3602
 
3603
+ #: includes/class-mla-settings.php:1741
3604
  msgid ""
3605
  "In this tab you can manage the list of \"Post MIME Types\", which are used "
3606
  "by WordPress to define the views for the <em><strong>Media/Library</strong></"
3612
  msgstr ""
3613
 
3614
  #. translators: 1: Documentation hyperlink
3615
+ #: includes/class-mla-settings.php:1743
3616
  #, php-format
3617
  msgid ""
3618
  "You can find more information about library views, Post MIME types and how "
3621
  "screen."
3622
  msgstr ""
3623
 
3624
+ #: includes/class-mla-settings.php:1743
3625
  msgid "Library View Processing documentation"
3626
  msgstr ""
3627
 
3628
+ #: includes/class-mla-settings.php:1747 includes/class-mla-settings.php:1936
3629
+ #: includes/class-mla-settings.php:2242
3630
  msgid "Displaying search results for"
3631
  msgstr ""
3632
 
3633
+ #: includes/class-mla-settings.php:1748
3634
  msgid "Search Views"
3635
  msgstr ""
3636
 
3637
+ #: includes/class-mla-settings.php:1769
3638
  msgid "Add View"
3639
  msgstr ""
3640
 
3641
+ #: includes/class-mla-settings.php:1771 includes/class-mla-settings.php:2235
3642
  msgid "<strong>Quick Edit</strong>"
3643
  msgstr ""
3644
 
3645
+ #: includes/class-mla-settings.php:1851
3646
  msgid "Edit Upload MIME Type"
3647
  msgstr ""
3648
 
3649
+ #: includes/class-mla-settings.php:1857
3650
  msgid ""
3651
  "The &#8220;extension&#8221; is the file extension for this type, and a "
3652
  "unique key for the item. It must be all lowercase and contain only letters "
3653
  "and numbers."
3654
  msgstr ""
3655
 
3656
+ #: includes/class-mla-settings.php:1859 includes/class-mla-settings.php:2224
3657
  msgid ""
3658
  "The MIME Type must be all lowercase and contain only letters, numbers, "
3659
  "periods (.), slashes (/) and hyphens (-). It <strong>must be a valid MIME</"
3660
  "strong> type, e.g., &#8220;image&#8221; or &#8220;image/jpeg&#8221;."
3661
  msgstr ""
3662
 
3663
+ #: includes/class-mla-settings.php:1860 includes/class-mla-settings.php:2225
3664
  msgid "Icon Type"
3665
  msgstr ""
3666
 
3667
+ #: includes/class-mla-settings.php:1862 includes/class-mla-settings.php:2226
3668
  msgid ""
3669
  "The Icon Type selects a thumbnail image displayed for non-image file types, "
3670
  "such as PDF documents."
3671
  msgstr ""
3672
 
3673
+ #: includes/class-mla-settings.php:1863 includes/class-mla-settings.php:2227
3674
  #: includes/class-mla-upload-list-table.php:415
3675
  msgid "Inactive"
3676
  msgstr ""
3677
 
3678
+ #: includes/class-mla-settings.php:1864 includes/class-mla-settings.php:2228
3679
  msgid ""
3680
  "Check this box if you want to remove this entry from the list of Upload MIME "
3681
  "Types returned by get_allowed_mime_types()."
3682
  msgstr ""
3683
 
3684
+ #: includes/class-mla-settings.php:1935
3685
  msgid "Known File Extension/MIME Type Associations"
3686
  msgstr ""
3687
 
3688
+ #: includes/class-mla-settings.php:1937
3689
  msgid "Search Known MIME Types"
3690
  msgstr ""
3691
 
3692
+ #: includes/class-mla-settings.php:1939 includes/class-mla-settings.php:2213
3693
  msgid "To search by extension, use \".\", e.g., \".doc\""
3694
  msgstr ""
3695
 
3696
+ #: includes/class-mla-settings.php:2164
3697
  msgid "Upload MIME Type Support is disabled"
3698
  msgstr ""
3699
 
3700
+ #: includes/class-mla-settings.php:2207 includes/class-mla-settings.php:2210
3701
  msgid "File Extension and MIME Type Processing"
3702
  msgstr ""
3703
 
3704
+ #: includes/class-mla-settings.php:2208
3705
  msgid ""
3706
  "In this tab you can manage the list of file extension/MIME Type "
3707
  "associations, which are used by WordPress to decide what kind of files can "
3711
  msgstr ""
3712
 
3713
  #. translators: 1: Documentation hyperlink
3714
+ #: includes/class-mla-settings.php:2210
3715
  #, php-format
3716
  msgid ""
3717
  "You can find more information about file extensions, MIME types and how "
3719
  "the <strong>\"Help\"</strong> tab in the upper-right corner of this screen."
3720
  msgstr ""
3721
 
3722
+ #: includes/class-mla-settings.php:2210
3723
  msgid "File Extension Processing documentation"
3724
  msgstr ""
3725
 
3726
+ #: includes/class-mla-settings.php:2212
3727
  msgid "Search Uploads"
3728
  msgstr ""
3729
 
3730
+ #: includes/class-mla-settings.php:2219
3731
  msgid "Upload MIME Type"
3732
  msgstr ""
3733
 
3734
+ #: includes/class-mla-settings.php:2220
3735
  msgid ""
3736
  "To search the database of over 1,500 known extension/type associations, "
3737
  "click \"Search Known Types\" below the form."
3738
  msgstr ""
3739
 
3740
+ #: includes/class-mla-settings.php:2222
3741
  msgid ""
3742
  "The &#8220;extension&#8221; is the file extension for this type, and unique "
3743
  "key for the item. It must be all lowercase and contain only letters and "
3744
  "numbers."
3745
  msgstr ""
3746
 
3747
+ #: includes/class-mla-settings.php:2231
3748
  msgid "Add Upload MIME Type"
3749
  msgstr ""
3750
 
3751
+ #: includes/class-mla-settings.php:2233
3752
  msgid "Search Known Types"
3753
  msgstr ""
3754
 
3755
+ #: includes/class-mla-settings.php:2241
3756
  #: includes/class-mla-upload-list-table.php:417
3757
  msgid "Active"
3758
  msgstr ""
3759
 
3760
+ #: includes/class-mla-settings.php:2294
3761
  msgid "MLA Gallery Options"
3762
  msgstr ""
3763
 
3764
+ #: includes/class-mla-settings.php:2295
3765
  msgid "Go to Style Templates"
3766
  msgstr ""
3767
 
3768
+ #: includes/class-mla-settings.php:2296
3769
  msgid "Go to Markup Templates"
3770
  msgstr ""
3771
 
3772
+ #: includes/class-mla-settings.php:2297
3773
  msgid ""
3774
  "In this tab you can view the default style and markup templates. You can "
3775
  "also define additional templates and use the <code>mla_style</code> and "
3779
  "Changes\" at the bottom of this page."
3780
  msgstr ""
3781
 
3782
+ #: includes/class-mla-settings.php:2301
3783
  msgid "Style Templates"
3784
  msgstr ""
3785
 
3786
+ #: includes/class-mla-settings.php:2303
3787
  msgid "Markup Templates"
3788
  msgstr ""
3789
 
3790
+ #: includes/class-mla-settings.php:2316
3791
  msgid "Theme"
3792
  msgstr ""
3793
 
3794
+ #: includes/class-mla-settings.php:2364
3795
  msgid ""
3796
  "This default template cannot be altered or deleted, but you can copy the "
3797
  "styles."
3798
  msgstr ""
3799
 
3800
+ #: includes/class-mla-settings.php:2375 includes/class-mla-settings.php:2408
3801
+ #: includes/class-mla-settings.php:2434
3802
  msgid "Styles"
3803
  msgstr ""
3804
 
3805
+ #: includes/class-mla-settings.php:2379 includes/class-mla-settings.php:2412
3806
+ #: includes/class-mla-settings.php:2438
3807
  msgid ""
3808
  "List of substitution parameters, e.g., [+selector+], on Documentation tab."
3809
  msgstr ""
3810
 
3811
+ #: includes/class-mla-settings.php:2396 includes/class-mla-settings.php:2514
3812
  msgid "Delete this template"
3813
  msgstr ""
3814
 
3815
+ #: includes/class-mla-settings.php:2397 includes/class-mla-settings.php:2515
3816
  msgid ""
3817
  "Check the box to delete this template when you press Update at the bottom of "
3818
  "the page."
3819
  msgstr ""
3820
 
3821
+ #: includes/class-mla-settings.php:2423
3822
  msgid "Fill in a name and styles to add a new template."
3823
  msgstr ""
3824
 
3825
+ #: includes/class-mla-settings.php:2458
3826
  msgid ""
3827
  "This default template cannot be altered or deleted, but you can copy the "
3828
  "markup."
3829
  msgstr ""
3830
 
3831
+ #: includes/class-mla-settings.php:2470 includes/class-mla-settings.php:2527
3832
+ #: includes/class-mla-settings.php:2577
3833
  msgid "Open"
3834
  msgstr ""
3835
 
3836
+ #: includes/class-mla-settings.php:2474 includes/class-mla-settings.php:2531
3837
+ #: includes/class-mla-settings.php:2581
3838
  msgid ""
3839
  "Markup for the beginning of the gallery. List of parameters, e.g., [+selector"
3840
  "+], on Documentation tab."
3841
  msgstr ""
3842
 
3843
+ #: includes/class-mla-settings.php:2476 includes/class-mla-settings.php:2533
3844
+ #: includes/class-mla-settings.php:2583
3845
  msgid "Row"
3846
  msgstr ""
3847
 
3848
+ #: includes/class-mla-settings.php:2480 includes/class-mla-settings.php:2587
3849
  msgid "Markup for the beginning of each row in the gallery."
3850
  msgstr ""
3851
 
3852
+ #: includes/class-mla-settings.php:2482 includes/class-mla-settings.php:2539
3853
+ #: includes/class-mla-settings.php:2589
3854
  msgid "Item"
3855
  msgstr ""
3856
 
3857
+ #: includes/class-mla-settings.php:2486 includes/class-mla-settings.php:2593
3858
  msgid "Markup for each item/cell of the gallery."
3859
  msgstr ""
3860
 
3861
+ #: includes/class-mla-settings.php:2488 includes/class-mla-settings.php:2545
3862
+ #: includes/class-mla-settings.php:2595 includes/class-mla-settings.php:2709
3863
+ #: includes/class-mla-settings.php:2845
3864
  msgid "Close"
3865
  msgstr ""
3866
 
3867
+ #: includes/class-mla-settings.php:2492 includes/class-mla-settings.php:2599
3868
  msgid "Markup for the end of each row in the gallery."
3869
  msgstr ""
3870
 
3871
+ #: includes/class-mla-settings.php:2497 includes/class-mla-settings.php:2554
3872
+ #: includes/class-mla-settings.php:2604
3873
  msgid "Markup for the end of the gallery."
3874
  msgstr ""
3875
 
3876
+ #: includes/class-mla-settings.php:2537
3877
  msgid "Markup for the beginning of each row."
3878
  msgstr ""
3879
 
3880
+ #: includes/class-mla-settings.php:2543
3881
  msgid "Markup for each item/cell."
3882
  msgstr ""
3883
 
3884
+ #: includes/class-mla-settings.php:2549
3885
  msgid "Markup for the end of each row."
3886
  msgstr ""
3887
 
3888
+ #: includes/class-mla-settings.php:2565
3889
  msgid "Fill in a name and markup to add a new template."
3890
  msgstr ""
3891
 
3892
+ #: includes/class-mla-settings.php:2701
3893
  msgid "Custom Field Mapping Progress"
3894
  msgstr ""
3895
 
3896
+ #: includes/class-mla-settings.php:2702 includes/class-mla-settings.php:2838
3897
  msgid "DO NOT DO THE FOLLOWING (they will cause mapping to fail)"
3898
  msgstr ""
3899
 
3900
+ #: includes/class-mla-settings.php:2703 includes/class-mla-settings.php:2839
3901
  msgid "Close the window"
3902
  msgstr ""
3903
 
3904
+ #: includes/class-mla-settings.php:2704 includes/class-mla-settings.php:2840
3905
  msgid "Reload the page"
3906
  msgstr ""
3907
 
3908
+ #: includes/class-mla-settings.php:2705 includes/class-mla-settings.php:2841
3909
  msgid "Click the browser&rsquo;s Stop, Back or forward buttons"
3910
  msgstr ""
3911
 
3912
+ #: includes/class-mla-settings.php:2706 includes/class-mla-settings.php:2842
3913
  msgid "Progress"
3914
  msgstr ""
3915
 
3916
+ #: includes/class-mla-settings.php:2708 includes/class-mla-settings.php:2844
3917
  msgid "Resume"
3918
  msgstr ""
3919
 
3920
+ #: includes/class-mla-settings.php:2718 includes/class-mla-settings.php:2722
3921
  msgid "Custom Field and Attachment Metadata Processing Options"
3922
  msgstr ""
3923
 
3924
  #. translators: 1: Documentation hyperlink
3925
+ #: includes/class-mla-settings.php:2720
3926
  #, php-format
3927
  msgid ""
3928
  "In this tab you can define the rules for mapping several types of image "
3932
  "field. See the %1$s section of the Documentation for details."
3933
  msgstr ""
3934
 
3935
+ #: includes/class-mla-settings.php:2720
3936
  msgid "Updating Attachment Metadata Documentation"
3937
  msgstr ""
3938
 
3939
+ #: includes/class-mla-settings.php:2720
3940
  msgid "Adding or changing Attachment Metadata"
3941
  msgstr ""
3942
 
3943
  #. translators: 1: Documentation hyperlink
3944
+ #: includes/class-mla-settings.php:2722 includes/class-mla-settings.php:2857
3945
  #, php-format
3946
  msgid ""
3947
  "You can find more information about using the controls in this tab to define "
3948
  "mapping rules and apply them in the %1$s section of the Documentation."
3949
  msgstr ""
3950
 
3951
+ #: includes/class-mla-settings.php:2722
3952
  msgid "Custom Field Options documentation"
3953
  msgstr ""
3954
 
3955
+ #: includes/class-mla-settings.php:2726 includes/class-mla-settings.php:2867
3956
  msgid "Custom field mapping"
3957
  msgstr ""
3958
 
3959
  #. translators: 1: "Save Changes"
3960
+ #: includes/class-mla-settings.php:2731
3961
  #, php-format
3962
  msgid ""
3963
  "Click %1$s to update the \"Enable custom field mapping...\" checkbox and/or "
3966
  msgstr ""
3967
 
3968
  #. translators: 1: "Map All Rules..."
3969
+ #: includes/class-mla-settings.php:2733
3970
  #, php-format
3971
  msgid ""
3972
  "Click %1$s to apply all the rules at once (rule changes will be applied but "
3973
  "not saved)."
3974
  msgstr ""
3975
 
3976
+ #: includes/class-mla-settings.php:2837
3977
  msgid "IPTC &amp; EXIF Mapping Progress"
3978
  msgstr ""
3979
 
3980
+ #: includes/class-mla-settings.php:2854 includes/class-mla-settings.php:2857
3981
  msgid "IPTC &amp; EXIF Processing Options"
3982
  msgstr ""
3983
 
3984
+ #: includes/class-mla-settings.php:2855
3985
  msgid ""
3986
  "In this tab you can define the rules for mapping IPTC (International Press "
3987
  "Telecommunications Council) and EXIF (EXchangeable Image File) metadata to "
3990
  "click \"Save Changes\" at the bottom of this page."
3991
  msgstr ""
3992
 
3993
+ #: includes/class-mla-settings.php:2857
3994
  msgid "IPTC/EXIF Options documentation"
3995
  msgstr ""
3996
 
3997
+ #: includes/class-mla-settings.php:2861
3998
  msgid "Standard field mapping"
3999
  msgstr ""
4000
 
4001
+ #: includes/class-mla-settings.php:2864
4002
  msgid "Taxonomy term mapping"
4003
  msgstr ""
4004
 
4005
  #. translators: 1: "Save Changes"
4006
+ #: includes/class-mla-settings.php:2872
4007
  #, php-format
4008
  msgid ""
4009
  "Click %1$s to update the \"Enable IPTC/EXIF mapping...\" checkbox and/or all "
4011
  "performed.</strong>"
4012
  msgstr ""
4013
 
4014
+ #: includes/class-mla-settings.php:2943
4015
  msgid "Debug settings saved."
4016
  msgstr ""
4017
 
4018
  #. translators: 1: ERROR tag 2: file type 3: file name
4019
+ #: includes/class-mla-settings.php:2988
4020
  #, php-format
4021
  msgid "%1$s: The %2$s file ( %3$s ) could not be reset."
4022
  msgstr ""
4023
 
4024
+ #: includes/class-mla-settings.php:2988 includes/class-mla-settings.php:3018
4025
+ #: includes/class-mla-settings.php:3030 includes/class-mla-settings.php:3037
4026
+ #: includes/class-mla-settings.php:3041
4027
  msgid "Error Log"
4028
  msgstr ""
4029
 
4030
  #. translators: 1: ERROR tag 2: file type 3: file name 4: error message
4031
+ #: includes/class-mla-settings.php:3018
4032
  #, php-format
4033
  msgid "%1$s: Reading the %2$s file ( %3$s ) \"%4$s\"."
4034
  msgstr ""
4035
 
4036
+ #: includes/class-mla-settings.php:3037
4037
  msgid "Reset"
4038
  msgstr ""
4039
 
4040
+ #: includes/class-mla-settings.php:3046 includes/class-mla-settings.php:3055
4041
  msgid "Debug Options"
4042
  msgstr ""
4043
 
4044
  #. translators: 1: "Save Changes"
4045
+ #: includes/class-mla-settings.php:3055
4046
  #, php-format
4047
  msgid "Click %1$s to update the %2$s."
4048
  msgstr ""
4049
 
4050
+ #: includes/class-mla-settings.php:3074
4051
  msgid "You do not have permission to manage plugin settings."
4052
  msgstr ""
4053
 
4054
+ #: includes/class-mla-settings.php:3108
4055
  msgid "Cannot render content tab"
4056
  msgstr ""
4057
 
4058
+ #: includes/class-mla-settings.php:3111
4059
  msgid "Unknown content tab"
4060
  msgstr ""
4061
 
4062
  #. translators: 1: template type 2: template name
4063
+ #: includes/class-mla-settings.php:3203 includes/class-mla-settings.php:3292
4064
  #, php-format
4065
  msgctxt "message_list"
4066
  msgid "Deleting %1$s \"%2$s\"."
4067
  msgstr ""
4068
 
4069
  #. translators: 1: ERROR tag 2: template name 3: template type
4070
+ #: includes/class-mla-settings.php:3214 includes/class-mla-settings.php:3305
4071
  #, php-format
4072
  msgid "%1$s: Reserved name \"%2$s\", new %3$s discarded."
4073
  msgstr ""
4074
 
4075
  #. translators: 1: ERROR tag 2: template name 3: template type
4076
+ #: includes/class-mla-settings.php:3220 includes/class-mla-settings.php:3311
4077
  #, php-format
4078
  msgid "%1$s: Duplicate name \"%2$s\", new %3$s discarded."
4079
  msgstr ""
4080
 
4081
  #. translators: 1: template type 2: template name
4082
+ #: includes/class-mla-settings.php:3224 includes/class-mla-settings.php:3315
4083
  #, php-format
4084
  msgctxt "message_list"
4085
  msgid "Adding new %1$s \"%2$s\"."
4086
  msgstr ""
4087
 
4088
  #. translators: 1: ERROR tag 2: element name 3: old value
4089
+ #: includes/class-mla-settings.php:3234 includes/class-mla-settings.php:3325
4090
  #, php-format
4091
  msgid "%1$s: Blank %2$s, reverting to \"%3$s\"."
4092
  msgstr ""
4093
 
4094
+ #: includes/class-mla-settings.php:3234 includes/class-mla-settings.php:3241
4095
+ #: includes/class-mla-settings.php:3245
4096
  msgid "style template name"
4097
  msgstr ""
4098
 
4099
  #. translators: 1: ERROR tag 2: element name 3: new value 4: old value
4100
+ #: includes/class-mla-settings.php:3241 includes/class-mla-settings.php:3332
4101
  #, php-format
4102
  msgid "%1$s: Duplicate new %2$s \"%3$s\", reverting to \"%4$s\"."
4103
  msgstr ""
4104
 
4105
  #. translators: 1: element name 2: old_value 3: new_value
4106
+ #: includes/class-mla-settings.php:3245 includes/class-mla-settings.php:3336
4107
  #, php-format
4108
  msgctxt "message_list"
4109
  msgid "Changing %1$s from \"%2$s\" to \"%3$s\""
4110
  msgstr ""
4111
 
4112
  #. translators: 1: template type 2: template name
4113
+ #: includes/class-mla-settings.php:3252
4114
  #, php-format
4115
  msgctxt "message_list"
4116
  msgid "Updating contents of %1$s \"%2$s\"."
4117
  msgstr ""
4118
 
4119
  #. translators: 1: ERROR tag 2: template type
4120
+ #: includes/class-mla-settings.php:3263 includes/class-mla-settings.php:3384
4121
  #, php-format
4122
  msgid "%1$s: Update of %2$s failed."
4123
  msgstr ""
4124
 
4125
+ #: includes/class-mla-settings.php:3325 includes/class-mla-settings.php:3332
4126
+ #: includes/class-mla-settings.php:3336
4127
  msgid "markup template name"
4128
  msgstr ""
4129
 
4130
  #. translators: 1: template name
4131
+ #: includes/class-mla-settings.php:3344
4132
  #, php-format
4133
  msgctxt "message_list"
4134
  msgid "Updating open markup for \"%1$s\"."
4135
  msgstr ""
4136
 
4137
  #. translators: 1: template name
4138
+ #: includes/class-mla-settings.php:3350
4139
  #, php-format
4140
  msgctxt "message_list"
4141
  msgid "Updating row open markup for \"%1$s\"."
4142
  msgstr ""
4143
 
4144
  #. translators: 1: template name
4145
+ #: includes/class-mla-settings.php:3356
4146
  #, php-format
4147
  msgctxt "message_list"
4148
  msgid "Updating item markup for \"%1$s\"."
4149
  msgstr ""
4150
 
4151
  #. translators: 1: template name
4152
+ #: includes/class-mla-settings.php:3362
4153
  #, php-format
4154
  msgctxt "message_list"
4155
  msgid "Updating row close markup for \"%1$s\"."
4156
  msgstr ""
4157
 
4158
  #. translators: 1: template name
4159
+ #: includes/class-mla-settings.php:3368
4160
  #, php-format
4161
  msgctxt "message_list"
4162
  msgid "Updating close markup for \"%1$s\"."
4163
  msgstr ""
4164
 
4165
  #. translators: 1: field type
4166
+ #: includes/class-mla-settings.php:3393
4167
  #, php-format
4168
  msgid "%1$s no changes detected."
4169
  msgstr ""
4170
 
4171
+ #: includes/class-mla-settings.php:3428
4172
  msgid "View settings saved."
4173
  msgstr ""
4174
 
4175
+ #: includes/class-mla-settings.php:3462
4176
  msgid "Upload MIME Type settings saved."
4177
  msgstr ""
4178
 
4179
+ #: includes/class-mla-settings.php:3505
4180
  msgid "No custom field mapping rules to process."
4181
  msgstr ""
4182
 
4183
  #. translators: 1: field type 2: examined count 3: updated count
4184
+ #: includes/class-mla-settings.php:3535 includes/class-mla-settings.php:3674
4185
+ #: includes/class-mla-settings.php:3745 includes/class-mla-settings.php:3831
4186
  #, php-format
4187
  msgid "%1$s mapping completed; %2$d attachment(s) examined, %3$d updated."
4188
  msgstr ""
4189
 
4190
  #. translators: 1: field type 2: examined count
4191
+ #: includes/class-mla-settings.php:3538 includes/class-mla-settings.php:3677
4192
+ #: includes/class-mla-settings.php:3748 includes/class-mla-settings.php:3834
4193
  #, php-format
4194
  msgid ""
4195
  "%1$s mapping completed; %2$d attachment(s) examined, no changes detected."
4196
  msgstr ""
4197
 
4198
  #. translators: 1: number of attachments
4199
+ #: includes/class-mla-settings.php:3569
4200
  #, php-format
4201
  msgid "%s attachment"
4202
  msgid_plural "%s attachments"
4204
  msgstr[1] ""
4205
 
4206
  #. translators: 1: singular/plural number of attachments
4207
+ #: includes/class-mla-settings.php:3571
4208
  #, php-format
4209
  msgid "Deleted custom field value from %1$s."
4210
  msgstr ""
4211
 
4212
+ #: includes/class-mla-settings.php:3574
4213
  msgid "No attachments contained this custom field."
4214
  msgstr ""
4215
 
4216
  #. translators: 1: ERROR tag 2: field type
4217
+ #: includes/class-mla-settings.php:3635 includes/class-mla-settings.php:3706
4218
+ #: includes/class-mla-settings.php:3792
4219
  #, php-format
4220
  msgid "%1$s: No %2$s settings to process."
4221
  msgstr ""
4222
 
4223
+ #: includes/class-mla-settings.php:3665 includes/class-mla-settings.php:3736
4224
+ #: includes/class-mla-settings.php:3822
4225
  msgid "updated."
4226
  msgstr ""
4227
 
4228
  #. translators: 1: reference type, e.g., Gallery in
4229
+ #: includes/class-mla-settings.php:3927 includes/class-mla-settings.php:3937
4230
  #, php-format
4231
  msgctxt "message_list"
4232
  msgid "%1$s - references updated."
4233
  msgstr ""
4234
 
4235
+ #: includes/class-mla-settings.php:3980
4236
  msgid "General settings saved."
4237
  msgstr ""
4238
 
4239
+ #: includes/class-mla-settings.php:4019
 
 
 
 
 
 
 
4240
  msgid "General settings reset to default values."
4241
  msgstr ""
4242
 
4243
+ #: includes/class-mla-settings.php:4061
4244
  msgid "select settings"
4245
  msgstr ""
4246
 
4247
+ #: includes/class-mla-settings.php:4081
4248
  msgid "Import ALL Settings"
4249
  msgstr ""
4250
 
4251
+ #: includes/class-mla-settings.php:4106
4252
  msgctxt "message_list"
4253
  msgid "exported"
4254
  msgstr ""
4255
 
4256
+ #: includes/class-mla-settings.php:4108
4257
  msgctxt "message_list"
4258
  msgid "skipped"
4259
  msgstr ""
4260
 
4261
+ #: includes/class-mla-settings.php:4115
4262
  msgid "ALL settings exported."
4263
  msgstr ""
4264
 
4265
  #. translators: 1: ERROR tag 2: backup directory name
4266
+ #: includes/class-mla-settings.php:4126
4267
  #, php-format
4268
  msgid "%1$s: The settings directory ( %2$s ) cannot be created."
4269
  msgstr ""
4270
 
4271
  #. translators: 1: ERROR tag 2: backup directory name
4272
+ #: includes/class-mla-settings.php:4130
4273
  #, php-format
4274
  msgid "%1$s: The settings directory ( %2$s ) is not writable."
4275
  msgstr ""
4276
 
4277
  #. translators: 1: ERROR tag 2: backup file name
4278
+ #: includes/class-mla-settings.php:4141
4279
  #, php-format
4280
  msgid "%1$s: The settings file ( %2$s ) could not be opened."
4281
  msgstr ""
4282
 
4283
  #. translators: 1: ERROR tag 2: PHP error information
4284
+ #: includes/class-mla-settings.php:4148
4285
  #, php-format
4286
  msgctxt "error_log"
4287
  msgid "%1$s: _export_settings $error_info = \"%2$s\"."
4288
  msgstr ""
4289
 
4290
  #. translators: 1: ERROR tag 2: backup file name 3: error message
4291
+ #: includes/class-mla-settings.php:4157
4292
  #, php-format
4293
  msgid "%1$s: Writing the settings file ( %2$s ) \"%3$s\"."
4294
  msgstr ""
4295
 
4296
  #. translators: 1: number of option settings
4297
+ #: includes/class-mla-settings.php:4163
4298
  #, php-format
4299
  msgid "Settings exported; %1$s settings recorded."
4300
  msgstr ""
4301
 
4302
+ #: includes/class-mla-settings.php:4181
4303
  msgid "No settings imported."
4304
  msgstr ""
4305
 
4306
+ #: includes/class-mla-settings.php:4190
4307
  msgid "Please select an import settings file from the dropdown list."
4308
  msgstr ""
4309
 
4310
+ #: includes/class-mla-settings.php:4194
4311
  msgid "The import settings dropdown selection is missing."
4312
  msgstr ""
4313
 
4314
  #. translators: 1: ERROR tag 2: PHP error information
4315
+ #: includes/class-mla-settings.php:4202
4316
  #, php-format
4317
  msgctxt "error_log"
4318
  msgid "%1$s: _import_settings $error_info = \"%2$s\"."
4319
  msgstr ""
4320
 
4321
  #. translators: 1: ERROR tag 2: backup file name 3: error message
4322
+ #: includes/class-mla-settings.php:4211
4323
  #, php-format
4324
  msgid "%1$s: Reading the settings file ( %2$s ) \"%3$s\"."
4325
  msgstr ""
4326
 
4327
+ #: includes/class-mla-settings.php:4221
4328
  msgctxt "message_list"
4329
  msgid "updated"
4330
  msgstr ""
4331
 
4332
+ #: includes/class-mla-settings.php:4224
4333
  msgctxt "message_list"
4334
  msgid "unchanged"
4335
  msgstr ""
4336
 
4337
  #. translators: 1: number of option settings updated 2: number of option settings unchanged
4338
+ #: includes/class-mla-settings.php:4229
4339
  #, php-format
4340
  msgid "Settings imported; %1$s updated, %2$s unchanged."
4341
  msgstr ""
4342
 
4343
  #: includes/class-mla-shortcodes.php:334
4344
+ #: includes/class-mla-shortcodes.php:1448
4345
+ #: includes/class-mla-shortcodes.php:2355
4346
+ #: includes/class-mla-shortcodes.php:2642
4347
  msgid "Previous"
4348
  msgstr ""
4349
 
4350
  #: includes/class-mla-shortcodes.php:335
4351
+ #: includes/class-mla-shortcodes.php:1449
4352
+ #: includes/class-mla-shortcodes.php:2404
4353
+ #: includes/class-mla-shortcodes.php:2648
4354
  msgid "Next"
4355
  msgstr ""
4356
 
4358
  msgid "mla_debug empty gallery"
4359
  msgstr ""
4360
 
4361
+ #: includes/class-mla-shortcodes.php:511
4362
  msgid ""
4363
  "<strong>Photonic-enhanced [mla_gallery]</strong> type must be "
4364
  "<strong>default</strong>, query = "
4365
  msgstr ""
4366
 
4367
+ #: includes/class-mla-shortcodes.php:859
4368
  msgid "unknown"
4369
  msgstr ""
4370
 
4371
+ #: includes/class-mla-shortcodes.php:1581
4372
  msgid "mla_debug attributes"
4373
  msgstr ""
4374
 
4375
+ #: includes/class-mla-shortcodes.php:1582
4376
  msgid "mla_debug arguments"
4377
  msgstr ""
4378
 
4379
+ #: includes/class-mla-shortcodes.php:1674
4380
  msgid "mla_debug empty cloud"
4381
  msgstr ""
4382
 
4383
+ #: includes/class-mla-shortcodes.php:3023
4384
+ #: includes/class-mla-shortcodes.php:3351
4385
+ #: includes/class-mla-shortcodes.php:3382
4386
  msgid "Invalid mla_gallery"
4387
  msgstr ""
4388
 
4389
+ #: includes/class-mla-shortcodes.php:3630
4390
  msgid "mla_debug query"
4391
  msgstr ""
4392
 
4393
+ #: includes/class-mla-shortcodes.php:3631
4394
  msgid "mla_debug request"
4395
  msgstr ""
4396
 
4397
+ #: includes/class-mla-shortcodes.php:3632
4398
  msgid "mla_debug query_vars"
4399
  msgstr ""
4400
 
4401
+ #: includes/class-mla-shortcodes.php:3633
4402
  msgid "mla_debug post_count"
4403
  msgstr ""
4404
 
4405
+ #: includes/class-mla-shortcodes.php:3701
4406
  msgid "mla_debug WHERE filter"
4407
  msgstr ""
4408
 
4409
+ #: includes/class-mla-shortcodes.php:3720
4410
  msgid "mla_debug modified WHERE filter"
4411
  msgstr ""
4412
 
4413
+ #: includes/class-mla-shortcodes.php:3743
4414
  msgid "mla_debug ORDER BY filter, incoming"
4415
  msgstr ""
4416
 
4417
+ #: includes/class-mla-shortcodes.php:3743
4418
  msgid "Replacement ORDER BY clause"
4419
  msgstr ""
4420
 
4421
+ #: includes/class-mla-shortcodes.php:3766
4422
  msgid "mla_debug posts_clauses filter"
4423
  msgstr ""
4424
 
4425
+ #: includes/class-mla-shortcodes.php:3784
4426
  msgid "mla_debug posts_clauses_request filter"
4427
  msgstr ""
4428
 
4429
+ #: includes/class-mla-shortcodes.php:3974
4430
  msgid "Invalid taxonomy"
4431
  msgstr ""
4432
 
4433
+ #: includes/class-mla-shortcodes.php:4180
4434
  msgid "mla_debug query arguments"
4435
  msgstr ""
4436
 
4437
+ #: includes/class-mla-shortcodes.php:4181
4438
  msgid "mla_debug last_query"
4439
  msgstr ""
4440
 
4441
+ #: includes/class-mla-shortcodes.php:4182
4442
  msgid "mla_debug last_error"
4443
  msgstr ""
4444
 
4445
+ #: includes/class-mla-shortcodes.php:4183
4446
  msgid "mla_debug num_rows"
4447
  msgstr ""
4448
 
4449
+ #: includes/class-mla-shortcodes.php:4184
4450
  msgid "mla_debug found_rows"
4451
  msgstr ""
4452
 
4545
  msgid "Order"
4546
  msgstr ""
4547
 
4548
+ #: includes/class-mla-wpml-support.php:372
4549
+ msgid "Duplicate translation created; update as desired."
4550
+ msgstr ""
4551
+
4552
+ #. translators: 1: - 4: page subheader values
4553
+ #: includes/class-mla-wpml-support.php:1215
4554
+ #, php-format
4555
+ msgid ""
4556
+ "In this tab you can find a number of options for controlling WPML-specific "
4557
+ "operations. Scroll down to find options for %1$s and %2$s. Be sure to click "
4558
+ "\"Save Changes\" at the bottom of the tab to save any changes you make."
4559
+ msgstr ""
4560
+
4561
+ #: includes/class-mla-wpml-support.php:1710
4562
+ #: includes/class-mla-wpml-support.php:1716
4563
+ #, php-format
4564
+ msgid "Edit the %s translation"
4565
+ msgstr ""
4566
+
4567
+ #: includes/class-mla-wpml-support.php:1722
4568
+ #, php-format
4569
+ msgid "Add translation to %s"
4570
+ msgstr ""
4571
+
4572
  #: includes/mla-main-search-box-template.php:34
4573
  #: includes/mla-main-search-box-template.php:36
4574
  #: includes/mla-media-modal-js-template.php:17
phpDocs/classes.svg CHANGED
@@ -4,227 +4,242 @@
4
  <!-- Generated by graphviz version 2.28.0 (20110507.0327)
5
  -->
6
  <!-- Title: G Pages: 1 -->
7
- <svg width="546pt" height="1176pt"
8
- viewBox="0.00 0.00 546.00 1176.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
9
- <g id="graph1" class="graph" transform="scale(1 1) rotate(0) translate(4 1172)">
10
  <title>G</title>
11
- <polygon fill="white" stroke="white" points="-4,5 -4,-1172 543,-1172 543,5 -4,5"/>
12
  <g id="graph2" class="cluster"><title>cluster_global</title>
13
- <polyline fill="none" stroke="gray" points="306,-8 518,-8 "/>
14
- <path fill="none" stroke="gray" d="M518,-8C524,-8 530,-14 530,-20"/>
15
- <polyline fill="none" stroke="gray" points="530,-20 530,-1148 "/>
16
- <path fill="none" stroke="gray" d="M530,-1148C530,-1154 524,-1160 518,-1160"/>
17
- <polyline fill="none" stroke="gray" points="518,-1160 306,-1160 "/>
18
- <path fill="none" stroke="gray" d="M306,-1160C300,-1160 294,-1154 294,-1148"/>
19
- <polyline fill="none" stroke="gray" points="294,-1148 294,-20 "/>
20
- <path fill="none" stroke="gray" d="M294,-20C294,-14 300,-8 306,-8"/>
21
- <text text-anchor="middle" x="412" y="-1147.2" font-family="Times New Roman,serif" font-size="11.00" fill="gray">global</text>
22
  </g>
23
  <!-- \\MNA_Pad_Counts_Walker -->
24
  <g id="node2" class="node"><title>\\MNA_Pad_Counts_Walker</title>
25
  <a xlink:href="examples.twentytwelve-mla.content-tosca30-dropdown.html" xlink:title="MNA_Pad_Counts_Walker" target="_parent">
26
- <polygon fill="none" stroke="black" points="491,-916 333,-916 333,-880 491,-880 491,-916"/>
27
- <text text-anchor="middle" x="412" y="-895.2" font-family="Courier,monospace" font-size="11.00">MNA_Pad_Counts_Walker</text>
28
  </a>
29
  </g>
30
  <!-- \\Walker_Category -->
31
- <g id="node24" class="node"><title>\\Walker_Category</title>
32
- <ellipse fill="none" stroke="black" cx="115" cy="-1006" rx="77.1866" ry="18"/>
33
- <text text-anchor="middle" x="115" y="-1002.3" font-family="Times New Roman,serif" font-size="14.00" fill="gray">\Walker_Category</text>
34
  </g>
35
  <!-- \\MNA_Pad_Counts_Walker&#45;&gt;\\Walker_Category -->
36
  <g id="edge3" class="edge"><title>\\MNA_Pad_Counts_Walker&#45;&gt;\\Walker_Category</title>
37
- <path fill="none" stroke="black" d="M332.977,-913.708C319.839,-917.006 306.438,-920.783 294,-925 245.151,-941.564 191.592,-966.995 156.117,-984.936"/>
38
- <polygon fill="none" stroke="black" points="154.377,-981.894 147.057,-989.554 157.555,-988.131 154.377,-981.894"/>
39
  </g>
40
  <!-- \\MLAPDF -->
41
  <g id="node3" class="node"><title>\\MLAPDF</title>
42
  <a xlink:href="includes.class-mla-data-pdf.html" xlink:title="MLAPDF" target="_parent">
43
- <polygon fill="none" stroke="black" points="440.5,-1078 383.5,-1078 383.5,-1042 440.5,-1042 440.5,-1078"/>
44
- <text text-anchor="middle" x="412" y="-1057.2" font-family="Courier,monospace" font-size="11.00">MLAPDF</text>
45
  </a>
46
  </g>
47
  <!-- \\MLAData -->
48
  <g id="node4" class="node"><title>\\MLAData</title>
49
  <a xlink:href="includes.class-mla-data.html" xlink:title="MLAData" target="_parent">
50
- <polygon fill="none" stroke="black" points="444,-1024 380,-1024 380,-988 444,-988 444,-1024"/>
51
- <text text-anchor="middle" x="412" y="-1003.2" font-family="Courier,monospace" font-size="11.00">MLAData</text>
52
  </a>
53
  </g>
54
  <!-- \\MLAEdit -->
55
  <g id="node5" class="node"><title>\\MLAEdit</title>
56
  <a xlink:href="includes.class-mla-edit-media.html" xlink:title="MLAEdit" target="_parent">
57
- <polygon fill="none" stroke="black" points="444,-970 380,-970 380,-934 444,-934 444,-970"/>
58
- <text text-anchor="middle" x="412" y="-949.2" font-family="Courier,monospace" font-size="11.00">MLAEdit</text>
59
  </a>
60
  </g>
61
  <!-- \\MLA_Checklist_Walker -->
62
  <g id="node6" class="node"><title>\\MLA_Checklist_Walker</title>
63
  <a xlink:href="includes.class-mla-edit-media.html" xlink:title="MLA_Checklist_Walker" target="_parent">
64
- <polygon fill="none" stroke="black" points="488,-1132 336,-1132 336,-1096 488,-1096 488,-1132"/>
65
- <text text-anchor="middle" x="412" y="-1111.2" font-family="Courier,monospace" font-size="11.00">MLA_Checklist_Walker</text>
66
  </a>
67
  </g>
68
  <!-- \\MLA_Checklist_Walker&#45;&gt;\\Walker_Category -->
69
  <g id="edge5" class="edge"><title>\\MLA_Checklist_Walker&#45;&gt;\\Walker_Category</title>
70
- <path fill="none" stroke="black" d="M335.788,-1098.99C321.759,-1095.53 307.326,-1091.52 294,-1087 245.151,-1070.44 191.592,-1045 156.117,-1027.06"/>
71
- <polygon fill="none" stroke="black" points="157.555,-1023.87 147.057,-1022.45 154.377,-1030.11 157.555,-1023.87"/>
72
- </g>
73
- <!-- \\MLA_Image_Editor -->
74
- <g id="node7" class="node"><title>\\MLA_Image_Editor</title>
75
- <a xlink:href="includes.class-mla-image-editor.html" xlink:title="MLA_Image_Editor" target="_parent">
76
- <polygon fill="none" stroke="black" points="474.5,-862 349.5,-862 349.5,-826 474.5,-826 474.5,-862"/>
77
- <text text-anchor="middle" x="412" y="-841.2" font-family="Courier,monospace" font-size="11.00">MLA_Image_Editor</text>
78
- </a>
79
- </g>
80
- <!-- \\WP_Image_Editor_Imagick -->
81
- <g id="node27" class="node"><title>\\WP_Image_Editor_Imagick</title>
82
- <ellipse fill="none" stroke="black" cx="115" cy="-844" rx="115.08" ry="18"/>
83
- <text text-anchor="middle" x="115" y="-840.3" font-family="Times New Roman,serif" font-size="14.00" fill="gray">\WP_Image_Editor_Imagick</text>
84
- </g>
85
- <!-- \\MLA_Image_Editor&#45;&gt;\\WP_Image_Editor_Imagick -->
86
- <g id="edge7" class="edge"><title>\\MLA_Image_Editor&#45;&gt;\\WP_Image_Editor_Imagick</title>
87
- <path fill="none" stroke="black" d="M349.158,-844C317.519,-844 277.834,-844 240.22,-844"/>
88
- <polygon fill="none" stroke="black" points="240.193,-840.5 230.193,-844 240.193,-847.5 240.193,-840.5"/>
89
  </g>
90
  <!-- \\MLA_List_Table -->
91
- <g id="node8" class="node"><title>\\MLA_List_Table</title>
92
  <a xlink:href="includes.class-mla-list-table.html" xlink:title="MLA_List_Table" target="_parent">
93
- <polygon fill="none" stroke="black" points="467.5,-538 356.5,-538 356.5,-502 467.5,-502 467.5,-538"/>
94
- <text text-anchor="middle" x="412" y="-517.2" font-family="Courier,monospace" font-size="11.00">MLA_List_Table</text>
95
  </a>
96
  </g>
97
  <!-- \\WP_List_Table -->
98
- <g id="node29" class="node"><title>\\WP_List_Table</title>
99
- <ellipse fill="none" stroke="black" cx="115" cy="-358" rx="71.4873" ry="18"/>
100
- <text text-anchor="middle" x="115" y="-354.3" font-family="Times New Roman,serif" font-size="14.00" fill="gray">\WP_List_Table</text>
101
  </g>
102
  <!-- \\MLA_List_Table&#45;&gt;\\WP_List_Table -->
103
- <g id="edge9" class="edge"><title>\\MLA_List_Table&#45;&gt;\\WP_List_Table</title>
104
- <path fill="none" stroke="black" d="M356.418,-512.35C336.184,-508.252 313.446,-502.104 294,-493 233.188,-464.532 173.222,-412.829 140.768,-382.335"/>
105
- <polygon fill="none" stroke="black" points="143.166,-379.786 133.507,-375.433 138.344,-384.86 143.166,-379.786"/>
106
  </g>
107
  <!-- \\MLA -->
108
- <g id="node9" class="node"><title>\\MLA</title>
109
  <a xlink:href="includes.class-mla-main.html" xlink:title="MLA" target="_parent">
110
- <polygon fill="none" stroke="black" points="439,-754 385,-754 385,-718 439,-718 439,-754"/>
111
- <text text-anchor="middle" x="412" y="-733.2" font-family="Courier,monospace" font-size="11.00">MLA</text>
112
  </a>
113
  </g>
114
  <!-- \\MLAModal -->
115
- <g id="node10" class="node"><title>\\MLAModal</title>
116
  <a xlink:href="includes.class-mla-media-modal.html" xlink:title="MLAModal" target="_parent">
117
- <polygon fill="none" stroke="black" points="447.5,-700 376.5,-700 376.5,-664 447.5,-664 447.5,-700"/>
118
- <text text-anchor="middle" x="412" y="-679.2" font-family="Courier,monospace" font-size="11.00">MLAModal</text>
119
  </a>
120
  </g>
121
  <!-- \\MLAMime -->
122
- <g id="node11" class="node"><title>\\MLAMime</title>
123
  <a xlink:href="includes.class-mla-mime-types.html" xlink:title="MLAMime" target="_parent">
124
- <polygon fill="none" stroke="black" points="444,-646 380,-646 380,-610 444,-610 444,-646"/>
125
- <text text-anchor="middle" x="412" y="-625.2" font-family="Courier,monospace" font-size="11.00">MLAMime</text>
126
  </a>
127
  </g>
128
  <!-- \\MLAObjects -->
129
- <g id="node12" class="node"><title>\\MLAObjects</title>
130
  <a xlink:href="includes.class-mla-objects.html" xlink:title="MLAObjects" target="_parent">
131
- <polygon fill="none" stroke="black" points="454,-592 370,-592 370,-556 454,-556 454,-592"/>
132
- <text text-anchor="middle" x="412" y="-571.2" font-family="Courier,monospace" font-size="11.00">MLAObjects</text>
133
  </a>
134
  </g>
135
  <!-- \\MLATextWidget -->
136
- <g id="node13" class="node"><title>\\MLATextWidget</title>
137
  <a xlink:href="includes.class-mla-objects.html" xlink:title="MLATextWidget" target="_parent">
138
- <polygon fill="none" stroke="black" points="464,-106 360,-106 360,-70 464,-70 464,-106"/>
139
- <text text-anchor="middle" x="412" y="-85.2" font-family="Courier,monospace" font-size="11.00">MLATextWidget</text>
140
  </a>
141
  </g>
142
  <!-- \\WP_Widget -->
143
- <g id="node31" class="node"><title>\\WP_Widget</title>
144
- <ellipse fill="none" stroke="black" cx="115" cy="-88" rx="58.4896" ry="18"/>
145
- <text text-anchor="middle" x="115" y="-84.3" font-family="Times New Roman,serif" font-size="14.00" fill="gray">\WP_Widget</text>
146
  </g>
147
  <!-- \\MLATextWidget&#45;&gt;\\WP_Widget -->
148
- <g id="edge11" class="edge"><title>\\MLATextWidget&#45;&gt;\\WP_Widget</title>
149
- <path fill="none" stroke="black" d="M359.952,-88C311.228,-88 237.501,-88 183.853,-88"/>
150
- <polygon fill="none" stroke="black" points="183.742,-84.5001 173.742,-88 183.742,-91.5001 183.742,-84.5001"/>
151
  </g>
152
  <!-- \\MLAOptions -->
153
- <g id="node14" class="node"><title>\\MLAOptions</title>
154
  <a xlink:href="includes.class-mla-options.html" xlink:title="MLAOptions" target="_parent">
155
- <polygon fill="none" stroke="black" points="454,-484 370,-484 370,-448 454,-448 454,-484"/>
156
- <text text-anchor="middle" x="412" y="-463.2" font-family="Courier,monospace" font-size="11.00">MLAOptions</text>
 
 
 
 
 
 
 
157
  </a>
158
  </g>
159
  <!-- \\MLASettings -->
160
  <g id="node15" class="node"><title>\\MLASettings</title>
161
  <a xlink:href="includes.class-mla-settings.html" xlink:title="MLASettings" target="_parent">
162
- <polygon fill="none" stroke="black" points="457.5,-430 366.5,-430 366.5,-394 457.5,-394 457.5,-430"/>
163
- <text text-anchor="middle" x="412" y="-409.2" font-family="Courier,monospace" font-size="11.00">MLASettings</text>
164
  </a>
165
  </g>
166
  <!-- \\MLAShortcodes -->
167
  <g id="node16" class="node"><title>\\MLAShortcodes</title>
168
  <a xlink:href="includes.class-mla-shortcodes.html" xlink:title="MLAShortcodes" target="_parent">
169
- <polygon fill="none" stroke="black" points="464,-376 360,-376 360,-340 464,-340 464,-376"/>
170
- <text text-anchor="middle" x="412" y="-355.2" font-family="Courier,monospace" font-size="11.00">MLAShortcodes</text>
171
- </a>
172
- </g>
173
- <!-- \\MLAStreamImage -->
174
- <g id="node17" class="node"><title>\\MLAStreamImage</title>
175
- <a xlink:href="includes.mla-stream-image.html" xlink:title="MLAStreamImage" target="_parent">
176
- <polygon fill="none" stroke="black" points="467.5,-322 356.5,-322 356.5,-286 467.5,-286 467.5,-322"/>
177
- <text text-anchor="middle" x="412" y="-301.2" font-family="Courier,monospace" font-size="11.00">MLAStreamImage</text>
178
- </a>
179
- </g>
180
- <!-- \\MLAMutex -->
181
- <g id="node18" class="node"><title>\\MLAMutex</title>
182
- <a xlink:href="includes.mla-stream-image.html" xlink:title="MLAMutex" target="_parent">
183
- <polygon fill="none" stroke="black" points="447.5,-268 376.5,-268 376.5,-232 447.5,-232 447.5,-268"/>
184
- <text text-anchor="middle" x="412" y="-247.2" font-family="Courier,monospace" font-size="11.00">MLAMutex</text>
185
  </a>
186
  </g>
187
  <!-- \\MLA_Upload_List_Table -->
188
- <g id="node19" class="node"><title>\\MLA_Upload_List_Table</title>
189
  <a xlink:href="includes.class-mla-upload-list-table.html" xlink:title="MLA_Upload_List_Table" target="_parent">
190
- <polygon fill="none" stroke="black" points="491,-214 333,-214 333,-178 491,-178 491,-214"/>
191
- <text text-anchor="middle" x="412" y="-193.2" font-family="Courier,monospace" font-size="11.00">MLA_Upload_List_Table</text>
192
  </a>
193
  </g>
194
  <!-- \\MLA_Upload_List_Table&#45;&gt;\\WP_List_Table -->
195
- <g id="edge13" class="edge"><title>\\MLA_Upload_List_Table&#45;&gt;\\WP_List_Table</title>
196
- <path fill="none" stroke="black" d="M332.982,-209.152C319.646,-212.757 306.178,-217.299 294,-223 233.188,-251.468 173.222,-303.171 140.768,-333.665"/>
197
- <polygon fill="none" stroke="black" points="138.344,-331.14 133.507,-340.567 143.166,-336.214 138.344,-331.14"/>
198
  </g>
199
  <!-- \\MLA_Upload_Optional_List_Table -->
200
- <g id="node20" class="node"><title>\\MLA_Upload_Optional_List_Table</title>
201
  <a xlink:href="includes.class-mla-upload-optional-list-table.html" xlink:title="MLA_Upload_Optional_List_Table" target="_parent">
202
- <polygon fill="none" stroke="black" points="521.5,-160 302.5,-160 302.5,-124 521.5,-124 521.5,-160"/>
203
- <text text-anchor="middle" x="412" y="-139.2" font-family="Courier,monospace" font-size="11.00">MLA_Upload_Optional_List_Table</text>
204
  </a>
205
  </g>
206
  <!-- \\MLA_Upload_Optional_List_Table&#45;&gt;\\WP_List_Table -->
207
- <g id="edge15" class="edge"><title>\\MLA_Upload_Optional_List_Table&#45;&gt;\\WP_List_Table</title>
208
- <path fill="none" stroke="black" d="M312.614,-160.093C306.146,-162.676 299.876,-165.627 294,-169 221.89,-210.391 161.28,-290.264 133.037,-331.67"/>
209
- <polygon fill="none" stroke="black" points="130.023,-329.881 127.351,-340.133 135.833,-333.784 130.023,-329.881"/>
210
  </g>
211
  <!-- \\MLA_View_List_Table -->
212
- <g id="node21" class="node"><title>\\MLA_View_List_Table</title>
213
  <a xlink:href="includes.class-mla-view-list-table.html" xlink:title="MLA_View_List_Table" target="_parent">
214
- <polygon fill="none" stroke="black" points="484.5,-808 339.5,-808 339.5,-772 484.5,-772 484.5,-808"/>
215
- <text text-anchor="middle" x="412" y="-787.2" font-family="Courier,monospace" font-size="11.00">MLA_View_List_Table</text>
216
  </a>
217
  </g>
218
  <!-- \\MLA_View_List_Table&#45;&gt;\\WP_List_Table -->
219
- <g id="edge17" class="edge"><title>\\MLA_View_List_Table&#45;&gt;\\WP_List_Table</title>
220
- <path fill="none" stroke="black" d="M339.348,-784.347C323.086,-780.264 306.844,-773.638 294,-763 171.945,-661.904 131.005,-460.645 119.716,-386.383"/>
221
- <polygon fill="none" stroke="black" points="123.163,-385.767 118.259,-376.375 116.236,-386.775 123.163,-385.767"/>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
222
  </g>
223
  <!-- \\MLATest -->
224
- <g id="node22" class="node"><title>\\MLATest</title>
225
  <a xlink:href="tests.class-mla-tests.html" xlink:title="MLATest" target="_parent">
226
- <polygon fill="none" stroke="black" points="444,-52 380,-52 380,-16 444,-16 444,-52"/>
227
- <text text-anchor="middle" x="412" y="-31.2" font-family="Courier,monospace" font-size="11.00">MLATest</text>
228
  </a>
229
  </g>
230
  </g>
4
  <!-- Generated by graphviz version 2.28.0 (20110507.0327)
5
  -->
6
  <!-- Title: G Pages: 1 -->
7
+ <svg width="688pt" height="1404pt"
8
+ viewBox="0.00 0.00 688.00 1403.59" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
9
+ <g id="graph1" class="graph" transform="scale(1 1) rotate(0) translate(4 1399.59)">
10
  <title>G</title>
11
+ <polygon fill="white" stroke="white" points="-4,5 -4,-1399.59 685,-1399.59 685,5 -4,5"/>
12
  <g id="graph2" class="cluster"><title>cluster_global</title>
13
+ <polyline fill="none" stroke="gray" points="242,-127.587 660,-127.587 "/>
14
+ <path fill="none" stroke="gray" d="M660,-127.587C666,-127.587 672,-133.587 672,-139.587"/>
15
+ <polyline fill="none" stroke="gray" points="672,-139.587 672,-1375.59 "/>
16
+ <path fill="none" stroke="gray" d="M672,-1375.59C672,-1381.59 666,-1387.59 660,-1387.59"/>
17
+ <polyline fill="none" stroke="gray" points="660,-1387.59 242,-1387.59 "/>
18
+ <path fill="none" stroke="gray" d="M242,-1387.59C236,-1387.59 230,-1381.59 230,-1375.59"/>
19
+ <polyline fill="none" stroke="gray" points="230,-1375.59 230,-139.587 "/>
20
+ <path fill="none" stroke="gray" d="M230,-139.587C230,-133.587 236,-127.587 242,-127.587"/>
21
+ <text text-anchor="middle" x="451" y="-1374.79" font-family="Times New Roman,serif" font-size="11.00" fill="gray">global</text>
22
  </g>
23
  <!-- \\MNA_Pad_Counts_Walker -->
24
  <g id="node2" class="node"><title>\\MNA_Pad_Counts_Walker</title>
25
  <a xlink:href="examples.twentytwelve-mla.content-tosca30-dropdown.html" xlink:title="MNA_Pad_Counts_Walker" target="_parent">
26
+ <polygon fill="none" stroke="black" points="633,-1143.59 475,-1143.59 475,-1107.59 633,-1107.59 633,-1143.59"/>
27
+ <text text-anchor="middle" x="554" y="-1122.79" font-family="Courier,monospace" font-size="11.00">MNA_Pad_Counts_Walker</text>
28
  </a>
29
  </g>
30
  <!-- \\Walker_Category -->
31
+ <g id="node27" class="node"><title>\\Walker_Category</title>
32
+ <ellipse fill="none" stroke="black" cx="294" cy="-101.587" rx="77.1866" ry="18"/>
33
+ <text text-anchor="middle" x="294" y="-97.8867" font-family="Times New Roman,serif" font-size="14.00" fill="gray">\Walker_Category</text>
34
  </g>
35
  <!-- \\MNA_Pad_Counts_Walker&#45;&gt;\\Walker_Category -->
36
  <g id="edge3" class="edge"><title>\\MNA_Pad_Counts_Walker&#45;&gt;\\Walker_Category</title>
37
+ <path fill="none" stroke="black" d="M474.884,-1119C463.051,-1114.68 452.109,-1108.2 444,-1098.59 303.899,-932.538 509.133,-292.095 372,-123.587 370.272,-121.464 368.355,-119.537 366.287,-117.789"/>
38
+ <polygon fill="none" stroke="black" points="367.884,-114.642 357.651,-111.897 363.939,-120.424 367.884,-114.642"/>
39
  </g>
40
  <!-- \\MLAPDF -->
41
  <g id="node3" class="node"><title>\\MLAPDF</title>
42
  <a xlink:href="includes.class-mla-data-pdf.html" xlink:title="MLAPDF" target="_parent">
43
+ <polygon fill="none" stroke="black" points="582.5,-1305.59 525.5,-1305.59 525.5,-1269.59 582.5,-1269.59 582.5,-1305.59"/>
44
+ <text text-anchor="middle" x="554" y="-1284.79" font-family="Courier,monospace" font-size="11.00">MLAPDF</text>
45
  </a>
46
  </g>
47
  <!-- \\MLAData -->
48
  <g id="node4" class="node"><title>\\MLAData</title>
49
  <a xlink:href="includes.class-mla-data.html" xlink:title="MLAData" target="_parent">
50
+ <polygon fill="none" stroke="black" points="586,-1251.59 522,-1251.59 522,-1215.59 586,-1215.59 586,-1251.59"/>
51
+ <text text-anchor="middle" x="554" y="-1230.79" font-family="Courier,monospace" font-size="11.00">MLAData</text>
52
  </a>
53
  </g>
54
  <!-- \\MLAEdit -->
55
  <g id="node5" class="node"><title>\\MLAEdit</title>
56
  <a xlink:href="includes.class-mla-edit-media.html" xlink:title="MLAEdit" target="_parent">
57
+ <polygon fill="none" stroke="black" points="586,-1197.59 522,-1197.59 522,-1161.59 586,-1161.59 586,-1197.59"/>
58
+ <text text-anchor="middle" x="554" y="-1176.79" font-family="Courier,monospace" font-size="11.00">MLAEdit</text>
59
  </a>
60
  </g>
61
  <!-- \\MLA_Checklist_Walker -->
62
  <g id="node6" class="node"><title>\\MLA_Checklist_Walker</title>
63
  <a xlink:href="includes.class-mla-edit-media.html" xlink:title="MLA_Checklist_Walker" target="_parent">
64
+ <polygon fill="none" stroke="black" points="630,-873.587 478,-873.587 478,-837.587 630,-837.587 630,-873.587"/>
65
+ <text text-anchor="middle" x="554" y="-852.787" font-family="Courier,monospace" font-size="11.00">MLA_Checklist_Walker</text>
66
  </a>
67
  </g>
68
  <!-- \\MLA_Checklist_Walker&#45;&gt;\\Walker_Category -->
69
  <g id="edge5" class="edge"><title>\\MLA_Checklist_Walker&#45;&gt;\\Walker_Category</title>
70
+ <path fill="none" stroke="black" d="M477.881,-849.768C464.975,-845.485 452.882,-838.819 444,-828.587 237.534,-590.735 574.214,-365.064 372,-123.587 370.243,-121.488 368.3,-119.582 366.212,-117.852"/>
71
+ <polygon fill="none" stroke="black" points="367.766,-114.68 357.513,-112.011 363.864,-120.491 367.766,-114.68"/>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
72
  </g>
73
  <!-- \\MLA_List_Table -->
74
+ <g id="node7" class="node"><title>\\MLA_List_Table</title>
75
  <a xlink:href="includes.class-mla-list-table.html" xlink:title="MLA_List_Table" target="_parent">
76
+ <polygon fill="none" stroke="black" points="349.5,-766.587 238.5,-766.587 238.5,-730.587 349.5,-730.587 349.5,-766.587"/>
77
+ <text text-anchor="middle" x="294" y="-745.787" font-family="Courier,monospace" font-size="11.00">MLA_List_Table</text>
78
  </a>
79
  </g>
80
  <!-- \\WP_List_Table -->
81
+ <g id="node30" class="node"><title>\\WP_List_Table</title>
82
+ <ellipse fill="none" stroke="black" cx="72" cy="-374.587" rx="71.4873" ry="18"/>
83
+ <text text-anchor="middle" x="72" y="-370.887" font-family="Times New Roman,serif" font-size="14.00" fill="gray">\WP_List_Table</text>
84
  </g>
85
  <!-- \\MLA_List_Table&#45;&gt;\\WP_List_Table -->
86
+ <g id="edge7" class="edge"><title>\\MLA_List_Table&#45;&gt;\\WP_List_Table</title>
87
+ <path fill="none" stroke="black" d="M238.412,-739.754C230.238,-736.605 222.414,-732.345 216,-726.587 116.736,-637.466 85.0626,-469.471 76.1375,-402.845"/>
88
+ <polygon fill="none" stroke="black" points="79.5803,-402.172 74.8507,-392.691 72.6358,-403.052 79.5803,-402.172"/>
89
  </g>
90
  <!-- \\MLA -->
91
+ <g id="node8" class="node"><title>\\MLA</title>
92
  <a xlink:href="includes.class-mla-main.html" xlink:title="MLA" target="_parent">
93
+ <polygon fill="none" stroke="black" points="581,-1089.59 527,-1089.59 527,-1053.59 581,-1053.59 581,-1089.59"/>
94
+ <text text-anchor="middle" x="554" y="-1068.79" font-family="Courier,monospace" font-size="11.00">MLA</text>
95
  </a>
96
  </g>
97
  <!-- \\MLAModal -->
98
+ <g id="node9" class="node"><title>\\MLAModal</title>
99
  <a xlink:href="includes.class-mla-media-modal.html" xlink:title="MLAModal" target="_parent">
100
+ <polygon fill="none" stroke="black" points="589.5,-1035.59 518.5,-1035.59 518.5,-999.587 589.5,-999.587 589.5,-1035.59"/>
101
+ <text text-anchor="middle" x="554" y="-1014.79" font-family="Courier,monospace" font-size="11.00">MLAModal</text>
102
  </a>
103
  </g>
104
  <!-- \\MLAMime -->
105
+ <g id="node10" class="node"><title>\\MLAMime</title>
106
  <a xlink:href="includes.class-mla-mime-types.html" xlink:title="MLAMime" target="_parent">
107
+ <polygon fill="none" stroke="black" points="586,-981.587 522,-981.587 522,-945.587 586,-945.587 586,-981.587"/>
108
+ <text text-anchor="middle" x="554" y="-960.787" font-family="Courier,monospace" font-size="11.00">MLAMime</text>
109
  </a>
110
  </g>
111
  <!-- \\MLAObjects -->
112
+ <g id="node11" class="node"><title>\\MLAObjects</title>
113
  <a xlink:href="includes.class-mla-objects.html" xlink:title="MLAObjects" target="_parent">
114
+ <polygon fill="none" stroke="black" points="596,-927.587 512,-927.587 512,-891.587 596,-891.587 596,-927.587"/>
115
+ <text text-anchor="middle" x="554" y="-906.787" font-family="Courier,monospace" font-size="11.00">MLAObjects</text>
116
  </a>
117
  </g>
118
  <!-- \\MLATextWidget -->
119
+ <g id="node12" class="node"><title>\\MLATextWidget</title>
120
  <a xlink:href="includes.class-mla-objects.html" xlink:title="MLATextWidget" target="_parent">
121
+ <polygon fill="none" stroke="black" points="606,-603.587 502,-603.587 502,-567.587 606,-567.587 606,-603.587"/>
122
+ <text text-anchor="middle" x="554" y="-582.787" font-family="Courier,monospace" font-size="11.00">MLATextWidget</text>
123
  </a>
124
  </g>
125
  <!-- \\WP_Widget -->
126
+ <g id="node32" class="node"><title>\\WP_Widget</title>
127
+ <ellipse fill="none" stroke="black" cx="294" cy="-47.5867" rx="58.4896" ry="18"/>
128
+ <text text-anchor="middle" x="294" y="-43.8867" font-family="Times New Roman,serif" font-size="14.00" fill="gray">\WP_Widget</text>
129
  </g>
130
  <!-- \\MLATextWidget&#45;&gt;\\WP_Widget -->
131
+ <g id="edge9" class="edge"><title>\\MLATextWidget&#45;&gt;\\WP_Widget</title>
132
+ <path fill="none" stroke="black" d="M501.997,-584.865C481.185,-581.866 458.622,-574.671 444,-558.587 297.706,-397.668 510.535,-242.231 372,-74.5867 367.223,-68.8059 361.129,-64.2614 354.467,-60.689"/>
133
+ <polygon fill="none" stroke="black" points="355.65,-57.3809 345.101,-56.3953 352.733,-63.7442 355.65,-57.3809"/>
134
  </g>
135
  <!-- \\MLAOptions -->
136
+ <g id="node13" class="node"><title>\\MLAOptions</title>
137
  <a xlink:href="includes.class-mla-options.html" xlink:title="MLAOptions" target="_parent">
138
+ <polygon fill="none" stroke="black" points="596,-819.587 512,-819.587 512,-783.587 596,-783.587 596,-819.587"/>
139
+ <text text-anchor="middle" x="554" y="-798.787" font-family="Courier,monospace" font-size="11.00">MLAOptions</text>
140
+ </a>
141
+ </g>
142
+ <!-- \\MLA_Polylang -->
143
+ <g id="node14" class="node"><title>\\MLA_Polylang</title>
144
+ <a xlink:href="includes.class-mla-polylang-support.html" xlink:title="MLA_Polylang" target="_parent">
145
+ <polygon fill="none" stroke="black" points="603,-765.587 505,-765.587 505,-729.587 603,-729.587 603,-765.587"/>
146
+ <text text-anchor="middle" x="554" y="-744.787" font-family="Courier,monospace" font-size="11.00">MLA_Polylang</text>
147
  </a>
148
  </g>
149
  <!-- \\MLASettings -->
150
  <g id="node15" class="node"><title>\\MLASettings</title>
151
  <a xlink:href="includes.class-mla-settings.html" xlink:title="MLASettings" target="_parent">
152
+ <polygon fill="none" stroke="black" points="599.5,-711.587 508.5,-711.587 508.5,-675.587 599.5,-675.587 599.5,-711.587"/>
153
+ <text text-anchor="middle" x="554" y="-690.787" font-family="Courier,monospace" font-size="11.00">MLASettings</text>
154
  </a>
155
  </g>
156
  <!-- \\MLAShortcodes -->
157
  <g id="node16" class="node"><title>\\MLAShortcodes</title>
158
  <a xlink:href="includes.class-mla-shortcodes.html" xlink:title="MLAShortcodes" target="_parent">
159
+ <polygon fill="none" stroke="black" points="606,-657.587 502,-657.587 502,-621.587 606,-621.587 606,-657.587"/>
160
+ <text text-anchor="middle" x="554" y="-636.787" font-family="Courier,monospace" font-size="11.00">MLAShortcodes</text>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
161
  </a>
162
  </g>
163
  <!-- \\MLA_Upload_List_Table -->
164
+ <g id="node17" class="node"><title>\\MLA_Upload_List_Table</title>
165
  <a xlink:href="includes.class-mla-upload-list-table.html" xlink:title="MLA_Upload_List_Table" target="_parent">
166
+ <polygon fill="none" stroke="black" points="633,-549.587 475,-549.587 475,-513.587 633,-513.587 633,-549.587"/>
167
+ <text text-anchor="middle" x="554" y="-528.787" font-family="Courier,monospace" font-size="11.00">MLA_Upload_List_Table</text>
168
  </a>
169
  </g>
170
  <!-- \\MLA_Upload_List_Table&#45;&gt;\\WP_List_Table -->
171
+ <g id="edge11" class="edge"><title>\\MLA_Upload_List_Table&#45;&gt;\\WP_List_Table</title>
172
+ <path fill="none" stroke="black" d="M474.918,-524.285C463.23,-520.024 452.328,-513.747 444,-504.587 297.706,-343.668 518.366,-181.44 372,-20.5867 348.277,5.48425 330.247,-1.94877 295,-1.58671"/>
 
173
  </g>
174
  <!-- \\MLA_Upload_Optional_List_Table -->
175
+ <g id="node18" class="node"><title>\\MLA_Upload_Optional_List_Table</title>
176
  <a xlink:href="includes.class-mla-upload-optional-list-table.html" xlink:title="MLA_Upload_Optional_List_Table" target="_parent">
177
+ <polygon fill="none" stroke="black" points="663.5,-495.587 444.5,-495.587 444.5,-459.587 663.5,-459.587 663.5,-495.587"/>
178
+ <text text-anchor="middle" x="554" y="-474.787" font-family="Courier,monospace" font-size="11.00">MLA_Upload_Optional_List_Table</text>
179
  </a>
180
  </g>
181
  <!-- \\MLA_Upload_Optional_List_Table&#45;&gt;\\WP_List_Table -->
182
+ <g id="edge13" class="edge"><title>\\MLA_Upload_Optional_List_Table&#45;&gt;\\WP_List_Table</title>
183
+ <path fill="none" stroke="black" d="M454.052,-459.378C450.425,-456.794 447.046,-453.877 444,-450.587 312.352,-308.403 503.712,-162.712 372,-20.5867 348.041,5.26699 330.247,-1.94877 295,-1.58671"/>
 
184
  </g>
185
  <!-- \\MLA_View_List_Table -->
186
+ <g id="node19" class="node"><title>\\MLA_View_List_Table</title>
187
  <a xlink:href="includes.class-mla-view-list-table.html" xlink:title="MLA_View_List_Table" target="_parent">
188
+ <polygon fill="none" stroke="black" points="626.5,-387.587 481.5,-387.587 481.5,-351.587 626.5,-351.587 626.5,-387.587"/>
189
+ <text text-anchor="middle" x="554" y="-366.787" font-family="Courier,monospace" font-size="11.00">MLA_View_List_Table</text>
190
  </a>
191
  </g>
192
  <!-- \\MLA_View_List_Table&#45;&gt;\\WP_List_Table -->
193
+ <g id="edge15" class="edge"><title>\\MLA_View_List_Table&#45;&gt;\\WP_List_Table</title>
194
+ <path fill="none" stroke="black" d="M293,-1.58671C257.753,-1.22465 242.63,2.50704 216,-20.5867 114.726,-108.413 84.2184,-278.407 75.8716,-345.93"/>
195
+ <polygon fill="none" stroke="black" points="72.3533,-345.885 74.6752,-356.222 79.3065,-346.693 72.3533,-345.885"/>
196
+ <path fill="none" stroke="black" d="M481.348,-363.694C467.446,-359.512 454.084,-352.904 444,-342.587 341.497,-237.716 474.55,-125.412 372,-20.5867 347.35,4.60974 330.247,-1.94877 295,-1.58671"/>
197
+ </g>
198
+ <!-- \\MLA_WPML -->
199
+ <g id="node20" class="node"><title>\\MLA_WPML</title>
200
+ <a xlink:href="includes.class-mla-wpml-support.html" xlink:title="MLA_WPML" target="_parent">
201
+ <polygon fill="none" stroke="black" points="589.5,-441.587 518.5,-441.587 518.5,-405.587 589.5,-405.587 589.5,-441.587"/>
202
+ <text text-anchor="middle" x="554" y="-420.787" font-family="Courier,monospace" font-size="11.00">MLA_WPML</text>
203
+ </a>
204
+ </g>
205
+ <!-- \\MLA_WPML_List_Table -->
206
+ <g id="node21" class="node"><title>\\MLA_WPML_List_Table</title>
207
+ <a xlink:href="includes.class-mla-wpml-support.html" xlink:title="MLA_WPML_List_Table" target="_parent">
208
+ <polygon fill="none" stroke="black" points="626.5,-1359.59 481.5,-1359.59 481.5,-1323.59 626.5,-1323.59 626.5,-1359.59"/>
209
+ <text text-anchor="middle" x="554" y="-1338.79" font-family="Courier,monospace" font-size="11.00">MLA_WPML_List_Table</text>
210
+ </a>
211
+ </g>
212
+ <!-- \\MLA_WPML_List_Table&#45;&gt;\\MLA_List_Table -->
213
+ <g id="edge17" class="edge"><title>\\MLA_WPML_List_Table&#45;&gt;\\MLA_List_Table</title>
214
+ <path fill="none" stroke="black" d="M481.356,-1335.32C467.537,-1331.15 454.206,-1324.64 444,-1314.59 365.014,-1236.75 312.399,-880.167 298.608,-776.766"/>
215
+ <polygon fill="none" stroke="black" points="302.066,-776.22 297.29,-766.763 295.126,-777.134 302.066,-776.22"/>
216
+ </g>
217
+ <!-- \\MLA_WPML_Table -->
218
+ <g id="node22" class="node"><title>\\MLA_WPML_Table</title>
219
+ <a xlink:href="includes.class-mla-wpml-support.html" xlink:title="MLA_WPML_Table" target="_parent">
220
+ <polygon fill="none" stroke="black" points="609.5,-333.587 498.5,-333.587 498.5,-297.587 609.5,-297.587 609.5,-333.587"/>
221
+ <text text-anchor="middle" x="554" y="-312.787" font-family="Courier,monospace" font-size="11.00">MLA_WPML_Table</text>
222
+ </a>
223
+ </g>
224
+ <!-- \\MLAStreamImage -->
225
+ <g id="node23" class="node"><title>\\MLAStreamImage</title>
226
+ <a xlink:href="includes.mla-stream-image.html" xlink:title="MLAStreamImage" target="_parent">
227
+ <polygon fill="none" stroke="black" points="609.5,-279.587 498.5,-279.587 498.5,-243.587 609.5,-243.587 609.5,-279.587"/>
228
+ <text text-anchor="middle" x="554" y="-258.787" font-family="Courier,monospace" font-size="11.00">MLAStreamImage</text>
229
+ </a>
230
+ </g>
231
+ <!-- \\MLAMutex -->
232
+ <g id="node24" class="node"><title>\\MLAMutex</title>
233
+ <a xlink:href="includes.mla-stream-image.html" xlink:title="MLAMutex" target="_parent">
234
+ <polygon fill="none" stroke="black" points="589.5,-225.587 518.5,-225.587 518.5,-189.587 589.5,-189.587 589.5,-225.587"/>
235
+ <text text-anchor="middle" x="554" y="-204.787" font-family="Courier,monospace" font-size="11.00">MLAMutex</text>
236
+ </a>
237
  </g>
238
  <!-- \\MLATest -->
239
+ <g id="node25" class="node"><title>\\MLATest</title>
240
  <a xlink:href="tests.class-mla-tests.html" xlink:title="MLATest" target="_parent">
241
+ <polygon fill="none" stroke="black" points="586,-171.587 522,-171.587 522,-135.587 586,-135.587 586,-171.587"/>
242
+ <text text-anchor="middle" x="554" y="-150.787" font-family="Courier,monospace" font-size="11.00">MLATest</text>
243
  </a>
244
  </g>
245
  </g>
phpDocs/classes/MLA.html CHANGED
@@ -64,12 +64,13 @@
64
  <li class="method public "><a href="#mla_admin_init_action" title="mla_admin_init_action :: Load the plugin's Ajax handler or process Edit Media update actions"><span class="description">Load the plugin's Ajax handler or process Edit Media update actions</span><pre>mla_admin_init_action()</pre></a></li>
65
  <li class="method public "><a href="#mla_admin_menu_action" title="mla_admin_menu_action :: Add the submenu pages"><span class="description">Add the submenu pages</span><pre>mla_admin_menu_action()</pre></a></li>
66
  <li class="method public "><a href="#mla_authors_dropdown" title="mla_authors_dropdown :: Get the edit Authors dropdown box, if user has suitable permissions"><span class="description">Get the edit Authors dropdown box, if user has suitable permissions</span><pre>mla_authors_dropdown()</pre></a></li>
67
- <li class="method public "><a href="#mla_edit_tax_redirect" title="mla_edit_tax_redirect :: Redirect to the Edit Tags/Categories page"><span class="description">Redirect to the Edit Tags/Categories page</span><pre>mla_edit_tax_redirect()</pre></a></li>
68
  <li class="method public "><a href="#mla_find_posts_ajax_action" title='mla_find_posts_ajax_action :: Ajax handler to fetch candidates for the "Set Parent" popup window'><span class="description">Ajax handler to fetch candidates for the "Set Parent" popup window</span><pre>mla_find_posts_ajax_action()</pre></a></li>
69
  <li class="method public "><a href="#mla_inline_edit_ajax_action" title="mla_inline_edit_ajax_action :: Ajax handler for inline editing"><span class="description">Ajax handler for inline editing</span><pre>mla_inline_edit_ajax_action()</pre></a></li>
70
  <li class="method public "><a href="#mla_load_media_action" title="mla_load_media_action :: Redirect to Media/Assistant if Media/Library is hidden"><span class="description">Redirect to Media/Assistant if Media/Library is hidden</span><pre>mla_load_media_action()</pre></a></li>
 
71
  <li class="method public "><a href="#mla_parent_file_filter" title="mla_parent_file_filter :: Cleanup menus for Edit Tags/Categories page"><span class="description">Cleanup menus for Edit Tags/Categories page</span><pre>mla_parent_file_filter()</pre></a></li>
72
  <li class="method public "><a href="#mla_plugins_loaded_action" title="mla_plugins_loaded_action :: Load a plugin text domain"><span class="description">Load a plugin text domain</span><pre>mla_plugins_loaded_action()</pre></a></li>
 
73
  <li class="method public "><a href="#mla_process_bulk_action" title="mla_process_bulk_action :: Process bulk action for one or more attachments"><span class="description">Process bulk action for one or more attachments</span><pre>mla_process_bulk_action()</pre></a></li>
74
  <li class="method public "><a href="#mla_render_admin_page" title='mla_render_admin_page :: Render the "Assistant" subpage in the Media section, using the list_table package'><span class="description">Render the "Assistant" subpage in the Media section, using the list_table package</span><pre>mla_render_admin_page()</pre></a></li>
75
  <li class="method public "><a href="#mla_screen_options_show_screen_filter" title="mla_screen_options_show_screen_filter :: Only show screen options on the table-list screen"><span class="description">Only show screen options on the table-list screen</span><pre>mla_screen_options_show_screen_filter()</pre></a></li>
@@ -82,9 +83,6 @@
82
  <li class="method private "><a href="#_compose_post_type_select" title="_compose_post_type_select :: Compose a Post Type Options list with current selection"><span class="description">Compose a Post Type Options list with current selection</span><pre>_compose_post_type_select()</pre></a></li>
83
  <li class="method private "><a href="#_current_bulk_action" title="_current_bulk_action :: Get the current action selected from the bulk actions dropdown"><span class="description">Get the current action selected from the bulk actions dropdown</span><pre>_current_bulk_action()</pre></a></li>
84
  <li class="method private "><a href="#_delete_single_item" title="_delete_single_item :: Delete a single item permanently"><span class="description">Delete a single item permanently</span><pre>_delete_single_item()</pre></a></li>
85
- <li class="method private "><a href="#_display_single_item" title="_display_single_item :: Display a single item sub page; prepare the form to
86
- change the meta data for a single attachment."><span class="description">Display a single item sub page; prepare the form to
87
- change the meta data for a single attachment.</span><pre>_display_single_item()</pre></a></li>
88
  <li class="method private "><a href="#_process_bulk_value" title="_process_bulk_value :: Process bulk edit area fields, which may contain a Content Template"><span class="description">Process bulk edit area fields, which may contain a Content Template</span><pre>_process_bulk_value()</pre></a></li>
89
  <li class="method private "><a href="#_process_mla_download_file" title="_process_mla_download_file :: Process secure file download"><span class="description">Process secure file download</span><pre>_process_mla_download_file()</pre></a></li>
90
  <li class="method private "><a href="#_restore_single_item" title="_restore_single_item :: Restore a single item from the Trash"><span class="description">Restore a single item from the Trash</span><pre>_restore_single_item()</pre></a></li>
@@ -92,6 +90,7 @@ change the meta data for a single attachment.</span><pre>_display_single_item()<
92
  <li class="nav-header">
93
  <i class="icon-custom icon-property"></i> Properties</li>
94
  <li class="nav-header private">» Private</li>
 
95
  <li class="property private "><a href="#%24page_hooks" title="$page_hooks :: Holds screen ids to match help text to corresponding screen"><span class="description">Holds screen ids to match help text to corresponding screen</span><pre>$page_hooks</pre></a></li>
96
  <li class="nav-header">
97
  <i class="icon-custom icon-constant"></i> Constants</li>
@@ -99,13 +98,11 @@ change the meta data for a single attachment.</span><pre>_display_single_item()<
99
  <li class="constant "><a href="#CURRENT_MLA_VERSION" title="CURRENT_MLA_VERSION :: Current version number"><span class="description">Current version number</span><pre>CURRENT_MLA_VERSION</pre></a></li>
100
  <li class="constant "><a href="#JAVASCRIPT_INLINE_EDIT_OBJECT" title="JAVASCRIPT_INLINE_EDIT_OBJECT :: Object name for localizing JavaScript - MLA List Table"><span class="description">Object name for localizing JavaScript - MLA List Table</span><pre>JAVASCRIPT_INLINE_EDIT_OBJECT</pre></a></li>
101
  <li class="constant "><a href="#JAVASCRIPT_INLINE_EDIT_SLUG" title="JAVASCRIPT_INLINE_EDIT_SLUG :: Slug for localizing and enqueueing JavaScript - MLA List Table"><span class="description">Slug for localizing and enqueueing JavaScript - MLA List Table</span><pre>JAVASCRIPT_INLINE_EDIT_SLUG</pre></a></li>
102
- <li class="constant "><a href="#JAVASCRIPT_SINGLE_EDIT_OBJECT" title="JAVASCRIPT_SINGLE_EDIT_OBJECT :: Object name for localizing JavaScript - edit single item page"><span class="description">Object name for localizing JavaScript - edit single item page</span><pre>JAVASCRIPT_SINGLE_EDIT_OBJECT</pre></a></li>
103
- <li class="constant "><a href="#JAVASCRIPT_SINGLE_EDIT_SLUG" title="JAVASCRIPT_SINGLE_EDIT_SLUG :: Slug for localizing and enqueueing JavaScript - edit single item page"><span class="description">Slug for localizing and enqueueing JavaScript - edit single item page</span><pre>JAVASCRIPT_SINGLE_EDIT_SLUG</pre></a></li>
104
  <li class="constant "><a href="#MLA_ADMIN_NONCE" title="MLA_ADMIN_NONCE :: Action name; uniquely identifies the nonce"><span class="description">Action name; uniquely identifies the nonce</span><pre>MLA_ADMIN_NONCE</pre></a></li>
105
  <li class="constant "><a href="#MLA_ADMIN_SET_PARENT" title="MLA_ADMIN_SET_PARENT :: mla_admin_action value for setting an item's parent object"><span class="description">mla_admin_action value for setting an item's parent object</span><pre>MLA_ADMIN_SET_PARENT</pre></a></li>
106
  <li class="constant "><a href="#MLA_ADMIN_SINGLE_CUSTOM_FIELD_MAP" title="MLA_ADMIN_SINGLE_CUSTOM_FIELD_MAP :: mla_admin_action value for mapping Custom Field metadata"><span class="description">mla_admin_action value for mapping Custom Field metadata</span><pre>MLA_ADMIN_SINGLE_CUSTOM_FIELD_MAP</pre></a></li>
107
  <li class="constant "><a href="#MLA_ADMIN_SINGLE_DELETE" title="MLA_ADMIN_SINGLE_DELETE :: mla_admin_action value for permanently deleting a single item"><span class="description">mla_admin_action value for permanently deleting a single item</span><pre>MLA_ADMIN_SINGLE_DELETE</pre></a></li>
108
- <li class="constant "><a href="#MLA_ADMIN_SINGLE_EDIT_DISPLAY" title="MLA_ADMIN_SINGLE_EDIT_DISPLAY :: mla_admin_action value for displaying a single item"><span class="description">mla_admin_action value for displaying a single item</span><pre>MLA_ADMIN_SINGLE_EDIT_DISPLAY</pre></a></li>
109
  <li class="constant "><a href="#MLA_ADMIN_SINGLE_EDIT_UPDATE" title="MLA_ADMIN_SINGLE_EDIT_UPDATE :: mla_admin_action value for updating a single item"><span class="description">mla_admin_action value for updating a single item</span><pre>MLA_ADMIN_SINGLE_EDIT_UPDATE</pre></a></li>
110
  <li class="constant "><a href="#MLA_ADMIN_SINGLE_MAP" title="MLA_ADMIN_SINGLE_MAP :: mla_admin_action value for mapping IPTC/EXIF metadata"><span class="description">mla_admin_action value for mapping IPTC/EXIF metadata</span><pre>MLA_ADMIN_SINGLE_MAP</pre></a></li>
111
  <li class="constant "><a href="#MLA_ADMIN_SINGLE_RESTORE" title="MLA_ADMIN_SINGLE_RESTORE :: mla_admin_action value for restoring a single item from the trash"><span class="description">mla_admin_action value for restoring a single item from the trash</span><pre>MLA_ADMIN_SINGLE_RESTORE</pre></a></li>
@@ -215,11 +212,7 @@ set up the Assistant submenu.</p></p>
215
  <div class="row collapse"><div class="detail-description">
216
  <p class="long_description"><p>Add a submenu page in the "Media" section,
217
  add settings page in the "Settings" section.
218
- add settings link in the Plugins section entry for MLA.</p>
219
-
220
- <p>For WordPress versions before 3.5,
221
- add submenu page(s) for attachment taxonomies,
222
- add filter to clean up taxonomy submenu labels.</p></p>
223
  <table class="table table-bordered"><tr>
224
  <th>since</th>
225
  <td>0.1</td>
@@ -253,20 +246,6 @@ add filter to clean up taxonomy submenu labels.</p></p>
253
  <code>string</code><code>false</code>HTML markup for the dropdown field or False</div>
254
  </div></div>
255
  </div>
256
- <a name="mla_edit_tax_redirect" id="mla_edit_tax_redirect"></a><div class="element clickable method public mla_edit_tax_redirect" data-toggle="collapse" data-target=".mla_edit_tax_redirect .collapse">
257
- <h2>Redirect to the Edit Tags/Categories page</h2>
258
- <pre>mla_edit_tax_redirect() : void</pre>
259
- <div class="labels"></div>
260
- <div class="row collapse"><div class="detail-description">
261
- <p class="long_description"><p>The custom taxonomy add/edit submenu entries go to "upload.php" by default.
262
- This filter is the only way to redirect them to the correct WordPress page.
263
- The filter is not required for WordPress 3.5 and later.</p></p>
264
- <table class="table table-bordered"><tr>
265
- <th>since</th>
266
- <td>0.1</td>
267
- </tr></table>
268
- </div></div>
269
- </div>
270
  <a name="mla_find_posts_ajax_action" id="mla_find_posts_ajax_action"></a><div class="element clickable method public mla_find_posts_ajax_action" data-toggle="collapse" data-target=".mla_find_posts_ajax_action .collapse">
271
  <h2>Ajax handler to fetch candidates for the "Set Parent" popup window</h2>
272
  <pre>mla_find_posts_ajax_action() : void</pre>
@@ -304,17 +283,24 @@ Adds filters for post type and pagination.</p></p>
304
  </tr></table>
305
  </div></div>
306
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
307
  <a name="mla_parent_file_filter" id="mla_parent_file_filter"></a><div class="element clickable method public mla_parent_file_filter" data-toggle="collapse" data-target=".mla_parent_file_filter .collapse">
308
  <h2>Cleanup menus for Edit Tags/Categories page</h2>
309
  <pre>mla_parent_file_filter(array $parent_file) : string</pre>
310
  <div class="labels"></div>
311
  <div class="row collapse"><div class="detail-description">
312
- <p class="long_description"><p>For WordPress before 3.5, the submenu entries for custom taxonomies
313
- under the "Media" menu are not set up correctly by WordPress, so this
314
- function cleans them up, redirecting the request to the right WordPress
315
- page for editing/adding taxonomy terms.
316
- For WordPress 3.5 and later, the function fixes the submenu bolding when
317
- going to the Edit Media screen.</p></p>
318
  <table class="table table-bordered"><tr>
319
  <th>since</th>
320
  <td>0.1</td>
@@ -343,6 +329,32 @@ Defined as public because it's an action.</p></p>
343
  </tr></table>
344
  </div></div>
345
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
346
  <a name="mla_process_bulk_action" id="mla_process_bulk_action"></a><div class="element clickable method public mla_process_bulk_action" data-toggle="collapse" data-target=".mla_process_bulk_action .collapse">
347
  <h2>Process bulk action for one or more attachments</h2>
348
  <pre>mla_process_bulk_action(string $bulk_action, array $request) : array</pre>
@@ -552,26 +564,6 @@ Defined as public because it's an action.</p></p>
552
  <code>array</code>success/failure message and NULL content</div>
553
  </div></div>
554
  </div>
555
- <a name="_display_single_item" id="_display_single_item"></a><div class="element clickable method private _display_single_item" data-toggle="collapse" data-target="._display_single_item .collapse">
556
- <h2>Display a single item sub page; prepare the form to
557
- change the meta data for a single attachment.</h2>
558
- <pre>_display_single_item(integer $post_id) : array</pre>
559
- <div class="labels"></div>
560
- <div class="row collapse"><div class="detail-description">
561
- <p class="long_description"><p>This function is not used in WordPress 3.5 and later.</p></p>
562
- <table class="table table-bordered"><tr>
563
- <th>since</th>
564
- <td>0.1</td>
565
- </tr></table>
566
- <h3>Parameters</h3>
567
- <div class="subelement argument">
568
- <h4>$post_id</h4>
569
- <code>integer</code><p>The WordPress Post ID of the attachment item</p></div>
570
- <h3>Returns</h3>
571
- <div class="subelement response">
572
- <code>array</code>message and/or HTML content</div>
573
- </div></div>
574
- </div>
575
  <a name="_process_bulk_value" id="_process_bulk_value"></a><div class="element clickable method private _process_bulk_value" data-toggle="collapse" data-target="._process_bulk_value .collapse">
576
  <h2>Process bulk edit area fields, which may contain a Content Template</h2>
577
  <pre>_process_bulk_value(integer $post_id, string $bulk_value) : string</pre>
@@ -646,6 +638,18 @@ change the meta data for a single attachment.</h2>
646
  </div>
647
  <h3>
648
  <i class="icon-custom icon-property"></i> Properties</h3>
 
 
 
 
 
 
 
 
 
 
 
 
649
  <a name="%24page_hooks" id="$page_hooks"> </a><div class="element clickable property private $page_hooks" data-toggle="collapse" data-target=".$page_hooks .collapse">
650
  <h2>Holds screen ids to match help text to corresponding screen</h2>
651
  <pre>$page_hooks : array</pre>
@@ -708,30 +712,6 @@ change the meta data for a single attachment.</h2>
708
  </tr></table>
709
  </div></div>
710
  </div>
711
- <a name="JAVASCRIPT_SINGLE_EDIT_OBJECT" id="JAVASCRIPT_SINGLE_EDIT_OBJECT"> </a><div class="element clickable constant JAVASCRIPT_SINGLE_EDIT_OBJECT" data-toggle="collapse" data-target=".JAVASCRIPT_SINGLE_EDIT_OBJECT .collapse">
712
- <h2>Object name for localizing JavaScript - edit single item page</h2>
713
- <pre>JAVASCRIPT_SINGLE_EDIT_OBJECT : string</pre>
714
- <div class="labels"></div>
715
- <div class="row collapse"><div class="detail-description">
716
- <p class="long_description"></p>
717
- <table class="table table-bordered"><tr>
718
- <th>since</th>
719
- <td>0.1</td>
720
- </tr></table>
721
- </div></div>
722
- </div>
723
- <a name="JAVASCRIPT_SINGLE_EDIT_SLUG" id="JAVASCRIPT_SINGLE_EDIT_SLUG"> </a><div class="element clickable constant JAVASCRIPT_SINGLE_EDIT_SLUG" data-toggle="collapse" data-target=".JAVASCRIPT_SINGLE_EDIT_SLUG .collapse">
724
- <h2>Slug for localizing and enqueueing JavaScript - edit single item page</h2>
725
- <pre>JAVASCRIPT_SINGLE_EDIT_SLUG : string</pre>
726
- <div class="labels"></div>
727
- <div class="row collapse"><div class="detail-description">
728
- <p class="long_description"></p>
729
- <table class="table table-bordered"><tr>
730
- <th>since</th>
731
- <td>0.1</td>
732
- </tr></table>
733
- </div></div>
734
- </div>
735
  <a name="MLA_ADMIN_NONCE" id="MLA_ADMIN_NONCE"> </a><div class="element clickable constant MLA_ADMIN_NONCE" data-toggle="collapse" data-target=".MLA_ADMIN_NONCE .collapse">
736
  <h2>Action name; uniquely identifies the nonce</h2>
737
  <pre>MLA_ADMIN_NONCE : string</pre>
@@ -781,11 +761,11 @@ change the meta data for a single attachment.</h2>
781
  </div></div>
782
  </div>
783
  <a name="MLA_ADMIN_SINGLE_EDIT_DISPLAY" id="MLA_ADMIN_SINGLE_EDIT_DISPLAY"> </a><div class="element clickable constant MLA_ADMIN_SINGLE_EDIT_DISPLAY" data-toggle="collapse" data-target=".MLA_ADMIN_SINGLE_EDIT_DISPLAY .collapse">
784
- <h2>mla_admin_action value for displaying a single item</h2>
785
  <pre>MLA_ADMIN_SINGLE_EDIT_DISPLAY : string</pre>
786
  <div class="labels"></div>
787
  <div class="row collapse"><div class="detail-description">
788
- <p class="long_description"></p>
789
  <table class="table table-bordered"><tr>
790
  <th>since</th>
791
  <td>0.1</td>
@@ -797,7 +777,7 @@ change the meta data for a single attachment.</h2>
797
  <pre>MLA_ADMIN_SINGLE_EDIT_UPDATE : string</pre>
798
  <div class="labels"></div>
799
  <div class="row collapse"><div class="detail-description">
800
- <p class="long_description"></p>
801
  <table class="table table-bordered"><tr>
802
  <th>since</th>
803
  <td>0.1</td>
@@ -883,7 +863,7 @@ change the meta data for a single attachment.</h2>
883
  <div class="row"><footer class="span12">
884
  Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
885
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
886
- generated on 2015-04-19T11:52:22-07:00.<br></footer></div>
887
  </div>
888
  </body>
889
  </html>
64
  <li class="method public "><a href="#mla_admin_init_action" title="mla_admin_init_action :: Load the plugin's Ajax handler or process Edit Media update actions"><span class="description">Load the plugin's Ajax handler or process Edit Media update actions</span><pre>mla_admin_init_action()</pre></a></li>
65
  <li class="method public "><a href="#mla_admin_menu_action" title="mla_admin_menu_action :: Add the submenu pages"><span class="description">Add the submenu pages</span><pre>mla_admin_menu_action()</pre></a></li>
66
  <li class="method public "><a href="#mla_authors_dropdown" title="mla_authors_dropdown :: Get the edit Authors dropdown box, if user has suitable permissions"><span class="description">Get the edit Authors dropdown box, if user has suitable permissions</span><pre>mla_authors_dropdown()</pre></a></li>
 
67
  <li class="method public "><a href="#mla_find_posts_ajax_action" title='mla_find_posts_ajax_action :: Ajax handler to fetch candidates for the "Set Parent" popup window'><span class="description">Ajax handler to fetch candidates for the "Set Parent" popup window</span><pre>mla_find_posts_ajax_action()</pre></a></li>
68
  <li class="method public "><a href="#mla_inline_edit_ajax_action" title="mla_inline_edit_ajax_action :: Ajax handler for inline editing"><span class="description">Ajax handler for inline editing</span><pre>mla_inline_edit_ajax_action()</pre></a></li>
69
  <li class="method public "><a href="#mla_load_media_action" title="mla_load_media_action :: Redirect to Media/Assistant if Media/Library is hidden"><span class="description">Redirect to Media/Assistant if Media/Library is hidden</span><pre>mla_load_media_action()</pre></a></li>
70
+ <li class="method public "><a href="#mla_name_conflict_reporting_action" title="mla_name_conflict_reporting_action :: Displays name conflict error messages at the top of the Dashboard"><span class="description">Displays name conflict error messages at the top of the Dashboard</span><pre>mla_name_conflict_reporting_action()</pre></a></li>
71
  <li class="method public "><a href="#mla_parent_file_filter" title="mla_parent_file_filter :: Cleanup menus for Edit Tags/Categories page"><span class="description">Cleanup menus for Edit Tags/Categories page</span><pre>mla_parent_file_filter()</pre></a></li>
72
  <li class="method public "><a href="#mla_plugins_loaded_action" title="mla_plugins_loaded_action :: Load a plugin text domain"><span class="description">Load a plugin text domain</span><pre>mla_plugins_loaded_action()</pre></a></li>
73
+ <li class="method public "><a href="#mla_prepare_bulk_edits" title="mla_prepare_bulk_edits :: Prepare Bulk Edit field-level updates"><span class="description">Prepare Bulk Edit field-level updates</span><pre>mla_prepare_bulk_edits()</pre></a></li>
74
  <li class="method public "><a href="#mla_process_bulk_action" title="mla_process_bulk_action :: Process bulk action for one or more attachments"><span class="description">Process bulk action for one or more attachments</span><pre>mla_process_bulk_action()</pre></a></li>
75
  <li class="method public "><a href="#mla_render_admin_page" title='mla_render_admin_page :: Render the "Assistant" subpage in the Media section, using the list_table package'><span class="description">Render the "Assistant" subpage in the Media section, using the list_table package</span><pre>mla_render_admin_page()</pre></a></li>
76
  <li class="method public "><a href="#mla_screen_options_show_screen_filter" title="mla_screen_options_show_screen_filter :: Only show screen options on the table-list screen"><span class="description">Only show screen options on the table-list screen</span><pre>mla_screen_options_show_screen_filter()</pre></a></li>
83
  <li class="method private "><a href="#_compose_post_type_select" title="_compose_post_type_select :: Compose a Post Type Options list with current selection"><span class="description">Compose a Post Type Options list with current selection</span><pre>_compose_post_type_select()</pre></a></li>
84
  <li class="method private "><a href="#_current_bulk_action" title="_current_bulk_action :: Get the current action selected from the bulk actions dropdown"><span class="description">Get the current action selected from the bulk actions dropdown</span><pre>_current_bulk_action()</pre></a></li>
85
  <li class="method private "><a href="#_delete_single_item" title="_delete_single_item :: Delete a single item permanently"><span class="description">Delete a single item permanently</span><pre>_delete_single_item()</pre></a></li>
 
 
 
86
  <li class="method private "><a href="#_process_bulk_value" title="_process_bulk_value :: Process bulk edit area fields, which may contain a Content Template"><span class="description">Process bulk edit area fields, which may contain a Content Template</span><pre>_process_bulk_value()</pre></a></li>
87
  <li class="method private "><a href="#_process_mla_download_file" title="_process_mla_download_file :: Process secure file download"><span class="description">Process secure file download</span><pre>_process_mla_download_file()</pre></a></li>
88
  <li class="method private "><a href="#_restore_single_item" title="_restore_single_item :: Restore a single item from the Trash"><span class="description">Restore a single item from the Trash</span><pre>_restore_single_item()</pre></a></li>
90
  <li class="nav-header">
91
  <i class="icon-custom icon-property"></i> Properties</li>
92
  <li class="nav-header private">» Private</li>
93
+ <li class="property private "><a href="#%24mla_language_support_error_messages" title="$mla_language_support_error_messages :: Accumulates error messages from name conflict tests"><span class="description">Accumulates error messages from name conflict tests</span><pre>$mla_language_support_error_messages</pre></a></li>
94
  <li class="property private "><a href="#%24page_hooks" title="$page_hooks :: Holds screen ids to match help text to corresponding screen"><span class="description">Holds screen ids to match help text to corresponding screen</span><pre>$page_hooks</pre></a></li>
95
  <li class="nav-header">
96
  <i class="icon-custom icon-constant"></i> Constants</li>
98
  <li class="constant "><a href="#CURRENT_MLA_VERSION" title="CURRENT_MLA_VERSION :: Current version number"><span class="description">Current version number</span><pre>CURRENT_MLA_VERSION</pre></a></li>
99
  <li class="constant "><a href="#JAVASCRIPT_INLINE_EDIT_OBJECT" title="JAVASCRIPT_INLINE_EDIT_OBJECT :: Object name for localizing JavaScript - MLA List Table"><span class="description">Object name for localizing JavaScript - MLA List Table</span><pre>JAVASCRIPT_INLINE_EDIT_OBJECT</pre></a></li>
100
  <li class="constant "><a href="#JAVASCRIPT_INLINE_EDIT_SLUG" title="JAVASCRIPT_INLINE_EDIT_SLUG :: Slug for localizing and enqueueing JavaScript - MLA List Table"><span class="description">Slug for localizing and enqueueing JavaScript - MLA List Table</span><pre>JAVASCRIPT_INLINE_EDIT_SLUG</pre></a></li>
 
 
101
  <li class="constant "><a href="#MLA_ADMIN_NONCE" title="MLA_ADMIN_NONCE :: Action name; uniquely identifies the nonce"><span class="description">Action name; uniquely identifies the nonce</span><pre>MLA_ADMIN_NONCE</pre></a></li>
102
  <li class="constant "><a href="#MLA_ADMIN_SET_PARENT" title="MLA_ADMIN_SET_PARENT :: mla_admin_action value for setting an item's parent object"><span class="description">mla_admin_action value for setting an item's parent object</span><pre>MLA_ADMIN_SET_PARENT</pre></a></li>
103
  <li class="constant "><a href="#MLA_ADMIN_SINGLE_CUSTOM_FIELD_MAP" title="MLA_ADMIN_SINGLE_CUSTOM_FIELD_MAP :: mla_admin_action value for mapping Custom Field metadata"><span class="description">mla_admin_action value for mapping Custom Field metadata</span><pre>MLA_ADMIN_SINGLE_CUSTOM_FIELD_MAP</pre></a></li>
104
  <li class="constant "><a href="#MLA_ADMIN_SINGLE_DELETE" title="MLA_ADMIN_SINGLE_DELETE :: mla_admin_action value for permanently deleting a single item"><span class="description">mla_admin_action value for permanently deleting a single item</span><pre>MLA_ADMIN_SINGLE_DELETE</pre></a></li>
105
+ <li class="constant "><a href="#MLA_ADMIN_SINGLE_EDIT_DISPLAY" title="MLA_ADMIN_SINGLE_EDIT_DISPLAY :: mla_admin_action value to display a single item for editing"><span class="description">mla_admin_action value to display a single item for editing</span><pre>MLA_ADMIN_SINGLE_EDIT_DISPLAY</pre></a></li>
106
  <li class="constant "><a href="#MLA_ADMIN_SINGLE_EDIT_UPDATE" title="MLA_ADMIN_SINGLE_EDIT_UPDATE :: mla_admin_action value for updating a single item"><span class="description">mla_admin_action value for updating a single item</span><pre>MLA_ADMIN_SINGLE_EDIT_UPDATE</pre></a></li>
107
  <li class="constant "><a href="#MLA_ADMIN_SINGLE_MAP" title="MLA_ADMIN_SINGLE_MAP :: mla_admin_action value for mapping IPTC/EXIF metadata"><span class="description">mla_admin_action value for mapping IPTC/EXIF metadata</span><pre>MLA_ADMIN_SINGLE_MAP</pre></a></li>
108
  <li class="constant "><a href="#MLA_ADMIN_SINGLE_RESTORE" title="MLA_ADMIN_SINGLE_RESTORE :: mla_admin_action value for restoring a single item from the trash"><span class="description">mla_admin_action value for restoring a single item from the trash</span><pre>MLA_ADMIN_SINGLE_RESTORE</pre></a></li>
212
  <div class="row collapse"><div class="detail-description">
213
  <p class="long_description"><p>Add a submenu page in the "Media" section,
214
  add settings page in the "Settings" section.
215
+ add settings link in the Plugins section entry for MLA.</p></p>
 
 
 
 
216
  <table class="table table-bordered"><tr>
217
  <th>since</th>
218
  <td>0.1</td>
246
  <code>string</code><code>false</code>HTML markup for the dropdown field or False</div>
247
  </div></div>
248
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
249
  <a name="mla_find_posts_ajax_action" id="mla_find_posts_ajax_action"></a><div class="element clickable method public mla_find_posts_ajax_action" data-toggle="collapse" data-target=".mla_find_posts_ajax_action .collapse">
250
  <h2>Ajax handler to fetch candidates for the "Set Parent" popup window</h2>
251
  <pre>mla_find_posts_ajax_action() : void</pre>
283
  </tr></table>
284
  </div></div>
285
  </div>
286
+ <a name="mla_name_conflict_reporting_action" id="mla_name_conflict_reporting_action"></a><div class="element clickable method public mla_name_conflict_reporting_action" data-toggle="collapse" data-target=".mla_name_conflict_reporting_action .collapse">
287
+ <h2>Displays name conflict error messages at the top of the Dashboard</h2>
288
+ <pre>mla_name_conflict_reporting_action() </pre>
289
+ <div class="labels"></div>
290
+ <div class="row collapse"><div class="detail-description">
291
+ <p class="long_description"></p>
292
+ <table class="table table-bordered"><tr>
293
+ <th>since</th>
294
+ <td>2.11</td>
295
+ </tr></table>
296
+ </div></div>
297
+ </div>
298
  <a name="mla_parent_file_filter" id="mla_parent_file_filter"></a><div class="element clickable method public mla_parent_file_filter" data-toggle="collapse" data-target=".mla_parent_file_filter .collapse">
299
  <h2>Cleanup menus for Edit Tags/Categories page</h2>
300
  <pre>mla_parent_file_filter(array $parent_file) : string</pre>
301
  <div class="labels"></div>
302
  <div class="row collapse"><div class="detail-description">
303
+ <p class="long_description"><p>Fixes the submenu bolding when going to the Edit Media screen.</p></p>
 
 
 
 
 
304
  <table class="table table-bordered"><tr>
305
  <th>since</th>
306
  <td>0.1</td>
329
  </tr></table>
330
  </div></div>
331
  </div>
332
+ <a name="mla_prepare_bulk_edits" id="mla_prepare_bulk_edits"></a><div class="element clickable method public mla_prepare_bulk_edits" data-toggle="collapse" data-target=".mla_prepare_bulk_edits .collapse">
333
+ <h2>Prepare Bulk Edit field-level updates</h2>
334
+ <pre>mla_prepare_bulk_edits(integer $post_id, array $request, array $custom_field_map) : array</pre>
335
+ <div class="labels"></div>
336
+ <div class="row collapse"><div class="detail-description">
337
+ <p class="long_description"></p>
338
+ <table class="table table-bordered"><tr>
339
+ <th>since</th>
340
+ <td>2.11</td>
341
+ </tr></table>
342
+ <h3>Parameters</h3>
343
+ <div class="subelement argument">
344
+ <h4>$post_id</h4>
345
+ <code>integer</code><p>Current post ID</p></div>
346
+ <div class="subelement argument">
347
+ <h4>$request</h4>
348
+ <code>array</code><p>Form elements, e.g., from $_REQUEST</p>
349
+ </div>
350
+ <div class="subelement argument">
351
+ <h4>$custom_field_map</h4>
352
+ <code>array</code><p>Form id to field name mapping</p></div>
353
+ <h3>Returns</h3>
354
+ <div class="subelement response">
355
+ <code>array</code>Non-empty form elements</div>
356
+ </div></div>
357
+ </div>
358
  <a name="mla_process_bulk_action" id="mla_process_bulk_action"></a><div class="element clickable method public mla_process_bulk_action" data-toggle="collapse" data-target=".mla_process_bulk_action .collapse">
359
  <h2>Process bulk action for one or more attachments</h2>
360
  <pre>mla_process_bulk_action(string $bulk_action, array $request) : array</pre>
564
  <code>array</code>success/failure message and NULL content</div>
565
  </div></div>
566
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
567
  <a name="_process_bulk_value" id="_process_bulk_value"></a><div class="element clickable method private _process_bulk_value" data-toggle="collapse" data-target="._process_bulk_value .collapse">
568
  <h2>Process bulk edit area fields, which may contain a Content Template</h2>
569
  <pre>_process_bulk_value(integer $post_id, string $bulk_value) : string</pre>
638
  </div>
639
  <h3>
640
  <i class="icon-custom icon-property"></i> Properties</h3>
641
+ <a name="%24mla_language_support_error_messages" id="$mla_language_support_error_messages"> </a><div class="element clickable property private $mla_language_support_error_messages" data-toggle="collapse" data-target=".$mla_language_support_error_messages .collapse">
642
+ <h2>Accumulates error messages from name conflict tests</h2>
643
+ <pre>$mla_language_support_error_messages </pre>
644
+ <div class="labels"></div>
645
+ <div class="row collapse"><div class="detail-description">
646
+ <p class="long_description"></p>
647
+ <table class="table table-bordered"><tr>
648
+ <th>since</th>
649
+ <td>1.14</td>
650
+ </tr></table>
651
+ </div></div>
652
+ </div>
653
  <a name="%24page_hooks" id="$page_hooks"> </a><div class="element clickable property private $page_hooks" data-toggle="collapse" data-target=".$page_hooks .collapse">
654
  <h2>Holds screen ids to match help text to corresponding screen</h2>
655
  <pre>$page_hooks : array</pre>
712
  </tr></table>
713
  </div></div>
714
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
715
  <a name="MLA_ADMIN_NONCE" id="MLA_ADMIN_NONCE"> </a><div class="element clickable constant MLA_ADMIN_NONCE" data-toggle="collapse" data-target=".MLA_ADMIN_NONCE .collapse">
716
  <h2>Action name; uniquely identifies the nonce</h2>
717
  <pre>MLA_ADMIN_NONCE : string</pre>
761
  </div></div>
762
  </div>
763
  <a name="MLA_ADMIN_SINGLE_EDIT_DISPLAY" id="MLA_ADMIN_SINGLE_EDIT_DISPLAY"> </a><div class="element clickable constant MLA_ADMIN_SINGLE_EDIT_DISPLAY" data-toggle="collapse" data-target=".MLA_ADMIN_SINGLE_EDIT_DISPLAY .collapse">
764
+ <h2>mla_admin_action value to display a single item for editing</h2>
765
  <pre>MLA_ADMIN_SINGLE_EDIT_DISPLAY : string</pre>
766
  <div class="labels"></div>
767
  <div class="row collapse"><div class="detail-description">
768
+ <p class="long_description"><p>Used by class-mla-view-list-table.php and class-mla-upload-list-table.php</p></p>
769
  <table class="table table-bordered"><tr>
770
  <th>since</th>
771
  <td>0.1</td>
777
  <pre>MLA_ADMIN_SINGLE_EDIT_UPDATE : string</pre>
778
  <div class="labels"></div>
779
  <div class="row collapse"><div class="detail-description">
780
+ <p class="long_description"><p>Used by class-mla-view-list-table.php and class-mla-upload-list-table.php</p></p>
781
  <table class="table table-bordered"><tr>
782
  <th>since</th>
783
  <td>0.1</td>
863
  <div class="row"><footer class="span12">
864
  Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
865
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
866
+ generated on 2015-06-06T19:41:35-07:00.<br></footer></div>
867
  </div>
868
  </body>
869
  </html>
phpDocs/classes/MLAData.html CHANGED
@@ -1784,7 +1784,7 @@ ALT Text and custom field columns.</p></p>
1784
  <div class="row"><footer class="span12">
1785
  Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
1786
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
1787
- generated on 2015-04-19T11:52:22-07:00.<br></footer></div>
1788
  </div>
1789
  </body>
1790
  </html>
1784
  <div class="row"><footer class="span12">
1785
  Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
1786
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
1787
+ generated on 2015-06-06T19:41:35-07:00.<br></footer></div>
1788
  </div>
1789
  </body>
1790
  </html>
phpDocs/classes/MLAEdit.html CHANGED
@@ -513,7 +513,7 @@ The array is built once each page load and cached for subsequent calls.</p></p>
513
  <div class="row"><footer class="span12">
514
  Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
515
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
516
- generated on 2015-04-19T11:52:22-07:00.<br></footer></div>
517
  </div>
518
  </body>
519
  </html>
513
  <div class="row"><footer class="span12">
514
  Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
515
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
516
+ generated on 2015-06-06T19:41:35-07:00.<br></footer></div>
517
  </div>
518
  </body>
519
  </html>
phpDocs/classes/MLAMime.html CHANGED
@@ -897,7 +897,7 @@ Defined as public because it's a filter.</p></p>
897
  </div>
898
  <h3>Returns</h3>
899
  <div class="subelement response">
900
- <code>array</code>Updated (path => URI) array</div>
901
  </div></div>
902
  </div>
903
  <a name="_execute_optional_upload_items_query" id="_execute_optional_upload_items_query"></a><div class="element clickable method private _execute_optional_upload_items_query" data-toggle="collapse" data-target="._execute_optional_upload_items_query .collapse">
@@ -1288,7 +1288,7 @@ Defined as public because it's a filter.</p></p>
1288
  <div class="row"><footer class="span12">
1289
  Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
1290
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
1291
- generated on 2015-04-19T11:52:22-07:00.<br></footer></div>
1292
  </div>
1293
  </body>
1294
  </html>
897
  </div>
898
  <h3>Returns</h3>
899
  <div class="subelement response">
900
+ <code>array</code>Updated URI to the MIME type icon</div>
901
  </div></div>
902
  </div>
903
  <a name="_execute_optional_upload_items_query" id="_execute_optional_upload_items_query"></a><div class="element clickable method private _execute_optional_upload_items_query" data-toggle="collapse" data-target="._execute_optional_upload_items_query .collapse">
1288
  <div class="row"><footer class="span12">
1289
  Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
1290
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
1291
+ generated on 2015-06-06T19:41:36-07:00.<br></footer></div>
1292
  </div>
1293
  </body>
1294
  </html>
phpDocs/classes/MLAModal.html CHANGED
@@ -70,7 +70,7 @@ but only once per page load</span><pre>mla_add_terms_search_scripts()</pre></a><
70
  <li class="method public "><a href="#mla_fill_compat_fields_action" title='mla_fill_compat_fields_action :: Ajax handler for Media Manager "fill compat-attachment-fields" queries'><span class="description">Ajax handler for Media Manager "fill compat-attachment-fields" queries</span><pre>mla_fill_compat_fields_action()</pre></a></li>
71
  <li class="method public "><a href="#mla_get_media_item_args_filter" title="mla_get_media_item_args_filter :: Saves the get_media_item_args array for the attachment_fields_to_edit filter"><span class="description">Saves the get_media_item_args array for the attachment_fields_to_edit filter</span><pre>mla_get_media_item_args_filter()</pre></a></li>
72
  <li class="method public "><a href="#mla_media_view_settings_filter" title="mla_media_view_settings_filter :: Adds settings values to be passed to the Media Manager in /wp-includes/js/media-views.js."><span class="description">Adds settings values to be passed to the Media Manager in /wp-includes/js/media-views.js.</span><pre>mla_media_view_settings_filter()</pre></a></li>
73
- <li class="method public "><a href="#mla_media_view_strings_filter" title="mla_media_view_strings_filter :: Adds strings values to be passed to the Media Manager in /wp-includes/js/media-views.js."><span class="description">Adds strings values to be passed to the Media Manager in /wp-includes/js/media-views.js.</span><pre>mla_media_view_strings_filter()</pre></a></li>
74
  <li class="method public "><a href="#mla_print_media_templates_action" title="mla_print_media_templates_action :: Prints the templates used in the MLA Media Manager enhancements."><span class="description">Prints the templates used in the MLA Media Manager enhancements.</span><pre>mla_print_media_templates_action()</pre></a></li>
75
  <li class="method public "><a href="#mla_query_attachments_action" title='mla_query_attachments_action :: Ajax handler for Media Manager "Query Attachments" queries'><span class="description">Ajax handler for Media Manager "Query Attachments" queries</span><pre>mla_query_attachments_action()</pre></a></li>
76
  <li class="method public "><a href="#mla_terms_search_form" title='mla_terms_search_form :: Build the hidden form for the "Search Terms" popup modal window'><span class="description">Build the hidden form for the "Search Terms" popup modal window</span><pre>mla_terms_search_form()</pre></a></li>
@@ -270,7 +270,7 @@ Declared public because it is a filter.</p></p>
270
  </div></div>
271
  </div>
272
  <a name="mla_media_view_strings_filter" id="mla_media_view_strings_filter"></a><div class="element clickable method public mla_media_view_strings_filter" data-toggle="collapse" data-target=".mla_media_view_strings_filter .collapse">
273
- <h2>Adds strings values to be passed to the Media Manager in /wp-includes/js/media-views.js.</h2>
274
  <pre>mla_media_view_strings_filter(array $strings, object $post) : array</pre>
275
  <div class="labels"></div>
276
  <div class="row collapse"><div class="detail-description">
@@ -515,7 +515,7 @@ and mla_print_media_templates_action</h2>
515
  <div class="row"><footer class="span12">
516
  Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
517
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
518
- generated on 2015-04-19T11:52:22-07:00.<br></footer></div>
519
  </div>
520
  </body>
521
  </html>
70
  <li class="method public "><a href="#mla_fill_compat_fields_action" title='mla_fill_compat_fields_action :: Ajax handler for Media Manager "fill compat-attachment-fields" queries'><span class="description">Ajax handler for Media Manager "fill compat-attachment-fields" queries</span><pre>mla_fill_compat_fields_action()</pre></a></li>
71
  <li class="method public "><a href="#mla_get_media_item_args_filter" title="mla_get_media_item_args_filter :: Saves the get_media_item_args array for the attachment_fields_to_edit filter"><span class="description">Saves the get_media_item_args array for the attachment_fields_to_edit filter</span><pre>mla_get_media_item_args_filter()</pre></a></li>
72
  <li class="method public "><a href="#mla_media_view_settings_filter" title="mla_media_view_settings_filter :: Adds settings values to be passed to the Media Manager in /wp-includes/js/media-views.js."><span class="description">Adds settings values to be passed to the Media Manager in /wp-includes/js/media-views.js.</span><pre>mla_media_view_settings_filter()</pre></a></li>
73
+ <li class="method public "><a href="#mla_media_view_strings_filter" title="mla_media_view_strings_filter :: Adds string values to be passed to the Media Manager in /wp-includes/js/media-views.js."><span class="description">Adds string values to be passed to the Media Manager in /wp-includes/js/media-views.js.</span><pre>mla_media_view_strings_filter()</pre></a></li>
74
  <li class="method public "><a href="#mla_print_media_templates_action" title="mla_print_media_templates_action :: Prints the templates used in the MLA Media Manager enhancements."><span class="description">Prints the templates used in the MLA Media Manager enhancements.</span><pre>mla_print_media_templates_action()</pre></a></li>
75
  <li class="method public "><a href="#mla_query_attachments_action" title='mla_query_attachments_action :: Ajax handler for Media Manager "Query Attachments" queries'><span class="description">Ajax handler for Media Manager "Query Attachments" queries</span><pre>mla_query_attachments_action()</pre></a></li>
76
  <li class="method public "><a href="#mla_terms_search_form" title='mla_terms_search_form :: Build the hidden form for the "Search Terms" popup modal window'><span class="description">Build the hidden form for the "Search Terms" popup modal window</span><pre>mla_terms_search_form()</pre></a></li>
270
  </div></div>
271
  </div>
272
  <a name="mla_media_view_strings_filter" id="mla_media_view_strings_filter"></a><div class="element clickable method public mla_media_view_strings_filter" data-toggle="collapse" data-target=".mla_media_view_strings_filter .collapse">
273
+ <h2>Adds string values to be passed to the Media Manager in /wp-includes/js/media-views.js.</h2>
274
  <pre>mla_media_view_strings_filter(array $strings, object $post) : array</pre>
275
  <div class="labels"></div>
276
  <div class="row collapse"><div class="detail-description">
515
  <div class="row"><footer class="span12">
516
  Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
517
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
518
+ generated on 2015-06-06T19:41:36-07:00.<br></footer></div>
519
  </div>
520
  </body>
521
  </html>
phpDocs/classes/MLAMutex.html CHANGED
@@ -71,26 +71,6 @@
71
  <li class="property private "><a href="#%24sem_id" title="$sem_id :: Semaphore identifier returned by sem_get()"><span class="description">Semaphore identifier returned by sem_get()</span><pre>$sem_id</pre></a></li>
72
  <li class="property private "><a href="#%24use_file_lock" title="$use_file_lock :: True if using a file lock instead of a semaphore"><span class="description">True if using a file lock instead of a semaphore</span><pre>$use_file_lock</pre></a></li>
73
  </ul>
74
- <span class="btn-group visibility" data-toggle="buttons-checkbox"><button class="btn public active" title="Show public elements">Public</button><button class="btn protected" title="Show protected elements">Protected</button><button class="btn private" title="Show private elements">Private</button><button class="btn inherited active" title="Show inherited elements">Inherited</button></span><div class="btn-group view pull-right" data-toggle="buttons-radio">
75
- <button class="btn details" title="Show descriptions and method names"><i class="icon-list"></i></button><button class="btn simple" title="Show only method names"><i class="icon-align-justify"></i></button>
76
- </div>
77
- <ul class="side-nav nav nav-list">
78
- <li class="nav-header">
79
- <i class="icon-custom icon-method"></i> Methods</li>
80
- <li class="method public "><a href="#__construct" title="__construct :: Initializes the choice of semaphore Vs file lock"><span class="description">Initializes the choice of semaphore Vs file lock</span><pre>__construct()</pre></a></li>
81
- <li class="method public "><a href="#acquire" title="acquire :: Acquires the semaphore or opens and locks the file"><span class="description">Acquires the semaphore or opens and locks the file</span><pre>acquire()</pre></a></li>
82
- <li class="method public "><a href="#getId" title="getId :: Returns the semaphore identifier, if it exists, else NULL"><span class="description">Returns the semaphore identifier, if it exists, else NULL</span><pre>getId()</pre></a></li>
83
- <li class="method public "><a href="#init" title="init :: Creates the semaphore or sets the (lock) file name"><span class="description">Creates the semaphore or sets the (lock) file name</span><pre>init()</pre></a></li>
84
- <li class="method public "><a href="#release" title="release :: Releases the semaphore or unlocks and closes (but does not unlink) the file"><span class="description">Releases the semaphore or unlocks and closes (but does not unlink) the file</span><pre>release()</pre></a></li>
85
- <li class="nav-header">
86
- <i class="icon-custom icon-property"></i> Properties</li>
87
- <li class="nav-header private">» Private</li>
88
- <li class="property private "><a href="#%24filename" title="$filename :: Name of the (locked) file used as a semaphore"><span class="description">Name of the (locked) file used as a semaphore</span><pre>$filename</pre></a></li>
89
- <li class="property private "><a href="#%24filepointer" title="$filepointer :: File system pointer resource of the (locked) file used as a semaphore"><span class="description">File system pointer resource of the (locked) file used as a semaphore</span><pre>$filepointer</pre></a></li>
90
- <li class="property private "><a href="#%24is_acquired" title="$is_acquired :: True if the semaphore has been acquired"><span class="description">True if the semaphore has been acquired</span><pre>$is_acquired</pre></a></li>
91
- <li class="property private "><a href="#%24sem_id" title="$sem_id :: Semaphore identifier returned by sem_get()"><span class="description">Semaphore identifier returned by sem_get()</span><pre>$sem_id</pre></a></li>
92
- <li class="property private "><a href="#%24use_file_lock" title="$use_file_lock :: True if using a file lock instead of a semaphore"><span class="description">True if using a file lock instead of a semaphore</span><pre>$use_file_lock</pre></a></li>
93
- </ul>
94
  </div>
95
  <div class="span8">
96
  <a name="%5CMLAMutex" id="\MLAMutex"></a><ul class="breadcrumb">
@@ -266,185 +246,12 @@ for the [mla_gallery] mla_viewer=single option</p>
266
  </div>
267
  </div>
268
  </div>
269
- <a name="%5CMLAMutex" id="\MLAMutex"></a><ul class="breadcrumb">
270
- <li>
271
- <a href="../index.html"><i class="icon-custom icon-class"></i></a><span class="divider">\</span>
272
- </li>
273
- <li><a href="../namespaces/global.html">global</a></li>
274
- <li class="active">
275
- <span class="divider">\</span><a href="../classes/MLAMutex.html">MLAMutex</a>
276
- </li>
277
- </ul>
278
- <div href="../classes/MLAMutex.html" class="element class">
279
- <p class="short_description">Class MLA (Media Library Assistant) Mutex provides a simple "mutual exclusion" semaphore
280
- for the [mla_gallery] mla_viewer=single option</p>
281
- <div class="details">
282
- <p class="long_description"><p>Adapted from the example by mr.smaon@gmail.com in the PHP Manual "Semaphore Functions" page.</p></p>
283
- <table class="table table-bordered">
284
- <tr>
285
- <th>package</th>
286
- <td><a href="../packages/Media%20Library%20Assistant.html">Media Library Assistant</a></td>
287
- </tr>
288
- <tr>
289
- <th>since</th>
290
- <td>2.10</td>
291
- </tr>
292
- </table>
293
- <h3>
294
- <i class="icon-custom icon-method"></i> Methods</h3>
295
- <a name="__construct" id="__construct"></a><div class="element clickable method public __construct" data-toggle="collapse" data-target=".__construct .collapse">
296
- <h2>Initializes the choice of semaphore Vs file lock</h2>
297
- <pre>__construct(boolean $use_lock) : void</pre>
298
- <div class="labels"></div>
299
- <div class="row collapse"><div class="detail-description">
300
- <p class="long_description"></p>
301
- <table class="table table-bordered"><tr>
302
- <th>since</th>
303
- <td>2.10</td>
304
- </tr></table>
305
- <h3>Parameters</h3>
306
- <div class="subelement argument">
307
- <h4>$use_lock</h4>
308
- <code>boolean</code><p>True to force use of file locking</p></div>
309
- </div></div>
310
- </div>
311
- <a name="acquire" id="acquire"></a><div class="element clickable method public acquire" data-toggle="collapse" data-target=".acquire .collapse">
312
- <h2>Acquires the semaphore or opens and locks the file</h2>
313
- <pre>acquire() : boolean</pre>
314
- <div class="labels"></div>
315
- <div class="row collapse"><div class="detail-description">
316
- <p class="long_description"></p>
317
- <table class="table table-bordered"><tr>
318
- <th>since</th>
319
- <td>2.10</td>
320
- </tr></table>
321
- <h3>Returns</h3>
322
- <div class="subelement response">
323
- <code>boolean</code>True if the acquisition succeeded</div>
324
- </div></div>
325
- </div>
326
- <a name="getId" id="getId"></a><div class="element clickable method public getId" data-toggle="collapse" data-target=".getId .collapse">
327
- <h2>Returns the semaphore identifier, if it exists, else NULL</h2>
328
- <pre>getId() : resource</pre>
329
- <div class="labels"></div>
330
- <div class="row collapse"><div class="detail-description">
331
- <p class="long_description"></p>
332
- <table class="table table-bordered"><tr>
333
- <th>since</th>
334
- <td>2.10</td>
335
- </tr></table>
336
- <h3>Returns</h3>
337
- <div class="subelement response">
338
- <code>resource</code>Semaphore identifier or NULL</div>
339
- </div></div>
340
- </div>
341
- <a name="init" id="init"></a><div class="element clickable method public init" data-toggle="collapse" data-target=".init .collapse">
342
- <h2>Creates the semaphore or sets the (lock) file name</h2>
343
- <pre>init(integer $id, string $filename) : boolean</pre>
344
- <div class="labels"></div>
345
- <div class="row collapse"><div class="detail-description">
346
- <p class="long_description"></p>
347
- <table class="table table-bordered"><tr>
348
- <th>since</th>
349
- <td>2.10</td>
350
- </tr></table>
351
- <h3>Parameters</h3>
352
- <div class="subelement argument">
353
- <h4>$id</h4>
354
- <code>integer</code><p>Key to identify the semaphore</p></div>
355
- <div class="subelement argument">
356
- <h4>$filename</h4>
357
- <code>string</code><p>Absolute path and name of the file for locking</p></div>
358
- <h3>Returns</h3>
359
- <div class="subelement response">
360
- <code>boolean</code>True if the initialization succeeded</div>
361
- </div></div>
362
- </div>
363
- <a name="release" id="release"></a><div class="element clickable method public release" data-toggle="collapse" data-target=".release .collapse">
364
- <h2>Releases the semaphore or unlocks and closes (but does not unlink) the file</h2>
365
- <pre>release() : boolean</pre>
366
- <div class="labels"></div>
367
- <div class="row collapse"><div class="detail-description">
368
- <p class="long_description"></p>
369
- <table class="table table-bordered"><tr>
370
- <th>since</th>
371
- <td>2.10</td>
372
- </tr></table>
373
- <h3>Returns</h3>
374
- <div class="subelement response">
375
- <code>boolean</code>True if the release succeeded</div>
376
- </div></div>
377
- </div>
378
- <h3>
379
- <i class="icon-custom icon-property"></i> Properties</h3>
380
- <a name="%24filename" id="$filename"> </a><div class="element clickable property private $filename" data-toggle="collapse" data-target=".$filename .collapse">
381
- <h2>Name of the (locked) file used as a semaphore</h2>
382
- <pre>$filename : string</pre>
383
- <div class="labels"></div>
384
- <div class="row collapse"><div class="detail-description">
385
- <p class="long_description"></p>
386
- <table class="table table-bordered"><tr>
387
- <th>since</th>
388
- <td>2.10</td>
389
- </tr></table>
390
- </div></div>
391
- </div>
392
- <a name="%24filepointer" id="$filepointer"> </a><div class="element clickable property private $filepointer" data-toggle="collapse" data-target=".$filepointer .collapse">
393
- <h2>File system pointer resource of the (locked) file used as a semaphore</h2>
394
- <pre>$filepointer : resource</pre>
395
- <div class="labels"></div>
396
- <div class="row collapse"><div class="detail-description">
397
- <p class="long_description"></p>
398
- <table class="table table-bordered"><tr>
399
- <th>since</th>
400
- <td>2.10</td>
401
- </tr></table>
402
- </div></div>
403
- </div>
404
- <a name="%24is_acquired" id="$is_acquired"> </a><div class="element clickable property private $is_acquired" data-toggle="collapse" data-target=".$is_acquired .collapse">
405
- <h2>True if the semaphore has been acquired</h2>
406
- <pre>$is_acquired : boolean</pre>
407
- <div class="labels"></div>
408
- <div class="row collapse"><div class="detail-description">
409
- <p class="long_description"></p>
410
- <table class="table table-bordered"><tr>
411
- <th>since</th>
412
- <td>2.10</td>
413
- </tr></table>
414
- </div></div>
415
- </div>
416
- <a name="%24sem_id" id="$sem_id"> </a><div class="element clickable property private $sem_id" data-toggle="collapse" data-target=".$sem_id .collapse">
417
- <h2>Semaphore identifier returned by sem_get()</h2>
418
- <pre>$sem_id : resource</pre>
419
- <div class="labels"></div>
420
- <div class="row collapse"><div class="detail-description">
421
- <p class="long_description"></p>
422
- <table class="table table-bordered"><tr>
423
- <th>since</th>
424
- <td>2.10</td>
425
- </tr></table>
426
- </div></div>
427
- </div>
428
- <a name="%24use_file_lock" id="$use_file_lock"> </a><div class="element clickable property private $use_file_lock" data-toggle="collapse" data-target=".$use_file_lock .collapse">
429
- <h2>True if using a file lock instead of a semaphore</h2>
430
- <pre>$use_file_lock : boolean</pre>
431
- <div class="labels"></div>
432
- <div class="row collapse"><div class="detail-description">
433
- <p class="long_description"></p>
434
- <table class="table table-bordered"><tr>
435
- <th>since</th>
436
- <td>2.10</td>
437
- </tr></table>
438
- </div></div>
439
- </div>
440
- </div>
441
- </div>
442
  </div>
443
  </div>
444
  <div class="row"><footer class="span12">
445
  Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
446
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
447
- generated on 2015-04-19T11:52:22-07:00.<br></footer></div>
448
  </div>
449
  </body>
450
  </html>
71
  <li class="property private "><a href="#%24sem_id" title="$sem_id :: Semaphore identifier returned by sem_get()"><span class="description">Semaphore identifier returned by sem_get()</span><pre>$sem_id</pre></a></li>
72
  <li class="property private "><a href="#%24use_file_lock" title="$use_file_lock :: True if using a file lock instead of a semaphore"><span class="description">True if using a file lock instead of a semaphore</span><pre>$use_file_lock</pre></a></li>
73
  </ul>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
74
  </div>
75
  <div class="span8">
76
  <a name="%5CMLAMutex" id="\MLAMutex"></a><ul class="breadcrumb">
246
  </div>
247
  </div>
248
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
249
  </div>
250
  </div>
251
  <div class="row"><footer class="span12">
252
  Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
253
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
254
+ generated on 2015-06-06T19:41:36-07:00.<br></footer></div>
255
  </div>
256
  </body>
257
  </html>
phpDocs/classes/MLAObjects.html CHANGED
@@ -172,7 +172,7 @@ which replaces the "Posts" column with an equivalent "Attachments" column.</h2>
172
  <div class="row"><footer class="span12">
173
  Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
174
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
175
- generated on 2015-04-19T11:52:22-07:00.<br></footer></div>
176
  </div>
177
  </body>
178
  </html>
172
  <div class="row"><footer class="span12">
173
  Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
174
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
175
+ generated on 2015-06-06T19:41:36-07:00.<br></footer></div>
176
  </div>
177
  </body>
178
  </html>
phpDocs/classes/MLAOptions.html CHANGED
@@ -344,7 +344,7 @@ and provides functions to get and put them from/to WordPress option variables</p
344
  </div>
345
  <a name="mla_delete_option" id="mla_delete_option"></a><div class="element clickable method public mla_delete_option" data-toggle="collapse" data-target=".mla_delete_option .collapse">
346
  <h2>Delete the stored value of a defined MLA option</h2>
347
- <pre>mla_delete_option(string $option) : boolean</pre>
348
  <div class="labels"></div>
349
  <div class="row collapse"><div class="detail-description">
350
  <p class="long_description"></p>
@@ -356,6 +356,9 @@ and provides functions to get and put them from/to WordPress option variables</p
356
  <div class="subelement argument">
357
  <h4>$option</h4>
358
  <code>string</code><p>Name of the desired option</p></div>
 
 
 
359
  <h3>Returns</h3>
360
  <div class="subelement response">
361
  <code>boolean</code>True if the option was deleted, otherwise false</div>
@@ -499,7 +502,7 @@ Isolates clients from changes to _evaluate_data_source().</p></p>
499
  </div>
500
  <a name="mla_get_option" id="mla_get_option"></a><div class="element clickable method public mla_get_option" data-toggle="collapse" data-target=".mla_get_option .collapse">
501
  <h2>Return the stored value or default value of a defined MLA option</h2>
502
- <pre>mla_get_option(string $option, boolean $get_default, boolean $get_stored) : mixed</pre>
503
  <div class="labels"></div>
504
  <div class="row collapse"><div class="detail-description">
505
  <p class="long_description"></p>
@@ -517,6 +520,9 @@ Isolates clients from changes to _evaluate_data_source().</p></p>
517
  <div class="subelement argument">
518
  <h4>$get_stored</h4>
519
  <code>boolean</code><p>True to ignore default values and return only stored values</p></div>
 
 
 
520
  <h3>Returns</h3>
521
  <div class="subelement response">
522
  <code>mixed</code>Value(s) for the option or false if the option is not a defined MLA option</div>
@@ -804,7 +810,7 @@ to ensure that mapping is only performed for new additions, not metadata updates
804
  </div>
805
  <a name="mla_update_option" id="mla_update_option"></a><div class="element clickable method public mla_update_option" data-toggle="collapse" data-target=".mla_update_option .collapse">
806
  <h2>Add or update the stored value of a defined MLA option</h2>
807
- <pre>mla_update_option(string $option, mixed $newvalue) : boolean</pre>
808
  <div class="labels"></div>
809
  <div class="row collapse"><div class="detail-description">
810
  <p class="long_description"></p>
@@ -819,6 +825,9 @@ to ensure that mapping is only performed for new additions, not metadata updates
819
  <div class="subelement argument">
820
  <h4>$newvalue</h4>
821
  <code>mixed</code><p>New value for the desired option</p></div>
 
 
 
822
  <h3>Returns</h3>
823
  <div class="subelement response">
824
  <code>boolean</code>True if the value was changed or false if the update failed</div>
@@ -1658,7 +1667,7 @@ also controls the ATTACHMENT DETAILS enhancements</h2>
1658
  <div class="row"><footer class="span12">
1659
  Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
1660
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
1661
- generated on 2015-04-19T11:52:22-07:00.<br></footer></div>
1662
  </div>
1663
  </body>
1664
  </html>
344
  </div>
345
  <a name="mla_delete_option" id="mla_delete_option"></a><div class="element clickable method public mla_delete_option" data-toggle="collapse" data-target=".mla_delete_option .collapse">
346
  <h2>Delete the stored value of a defined MLA option</h2>
347
+ <pre>mla_delete_option(string $option, array $option_table) : boolean</pre>
348
  <div class="labels"></div>
349
  <div class="row collapse"><div class="detail-description">
350
  <p class="long_description"></p>
356
  <div class="subelement argument">
357
  <h4>$option</h4>
358
  <code>string</code><p>Name of the desired option</p></div>
359
+ <div class="subelement argument">
360
+ <h4>$option_table</h4>
361
+ <code>array</code><p>Custom option definitions</p></div>
362
  <h3>Returns</h3>
363
  <div class="subelement response">
364
  <code>boolean</code>True if the option was deleted, otherwise false</div>
502
  </div>
503
  <a name="mla_get_option" id="mla_get_option"></a><div class="element clickable method public mla_get_option" data-toggle="collapse" data-target=".mla_get_option .collapse">
504
  <h2>Return the stored value or default value of a defined MLA option</h2>
505
+ <pre>mla_get_option(string $option, boolean $get_default, boolean $get_stored, array $option_table) : mixed</pre>
506
  <div class="labels"></div>
507
  <div class="row collapse"><div class="detail-description">
508
  <p class="long_description"></p>
520
  <div class="subelement argument">
521
  <h4>$get_stored</h4>
522
  <code>boolean</code><p>True to ignore default values and return only stored values</p></div>
523
+ <div class="subelement argument">
524
+ <h4>$option_table</h4>
525
+ <code>array</code><p>Custom option definitions</p></div>
526
  <h3>Returns</h3>
527
  <div class="subelement response">
528
  <code>mixed</code>Value(s) for the option or false if the option is not a defined MLA option</div>
810
  </div>
811
  <a name="mla_update_option" id="mla_update_option"></a><div class="element clickable method public mla_update_option" data-toggle="collapse" data-target=".mla_update_option .collapse">
812
  <h2>Add or update the stored value of a defined MLA option</h2>
813
+ <pre>mla_update_option(string $option, mixed $newvalue, array $option_table) : boolean</pre>
814
  <div class="labels"></div>
815
  <div class="row collapse"><div class="detail-description">
816
  <p class="long_description"></p>
825
  <div class="subelement argument">
826
  <h4>$newvalue</h4>
827
  <code>mixed</code><p>New value for the desired option</p></div>
828
+ <div class="subelement argument">
829
+ <h4>$option_table</h4>
830
+ <code>array</code><p>Custom option definitions</p></div>
831
  <h3>Returns</h3>
832
  <div class="subelement response">
833
  <code>boolean</code>True if the value was changed or false if the update failed</div>
1667
  <div class="row"><footer class="span12">
1668
  Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
1669
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
1670
+ generated on 2015-06-06T19:41:36-07:00.<br></footer></div>
1671
  </div>
1672
  </body>
1673
  </html>
phpDocs/classes/MLAPDF.html CHANGED
@@ -378,7 +378,7 @@ The array value is array( number, generation, start, optional /length )</p></p>
378
  <div class="row"><footer class="span12">
379
  Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
380
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
381
- generated on 2015-04-19T11:52:22-07:00.<br></footer></div>
382
  </div>
383
  </body>
384
  </html>
378
  <div class="row"><footer class="span12">
379
  Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
380
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
381
+ generated on 2015-06-06T19:41:35-07:00.<br></footer></div>
382
  </div>
383
  </body>
384
  </html>
phpDocs/classes/MLASettings.html CHANGED
@@ -69,16 +69,18 @@ add screen options and help tabs,
69
  add settings link in the Plugins section entry for MLA.'><span class="description">Add settings page in the "Settings" section,
70
  add screen options and help tabs,
71
  add settings link in the Plugins section entry for MLA.</span><pre>mla_admin_menu_action()</pre></a></li>
 
72
  <li class="method public "><a href="#mla_deactivation_hook" title="mla_deactivation_hook :: Perform one-time actions on plugin deactivation"><span class="description">Perform one-time actions on plugin deactivation</span><pre>mla_deactivation_hook()</pre></a></li>
73
  <li class="method public "><a href="#mla_get_icon_type_dropdown" title="mla_get_icon_type_dropdown :: Get an HTML select element representing a list of icon types"><span class="description">Get an HTML select element representing a list of icon types</span><pre>mla_get_icon_type_dropdown()</pre></a></li>
74
  <li class="method public "><a href="#mla_inline_edit_upload_action" title="mla_inline_edit_upload_action :: Ajax handler for Upload MIME Types inline editing (quick and bulk edit)"><span class="description">Ajax handler for Upload MIME Types inline editing (quick and bulk edit)</span><pre>mla_inline_edit_upload_action()</pre></a></li>
75
  <li class="method public "><a href="#mla_inline_edit_view_action" title="mla_inline_edit_view_action :: Ajax handler for Post MIME Types inline editing (quick and bulk edit)"><span class="description">Ajax handler for Post MIME Types inline editing (quick and bulk edit)</span><pre>mla_inline_edit_view_action()</pre></a></li>
76
  <li class="method public "><a href="#mla_inline_mapping_custom_action" title="mla_inline_mapping_custom_action :: Ajax handler for Custom Fields tab inline mapping"><span class="description">Ajax handler for Custom Fields tab inline mapping</span><pre>mla_inline_mapping_custom_action()</pre></a></li>
77
  <li class="method public "><a href="#mla_inline_mapping_iptc_exif_action" title="mla_inline_mapping_iptc_exif_action :: Ajax handler for IPTC/EXIF tab inline mapping"><span class="description">Ajax handler for IPTC/EXIF tab inline mapping</span><pre>mla_inline_mapping_iptc_exif_action()</pre></a></li>
78
- <li class="method public "><a href="#mla_localize_tablist" title="mla_localize_tablist :: Localize $mla_option_definitions array"><span class="description">Localize $mla_option_definitions array</span><pre>mla_localize_tablist()</pre></a></li>
79
  <li class="method public "><a href="#mla_render_settings_page" title='mla_render_settings_page :: Render (echo) the "Media Library Assistant" subpage in the Settings section'><span class="description">Render (echo) the "Media Library Assistant" subpage in the Settings section</span><pre>mla_render_settings_page()</pre></a></li>
80
  <li class="method public "><a href="#mla_screen_options_show_screen_filter" title="mla_screen_options_show_screen_filter :: Only show screen options on the View and Upload tabs"><span class="description">Only show screen options on the View and Upload tabs</span><pre>mla_screen_options_show_screen_filter()</pre></a></li>
81
  <li class="method public "><a href="#mla_set_screen_option_filter" title='mla_set_screen_option_filter :: Save the "Views/Uploads per page" option set by this user'><span class="description">Save the "Views/Uploads per page" option set by this user</span><pre>mla_set_screen_option_filter()</pre></a></li>
 
82
  <li class="nav-header private">» Private</li>
83
  <li class="method private "><a href="#_compose_custom_field_tab" title="_compose_custom_field_tab :: Compose the Custom Field tab content for the Settings subpage"><span class="description">Compose the Custom Field tab content for the Settings subpage</span><pre>_compose_custom_field_tab()</pre></a></li>
84
  <li class="method private "><a href="#_compose_debug_tab" title="_compose_debug_tab :: Compose the Debug tab content for the Settings subpage"><span class="description">Compose the Debug tab content for the Settings subpage</span><pre>_compose_debug_tab()</pre></a></li>
@@ -89,7 +91,6 @@ add settings link in the Plugins section entry for MLA.</span><pre>mla_admin_men
89
  <li class="method private "><a href="#_compose_import_settings" title="_compose_import_settings :: Compose HTML markup for the import settings if any settings files exist"><span class="description">Compose HTML markup for the import settings if any settings files exist</span><pre>_compose_import_settings()</pre></a></li>
90
  <li class="method private "><a href="#_compose_iptc_exif_tab" title="_compose_iptc_exif_tab :: Compose the IPTC/EXIF tab content for the Settings subpage"><span class="description">Compose the IPTC/EXIF tab content for the Settings subpage</span><pre>_compose_iptc_exif_tab()</pre></a></li>
91
  <li class="method private "><a href="#_compose_mla_gallery_tab" title="_compose_mla_gallery_tab :: Compose the MLA Gallery tab content for the Settings subpage"><span class="description">Compose the MLA Gallery tab content for the Settings subpage</span><pre>_compose_mla_gallery_tab()</pre></a></li>
92
- <li class="method private "><a href="#_compose_option_row" title="_compose_option_row :: Compose the table row for a single MLA option"><span class="description">Compose the table row for a single MLA option</span><pre>_compose_option_row()</pre></a></li>
93
  <li class="method private "><a href="#_compose_optional_upload_tab" title="_compose_optional_upload_tab :: Compose the Optional File Upload MIME Types tab content for the Settings subpage"><span class="description">Compose the Optional File Upload MIME Types tab content for the Settings subpage</span><pre>_compose_optional_upload_tab()</pre></a></li>
94
  <li class="method private "><a href="#_compose_settings_tabs" title="_compose_settings_tabs :: Compose the navigation tabs for the Settings subpage"><span class="description">Compose the navigation tabs for the Settings subpage</span><pre>_compose_settings_tabs()</pre></a></li>
95
  <li class="method private "><a href="#_compose_upload_tab" title="_compose_upload_tab :: Compose the File Upload MIME Types tab content for the Settings subpage"><span class="description">Compose the File Upload MIME Types tab content for the Settings subpage</span><pre>_compose_upload_tab()</pre></a></li>
@@ -120,9 +121,8 @@ without saving the settings to the mla_option</span><pre>_process_iptc_exif_taxo
120
  <li class="method private "><a href="#_save_iptc_exif_settings" title="_save_iptc_exif_settings :: Save IPTC/EXIF settings to the options table"><span class="description">Save IPTC/EXIF settings to the options table</span><pre>_save_iptc_exif_settings()</pre></a></li>
121
  <li class="method private "><a href="#_save_upload_settings" title="_save_upload_settings :: Save Upload settings to the options table"><span class="description">Save Upload settings to the options table</span><pre>_save_upload_settings()</pre></a></li>
122
  <li class="method private "><a href="#_save_view_settings" title="_save_view_settings :: Save View settings to the options table"><span class="description">Save View settings to the options table</span><pre>_save_view_settings()</pre></a></li>
123
- <li class="method private "><a href="#_update_option_row" title="_update_option_row :: Update or delete a single MLA option value"><span class="description">Update or delete a single MLA option value</span><pre>_update_option_row()</pre></a></li>
124
  <li class="method private "><a href="#_version_upgrade" title="_version_upgrade :: Database and option update check, for installing new versions"><span class="description">Database and option update check, for installing new versions</span><pre>_version_upgrade()</pre></a></li>
125
- <li class="method private "><a href="#mla_get_options_tablist" title="mla_get_options_tablist :: Localize $mla_option_definitions array"><span class="description">Localize $mla_option_definitions array</span><pre>mla_get_options_tablist()</pre></a></li>
126
  <li class="nav-header">
127
  <i class="icon-custom icon-property"></i> Properties</li>
128
  <li class="property public "><a href="#%24page_template_array" title="$page_template_array :: Template file for the Settings page(s) and parts"><span class="description">Template file for the Settings page(s) and parts</span><pre>$page_template_array</pre></a></li>
@@ -282,6 +282,39 @@ add settings link in the Plugins section entry for MLA.</h2>
282
  </tr></table>
283
  </div></div>
284
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
285
  <a name="mla_deactivation_hook" id="mla_deactivation_hook"></a><div class="element clickable method public mla_deactivation_hook" data-toggle="collapse" data-target=".mla_deactivation_hook .collapse">
286
  <h2>Perform one-time actions on plugin deactivation</h2>
287
  <pre>mla_deactivation_hook() : void</pre>
@@ -368,7 +401,7 @@ add settings link in the Plugins section entry for MLA.</h2>
368
  </div></div>
369
  </div>
370
  <a name="mla_localize_tablist" id="mla_localize_tablist"></a><div class="element clickable method public mla_localize_tablist" data-toggle="collapse" data-target=".mla_localize_tablist .collapse">
371
- <h2>Localize $mla_option_definitions array</h2>
372
  <pre>mla_localize_tablist() : void</pre>
373
  <div class="labels"></div>
374
  <div class="row collapse"><div class="detail-description">
@@ -440,6 +473,39 @@ in the "public static" array definition itself.</p></p>
440
  <code>string</code><code>void</code>New value if this is our option, otherwise nothing</div>
441
  </div></div>
442
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
443
  <a name="_compose_custom_field_tab" id="_compose_custom_field_tab"></a><div class="element clickable method private _compose_custom_field_tab" data-toggle="collapse" data-target="._compose_custom_field_tab .collapse">
444
  <h2>Compose the Custom Field tab content for the Settings subpage</h2>
445
  <pre>_compose_custom_field_tab() : array</pre>
@@ -625,36 +691,6 @@ in the "public static" array definition itself.</p></p>
625
  <code>array</code>'message' => status/error messages, 'body' => tab content</div>
626
  </div></div>
627
  </div>
628
- <a name="_compose_option_row" id="_compose_option_row"></a><div class="element clickable method private _compose_option_row" data-toggle="collapse" data-target="._compose_option_row .collapse">
629
- <h2>Compose the table row for a single MLA option</h2>
630
- <pre>_compose_option_row(string $key, array $value) : string</pre>
631
- <div class="labels"></div>
632
- <div class="row collapse"><div class="detail-description">
633
- <p class="long_description"></p>
634
- <table class="table table-bordered">
635
- <tr>
636
- <th>since</th>
637
- <td>0.80</td>
638
- </tr>
639
- <tr>
640
- <th>uses</th>
641
- <td>\global\$page_template_array</td>
642
- </tr>
643
- </table>
644
- <h3>Parameters</h3>
645
- <div class="subelement argument">
646
- <h4>$key</h4>
647
- <code>string</code><p>HTML id/name attribute and option database key (OMIT MLA_OPTION_PREFIX)</p>
648
- </div>
649
- <div class="subelement argument">
650
- <h4>$value</h4>
651
- <code>array</code><p>Option parameters, e.g., 'type', 'std'</p>
652
- </div>
653
- <h3>Returns</h3>
654
- <div class="subelement response">
655
- <code>string</code>HTML markup for the option's table row</div>
656
- </div></div>
657
- </div>
658
  <a name="_compose_optional_upload_tab" id="_compose_optional_upload_tab"></a><div class="element clickable method private _compose_optional_upload_tab" data-toggle="collapse" data-target="._compose_optional_upload_tab .collapse">
659
  <h2>Compose the Optional File Upload MIME Types tab content for the Settings subpage</h2>
660
  <pre>_compose_optional_upload_tab(string $page_template_array) : array</pre>
@@ -1120,36 +1156,6 @@ without saving the settings to the mla_option</h2>
1120
  <code>array</code>Message(s) reflecting the results of the operation</div>
1121
  </div></div>
1122
  </div>
1123
- <a name="_update_option_row" id="_update_option_row"></a><div class="element clickable method private _update_option_row" data-toggle="collapse" data-target="._update_option_row .collapse">
1124
- <h2>Update or delete a single MLA option value</h2>
1125
- <pre>_update_option_row(string $key, array $value) : string</pre>
1126
- <div class="labels"></div>
1127
- <div class="row collapse"><div class="detail-description">
1128
- <p class="long_description"></p>
1129
- <table class="table table-bordered">
1130
- <tr>
1131
- <th>since</th>
1132
- <td>0.80</td>
1133
- </tr>
1134
- <tr>
1135
- <th>uses</th>
1136
- <td>\global\$_REQUEST</td>
1137
- </tr>
1138
- </table>
1139
- <h3>Parameters</h3>
1140
- <div class="subelement argument">
1141
- <h4>$key</h4>
1142
- <code>string</code><p>HTML id/name attribute and option database key (OMIT MLA_OPTION_PREFIX)</p>
1143
- </div>
1144
- <div class="subelement argument">
1145
- <h4>$value</h4>
1146
- <code>array</code><p>Option parameters, e.g., 'type', 'std'</p>
1147
- </div>
1148
- <h3>Returns</h3>
1149
- <div class="subelement response">
1150
- <code>string</code>HTML markup for the option's table row</div>
1151
- </div></div>
1152
- </div>
1153
  <a name="_version_upgrade" id="_version_upgrade"></a><div class="element clickable method private _version_upgrade" data-toggle="collapse" data-target="._version_upgrade .collapse">
1154
  <h2>Database and option update check, for installing new versions</h2>
1155
  <pre>_version_upgrade() : void</pre>
@@ -1163,12 +1169,11 @@ without saving the settings to the mla_option</h2>
1163
  </div></div>
1164
  </div>
1165
  <a name="mla_get_options_tablist" id="mla_get_options_tablist"></a><div class="element clickable method private mla_get_options_tablist" data-toggle="collapse" data-target=".mla_get_options_tablist .collapse">
1166
- <h2>Localize $mla_option_definitions array</h2>
1167
  <pre>mla_get_options_tablist(string $tab) : array | false</pre>
1168
  <div class="labels"></div>
1169
  <div class="row collapse"><div class="detail-description">
1170
- <p class="long_description"><p>Localization must be done at runtime, and these calls cannot be placed
1171
- in the "public static" array definition itself.</p></p>
1172
  <table class="table table-bordered"><tr>
1173
  <th>since</th>
1174
  <td>1.82</td>
@@ -1334,7 +1339,7 @@ because Localization calls cannot be placed in the "public static" array definit
1334
  <div class="row"><footer class="span12">
1335
  Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
1336
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
1337
- generated on 2015-04-19T11:52:22-07:00.<br></footer></div>
1338
  </div>
1339
  </body>
1340
  </html>
69
  add settings link in the Plugins section entry for MLA.'><span class="description">Add settings page in the "Settings" section,
70
  add screen options and help tabs,
71
  add settings link in the Plugins section entry for MLA.</span><pre>mla_admin_menu_action()</pre></a></li>
72
+ <li class="method public "><a href="#mla_compose_option_row" title="mla_compose_option_row :: Compose the table row for a single MLA option"><span class="description">Compose the table row for a single MLA option</span><pre>mla_compose_option_row()</pre></a></li>
73
  <li class="method public "><a href="#mla_deactivation_hook" title="mla_deactivation_hook :: Perform one-time actions on plugin deactivation"><span class="description">Perform one-time actions on plugin deactivation</span><pre>mla_deactivation_hook()</pre></a></li>
74
  <li class="method public "><a href="#mla_get_icon_type_dropdown" title="mla_get_icon_type_dropdown :: Get an HTML select element representing a list of icon types"><span class="description">Get an HTML select element representing a list of icon types</span><pre>mla_get_icon_type_dropdown()</pre></a></li>
75
  <li class="method public "><a href="#mla_inline_edit_upload_action" title="mla_inline_edit_upload_action :: Ajax handler for Upload MIME Types inline editing (quick and bulk edit)"><span class="description">Ajax handler for Upload MIME Types inline editing (quick and bulk edit)</span><pre>mla_inline_edit_upload_action()</pre></a></li>
76
  <li class="method public "><a href="#mla_inline_edit_view_action" title="mla_inline_edit_view_action :: Ajax handler for Post MIME Types inline editing (quick and bulk edit)"><span class="description">Ajax handler for Post MIME Types inline editing (quick and bulk edit)</span><pre>mla_inline_edit_view_action()</pre></a></li>
77
  <li class="method public "><a href="#mla_inline_mapping_custom_action" title="mla_inline_mapping_custom_action :: Ajax handler for Custom Fields tab inline mapping"><span class="description">Ajax handler for Custom Fields tab inline mapping</span><pre>mla_inline_mapping_custom_action()</pre></a></li>
78
  <li class="method public "><a href="#mla_inline_mapping_iptc_exif_action" title="mla_inline_mapping_iptc_exif_action :: Ajax handler for IPTC/EXIF tab inline mapping"><span class="description">Ajax handler for IPTC/EXIF tab inline mapping</span><pre>mla_inline_mapping_iptc_exif_action()</pre></a></li>
79
+ <li class="method public "><a href="#mla_localize_tablist" title="mla_localize_tablist :: Localize $mla_tablist array"><span class="description">Localize $mla_tablist array</span><pre>mla_localize_tablist()</pre></a></li>
80
  <li class="method public "><a href="#mla_render_settings_page" title='mla_render_settings_page :: Render (echo) the "Media Library Assistant" subpage in the Settings section'><span class="description">Render (echo) the "Media Library Assistant" subpage in the Settings section</span><pre>mla_render_settings_page()</pre></a></li>
81
  <li class="method public "><a href="#mla_screen_options_show_screen_filter" title="mla_screen_options_show_screen_filter :: Only show screen options on the View and Upload tabs"><span class="description">Only show screen options on the View and Upload tabs</span><pre>mla_screen_options_show_screen_filter()</pre></a></li>
82
  <li class="method public "><a href="#mla_set_screen_option_filter" title='mla_set_screen_option_filter :: Save the "Views/Uploads per page" option set by this user'><span class="description">Save the "Views/Uploads per page" option set by this user</span><pre>mla_set_screen_option_filter()</pre></a></li>
83
+ <li class="method public "><a href="#mla_update_option_row" title="mla_update_option_row :: Update or delete a single MLA option value"><span class="description">Update or delete a single MLA option value</span><pre>mla_update_option_row()</pre></a></li>
84
  <li class="nav-header private">» Private</li>
85
  <li class="method private "><a href="#_compose_custom_field_tab" title="_compose_custom_field_tab :: Compose the Custom Field tab content for the Settings subpage"><span class="description">Compose the Custom Field tab content for the Settings subpage</span><pre>_compose_custom_field_tab()</pre></a></li>
86
  <li class="method private "><a href="#_compose_debug_tab" title="_compose_debug_tab :: Compose the Debug tab content for the Settings subpage"><span class="description">Compose the Debug tab content for the Settings subpage</span><pre>_compose_debug_tab()</pre></a></li>
91
  <li class="method private "><a href="#_compose_import_settings" title="_compose_import_settings :: Compose HTML markup for the import settings if any settings files exist"><span class="description">Compose HTML markup for the import settings if any settings files exist</span><pre>_compose_import_settings()</pre></a></li>
92
  <li class="method private "><a href="#_compose_iptc_exif_tab" title="_compose_iptc_exif_tab :: Compose the IPTC/EXIF tab content for the Settings subpage"><span class="description">Compose the IPTC/EXIF tab content for the Settings subpage</span><pre>_compose_iptc_exif_tab()</pre></a></li>
93
  <li class="method private "><a href="#_compose_mla_gallery_tab" title="_compose_mla_gallery_tab :: Compose the MLA Gallery tab content for the Settings subpage"><span class="description">Compose the MLA Gallery tab content for the Settings subpage</span><pre>_compose_mla_gallery_tab()</pre></a></li>
 
94
  <li class="method private "><a href="#_compose_optional_upload_tab" title="_compose_optional_upload_tab :: Compose the Optional File Upload MIME Types tab content for the Settings subpage"><span class="description">Compose the Optional File Upload MIME Types tab content for the Settings subpage</span><pre>_compose_optional_upload_tab()</pre></a></li>
95
  <li class="method private "><a href="#_compose_settings_tabs" title="_compose_settings_tabs :: Compose the navigation tabs for the Settings subpage"><span class="description">Compose the navigation tabs for the Settings subpage</span><pre>_compose_settings_tabs()</pre></a></li>
96
  <li class="method private "><a href="#_compose_upload_tab" title="_compose_upload_tab :: Compose the File Upload MIME Types tab content for the Settings subpage"><span class="description">Compose the File Upload MIME Types tab content for the Settings subpage</span><pre>_compose_upload_tab()</pre></a></li>
121
  <li class="method private "><a href="#_save_iptc_exif_settings" title="_save_iptc_exif_settings :: Save IPTC/EXIF settings to the options table"><span class="description">Save IPTC/EXIF settings to the options table</span><pre>_save_iptc_exif_settings()</pre></a></li>
122
  <li class="method private "><a href="#_save_upload_settings" title="_save_upload_settings :: Save Upload settings to the options table"><span class="description">Save Upload settings to the options table</span><pre>_save_upload_settings()</pre></a></li>
123
  <li class="method private "><a href="#_save_view_settings" title="_save_view_settings :: Save View settings to the options table"><span class="description">Save View settings to the options table</span><pre>_save_view_settings()</pre></a></li>
 
124
  <li class="method private "><a href="#_version_upgrade" title="_version_upgrade :: Database and option update check, for installing new versions"><span class="description">Database and option update check, for installing new versions</span><pre>_version_upgrade()</pre></a></li>
125
+ <li class="method private "><a href="#mla_get_options_tablist" title="mla_get_options_tablist :: Retrieve the list of options tabs or a specific tab value"><span class="description">Retrieve the list of options tabs or a specific tab value</span><pre>mla_get_options_tablist()</pre></a></li>
126
  <li class="nav-header">
127
  <i class="icon-custom icon-property"></i> Properties</li>
128
  <li class="property public "><a href="#%24page_template_array" title="$page_template_array :: Template file for the Settings page(s) and parts"><span class="description">Template file for the Settings page(s) and parts</span><pre>$page_template_array</pre></a></li>
282
  </tr></table>
283
  </div></div>
284
  </div>
285
+ <a name="mla_compose_option_row" id="mla_compose_option_row"></a><div class="element clickable method public mla_compose_option_row" data-toggle="collapse" data-target=".mla_compose_option_row .collapse">
286
+ <h2>Compose the table row for a single MLA option</h2>
287
+ <pre>mla_compose_option_row(string $key, array $value, array $option_table) : string</pre>
288
+ <div class="labels"></div>
289
+ <div class="row collapse"><div class="detail-description">
290
+ <p class="long_description"></p>
291
+ <table class="table table-bordered">
292
+ <tr>
293
+ <th>since</th>
294
+ <td>0.80</td>
295
+ </tr>
296
+ <tr>
297
+ <th>uses</th>
298
+ <td>\global\$page_template_array</td>
299
+ </tr>
300
+ </table>
301
+ <h3>Parameters</h3>
302
+ <div class="subelement argument">
303
+ <h4>$key</h4>
304
+ <code>string</code><p>HTML id/name attribute and option database key (OMIT MLA_OPTION_PREFIX)</p>
305
+ </div>
306
+ <div class="subelement argument">
307
+ <h4>$value</h4>
308
+ <code>array</code><p>Option parameters, e.g., 'type', 'std'</p>
309
+ </div>
310
+ <div class="subelement argument">
311
+ <h4>$option_table</h4>
312
+ <code>array</code><p>Custom option definitions</p></div>
313
+ <h3>Returns</h3>
314
+ <div class="subelement response">
315
+ <code>string</code>HTML markup for the option's table row</div>
316
+ </div></div>
317
+ </div>
318
  <a name="mla_deactivation_hook" id="mla_deactivation_hook"></a><div class="element clickable method public mla_deactivation_hook" data-toggle="collapse" data-target=".mla_deactivation_hook .collapse">
319
  <h2>Perform one-time actions on plugin deactivation</h2>
320
  <pre>mla_deactivation_hook() : void</pre>
401
  </div></div>
402
  </div>
403
  <a name="mla_localize_tablist" id="mla_localize_tablist"></a><div class="element clickable method public mla_localize_tablist" data-toggle="collapse" data-target=".mla_localize_tablist .collapse">
404
+ <h2>Localize $mla_tablist array</h2>
405
  <pre>mla_localize_tablist() : void</pre>
406
  <div class="labels"></div>
407
  <div class="row collapse"><div class="detail-description">
473
  <code>string</code><code>void</code>New value if this is our option, otherwise nothing</div>
474
  </div></div>
475
  </div>
476
+ <a name="mla_update_option_row" id="mla_update_option_row"></a><div class="element clickable method public mla_update_option_row" data-toggle="collapse" data-target=".mla_update_option_row .collapse">
477
+ <h2>Update or delete a single MLA option value</h2>
478
+ <pre>mla_update_option_row(string $key, array $value, array $option_table) : string</pre>
479
+ <div class="labels"></div>
480
+ <div class="row collapse"><div class="detail-description">
481
+ <p class="long_description"></p>
482
+ <table class="table table-bordered">
483
+ <tr>
484
+ <th>since</th>
485
+ <td>0.80</td>
486
+ </tr>
487
+ <tr>
488
+ <th>uses</th>
489
+ <td>\global\$_REQUEST</td>
490
+ </tr>
491
+ </table>
492
+ <h3>Parameters</h3>
493
+ <div class="subelement argument">
494
+ <h4>$key</h4>
495
+ <code>string</code><p>HTML id/name attribute and option database key (OMIT MLA_OPTION_PREFIX)</p>
496
+ </div>
497
+ <div class="subelement argument">
498
+ <h4>$value</h4>
499
+ <code>array</code><p>Option parameters, e.g., 'type', 'std'</p>
500
+ </div>
501
+ <div class="subelement argument">
502
+ <h4>$option_table</h4>
503
+ <code>array</code><p>Custom option definitions</p></div>
504
+ <h3>Returns</h3>
505
+ <div class="subelement response">
506
+ <code>string</code>HTML markup for the option's table row</div>
507
+ </div></div>
508
+ </div>
509
  <a name="_compose_custom_field_tab" id="_compose_custom_field_tab"></a><div class="element clickable method private _compose_custom_field_tab" data-toggle="collapse" data-target="._compose_custom_field_tab .collapse">
510
  <h2>Compose the Custom Field tab content for the Settings subpage</h2>
511
  <pre>_compose_custom_field_tab() : array</pre>
691
  <code>array</code>'message' => status/error messages, 'body' => tab content</div>
692
  </div></div>
693
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
694
  <a name="_compose_optional_upload_tab" id="_compose_optional_upload_tab"></a><div class="element clickable method private _compose_optional_upload_tab" data-toggle="collapse" data-target="._compose_optional_upload_tab .collapse">
695
  <h2>Compose the Optional File Upload MIME Types tab content for the Settings subpage</h2>
696
  <pre>_compose_optional_upload_tab(string $page_template_array) : array</pre>
1156
  <code>array</code>Message(s) reflecting the results of the operation</div>
1157
  </div></div>
1158
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1159
  <a name="_version_upgrade" id="_version_upgrade"></a><div class="element clickable method private _version_upgrade" data-toggle="collapse" data-target="._version_upgrade .collapse">
1160
  <h2>Database and option update check, for installing new versions</h2>
1161
  <pre>_version_upgrade() : void</pre>
1169
  </div></div>
1170
  </div>
1171
  <a name="mla_get_options_tablist" id="mla_get_options_tablist"></a><div class="element clickable method private mla_get_options_tablist" data-toggle="collapse" data-target=".mla_get_options_tablist .collapse">
1172
+ <h2>Retrieve the list of options tabs or a specific tab value</h2>
1173
  <pre>mla_get_options_tablist(string $tab) : array | false</pre>
1174
  <div class="labels"></div>
1175
  <div class="row collapse"><div class="detail-description">
1176
+ <p class="long_description"></p>
 
1177
  <table class="table table-bordered"><tr>
1178
  <th>since</th>
1179
  <td>1.82</td>
1339
  <div class="row"><footer class="span12">
1340
  Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
1341
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
1342
+ generated on 2015-06-06T19:41:36-07:00.<br></footer></div>
1343
  </div>
1344
  </body>
1345
  </html>
phpDocs/classes/MLAShortcodes.html CHANGED
@@ -728,7 +728,7 @@ any further logic required to translate those values is contained in the filter.
728
  <div class="row"><footer class="span12">
729
  Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
730
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
731
- generated on 2015-04-19T11:52:22-07:00.<br></footer></div>
732
  </div>
733
  </body>
734
  </html>
728
  <div class="row"><footer class="span12">
729
  Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
730
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
731
+ generated on 2015-06-06T19:41:36-07:00.<br></footer></div>
732
  </div>
733
  </body>
734
  </html>
phpDocs/classes/MLAStreamImage.html CHANGED
@@ -57,23 +57,6 @@
57
  <ul class="side-nav nav nav-list">
58
  <li class="nav-header">
59
  <i class="icon-custom icon-method"></i> Methods</li>
60
- <li class="method public "><a href="#_wp_image_editors_filter" title="_wp_image_editors_filter :: Process Imagick image stream request, e.g., for a PDF thumbnail"><span class="description">Process Imagick image stream request, e.g., for a PDF thumbnail</span><pre>_wp_image_editors_filter()</pre></a></li>
61
- <li class="method public "><a href="#initialize" title="initialize :: Load the plugin's Ajax handler"><span class="description">Load the plugin's Ajax handler</span><pre>initialize()</pre></a></li>
62
- <li class="nav-header private">» Private</li>
63
- <li class="method private "><a href="#_process_mla_stream_image" title="_process_mla_stream_image :: Process Imagick image stream request, e.g., for a PDF thumbnail"><span class="description">Process Imagick image stream request, e.g., for a PDF thumbnail</span><pre>_process_mla_stream_image()</pre></a></li>
64
- <li class="nav-header">
65
- <i class="icon-custom icon-property"></i> Properties</li>
66
- <li class="property public "><a href="#%24mla_imagick_args" title="$mla_imagick_args :: Holds Imagick image resolution for class MLA_Image_Editor"><span class="description">Holds Imagick image resolution for class MLA_Image_Editor</span><pre>$mla_imagick_args</pre></a></li>
67
- <li class="nav-header">
68
- <i class="icon-custom icon-constant"></i> Constants</li>
69
- <li class="constant "><a href="#MLA_ADMIN_NONCE" title="MLA_ADMIN_NONCE :: Action name; uniquely identifies the nonce"><span class="description">Action name; uniquely identifies the nonce</span><pre>MLA_ADMIN_NONCE</pre></a></li>
70
- </ul>
71
- <span class="btn-group visibility" data-toggle="buttons-checkbox"><button class="btn public active" title="Show public elements">Public</button><button class="btn protected" title="Show protected elements">Protected</button><button class="btn private" title="Show private elements">Private</button><button class="btn inherited active" title="Show inherited elements">Inherited</button></span><div class="btn-group view pull-right" data-toggle="buttons-radio">
72
- <button class="btn details" title="Show descriptions and method names"><i class="icon-list"></i></button><button class="btn simple" title="Show only method names"><i class="icon-align-justify"></i></button>
73
- </div>
74
- <ul class="side-nav nav nav-list">
75
- <li class="nav-header">
76
- <i class="icon-custom icon-method"></i> Methods</li>
77
  <li class="method public "><a href="#mla_process_stream_image" title="mla_process_stream_image :: Process Imagick image stream request, e.g., for a PDF thumbnail"><span class="description">Process Imagick image stream request, e.g., for a PDF thumbnail</span><pre>mla_process_stream_image()</pre></a></li>
78
  <li class="nav-header private">» Private</li>
79
  <li class="method private "><a href="#_get_temp_file" title="_get_temp_file :: Generate a unique, writable file in the temporary directory"><span class="description">Generate a unique, writable file in the temporary directory</span><pre>_get_temp_file()</pre></a></li>
@@ -97,105 +80,6 @@
97
  </li>
98
  </ul>
99
  <div href="../classes/MLAStreamImage.html" class="element class">
100
- <p class="short_description">Class MLA (Media Library Assistant) Stream Image provides PDF thumbnails.</p>
101
- <div class="details">
102
- <p class="long_description"></p>
103
- <table class="table table-bordered">
104
- <tr>
105
- <th>package</th>
106
- <td><a href="../packages/Media%20Library%20Assistant.html">Media Library Assistant</a></td>
107
- </tr>
108
- <tr>
109
- <th>since</th>
110
- <td>2.10</td>
111
- </tr>
112
- </table>
113
- <h3>
114
- <i class="icon-custom icon-method"></i> Methods</h3>
115
- <a name="_wp_image_editors_filter" id="_wp_image_editors_filter"></a><div class="element clickable method public _wp_image_editors_filter" data-toggle="collapse" data-target="._wp_image_editors_filter .collapse">
116
- <h2>Process Imagick image stream request, e.g., for a PDF thumbnail</h2>
117
- <pre>_wp_image_editors_filter(array $editors) : void</pre>
118
- <div class="labels"></div>
119
- <div class="row collapse"><div class="detail-description">
120
- <p class="long_description"><p>Requires _wpnonce and mla_stream_file (relative to wp_upload_dir ) in $_REQUEST; optional parameters are:
121
- mla_stream_width, mla_stream_height, mla_stream_frame, mla_stream_type</p></p>
122
- <table class="table table-bordered"><tr>
123
- <th>since</th>
124
- <td>2.10</td>
125
- </tr></table>
126
- <h3>Parameters</h3>
127
- <div class="subelement argument">
128
- <h4>$editors</h4>
129
- <code>array</code><p>List of the implemented image editor classes</p></div>
130
- </div></div>
131
- </div>
132
- <a name="initialize" id="initialize"></a><div class="element clickable method public initialize" data-toggle="collapse" data-target=".initialize .collapse">
133
- <h2>Load the plugin's Ajax handler</h2>
134
- <pre>initialize() : void</pre>
135
- <div class="labels"></div>
136
- <div class="row collapse"><div class="detail-description">
137
- <p class="long_description"></p>
138
- <table class="table table-bordered"><tr>
139
- <th>since</th>
140
- <td>2.10</td>
141
- </tr></table>
142
- </div></div>
143
- </div>
144
- <a name="_process_mla_stream_image" id="_process_mla_stream_image"></a><div class="element clickable method private _process_mla_stream_image" data-toggle="collapse" data-target="._process_mla_stream_image .collapse">
145
- <h2>Process Imagick image stream request, e.g., for a PDF thumbnail</h2>
146
- <pre>_process_mla_stream_image() : void</pre>
147
- <div class="labels"></div>
148
- <div class="row collapse"><div class="detail-description">
149
- <p class="long_description"><p>Requires _wpnonce and mla_stream_file (relative to wp_upload_dir ) in $_REQUEST;
150
- optional $_REQUEST parameters are:
151
- mla_stream_width, mla_stream_height, mla_stream_frame,
152
- mla_stream_resolution, mla_stream_quality, mla_stream_type</p></p>
153
- <table class="table table-bordered"><tr>
154
- <th>since</th>
155
- <td>2.10</td>
156
- </tr></table>
157
- </div></div>
158
- </div>
159
- <h3>
160
- <i class="icon-custom icon-property"></i> Properties</h3>
161
- <a name="%24mla_imagick_args" id="$mla_imagick_args"> </a><div class="element clickable property public $mla_imagick_args" data-toggle="collapse" data-target=".$mla_imagick_args .collapse">
162
- <h2>Holds Imagick image resolution for class MLA_Image_Editor</h2>
163
- <pre>$mla_imagick_args : array</pre>
164
- <div class="labels"></div>
165
- <div class="row collapse"><div class="detail-description">
166
- <p class="long_description"></p>
167
- <table class="table table-bordered"><tr>
168
- <th>since</th>
169
- <td>2.10</td>
170
- </tr></table>
171
- </div></div>
172
- </div>
173
- <h3>
174
- <i class="icon-custom icon-constant"></i> Constants</h3>
175
- <a name="MLA_ADMIN_NONCE" id="MLA_ADMIN_NONCE"> </a><div class="element clickable constant MLA_ADMIN_NONCE" data-toggle="collapse" data-target=".MLA_ADMIN_NONCE .collapse">
176
- <h2>Action name; uniquely identifies the nonce</h2>
177
- <pre>MLA_ADMIN_NONCE : string</pre>
178
- <div class="labels"></div>
179
- <div class="row collapse"><div class="detail-description">
180
- <p class="long_description"></p>
181
- <table class="table table-bordered"><tr>
182
- <th>since</th>
183
- <td>2.10</td>
184
- </tr></table>
185
- </div></div>
186
- </div>
187
- </div>
188
- </div>
189
- <a name="%5CMLAStreamImage" id="\MLAStreamImage"></a><ul class="breadcrumb">
190
- <li>
191
- <a href="../index.html"><i class="icon-custom icon-class"></i></a><span class="divider">\</span>
192
- </li>
193
- <li><a href="../namespaces/global.html">global</a></li>
194
- <li class="active">
195
- <span class="divider">\</span><a href="../classes/MLAStreamImage.html">MLAStreamImage</a>
196
- </li>
197
- </ul>
198
- <div href="../classes/MLAStreamImage.html" class="element class">
199
  <p class="short_description">Class MLA (Media Library Assistant) Stream Image provides PDF thumbnails
200
  for the [mla_gallery] mla_viewer.</p>
201
  <div class="details">
@@ -353,7 +237,7 @@ optional $_REQUEST parameters are:
353
  <div class="row"><footer class="span12">
354
  Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
355
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
356
- generated on 2015-04-19T11:52:22-07:00.<br></footer></div>
357
  </div>
358
  </body>
359
  </html>
57
  <ul class="side-nav nav nav-list">
58
  <li class="nav-header">
59
  <i class="icon-custom icon-method"></i> Methods</li>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
60
  <li class="method public "><a href="#mla_process_stream_image" title="mla_process_stream_image :: Process Imagick image stream request, e.g., for a PDF thumbnail"><span class="description">Process Imagick image stream request, e.g., for a PDF thumbnail</span><pre>mla_process_stream_image()</pre></a></li>
61
  <li class="nav-header private">» Private</li>
62
  <li class="method private "><a href="#_get_temp_file" title="_get_temp_file :: Generate a unique, writable file in the temporary directory"><span class="description">Generate a unique, writable file in the temporary directory</span><pre>_get_temp_file()</pre></a></li>
80
  </li>
81
  </ul>
82
  <div href="../classes/MLAStreamImage.html" class="element class">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
83
  <p class="short_description">Class MLA (Media Library Assistant) Stream Image provides PDF thumbnails
84
  for the [mla_gallery] mla_viewer.</p>
85
  <div class="details">
237
  <div class="row"><footer class="span12">
238
  Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
239
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
240
+ generated on 2015-06-06T19:41:36-07:00.<br></footer></div>
241
  </div>
242
  </body>
243
  </html>
phpDocs/classes/MLATest.html CHANGED
@@ -60,9 +60,6 @@
60
  <li class="method public "><a href="#initialize" title="initialize :: Initialization function, similar to __construct()"><span class="description">Initialization function, similar to __construct()</span><pre>initialize()</pre></a></li>
61
  <li class="method public "><a href="#min_WordPress_version" title="min_WordPress_version :: Test that your WordPress version is at least that of the $min_version"><span class="description">Test that your WordPress version is at least that of the $min_version</span><pre>min_WordPress_version()</pre></a></li>
62
  <li class="method public "><a href="#min_php_version" title="min_php_version :: Test that your PHP version is at least that of the $min_php_version"><span class="description">Test that your PHP version is at least that of the $min_php_version</span><pre>min_php_version()</pre></a></li>
63
- <li class="nav-header">
64
- <i class="icon-custom icon-property"></i> Properties</li>
65
- <li class="property public "><a href="#%24wordpress_3point5_plus" title="$wordpress_3point5_plus :: True if WordPress version is 3.5 or newer"><span class="description">True if WordPress version is 3.5 or newer</span><pre>$wordpress_3point5_plus</pre></a></li>
66
  </ul>
67
  </div>
68
  <div class="span8">
@@ -144,20 +141,6 @@ to ensure the plugin can run in the current WordPress envrionment.</p>
144
  <code>string</code>'' if pass else error message</div>
145
  </div></div>
146
  </div>
147
- <h3>
148
- <i class="icon-custom icon-property"></i> Properties</h3>
149
- <a name="%24wordpress_3point5_plus" id="$wordpress_3point5_plus"> </a><div class="element clickable property public $wordpress_3point5_plus" data-toggle="collapse" data-target=".$wordpress_3point5_plus .collapse">
150
- <h2>True if WordPress version is 3.5 or newer</h2>
151
- <pre>$wordpress_3point5_plus : boolean</pre>
152
- <div class="labels"></div>
153
- <div class="row collapse"><div class="detail-description">
154
- <p class="long_description"></p>
155
- <table class="table table-bordered"><tr>
156
- <th>since</th>
157
- <td>0.60</td>
158
- </tr></table>
159
- </div></div>
160
- </div>
161
  </div>
162
  </div>
163
  </div>
@@ -165,7 +148,7 @@ to ensure the plugin can run in the current WordPress envrionment.</p>
165
  <div class="row"><footer class="span12">
166
  Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
167
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
168
- generated on 2015-04-19T11:52:22-07:00.<br></footer></div>
169
  </div>
170
  </body>
171
  </html>
60
  <li class="method public "><a href="#initialize" title="initialize :: Initialization function, similar to __construct()"><span class="description">Initialization function, similar to __construct()</span><pre>initialize()</pre></a></li>
61
  <li class="method public "><a href="#min_WordPress_version" title="min_WordPress_version :: Test that your WordPress version is at least that of the $min_version"><span class="description">Test that your WordPress version is at least that of the $min_version</span><pre>min_WordPress_version()</pre></a></li>
62
  <li class="method public "><a href="#min_php_version" title="min_php_version :: Test that your PHP version is at least that of the $min_php_version"><span class="description">Test that your PHP version is at least that of the $min_php_version</span><pre>min_php_version()</pre></a></li>
 
 
 
63
  </ul>
64
  </div>
65
  <div class="span8">
141
  <code>string</code>'' if pass else error message</div>
142
  </div></div>
143
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
144
  </div>
145
  </div>
146
  </div>
148
  <div class="row"><footer class="span12">
149
  Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
150
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
151
+ generated on 2015-06-06T19:41:36-07:00.<br></footer></div>
152
  </div>
153
  </body>
154
  </html>
phpDocs/classes/MLATextWidget.html CHANGED
@@ -178,7 +178,7 @@
178
  <div class="row"><footer class="span12">
179
  Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
180
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
181
- generated on 2015-04-19T11:52:22-07:00.<br></footer></div>
182
  </div>
183
  </body>
184
  </html>
178
  <div class="row"><footer class="span12">
179
  Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
180
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
181
+ generated on 2015-06-06T19:41:36-07:00.<br></footer></div>
182
  </div>
183
  </body>
184
  </html>
phpDocs/classes/MLA_Checklist_Walker.html CHANGED
@@ -163,7 +163,7 @@ Class Walker is defined in /wp-includes/class-wp-walker.php.</p></p>
163
  <div class="row"><footer class="span12">
164
  Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
165
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
166
- generated on 2015-04-19T11:52:22-07:00.<br></footer></div>
167
  </div>
168
  </body>
169
  </html>
163
  <div class="row"><footer class="span12">
164
  Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
165
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
166
+ generated on 2015-06-06T19:41:35-07:00.<br></footer></div>
167
  </div>
168
  </body>
169
  </html>
phpDocs/classes/MLA_Image_Editor.html DELETED
@@ -1,248 +0,0 @@
1
- <!DOCTYPE html><html xmlns:date="http://exslt.org/dates-and-times" lang="en">
2
- <head>
3
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4
- <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
5
- <meta charset="utf-8">
6
- <title>Media Library Assistant » \MLA_Image_Editor</title>
7
- <meta name="author" content="Mike van Riel">
8
- <meta name="description" content="">
9
- <link href="../css/template.css" rel="stylesheet" media="all">
10
- <script src="../js/jquery-1.7.1.min.js" type="text/javascript"></script><script src="../js/jquery-ui-1.8.2.custom.min.js" type="text/javascript"></script><script src="../js/jquery.mousewheel.min.js" type="text/javascript"></script><script src="../js/bootstrap.js" type="text/javascript"></script><script src="../js/template.js" type="text/javascript"></script><script src="../js/prettify/prettify.min.js" type="text/javascript"></script><link rel="shortcut icon" href="../img/favicon.ico">
11
- <link rel="apple-touch-icon" href="../img/apple-touch-icon.png">
12
- <link rel="apple-touch-icon" sizes="72x72" href="../img/apple-touch-icon-72x72.png">
13
- <link rel="apple-touch-icon" sizes="114x114" href="../img/apple-touch-icon-114x114.png">
14
- </head>
15
- <body>
16
- <div class="navbar navbar-fixed-top">
17
- <div class="navbar-inner"><div class="container">
18
- <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></a><a class="brand" href="../index.html">Media Library Assistant</a><div class="nav-collapse"><ul class="nav">
19
- <li class="dropdown">
20
- <a href="#api" class="dropdown-toggle" data-toggle="dropdown">
21
- API Documentation <b class="caret"></b></a><ul class="dropdown-menu">
22
- <li><a>Packages</a></li>
23
- <li><a href="../packages/Media%20Library%20Assistant.html"><i class="icon-folder-open"></i> Media Library Assistant</a></li>
24
- </ul>
25
- </li>
26
- <li class="dropdown" id="charts-menu">
27
- <a href="#charts" class="dropdown-toggle" data-toggle="dropdown">
28
- Charts <b class="caret"></b></a><ul class="dropdown-menu"><li><a href="../graph_class.html"><i class="icon-list-alt"></i> Class hierarchy diagram</a></li></ul>
29
- </li>
30
- <li class="dropdown" id="reports-menu">
31
- <a href="#reports" class="dropdown-toggle" data-toggle="dropdown">
32
- Reports <b class="caret"></b></a><ul class="dropdown-menu">
33
- <li><a href="../errors.html"><i class="icon-remove-sign"></i> Errors 
34
- <span class="label label-info">0</span></a></li>
35
- <li><a href="../markers.html"><i class="icon-map-marker"></i> Markers 
36
- <ul><li>todo 
37
- <span class="label label-info">1</span>
38
- </li></ul></a></li>
39
- <li><a href="../deprecated.html"><i class="icon-stop"></i> Deprecated elements 
40
- <span class="label label-info">0</span></a></li>
41
- </ul>
42
- </li>
43
- </ul></div>
44
- </div></div>
45
- <div class="go_to_top"><a href="#___" style="color: inherit">Back to top  <i class="icon-upload icon-white"></i></a></div>
46
- </div>
47
- <div id="___" class="container">
48
- <noscript><div class="alert alert-warning">
49
- Javascript is disabled; several features are only available
50
- if Javascript is enabled.
51
- </div></noscript>
52
- <div class="row">
53
- <div class="span4">
54
- <span class="btn-group visibility" data-toggle="buttons-checkbox"><button class="btn public active" title="Show public elements">Public</button><button class="btn protected" title="Show protected elements">Protected</button><button class="btn private" title="Show private elements">Private</button><button class="btn inherited active" title="Show inherited elements">Inherited</button></span><div class="btn-group view pull-right" data-toggle="buttons-radio">
55
- <button class="btn details" title="Show descriptions and method names"><i class="icon-list"></i></button><button class="btn simple" title="Show only method names"><i class="icon-align-justify"></i></button>
56
- </div>
57
- <ul class="side-nav nav nav-list">
58
- <li class="nav-header">
59
- <i class="icon-custom icon-method"></i> Methods</li>
60
- <li class="method public "><a href="#load" title="load :: Loads image from $this-&gt;file into new Imagick Object."><span class="description">Loads image from $this-&gt;file into new Imagick Object.</span><pre>load()</pre></a></li>
61
- <li class="method public "><a href="#mla_prepare_image" title="mla_prepare_image :: Prepare the image for output, scaling and flattening as required"><span class="description">Prepare the image for output, scaling and flattening as required</span><pre>mla_prepare_image()</pre></a></li>
62
- <li class="method public "><a href="#mla_setIteratorIndex" title="mla_setIteratorIndex :: Set the iterator position"><span class="description">Set the iterator position</span><pre>mla_setIteratorIndex()</pre></a></li>
63
- <li class="method public "><a href="#stream" title="stream :: Streams current image to browser."><span class="description">Streams current image to browser.</span><pre>stream()</pre></a></li>
64
- <li class="nav-header private">» Private</li>
65
- <li class="method private "><a href="#_ghostscript_convert" title="_ghostscript_convert :: Direct Ghostscript file conversion"><span class="description">Direct Ghostscript file conversion</span><pre>_ghostscript_convert()</pre></a></li>
66
- </ul>
67
- </div>
68
- <div class="span8">
69
- <a name="%5CMLA_Image_Editor" id="\MLA_Image_Editor"></a><ul class="breadcrumb">
70
- <li>
71
- <a href="../index.html"><i class="icon-custom icon-class"></i></a><span class="divider">\</span>
72
- </li>
73
- <li><a href="../namespaces/global.html">global</a></li>
74
- <li class="active">
75
- <span class="divider">\</span><a href="../classes/MLA_Image_Editor.html">MLA_Image_Editor</a>
76
- </li>
77
- </ul>
78
- <div href="../classes/MLA_Image_Editor.html" class="element class">
79
- <p class="short_description">MLA Image Editor Class for Image Manipulation through Imagick PHP Module</p>
80
- <div class="details">
81
- <p class="long_description"></p>
82
- <table class="table table-bordered">
83
- <tr>
84
- <th>since</th>
85
- <td>2.10</td>
86
- </tr>
87
- <tr>
88
- <th>package</th>
89
- <td><a href="../packages/Media%20Library%20Assistant.html">Media Library Assistant</a></td>
90
- </tr>
91
- <tr>
92
- <th>uses</th>
93
- <td>\global\WP_Image_Editor_Imagick</td>
94
- </tr>
95
- </table>
96
- <h3>
97
- <i class="icon-custom icon-method"></i> Methods</h3>
98
- <a name="load" id="load"></a><div class="element clickable method public load" data-toggle="collapse" data-target=".load .collapse">
99
- <h2>Loads image from $this-&gt;file into new Imagick Object.</h2>
100
- <pre>load() : boolean | \WP_Error</pre>
101
- <div class="labels"></div>
102
- <div class="row collapse"><div class="detail-description">
103
- <p class="long_description"><p>Sets image resolution and frame from $imagick_args before loading the file.</p></p>
104
- <table class="table table-bordered">
105
- <tr>
106
- <th>since</th>
107
- <td>2.10</td>
108
- </tr>
109
- <tr>
110
- <th>access</th>
111
- <td>protected</td>
112
- </tr>
113
- </table>
114
- <h3>Returns</h3>
115
- <div class="subelement response">
116
- <code>boolean</code><code>\WP_Error</code>True if loaded; WP_Error on failure.</div>
117
- </div></div>
118
- </div>
119
- <a name="mla_prepare_image" id="mla_prepare_image"></a><div class="element clickable method public mla_prepare_image" data-toggle="collapse" data-target=".mla_prepare_image .collapse">
120
- <h2>Prepare the image for output, scaling and flattening as required</h2>
121
- <pre>mla_prepare_image(integer $width, integer $height, boolean $best_fit, string $type, integer $quality) : void</pre>
122
- <div class="labels"></div>
123
- <div class="row collapse"><div class="detail-description">
124
- <p class="long_description"></p>
125
- <table class="table table-bordered">
126
- <tr>
127
- <th>since</th>
128
- <td>2.10</td>
129
- </tr>
130
- <tr>
131
- <th>access</th>
132
- <td>public</td>
133
- </tr>
134
- </table>
135
- <h3>Parameters</h3>
136
- <div class="subelement argument">
137
- <h4>$width</h4>
138
- <code>integer</code><p>zero or new width</p></div>
139
- <div class="subelement argument">
140
- <h4>$height</h4>
141
- <code>integer</code><p>zero or new height</p></div>
142
- <div class="subelement argument">
143
- <h4>$best_fit</h4>
144
- <code>boolean</code><p>proportional fit (true) or exact fit (false)</p>
145
- </div>
146
- <div class="subelement argument">
147
- <h4>$type</h4>
148
- <code>string</code><p>output MIME type</p></div>
149
- <div class="subelement argument">
150
- <h4>$quality</h4>
151
- <code>integer</code><p>compression quality; 1 - 100</p>
152
- </div>
153
- </div></div>
154
- </div>
155
- <a name="mla_setIteratorIndex" id="mla_setIteratorIndex"></a><div class="element clickable method public mla_setIteratorIndex" data-toggle="collapse" data-target=".mla_setIteratorIndex .collapse">
156
- <h2>Set the iterator position</h2>
157
- <pre>mla_setIteratorIndex(integer $index) : boolean</pre>
158
- <div class="labels"></div>
159
- <div class="row collapse"><div class="detail-description">
160
- <p class="long_description"></p>
161
- <table class="table table-bordered">
162
- <tr>
163
- <th>since</th>
164
- <td>2.10</td>
165
- </tr>
166
- <tr>
167
- <th>access</th>
168
- <td>public</td>
169
- </tr>
170
- </table>
171
- <h3>Parameters</h3>
172
- <div class="subelement argument">
173
- <h4>$index</h4>
174
- <code>integer</code><p>frame/page number</p>
175
- </div>
176
- <h3>Returns</h3>
177
- <div class="subelement response">
178
- <code>boolean</code>success/failure</div>
179
- </div></div>
180
- </div>
181
- <a name="stream" id="stream"></a><div class="element clickable method public stream" data-toggle="collapse" data-target=".stream .collapse">
182
- <h2>Streams current image to browser.</h2>
183
- <pre>stream(string $mime_type) : boolean | \WP_Error</pre>
184
- <div class="labels"></div>
185
- <div class="row collapse"><div class="detail-description">
186
- <p class="long_description"></p>
187
- <table class="table table-bordered">
188
- <tr>
189
- <th>since</th>
190
- <td>2.10</td>
191
- </tr>
192
- <tr>
193
- <th>access</th>
194
- <td>public</td>
195
- </tr>
196
- </table>
197
- <h3>Parameters</h3>
198
- <div class="subelement argument">
199
- <h4>$mime_type</h4>
200
- <code>string</code>
201
- </div>
202
- <h3>Returns</h3>
203
- <div class="subelement response">
204
- <code>boolean</code><code>\WP_Error</code>
205
- </div>
206
- </div></div>
207
- </div>
208
- <a name="_ghostscript_convert" id="_ghostscript_convert"></a><div class="element clickable method private _ghostscript_convert" data-toggle="collapse" data-target="._ghostscript_convert .collapse">
209
- <h2>Direct Ghostscript file conversion</h2>
210
- <pre>_ghostscript_convert(string $file, string $frame, string $resolution, string $output_type) : boolean</pre>
211
- <div class="labels"></div>
212
- <div class="row collapse"><div class="detail-description">
213
- <p class="long_description"></p>
214
- <table class="table table-bordered"><tr>
215
- <th>since</th>
216
- <td>2.10</td>
217
- </tr></table>
218
- <h3>Parameters</h3>
219
- <div class="subelement argument">
220
- <h4>$file</h4>
221
- <code>string</code><p>Input file, e.g., a PDF document</p></div>
222
- <div class="subelement argument">
223
- <h4>$frame</h4>
224
- <code>string</code><p>Page/frame within the file, zero-based</p>
225
- </div>
226
- <div class="subelement argument">
227
- <h4>$resolution</h4>
228
- <code>string</code><p>Output file DPI. Default 72.</p></div>
229
- <div class="subelement argument">
230
- <h4>$output_type</h4>
231
- <code>string</code><p>Output MIME type; 'image/jpeg' or 'image/png'.</p>
232
- </div>
233
- <h3>Returns</h3>
234
- <div class="subelement response">
235
- <code>boolean</code>true if conversion succeeds else false</div>
236
- </div></div>
237
- </div>
238
- </div>
239
- </div>
240
- </div>
241
- </div>
242
- <div class="row"><footer class="span12">
243
- Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
244
- Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
245
- generated on 2015-04-19T11:52:22-07:00.<br></footer></div>
246
- </div>
247
- </body>
248
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
phpDocs/classes/MLA_List_Table.html CHANGED
@@ -98,13 +98,11 @@ and the value is db column (or other criteria) to sort by.</span><pre>get_sortab
98
  <li class="method public "><a href="#mla_admin_init_action" title="mla_admin_init_action :: Adds support for taxonomy and custom field columns"><span class="description">Adds support for taxonomy and custom field columns</span><pre>mla_admin_init_action()</pre></a></li>
99
  <li class="method public "><a href="#mla_get_sortable_columns" title="mla_get_sortable_columns :: Return the names and display values of the sortable columns"><span class="description">Return the names and display values of the sortable columns</span><pre>mla_get_sortable_columns()</pre></a></li>
100
  <li class="method public "><a href="#mla_get_taxonomy_filter_dropdown" title="mla_get_taxonomy_filter_dropdown :: Get dropdown box of terms to filter by, if available"><span class="description">Get dropdown box of terms to filter by, if available</span><pre>mla_get_taxonomy_filter_dropdown()</pre></a></li>
 
101
  <li class="method public "><a href="#mla_localize_default_columns_array" title="mla_localize_default_columns_array :: Builds the $default_columns array with translated source texts."><span class="description">Builds the $default_columns array with translated source texts.</span><pre>mla_localize_default_columns_array()</pre></a></li>
102
  <li class="method public "><a href="#mla_manage_columns_filter" title="mla_manage_columns_filter :: Handler for filter 'manage_media_page_mla-menu_columns'"><span class="description">Handler for filter 'manage_media_page_mla-menu_columns'</span><pre>mla_manage_columns_filter()</pre></a></li>
103
  <li class="method public "><a href="#mla_manage_hidden_columns_filter" title="mla_manage_hidden_columns_filter :: Handler for filter 'get_user_option_managemedia_page_mla-menucolumnshidden'"><span class="description">Handler for filter 'get_user_option_managemedia_page_mla-menucolumnshidden'</span><pre>mla_manage_hidden_columns_filter()</pre></a></li>
104
  <li class="method public "><a href="#mla_submenu_arguments" title="mla_submenu_arguments :: Process $_REQUEST, building $submenu_arguments"><span class="description">Process $_REQUEST, building $submenu_arguments</span><pre>mla_submenu_arguments()</pre></a></li>
105
- <li class="method public "><a href="#mla_views_media_page_mla_menu_filter" title='mla_views_media_page_mla_menu_filter :: Handler for filter "views_{$this-&gt;screen-&gt;id}" in /admin/includes/class-wp-list-table.php'><span class="description">Handler for filter "views_{$this-&gt;screen-&gt;id}" in /admin/includes/class-wp-list-table.php</span><pre>mla_views_media_page_mla_menu_filter()</pre></a></li>
106
- <li class="method public "><a href="#mla_wpml_media_view_upload_count_filter" title='mla_wpml_media_view_upload_count_filter :: Handler for filter "wpml-media_view-upload-count" in /plugins/wpml-media/inc/wpml-media.class.php'><span class="description">Handler for filter "wpml-media_view-upload-count" in /plugins/wpml-media/inc/wpml-media.class.php</span><pre>mla_wpml_media_view_upload_count_filter()</pre></a></li>
107
- <li class="method public "><a href="#mla_wpml_media_view_upload_page_count_filter" title='mla_wpml_media_view_upload_page_count_filter :: Handler for filter "wpml-media_view-upload-page-count" in /plugins/wpml-media/inc/wpml-media.class.php'><span class="description">Handler for filter "wpml-media_view-upload-page-count" in /plugins/wpml-media/inc/wpml-media.class.php</span><pre>mla_wpml_media_view_upload_page_count_filter()</pre></a></li>
108
  <li class="method public "><a href="#pagination" title="pagination :: Display the pagination, adding view, search and filter arguments"><span class="description">Display the pagination, adding view, search and filter arguments</span><pre>pagination()</pre></a></li>
109
  <li class="method public "><a href="#prepare_items" title="prepare_items :: Prepares the list of items for displaying"><span class="description">Prepares the list of items for displaying</span><pre>prepare_items()</pre></a></li>
110
  <li class="method public "><a href="#print_column_headers" title="print_column_headers :: Print column headers, adding view, search and filter arguments"><span class="description">Print column headers, adding view, search and filter arguments</span><pre>print_column_headers()</pre></a></li>
@@ -125,7 +123,12 @@ and the value is db column (or other criteria) to sort by.</span><pre>get_sortab
125
  <li class="property protected "><a href="#%24default_columns" title="$default_columns :: Table column definitions"><span class="description">Table column definitions</span><pre>$default_columns</pre></a></li>
126
  <li class="property protected "><a href="#%24default_hidden_columns" title="$default_hidden_columns :: Default values for hidden columns"><span class="description">Default values for hidden columns</span><pre>$default_hidden_columns</pre></a></li>
127
  <li class="property protected "><a href="#%24default_sortable_columns" title="$default_sortable_columns :: Sortable column definitions"><span class="description">Sortable column definitions</span><pre>$default_sortable_columns</pre></a></li>
 
128
  <li class="property protected "><a href="#%24rollover_id" title="$rollover_id :: Records assignment of row-level actions to a table row"><span class="description">Records assignment of row-level actions to a table row</span><pre>$rollover_id</pre></a></li>
 
 
 
 
129
  </ul>
130
  </div>
131
  <div class="span8">
@@ -780,6 +783,28 @@ created in time to affect the "screen options" setup.</p></p>
780
  <code>string</code>HTML markup for dropdown box</div>
781
  </div></div>
782
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
783
  <a name="mla_localize_default_columns_array" id="mla_localize_default_columns_array"></a><div class="element clickable method public mla_localize_default_columns_array" data-toggle="collapse" data-target=".mla_localize_default_columns_array .collapse">
784
  <h2>Builds the $default_columns array with translated source texts.</h2>
785
  <pre>mla_localize_default_columns_array() : void</pre>
@@ -858,83 +883,6 @@ is not created in time for the call from screen.php.</p></p>
858
  <code>array</code>non-empty view, search, filter and sort arguments</div>
859
  </div></div>
860
  </div>
861
- <a name="mla_views_media_page_mla_menu_filter" id="mla_views_media_page_mla_menu_filter"></a><div class="element clickable method public mla_views_media_page_mla_menu_filter" data-toggle="collapse" data-target=".mla_views_media_page_mla_menu_filter .collapse">
862
- <h2>Handler for filter "views_{$this-&gt;screen-&gt;id}" in /admin/includes/class-wp-list-table.php</h2>
863
- <pre>mla_views_media_page_mla_menu_filter(array $views) : array</pre>
864
- <div class="labels"></div>
865
- <div class="row collapse"><div class="detail-description">
866
- <p class="long_description"><p>Filter the list of available list table views. Set when the
867
- file is loaded because the list_table object isn't created in time
868
- to affect the "screen options" setup.</p></p>
869
- <table class="table table-bordered"><tr>
870
- <th>since</th>
871
- <td>1.82</td>
872
- </tr></table>
873
- <h3>Parameters</h3>
874
- <div class="subelement argument">
875
- <h4>$views</h4>
876
- <code>array</code><p>A list of available list table views</p></div>
877
- <h3>Returns</h3>
878
- <div class="subelement response">
879
- <code>array</code>Updated list of available list table views</div>
880
- </div></div>
881
- </div>
882
- <a name="mla_wpml_media_view_upload_count_filter" id="mla_wpml_media_view_upload_count_filter"></a><div class="element clickable method public mla_wpml_media_view_upload_count_filter" data-toggle="collapse" data-target=".mla_wpml_media_view_upload_count_filter .collapse">
883
- <h2>Handler for filter "wpml-media_view-upload-count" in /plugins/wpml-media/inc/wpml-media.class.php</h2>
884
- <pre>mla_wpml_media_view_upload_count_filter(NULL $count, string $key, string $view, string $lang) : mixed</pre>
885
- <div class="labels"></div>
886
- <div class="row collapse"><div class="detail-description">
887
- <p class="long_description"><p>Computes the number of attachments that satisfy a meta_query specification.
888
- The count is automatically made language-specific by WPML filters.</p></p>
889
- <table class="table table-bordered"><tr>
890
- <th>since</th>
891
- <td>1.90</td>
892
- </tr></table>
893
- <h3>Parameters</h3>
894
- <div class="subelement argument">
895
- <h4>$count</h4>
896
- <code>NULL</code><p>default return value if not replacing count</p></div>
897
- <div class="subelement argument">
898
- <h4>$key</h4>
899
- <code>string</code><p>key/slug value for the selected view</p>
900
- </div>
901
- <div class="subelement argument">
902
- <h4>$view</h4>
903
- <code>string</code><p>HTML <a></a> tag for the link to the selected view</p>
904
- </div>
905
- <div class="subelement argument">
906
- <h4>$lang</h4>
907
- <code>string</code><p>language code, e.g., 'en', 'es'</p>
908
- </div>
909
- <h3>Returns</h3>
910
- <div class="subelement response">
911
- <code>mixed</code>NULL to allow SQL query or replacement count value</div>
912
- </div></div>
913
- </div>
914
- <a name="mla_wpml_media_view_upload_page_count_filter" id="mla_wpml_media_view_upload_page_count_filter"></a><div class="element clickable method public mla_wpml_media_view_upload_page_count_filter" data-toggle="collapse" data-target=".mla_wpml_media_view_upload_page_count_filter .collapse">
915
- <h2>Handler for filter "wpml-media_view-upload-page-count" in /plugins/wpml-media/inc/wpml-media.class.php</h2>
916
- <pre>mla_wpml_media_view_upload_page_count_filter(NULL $count, string $lang) : mixed</pre>
917
- <div class="labels"></div>
918
- <div class="row collapse"><div class="detail-description">
919
- <p class="long_description"><p>Computes the number of language-specific attachments that satisfy a meta_query specification.
920
- The count is made language-specific by WPML filters when the current_language is set.</p></p>
921
- <table class="table table-bordered"><tr>
922
- <th>since</th>
923
- <td>1.90</td>
924
- </tr></table>
925
- <h3>Parameters</h3>
926
- <div class="subelement argument">
927
- <h4>$count</h4>
928
- <code>NULL</code><p>default return value if not replacing count</p></div>
929
- <div class="subelement argument">
930
- <h4>$lang</h4>
931
- <code>string</code><p>language code, e.g., 'en', 'es'</p>
932
- </div>
933
- <h3>Returns</h3>
934
- <div class="subelement response">
935
- <code>mixed</code>NULL to allow SQL query or replacement count value</div>
936
- </div></div>
937
- </div>
938
  <a name="pagination" id="pagination"></a><div class="element clickable method public pagination" data-toggle="collapse" data-target=".pagination .collapse">
939
  <h2>Display the pagination, adding view, search and filter arguments</h2>
940
  <pre>pagination(string $which) : void</pre>
@@ -1178,6 +1126,18 @@ MLA_List_Table::mla_admin_init_action.</p></p>
1178
  </tr></table>
1179
  </div></div>
1180
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
1181
  <a name="%24rollover_id" id="$rollover_id"> </a><div class="element clickable property protected $rollover_id" data-toggle="collapse" data-target=".$rollover_id .collapse">
1182
  <h2>Records assignment of row-level actions to a table row</h2>
1183
  <pre>$rollover_id : int</pre>
@@ -1190,6 +1150,42 @@ MLA_List_Table::mla_admin_init_action.</p></p>
1190
  </tr></table>
1191
  </div></div>
1192
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1193
  </div>
1194
  </div>
1195
  </div>
@@ -1197,7 +1193,7 @@ MLA_List_Table::mla_admin_init_action.</p></p>
1197
  <div class="row"><footer class="span12">
1198
  Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
1199
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
1200
- generated on 2015-04-19T11:52:22-07:00.<br></footer></div>
1201
  </div>
1202
  </body>
1203
  </html>
98
  <li class="method public "><a href="#mla_admin_init_action" title="mla_admin_init_action :: Adds support for taxonomy and custom field columns"><span class="description">Adds support for taxonomy and custom field columns</span><pre>mla_admin_init_action()</pre></a></li>
99
  <li class="method public "><a href="#mla_get_sortable_columns" title="mla_get_sortable_columns :: Return the names and display values of the sortable columns"><span class="description">Return the names and display values of the sortable columns</span><pre>mla_get_sortable_columns()</pre></a></li>
100
  <li class="method public "><a href="#mla_get_taxonomy_filter_dropdown" title="mla_get_taxonomy_filter_dropdown :: Get dropdown box of terms to filter by, if available"><span class="description">Get dropdown box of terms to filter by, if available</span><pre>mla_get_taxonomy_filter_dropdown()</pre></a></li>
101
+ <li class="method public "><a href="#mla_get_view" title="mla_get_view :: Wrapper for _get_view; returns HTML markup for one view that can be used with this table"><span class="description">Wrapper for _get_view; returns HTML markup for one view that can be used with this table</span><pre>mla_get_view()</pre></a></li>
102
  <li class="method public "><a href="#mla_localize_default_columns_array" title="mla_localize_default_columns_array :: Builds the $default_columns array with translated source texts."><span class="description">Builds the $default_columns array with translated source texts.</span><pre>mla_localize_default_columns_array()</pre></a></li>
103
  <li class="method public "><a href="#mla_manage_columns_filter" title="mla_manage_columns_filter :: Handler for filter 'manage_media_page_mla-menu_columns'"><span class="description">Handler for filter 'manage_media_page_mla-menu_columns'</span><pre>mla_manage_columns_filter()</pre></a></li>
104
  <li class="method public "><a href="#mla_manage_hidden_columns_filter" title="mla_manage_hidden_columns_filter :: Handler for filter 'get_user_option_managemedia_page_mla-menucolumnshidden'"><span class="description">Handler for filter 'get_user_option_managemedia_page_mla-menucolumnshidden'</span><pre>mla_manage_hidden_columns_filter()</pre></a></li>
105
  <li class="method public "><a href="#mla_submenu_arguments" title="mla_submenu_arguments :: Process $_REQUEST, building $submenu_arguments"><span class="description">Process $_REQUEST, building $submenu_arguments</span><pre>mla_submenu_arguments()</pre></a></li>
 
 
 
106
  <li class="method public "><a href="#pagination" title="pagination :: Display the pagination, adding view, search and filter arguments"><span class="description">Display the pagination, adding view, search and filter arguments</span><pre>pagination()</pre></a></li>
107
  <li class="method public "><a href="#prepare_items" title="prepare_items :: Prepares the list of items for displaying"><span class="description">Prepares the list of items for displaying</span><pre>prepare_items()</pre></a></li>
108
  <li class="method public "><a href="#print_column_headers" title="print_column_headers :: Print column headers, adding view, search and filter arguments"><span class="description">Print column headers, adding view, search and filter arguments</span><pre>print_column_headers()</pre></a></li>
123
  <li class="property protected "><a href="#%24default_columns" title="$default_columns :: Table column definitions"><span class="description">Table column definitions</span><pre>$default_columns</pre></a></li>
124
  <li class="property protected "><a href="#%24default_hidden_columns" title="$default_hidden_columns :: Default values for hidden columns"><span class="description">Default values for hidden columns</span><pre>$default_hidden_columns</pre></a></li>
125
  <li class="property protected "><a href="#%24default_sortable_columns" title="$default_sortable_columns :: Sortable column definitions"><span class="description">Sortable column definitions</span><pre>$default_sortable_columns</pre></a></li>
126
+ <li class="property protected "><a href="#%24mla_wpml_table" title="$mla_wpml_table :: The WPML_List_table support object, if required"><span class="description">The WPML_List_table support object, if required</span><pre>$mla_wpml_table</pre></a></li>
127
  <li class="property protected "><a href="#%24rollover_id" title="$rollover_id :: Records assignment of row-level actions to a table row"><span class="description">Records assignment of row-level actions to a table row</span><pre>$rollover_id</pre></a></li>
128
+ <li class="nav-header private">» Private</li>
129
+ <li class="property private "><a href="#%24attached" title='$attached :: True if the current view is "Attached"'><span class="description">True if the current view is "Attached"</span><pre>$attached</pre></a></li>
130
+ <li class="property private "><a href="#%24detached" title='$detached :: True if the current view is "Unattached"'><span class="description">True if the current view is "Unattached"</span><pre>$detached</pre></a></li>
131
+ <li class="property private "><a href="#%24is_trash" title='$is_trash :: True if the current view is "Trash"'><span class="description">True if the current view is "Trash"</span><pre>$is_trash</pre></a></li>
132
  </ul>
133
  </div>
134
  <div class="span8">
783
  <code>string</code>HTML markup for dropdown box</div>
784
  </div></div>
785
  </div>
786
+ <a name="mla_get_view" id="mla_get_view"></a><div class="element clickable method public mla_get_view" data-toggle="collapse" data-target=".mla_get_view .collapse">
787
+ <h2>Wrapper for _get_view; returns HTML markup for one view that can be used with this table</h2>
788
+ <pre>mla_get_view(string $view_slug, string $current_view) : string</pre>
789
+ <div class="labels"></div>
790
+ <div class="row collapse"><div class="detail-description">
791
+ <p class="long_description"></p>
792
+ <table class="table table-bordered"><tr>
793
+ <th>since</th>
794
+ <td>2.11</td>
795
+ </tr></table>
796
+ <h3>Parameters</h3>
797
+ <div class="subelement argument">
798
+ <h4>$view_slug</h4>
799
+ <code>string</code><p>View slug, key to MLA_POST_MIME_TYPES array</p></div>
800
+ <div class="subelement argument">
801
+ <h4>$current_view</h4>
802
+ <code>string</code><p>Slug for current view</p></div>
803
+ <h3>Returns</h3>
804
+ <div class="subelement response">
805
+ <code>string</code>| false HTML for link to display the view, false if count = zero</div>
806
+ </div></div>
807
+ </div>
808
  <a name="mla_localize_default_columns_array" id="mla_localize_default_columns_array"></a><div class="element clickable method public mla_localize_default_columns_array" data-toggle="collapse" data-target=".mla_localize_default_columns_array .collapse">
809
  <h2>Builds the $default_columns array with translated source texts.</h2>
810
  <pre>mla_localize_default_columns_array() : void</pre>
883
  <code>array</code>non-empty view, search, filter and sort arguments</div>
884
  </div></div>
885
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
886
  <a name="pagination" id="pagination"></a><div class="element clickable method public pagination" data-toggle="collapse" data-target=".pagination .collapse">
887
  <h2>Display the pagination, adding view, search and filter arguments</h2>
888
  <pre>pagination(string $which) : void</pre>
1126
  </tr></table>
1127
  </div></div>
1128
  </div>
1129
+ <a name="%24mla_wpml_table" id="$mla_wpml_table"> </a><div class="element clickable property protected $mla_wpml_table" data-toggle="collapse" data-target=".$mla_wpml_table .collapse">
1130
+ <h2>The WPML_List_table support object, if required</h2>
1131
+ <pre>$mla_wpml_table : object</pre>
1132
+ <div class="labels"></div>
1133
+ <div class="row collapse"><div class="detail-description">
1134
+ <p class="long_description"></p>
1135
+ <table class="table table-bordered"><tr>
1136
+ <th>since</th>
1137
+ <td>2.11</td>
1138
+ </tr></table>
1139
+ </div></div>
1140
+ </div>
1141
  <a name="%24rollover_id" id="$rollover_id"> </a><div class="element clickable property protected $rollover_id" data-toggle="collapse" data-target=".$rollover_id .collapse">
1142
  <h2>Records assignment of row-level actions to a table row</h2>
1143
  <pre>$rollover_id : int</pre>
1150
  </tr></table>
1151
  </div></div>
1152
  </div>
1153
+ <a name="%24attached" id="$attached"> </a><div class="element clickable property private $attached" data-toggle="collapse" data-target=".$attached .collapse">
1154
+ <h2>True if the current view is "Attached"</h2>
1155
+ <pre>$attached : int</pre>
1156
+ <div class="labels"></div>
1157
+ <div class="row collapse"><div class="detail-description">
1158
+ <p class="long_description"></p>
1159
+ <table class="table table-bordered"><tr>
1160
+ <th>since</th>
1161
+ <td>2.11</td>
1162
+ </tr></table>
1163
+ </div></div>
1164
+ </div>
1165
+ <a name="%24detached" id="$detached"> </a><div class="element clickable property private $detached" data-toggle="collapse" data-target=".$detached .collapse">
1166
+ <h2>True if the current view is "Unattached"</h2>
1167
+ <pre>$detached : int</pre>
1168
+ <div class="labels"></div>
1169
+ <div class="row collapse"><div class="detail-description">
1170
+ <p class="long_description"><p>Declaration added in MLA v2.11 for WP 4.2 compatibility.</p></p>
1171
+ <table class="table table-bordered"><tr>
1172
+ <th>since</th>
1173
+ <td>0.1</td>
1174
+ </tr></table>
1175
+ </div></div>
1176
+ </div>
1177
+ <a name="%24is_trash" id="$is_trash"> </a><div class="element clickable property private $is_trash" data-toggle="collapse" data-target=".$is_trash .collapse">
1178
+ <h2>True if the current view is "Trash"</h2>
1179
+ <pre>$is_trash : int</pre>
1180
+ <div class="labels"></div>
1181
+ <div class="row collapse"><div class="detail-description">
1182
+ <p class="long_description"><p>Declaration added in MLA v2.11 for WP 4.2 compatibility.</p></p>
1183
+ <table class="table table-bordered"><tr>
1184
+ <th>since</th>
1185
+ <td>0.1</td>
1186
+ </tr></table>
1187
+ </div></div>
1188
+ </div>
1189
  </div>
1190
  </div>
1191
  </div>
1193
  <div class="row"><footer class="span12">
1194
  Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
1195
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
1196
+ generated on 2015-06-06T19:41:35-07:00.<br></footer></div>
1197
  </div>
1198
  </body>
1199
  </html>
phpDocs/classes/MLA_Polylang.html ADDED
@@ -0,0 +1,1302 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html><html xmlns:date="http://exslt.org/dates-and-times" lang="en">
2
+ <head>
3
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4
+ <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
5
+ <meta charset="utf-8">
6
+ <title>Media Library Assistant » \MLA_Polylang</title>
7
+ <meta name="author" content="Mike van Riel">
8
+ <meta name="description" content="">
9
+ <link href="../css/template.css" rel="stylesheet" media="all">
10
+ <script src="../js/jquery-1.7.1.min.js" type="text/javascript"></script><script src="../js/jquery-ui-1.8.2.custom.min.js" type="text/javascript"></script><script src="../js/jquery.mousewheel.min.js" type="text/javascript"></script><script src="../js/bootstrap.js" type="text/javascript"></script><script src="../js/template.js" type="text/javascript"></script><script src="../js/prettify/prettify.min.js" type="text/javascript"></script><link rel="shortcut icon" href="../img/favicon.ico">
11
+ <link rel="apple-touch-icon" href="../img/apple-touch-icon.png">
12
+ <link rel="apple-touch-icon" sizes="72x72" href="../img/apple-touch-icon-72x72.png">
13
+ <link rel="apple-touch-icon" sizes="114x114" href="../img/apple-touch-icon-114x114.png">
14
+ </head>
15
+ <body>
16
+ <div class="navbar navbar-fixed-top">
17
+ <div class="navbar-inner"><div class="container">
18
+ <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></a><a class="brand" href="../index.html">Media Library Assistant</a><div class="nav-collapse"><ul class="nav">
19
+ <li class="dropdown">
20
+ <a href="#api" class="dropdown-toggle" data-toggle="dropdown">
21
+ API Documentation <b class="caret"></b></a><ul class="dropdown-menu">
22
+ <li><a>Packages</a></li>
23
+ <li><a href="../packages/Media%20Library%20Assistant.html"><i class="icon-folder-open"></i> Media Library Assistant</a></li>
24
+ </ul>
25
+ </li>
26
+ <li class="dropdown" id="charts-menu">
27
+ <a href="#charts" class="dropdown-toggle" data-toggle="dropdown">
28
+ Charts <b class="caret"></b></a><ul class="dropdown-menu"><li><a href="../graph_class.html"><i class="icon-list-alt"></i> Class hierarchy diagram</a></li></ul>
29
+ </li>
30
+ <li class="dropdown" id="reports-menu">
31
+ <a href="#reports" class="dropdown-toggle" data-toggle="dropdown">
32
+ Reports <b class="caret"></b></a><ul class="dropdown-menu">
33
+ <li><a href="../errors.html"><i class="icon-remove-sign"></i> Errors 
34
+ <span class="label label-info">0</span></a></li>
35
+ <li><a href="../markers.html"><i class="icon-map-marker"></i> Markers 
36
+ <ul><li>todo 
37
+ <span class="label label-info">1</span>
38
+ </li></ul></a></li>
39
+ <li><a href="../deprecated.html"><i class="icon-stop"></i> Deprecated elements 
40
+ <span class="label label-info">0</span></a></li>
41
+ </ul>
42
+ </li>
43
+ </ul></div>
44
+ </div></div>
45
+ <div class="go_to_top"><a href="#___" style="color: inherit">Back to top  <i class="icon-upload icon-white"></i></a></div>
46
+ </div>
47
+ <div id="___" class="container">
48
+ <noscript><div class="alert alert-warning">
49
+ Javascript is disabled; several features are only available
50
+ if Javascript is enabled.
51
+ </div></noscript>
52
+ <div class="row">
53
+ <div class="span4">
54
+ <span class="btn-group visibility" data-toggle="buttons-checkbox"><button class="btn public active" title="Show public elements">Public</button><button class="btn protected" title="Show protected elements">Protected</button><button class="btn private" title="Show private elements">Private</button><button class="btn inherited active" title="Show inherited elements">Inherited</button></span><div class="btn-group view pull-right" data-toggle="buttons-radio">
55
+ <button class="btn details" title="Show descriptions and method names"><i class="icon-list"></i></button><button class="btn simple" title="Show only method names"><i class="icon-align-justify"></i></button>
56
+ </div>
57
+ <ul class="side-nav nav nav-list">
58
+ <li class="nav-header">
59
+ <i class="icon-custom icon-method"></i> Methods</li>
60
+ <li class="method public "><a href="#admin_enqueue_scripts" title="admin_enqueue_scripts :: Load the plugin's Style Sheet and Javascript files"><span class="description">Load the plugin's Style Sheet and Javascript files</span><pre>admin_enqueue_scripts()</pre></a></li>
61
+ <li class="method public "><a href="#admin_init" title="admin_init :: Load the plugin's Ajax handler(s)"><span class="description">Load the plugin's Ajax handler(s)</span><pre>admin_init()</pre></a></li>
62
+ <li class="method public "><a href="#edit_attachment" title="edit_attachment :: Filters taxonomy updates by language."><span class="description">Filters taxonomy updates by language.</span><pre>edit_attachment()</pre></a></li>
63
+ <li class="method public "><a href="#initialize" title="initialize :: Initialization function, similar to __construct()"><span class="description">Initialization function, similar to __construct()</span><pre>initialize()</pre></a></li>
64
+ <li class="method public "><a href="#mla_get_options_tablist" title='mla_get_options_tablist :: Adds the "Language" tab to the Settings/Media Library Assistant list'><span class="description">Adds the "Language" tab to the Settings/Media Library Assistant list</span><pre>mla_get_options_tablist()</pre></a></li>
65
+ <li class="method public "><a href="#mla_get_terms_clauses" title="mla_get_terms_clauses :: MLA Tag Cloud Query Clauses"><span class="description">MLA Tag Cloud Query Clauses</span><pre>mla_get_terms_clauses()</pre></a></li>
66
+ <li class="method public "><a href="#mla_get_terms_query_arguments" title="mla_get_terms_query_arguments :: MLA Tag Cloud Query Arguments"><span class="description">MLA Tag Cloud Query Arguments</span><pre>mla_get_terms_query_arguments()</pre></a></li>
67
+ <li class="method public "><a href="#mla_list_table_add_pll_styles" title="mla_list_table_add_pll_styles :: Add styles for the pll_translations table column"><span class="description">Add styles for the pll_translations table column</span><pre>mla_list_table_add_pll_styles()</pre></a></li>
68
+ <li class="method public "><a href="#mla_list_table_build_inline_data" title="mla_list_table_build_inline_data :: Filter the data for inline (Quick and Bulk) editing"><span class="description">Filter the data for inline (Quick and Bulk) editing</span><pre>mla_list_table_build_inline_data()</pre></a></li>
69
+ <li class="method public "><a href="#mla_list_table_build_rollover_actions" title='mla_list_table_build_rollover_actions :: Filter the list of item "Rollover" actions'><span class="description">Filter the list of item "Rollover" actions</span><pre>mla_list_table_build_rollover_actions()</pre></a></li>
70
+ <li class="method public "><a href="#mla_list_table_bulk_action" title="mla_list_table_bulk_action :: Process an MLA_List_Table bulk action"><span class="description">Process an MLA_List_Table bulk action</span><pre>mla_list_table_bulk_action()</pre></a></li>
71
+ <li class="method public "><a href="#mla_list_table_bulk_action_initial_request" title='mla_list_table_bulk_action_initial_request :: Captures the Bulk Edit parameters during "Upload New Media"'><span class="description">Captures the Bulk Edit parameters during "Upload New Media"</span><pre>mla_list_table_bulk_action_initial_request()</pre></a></li>
72
+ <li class="method public "><a href="#mla_list_table_bulk_action_item_request" title="mla_list_table_bulk_action_item_request :: Converts Bulk Edit taxonomy inputs to language-specific values"><span class="description">Converts Bulk Edit taxonomy inputs to language-specific values</span><pre>mla_list_table_bulk_action_item_request()</pre></a></li>
73
+ <li class="method public "><a href="#mla_list_table_column_default" title="mla_list_table_column_default :: Supply a column value if no column-specific function has been defined"><span class="description">Supply a column value if no column-specific function has been defined</span><pre>mla_list_table_column_default()</pre></a></li>
74
+ <li class="method public "><a href="#mla_list_table_custom_bulk_action" title="mla_list_table_custom_bulk_action :: Process an MLA_List_Table custom bulk action"><span class="description">Process an MLA_List_Table custom bulk action</span><pre>mla_list_table_custom_bulk_action()</pre></a></li>
75
+ <li class="method public "><a href="#mla_list_table_get_bulk_actions" title="mla_list_table_get_bulk_actions :: Filter the MLA_List_Table bulk actions"><span class="description">Filter the MLA_List_Table bulk actions</span><pre>mla_list_table_get_bulk_actions()</pre></a></li>
76
+ <li class="method public "><a href="#mla_list_table_get_columns" title="mla_list_table_get_columns :: Filter the MLA_List_Table columns"><span class="description">Filter the MLA_List_Table columns</span><pre>mla_list_table_get_columns()</pre></a></li>
77
+ <li class="method public "><a href="#mla_list_table_inline_action" title='mla_list_table_inline_action :: Captures the Quick Edit "before update" term assignments and
78
+ process the Language dropdown selection, if changed'><span class="description">Captures the Quick Edit "before update" term assignments and
79
+ process the Language dropdown selection, if changed</span><pre>mla_list_table_inline_action()</pre></a></li>
80
+ <li class="method public "><a href="#mla_list_table_inline_fields" title="mla_list_table_inline_fields :: Define the fields for inline (Quick) editing"><span class="description">Define the fields for inline (Quick) editing</span><pre>mla_list_table_inline_fields()</pre></a></li>
81
+ <li class="method public "><a href="#mla_list_table_inline_parse" title="mla_list_table_inline_parse :: MLA_List_Table inline edit parse"><span class="description">MLA_List_Table inline edit parse</span><pre>mla_list_table_inline_parse()</pre></a></li>
82
+ <li class="method public "><a href="#mla_list_table_inline_values" title="mla_list_table_inline_values :: MLA_List_Table inline edit item values"><span class="description">MLA_List_Table inline edit item values</span><pre>mla_list_table_inline_values()</pre></a></li>
83
+ <li class="method public "><a href="#mla_list_table_prepare_items_pagination" title="mla_list_table_prepare_items_pagination :: Filter the pagination parameters for prepare_items()"><span class="description">Filter the pagination parameters for prepare_items()</span><pre>mla_list_table_prepare_items_pagination()</pre></a></li>
84
+ <li class="method public "><a href="#mla_list_table_prepare_items_total_items" title="mla_list_table_prepare_items_total_items :: Filter the total items count for prepare_items()"><span class="description">Filter the total items count for prepare_items()</span><pre>mla_list_table_prepare_items_total_items()</pre></a></li>
85
+ <li class="method public "><a href="#mla_list_table_submenu_arguments" title='mla_list_table_submenu_arguments :: Filter the "sticky" submenu URL parameters'><span class="description">Filter the "sticky" submenu URL parameters</span><pre>mla_list_table_submenu_arguments()</pre></a></li>
86
+ <li class="method public "><a href="#mla_localize_language_option_definitions" title="mla_localize_language_option_definitions :: Localize $mla_language_option_definitions array"><span class="description">Localize $mla_language_option_definitions array</span><pre>mla_localize_language_option_definitions()</pre></a></li>
87
+ <li class="method public "><a href="#mla_media_modal_begin_update_compat_fields" title="mla_media_modal_begin_update_compat_fields :: Captures the existing term assignments before the
88
+ Media Manager Modal Window ATTACHMENT DETAILS taxonomy meta boxes updates"><span class="description">Captures the existing term assignments before the
89
+ Media Manager Modal Window ATTACHMENT DETAILS taxonomy meta boxes updates</span><pre>mla_media_modal_begin_update_compat_fields()</pre></a></li>
90
+ <li class="method public "><a href="#mla_media_modal_end_update_compat_fields" title="mla_media_modal_end_update_compat_fields :: Applies Term Synchronization after the
91
+ Media Manager Modal Window taxonomy updates"><span class="description">Applies Term Synchronization after the
92
+ Media Manager Modal Window taxonomy updates</span><pre>mla_media_modal_end_update_compat_fields()</pre></a></li>
93
+ <li class="method public "><a href="#mla_media_modal_update_compat_fields_terms" title="mla_media_modal_update_compat_fields_terms :: Applies Term Assignment to the terms assigned to one
94
+ Media Manager Modal Window ATTACHMENT DETAILS taxonomy"><span class="description">Applies Term Assignment to the terms assigned to one
95
+ Media Manager Modal Window ATTACHMENT DETAILS taxonomy</span><pre>mla_media_modal_update_compat_fields_terms()</pre></a></li>
96
+ <li class="method public "><a href="#mla_render_language_tab" title='mla_render_language_tab :: Renders the Settings/Media Library Assistant "Language" tab'><span class="description">Renders the Settings/Media Library Assistant "Language" tab</span><pre>mla_render_language_tab()</pre></a></li>
97
+ <li class="method public "><a href="#pll_translate_media" title="pll_translate_media :: Copies taxonomy terms from the source item to the new translated item"><span class="description">Copies taxonomy terms from the source item to the new translated item</span><pre>pll_translate_media()</pre></a></li>
98
+ <li class="method public "><a href="#quick_translate" title="quick_translate :: Ajax handler to Quick Translate a single attachment"><span class="description">Ajax handler to Quick Translate a single attachment</span><pre>quick_translate()</pre></a></li>
99
+ <li class="method public "><a href="#views_media_page_mla_menu" title="views_media_page_mla_menu :: Views for media page MLA Menu"><span class="description">Views for media page MLA Menu</span><pre>views_media_page_mla_menu()</pre></a></li>
100
+ <li class="method public "><a href="#wp_insert_post_empty_content" title='wp_insert_post_empty_content :: Captures "before update" term assignments from the Media/Edit Media screen'><span class="description">Captures "before update" term assignments from the Media/Edit Media screen</span><pre>wp_insert_post_empty_content()</pre></a></li>
101
+ <li class="nav-header private">» Private</li>
102
+ <li class="method private "><a href="#_add_relevant_term" title="_add_relevant_term :: Adds a term and its translations to $relevant_terms"><span class="description">Adds a term and its translations to $relevant_terms</span><pre>_add_relevant_term()</pre></a></li>
103
+ <li class="method private "><a href="#_apply_synch_input" title="_apply_synch_input :: Compute Term Synchronization replacement $tax_inputs"><span class="description">Compute Term Synchronization replacement $tax_inputs</span><pre>_apply_synch_input()</pre></a></li>
104
+ <li class="method private "><a href="#_apply_tax_input" title="_apply_tax_input :: Filter the $tax_input array to a specific language"><span class="description">Filter the $tax_input array to a specific language</span><pre>_apply_tax_input()</pre></a></li>
105
+ <li class="method private "><a href="#_build_existing_terms" title="_build_existing_terms :: Build the $existing_terms array"><span class="description">Build the $existing_terms array</span><pre>_build_existing_terms()</pre></a></li>
106
+ <li class="method private "><a href="#_build_tax_input" title="_build_tax_input :: Build the $tax_input array"><span class="description">Build the $tax_input array</span><pre>_build_tax_input()</pre></a></li>
107
+ <li class="method private "><a href="#_get_relevant_term" title="_get_relevant_term :: Finds a $relevant_term (if defined) given a key and (optional) a language"><span class="description">Finds a $relevant_term (if defined) given a key and (optional) a language</span><pre>_get_relevant_term()</pre></a></li>
108
+ <li class="method private "><a href="#_get_translation" title="_get_translation :: Find or create an item translation"><span class="description">Find or create an item translation</span><pre>_get_translation()</pre></a></li>
109
+ <li class="method private "><a href="#_get_view" title="_get_view :: PolyMLA custom views for the Media/Assistant submenu"><span class="description">PolyMLA custom views for the Media/Assistant submenu</span><pre>_get_view()</pre></a></li>
110
+ <li class="method private "><a href="#_reset_language_settings" title="_reset_language_settings :: Delete saved settings, restoring default values"><span class="description">Delete saved settings, restoring default values</span><pre>_reset_language_settings()</pre></a></li>
111
+ <li class="method private "><a href="#_save_language_settings" title="_save_language_settings :: Save Language settings to the options table"><span class="description">Save Language settings to the options table</span><pre>_save_language_settings()</pre></a></li>
112
+ <li class="method private "><a href="#_update_existing_terms" title="_update_existing_terms :: Update the $existing_terms array"><span class="description">Update the $existing_terms array</span><pre>_update_existing_terms()</pre></a></li>
113
+ <li class="nav-header">
114
+ <i class="icon-custom icon-property"></i> Properties</li>
115
+ <li class="property public "><a href="#%24mla_language_option_definitions" title="$mla_language_option_definitions :: $mla_language_option_definitions defines the language-specific database options and
116
+ admin page areas for setting/updating them"><span class="description">$mla_language_option_definitions defines the language-specific database options and
117
+ admin page areas for setting/updating them</span><pre>$mla_language_option_definitions</pre></a></li>
118
+ <li class="nav-header protected">» Protected</li>
119
+ <li class="property protected "><a href="#%24language_columns" title="$language_columns :: Table language column definitions"><span class="description">Table language column definitions</span><pre>$language_columns</pre></a></li>
120
+ <li class="nav-header private">» Private</li>
121
+ <li class="property private "><a href="#%24all_query_parameters" title="$all_query_parameters :: Save the query arguments"><span class="description">Save the query arguments</span><pre>$all_query_parameters</pre></a></li>
122
+ <li class="property private "><a href="#%24bulk_action_includes" title="$bulk_action_includes :: Items returned by custom bulk action(s)"><span class="description">Items returned by custom bulk action(s)</span><pre>$bulk_action_includes</pre></a></li>
123
+ <li class="property private "><a href="#%24duplicate_attachments" title="$duplicate_attachments :: Duplicates created during media upload"><span class="description">Duplicates created during media upload</span><pre>$duplicate_attachments</pre></a></li>
124
+ <li class="property private "><a href="#%24existing_terms" title="$existing_terms :: Taxonomy terms for the current item translation in the database"><span class="description">Taxonomy terms for the current item translation in the database</span><pre>$existing_terms</pre></a></li>
125
+ <li class="property private "><a href="#%24list_table_parameters" title="$list_table_parameters :: Data selection parameters for custom views"><span class="description">Data selection parameters for custom views</span><pre>$list_table_parameters</pre></a></li>
126
+ <li class="property private "><a href="#%24relevant_terms" title="$relevant_terms :: Taxonomy terms and translations"><span class="description">Taxonomy terms and translations</span><pre>$relevant_terms</pre></a></li>
127
+ <li class="property private "><a href="#%24tax_input" title="$tax_input :: Replacement tax_input values in all languages"><span class="description">Replacement tax_input values in all languages</span><pre>$tax_input</pre></a></li>
128
+ <li class="property private "><a href="#%24upload_bulk_edit_args" title='$upload_bulk_edit_args :: Bulk Edit parameters during "Upload New Media"'><span class="description">Bulk Edit parameters during "Upload New Media"</span><pre>$upload_bulk_edit_args</pre></a></li>
129
+ <li class="property private "><a href="#%24upload_bulk_edit_map" title='$upload_bulk_edit_map :: Custom Field Map during "Upload New Media"'><span class="description">Custom Field Map during "Upload New Media"</span><pre>$upload_bulk_edit_map</pre></a></li>
130
+ <li class="nav-header">
131
+ <i class="icon-custom icon-constant"></i> Constants</li>
132
+ <li class="constant "><a href="#MLA_PLL_QUICK_TRANSLATE" title="MLA_PLL_QUICK_TRANSLATE :: Uniquely identifies the Quick Translate action"><span class="description">Uniquely identifies the Quick Translate action</span><pre>MLA_PLL_QUICK_TRANSLATE</pre></a></li>
133
+ </ul>
134
+ </div>
135
+ <div class="span8">
136
+ <a name="%5CMLA_Polylang" id="\MLA_Polylang"></a><ul class="breadcrumb">
137
+ <li>
138
+ <a href="../index.html"><i class="icon-custom icon-class"></i></a><span class="divider">\</span>
139
+ </li>
140
+ <li><a href="../namespaces/global.html">global</a></li>
141
+ <li class="active">
142
+ <span class="divider">\</span><a href="../classes/MLA_Polylang.html">MLA_Polylang</a>
143
+ </li>
144
+ </ul>
145
+ <div href="../classes/MLA_Polylang.html" class="element class">
146
+ <p class="short_description">Class MLA (Media Library Assistant) Polylang provides support for the
147
+ Polylang Multilingual plugin</p>
148
+ <div class="details">
149
+ <p class="long_description"></p>
150
+ <table class="table table-bordered">
151
+ <tr>
152
+ <th>package</th>
153
+ <td><a href="../packages/Media%20Library%20Assistant.html">Media Library Assistant</a></td>
154
+ </tr>
155
+ <tr>
156
+ <th>since</th>
157
+ <td>2.11</td>
158
+ </tr>
159
+ </table>
160
+ <h3>
161
+ <i class="icon-custom icon-method"></i> Methods</h3>
162
+ <a name="admin_enqueue_scripts" id="admin_enqueue_scripts"></a><div class="element clickable method public admin_enqueue_scripts" data-toggle="collapse" data-target=".admin_enqueue_scripts .collapse">
163
+ <h2>Load the plugin's Style Sheet and Javascript files</h2>
164
+ <pre>admin_enqueue_scripts(string $page_hook) : void</pre>
165
+ <div class="labels"></div>
166
+ <div class="row collapse"><div class="detail-description">
167
+ <p class="long_description"></p>
168
+ <table class="table table-bordered"><tr>
169
+ <th>since</th>
170
+ <td>2.11</td>
171
+ </tr></table>
172
+ <h3>Parameters</h3>
173
+ <div class="subelement argument">
174
+ <h4>$page_hook</h4>
175
+ <code>string</code><p>Name of the page being loaded</p></div>
176
+ </div></div>
177
+ </div>
178
+ <a name="admin_init" id="admin_init"></a><div class="element clickable method public admin_init" data-toggle="collapse" data-target=".admin_init .collapse">
179
+ <h2>Load the plugin's Ajax handler(s)</h2>
180
+ <pre>admin_init() : void</pre>
181
+ <div class="labels"></div>
182
+ <div class="row collapse"><div class="detail-description">
183
+ <p class="long_description"></p>
184
+ <table class="table table-bordered"><tr>
185
+ <th>since</th>
186
+ <td>2.11</td>
187
+ </tr></table>
188
+ </div></div>
189
+ </div>
190
+ <a name="edit_attachment" id="edit_attachment"></a><div class="element clickable method public edit_attachment" data-toggle="collapse" data-target=".edit_attachment .collapse">
191
+ <h2>Filters taxonomy updates by language.</h2>
192
+ <pre>edit_attachment(integer $post_id) </pre>
193
+ <div class="labels"></div>
194
+ <div class="row collapse"><div class="detail-description">
195
+ <p class="long_description"></p>
196
+ <table class="table table-bordered"><tr>
197
+ <th>since</th>
198
+ <td>2.11</td>
199
+ </tr></table>
200
+ <h3>Parameters</h3>
201
+ <div class="subelement argument">
202
+ <h4>$post_id</h4>
203
+ <code>integer</code><p>ID of the current post</p></div>
204
+ </div></div>
205
+ </div>
206
+ <a name="initialize" id="initialize"></a><div class="element clickable method public initialize" data-toggle="collapse" data-target=".initialize .collapse">
207
+ <h2>Initialization function, similar to __construct()</h2>
208
+ <pre>initialize() : void</pre>
209
+ <div class="labels"></div>
210
+ <div class="row collapse"><div class="detail-description">
211
+ <p class="long_description"></p>
212
+ <table class="table table-bordered"><tr>
213
+ <th>since</th>
214
+ <td>2.11</td>
215
+ </tr></table>
216
+ </div></div>
217
+ </div>
218
+ <a name="mla_get_options_tablist" id="mla_get_options_tablist"></a><div class="element clickable method public mla_get_options_tablist" data-toggle="collapse" data-target=".mla_get_options_tablist .collapse">
219
+ <h2>Adds the "Language" tab to the Settings/Media Library Assistant list</h2>
220
+ <pre>mla_get_options_tablist(array | false $results, array $mla_tablist, string | NULL $tab) : array</pre>
221
+ <div class="labels"></div>
222
+ <div class="row collapse"><div class="detail-description">
223
+ <p class="long_description"></p>
224
+ <table class="table table-bordered"><tr>
225
+ <th>since</th>
226
+ <td>2.11</td>
227
+ </tr></table>
228
+ <h3>Parameters</h3>
229
+ <div class="subelement argument">
230
+ <h4>$results</h4>
231
+ <code>arrayfalse</code><p>The entire tablist ( $tab = NULL ), a single tab entry or false if not found/not allowed.</p>
232
+ </div>
233
+ <div class="subelement argument">
234
+ <h4>$mla_tablist</h4>
235
+ <code>array</code><p>The entire default tablist</p></div>
236
+ <div class="subelement argument">
237
+ <h4>$tab</h4>
238
+ <code>stringNULL</code><p>tab slug for single-element return or NULL to return entire tablist</p>
239
+ </div>
240
+ <h3>Returns</h3>
241
+ <div class="subelement response">
242
+ <code>array</code>updated tablist or single tab element</div>
243
+ </div></div>
244
+ </div>
245
+ <a name="mla_get_terms_clauses" id="mla_get_terms_clauses"></a><div class="element clickable method public mla_get_terms_clauses" data-toggle="collapse" data-target=".mla_get_terms_clauses .collapse">
246
+ <h2>MLA Tag Cloud Query Clauses</h2>
247
+ <pre>mla_get_terms_clauses(array $clauses) : array</pre>
248
+ <div class="labels"></div>
249
+ <div class="row collapse"><div class="detail-description">
250
+ <p class="long_description"><p>Adds language-specific clauses to filter the cloud terms.</p></p>
251
+ <table class="table table-bordered"><tr>
252
+ <th>since</th>
253
+ <td>2.11</td>
254
+ </tr></table>
255
+ <h3>Parameters</h3>
256
+ <div class="subelement argument">
257
+ <h4>$clauses</h4>
258
+ <code>array</code><p>SQL clauses ( 'fields', 'join', 'where', 'order', 'orderby', 'limits' )</p>
259
+ </div>
260
+ <h3>Returns</h3>
261
+ <div class="subelement response">
262
+ <code>array</code>updated SQL clauses</div>
263
+ </div></div>
264
+ </div>
265
+ <a name="mla_get_terms_query_arguments" id="mla_get_terms_query_arguments"></a><div class="element clickable method public mla_get_terms_query_arguments" data-toggle="collapse" data-target=".mla_get_terms_query_arguments .collapse">
266
+ <h2>MLA Tag Cloud Query Arguments</h2>
267
+ <pre>mla_get_terms_query_arguments(array $all_query_parameters) : array</pre>
268
+ <div class="labels"></div>
269
+ <div class="row collapse"><div class="detail-description">
270
+ <p class="long_description"><p>Saves [mla_tag_cloud] query parameters for use in MLA_Polylang::mla_get_terms_clauses.</p></p>
271
+ <table class="table table-bordered">
272
+ <tr>
273
+ <th>since</th>
274
+ <td>2.11</td>
275
+ </tr>
276
+ <tr>
277
+ <th>uses</th>
278
+ <td>\global\MLA_Polylang::$all_query_parameters</td>
279
+ </tr>
280
+ </table>
281
+ <h3>Parameters</h3>
282
+ <div class="subelement argument">
283
+ <h4>$all_query_parameters</h4>
284
+ <code>array</code><p>shortcode arguments merged with attachment selection defaults, so every possible parameter is present</p></div>
285
+ <h3>Returns</h3>
286
+ <div class="subelement response">
287
+ <code>array</code>updated attachment query arguments</div>
288
+ </div></div>
289
+ </div>
290
+ <a name="mla_list_table_add_pll_styles" id="mla_list_table_add_pll_styles"></a><div class="element clickable method public mla_list_table_add_pll_styles" data-toggle="collapse" data-target=".mla_list_table_add_pll_styles .collapse">
291
+ <h2>Add styles for the pll_translations table column</h2>
292
+ <pre>mla_list_table_add_pll_styles() : void</pre>
293
+ <div class="labels"></div>
294
+ <div class="row collapse"><div class="detail-description">
295
+ <p class="long_description"></p>
296
+ <table class="table table-bordered"><tr>
297
+ <th>since</th>
298
+ <td>2.11</td>
299
+ </tr></table>
300
+ </div></div>
301
+ </div>
302
+ <a name="mla_list_table_build_inline_data" id="mla_list_table_build_inline_data"></a><div class="element clickable method public mla_list_table_build_inline_data" data-toggle="collapse" data-target=".mla_list_table_build_inline_data .collapse">
303
+ <h2>Filter the data for inline (Quick and Bulk) editing</h2>
304
+ <pre>mla_list_table_build_inline_data(string $inline_data, object $item) : string</pre>
305
+ <div class="labels"></div>
306
+ <div class="row collapse"><div class="detail-description">
307
+ <p class="long_description"><p>Adds item-specific translations data for the JS quick and bulk edit functions.</p></p>
308
+ <table class="table table-bordered"><tr>
309
+ <th>since</th>
310
+ <td>2.11</td>
311
+ </tr></table>
312
+ <h3>Parameters</h3>
313
+ <div class="subelement argument">
314
+ <h4>$inline_data</h4>
315
+ <code>string</code><p>The HTML markup for inline data.</p></div>
316
+ <div class="subelement argument">
317
+ <h4>$item</h4>
318
+ <code>object</code><p>The current Media Library item.</p></div>
319
+ <h3>Returns</h3>
320
+ <div class="subelement response">
321
+ <code>string</code>updated HTML markup for inline data.</div>
322
+ </div></div>
323
+ </div>
324
+ <a name="mla_list_table_build_rollover_actions" id="mla_list_table_build_rollover_actions"></a><div class="element clickable method public mla_list_table_build_rollover_actions" data-toggle="collapse" data-target=".mla_list_table_build_rollover_actions .collapse">
325
+ <h2>Filter the list of item "Rollover" actions</h2>
326
+ <pre>mla_list_table_build_rollover_actions(array $actions, object $item, string $column) : array</pre>
327
+ <div class="labels"></div>
328
+ <div class="row collapse"><div class="detail-description">
329
+ <p class="long_description"><p>Adds "Quick Translate" to the list of item-level "Rollover" actions.</p></p>
330
+ <table class="table table-bordered"><tr>
331
+ <th>since</th>
332
+ <td>2.11</td>
333
+ </tr></table>
334
+ <h3>Parameters</h3>
335
+ <div class="subelement argument">
336
+ <h4>$actions</h4>
337
+ <code>array</code><p>The list of item "Rollover" actions.</p>
338
+ </div>
339
+ <div class="subelement argument">
340
+ <h4>$item</h4>
341
+ <code>object</code><p>The current Media Library item.</p></div>
342
+ <div class="subelement argument">
343
+ <h4>$column</h4>
344
+ <code>string</code><p>The List Table column slug.</p></div>
345
+ <h3>Returns</h3>
346
+ <div class="subelement response">
347
+ <code>array</code>updated "Rollover" actions.</div>
348
+ </div></div>
349
+ </div>
350
+ <a name="mla_list_table_bulk_action" id="mla_list_table_bulk_action"></a><div class="element clickable method public mla_list_table_bulk_action" data-toggle="collapse" data-target=".mla_list_table_bulk_action .collapse">
351
+ <h2>Process an MLA_List_Table bulk action</h2>
352
+ <pre>mla_list_table_bulk_action(array $item_content, string $bulk_action, integer $post_id) : object</pre>
353
+ <div class="labels"></div>
354
+ <div class="row collapse"><div class="detail-description">
355
+ <p class="long_description"><p>Sets the new item language from the Language dropdown selection.</p></p>
356
+ <table class="table table-bordered"><tr>
357
+ <th>since</th>
358
+ <td>2.11</td>
359
+ </tr></table>
360
+ <h3>Parameters</h3>
361
+ <div class="subelement argument">
362
+ <h4>$item_content</h4>
363
+ <code>array</code><p>NULL, to indicate no handler.</p></div>
364
+ <div class="subelement argument">
365
+ <h4>$bulk_action</h4>
366
+ <code>string</code><p>the requested action.</p></div>
367
+ <div class="subelement argument">
368
+ <h4>$post_id</h4>
369
+ <code>integer</code><p>the affected attachment.</p></div>
370
+ <h3>Returns</h3>
371
+ <div class="subelement response">
372
+ <code>object</code>updated $item_content. NULL if no handler, otherwise ( 'message' => error or status message(s), 'body' => '', 'prevent_default' => true to bypass the MLA handler )</div>
373
+ </div></div>
374
+ </div>
375
+ <a name="mla_list_table_bulk_action_initial_request" id="mla_list_table_bulk_action_initial_request"></a><div class="element clickable method public mla_list_table_bulk_action_initial_request" data-toggle="collapse" data-target=".mla_list_table_bulk_action_initial_request .collapse">
376
+ <h2>Captures the Bulk Edit parameters during "Upload New Media"</h2>
377
+ <pre>mla_list_table_bulk_action_initial_request(array $request, string $bulk_action, array $custom_field_map) : array</pre>
378
+ <div class="labels"></div>
379
+ <div class="row collapse"><div class="detail-description">
380
+ <p class="long_description"></p>
381
+ <table class="table table-bordered"><tr>
382
+ <th>since</th>
383
+ <td>2.11</td>
384
+ </tr></table>
385
+ <h3>Parameters</h3>
386
+ <div class="subelement argument">
387
+ <h4>$request</h4>
388
+ <code>array</code><p>bulk action request parameters, including ['mla_bulk_action_do_cleanup'].</p>
389
+ </div>
390
+ <div class="subelement argument">
391
+ <h4>$bulk_action</h4>
392
+ <code>string</code><p>the requested action.</p></div>
393
+ <div class="subelement argument">
394
+ <h4>$custom_field_map</h4>
395
+ <code>array</code><p>[ slug => field_name ]</p>
396
+ </div>
397
+ <h3>Returns</h3>
398
+ <div class="subelement response">
399
+ <code>array</code>updated bulk action request parameters</div>
400
+ </div></div>
401
+ </div>
402
+ <a name="mla_list_table_bulk_action_item_request" id="mla_list_table_bulk_action_item_request"></a><div class="element clickable method public mla_list_table_bulk_action_item_request" data-toggle="collapse" data-target=".mla_list_table_bulk_action_item_request .collapse">
403
+ <h2>Converts Bulk Edit taxonomy inputs to language-specific values</h2>
404
+ <pre>mla_list_table_bulk_action_item_request(array $request, string $bulk_action, integer $post_id, array $custom_field_map) : array</pre>
405
+ <div class="labels"></div>
406
+ <div class="row collapse"><div class="detail-description">
407
+ <p class="long_description"></p>
408
+ <table class="table table-bordered"><tr>
409
+ <th>since</th>
410
+ <td>2.11</td>
411
+ </tr></table>
412
+ <h3>Parameters</h3>
413
+ <div class="subelement argument">
414
+ <h4>$request</h4>
415
+ <code>array</code><p>bulk action request parameters, including ['mla_bulk_action_do_cleanup'].</p>
416
+ </div>
417
+ <div class="subelement argument">
418
+ <h4>$bulk_action</h4>
419
+ <code>string</code><p>the requested action.</p></div>
420
+ <div class="subelement argument">
421
+ <h4>$post_id</h4>
422
+ <code>integer</code><p>the affected attachment.</p></div>
423
+ <div class="subelement argument">
424
+ <h4>$custom_field_map</h4>
425
+ <code>array</code><p>[ slug => field_name ]</p>
426
+ </div>
427
+ <h3>Returns</h3>
428
+ <div class="subelement response">
429
+ <code>array</code>updated bulk action request parameters</div>
430
+ </div></div>
431
+ </div>
432
+ <a name="mla_list_table_column_default" id="mla_list_table_column_default"></a><div class="element clickable method public mla_list_table_column_default" data-toggle="collapse" data-target=".mla_list_table_column_default .collapse">
433
+ <h2>Supply a column value if no column-specific function has been defined</h2>
434
+ <pre>mla_list_table_column_default(string $content, array $item, array $column_name) : string</pre>
435
+ <div class="labels"></div>
436
+ <div class="row collapse"><div class="detail-description">
437
+ <p class="long_description"><p>Fills in the Language columns with the item's translation status values.</p></p>
438
+ <table class="table table-bordered"><tr>
439
+ <th>since</th>
440
+ <td>2.11</td>
441
+ </tr></table>
442
+ <h3>Parameters</h3>
443
+ <div class="subelement argument">
444
+ <h4>$content</h4>
445
+ <code>string</code><p>NULL, indicating no default content</p></div>
446
+ <div class="subelement argument">
447
+ <h4>$item</h4>
448
+ <code>array</code><p>A singular item (one full row's worth of data)</p>
449
+ </div>
450
+ <div class="subelement argument">
451
+ <h4>$column_name</h4>
452
+ <code>array</code><p>The name/slug of the column to be processed</p>
453
+ </div>
454
+ <h3>Returns</h3>
455
+ <div class="subelement response">
456
+ <code>string</code>Text or HTML to be placed inside the column</div>
457
+ </div></div>
458
+ </div>
459
+ <a name="mla_list_table_custom_bulk_action" id="mla_list_table_custom_bulk_action"></a><div class="element clickable method public mla_list_table_custom_bulk_action" data-toggle="collapse" data-target=".mla_list_table_custom_bulk_action .collapse">
460
+ <h2>Process an MLA_List_Table custom bulk action</h2>
461
+ <pre>mla_list_table_custom_bulk_action(array $item_content, string $bulk_action, integer $post_id) : object</pre>
462
+ <div class="labels"></div>
463
+ <div class="row collapse"><div class="detail-description">
464
+ <p class="long_description"><p>Creates new items from the "Bulk Translate" list.</p></p>
465
+ <table class="table table-bordered"><tr>
466
+ <th>since</th>
467
+ <td>2.11</td>
468
+ </tr></table>
469
+ <h3>Parameters</h3>
470
+ <div class="subelement argument">
471
+ <h4>$item_content</h4>
472
+ <code>array</code><p>NULL, to indicate no handler.</p></div>
473
+ <div class="subelement argument">
474
+ <h4>$bulk_action</h4>
475
+ <code>string</code><p>the requested action.</p></div>
476
+ <div class="subelement argument">
477
+ <h4>$post_id</h4>
478
+ <code>integer</code><p>the affected attachment.</p></div>
479
+ <h3>Returns</h3>
480
+ <div class="subelement response">
481
+ <code>object</code>updated $item_content. NULL if no handler, otherwise ( 'message' => error or status message(s), 'body' => '' )</div>
482
+ </div></div>
483
+ </div>
484
+ <a name="mla_list_table_get_bulk_actions" id="mla_list_table_get_bulk_actions"></a><div class="element clickable method public mla_list_table_get_bulk_actions" data-toggle="collapse" data-target=".mla_list_table_get_bulk_actions .collapse">
485
+ <h2>Filter the MLA_List_Table bulk actions</h2>
486
+ <pre>mla_list_table_get_bulk_actions(array $actions) : array</pre>
487
+ <div class="labels"></div>
488
+ <div class="row collapse"><div class="detail-description">
489
+ <p class="long_description"><p>Adds the "Translate" action to the Bulk Actions list.</p></p>
490
+ <table class="table table-bordered"><tr>
491
+ <th>since</th>
492
+ <td>2.11</td>
493
+ </tr></table>
494
+ <h3>Parameters</h3>
495
+ <div class="subelement argument">
496
+ <h4>$actions</h4>
497
+ <code>array</code><p>An array of bulk actions. Format: 'slug' => 'Label'</p>
498
+ </div>
499
+ <h3>Returns</h3>
500
+ <div class="subelement response">
501
+ <code>array</code>updated array of actions.</div>
502
+ </div></div>
503
+ </div>
504
+ <a name="mla_list_table_get_columns" id="mla_list_table_get_columns"></a><div class="element clickable method public mla_list_table_get_columns" data-toggle="collapse" data-target=".mla_list_table_get_columns .collapse">
505
+ <h2>Filter the MLA_List_Table columns</h2>
506
+ <pre>mla_list_table_get_columns(array $columns) : array</pre>
507
+ <div class="labels"></div>
508
+ <div class="row collapse"><div class="detail-description">
509
+ <p class="long_description"><p>Inserts the language columns just after the item thumbnail column</p></p>
510
+ <table class="table table-bordered"><tr>
511
+ <th>since</th>
512
+ <td>2.11</td>
513
+ </tr></table>
514
+ <h3>Parameters</h3>
515
+ <div class="subelement argument">
516
+ <h4>$columns</h4>
517
+ <code>array</code><p>An array of columns. format: column_slug => Column Label</p>
518
+ </div>
519
+ <h3>Returns</h3>
520
+ <div class="subelement response">
521
+ <code>array</code>updated array of columns.</div>
522
+ </div></div>
523
+ </div>
524
+ <a name="mla_list_table_inline_action" id="mla_list_table_inline_action"></a><div class="element clickable method public mla_list_table_inline_action" data-toggle="collapse" data-target=".mla_list_table_inline_action .collapse">
525
+ <h2>Captures the Quick Edit "before update" term assignments and
526
+ process the Language dropdown selection, if changed</h2>
527
+ <pre>mla_list_table_inline_action(array $item_content, integer $post_id) : object</pre>
528
+ <div class="labels"></div>
529
+ <div class="row collapse"><div class="detail-description">
530
+ <p class="long_description"></p>
531
+ <table class="table table-bordered"><tr>
532
+ <th>since</th>
533
+ <td>2.11</td>
534
+ </tr></table>
535
+ <h3>Parameters</h3>
536
+ <div class="subelement argument">
537
+ <h4>$item_content</h4>
538
+ <code>array</code><p>NULL, to indicate no handler.</p></div>
539
+ <div class="subelement argument">
540
+ <h4>$post_id</h4>
541
+ <code>integer</code><p>the affected attachment.</p></div>
542
+ <h3>Returns</h3>
543
+ <div class="subelement response">
544
+ <code>object</code>updated $item_content. NULL if no handler, otherwise ( 'message' => error or status message(s), 'body' => '', 'prevent_default' => true to bypass the MLA handler )</div>
545
+ </div></div>
546
+ </div>
547
+ <a name="mla_list_table_inline_fields" id="mla_list_table_inline_fields"></a><div class="element clickable method public mla_list_table_inline_fields" data-toggle="collapse" data-target=".mla_list_table_inline_fields .collapse">
548
+ <h2>Define the fields for inline (Quick) editing</h2>
549
+ <pre>mla_list_table_inline_fields(array $fields) : string</pre>
550
+ <div class="labels"></div>
551
+ <div class="row collapse"><div class="detail-description">
552
+ <p class="long_description"><p>Adds Language dropdown and Quick Translate links.</p></p>
553
+ <table class="table table-bordered"><tr>
554
+ <th>since</th>
555
+ <td>2.11</td>
556
+ </tr></table>
557
+ <h3>Parameters</h3>
558
+ <div class="subelement argument">
559
+ <h4>$fields</h4>
560
+ <code>array</code><p>The field names for inline data.</p></div>
561
+ <h3>Returns</h3>
562
+ <div class="subelement response">
563
+ <code>string</code>updated fields for inline data.</div>
564
+ </div></div>
565
+ </div>
566
+ <a name="mla_list_table_inline_parse" id="mla_list_table_inline_parse"></a><div class="element clickable method public mla_list_table_inline_parse" data-toggle="collapse" data-target=".mla_list_table_inline_parse .collapse">
567
+ <h2>MLA_List_Table inline edit parse</h2>
568
+ <pre>mla_list_table_inline_parse(string $html_markup, string $item_template, array $item_values) : array</pre>
569
+ <div class="labels"></div>
570
+ <div class="row collapse"><div class="detail-description">
571
+ <p class="long_description"></p>
572
+ <table class="table table-bordered"><tr>
573
+ <th>since</th>
574
+ <td>2.11
575
+ Adds Bulk Translate form and the Language dropdown
576
+ markup used for the Quick and Bulk Edit forms.</td>
577
+ </tr></table>
578
+ <h3>Parameters</h3>
579
+ <div class="subelement argument">
580
+ <h4>$html_markup</h4>
581
+ <code>string</code><p>HTML markup returned by the template parser</p></div>
582
+ <div class="subelement argument">
583
+ <h4>$item_template</h4>
584
+ <code>string</code><p>template used to generate the HTML markup</p></div>
585
+ <div class="subelement argument">
586
+ <h4>$item_values</h4>
587
+ <code>array</code><p>parameter_name => parameter_value pairs</p>
588
+ </div>
589
+ <h3>Returns</h3>
590
+ <div class="subelement response">
591
+ <code>array</code>updated HTML markup for the Quick and Bulk Edit forms</div>
592
+ </div></div>
593
+ </div>
594
+ <a name="mla_list_table_inline_values" id="mla_list_table_inline_values"></a><div class="element clickable method public mla_list_table_inline_values" data-toggle="collapse" data-target=".mla_list_table_inline_values .collapse">
595
+ <h2>MLA_List_Table inline edit item values</h2>
596
+ <pre>mla_list_table_inline_values(array $item_values) : array</pre>
597
+ <div class="labels"></div>
598
+ <div class="row collapse"><div class="detail-description">
599
+ <p class="long_description"><p>Builds the Language dropdown and edit ttranslation links
600
+ for the Quick and Bulk Edit forms.</p></p>
601
+ <table class="table table-bordered"><tr>
602
+ <th>since</th>
603
+ <td>2.11</td>
604
+ </tr></table>
605
+ <h3>Parameters</h3>
606
+ <div class="subelement argument">
607
+ <h4>$item_values</h4>
608
+ <code>array</code><p>parameter_name => parameter_value pairs</p>
609
+ </div>
610
+ <h3>Returns</h3>
611
+ <div class="subelement response">
612
+ <code>array</code>updated substitution parameter name => value pairs</div>
613
+ </div></div>
614
+ </div>
615
+ <a name="mla_list_table_prepare_items_pagination" id="mla_list_table_prepare_items_pagination"></a><div class="element clickable method public mla_list_table_prepare_items_pagination" data-toggle="collapse" data-target=".mla_list_table_prepare_items_pagination .collapse">
616
+ <h2>Filter the pagination parameters for prepare_items()</h2>
617
+ <pre>mla_list_table_prepare_items_pagination(array $pagination, object $mla_list_table) : array</pre>
618
+ <div class="labels"></div>
619
+ <div class="row collapse"><div class="detail-description">
620
+ <p class="long_description"><p>Records the pagination parameters for use with custom table views, e.g., "attached".</p></p>
621
+ <table class="table table-bordered"><tr>
622
+ <th>since</th>
623
+ <td>2.11</td>
624
+ </tr></table>
625
+ <h3>Parameters</h3>
626
+ <div class="subelement argument">
627
+ <h4>$pagination</h4>
628
+ <code>array</code><p>Contains 'per_page', 'current_page'.</p>
629
+ </div>
630
+ <div class="subelement argument">
631
+ <h4>$mla_list_table</h4>
632
+ <code>object</code><p>The MLA_List_Table object, passed by reference.</p></div>
633
+ <h3>Returns</h3>
634
+ <div class="subelement response">
635
+ <code>array</code>updated pagination array.</div>
636
+ </div></div>
637
+ </div>
638
+ <a name="mla_list_table_prepare_items_total_items" id="mla_list_table_prepare_items_total_items"></a><div class="element clickable method public mla_list_table_prepare_items_total_items" data-toggle="collapse" data-target=".mla_list_table_prepare_items_total_items .collapse">
639
+ <h2>Filter the total items count for prepare_items()</h2>
640
+ <pre>mla_list_table_prepare_items_total_items(integer $total_items, object $mla_list_table) : integer</pre>
641
+ <div class="labels"></div>
642
+ <div class="row collapse"><div class="detail-description">
643
+ <p class="long_description"><p>A convenient place to add the query argument required for the "attached" custom view.</p></p>
644
+ <table class="table table-bordered"><tr>
645
+ <th>since</th>
646
+ <td>2.11</td>
647
+ </tr></table>
648
+ <h3>Parameters</h3>
649
+ <div class="subelement argument">
650
+ <h4>$total_items</h4>
651
+ <code>integer</code><p>NULL, indicating no substitution.</p></div>
652
+ <div class="subelement argument">
653
+ <h4>$mla_list_table</h4>
654
+ <code>object</code><p>The MLA_List_Table object, passed by reference.</p></div>
655
+ <h3>Returns</h3>
656
+ <div class="subelement response">
657
+ <code>integer</code>updated total_items.</div>
658
+ </div></div>
659
+ </div>
660
+ <a name="mla_list_table_submenu_arguments" id="mla_list_table_submenu_arguments"></a><div class="element clickable method public mla_list_table_submenu_arguments" data-toggle="collapse" data-target=".mla_list_table_submenu_arguments .collapse">
661
+ <h2>Filter the "sticky" submenu URL parameters</h2>
662
+ <pre>mla_list_table_submenu_arguments(array $submenu_arguments, object $include_filters) : array</pre>
663
+ <div class="labels"></div>
664
+ <div class="row collapse"><div class="detail-description">
665
+ <p class="long_description"><p>Maintains the pll_view and list of Bulk Translate items in the URLs for paging through the results.</p></p>
666
+ <table class="table table-bordered"><tr>
667
+ <th>since</th>
668
+ <td>2.11</td>
669
+ </tr></table>
670
+ <h3>Parameters</h3>
671
+ <div class="subelement argument">
672
+ <h4>$submenu_arguments</h4>
673
+ <code>array</code><p>Current view, pagination and sort parameters.</p></div>
674
+ <div class="subelement argument">
675
+ <h4>$include_filters</h4>
676
+ <code>object</code><p>True to include "filter-by" parameters, e.g., year/month dropdown.</p>
677
+ </div>
678
+ <h3>Returns</h3>
679
+ <div class="subelement response">
680
+ <code>array</code>updated submenu_arguments.</div>
681
+ </div></div>
682
+ </div>
683
+ <a name="mla_localize_language_option_definitions" id="mla_localize_language_option_definitions"></a><div class="element clickable method public mla_localize_language_option_definitions" data-toggle="collapse" data-target=".mla_localize_language_option_definitions .collapse">
684
+ <h2>Localize $mla_language_option_definitions array</h2>
685
+ <pre>mla_localize_language_option_definitions() : void</pre>
686
+ <div class="labels"></div>
687
+ <div class="row collapse"><div class="detail-description">
688
+ <p class="long_description"><p>Localization must be done at runtime, and these calls cannot be placed
689
+ in the "public static" array definition itself.</p></p>
690
+ <table class="table table-bordered"><tr>
691
+ <th>since</th>
692
+ <td>2.11</td>
693
+ </tr></table>
694
+ </div></div>
695
+ </div>
696
+ <a name="mla_media_modal_begin_update_compat_fields" id="mla_media_modal_begin_update_compat_fields"></a><div class="element clickable method public mla_media_modal_begin_update_compat_fields" data-toggle="collapse" data-target=".mla_media_modal_begin_update_compat_fields .collapse">
697
+ <h2>Captures the existing term assignments before the
698
+ Media Manager Modal Window ATTACHMENT DETAILS taxonomy meta boxes updates</h2>
699
+ <pre>mla_media_modal_begin_update_compat_fields(object $post) </pre>
700
+ <div class="labels"></div>
701
+ <div class="row collapse"><div class="detail-description">
702
+ <p class="long_description"></p>
703
+ <table class="table table-bordered"><tr>
704
+ <th>since</th>
705
+ <td>2.11</td>
706
+ </tr></table>
707
+ <h3>Parameters</h3>
708
+ <div class="subelement argument">
709
+ <h4>$post</h4>
710
+ <code>object</code><p>the current post</p></div>
711
+ </div></div>
712
+ </div>
713
+ <a name="mla_media_modal_end_update_compat_fields" id="mla_media_modal_end_update_compat_fields"></a><div class="element clickable method public mla_media_modal_end_update_compat_fields" data-toggle="collapse" data-target=".mla_media_modal_end_update_compat_fields .collapse">
714
+ <h2>Applies Term Synchronization after the
715
+ Media Manager Modal Window taxonomy updates</h2>
716
+ <pre>mla_media_modal_end_update_compat_fields(string $results, array $taxonomies, object $post) </pre>
717
+ <div class="labels"></div>
718
+ <div class="row collapse"><div class="detail-description">
719
+ <p class="long_description"></p>
720
+ <table class="table table-bordered"><tr>
721
+ <th>since</th>
722
+ <td>2.11</td>
723
+ </tr></table>
724
+ <h3>Parameters</h3>
725
+ <div class="subelement argument">
726
+ <h4>$results</h4>
727
+ <code>string</code><p>HTML markup for the taxonomy meta box elements</p></div>
728
+ <div class="subelement argument">
729
+ <h4>$taxonomies</h4>
730
+ <code>array</code><p>supported taxonomy objects</p></div>
731
+ <div class="subelement argument">
732
+ <h4>$post</h4>
733
+ <code>object</code><p>current post object</p></div>
734
+ </div></div>
735
+ </div>
736
+ <a name="mla_media_modal_update_compat_fields_terms" id="mla_media_modal_update_compat_fields_terms"></a><div class="element clickable method public mla_media_modal_update_compat_fields_terms" data-toggle="collapse" data-target=".mla_media_modal_update_compat_fields_terms .collapse">
737
+ <h2>Applies Term Assignment to the terms assigned to one
738
+ Media Manager Modal Window ATTACHMENT DETAILS taxonomy</h2>
739
+ <pre>mla_media_modal_update_compat_fields_terms(array $terms, string $key, object $value, integer $post_id) </pre>
740
+ <div class="labels"></div>
741
+ <div class="row collapse"><div class="detail-description">
742
+ <p class="long_description"></p>
743
+ <table class="table table-bordered"><tr>
744
+ <th>since</th>
745
+ <td>2.11</td>
746
+ </tr></table>
747
+ <h3>Parameters</h3>
748
+ <div class="subelement argument">
749
+ <h4>$terms</h4>
750
+ <code>array</code><p>assigned term id/name values</p>
751
+ </div>
752
+ <div class="subelement argument">
753
+ <h4>$key</h4>
754
+ <code>string</code><p>taxonomy slug</p></div>
755
+ <div class="subelement argument">
756
+ <h4>$value</h4>
757
+ <code>object</code><p>taxonomy object</p></div>
758
+ <div class="subelement argument">
759
+ <h4>$post_id</h4>
760
+ <code>integer</code><p>current post ID</p></div>
761
+ </div></div>
762
+ </div>
763
+ <a name="mla_render_language_tab" id="mla_render_language_tab"></a><div class="element clickable method public mla_render_language_tab" data-toggle="collapse" data-target=".mla_render_language_tab .collapse">
764
+ <h2>Renders the Settings/Media Library Assistant "Language" tab</h2>
765
+ <pre>mla_render_language_tab() : array</pre>
766
+ <div class="labels"></div>
767
+ <div class="row collapse"><div class="detail-description">
768
+ <p class="long_description"></p>
769
+ <table class="table table-bordered"><tr>
770
+ <th>since</th>
771
+ <td>2.11</td>
772
+ </tr></table>
773
+ <h3>Returns</h3>
774
+ <div class="subelement response">
775
+ <code>array</code>( 'message' => '', 'body' => '' )</div>
776
+ </div></div>
777
+ </div>
778
+ <a name="pll_translate_media" id="pll_translate_media"></a><div class="element clickable method public pll_translate_media" data-toggle="collapse" data-target=".pll_translate_media .collapse">
779
+ <h2>Copies taxonomy terms from the source item to the new translated item</h2>
780
+ <pre>pll_translate_media(integer $duplicated_attachment_id, object $duplicated_attachment_object, array $translations) </pre>
781
+ <div class="labels"></div>
782
+ <div class="row collapse"><div class="detail-description">
783
+ <p class="long_description"></p>
784
+ <table class="table table-bordered"><tr>
785
+ <th>since</th>
786
+ <td>2.11</td>
787
+ </tr></table>
788
+ <h3>Parameters</h3>
789
+ <div class="subelement argument">
790
+ <h4>$duplicated_attachment_id</h4>
791
+ <code>integer</code><p>ID of the new item</p></div>
792
+ <div class="subelement argument">
793
+ <h4>$duplicated_attachment_object</h4>
794
+ <code>object</code><p>post object of the new item</p></div>
795
+ <div class="subelement argument">
796
+ <h4>$translations</h4>
797
+ <code>array</code><p>an associative array of translations with language code as key and translation id as value</p></div>
798
+ </div></div>
799
+ </div>
800
+ <a name="quick_translate" id="quick_translate"></a><div class="element clickable method public quick_translate" data-toggle="collapse" data-target=".quick_translate .collapse">
801
+ <h2>Ajax handler to Quick Translate a single attachment</h2>
802
+ <pre>quick_translate() : void</pre>
803
+ <div class="labels"></div>
804
+ <div class="row collapse"><div class="detail-description">
805
+ <p class="long_description"></p>
806
+ <table class="table table-bordered"><tr>
807
+ <th>since</th>
808
+ <td>2.11</td>
809
+ </tr></table>
810
+ </div></div>
811
+ </div>
812
+ <a name="views_media_page_mla_menu" id="views_media_page_mla_menu"></a><div class="element clickable method public views_media_page_mla_menu" data-toggle="collapse" data-target=".views_media_page_mla_menu .collapse">
813
+ <h2>Views for media page MLA Menu</h2>
814
+ <pre>views_media_page_mla_menu(array $views) : array</pre>
815
+ <div class="labels"></div>
816
+ <div class="row collapse"><div class="detail-description">
817
+ <p class="long_description"><p>This filter gives you an opportunity to filter the list of available list table views.</p></p>
818
+ <table class="table table-bordered"><tr>
819
+ <th>since</th>
820
+ <td>2.11</td>
821
+ </tr></table>
822
+ <h3>Parameters</h3>
823
+ <div class="subelement argument">
824
+ <h4>$views</h4>
825
+ <code>array</code><p>An array of available list table views. format: view_slug => link to the view, with count</p>
826
+ </div>
827
+ <h3>Returns</h3>
828
+ <div class="subelement response">
829
+ <code>array</code>updated list table views.</div>
830
+ </div></div>
831
+ </div>
832
+ <a name="wp_insert_post_empty_content" id="wp_insert_post_empty_content"></a><div class="element clickable method public wp_insert_post_empty_content" data-toggle="collapse" data-target=".wp_insert_post_empty_content .collapse">
833
+ <h2>Captures "before update" term assignments from the Media/Edit Media screen</h2>
834
+ <pre>wp_insert_post_empty_content(bool $maybe_empty, array $postarr) </pre>
835
+ <div class="labels"></div>
836
+ <div class="row collapse"><div class="detail-description">
837
+ <p class="long_description"></p>
838
+ <table class="table table-bordered"><tr>
839
+ <th>since</th>
840
+ <td>2.11</td>
841
+ </tr></table>
842
+ <h3>Parameters</h3>
843
+ <div class="subelement argument">
844
+ <h4>$maybe_empty</h4>
845
+ <code>bool</code><p>Whether the post should be considered "empty".</p>
846
+ </div>
847
+ <div class="subelement argument">
848
+ <h4>$postarr</h4>
849
+ <code>array</code><p>Array of post data.</p></div>
850
+ </div></div>
851
+ </div>
852
+ <a name="_add_relevant_term" id="_add_relevant_term"></a><div class="element clickable method private _add_relevant_term" data-toggle="collapse" data-target="._add_relevant_term .collapse">
853
+ <h2>Adds a term and its translations to $relevant_terms</h2>
854
+ <pre>_add_relevant_term(object $term, object $translations) </pre>
855
+ <div class="labels"></div>
856
+ <div class="row collapse"><div class="detail-description">
857
+ <p class="long_description"></p>
858
+ <table class="table table-bordered">
859
+ <tr>
860
+ <th>since</th>
861
+ <td>2.11</td>
862
+ </tr>
863
+ <tr>
864
+ <th>uses</th>
865
+ <td>\global\MLA_Polylang::$relevant_terms</td>
866
+ </tr>
867
+ </table>
868
+ <h3>Parameters</h3>
869
+ <div class="subelement argument">
870
+ <h4>$term</h4>
871
+ <code>object</code><p>WordPress term object</p></div>
872
+ <div class="subelement argument">
873
+ <h4>$translations</h4>
874
+ <code>object</code><p>Polylang translations object; optional</p></div>
875
+ </div></div>
876
+ </div>
877
+ <a name="_apply_synch_input" id="_apply_synch_input"></a><div class="element clickable method private _apply_synch_input" data-toggle="collapse" data-target="._apply_synch_input .collapse">
878
+ <h2>Compute Term Synchronization replacement $tax_inputs</h2>
879
+ <pre>_apply_synch_input(string $language, array $terms_before) : array</pre>
880
+ <div class="labels"></div>
881
+ <div class="row collapse"><div class="detail-description">
882
+ <p class="long_description"><p>Assumes the "current post" in $existing_terms is the source
883
+ and $existing_terms contains the target translation</p></p>
884
+ <table class="table table-bordered">
885
+ <tr>
886
+ <th>since</th>
887
+ <td>2.11</td>
888
+ </tr>
889
+ <tr>
890
+ <th>uses</th>
891
+ <td>\global\MLA_Polylang::$existing_terms</td>
892
+ </tr>
893
+ </table>
894
+ <h3>Parameters</h3>
895
+ <div class="subelement argument">
896
+ <h4>$language</h4>
897
+ <code>string</code><p>the target translation code</p></div>
898
+ <div class="subelement argument">
899
+ <h4>$terms_before</h4>
900
+ <code>array</code><p>source terms before updates/Term Assignment</p>
901
+ </div>
902
+ <h3>Returns</h3>
903
+ <div class="subelement response">
904
+ <code>array</code>$tax_inputs for Term Synchronization</div>
905
+ </div></div>
906
+ </div>
907
+ <a name="_apply_tax_input" id="_apply_tax_input"></a><div class="element clickable method private _apply_tax_input" data-toggle="collapse" data-target="._apply_tax_input .collapse">
908
+ <h2>Filter the $tax_input array to a specific language</h2>
909
+ <pre>_apply_tax_input(integer $post_id, string $post_language) : array</pre>
910
+ <div class="labels"></div>
911
+ <div class="row collapse"><div class="detail-description">
912
+ <p class="long_description"></p>
913
+ <table class="table table-bordered">
914
+ <tr>
915
+ <th>since</th>
916
+ <td>2.11</td>
917
+ </tr>
918
+ <tr>
919
+ <th>uses</th>
920
+ <td>\global\MLA_Polylang::$tax_input</td>
921
+ </tr>
922
+ <tr>
923
+ <th>uses</th>
924
+ <td>\global\MLA_Polylang::$existing_terms</td>
925
+ </tr>
926
+ </table>
927
+ <h3>Parameters</h3>
928
+ <div class="subelement argument">
929
+ <h4>$post_id</h4>
930
+ <code>integer</code><p>ID of the post to be updated</p></div>
931
+ <div class="subelement argument">
932
+ <h4>$post_language</h4>
933
+ <code>string</code><p>explicit language_code; optional</p></div>
934
+ <h3>Returns</h3>
935
+ <div class="subelement response">
936
+ <code>array</code>language-specific $tax_inputs</div>
937
+ </div></div>
938
+ </div>
939
+ <a name="_build_existing_terms" id="_build_existing_terms"></a><div class="element clickable method private _build_existing_terms" data-toggle="collapse" data-target="._build_existing_terms .collapse">
940
+ <h2>Build the $existing_terms array</h2>
941
+ <pre>_build_existing_terms(integer $post_id) </pre>
942
+ <div class="labels"></div>
943
+ <div class="row collapse"><div class="detail-description">
944
+ <p class="long_description"><p>Takes each translatable taxonomy and builds an array of
945
+ language-specific term_id to term_id/term_name mappings
946
+ for terms already assigned to the item translation.</p></p>
947
+ <table class="table table-bordered">
948
+ <tr>
949
+ <th>since</th>
950
+ <td>2.11</td>
951
+ </tr>
952
+ <tr>
953
+ <th>uses</th>
954
+ <td>\global\MLA_Polylang::$existing_terms</td>
955
+ </tr>
956
+ <tr>
957
+ <th>uses</th>
958
+ <td>\global\MLA_Polylang::$relevant_terms</td>
959
+ </tr>
960
+ </table>
961
+ <h3>Parameters</h3>
962
+ <div class="subelement argument">
963
+ <h4>$post_id</h4>
964
+ <code>integer</code><p>ID of the current post</p></div>
965
+ </div></div>
966
+ </div>
967
+ <a name="_build_tax_input" id="_build_tax_input"></a><div class="element clickable method private _build_tax_input" data-toggle="collapse" data-target="._build_tax_input .collapse">
968
+ <h2>Build the $tax_input array</h2>
969
+ <pre>_build_tax_input(integer $post_id, array $tax_inputs, array $tax_actions) </pre>
970
+ <div class="labels"></div>
971
+ <div class="row collapse"><div class="detail-description">
972
+ <p class="long_description"><p>Takes each term from the $tax_inputs parameter and builds an array of
973
+ language-specific term_id to term_id/term_name mappings for all languages.</p></p>
974
+ <table class="table table-bordered">
975
+ <tr>
976
+ <th>since</th>
977
+ <td>2.11</td>
978
+ </tr>
979
+ <tr>
980
+ <th>uses</th>
981
+ <td>\global\MLA_Polylang::$tax_input</td>
982
+ </tr>
983
+ <tr>
984
+ <th>uses</th>
985
+ <td>\global\MLA_Polylang::$existing_terms</td>
986
+ </tr>
987
+ </table>
988
+ <h3>Parameters</h3>
989
+ <div class="subelement argument">
990
+ <h4>$post_id</h4>
991
+ <code>integer</code><p>ID of the current post</p></div>
992
+ <div class="subelement argument">
993
+ <h4>$tax_inputs</h4>
994
+ <code>array</code><p>'tax_input' request parameter</p>
995
+ </div>
996
+ <div class="subelement argument">
997
+ <h4>$tax_actions</h4>
998
+ <code>array</code><p>'tax_action' request parameter</p>
999
+ </div>
1000
+ </div></div>
1001
+ </div>
1002
+ <a name="_get_relevant_term" id="_get_relevant_term"></a><div class="element clickable method private _get_relevant_term" data-toggle="collapse" data-target="._get_relevant_term .collapse">
1003
+ <h2>Finds a $relevant_term (if defined) given a key and (optional) a language</h2>
1004
+ <pre>_get_relevant_term(string $field, mixed $value, string $taxonomy, string $language) </pre>
1005
+ <div class="labels"></div>
1006
+ <div class="row collapse"><div class="detail-description">
1007
+ <p class="long_description"></p>
1008
+ <table class="table table-bordered">
1009
+ <tr>
1010
+ <th>since</th>
1011
+ <td>2.11</td>
1012
+ </tr>
1013
+ <tr>
1014
+ <th>uses</th>
1015
+ <td>\global\MLA_Polylang::$relevant_terms</td>
1016
+ </tr>
1017
+ </table>
1018
+ <h3>Parameters</h3>
1019
+ <div class="subelement argument">
1020
+ <h4>$field</h4>
1021
+ <code>string</code><p>to search in; 'id', 'name', or 'term_taxonomy_id'</p>
1022
+ </div>
1023
+ <div class="subelement argument">
1024
+ <h4>$value</h4>
1025
+ <code>mixed</code><p>to search for; integer, string or integer</p></div>
1026
+ <div class="subelement argument">
1027
+ <h4>$taxonomy</h4>
1028
+ <code>string</code><p>to search in; slug</p></div>
1029
+ <div class="subelement argument">
1030
+ <h4>$language</h4>
1031
+ <code>string</code><p>code; string; optional</p></div>
1032
+ </div></div>
1033
+ </div>
1034
+ <a name="_get_translation" id="_get_translation"></a><div class="element clickable method private _get_translation" data-toggle="collapse" data-target="._get_translation .collapse">
1035
+ <h2>Find or create an item translation</h2>
1036
+ <pre>_get_translation(integer $post_id, string $new_language) : integer</pre>
1037
+ <div class="labels"></div>
1038
+ <div class="row collapse"><div class="detail-description">
1039
+ <p class="long_description"></p>
1040
+ <table class="table table-bordered"><tr>
1041
+ <th>since</th>
1042
+ <td>2.11</td>
1043
+ </tr></table>
1044
+ <h3>Parameters</h3>
1045
+ <div class="subelement argument">
1046
+ <h4>$post_id</h4>
1047
+ <code>integer</code><p>item ID</p></div>
1048
+ <div class="subelement argument">
1049
+ <h4>$new_language</h4>
1050
+ <code>string</code><p>Slug of the desired language</p></div>
1051
+ <h3>Returns</h3>
1052
+ <div class="subelement response">
1053
+ <code>integer</code>ID of the corresponding item in the desired language</div>
1054
+ </div></div>
1055
+ </div>
1056
+ <a name="_get_view" id="_get_view"></a><div class="element clickable method private _get_view" data-toggle="collapse" data-target="._get_view .collapse">
1057
+ <h2>PolyMLA custom views for the Media/Assistant submenu</h2>
1058
+ <pre>_get_view(string $view_slug, string $current_view) : mixed</pre>
1059
+ <div class="labels"></div>
1060
+ <div class="row collapse"><div class="detail-description">
1061
+ <p class="long_description"></p>
1062
+ <table class="table table-bordered"><tr>
1063
+ <th>since</th>
1064
+ <td>2.11</td>
1065
+ </tr></table>
1066
+ <h3>Parameters</h3>
1067
+ <div class="subelement argument">
1068
+ <h4>$view_slug</h4>
1069
+ <code>string</code><p>The slug for the custom view to evaluate</p></div>
1070
+ <div class="subelement argument">
1071
+ <h4>$current_view</h4>
1072
+ <code>string</code><p>The slug for the current custom view, or ''</p>
1073
+ </div>
1074
+ <h3>Returns</h3>
1075
+ <div class="subelement response">
1076
+ <code>mixed</code>HTML for link to display the view, false if count = zero</div>
1077
+ </div></div>
1078
+ </div>
1079
+ <a name="_reset_language_settings" id="_reset_language_settings"></a><div class="element clickable method private _reset_language_settings" data-toggle="collapse" data-target="._reset_language_settings .collapse">
1080
+ <h2>Delete saved settings, restoring default values</h2>
1081
+ <pre>_reset_language_settings() : array</pre>
1082
+ <div class="labels"></div>
1083
+ <div class="row collapse"><div class="detail-description">
1084
+ <p class="long_description"></p>
1085
+ <table class="table table-bordered"><tr>
1086
+ <th>since</th>
1087
+ <td>2.11</td>
1088
+ </tr></table>
1089
+ <h3>Returns</h3>
1090
+ <div class="subelement response">
1091
+ <code>array</code>Message(s) reflecting the results of the operation</div>
1092
+ </div></div>
1093
+ </div>
1094
+ <a name="_save_language_settings" id="_save_language_settings"></a><div class="element clickable method private _save_language_settings" data-toggle="collapse" data-target="._save_language_settings .collapse">
1095
+ <h2>Save Language settings to the options table</h2>
1096
+ <pre>_save_language_settings() : array</pre>
1097
+ <div class="labels"></div>
1098
+ <div class="row collapse"><div class="detail-description">
1099
+ <p class="long_description"></p>
1100
+ <table class="table table-bordered">
1101
+ <tr>
1102
+ <th>since</th>
1103
+ <td>2.11</td>
1104
+ </tr>
1105
+ <tr>
1106
+ <th>uses</th>
1107
+ <td>\global\$_REQUEST</td>
1108
+ </tr>
1109
+ </table>
1110
+ <h3>Returns</h3>
1111
+ <div class="subelement response">
1112
+ <code>array</code>Message(s) reflecting the results of the operation</div>
1113
+ </div></div>
1114
+ </div>
1115
+ <a name="_update_existing_terms" id="_update_existing_terms"></a><div class="element clickable method private _update_existing_terms" data-toggle="collapse" data-target="._update_existing_terms .collapse">
1116
+ <h2>Update the $existing_terms array</h2>
1117
+ <pre>_update_existing_terms(integer $post_id) : array</pre>
1118
+ <div class="labels"></div>
1119
+ <div class="row collapse"><div class="detail-description">
1120
+ <p class="long_description"><p>Takes each translatable taxonomy and rebuilds the array of
1121
+ language-specific term_id to term_id/term_name mappings
1122
+ for the "current translation" represented by the $post_id.</p></p>
1123
+ <table class="table table-bordered">
1124
+ <tr>
1125
+ <th>since</th>
1126
+ <td>2.11</td>
1127
+ </tr>
1128
+ <tr>
1129
+ <th>uses</th>
1130
+ <td>\global\MLA_Polylang::$existing_terms</td>
1131
+ </tr>
1132
+ <tr>
1133
+ <th>uses</th>
1134
+ <td>\global\MLA_Polylang::$relevant_terms</td>
1135
+ </tr>
1136
+ </table>
1137
+ <h3>Parameters</h3>
1138
+ <div class="subelement argument">
1139
+ <h4>$post_id</h4>
1140
+ <code>integer</code><p>ID of the current post</p></div>
1141
+ <h3>Returns</h3>
1142
+ <div class="subelement response">
1143
+ <code>array</code>( taxonomy => term assignments ) before the update</div>
1144
+ </div></div>
1145
+ </div>
1146
+ <h3>
1147
+ <i class="icon-custom icon-property"></i> Properties</h3>
1148
+ <a name="%24mla_language_option_definitions" id="$mla_language_option_definitions"> </a><div class="element clickable property public $mla_language_option_definitions" data-toggle="collapse" data-target=".$mla_language_option_definitions .collapse">
1149
+ <h2>$mla_language_option_definitions defines the language-specific database options and
1150
+ admin page areas for setting/updating them</h2>
1151
+ <pre>$mla_language_option_definitions </pre>
1152
+ <div class="labels"></div>
1153
+ <div class="row collapse"><div class="detail-description"><p class="long_description"><p>The array must be populated at runtime in MLA_Polylang::mla_localize_language_option_definitions(),
1154
+ because localization calls cannot be placed in the "public static" array definition itself.</p>
1155
+
1156
+ <p>Each option is defined by an array with the elements documented in class-mla-options.php</p></p></div></div>
1157
+ </div>
1158
+ <a name="%24language_columns" id="$language_columns"> </a><div class="element clickable property protected $language_columns" data-toggle="collapse" data-target=".$language_columns .collapse">
1159
+ <h2>Table language column definitions</h2>
1160
+ <pre>$language_columns : array</pre>
1161
+ <div class="labels"></div>
1162
+ <div class="row collapse"><div class="detail-description">
1163
+ <p class="long_description"></p>
1164
+ <table class="table table-bordered"><tr>
1165
+ <th>since</th>
1166
+ <td>2.11</td>
1167
+ </tr></table>
1168
+ </div></div>
1169
+ </div>
1170
+ <a name="%24all_query_parameters" id="$all_query_parameters"> </a><div class="element clickable property private $all_query_parameters" data-toggle="collapse" data-target=".$all_query_parameters .collapse">
1171
+ <h2>Save the query arguments</h2>
1172
+ <pre>$all_query_parameters : array</pre>
1173
+ <div class="labels"></div>
1174
+ <div class="row collapse"><div class="detail-description">
1175
+ <p class="long_description"></p>
1176
+ <table class="table table-bordered"><tr>
1177
+ <th>since</th>
1178
+ <td>2.11</td>
1179
+ </tr></table>
1180
+ </div></div>
1181
+ </div>
1182
+ <a name="%24bulk_action_includes" id="$bulk_action_includes"> </a><div class="element clickable property private $bulk_action_includes" data-toggle="collapse" data-target=".$bulk_action_includes .collapse">
1183
+ <h2>Items returned by custom bulk action(s)</h2>
1184
+ <pre>$bulk_action_includes : array</pre>
1185
+ <div class="labels"></div>
1186
+ <div class="row collapse"><div class="detail-description">
1187
+ <p class="long_description"></p>
1188
+ <table class="table table-bordered"><tr>
1189
+ <th>since</th>
1190
+ <td>2.11</td>
1191
+ </tr></table>
1192
+ </div></div>
1193
+ </div>
1194
+ <a name="%24duplicate_attachments" id="$duplicate_attachments"> </a><div class="element clickable property private $duplicate_attachments" data-toggle="collapse" data-target=".$duplicate_attachments .collapse">
1195
+ <h2>Duplicates created during media upload</h2>
1196
+ <pre>$duplicate_attachments : array</pre>
1197
+ <div class="labels"></div>
1198
+ <div class="row collapse"><div class="detail-description">
1199
+ <p class="long_description"></p>
1200
+ <table class="table table-bordered"><tr>
1201
+ <th>since</th>
1202
+ <td>2.11</td>
1203
+ </tr></table>
1204
+ </div></div>
1205
+ </div>
1206
+ <a name="%24existing_terms" id="$existing_terms"> </a><div class="element clickable property private $existing_terms" data-toggle="collapse" data-target=".$existing_terms .collapse">
1207
+ <h2>Taxonomy terms for the current item translation in the database</h2>
1208
+ <pre>$existing_terms : array</pre>
1209
+ <div class="labels"></div>
1210
+ <div class="row collapse"><div class="detail-description">
1211
+ <p class="long_description"></p>
1212
+ <table class="table table-bordered"><tr>
1213
+ <th>since</th>
1214
+ <td>2.11</td>
1215
+ </tr></table>
1216
+ </div></div>
1217
+ </div>
1218
+ <a name="%24list_table_parameters" id="$list_table_parameters"> </a><div class="element clickable property private $list_table_parameters" data-toggle="collapse" data-target=".$list_table_parameters .collapse">
1219
+ <h2>Data selection parameters for custom views</h2>
1220
+ <pre>$list_table_parameters : array</pre>
1221
+ <div class="labels"></div>
1222
+ <div class="row collapse"><div class="detail-description">
1223
+ <p class="long_description"></p>
1224
+ <table class="table table-bordered"><tr>
1225
+ <th>since</th>
1226
+ <td>2.11</td>
1227
+ </tr></table>
1228
+ </div></div>
1229
+ </div>
1230
+ <a name="%24relevant_terms" id="$relevant_terms"> </a><div class="element clickable property private $relevant_terms" data-toggle="collapse" data-target=".$relevant_terms .collapse">
1231
+ <h2>Taxonomy terms and translations</h2>
1232
+ <pre>$relevant_terms : array</pre>
1233
+ <div class="labels"></div>
1234
+ <div class="row collapse"><div class="detail-description">
1235
+ <p class="long_description"></p>
1236
+ <table class="table table-bordered"><tr>
1237
+ <th>since</th>
1238
+ <td>2.11</td>
1239
+ </tr></table>
1240
+ </div></div>
1241
+ </div>
1242
+ <a name="%24tax_input" id="$tax_input"> </a><div class="element clickable property private $tax_input" data-toggle="collapse" data-target=".$tax_input .collapse">
1243
+ <h2>Replacement tax_input values in all languages</h2>
1244
+ <pre>$tax_input : array</pre>
1245
+ <div class="labels"></div>
1246
+ <div class="row collapse"><div class="detail-description">
1247
+ <p class="long_description"></p>
1248
+ <table class="table table-bordered"><tr>
1249
+ <th>since</th>
1250
+ <td>2.11</td>
1251
+ </tr></table>
1252
+ </div></div>
1253
+ </div>
1254
+ <a name="%24upload_bulk_edit_args" id="$upload_bulk_edit_args"> </a><div class="element clickable property private $upload_bulk_edit_args" data-toggle="collapse" data-target=".$upload_bulk_edit_args .collapse">
1255
+ <h2>Bulk Edit parameters during "Upload New Media"</h2>
1256
+ <pre>$upload_bulk_edit_args : array</pre>
1257
+ <div class="labels"></div>
1258
+ <div class="row collapse"><div class="detail-description">
1259
+ <p class="long_description"></p>
1260
+ <table class="table table-bordered"><tr>
1261
+ <th>since</th>
1262
+ <td>2.11</td>
1263
+ </tr></table>
1264
+ </div></div>
1265
+ </div>
1266
+ <a name="%24upload_bulk_edit_map" id="$upload_bulk_edit_map"> </a><div class="element clickable property private $upload_bulk_edit_map" data-toggle="collapse" data-target=".$upload_bulk_edit_map .collapse">
1267
+ <h2>Custom Field Map during "Upload New Media"</h2>
1268
+ <pre>$upload_bulk_edit_map : array</pre>
1269
+ <div class="labels"></div>
1270
+ <div class="row collapse"><div class="detail-description">
1271
+ <p class="long_description"></p>
1272
+ <table class="table table-bordered"><tr>
1273
+ <th>since</th>
1274
+ <td>2.11</td>
1275
+ </tr></table>
1276
+ </div></div>
1277
+ </div>
1278
+ <h3>
1279
+ <i class="icon-custom icon-constant"></i> Constants</h3>
1280
+ <a name="MLA_PLL_QUICK_TRANSLATE" id="MLA_PLL_QUICK_TRANSLATE"> </a><div class="element clickable constant MLA_PLL_QUICK_TRANSLATE" data-toggle="collapse" data-target=".MLA_PLL_QUICK_TRANSLATE .collapse">
1281
+ <h2>Uniquely identifies the Quick Translate action</h2>
1282
+ <pre>MLA_PLL_QUICK_TRANSLATE : string</pre>
1283
+ <div class="labels"></div>
1284
+ <div class="row collapse"><div class="detail-description">
1285
+ <p class="long_description"></p>
1286
+ <table class="table table-bordered"><tr>
1287
+ <th>since</th>
1288
+ <td>2.11</td>
1289
+ </tr></table>
1290
+ </div></div>
1291
+ </div>
1292
+ </div>
1293
+ </div>
1294
+ </div>
1295
+ </div>
1296
+ <div class="row"><footer class="span12">
1297
+ Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
1298
+ Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
1299
+ generated on 2015-06-06T19:41:36-07:00.<br></footer></div>
1300
+ </div>
1301
+ </body>
1302
+ </html>
phpDocs/classes/MLA_Upload_List_Table.html CHANGED
@@ -736,7 +736,7 @@ sorted by that column. This is computed each time the table is displayed.</p></p
736
  <div class="row"><footer class="span12">
737
  Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
738
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
739
- generated on 2015-04-19T11:52:22-07:00.<br></footer></div>
740
  </div>
741
  </body>
742
  </html>
736
  <div class="row"><footer class="span12">
737
  Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
738
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
739
+ generated on 2015-06-06T19:41:36-07:00.<br></footer></div>
740
  </div>
741
  </body>
742
  </html>
phpDocs/classes/MLA_Upload_Optional_List_Table.html CHANGED
@@ -554,7 +554,7 @@ sorted by that column. This is computed each time the table is displayed.</p></p
554
  <div class="row"><footer class="span12">
555
  Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
556
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
557
- generated on 2015-04-19T11:52:22-07:00.<br></footer></div>
558
  </div>
559
  </body>
560
  </html>
554
  <div class="row"><footer class="span12">
555
  Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
556
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
557
+ generated on 2015-06-06T19:41:36-07:00.<br></footer></div>
558
  </div>
559
  </body>
560
  </html>
phpDocs/classes/MLA_View_List_Table.html CHANGED
@@ -633,7 +633,7 @@ sorted by that column. This is computed each time the table is displayed.</p></p
633
  <div class="row"><footer class="span12">
634
  Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
635
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
636
- generated on 2015-04-19T11:52:22-07:00.<br></footer></div>
637
  </div>
638
  </body>
639
  </html>
633
  <div class="row"><footer class="span12">
634
  Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
635
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
636
+ generated on 2015-06-06T19:41:36-07:00.<br></footer></div>
637
  </div>
638
  </body>
639
  </html>
phpDocs/classes/MLA_WPML.html ADDED
@@ -0,0 +1,855 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html><html xmlns:date="http://exslt.org/dates-and-times" lang="en">
2
+ <head>
3
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4
+ <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
5
+ <meta charset="utf-8">
6
+ <title>Media Library Assistant » \MLA_WPML</title>
7
+ <meta name="author" content="Mike van Riel">
8
+ <meta name="description" content="">
9
+ <link href="../css/template.css" rel="stylesheet" media="all">
10
+ <script src="../js/jquery-1.7.1.min.js" type="text/javascript"></script><script src="../js/jquery-ui-1.8.2.custom.min.js" type="text/javascript"></script><script src="../js/jquery.mousewheel.min.js" type="text/javascript"></script><script src="../js/bootstrap.js" type="text/javascript"></script><script src="../js/template.js" type="text/javascript"></script><script src="../js/prettify/prettify.min.js" type="text/javascript"></script><link rel="shortcut icon" href="../img/favicon.ico">
11
+ <link rel="apple-touch-icon" href="../img/apple-touch-icon.png">
12
+ <link rel="apple-touch-icon" sizes="72x72" href="../img/apple-touch-icon-72x72.png">
13
+ <link rel="apple-touch-icon" sizes="114x114" href="../img/apple-touch-icon-114x114.png">
14
+ </head>
15
+ <body>
16
+ <div class="navbar navbar-fixed-top">
17
+ <div class="navbar-inner"><div class="container">
18
+ <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></a><a class="brand" href="../index.html">Media Library Assistant</a><div class="nav-collapse"><ul class="nav">
19
+ <li class="dropdown">
20
+ <a href="#api" class="dropdown-toggle" data-toggle="dropdown">
21
+ API Documentation <b class="caret"></b></a><ul class="dropdown-menu">
22
+ <li><a>Packages</a></li>
23
+ <li><a href="../packages/Media%20Library%20Assistant.html"><i class="icon-folder-open"></i> Media Library Assistant</a></li>
24
+ </ul>
25
+ </li>
26
+ <li class="dropdown" id="charts-menu">
27
+ <a href="#charts" class="dropdown-toggle" data-toggle="dropdown">
28
+ Charts <b class="caret"></b></a><ul class="dropdown-menu"><li><a href="../graph_class.html"><i class="icon-list-alt"></i> Class hierarchy diagram</a></li></ul>
29
+ </li>
30
+ <li class="dropdown" id="reports-menu">
31
+ <a href="#reports" class="dropdown-toggle" data-toggle="dropdown">
32
+ Reports <b class="caret"></b></a><ul class="dropdown-menu">
33
+ <li><a href="../errors.html"><i class="icon-remove-sign"></i> Errors 
34
+ <span class="label label-info">0</span></a></li>
35
+ <li><a href="../markers.html"><i class="icon-map-marker"></i> Markers 
36
+ <ul><li>todo 
37
+ <span class="label label-info">1</span>
38
+ </li></ul></a></li>
39
+ <li><a href="../deprecated.html"><i class="icon-stop"></i> Deprecated elements 
40
+ <span class="label label-info">0</span></a></li>
41
+ </ul>
42
+ </li>
43
+ </ul></div>
44
+ </div></div>
45
+ <div class="go_to_top"><a href="#___" style="color: inherit">Back to top  <i class="icon-upload icon-white"></i></a></div>
46
+ </div>
47
+ <div id="___" class="container">
48
+ <noscript><div class="alert alert-warning">
49
+ Javascript is disabled; several features are only available
50
+ if Javascript is enabled.
51
+ </div></noscript>
52
+ <div class="row">
53
+ <div class="span4">
54
+ <span class="btn-group visibility" data-toggle="buttons-checkbox"><button class="btn public active" title="Show public elements">Public</button><button class="btn protected" title="Show protected elements">Protected</button><button class="btn private" title="Show private elements">Private</button><button class="btn inherited active" title="Show inherited elements">Inherited</button></span><div class="btn-group view pull-right" data-toggle="buttons-radio">
55
+ <button class="btn details" title="Show descriptions and method names"><i class="icon-list"></i></button><button class="btn simple" title="Show only method names"><i class="icon-align-justify"></i></button>
56
+ </div>
57
+ <ul class="side-nav nav nav-list">
58
+ <li class="nav-header">
59
+ <i class="icon-custom icon-method"></i> Methods</li>
60
+ <li class="method public "><a href="#admin_init" title="admin_init :: Add the plugin's admin-mode filter/action handlers"><span class="description">Add the plugin's admin-mode filter/action handlers</span><pre>admin_init()</pre></a></li>
61
+ <li class="method public "><a href="#edit_attachment" title="edit_attachment :: Filters taxonomy updates by language."><span class="description">Filters taxonomy updates by language.</span><pre>edit_attachment()</pre></a></li>
62
+ <li class="method public "><a href="#initialize" title="initialize :: Initialization function, similar to __construct()"><span class="description">Initialization function, similar to __construct()</span><pre>initialize()</pre></a></li>
63
+ <li class="method public "><a href="#mla_get_options_tablist" title='mla_get_options_tablist :: Adds the "Language" tab to the Settings/Media Library Assistant list'><span class="description">Adds the "Language" tab to the Settings/Media Library Assistant list</span><pre>mla_get_options_tablist()</pre></a></li>
64
+ <li class="method public "><a href="#mla_get_terms_clauses" title="mla_get_terms_clauses :: MLA Tag Cloud Query Clauses"><span class="description">MLA Tag Cloud Query Clauses</span><pre>mla_get_terms_clauses()</pre></a></li>
65
+ <li class="method public "><a href="#mla_get_terms_query_arguments" title="mla_get_terms_query_arguments :: MLA Tag Cloud Query Arguments"><span class="description">MLA Tag Cloud Query Arguments</span><pre>mla_get_terms_query_arguments()</pre></a></li>
66
+ <li class="method public "><a href="#mla_list_table_bulk_action_initial_request" title='mla_list_table_bulk_action_initial_request :: Captures the Bulk Edit parameters during "Upload New Media"'><span class="description">Captures the Bulk Edit parameters during "Upload New Media"</span><pre>mla_list_table_bulk_action_initial_request()</pre></a></li>
67
+ <li class="method public "><a href="#mla_list_table_bulk_action_item_request" title="mla_list_table_bulk_action_item_request :: Converts Bulk Edit taxonomy inputs to language-specific values"><span class="description">Converts Bulk Edit taxonomy inputs to language-specific values</span><pre>mla_list_table_bulk_action_item_request()</pre></a></li>
68
+ <li class="method public "><a href="#mla_list_table_custom_admin_action" title="mla_list_table_custom_admin_action :: Add a duplicate translation for an item, then redirect to the Media/Edit Media screen"><span class="description">Add a duplicate translation for an item, then redirect to the Media/Edit Media screen</span><pre>mla_list_table_custom_admin_action()</pre></a></li>
69
+ <li class="method public "><a href="#mla_list_table_inline_action" title='mla_list_table_inline_action :: Captures the Quick Edit "before update" term assignments'><span class="description">Captures the Quick Edit "before update" term assignments</span><pre>mla_list_table_inline_action()</pre></a></li>
70
+ <li class="method public "><a href="#mla_localize_language_option_definitions" title="mla_localize_language_option_definitions :: Localize $mla_language_option_definitions array"><span class="description">Localize $mla_language_option_definitions array</span><pre>mla_localize_language_option_definitions()</pre></a></li>
71
+ <li class="method public "><a href="#mla_media_modal_begin_update_compat_fields" title="mla_media_modal_begin_update_compat_fields :: Captures the existing term assignments before the
72
+ Media Manager Modal Window ATTACHMENT DETAILS taxonomy meta boxes updates"><span class="description">Captures the existing term assignments before the
73
+ Media Manager Modal Window ATTACHMENT DETAILS taxonomy meta boxes updates</span><pre>mla_media_modal_begin_update_compat_fields()</pre></a></li>
74
+ <li class="method public "><a href="#mla_media_modal_end_update_compat_fields" title="mla_media_modal_end_update_compat_fields :: Applies Term Synchronization after the
75
+ Media Manager Modal Window taxonomy updates"><span class="description">Applies Term Synchronization after the
76
+ Media Manager Modal Window taxonomy updates</span><pre>mla_media_modal_end_update_compat_fields()</pre></a></li>
77
+ <li class="method public "><a href="#mla_media_modal_update_compat_fields_terms" title="mla_media_modal_update_compat_fields_terms :: Applies Term Assignment to the terms assigned to one
78
+ Media Manager Modal Window ATTACHMENT DETAILS taxonomy"><span class="description">Applies Term Assignment to the terms assigned to one
79
+ Media Manager Modal Window ATTACHMENT DETAILS taxonomy</span><pre>mla_media_modal_update_compat_fields_terms()</pre></a></li>
80
+ <li class="method public "><a href="#mla_render_language_tab" title='mla_render_language_tab :: Renders the Settings/Media Library Assistant "Language" tab'><span class="description">Renders the Settings/Media Library Assistant "Language" tab</span><pre>mla_render_language_tab()</pre></a></li>
81
+ <li class="method public "><a href="#post_updated_messages" title="post_updated_messages :: Adds translation update message for display at the top of the Edit Media screen"><span class="description">Adds translation update message for display at the top of the Edit Media screen</span><pre>post_updated_messages()</pre></a></li>
82
+ <li class="method public "><a href="#wp_insert_post_empty_content" title='wp_insert_post_empty_content :: Captures "before update" term assignments from the Media/Edit Media screen'><span class="description">Captures "before update" term assignments from the Media/Edit Media screen</span><pre>wp_insert_post_empty_content()</pre></a></li>
83
+ <li class="method public "><a href="#wpml_media_create_duplicate_attachment" title="wpml_media_create_duplicate_attachment :: Copies taxonomy terms from the source item to the new translated item"><span class="description">Copies taxonomy terms from the source item to the new translated item</span><pre>wpml_media_create_duplicate_attachment()</pre></a></li>
84
+ <li class="nav-header private">» Private</li>
85
+ <li class="method private "><a href="#_add_relevant_term" title="_add_relevant_term :: Adds a term and its translations to $relevant_terms"><span class="description">Adds a term and its translations to $relevant_terms</span><pre>_add_relevant_term()</pre></a></li>
86
+ <li class="method private "><a href="#_apply_synch_input" title="_apply_synch_input :: Compute Term Synchronization replacement $tax_inputs"><span class="description">Compute Term Synchronization replacement $tax_inputs</span><pre>_apply_synch_input()</pre></a></li>
87
+ <li class="method private "><a href="#_apply_tax_input" title="_apply_tax_input :: Filter the $tax_input array to a specific language"><span class="description">Filter the $tax_input array to a specific language</span><pre>_apply_tax_input()</pre></a></li>
88
+ <li class="method private "><a href="#_build_existing_terms" title="_build_existing_terms :: Build the $existing_terms array"><span class="description">Build the $existing_terms array</span><pre>_build_existing_terms()</pre></a></li>
89
+ <li class="method private "><a href="#_build_tax_input" title="_build_tax_input :: Build the $tax_input array"><span class="description">Build the $tax_input array</span><pre>_build_tax_input()</pre></a></li>
90
+ <li class="method private "><a href="#_get_relevant_term" title="_get_relevant_term :: Finds a $relevant_term (if defined) given a key and (optional) a language"><span class="description">Finds a $relevant_term (if defined) given a key and (optional) a language</span><pre>_get_relevant_term()</pre></a></li>
91
+ <li class="method private "><a href="#_reset_language_settings" title="_reset_language_settings :: Delete saved settings, restoring default values"><span class="description">Delete saved settings, restoring default values</span><pre>_reset_language_settings()</pre></a></li>
92
+ <li class="method private "><a href="#_save_language_settings" title="_save_language_settings :: Save Language settings to the options table"><span class="description">Save Language settings to the options table</span><pre>_save_language_settings()</pre></a></li>
93
+ <li class="method private "><a href="#_update_existing_terms" title="_update_existing_terms :: Update the $existing_terms array"><span class="description">Update the $existing_terms array</span><pre>_update_existing_terms()</pre></a></li>
94
+ <li class="nav-header">
95
+ <i class="icon-custom icon-property"></i> Properties</li>
96
+ <li class="property public "><a href="#%24mla_language_option_definitions" title="$mla_language_option_definitions :: $mla_language_option_definitions defines the language-specific database options and
97
+ admin page areas for setting/updating them"><span class="description">$mla_language_option_definitions defines the language-specific database options and
98
+ admin page areas for setting/updating them</span><pre>$mla_language_option_definitions</pre></a></li>
99
+ <li class="nav-header private">» Private</li>
100
+ <li class="property private "><a href="#%24all_query_parameters" title="$all_query_parameters :: Save the query arguments"><span class="description">Save the query arguments</span><pre>$all_query_parameters</pre></a></li>
101
+ <li class="property private "><a href="#%24duplicate_attachments" title="$duplicate_attachments :: Duplicates created during media upload"><span class="description">Duplicates created during media upload</span><pre>$duplicate_attachments</pre></a></li>
102
+ <li class="property private "><a href="#%24existing_terms" title="$existing_terms :: Taxonomy terms for the current item translation in the database"><span class="description">Taxonomy terms for the current item translation in the database</span><pre>$existing_terms</pre></a></li>
103
+ <li class="property private "><a href="#%24relevant_terms" title="$relevant_terms :: Taxonomy terms and translations"><span class="description">Taxonomy terms and translations</span><pre>$relevant_terms</pre></a></li>
104
+ <li class="property private "><a href="#%24tax_input" title="$tax_input :: Replacement tax_input values in all languages"><span class="description">Replacement tax_input values in all languages</span><pre>$tax_input</pre></a></li>
105
+ <li class="property private "><a href="#%24upload_bulk_edit_args" title='$upload_bulk_edit_args :: Bulk Edit parameters during "Upload New Media"'><span class="description">Bulk Edit parameters during "Upload New Media"</span><pre>$upload_bulk_edit_args</pre></a></li>
106
+ <li class="property private "><a href="#%24upload_bulk_edit_map" title='$upload_bulk_edit_map :: Custom Field Map during "Upload New Media"'><span class="description">Custom Field Map during "Upload New Media"</span><pre>$upload_bulk_edit_map</pre></a></li>
107
+ </ul>
108
+ </div>
109
+ <div class="span8">
110
+ <a name="%5CMLA_WPML" id="\MLA_WPML"></a><ul class="breadcrumb">
111
+ <li>
112
+ <a href="../index.html"><i class="icon-custom icon-class"></i></a><span class="divider">\</span>
113
+ </li>
114
+ <li><a href="../namespaces/global.html">global</a></li>
115
+ <li class="active">
116
+ <span class="divider">\</span><a href="../classes/MLA_WPML.html">MLA_WPML</a>
117
+ </li>
118
+ </ul>
119
+ <div href="../classes/MLA_WPML.html" class="element class">
120
+ <p class="short_description">Class MLA (Media Library Assistant) WPML provides support for the WPML Multilingual CMS
121
+ family of plugins, including WPML Media</p>
122
+ <div class="details">
123
+ <p class="long_description"></p>
124
+ <table class="table table-bordered">
125
+ <tr>
126
+ <th>package</th>
127
+ <td><a href="../packages/Media%20Library%20Assistant.html">Media Library Assistant</a></td>
128
+ </tr>
129
+ <tr>
130
+ <th>since</th>
131
+ <td>2.11</td>
132
+ </tr>
133
+ </table>
134
+ <h3>
135
+ <i class="icon-custom icon-method"></i> Methods</h3>
136
+ <a name="admin_init" id="admin_init"></a><div class="element clickable method public admin_init" data-toggle="collapse" data-target=".admin_init .collapse">
137
+ <h2>Add the plugin's admin-mode filter/action handlers</h2>
138
+ <pre>admin_init() : void</pre>
139
+ <div class="labels"></div>
140
+ <div class="row collapse"><div class="detail-description">
141
+ <p class="long_description"></p>
142
+ <table class="table table-bordered"><tr>
143
+ <th>since</th>
144
+ <td>2.11</td>
145
+ </tr></table>
146
+ </div></div>
147
+ </div>
148
+ <a name="edit_attachment" id="edit_attachment"></a><div class="element clickable method public edit_attachment" data-toggle="collapse" data-target=".edit_attachment .collapse">
149
+ <h2>Filters taxonomy updates by language.</h2>
150
+ <pre>edit_attachment(integer $post_id) </pre>
151
+ <div class="labels"></div>
152
+ <div class="row collapse"><div class="detail-description">
153
+ <p class="long_description"></p>
154
+ <table class="table table-bordered"><tr>
155
+ <th>since</th>
156
+ <td>2.11</td>
157
+ </tr></table>
158
+ <h3>Parameters</h3>
159
+ <div class="subelement argument">
160
+ <h4>$post_id</h4>
161
+ <code>integer</code><p>ID of the current post</p></div>
162
+ </div></div>
163
+ </div>
164
+ <a name="initialize" id="initialize"></a><div class="element clickable method public initialize" data-toggle="collapse" data-target=".initialize .collapse">
165
+ <h2>Initialization function, similar to __construct()</h2>
166
+ <pre>initialize() : void</pre>
167
+ <div class="labels"></div>
168
+ <div class="row collapse"><div class="detail-description">
169
+ <p class="long_description"><p>This function contains add_action and add_filter calls.</p></p>
170
+ <table class="table table-bordered"><tr>
171
+ <th>since</th>
172
+ <td>2.11</td>
173
+ </tr></table>
174
+ </div></div>
175
+ </div>
176
+ <a name="mla_get_options_tablist" id="mla_get_options_tablist"></a><div class="element clickable method public mla_get_options_tablist" data-toggle="collapse" data-target=".mla_get_options_tablist .collapse">
177
+ <h2>Adds the "Language" tab to the Settings/Media Library Assistant list</h2>
178
+ <pre>mla_get_options_tablist(array | false $results, array $mla_tablist, string | NULL $tab) : array</pre>
179
+ <div class="labels"></div>
180
+ <div class="row collapse"><div class="detail-description">
181
+ <p class="long_description"></p>
182
+ <table class="table table-bordered"><tr>
183
+ <th>since</th>
184
+ <td>2.11</td>
185
+ </tr></table>
186
+ <h3>Parameters</h3>
187
+ <div class="subelement argument">
188
+ <h4>$results</h4>
189
+ <code>arrayfalse</code><p>The entire tablist ( $tab = NULL ), a single tab entry or false if not found/not allowed.</p>
190
+ </div>
191
+ <div class="subelement argument">
192
+ <h4>$mla_tablist</h4>
193
+ <code>array</code><p>The entire default tablist</p></div>
194
+ <div class="subelement argument">
195
+ <h4>$tab</h4>
196
+ <code>stringNULL</code><p>tab slug for single-element return or NULL to return entire tablist</p>
197
+ </div>
198
+ <h3>Returns</h3>
199
+ <div class="subelement response">
200
+ <code>array</code>updated tablist or single tab element</div>
201
+ </div></div>
202
+ </div>
203
+ <a name="mla_get_terms_clauses" id="mla_get_terms_clauses"></a><div class="element clickable method public mla_get_terms_clauses" data-toggle="collapse" data-target=".mla_get_terms_clauses .collapse">
204
+ <h2>MLA Tag Cloud Query Clauses</h2>
205
+ <pre>mla_get_terms_clauses(array $clauses) : array</pre>
206
+ <div class="labels"></div>
207
+ <div class="row collapse"><div class="detail-description">
208
+ <p class="long_description"><p>Adds language-specific clauses to filter the cloud terms.</p></p>
209
+ <table class="table table-bordered"><tr>
210
+ <th>since</th>
211
+ <td>2.11</td>
212
+ </tr></table>
213
+ <h3>Parameters</h3>
214
+ <div class="subelement argument">
215
+ <h4>$clauses</h4>
216
+ <code>array</code><p>SQL clauses ( 'fields', 'join', 'where', 'order', 'orderby', 'limits' )</p>
217
+ </div>
218
+ <h3>Returns</h3>
219
+ <div class="subelement response">
220
+ <code>array</code>updated SQL clauses</div>
221
+ </div></div>
222
+ </div>
223
+ <a name="mla_get_terms_query_arguments" id="mla_get_terms_query_arguments"></a><div class="element clickable method public mla_get_terms_query_arguments" data-toggle="collapse" data-target=".mla_get_terms_query_arguments .collapse">
224
+ <h2>MLA Tag Cloud Query Arguments</h2>
225
+ <pre>mla_get_terms_query_arguments(array $all_query_parameters) : array</pre>
226
+ <div class="labels"></div>
227
+ <div class="row collapse"><div class="detail-description">
228
+ <p class="long_description"><p>Saves [mla_tag_cloud] query parameters for use in MLA_WPML::mla_get_terms_clauses.</p></p>
229
+ <table class="table table-bordered">
230
+ <tr>
231
+ <th>since</th>
232
+ <td>2.11</td>
233
+ </tr>
234
+ <tr>
235
+ <th>uses</th>
236
+ <td>\global\MLA_WPML::$all_query_parameters</td>
237
+ </tr>
238
+ </table>
239
+ <h3>Parameters</h3>
240
+ <div class="subelement argument">
241
+ <h4>$all_query_parameters</h4>
242
+ <code>array</code><p>shortcode arguments merged with attachment selection defaults, so every possible parameter is present</p></div>
243
+ <h3>Returns</h3>
244
+ <div class="subelement response">
245
+ <code>array</code>updated attachment query arguments</div>
246
+ </div></div>
247
+ </div>
248
+ <a name="mla_list_table_bulk_action_initial_request" id="mla_list_table_bulk_action_initial_request"></a><div class="element clickable method public mla_list_table_bulk_action_initial_request" data-toggle="collapse" data-target=".mla_list_table_bulk_action_initial_request .collapse">
249
+ <h2>Captures the Bulk Edit parameters during "Upload New Media"</h2>
250
+ <pre>mla_list_table_bulk_action_initial_request(array $request, string $bulk_action, array $custom_field_map) : array</pre>
251
+ <div class="labels"></div>
252
+ <div class="row collapse"><div class="detail-description">
253
+ <p class="long_description"></p>
254
+ <table class="table table-bordered"><tr>
255
+ <th>since</th>
256
+ <td>2.11</td>
257
+ </tr></table>
258
+ <h3>Parameters</h3>
259
+ <div class="subelement argument">
260
+ <h4>$request</h4>
261
+ <code>array</code><p>bulk action request parameters, including ['mla_bulk_action_do_cleanup'].</p>
262
+ </div>
263
+ <div class="subelement argument">
264
+ <h4>$bulk_action</h4>
265
+ <code>string</code><p>the requested action.</p></div>
266
+ <div class="subelement argument">
267
+ <h4>$custom_field_map</h4>
268
+ <code>array</code><p>[ slug => field_name ]</p>
269
+ </div>
270
+ <h3>Returns</h3>
271
+ <div class="subelement response">
272
+ <code>array</code>updated bulk action request parameters</div>
273
+ </div></div>
274
+ </div>
275
+ <a name="mla_list_table_bulk_action_item_request" id="mla_list_table_bulk_action_item_request"></a><div class="element clickable method public mla_list_table_bulk_action_item_request" data-toggle="collapse" data-target=".mla_list_table_bulk_action_item_request .collapse">
276
+ <h2>Converts Bulk Edit taxonomy inputs to language-specific values</h2>
277
+ <pre>mla_list_table_bulk_action_item_request(array $request, string $bulk_action, integer $post_id, array $custom_field_map) : array</pre>
278
+ <div class="labels"></div>
279
+ <div class="row collapse"><div class="detail-description">
280
+ <p class="long_description"></p>
281
+ <table class="table table-bordered"><tr>
282
+ <th>since</th>
283
+ <td>2.11</td>
284
+ </tr></table>
285
+ <h3>Parameters</h3>
286
+ <div class="subelement argument">
287
+ <h4>$request</h4>
288
+ <code>array</code><p>bulk action request parameters, including ['mla_bulk_action_do_cleanup'].</p>
289
+ </div>
290
+ <div class="subelement argument">
291
+ <h4>$bulk_action</h4>
292
+ <code>string</code><p>the requested action.</p></div>
293
+ <div class="subelement argument">
294
+ <h4>$post_id</h4>
295
+ <code>integer</code><p>the affected attachment.</p></div>
296
+ <div class="subelement argument">
297
+ <h4>$custom_field_map</h4>
298
+ <code>array</code><p>[ slug => field_name ]</p>
299
+ </div>
300
+ <h3>Returns</h3>
301
+ <div class="subelement response">
302
+ <code>array</code>updated bulk action request parameters</div>
303
+ </div></div>
304
+ </div>
305
+ <a name="mla_list_table_custom_admin_action" id="mla_list_table_custom_admin_action"></a><div class="element clickable method public mla_list_table_custom_admin_action" data-toggle="collapse" data-target=".mla_list_table_custom_admin_action .collapse">
306
+ <h2>Add a duplicate translation for an item, then redirect to the Media/Edit Media screen</h2>
307
+ <pre>mla_list_table_custom_admin_action(string $mla_admin_action, integer $mla_item_ID) </pre>
308
+ <div class="labels"></div>
309
+ <div class="row collapse"><div class="detail-description">
310
+ <p class="long_description"></p>
311
+ <table class="table table-bordered"><tr>
312
+ <th>since</th>
313
+ <td>2.11</td>
314
+ </tr></table>
315
+ <h3>Parameters</h3>
316
+ <div class="subelement argument">
317
+ <h4>$mla_admin_action</h4>
318
+ <code>string</code><p>the requested action.</p></div>
319
+ <div class="subelement argument">
320
+ <h4>$mla_item_ID</h4>
321
+ <code>integer</code><p>zero (0), or the affected attachment.</p>
322
+ </div>
323
+ </div></div>
324
+ </div>
325
+ <a name="mla_list_table_inline_action" id="mla_list_table_inline_action"></a><div class="element clickable method public mla_list_table_inline_action" data-toggle="collapse" data-target=".mla_list_table_inline_action .collapse">
326
+ <h2>Captures the Quick Edit "before update" term assignments</h2>
327
+ <pre>mla_list_table_inline_action(array $item_content, integer $post_id) : object</pre>
328
+ <div class="labels"></div>
329
+ <div class="row collapse"><div class="detail-description">
330
+ <p class="long_description"></p>
331
+ <table class="table table-bordered"><tr>
332
+ <th>since</th>
333
+ <td>2.11</td>
334
+ </tr></table>
335
+ <h3>Parameters</h3>
336
+ <div class="subelement argument">
337
+ <h4>$item_content</h4>
338
+ <code>array</code><p>NULL, to indicate no handler.</p></div>
339
+ <div class="subelement argument">
340
+ <h4>$post_id</h4>
341
+ <code>integer</code><p>the affected attachment.</p></div>
342
+ <h3>Returns</h3>
343
+ <div class="subelement response">
344
+ <code>object</code>updated $item_content. NULL if no handler, otherwise ( 'message' => error or status message(s), 'body' => '', 'prevent_default' => true to bypass the MLA handler )</div>
345
+ </div></div>
346
+ </div>
347
+ <a name="mla_localize_language_option_definitions" id="mla_localize_language_option_definitions"></a><div class="element clickable method public mla_localize_language_option_definitions" data-toggle="collapse" data-target=".mla_localize_language_option_definitions .collapse">
348
+ <h2>Localize $mla_language_option_definitions array</h2>
349
+ <pre>mla_localize_language_option_definitions() : void</pre>
350
+ <div class="labels"></div>
351
+ <div class="row collapse"><div class="detail-description">
352
+ <p class="long_description"><p>Localization must be done at runtime, and these calls cannot be placed
353
+ in the "public static" array definition itself.</p></p>
354
+ <table class="table table-bordered"><tr>
355
+ <th>since</th>
356
+ <td>2.11</td>
357
+ </tr></table>
358
+ </div></div>
359
+ </div>
360
+ <a name="mla_media_modal_begin_update_compat_fields" id="mla_media_modal_begin_update_compat_fields"></a><div class="element clickable method public mla_media_modal_begin_update_compat_fields" data-toggle="collapse" data-target=".mla_media_modal_begin_update_compat_fields .collapse">
361
+ <h2>Captures the existing term assignments before the
362
+ Media Manager Modal Window ATTACHMENT DETAILS taxonomy meta boxes updates</h2>
363
+ <pre>mla_media_modal_begin_update_compat_fields(object $post) </pre>
364
+ <div class="labels"></div>
365
+ <div class="row collapse"><div class="detail-description">
366
+ <p class="long_description"></p>
367
+ <table class="table table-bordered"><tr>
368
+ <th>since</th>
369
+ <td>2.11</td>
370
+ </tr></table>
371
+ <h3>Parameters</h3>
372
+ <div class="subelement argument">
373
+ <h4>$post</h4>
374
+ <code>object</code><p>the current post</p></div>
375
+ </div></div>
376
+ </div>
377
+ <a name="mla_media_modal_end_update_compat_fields" id="mla_media_modal_end_update_compat_fields"></a><div class="element clickable method public mla_media_modal_end_update_compat_fields" data-toggle="collapse" data-target=".mla_media_modal_end_update_compat_fields .collapse">
378
+ <h2>Applies Term Synchronization after the
379
+ Media Manager Modal Window taxonomy updates</h2>
380
+ <pre>mla_media_modal_end_update_compat_fields(string $results, array $taxonomies, object $post) </pre>
381
+ <div class="labels"></div>
382
+ <div class="row collapse"><div class="detail-description">
383
+ <p class="long_description"></p>
384
+ <table class="table table-bordered"><tr>
385
+ <th>since</th>
386
+ <td>2.11</td>
387
+ </tr></table>
388
+ <h3>Parameters</h3>
389
+ <div class="subelement argument">
390
+ <h4>$results</h4>
391
+ <code>string</code><p>HTML markup for the taxonomy meta box elements</p></div>
392
+ <div class="subelement argument">
393
+ <h4>$taxonomies</h4>
394
+ <code>array</code><p>supported taxonomy objects</p></div>
395
+ <div class="subelement argument">
396
+ <h4>$post</h4>
397
+ <code>object</code><p>current post object</p></div>
398
+ </div></div>
399
+ </div>
400
+ <a name="mla_media_modal_update_compat_fields_terms" id="mla_media_modal_update_compat_fields_terms"></a><div class="element clickable method public mla_media_modal_update_compat_fields_terms" data-toggle="collapse" data-target=".mla_media_modal_update_compat_fields_terms .collapse">
401
+ <h2>Applies Term Assignment to the terms assigned to one
402
+ Media Manager Modal Window ATTACHMENT DETAILS taxonomy</h2>
403
+ <pre>mla_media_modal_update_compat_fields_terms(array $terms, string $key, object $value, integer $post_id) </pre>
404
+ <div class="labels"></div>
405
+ <div class="row collapse"><div class="detail-description">
406
+ <p class="long_description"></p>
407
+ <table class="table table-bordered"><tr>
408
+ <th>since</th>
409
+ <td>2.11</td>
410
+ </tr></table>
411
+ <h3>Parameters</h3>
412
+ <div class="subelement argument">
413
+ <h4>$terms</h4>
414
+ <code>array</code><p>assigned term id/name values</p>
415
+ </div>
416
+ <div class="subelement argument">
417
+ <h4>$key</h4>
418
+ <code>string</code><p>taxonomy slug</p></div>
419
+ <div class="subelement argument">
420
+ <h4>$value</h4>
421
+ <code>object</code><p>taxonomy object</p></div>
422
+ <div class="subelement argument">
423
+ <h4>$post_id</h4>
424
+ <code>integer</code><p>current post ID</p></div>
425
+ </div></div>
426
+ </div>
427
+ <a name="mla_render_language_tab" id="mla_render_language_tab"></a><div class="element clickable method public mla_render_language_tab" data-toggle="collapse" data-target=".mla_render_language_tab .collapse">
428
+ <h2>Renders the Settings/Media Library Assistant "Language" tab</h2>
429
+ <pre>mla_render_language_tab() : array</pre>
430
+ <div class="labels"></div>
431
+ <div class="row collapse"><div class="detail-description">
432
+ <p class="long_description"></p>
433
+ <table class="table table-bordered"><tr>
434
+ <th>since</th>
435
+ <td>2.11</td>
436
+ </tr></table>
437
+ <h3>Returns</h3>
438
+ <div class="subelement response">
439
+ <code>array</code>( 'message' => '', 'body' => '' )</div>
440
+ </div></div>
441
+ </div>
442
+ <a name="post_updated_messages" id="post_updated_messages"></a><div class="element clickable method public post_updated_messages" data-toggle="collapse" data-target=".post_updated_messages .collapse">
443
+ <h2>Adds translation update message for display at the top of the Edit Media screen</h2>
444
+ <pre>post_updated_messages(array $messages) : array</pre>
445
+ <div class="labels"></div>
446
+ <div class="row collapse"><div class="detail-description">
447
+ <p class="long_description"></p>
448
+ <table class="table table-bordered"><tr>
449
+ <th>since</th>
450
+ <td>2.11</td>
451
+ </tr></table>
452
+ <h3>Parameters</h3>
453
+ <div class="subelement argument">
454
+ <h4>$messages</h4>
455
+ <code>array</code><p>messages for the Edit screen</p></div>
456
+ <h3>Returns</h3>
457
+ <div class="subelement response">
458
+ <code>array</code>updated messages</div>
459
+ </div></div>
460
+ </div>
461
+ <a name="wp_insert_post_empty_content" id="wp_insert_post_empty_content"></a><div class="element clickable method public wp_insert_post_empty_content" data-toggle="collapse" data-target=".wp_insert_post_empty_content .collapse">
462
+ <h2>Captures "before update" term assignments from the Media/Edit Media screen</h2>
463
+ <pre>wp_insert_post_empty_content(bool $maybe_empty, array $postarr) </pre>
464
+ <div class="labels"></div>
465
+ <div class="row collapse"><div class="detail-description">
466
+ <p class="long_description"></p>
467
+ <table class="table table-bordered"><tr>
468
+ <th>since</th>
469
+ <td>2.11</td>
470
+ </tr></table>
471
+ <h3>Parameters</h3>
472
+ <div class="subelement argument">
473
+ <h4>$maybe_empty</h4>
474
+ <code>bool</code><p>Whether the post should be considered "empty".</p>
475
+ </div>
476
+ <div class="subelement argument">
477
+ <h4>$postarr</h4>
478
+ <code>array</code><p>Array of post data.</p></div>
479
+ </div></div>
480
+ </div>
481
+ <a name="wpml_media_create_duplicate_attachment" id="wpml_media_create_duplicate_attachment"></a><div class="element clickable method public wpml_media_create_duplicate_attachment" data-toggle="collapse" data-target=".wpml_media_create_duplicate_attachment .collapse">
482
+ <h2>Copies taxonomy terms from the source item to the new translated item</h2>
483
+ <pre>wpml_media_create_duplicate_attachment(integer $attachment_id, integer $duplicated_attachment_id) </pre>
484
+ <div class="labels"></div>
485
+ <div class="row collapse"><div class="detail-description">
486
+ <p class="long_description"></p>
487
+ <table class="table table-bordered"><tr>
488
+ <th>since</th>
489
+ <td>2.11</td>
490
+ </tr></table>
491
+ <h3>Parameters</h3>
492
+ <div class="subelement argument">
493
+ <h4>$attachment_id</h4>
494
+ <code>integer</code><p>ID of the source item</p></div>
495
+ <div class="subelement argument">
496
+ <h4>$duplicated_attachment_id</h4>
497
+ <code>integer</code><p>ID of the new item</p></div>
498
+ </div></div>
499
+ </div>
500
+ <a name="_add_relevant_term" id="_add_relevant_term"></a><div class="element clickable method private _add_relevant_term" data-toggle="collapse" data-target="._add_relevant_term .collapse">
501
+ <h2>Adds a term and its translations to $relevant_terms</h2>
502
+ <pre>_add_relevant_term(object $term, object $translations) </pre>
503
+ <div class="labels"></div>
504
+ <div class="row collapse"><div class="detail-description">
505
+ <p class="long_description"></p>
506
+ <table class="table table-bordered">
507
+ <tr>
508
+ <th>since</th>
509
+ <td>2.11</td>
510
+ </tr>
511
+ <tr>
512
+ <th>uses</th>
513
+ <td>\global\MLA_WPML::$relevant_terms</td>
514
+ </tr>
515
+ </table>
516
+ <h3>Parameters</h3>
517
+ <div class="subelement argument">
518
+ <h4>$term</h4>
519
+ <code>object</code><p>WordPress term object</p></div>
520
+ <div class="subelement argument">
521
+ <h4>$translations</h4>
522
+ <code>object</code><p>Sitepress translations object; optional</p></div>
523
+ </div></div>
524
+ </div>
525
+ <a name="_apply_synch_input" id="_apply_synch_input"></a><div class="element clickable method private _apply_synch_input" data-toggle="collapse" data-target="._apply_synch_input .collapse">
526
+ <h2>Compute Term Synchronization replacement $tax_inputs</h2>
527
+ <pre>_apply_synch_input(string $language, array $terms_before) : array</pre>
528
+ <div class="labels"></div>
529
+ <div class="row collapse"><div class="detail-description">
530
+ <p class="long_description"><p>Assumes the "current post" in $existing_terms is the source
531
+ and $existing_terms contains the target translation</p></p>
532
+ <table class="table table-bordered">
533
+ <tr>
534
+ <th>since</th>
535
+ <td>2.11</td>
536
+ </tr>
537
+ <tr>
538
+ <th>uses</th>
539
+ <td>\global\MLA_WPML::$existing_terms</td>
540
+ </tr>
541
+ </table>
542
+ <h3>Parameters</h3>
543
+ <div class="subelement argument">
544
+ <h4>$language</h4>
545
+ <code>string</code><p>the target translation code</p></div>
546
+ <div class="subelement argument">
547
+ <h4>$terms_before</h4>
548
+ <code>array</code><p>source terms before updates/Term Assignment</p>
549
+ </div>
550
+ <h3>Returns</h3>
551
+ <div class="subelement response">
552
+ <code>array</code>$tax_inputs for Term Synchronization</div>
553
+ </div></div>
554
+ </div>
555
+ <a name="_apply_tax_input" id="_apply_tax_input"></a><div class="element clickable method private _apply_tax_input" data-toggle="collapse" data-target="._apply_tax_input .collapse">
556
+ <h2>Filter the $tax_input array to a specific language</h2>
557
+ <pre>_apply_tax_input(integer $post_id, string $post_language) : array</pre>
558
+ <div class="labels"></div>
559
+ <div class="row collapse"><div class="detail-description">
560
+ <p class="long_description"></p>
561
+ <table class="table table-bordered">
562
+ <tr>
563
+ <th>since</th>
564
+ <td>2.11</td>
565
+ </tr>
566
+ <tr>
567
+ <th>uses</th>
568
+ <td>\global\MLA_WPML::$tax_input</td>
569
+ </tr>
570
+ <tr>
571
+ <th>uses</th>
572
+ <td>\global\MLA_WPML::$existing_terms</td>
573
+ </tr>
574
+ </table>
575
+ <h3>Parameters</h3>
576
+ <div class="subelement argument">
577
+ <h4>$post_id</h4>
578
+ <code>integer</code><p>ID of the post to be updated</p></div>
579
+ <div class="subelement argument">
580
+ <h4>$post_language</h4>
581
+ <code>string</code><p>explicit language_code; optional</p></div>
582
+ <h3>Returns</h3>
583
+ <div class="subelement response">
584
+ <code>array</code>language-specific $tax_inputs</div>
585
+ </div></div>
586
+ </div>
587
+ <a name="_build_existing_terms" id="_build_existing_terms"></a><div class="element clickable method private _build_existing_terms" data-toggle="collapse" data-target="._build_existing_terms .collapse">
588
+ <h2>Build the $existing_terms array</h2>
589
+ <pre>_build_existing_terms(integer $post_id) </pre>
590
+ <div class="labels"></div>
591
+ <div class="row collapse"><div class="detail-description">
592
+ <p class="long_description"><p>Takes each translatable taxonomy and builds an array of
593
+ language-specific term_id to term_id/term_name mappings
594
+ for terms already assigned to the item translation.</p></p>
595
+ <table class="table table-bordered">
596
+ <tr>
597
+ <th>since</th>
598
+ <td>2.11</td>
599
+ </tr>
600
+ <tr>
601
+ <th>uses</th>
602
+ <td>\global\MLA_WPML::$existing_terms</td>
603
+ </tr>
604
+ <tr>
605
+ <th>uses</th>
606
+ <td>\global\MLA_WPML::$relevant_terms</td>
607
+ </tr>
608
+ </table>
609
+ <h3>Parameters</h3>
610
+ <div class="subelement argument">
611
+ <h4>$post_id</h4>
612
+ <code>integer</code><p>ID of the current post</p></div>
613
+ </div></div>
614
+ </div>
615
+ <a name="_build_tax_input" id="_build_tax_input"></a><div class="element clickable method private _build_tax_input" data-toggle="collapse" data-target="._build_tax_input .collapse">
616
+ <h2>Build the $tax_input array</h2>
617
+ <pre>_build_tax_input(integer $post_id, array $tax_inputs, array $tax_actions) </pre>
618
+ <div class="labels"></div>
619
+ <div class="row collapse"><div class="detail-description">
620
+ <p class="long_description"><p>Takes each term from the $tax_inputs parameter and builds an array of
621
+ language-specific term_id to term_id/term_name mappings for all languages.</p></p>
622
+ <table class="table table-bordered">
623
+ <tr>
624
+ <th>since</th>
625
+ <td>2.11</td>
626
+ </tr>
627
+ <tr>
628
+ <th>uses</th>
629
+ <td>\global\MLA_WPML::$tax_input</td>
630
+ </tr>
631
+ <tr>
632
+ <th>uses</th>
633
+ <td>\global\MLA_WPML::$existing_terms</td>
634
+ </tr>
635
+ </table>
636
+ <h3>Parameters</h3>
637
+ <div class="subelement argument">
638
+ <h4>$post_id</h4>
639
+ <code>integer</code><p>ID of the current post</p></div>
640
+ <div class="subelement argument">
641
+ <h4>$tax_inputs</h4>
642
+ <code>array</code><p>'tax_input' request parameter</p>
643
+ </div>
644
+ <div class="subelement argument">
645
+ <h4>$tax_actions</h4>
646
+ <code>array</code><p>'tax_action' request parameter</p>
647
+ </div>
648
+ </div></div>
649
+ </div>
650
+ <a name="_get_relevant_term" id="_get_relevant_term"></a><div class="element clickable method private _get_relevant_term" data-toggle="collapse" data-target="._get_relevant_term .collapse">
651
+ <h2>Finds a $relevant_term (if defined) given a key and (optional) a language</h2>
652
+ <pre>_get_relevant_term(string $field, mixed $value, string $taxonomy, string $language) </pre>
653
+ <div class="labels"></div>
654
+ <div class="row collapse"><div class="detail-description">
655
+ <p class="long_description"></p>
656
+ <table class="table table-bordered">
657
+ <tr>
658
+ <th>since</th>
659
+ <td>2.11</td>
660
+ </tr>
661
+ <tr>
662
+ <th>uses</th>
663
+ <td>\global\MLA_WPML::$relevant_terms</td>
664
+ </tr>
665
+ </table>
666
+ <h3>Parameters</h3>
667
+ <div class="subelement argument">
668
+ <h4>$field</h4>
669
+ <code>string</code><p>to search in; 'id', 'name', or 'term_taxonomy_id'</p>
670
+ </div>
671
+ <div class="subelement argument">
672
+ <h4>$value</h4>
673
+ <code>mixed</code><p>to search for; integer, string or integer</p></div>
674
+ <div class="subelement argument">
675
+ <h4>$taxonomy</h4>
676
+ <code>string</code><p>to search in; slug</p></div>
677
+ <div class="subelement argument">
678
+ <h4>$language</h4>
679
+ <code>string</code><p>code; string; optional</p></div>
680
+ </div></div>
681
+ </div>
682
+ <a name="_reset_language_settings" id="_reset_language_settings"></a><div class="element clickable method private _reset_language_settings" data-toggle="collapse" data-target="._reset_language_settings .collapse">
683
+ <h2>Delete saved settings, restoring default values</h2>
684
+ <pre>_reset_language_settings() : array</pre>
685
+ <div class="labels"></div>
686
+ <div class="row collapse"><div class="detail-description">
687
+ <p class="long_description"></p>
688
+ <table class="table table-bordered"><tr>
689
+ <th>since</th>
690
+ <td>2.11</td>
691
+ </tr></table>
692
+ <h3>Returns</h3>
693
+ <div class="subelement response">
694
+ <code>array</code>Message(s) reflecting the results of the operation</div>
695
+ </div></div>
696
+ </div>
697
+ <a name="_save_language_settings" id="_save_language_settings"></a><div class="element clickable method private _save_language_settings" data-toggle="collapse" data-target="._save_language_settings .collapse">
698
+ <h2>Save Language settings to the options table</h2>
699
+ <pre>_save_language_settings() : array</pre>
700
+ <div class="labels"></div>
701
+ <div class="row collapse"><div class="detail-description">
702
+ <p class="long_description"></p>
703
+ <table class="table table-bordered">
704
+ <tr>
705
+ <th>since</th>
706
+ <td>2.11</td>
707
+ </tr>
708
+ <tr>
709
+ <th>uses</th>
710
+ <td>\global\$_REQUEST</td>
711
+ </tr>
712
+ </table>
713
+ <h3>Returns</h3>
714
+ <div class="subelement response">
715
+ <code>array</code>Message(s) reflecting the results of the operation</div>
716
+ </div></div>
717
+ </div>
718
+ <a name="_update_existing_terms" id="_update_existing_terms"></a><div class="element clickable method private _update_existing_terms" data-toggle="collapse" data-target="._update_existing_terms .collapse">
719
+ <h2>Update the $existing_terms array</h2>
720
+ <pre>_update_existing_terms(integer $post_id) : array</pre>
721
+ <div class="labels"></div>
722
+ <div class="row collapse"><div class="detail-description">
723
+ <p class="long_description"><p>Takes each translatable taxonomy and rebuilds the array of
724
+ language-specific term_id to term_id/term_name mappings
725
+ for the "current translation" represented by the $post_id.</p></p>
726
+ <table class="table table-bordered">
727
+ <tr>
728
+ <th>since</th>
729
+ <td>2.11</td>
730
+ </tr>
731
+ <tr>
732
+ <th>uses</th>
733
+ <td>\global\MLA_WPML::$existing_terms</td>
734
+ </tr>
735
+ <tr>
736
+ <th>uses</th>
737
+ <td>\global\MLA_WPML::$relevant_terms</td>
738
+ </tr>
739
+ </table>
740
+ <h3>Parameters</h3>
741
+ <div class="subelement argument">
742
+ <h4>$post_id</h4>
743
+ <code>integer</code><p>ID of the current post</p></div>
744
+ <h3>Returns</h3>
745
+ <div class="subelement response">
746
+ <code>array</code>( taxonomy => term assignments ) before the update</div>
747
+ </div></div>
748
+ </div>
749
+ <h3>
750
+ <i class="icon-custom icon-property"></i> Properties</h3>
751
+ <a name="%24mla_language_option_definitions" id="$mla_language_option_definitions"> </a><div class="element clickable property public $mla_language_option_definitions" data-toggle="collapse" data-target=".$mla_language_option_definitions .collapse">
752
+ <h2>$mla_language_option_definitions defines the language-specific database options and
753
+ admin page areas for setting/updating them</h2>
754
+ <pre>$mla_language_option_definitions </pre>
755
+ <div class="labels"></div>
756
+ <div class="row collapse"><div class="detail-description"><p class="long_description"><p>The array must be populated at runtime in MLA_WPML::mla_localize_language_option_definitions(),
757
+ because localization calls cannot be placed in the "public static" array definition itself.</p>
758
+
759
+ <p>Each option is defined by an array with the elements documented in class-mla-options.php</p></p></div></div>
760
+ </div>
761
+ <a name="%24all_query_parameters" id="$all_query_parameters"> </a><div class="element clickable property private $all_query_parameters" data-toggle="collapse" data-target=".$all_query_parameters .collapse">
762
+ <h2>Save the query arguments</h2>
763
+ <pre>$all_query_parameters : array</pre>
764
+ <div class="labels"></div>
765
+ <div class="row collapse"><div class="detail-description">
766
+ <p class="long_description"></p>
767
+ <table class="table table-bordered"><tr>
768
+ <th>since</th>
769
+ <td>2.11</td>
770
+ </tr></table>
771
+ </div></div>
772
+ </div>
773
+ <a name="%24duplicate_attachments" id="$duplicate_attachments"> </a><div class="element clickable property private $duplicate_attachments" data-toggle="collapse" data-target=".$duplicate_attachments .collapse">
774
+ <h2>Duplicates created during media upload</h2>
775
+ <pre>$duplicate_attachments : array</pre>
776
+ <div class="labels"></div>
777
+ <div class="row collapse"><div class="detail-description">
778
+ <p class="long_description"></p>
779
+ <table class="table table-bordered"><tr>
780
+ <th>since</th>
781
+ <td>2.11</td>
782
+ </tr></table>
783
+ </div></div>
784
+ </div>
785
+ <a name="%24existing_terms" id="$existing_terms"> </a><div class="element clickable property private $existing_terms" data-toggle="collapse" data-target=".$existing_terms .collapse">
786
+ <h2>Taxonomy terms for the current item translation in the database</h2>
787
+ <pre>$existing_terms : array</pre>
788
+ <div class="labels"></div>
789
+ <div class="row collapse"><div class="detail-description">
790
+ <p class="long_description"></p>
791
+ <table class="table table-bordered"><tr>
792
+ <th>since</th>
793
+ <td>2.11</td>
794
+ </tr></table>
795
+ </div></div>
796
+ </div>
797
+ <a name="%24relevant_terms" id="$relevant_terms"> </a><div class="element clickable property private $relevant_terms" data-toggle="collapse" data-target=".$relevant_terms .collapse">
798
+ <h2>Taxonomy terms and translations</h2>
799
+ <pre>$relevant_terms : array</pre>
800
+ <div class="labels"></div>
801
+ <div class="row collapse"><div class="detail-description">
802
+ <p class="long_description"></p>
803
+ <table class="table table-bordered"><tr>
804
+ <th>since</th>
805
+ <td>2.11</td>
806
+ </tr></table>
807
+ </div></div>
808
+ </div>
809
+ <a name="%24tax_input" id="$tax_input"> </a><div class="element clickable property private $tax_input" data-toggle="collapse" data-target=".$tax_input .collapse">
810
+ <h2>Replacement tax_input values in all languages</h2>
811
+ <pre>$tax_input : array</pre>
812
+ <div class="labels"></div>
813
+ <div class="row collapse"><div class="detail-description">
814
+ <p class="long_description"></p>
815
+ <table class="table table-bordered"><tr>
816
+ <th>since</th>
817
+ <td>2.11</td>
818
+ </tr></table>
819
+ </div></div>
820
+ </div>
821
+ <a name="%24upload_bulk_edit_args" id="$upload_bulk_edit_args"> </a><div class="element clickable property private $upload_bulk_edit_args" data-toggle="collapse" data-target=".$upload_bulk_edit_args .collapse">
822
+ <h2>Bulk Edit parameters during "Upload New Media"</h2>
823
+ <pre>$upload_bulk_edit_args : array</pre>
824
+ <div class="labels"></div>
825
+ <div class="row collapse"><div class="detail-description">
826
+ <p class="long_description"></p>
827
+ <table class="table table-bordered"><tr>
828
+ <th>since</th>
829
+ <td>2.11</td>
830
+ </tr></table>
831
+ </div></div>
832
+ </div>
833
+ <a name="%24upload_bulk_edit_map" id="$upload_bulk_edit_map"> </a><div class="element clickable property private $upload_bulk_edit_map" data-toggle="collapse" data-target=".$upload_bulk_edit_map .collapse">
834
+ <h2>Custom Field Map during "Upload New Media"</h2>
835
+ <pre>$upload_bulk_edit_map : array</pre>
836
+ <div class="labels"></div>
837
+ <div class="row collapse"><div class="detail-description">
838
+ <p class="long_description"></p>
839
+ <table class="table table-bordered"><tr>
840
+ <th>since</th>
841
+ <td>2.11</td>
842
+ </tr></table>
843
+ </div></div>
844
+ </div>
845
+ </div>
846
+ </div>
847
+ </div>
848
+ </div>
849
+ <div class="row"><footer class="span12">
850
+ Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
851
+ Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
852
+ generated on 2015-06-06T19:41:36-07:00.<br></footer></div>
853
+ </div>
854
+ </body>
855
+ </html>
phpDocs/classes/MLA_WPML_List_Table.html ADDED
@@ -0,0 +1,1529 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html><html xmlns:date="http://exslt.org/dates-and-times" lang="en">
2
+ <head>
3
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4
+ <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
5
+ <meta charset="utf-8">
6
+ <title>Media Library Assistant » \MLA_WPML_List_Table</title>
7
+ <meta name="author" content="Mike van Riel">
8
+ <meta name="description" content="">
9
+ <link href="../css/template.css" rel="stylesheet" media="all">
10
+ <script src="../js/jquery-1.7.1.min.js" type="text/javascript"></script><script src="../js/jquery-ui-1.8.2.custom.min.js" type="text/javascript"></script><script src="../js/jquery.mousewheel.min.js" type="text/javascript"></script><script src="../js/bootstrap.js" type="text/javascript"></script><script src="../js/template.js" type="text/javascript"></script><script src="../js/prettify/prettify.min.js" type="text/javascript"></script><link rel="shortcut icon" href="../img/favicon.ico">
11
+ <link rel="apple-touch-icon" href="../img/apple-touch-icon.png">
12
+ <link rel="apple-touch-icon" sizes="72x72" href="../img/apple-touch-icon-72x72.png">
13
+ <link rel="apple-touch-icon" sizes="114x114" href="../img/apple-touch-icon-114x114.png">
14
+ </head>
15
+ <body>
16
+ <div class="navbar navbar-fixed-top">
17
+ <div class="navbar-inner"><div class="container">
18
+ <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></a><a class="brand" href="../index.html">Media Library Assistant</a><div class="nav-collapse"><ul class="nav">
19
+ <li class="dropdown">
20
+ <a href="#api" class="dropdown-toggle" data-toggle="dropdown">
21
+ API Documentation <b class="caret"></b></a><ul class="dropdown-menu">
22
+ <li><a>Packages</a></li>
23
+ <li><a href="../packages/Media%20Library%20Assistant.html"><i class="icon-folder-open"></i> Media Library Assistant</a></li>
24
+ </ul>
25
+ </li>
26
+ <li class="dropdown" id="charts-menu">
27
+ <a href="#charts" class="dropdown-toggle" data-toggle="dropdown">
28
+ Charts <b class="caret"></b></a><ul class="dropdown-menu"><li><a href="../graph_class.html"><i class="icon-list-alt"></i> Class hierarchy diagram</a></li></ul>
29
+ </li>
30
+ <li class="dropdown" id="reports-menu">
31
+ <a href="#reports" class="dropdown-toggle" data-toggle="dropdown">
32
+ Reports <b class="caret"></b></a><ul class="dropdown-menu">
33
+ <li><a href="../errors.html"><i class="icon-remove-sign"></i> Errors 
34
+ <span class="label label-info">0</span></a></li>
35
+ <li><a href="../markers.html"><i class="icon-map-marker"></i> Markers 
36
+ <ul><li>todo 
37
+ <span class="label label-info">1</span>
38
+ </li></ul></a></li>
39
+ <li><a href="../deprecated.html"><i class="icon-stop"></i> Deprecated elements 
40
+ <span class="label label-info">0</span></a></li>
41
+ </ul>
42
+ </li>
43
+ </ul></div>
44
+ </div></div>
45
+ <div class="go_to_top"><a href="#___" style="color: inherit">Back to top  <i class="icon-upload icon-white"></i></a></div>
46
+ </div>
47
+ <div id="___" class="container">
48
+ <noscript><div class="alert alert-warning">
49
+ Javascript is disabled; several features are only available
50
+ if Javascript is enabled.
51
+ </div></noscript>
52
+ <div class="row">
53
+ <div class="span4">
54
+ <span class="btn-group visibility" data-toggle="buttons-checkbox"><button class="btn public active" title="Show public elements">Public</button><button class="btn protected" title="Show protected elements">Protected</button><button class="btn private" title="Show private elements">Private</button><button class="btn inherited active" title="Show inherited elements">Inherited</button></span><div class="btn-group view pull-right" data-toggle="buttons-radio">
55
+ <button class="btn details" title="Show descriptions and method names"><i class="icon-list"></i></button><button class="btn simple" title="Show only method names"><i class="icon-align-justify"></i></button>
56
+ </div>
57
+ <ul class="side-nav nav nav-list">
58
+ <li class="nav-header">
59
+ <i class="icon-custom icon-method"></i> Methods</li>
60
+ <li class="method public inherited"><a href="#__construct" title="__construct :: Initializes some properties from $_REQUEST variables, then
61
+ calls the parent constructor to set some default configs."><span class="description">Initializes some properties from $_REQUEST variables, then
62
+ calls the parent constructor to set some default configs.</span><pre>__construct()</pre></a></li>
63
+ <li class="method public inherited"><a href="#column_ID_parent" title="column_ID_parent :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_ID_parent()</pre></a></li>
64
+ <li class="method public inherited"><a href="#column_alt_text" title="column_alt_text :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_alt_text()</pre></a></li>
65
+ <li class="method public inherited"><a href="#column_attached_to" title="column_attached_to :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_attached_to()</pre></a></li>
66
+ <li class="method public inherited"><a href="#column_author" title="column_author :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_author()</pre></a></li>
67
+ <li class="method public inherited"><a href="#column_base_file" title="column_base_file :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_base_file()</pre></a></li>
68
+ <li class="method public inherited"><a href="#column_caption" title="column_caption :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_caption()</pre></a></li>
69
+ <li class="method public inherited"><a href="#column_cb" title="column_cb :: Displays checkboxes for using bulk actions."><span class="description">Displays checkboxes for using bulk actions.</span><pre>column_cb()</pre></a></li>
70
+ <li class="method public inherited"><a href="#column_date" title="column_date :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_date()</pre></a></li>
71
+ <li class="method public inherited"><a href="#column_default" title="column_default :: Supply a column value if no column-specific function has been defined"><span class="description">Supply a column value if no column-specific function has been defined</span><pre>column_default()</pre></a></li>
72
+ <li class="method public inherited"><a href="#column_description" title="column_description :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_description()</pre></a></li>
73
+ <li class="method public inherited"><a href="#column_featured" title="column_featured :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_featured()</pre></a></li>
74
+ <li class="method public inherited"><a href="#column_file_url" title="column_file_url :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_file_url()</pre></a></li>
75
+ <li class="method public inherited"><a href="#column_galleries" title="column_galleries :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_galleries()</pre></a></li>
76
+ <li class="method public inherited"><a href="#column_icon" title="column_icon :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_icon()</pre></a></li>
77
+ <li class="method public inherited"><a href="#column_inserted" title="column_inserted :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_inserted()</pre></a></li>
78
+ <li class="method public inherited"><a href="#column_menu_order" title="column_menu_order :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_menu_order()</pre></a></li>
79
+ <li class="method public inherited"><a href="#column_mla_galleries" title="column_mla_galleries :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_mla_galleries()</pre></a></li>
80
+ <li class="method public inherited"><a href="#column_modified" title="column_modified :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_modified()</pre></a></li>
81
+ <li class="method public inherited"><a href="#column_parent" title="column_parent :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_parent()</pre></a></li>
82
+ <li class="method public inherited"><a href="#column_post_mime_type" title="column_post_mime_type :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_post_mime_type()</pre></a></li>
83
+ <li class="method public inherited"><a href="#column_post_name" title="column_post_name :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_post_name()</pre></a></li>
84
+ <li class="method public inherited"><a href="#column_post_title" title="column_post_title :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_post_title()</pre></a></li>
85
+ <li class="method public inherited"><a href="#column_title_name" title="column_title_name :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_title_name()</pre></a></li>
86
+ <li class="method public inherited"><a href="#extra_tablenav" title="extra_tablenav :: Extra controls to be displayed between bulk actions and pagination"><span class="description">Extra controls to be displayed between bulk actions and pagination</span><pre>extra_tablenav()</pre></a></li>
87
+ <li class="method public inherited"><a href="#get_bulk_actions" title="get_bulk_actions :: Get an associative array ( option_name =&gt; option_title ) with the list
88
+ of bulk actions available on this table."><span class="description">Get an associative array ( option_name =&gt; option_title ) with the list
89
+ of bulk actions available on this table.</span><pre>get_bulk_actions()</pre></a></li>
90
+ <li class="method public inherited"><a href="#get_columns" title="get_columns :: This method dictates the table's columns and titles"><span class="description">This method dictates the table's columns and titles</span><pre>get_columns()</pre></a></li>
91
+ <li class="method public inherited"><a href="#get_hidden_columns" title="get_hidden_columns :: Returns the list of currently hidden columns from a user option or
92
+ from default values if the option is not set"><span class="description">Returns the list of currently hidden columns from a user option or
93
+ from default values if the option is not set</span><pre>get_hidden_columns()</pre></a></li>
94
+ <li class="method public inherited"><a href="#get_sortable_columns" title="get_sortable_columns :: Returns an array where the key is the column that needs to be sortable
95
+ and the value is db column (or other criteria) to sort by."><span class="description">Returns an array where the key is the column that needs to be sortable
96
+ and the value is db column (or other criteria) to sort by.</span><pre>get_sortable_columns()</pre></a></li>
97
+ <li class="method public inherited"><a href="#get_views" title="get_views :: Returns an associative array listing all the views that can be used with this table."><span class="description">Returns an associative array listing all the views that can be used with this table.</span><pre>get_views()</pre></a></li>
98
+ <li class="method public inherited"><a href="#mla_admin_init_action" title="mla_admin_init_action :: Adds support for taxonomy and custom field columns"><span class="description">Adds support for taxonomy and custom field columns</span><pre>mla_admin_init_action()</pre></a></li>
99
+ <li class="method public inherited"><a href="#mla_get_sortable_columns" title="mla_get_sortable_columns :: Return the names and display values of the sortable columns"><span class="description">Return the names and display values of the sortable columns</span><pre>mla_get_sortable_columns()</pre></a></li>
100
+ <li class="method public inherited"><a href="#mla_get_taxonomy_filter_dropdown" title="mla_get_taxonomy_filter_dropdown :: Get dropdown box of terms to filter by, if available"><span class="description">Get dropdown box of terms to filter by, if available</span><pre>mla_get_taxonomy_filter_dropdown()</pre></a></li>
101
+ <li class="method public inherited"><a href="#mla_get_view" title="mla_get_view :: Wrapper for _get_view; returns HTML markup for one view that can be used with this table"><span class="description">Wrapper for _get_view; returns HTML markup for one view that can be used with this table</span><pre>mla_get_view()</pre></a></li>
102
+ <li class="method public inherited"><a href="#mla_localize_default_columns_array" title="mla_localize_default_columns_array :: Builds the $default_columns array with translated source texts."><span class="description">Builds the $default_columns array with translated source texts.</span><pre>mla_localize_default_columns_array()</pre></a></li>
103
+ <li class="method public inherited"><a href="#mla_manage_columns_filter" title="mla_manage_columns_filter :: Handler for filter 'manage_media_page_mla-menu_columns'"><span class="description">Handler for filter 'manage_media_page_mla-menu_columns'</span><pre>mla_manage_columns_filter()</pre></a></li>
104
+ <li class="method public inherited"><a href="#mla_manage_hidden_columns_filter" title="mla_manage_hidden_columns_filter :: Handler for filter 'get_user_option_managemedia_page_mla-menucolumnshidden'"><span class="description">Handler for filter 'get_user_option_managemedia_page_mla-menucolumnshidden'</span><pre>mla_manage_hidden_columns_filter()</pre></a></li>
105
+ <li class="method public inherited"><a href="#mla_submenu_arguments" title="mla_submenu_arguments :: Process $_REQUEST, building $submenu_arguments"><span class="description">Process $_REQUEST, building $submenu_arguments</span><pre>mla_submenu_arguments()</pre></a></li>
106
+ <li class="method public inherited"><a href="#pagination" title="pagination :: Display the pagination, adding view, search and filter arguments"><span class="description">Display the pagination, adding view, search and filter arguments</span><pre>pagination()</pre></a></li>
107
+ <li class="method public inherited"><a href="#prepare_items" title="prepare_items :: Prepares the list of items for displaying"><span class="description">Prepares the list of items for displaying</span><pre>prepare_items()</pre></a></li>
108
+ <li class="method public inherited"><a href="#print_column_headers" title="print_column_headers :: Print column headers, adding view, search and filter arguments"><span class="description">Print column headers, adding view, search and filter arguments</span><pre>print_column_headers()</pre></a></li>
109
+ <li class="method public inherited"><a href="#single_row" title="single_row :: Generates (echoes) content for a single row of the table"><span class="description">Generates (echoes) content for a single row of the table</span><pre>single_row()</pre></a></li>
110
+ <li class="nav-header protected">» Protected</li>
111
+ <li class="method protected inherited"><a href="#_avail_mime_types" title="_avail_mime_types :: Get MIME types with one or more attachments for view preparation"><span class="description">Get MIME types with one or more attachments for view preparation</span><pre>_avail_mime_types()</pre></a></li>
112
+ <li class="method protected inherited"><a href="#_build_inline_data" title="_build_inline_data :: Add hidden fields with the data for use in the inline editor"><span class="description">Add hidden fields with the data for use in the inline editor</span><pre>_build_inline_data()</pre></a></li>
113
+ <li class="method protected inherited"><a href="#_build_rollover_actions" title="_build_rollover_actions :: Add rollover actions to exactly one of the following displayed columns:
114
+ 'ID_parent', 'title_name', 'post_title', 'post_name'"><span class="description">Add rollover actions to exactly one of the following displayed columns:
115
+ 'ID_parent', 'title_name', 'post_title', 'post_name'</span><pre>_build_rollover_actions()</pre></a></li>
116
+ <li class="method protected inherited"><a href="#_format_post_status" title="_format_post_status :: Translate post_status 'future', 'pending', 'draft' and 'trash' to label"><span class="description">Translate post_status 'future', 'pending', 'draft' and 'trash' to label</span><pre>_format_post_status()</pre></a></li>
117
+ <li class="nav-header private">» Private</li>
118
+ <li class="method private inherited"><a href="#_get_view" title="_get_view :: Returns HTML markup for one view that can be used with this table"><span class="description">Returns HTML markup for one view that can be used with this table</span><pre>_get_view()</pre></a></li>
119
+ <li class="nav-header">
120
+ <i class="icon-custom icon-property"></i> Properties</li>
121
+ <li class="nav-header protected">» Protected</li>
122
+ <li class="property protected inherited"><a href="#%24currently_hidden" title="$currently_hidden :: Currently hidden columns"><span class="description">Currently hidden columns</span><pre>$currently_hidden</pre></a></li>
123
+ <li class="property protected inherited"><a href="#%24default_columns" title="$default_columns :: Table column definitions"><span class="description">Table column definitions</span><pre>$default_columns</pre></a></li>
124
+ <li class="property protected inherited"><a href="#%24default_hidden_columns" title="$default_hidden_columns :: Default values for hidden columns"><span class="description">Default values for hidden columns</span><pre>$default_hidden_columns</pre></a></li>
125
+ <li class="property protected inherited"><a href="#%24default_sortable_columns" title="$default_sortable_columns :: Sortable column definitions"><span class="description">Sortable column definitions</span><pre>$default_sortable_columns</pre></a></li>
126
+ <li class="property protected "><a href="#%24mla_wpml_table" title="$mla_wpml_table :: The MLA_WPML_Table support object"><span class="description">The MLA_WPML_Table support object</span><pre>$mla_wpml_table</pre></a></li>
127
+ <li class="property protected inherited"><a href="#%24rollover_id" title="$rollover_id :: Records assignment of row-level actions to a table row"><span class="description">Records assignment of row-level actions to a table row</span><pre>$rollover_id</pre></a></li>
128
+ <li class="nav-header private">» Private</li>
129
+ <li class="property private inherited"><a href="#%24attached" title='$attached :: True if the current view is "Attached"'><span class="description">True if the current view is "Attached"</span><pre>$attached</pre></a></li>
130
+ <li class="property private inherited"><a href="#%24detached" title='$detached :: True if the current view is "Unattached"'><span class="description">True if the current view is "Unattached"</span><pre>$detached</pre></a></li>
131
+ <li class="property private inherited"><a href="#%24is_trash" title='$is_trash :: True if the current view is "Trash"'><span class="description">True if the current view is "Trash"</span><pre>$is_trash</pre></a></li>
132
+ </ul>
133
+ </div>
134
+ <div class="span8">
135
+ <a name="%5CMLA_WPML_List_Table" id="\MLA_WPML_List_Table"></a><ul class="breadcrumb">
136
+ <li>
137
+ <a href="../index.html"><i class="icon-custom icon-class"></i></a><span class="divider">\</span>
138
+ </li>
139
+ <li><a href="../namespaces/global.html">global</a></li>
140
+ <li class="active">
141
+ <span class="divider">\</span><a href="../classes/MLA_WPML_List_Table.html">MLA_WPML_List_Table</a>
142
+ </li>
143
+ </ul>
144
+ <div href="../classes/MLA_WPML_List_Table.html" class="element class">
145
+ <p class="short_description">Class MLA (Media Library Assistant) WPML List Table adds a reference to an MLA_WPML object</p>
146
+ <div class="details">
147
+ <p class="long_description"><p>Extends the MLA_List_Table class.</p></p>
148
+ <table class="table table-bordered">
149
+ <tr>
150
+ <th>package</th>
151
+ <td><a href="../packages/Media%20Library%20Assistant.html">Media Library Assistant</a></td>
152
+ </tr>
153
+ <tr>
154
+ <th>since</th>
155
+ <td>2.11</td>
156
+ </tr>
157
+ </table>
158
+ <h3>
159
+ <i class="icon-custom icon-method"></i> Methods</h3>
160
+ <a name="__construct" id="__construct"></a><div class="element clickable method public __construct" data-toggle="collapse" data-target=".__construct .collapse">
161
+ <h2>Initializes some properties from $_REQUEST variables, then
162
+ calls the parent constructor to set some default configs.</h2>
163
+ <pre>__construct() : void</pre>
164
+ <div class="labels"><span class="label">Inherited</span></div>
165
+ <div class="row collapse"><div class="detail-description">
166
+ <p class="long_description"></p>
167
+ <table class="table table-bordered">
168
+ <tr>
169
+ <th>since</th>
170
+ <td>0.1</td>
171
+ </tr>
172
+ <tr>
173
+ <th>inherited_from</th>
174
+ <td>\MLA_List_Table::__construct()</td>
175
+ </tr>
176
+ </table>
177
+ </div></div>
178
+ </div>
179
+ <a name="column_ID_parent" id="column_ID_parent"></a><div class="element clickable method public column_ID_parent" data-toggle="collapse" data-target=".column_ID_parent .collapse">
180
+ <h2>Supply the content for a custom column</h2>
181
+ <pre>column_ID_parent(array $item) : string</pre>
182
+ <div class="labels"><span class="label">Inherited</span></div>
183
+ <div class="row collapse"><div class="detail-description">
184
+ <p class="long_description"></p>
185
+ <table class="table table-bordered">
186
+ <tr>
187
+ <th>since</th>
188
+ <td>0.1</td>
189
+ </tr>
190
+ <tr>
191
+ <th>inherited_from</th>
192
+ <td>\MLA_List_Table::column_ID_parent()</td>
193
+ </tr>
194
+ </table>
195
+ <h3>Parameters</h3>
196
+ <div class="subelement argument">
197
+ <h4>$item</h4>
198
+ <code>array</code><p>A singular attachment (post) object</p>
199
+ </div>
200
+ <h3>Returns</h3>
201
+ <div class="subelement response">
202
+ <code>string</code>HTML markup to be placed inside the column</div>
203
+ </div></div>
204
+ </div>
205
+ <a name="column_alt_text" id="column_alt_text"></a><div class="element clickable method public column_alt_text" data-toggle="collapse" data-target=".column_alt_text .collapse">
206
+ <h2>Supply the content for a custom column</h2>
207
+ <pre>column_alt_text(array $item) : string</pre>
208
+ <div class="labels"><span class="label">Inherited</span></div>
209
+ <div class="row collapse"><div class="detail-description">
210
+ <p class="long_description"></p>
211
+ <table class="table table-bordered">
212
+ <tr>
213
+ <th>since</th>
214
+ <td>0.1</td>
215
+ </tr>
216
+ <tr>
217
+ <th>inherited_from</th>
218
+ <td>\MLA_List_Table::column_alt_text()</td>
219
+ </tr>
220
+ </table>
221
+ <h3>Parameters</h3>
222
+ <div class="subelement argument">
223
+ <h4>$item</h4>
224
+ <code>array</code><p>A singular attachment (post) object</p>
225
+ </div>
226
+ <h3>Returns</h3>
227
+ <div class="subelement response">
228
+ <code>string</code>HTML markup to be placed inside the column</div>
229
+ </div></div>
230
+ </div>
231
+ <a name="column_attached_to" id="column_attached_to"></a><div class="element clickable method public column_attached_to" data-toggle="collapse" data-target=".column_attached_to .collapse">
232
+ <h2>Supply the content for a custom column</h2>
233
+ <pre>column_attached_to(array $item) : string</pre>
234
+ <div class="labels"><span class="label">Inherited</span></div>
235
+ <div class="row collapse"><div class="detail-description">
236
+ <p class="long_description"></p>
237
+ <table class="table table-bordered">
238
+ <tr>
239
+ <th>since</th>
240
+ <td>0.1</td>
241
+ </tr>
242
+ <tr>
243
+ <th>inherited_from</th>
244
+ <td>\MLA_List_Table::column_attached_to()</td>
245
+ </tr>
246
+ </table>
247
+ <h3>Parameters</h3>
248
+ <div class="subelement argument">
249
+ <h4>$item</h4>
250
+ <code>array</code><p>A singular attachment (post) object</p>
251
+ </div>
252
+ <h3>Returns</h3>
253
+ <div class="subelement response">
254
+ <code>string</code>HTML markup to be placed inside the column</div>
255
+ </div></div>
256
+ </div>
257
+ <a name="column_author" id="column_author"></a><div class="element clickable method public column_author" data-toggle="collapse" data-target=".column_author .collapse">
258
+ <h2>Supply the content for a custom column</h2>
259
+ <pre>column_author(array $item) : string</pre>
260
+ <div class="labels"><span class="label">Inherited</span></div>
261
+ <div class="row collapse"><div class="detail-description">
262
+ <p class="long_description"></p>
263
+ <table class="table table-bordered">
264
+ <tr>
265
+ <th>since</th>
266
+ <td>0.30</td>
267
+ </tr>
268
+ <tr>
269
+ <th>inherited_from</th>
270
+ <td>\MLA_List_Table::column_author()</td>
271
+ </tr>
272
+ </table>
273
+ <h3>Parameters</h3>
274
+ <div class="subelement argument">
275
+ <h4>$item</h4>
276
+ <code>array</code><p>A singular attachment (post) object</p>
277
+ </div>
278
+ <h3>Returns</h3>
279
+ <div class="subelement response">
280
+ <code>string</code>HTML markup to be placed inside the column</div>
281
+ </div></div>
282
+ </div>
283
+ <a name="column_base_file" id="column_base_file"></a><div class="element clickable method public column_base_file" data-toggle="collapse" data-target=".column_base_file .collapse">
284
+ <h2>Supply the content for a custom column</h2>
285
+ <pre>column_base_file(array $item) : string</pre>
286
+ <div class="labels"><span class="label">Inherited</span></div>
287
+ <div class="row collapse"><div class="detail-description">
288
+ <p class="long_description"></p>
289
+ <table class="table table-bordered">
290
+ <tr>
291
+ <th>since</th>
292
+ <td>0.1</td>
293
+ </tr>
294
+ <tr>
295
+ <th>inherited_from</th>
296
+ <td>\MLA_List_Table::column_base_file()</td>
297
+ </tr>
298
+ </table>
299
+ <h3>Parameters</h3>
300
+ <div class="subelement argument">
301
+ <h4>$item</h4>
302
+ <code>array</code><p>A singular attachment (post) object</p>
303
+ </div>
304
+ <h3>Returns</h3>
305
+ <div class="subelement response">
306
+ <code>string</code>HTML markup to be placed inside the column</div>
307
+ </div></div>
308
+ </div>
309
+ <a name="column_caption" id="column_caption"></a><div class="element clickable method public column_caption" data-toggle="collapse" data-target=".column_caption .collapse">
310
+ <h2>Supply the content for a custom column</h2>
311
+ <pre>column_caption(array $item) : string</pre>
312
+ <div class="labels"><span class="label">Inherited</span></div>
313
+ <div class="row collapse"><div class="detail-description">
314
+ <p class="long_description"></p>
315
+ <table class="table table-bordered">
316
+ <tr>
317
+ <th>since</th>
318
+ <td>0.1</td>
319
+ </tr>
320
+ <tr>
321
+ <th>inherited_from</th>
322
+ <td>\MLA_List_Table::column_caption()</td>
323
+ </tr>
324
+ </table>
325
+ <h3>Parameters</h3>
326
+ <div class="subelement argument">
327
+ <h4>$item</h4>
328
+ <code>array</code><p>A singular attachment (post) object</p>
329
+ </div>
330
+ <h3>Returns</h3>
331
+ <div class="subelement response">
332
+ <code>string</code>HTML markup to be placed inside the column</div>
333
+ </div></div>
334
+ </div>
335
+ <a name="column_cb" id="column_cb"></a><div class="element clickable method public column_cb" data-toggle="collapse" data-target=".column_cb .collapse">
336
+ <h2>Displays checkboxes for using bulk actions.</h2>
337
+ <pre>column_cb(array $item) : string</pre>
338
+ <div class="labels"><span class="label">Inherited</span></div>
339
+ <div class="row collapse"><div class="detail-description">
340
+ <p class="long_description"><p>The 'cb' column
341
+ is given special treatment when columns are processed.</p></p>
342
+ <table class="table table-bordered">
343
+ <tr>
344
+ <th>since</th>
345
+ <td>0.1</td>
346
+ </tr>
347
+ <tr>
348
+ <th>inherited_from</th>
349
+ <td>\MLA_List_Table::column_cb()</td>
350
+ </tr>
351
+ </table>
352
+ <h3>Parameters</h3>
353
+ <div class="subelement argument">
354
+ <h4>$item</h4>
355
+ <code>array</code><p>A singular attachment (post) object</p>
356
+ </div>
357
+ <h3>Returns</h3>
358
+ <div class="subelement response">
359
+ <code>string</code>HTML markup to be placed inside the column</div>
360
+ </div></div>
361
+ </div>
362
+ <a name="column_date" id="column_date"></a><div class="element clickable method public column_date" data-toggle="collapse" data-target=".column_date .collapse">
363
+ <h2>Supply the content for a custom column</h2>
364
+ <pre>column_date(array $item) : string</pre>
365
+ <div class="labels"><span class="label">Inherited</span></div>
366
+ <div class="row collapse"><div class="detail-description">
367
+ <p class="long_description"></p>
368
+ <table class="table table-bordered">
369
+ <tr>
370
+ <th>since</th>
371
+ <td>0.1</td>
372
+ </tr>
373
+ <tr>
374
+ <th>inherited_from</th>
375
+ <td>\MLA_List_Table::column_date()</td>
376
+ </tr>
377
+ </table>
378
+ <h3>Parameters</h3>
379
+ <div class="subelement argument">
380
+ <h4>$item</h4>
381
+ <code>array</code><p>A singular attachment (post) object</p>
382
+ </div>
383
+ <h3>Returns</h3>
384
+ <div class="subelement response">
385
+ <code>string</code>HTML markup to be placed inside the column</div>
386
+ </div></div>
387
+ </div>
388
+ <a name="column_default" id="column_default"></a><div class="element clickable method public column_default" data-toggle="collapse" data-target=".column_default .collapse">
389
+ <h2>Supply a column value if no column-specific function has been defined</h2>
390
+ <pre>column_default(array $item, array $column_name) : string</pre>
391
+ <div class="labels"><span class="label">Inherited</span></div>
392
+ <div class="row collapse"><div class="detail-description">
393
+ <p class="long_description"><p>Called when the parent class can't find a method specifically built for a given column.
394
+ The taxonomy and custom field columns are handled here. All other columns should have
395
+ a specific method, so this function returns a troubleshooting message.</p></p>
396
+ <table class="table table-bordered">
397
+ <tr>
398
+ <th>since</th>
399
+ <td>0.1</td>
400
+ </tr>
401
+ <tr>
402
+ <th>inherited_from</th>
403
+ <td>\MLA_List_Table::column_default()</td>
404
+ </tr>
405
+ </table>
406
+ <h3>Parameters</h3>
407
+ <div class="subelement argument">
408
+ <h4>$item</h4>
409
+ <code>array</code><p>A singular item (one full row's worth of data)</p>
410
+ </div>
411
+ <div class="subelement argument">
412
+ <h4>$column_name</h4>
413
+ <code>array</code><p>The name/slug of the column to be processed</p>
414
+ </div>
415
+ <h3>Returns</h3>
416
+ <div class="subelement response">
417
+ <code>string</code>Text or HTML to be placed inside the column</div>
418
+ </div></div>
419
+ </div>
420
+ <a name="column_description" id="column_description"></a><div class="element clickable method public column_description" data-toggle="collapse" data-target=".column_description .collapse">
421
+ <h2>Supply the content for a custom column</h2>
422
+ <pre>column_description(array $item) : string</pre>
423
+ <div class="labels"><span class="label">Inherited</span></div>
424
+ <div class="row collapse"><div class="detail-description">
425
+ <p class="long_description"></p>
426
+ <table class="table table-bordered">
427
+ <tr>
428
+ <th>since</th>
429
+ <td>0.1</td>
430
+ </tr>
431
+ <tr>
432
+ <th>inherited_from</th>
433
+ <td>\MLA_List_Table::column_description()</td>
434
+ </tr>
435
+ </table>
436
+ <h3>Parameters</h3>
437
+ <div class="subelement argument">
438
+ <h4>$item</h4>
439
+ <code>array</code><p>A singular attachment (post) object</p>
440
+ </div>
441
+ <h3>Returns</h3>
442
+ <div class="subelement response">
443
+ <code>string</code>HTML markup to be placed inside the column</div>
444
+ </div></div>
445
+ </div>
446
+ <a name="column_featured" id="column_featured"></a><div class="element clickable method public column_featured" data-toggle="collapse" data-target=".column_featured .collapse">
447
+ <h2>Supply the content for a custom column</h2>
448
+ <pre>column_featured(array $item) : string</pre>
449
+ <div class="labels"><span class="label">Inherited</span></div>
450
+ <div class="row collapse"><div class="detail-description">
451
+ <p class="long_description"></p>
452
+ <table class="table table-bordered">
453
+ <tr>
454
+ <th>since</th>
455
+ <td>0.1</td>
456
+ </tr>
457
+ <tr>
458
+ <th>inherited_from</th>
459
+ <td>\MLA_List_Table::column_featured()</td>
460
+ </tr>
461
+ </table>
462
+ <h3>Parameters</h3>
463
+ <div class="subelement argument">
464
+ <h4>$item</h4>
465
+ <code>array</code><p>A singular attachment (post) object</p>
466
+ </div>
467
+ <h3>Returns</h3>
468
+ <div class="subelement response">
469
+ <code>string</code>HTML markup to be placed inside the column</div>
470
+ </div></div>
471
+ </div>
472
+ <a name="column_file_url" id="column_file_url"></a><div class="element clickable method public column_file_url" data-toggle="collapse" data-target=".column_file_url .collapse">
473
+ <h2>Supply the content for a custom column</h2>
474
+ <pre>column_file_url(array $item) : string</pre>
475
+ <div class="labels"><span class="label">Inherited</span></div>
476
+ <div class="row collapse"><div class="detail-description">
477
+ <p class="long_description"></p>
478
+ <table class="table table-bordered">
479
+ <tr>
480
+ <th>since</th>
481
+ <td>0.1</td>
482
+ </tr>
483
+ <tr>
484
+ <th>inherited_from</th>
485
+ <td>\MLA_List_Table::column_file_url()</td>
486
+ </tr>
487
+ </table>
488
+ <h3>Parameters</h3>
489
+ <div class="subelement argument">
490
+ <h4>$item</h4>
491
+ <code>array</code><p>A singular attachment (post) object</p>
492
+ </div>
493
+ <h3>Returns</h3>
494
+ <div class="subelement response">
495
+ <code>string</code>HTML markup to be placed inside the column</div>
496
+ </div></div>
497
+ </div>
498
+ <a name="column_galleries" id="column_galleries"></a><div class="element clickable method public column_galleries" data-toggle="collapse" data-target=".column_galleries .collapse">
499
+ <h2>Supply the content for a custom column</h2>
500
+ <pre>column_galleries(array $item) : string</pre>
501
+ <div class="labels"><span class="label">Inherited</span></div>
502
+ <div class="row collapse"><div class="detail-description">
503
+ <p class="long_description"></p>
504
+ <table class="table table-bordered">
505
+ <tr>
506
+ <th>since</th>
507
+ <td>0.70</td>
508
+ </tr>
509
+ <tr>
510
+ <th>inherited_from</th>
511
+ <td>\MLA_List_Table::column_galleries()</td>
512
+ </tr>
513
+ </table>
514
+ <h3>Parameters</h3>
515
+ <div class="subelement argument">
516
+ <h4>$item</h4>
517
+ <code>array</code><p>A singular attachment (post) object</p>
518
+ </div>
519
+ <h3>Returns</h3>
520
+ <div class="subelement response">
521
+ <code>string</code>HTML markup to be placed inside the column</div>
522
+ </div></div>
523
+ </div>
524
+ <a name="column_icon" id="column_icon"></a><div class="element clickable method public column_icon" data-toggle="collapse" data-target=".column_icon .collapse">
525
+ <h2>Supply the content for a custom column</h2>
526
+ <pre>column_icon(array $item) : string</pre>
527
+ <div class="labels"><span class="label">Inherited</span></div>
528
+ <div class="row collapse"><div class="detail-description">
529
+ <p class="long_description"></p>
530
+ <table class="table table-bordered">
531
+ <tr>
532
+ <th>since</th>
533
+ <td>0.1</td>
534
+ </tr>
535
+ <tr>
536
+ <th>inherited_from</th>
537
+ <td>\MLA_List_Table::column_icon()</td>
538
+ </tr>
539
+ </table>
540
+ <h3>Parameters</h3>
541
+ <div class="subelement argument">
542
+ <h4>$item</h4>
543
+ <code>array</code><p>A singular attachment (post) object</p>
544
+ </div>
545
+ <h3>Returns</h3>
546
+ <div class="subelement response">
547
+ <code>string</code>HTML markup to be placed inside the column</div>
548
+ </div></div>
549
+ </div>
550
+ <a name="column_inserted" id="column_inserted"></a><div class="element clickable method public column_inserted" data-toggle="collapse" data-target=".column_inserted .collapse">
551
+ <h2>Supply the content for a custom column</h2>
552
+ <pre>column_inserted(array $item) : string</pre>
553
+ <div class="labels"><span class="label">Inherited</span></div>
554
+ <div class="row collapse"><div class="detail-description">
555
+ <p class="long_description"></p>
556
+ <table class="table table-bordered">
557
+ <tr>
558
+ <th>since</th>
559
+ <td>0.1</td>
560
+ </tr>
561
+ <tr>
562
+ <th>inherited_from</th>
563
+ <td>\MLA_List_Table::column_inserted()</td>
564
+ </tr>
565
+ </table>
566
+ <h3>Parameters</h3>
567
+ <div class="subelement argument">
568
+ <h4>$item</h4>
569
+ <code>array</code><p>A singular attachment (post) object</p>
570
+ </div>
571
+ <h3>Returns</h3>
572
+ <div class="subelement response">
573
+ <code>string</code>HTML markup to be placed inside the column</div>
574
+ </div></div>
575
+ </div>
576
+ <a name="column_menu_order" id="column_menu_order"></a><div class="element clickable method public column_menu_order" data-toggle="collapse" data-target=".column_menu_order .collapse">
577
+ <h2>Supply the content for a custom column</h2>
578
+ <pre>column_menu_order(array $item) : string</pre>
579
+ <div class="labels"><span class="label">Inherited</span></div>
580
+ <div class="row collapse"><div class="detail-description">
581
+ <p class="long_description"></p>
582
+ <table class="table table-bordered">
583
+ <tr>
584
+ <th>since</th>
585
+ <td>0.60</td>
586
+ </tr>
587
+ <tr>
588
+ <th>inherited_from</th>
589
+ <td>\MLA_List_Table::column_menu_order()</td>
590
+ </tr>
591
+ </table>
592
+ <h3>Parameters</h3>
593
+ <div class="subelement argument">
594
+ <h4>$item</h4>
595
+ <code>array</code><p>A singular attachment (post) object</p>
596
+ </div>
597
+ <h3>Returns</h3>
598
+ <div class="subelement response">
599
+ <code>string</code>HTML markup to be placed inside the column</div>
600
+ </div></div>
601
+ </div>
602
+ <a name="column_mla_galleries" id="column_mla_galleries"></a><div class="element clickable method public column_mla_galleries" data-toggle="collapse" data-target=".column_mla_galleries .collapse">
603
+ <h2>Supply the content for a custom column</h2>
604
+ <pre>column_mla_galleries(array $item) : string</pre>
605
+ <div class="labels"><span class="label">Inherited</span></div>
606
+ <div class="row collapse"><div class="detail-description">
607
+ <p class="long_description"></p>
608
+ <table class="table table-bordered">
609
+ <tr>
610
+ <th>since</th>
611
+ <td>0.70</td>
612
+ </tr>
613
+ <tr>
614
+ <th>inherited_from</th>
615
+ <td>\MLA_List_Table::column_mla_galleries()</td>
616
+ </tr>
617
+ </table>
618
+ <h3>Parameters</h3>
619
+ <div class="subelement argument">
620
+ <h4>$item</h4>
621
+ <code>array</code><p>A singular attachment (post) object</p>
622
+ </div>
623
+ <h3>Returns</h3>
624
+ <div class="subelement response">
625
+ <code>string</code>HTML markup to be placed inside the column</div>
626
+ </div></div>
627
+ </div>
628
+ <a name="column_modified" id="column_modified"></a><div class="element clickable method public column_modified" data-toggle="collapse" data-target=".column_modified .collapse">
629
+ <h2>Supply the content for a custom column</h2>
630
+ <pre>column_modified(array $item) : string</pre>
631
+ <div class="labels"><span class="label">Inherited</span></div>
632
+ <div class="row collapse"><div class="detail-description">
633
+ <p class="long_description"></p>
634
+ <table class="table table-bordered">
635
+ <tr>
636
+ <th>since</th>
637
+ <td>0.30</td>
638
+ </tr>
639
+ <tr>
640
+ <th>inherited_from</th>
641
+ <td>\MLA_List_Table::column_modified()</td>
642
+ </tr>
643
+ </table>
644
+ <h3>Parameters</h3>
645
+ <div class="subelement argument">
646
+ <h4>$item</h4>
647
+ <code>array</code><p>A singular attachment (post) object</p>
648
+ </div>
649
+ <h3>Returns</h3>
650
+ <div class="subelement response">
651
+ <code>string</code>HTML markup to be placed inside the column</div>
652
+ </div></div>
653
+ </div>
654
+ <a name="column_parent" id="column_parent"></a><div class="element clickable method public column_parent" data-toggle="collapse" data-target=".column_parent .collapse">
655
+ <h2>Supply the content for a custom column</h2>
656
+ <pre>column_parent(array $item) : string</pre>
657
+ <div class="labels"><span class="label">Inherited</span></div>
658
+ <div class="row collapse"><div class="detail-description">
659
+ <p class="long_description"></p>
660
+ <table class="table table-bordered">
661
+ <tr>
662
+ <th>since</th>
663
+ <td>0.1</td>
664
+ </tr>
665
+ <tr>
666
+ <th>inherited_from</th>
667
+ <td>\MLA_List_Table::column_parent()</td>
668
+ </tr>
669
+ </table>
670
+ <h3>Parameters</h3>
671
+ <div class="subelement argument">
672
+ <h4>$item</h4>
673
+ <code>array</code><p>A singular attachment (post) object</p>
674
+ </div>
675
+ <h3>Returns</h3>
676
+ <div class="subelement response">
677
+ <code>string</code>HTML markup to be placed inside the column</div>
678
+ </div></div>
679
+ </div>
680
+ <a name="column_post_mime_type" id="column_post_mime_type"></a><div class="element clickable method public column_post_mime_type" data-toggle="collapse" data-target=".column_post_mime_type .collapse">
681
+ <h2>Supply the content for a custom column</h2>
682
+ <pre>column_post_mime_type(array $item) : string</pre>
683
+ <div class="labels"><span class="label">Inherited</span></div>
684
+ <div class="row collapse"><div class="detail-description">
685
+ <p class="long_description"></p>
686
+ <table class="table table-bordered">
687
+ <tr>
688
+ <th>since</th>
689
+ <td>0.30</td>
690
+ </tr>
691
+ <tr>
692
+ <th>inherited_from</th>
693
+ <td>\MLA_List_Table::column_post_mime_type()</td>
694
+ </tr>
695
+ </table>
696
+ <h3>Parameters</h3>
697
+ <div class="subelement argument">
698
+ <h4>$item</h4>
699
+ <code>array</code><p>A singular attachment (post) object</p>
700
+ </div>
701
+ <h3>Returns</h3>
702
+ <div class="subelement response">
703
+ <code>string</code>HTML markup to be placed inside the column</div>
704
+ </div></div>
705
+ </div>
706
+ <a name="column_post_name" id="column_post_name"></a><div class="element clickable method public column_post_name" data-toggle="collapse" data-target=".column_post_name .collapse">
707
+ <h2>Supply the content for a custom column</h2>
708
+ <pre>column_post_name(array $item) : string</pre>
709
+ <div class="labels"><span class="label">Inherited</span></div>
710
+ <div class="row collapse"><div class="detail-description">
711
+ <p class="long_description"></p>
712
+ <table class="table table-bordered">
713
+ <tr>
714
+ <th>since</th>
715
+ <td>0.1</td>
716
+ </tr>
717
+ <tr>
718
+ <th>inherited_from</th>
719
+ <td>\MLA_List_Table::column_post_name()</td>
720
+ </tr>
721
+ </table>
722
+ <h3>Parameters</h3>
723
+ <div class="subelement argument">
724
+ <h4>$item</h4>
725
+ <code>array</code><p>A singular attachment (post) object</p>
726
+ </div>
727
+ <h3>Returns</h3>
728
+ <div class="subelement response">
729
+ <code>string</code>HTML markup to be placed inside the column</div>
730
+ </div></div>
731
+ </div>
732
+ <a name="column_post_title" id="column_post_title"></a><div class="element clickable method public column_post_title" data-toggle="collapse" data-target=".column_post_title .collapse">
733
+ <h2>Supply the content for a custom column</h2>
734
+ <pre>column_post_title(array $item) : string</pre>
735
+ <div class="labels"><span class="label">Inherited</span></div>
736
+ <div class="row collapse"><div class="detail-description">
737
+ <p class="long_description"></p>
738
+ <table class="table table-bordered">
739
+ <tr>
740
+ <th>since</th>
741
+ <td>0.1</td>
742
+ </tr>
743
+ <tr>
744
+ <th>inherited_from</th>
745
+ <td>\MLA_List_Table::column_post_title()</td>
746
+ </tr>
747
+ </table>
748
+ <h3>Parameters</h3>
749
+ <div class="subelement argument">
750
+ <h4>$item</h4>
751
+ <code>array</code><p>A singular attachment (post) object</p>
752
+ </div>
753
+ <h3>Returns</h3>
754
+ <div class="subelement response">
755
+ <code>string</code>HTML markup to be placed inside the column</div>
756
+ </div></div>
757
+ </div>
758
+ <a name="column_title_name" id="column_title_name"></a><div class="element clickable method public column_title_name" data-toggle="collapse" data-target=".column_title_name .collapse">
759
+ <h2>Supply the content for a custom column</h2>
760
+ <pre>column_title_name(array $item) : string</pre>
761
+ <div class="labels"><span class="label">Inherited</span></div>
762
+ <div class="row collapse"><div class="detail-description">
763
+ <p class="long_description"></p>
764
+ <table class="table table-bordered">
765
+ <tr>
766
+ <th>since</th>
767
+ <td>0.1</td>
768
+ </tr>
769
+ <tr>
770
+ <th>inherited_from</th>
771
+ <td>\MLA_List_Table::column_title_name()</td>
772
+ </tr>
773
+ </table>
774
+ <h3>Parameters</h3>
775
+ <div class="subelement argument">
776
+ <h4>$item</h4>
777
+ <code>array</code><p>A singular attachment (post) object</p>
778
+ </div>
779
+ <h3>Returns</h3>
780
+ <div class="subelement response">
781
+ <code>string</code>HTML markup to be placed inside the column</div>
782
+ </div></div>
783
+ </div>
784
+ <a name="extra_tablenav" id="extra_tablenav"></a><div class="element clickable method public extra_tablenav" data-toggle="collapse" data-target=".extra_tablenav .collapse">
785
+ <h2>Extra controls to be displayed between bulk actions and pagination</h2>
786
+ <pre>extra_tablenav(string $which) : array</pre>
787
+ <div class="labels"><span class="label">Inherited</span></div>
788
+ <div class="row collapse"><div class="detail-description">
789
+ <p class="long_description"><p>Modeled after class-wp-posts-list-table.php in wp-admin/includes.</p></p>
790
+ <table class="table table-bordered">
791
+ <tr>
792
+ <th>since</th>
793
+ <td>0.1</td>
794
+ </tr>
795
+ <tr>
796
+ <th>inherited_from</th>
797
+ <td>\MLA_List_Table::extra_tablenav()</td>
798
+ </tr>
799
+ </table>
800
+ <h3>Parameters</h3>
801
+ <div class="subelement argument">
802
+ <h4>$which</h4>
803
+ <code>string</code><p>'top' or 'bottom', i.e., above or below the table rows</p>
804
+ </div>
805
+ <h3>Returns</h3>
806
+ <div class="subelement response">
807
+ <code>array</code>Contains all the bulk actions: 'slugs'=>'Visible Titles'</div>
808
+ </div></div>
809
+ </div>
810
+ <a name="get_bulk_actions" id="get_bulk_actions"></a><div class="element clickable method public get_bulk_actions" data-toggle="collapse" data-target=".get_bulk_actions .collapse">
811
+ <h2>Get an associative array ( option_name =&gt; option_title ) with the list
812
+ of bulk actions available on this table.</h2>
813
+ <pre>get_bulk_actions() : array</pre>
814
+ <div class="labels"><span class="label">Inherited</span></div>
815
+ <div class="row collapse"><div class="detail-description">
816
+ <p class="long_description"></p>
817
+ <table class="table table-bordered">
818
+ <tr>
819
+ <th>since</th>
820
+ <td>0.1</td>
821
+ </tr>
822
+ <tr>
823
+ <th>inherited_from</th>
824
+ <td>\MLA_List_Table::get_bulk_actions()</td>
825
+ </tr>
826
+ </table>
827
+ <h3>Returns</h3>
828
+ <div class="subelement response">
829
+ <code>array</code>Contains all the bulk actions: 'slugs'=>'Visible Titles'</div>
830
+ </div></div>
831
+ </div>
832
+ <a name="get_columns" id="get_columns"></a><div class="element clickable method public get_columns" data-toggle="collapse" data-target=".get_columns .collapse">
833
+ <h2>This method dictates the table's columns and titles</h2>
834
+ <pre>get_columns() : array</pre>
835
+ <div class="labels"><span class="label">Inherited</span></div>
836
+ <div class="row collapse"><div class="detail-description">
837
+ <p class="long_description"></p>
838
+ <table class="table table-bordered">
839
+ <tr>
840
+ <th>since</th>
841
+ <td>0.1</td>
842
+ </tr>
843
+ <tr>
844
+ <th>inherited_from</th>
845
+ <td>\MLA_List_Table::get_columns()</td>
846
+ </tr>
847
+ </table>
848
+ <h3>Returns</h3>
849
+ <div class="subelement response">
850
+ <code>array</code>Column information: 'slugs'=>'Visible Titles'</div>
851
+ </div></div>
852
+ </div>
853
+ <a name="get_hidden_columns" id="get_hidden_columns"></a><div class="element clickable method public get_hidden_columns" data-toggle="collapse" data-target=".get_hidden_columns .collapse">
854
+ <h2>Returns the list of currently hidden columns from a user option or
855
+ from default values if the option is not set</h2>
856
+ <pre>get_hidden_columns() : array</pre>
857
+ <div class="labels"><span class="label">Inherited</span></div>
858
+ <div class="row collapse"><div class="detail-description">
859
+ <p class="long_description"></p>
860
+ <table class="table table-bordered">
861
+ <tr>
862
+ <th>since</th>
863
+ <td>0.1</td>
864
+ </tr>
865
+ <tr>
866
+ <th>inherited_from</th>
867
+ <td>\MLA_List_Table::get_hidden_columns()</td>
868
+ </tr>
869
+ </table>
870
+ <h3>Returns</h3>
871
+ <div class="subelement response">
872
+ <code>array</code>Column information,e.g., array(0 => 'ID_parent, 1 => 'title_name')</div>
873
+ </div></div>
874
+ </div>
875
+ <a name="get_sortable_columns" id="get_sortable_columns"></a><div class="element clickable method public get_sortable_columns" data-toggle="collapse" data-target=".get_sortable_columns .collapse">
876
+ <h2>Returns an array where the key is the column that needs to be sortable
877
+ and the value is db column (or other criteria) to sort by.</h2>
878
+ <pre>get_sortable_columns() : array</pre>
879
+ <div class="labels"><span class="label">Inherited</span></div>
880
+ <div class="row collapse"><div class="detail-description">
881
+ <p class="long_description"></p>
882
+ <table class="table table-bordered">
883
+ <tr>
884
+ <th>since</th>
885
+ <td>0.1</td>
886
+ </tr>
887
+ <tr>
888
+ <th>inherited_from</th>
889
+ <td>\MLA_List_Table::get_sortable_columns()</td>
890
+ </tr>
891
+ </table>
892
+ <h3>Returns</h3>
893
+ <div class="subelement response">
894
+ <code>array</code>Sortable column information,e.g., 'slug' => array('data_value', (boolean) initial_descending )</div>
895
+ </div></div>
896
+ </div>
897
+ <a name="get_views" id="get_views"></a><div class="element clickable method public get_views" data-toggle="collapse" data-target=".get_views .collapse">
898
+ <h2>Returns an associative array listing all the views that can be used with this table.</h2>
899
+ <pre>get_views() : array</pre>
900
+ <div class="labels"><span class="label">Inherited</span></div>
901
+ <div class="row collapse"><div class="detail-description">
902
+ <p class="long_description"><p>These are listed across the top of the page and managed by WordPress.</p></p>
903
+ <table class="table table-bordered">
904
+ <tr>
905
+ <th>since</th>
906
+ <td>0.1</td>
907
+ </tr>
908
+ <tr>
909
+ <th>inherited_from</th>
910
+ <td>\MLA_List_Table::get_views()</td>
911
+ </tr>
912
+ </table>
913
+ <h3>Returns</h3>
914
+ <div class="subelement response">
915
+ <code>array</code>View information,e.g., array ( id => link )</div>
916
+ </div></div>
917
+ </div>
918
+ <a name="mla_admin_init_action" id="mla_admin_init_action"></a><div class="element clickable method public mla_admin_init_action" data-toggle="collapse" data-target=".mla_admin_init_action .collapse">
919
+ <h2>Adds support for taxonomy and custom field columns</h2>
920
+ <pre>mla_admin_init_action() : void</pre>
921
+ <div class="labels"><span class="label">Inherited</span></div>
922
+ <div class="row collapse"><div class="detail-description">
923
+ <p class="long_description"><p>Called in the admin_init action because the list_table object isn't
924
+ created in time to affect the "screen options" setup.</p></p>
925
+ <table class="table table-bordered">
926
+ <tr>
927
+ <th>since</th>
928
+ <td>0.30</td>
929
+ </tr>
930
+ <tr>
931
+ <th>inherited_from</th>
932
+ <td>\MLA_List_Table::mla_admin_init_action()</td>
933
+ </tr>
934
+ </table>
935
+ </div></div>
936
+ </div>
937
+ <a name="mla_get_sortable_columns" id="mla_get_sortable_columns"></a><div class="element clickable method public mla_get_sortable_columns" data-toggle="collapse" data-target=".mla_get_sortable_columns .collapse">
938
+ <h2>Return the names and display values of the sortable columns</h2>
939
+ <pre>mla_get_sortable_columns() : array</pre>
940
+ <div class="labels"><span class="label">Inherited</span></div>
941
+ <div class="row collapse"><div class="detail-description">
942
+ <p class="long_description"></p>
943
+ <table class="table table-bordered">
944
+ <tr>
945
+ <th>since</th>
946
+ <td>0.30</td>
947
+ </tr>
948
+ <tr>
949
+ <th>inherited_from</th>
950
+ <td>\MLA_List_Table::mla_get_sortable_columns()</td>
951
+ </tr>
952
+ </table>
953
+ <h3>Returns</h3>
954
+ <div class="subelement response">
955
+ <code>array</code>name => array( orderby value, heading ) for sortable columns</div>
956
+ </div></div>
957
+ </div>
958
+ <a name="mla_get_taxonomy_filter_dropdown" id="mla_get_taxonomy_filter_dropdown"></a><div class="element clickable method public mla_get_taxonomy_filter_dropdown" data-toggle="collapse" data-target=".mla_get_taxonomy_filter_dropdown .collapse">
959
+ <h2>Get dropdown box of terms to filter by, if available</h2>
960
+ <pre>mla_get_taxonomy_filter_dropdown(integer $selected) : string</pre>
961
+ <div class="labels"><span class="label">Inherited</span></div>
962
+ <div class="row collapse"><div class="detail-description">
963
+ <p class="long_description"></p>
964
+ <table class="table table-bordered">
965
+ <tr>
966
+ <th>since</th>
967
+ <td>1.20</td>
968
+ </tr>
969
+ <tr>
970
+ <th>inherited_from</th>
971
+ <td>\MLA_List_Table::mla_get_taxonomy_filter_dropdown()</td>
972
+ </tr>
973
+ </table>
974
+ <h3>Parameters</h3>
975
+ <div class="subelement argument">
976
+ <h4>$selected</h4>
977
+ <code>integer</code><p>currently selected term_id || zero (default)</p>
978
+ </div>
979
+ <h3>Returns</h3>
980
+ <div class="subelement response">
981
+ <code>string</code>HTML markup for dropdown box</div>
982
+ </div></div>
983
+ </div>
984
+ <a name="mla_get_view" id="mla_get_view"></a><div class="element clickable method public mla_get_view" data-toggle="collapse" data-target=".mla_get_view .collapse">
985
+ <h2>Wrapper for _get_view; returns HTML markup for one view that can be used with this table</h2>
986
+ <pre>mla_get_view(string $view_slug, string $current_view) : string</pre>
987
+ <div class="labels"><span class="label">Inherited</span></div>
988
+ <div class="row collapse"><div class="detail-description">
989
+ <p class="long_description"></p>
990
+ <table class="table table-bordered">
991
+ <tr>
992
+ <th>since</th>
993
+ <td>2.11</td>
994
+ </tr>
995
+ <tr>
996
+ <th>inherited_from</th>
997
+ <td>\MLA_List_Table::mla_get_view()</td>
998
+ </tr>
999
+ </table>
1000
+ <h3>Parameters</h3>
1001
+ <div class="subelement argument">
1002
+ <h4>$view_slug</h4>
1003
+ <code>string</code><p>View slug, key to MLA_POST_MIME_TYPES array</p></div>
1004
+ <div class="subelement argument">
1005
+ <h4>$current_view</h4>
1006
+ <code>string</code><p>Slug for current view</p></div>
1007
+ <h3>Returns</h3>
1008
+ <div class="subelement response">
1009
+ <code>string</code>| false HTML for link to display the view, false if count = zero</div>
1010
+ </div></div>
1011
+ </div>
1012
+ <a name="mla_localize_default_columns_array" id="mla_localize_default_columns_array"></a><div class="element clickable method public mla_localize_default_columns_array" data-toggle="collapse" data-target=".mla_localize_default_columns_array .collapse">
1013
+ <h2>Builds the $default_columns array with translated source texts.</h2>
1014
+ <pre>mla_localize_default_columns_array() : void</pre>
1015
+ <div class="labels"><span class="label">Inherited</span></div>
1016
+ <div class="row collapse"><div class="detail-description">
1017
+ <p class="long_description"><p>Called from MLA:mla_plugins_loaded_action because the $default_columns information might be
1018
+ accessed from "front end" posts/pages.</p></p>
1019
+ <table class="table table-bordered">
1020
+ <tr>
1021
+ <th>since</th>
1022
+ <td>1.71</td>
1023
+ </tr>
1024
+ <tr>
1025
+ <th>inherited_from</th>
1026
+ <td>\MLA_List_Table::mla_localize_default_columns_array()</td>
1027
+ </tr>
1028
+ </table>
1029
+ </div></div>
1030
+ </div>
1031
+ <a name="mla_manage_columns_filter" id="mla_manage_columns_filter"></a><div class="element clickable method public mla_manage_columns_filter" data-toggle="collapse" data-target=".mla_manage_columns_filter .collapse">
1032
+ <h2>Handler for filter 'manage_media_page_mla-menu_columns'</h2>
1033
+ <pre>mla_manage_columns_filter() : array</pre>
1034
+ <div class="labels"><span class="label">Inherited</span></div>
1035
+ <div class="row collapse"><div class="detail-description">
1036
+ <p class="long_description"><p>This required filter dictates the table's columns and titles. Set when the
1037
+ file is loaded because the list_table object isn't created in time
1038
+ to affect the "screen options" setup.</p></p>
1039
+ <table class="table table-bordered">
1040
+ <tr>
1041
+ <th>since</th>
1042
+ <td>0.1</td>
1043
+ </tr>
1044
+ <tr>
1045
+ <th>inherited_from</th>
1046
+ <td>\MLA_List_Table::mla_manage_columns_filter()</td>
1047
+ </tr>
1048
+ </table>
1049
+ <h3>Returns</h3>
1050
+ <div class="subelement response">
1051
+ <code>array</code>list of table columns</div>
1052
+ </div></div>
1053
+ </div>
1054
+ <a name="mla_manage_hidden_columns_filter" id="mla_manage_hidden_columns_filter"></a><div class="element clickable method public mla_manage_hidden_columns_filter" data-toggle="collapse" data-target=".mla_manage_hidden_columns_filter .collapse">
1055
+ <h2>Handler for filter 'get_user_option_managemedia_page_mla-menucolumnshidden'</h2>
1056
+ <pre>mla_manage_hidden_columns_filter(string $result, string $option, object $user_data) : array</pre>
1057
+ <div class="labels"><span class="label">Inherited</span></div>
1058
+ <div class="row collapse"><div class="detail-description">
1059
+ <p class="long_description"><p>Required because the screen.php get_hidden_columns function only uses
1060
+ the get_user_option result. Set when the file is loaded because the object
1061
+ is not created in time for the call from screen.php.</p></p>
1062
+ <table class="table table-bordered">
1063
+ <tr>
1064
+ <th>since</th>
1065
+ <td>0.1</td>
1066
+ </tr>
1067
+ <tr>
1068
+ <th>inherited_from</th>
1069
+ <td>\MLA_List_Table::mla_manage_hidden_columns_filter()</td>
1070
+ </tr>
1071
+ </table>
1072
+ <h3>Parameters</h3>
1073
+ <div class="subelement argument">
1074
+ <h4>$result</h4>
1075
+ <code>string</code><p>current list of hidden columns, if any</p></div>
1076
+ <div class="subelement argument">
1077
+ <h4>$option</h4>
1078
+ <code>string</code><p>'managemedia_page_mla-menucolumnshidden'</p>
1079
+ </div>
1080
+ <div class="subelement argument">
1081
+ <h4>$user_data</h4>
1082
+ <code>object</code><p>WP_User object, if logged in</p></div>
1083
+ <h3>Returns</h3>
1084
+ <div class="subelement response">
1085
+ <code>array</code>updated list of hidden columns</div>
1086
+ </div></div>
1087
+ </div>
1088
+ <a name="mla_submenu_arguments" id="mla_submenu_arguments"></a><div class="element clickable method public mla_submenu_arguments" data-toggle="collapse" data-target=".mla_submenu_arguments .collapse">
1089
+ <h2>Process $_REQUEST, building $submenu_arguments</h2>
1090
+ <pre>mla_submenu_arguments(boolean $include_filters) : array</pre>
1091
+ <div class="labels"><span class="label">Inherited</span></div>
1092
+ <div class="row collapse"><div class="detail-description">
1093
+ <p class="long_description"></p>
1094
+ <table class="table table-bordered">
1095
+ <tr>
1096
+ <th>since</th>
1097
+ <td>1.42</td>
1098
+ </tr>
1099
+ <tr>
1100
+ <th>inherited_from</th>
1101
+ <td>\MLA_List_Table::mla_submenu_arguments()</td>
1102
+ </tr>
1103
+ </table>
1104
+ <h3>Parameters</h3>
1105
+ <div class="subelement argument">
1106
+ <h4>$include_filters</h4>
1107
+ <code>boolean</code><p>Optional: Include the "click filter" values in the results</p>
1108
+ </div>
1109
+ <h3>Returns</h3>
1110
+ <div class="subelement response">
1111
+ <code>array</code>non-empty view, search, filter and sort arguments</div>
1112
+ </div></div>
1113
+ </div>
1114
+ <a name="pagination" id="pagination"></a><div class="element clickable method public pagination" data-toggle="collapse" data-target=".pagination .collapse">
1115
+ <h2>Display the pagination, adding view, search and filter arguments</h2>
1116
+ <pre>pagination(string $which) : void</pre>
1117
+ <div class="labels"><span class="label">Inherited</span></div>
1118
+ <div class="row collapse"><div class="detail-description">
1119
+ <p class="long_description"></p>
1120
+ <table class="table table-bordered">
1121
+ <tr>
1122
+ <th>since</th>
1123
+ <td>1.42</td>
1124
+ </tr>
1125
+ <tr>
1126
+ <th>inherited_from</th>
1127
+ <td>\MLA_List_Table::pagination()</td>
1128
+ </tr>
1129
+ </table>
1130
+ <h3>Parameters</h3>
1131
+ <div class="subelement argument">
1132
+ <h4>$which</h4>
1133
+ <code>string</code><p>'top' | 'bottom'</p>
1134
+ </div>
1135
+ </div></div>
1136
+ </div>
1137
+ <a name="prepare_items" id="prepare_items"></a><div class="element clickable method public prepare_items" data-toggle="collapse" data-target=".prepare_items .collapse">
1138
+ <h2>Prepares the list of items for displaying</h2>
1139
+ <pre>prepare_items() : void</pre>
1140
+ <div class="labels"><span class="label">Inherited</span></div>
1141
+ <div class="row collapse"><div class="detail-description">
1142
+ <p class="long_description"><p>This is where you prepare your data for display. This method will usually
1143
+ be used to query the database, sort and filter the data, and generally
1144
+ get it ready to be displayed. At a minimum, we should set $this->items and
1145
+ $this->set_pagination_args().</p></p>
1146
+ <table class="table table-bordered">
1147
+ <tr>
1148
+ <th>since</th>
1149
+ <td>0.1</td>
1150
+ </tr>
1151
+ <tr>
1152
+ <th>inherited_from</th>
1153
+ <td>\MLA_List_Table::prepare_items()</td>
1154
+ </tr>
1155
+ </table>
1156
+ </div></div>
1157
+ </div>
1158
+ <a name="print_column_headers" id="print_column_headers"></a><div class="element clickable method public print_column_headers" data-toggle="collapse" data-target=".print_column_headers .collapse">
1159
+ <h2>Print column headers, adding view, search and filter arguments</h2>
1160
+ <pre>print_column_headers(bool $with_id) </pre>
1161
+ <div class="labels"><span class="label">Inherited</span></div>
1162
+ <div class="row collapse"><div class="detail-description">
1163
+ <p class="long_description"></p>
1164
+ <table class="table table-bordered">
1165
+ <tr>
1166
+ <th>since</th>
1167
+ <td>1.42</td>
1168
+ </tr>
1169
+ <tr>
1170
+ <th>inherited_from</th>
1171
+ <td>\MLA_List_Table::print_column_headers()</td>
1172
+ </tr>
1173
+ </table>
1174
+ <h3>Parameters</h3>
1175
+ <div class="subelement argument">
1176
+ <h4>$with_id</h4>
1177
+ <code>bool</code><p>Whether to set the id attribute or not</p></div>
1178
+ </div></div>
1179
+ </div>
1180
+ <a name="single_row" id="single_row"></a><div class="element clickable method public single_row" data-toggle="collapse" data-target=".single_row .collapse">
1181
+ <h2>Generates (echoes) content for a single row of the table</h2>
1182
+ <pre>single_row(object $item) : void</pre>
1183
+ <div class="labels"><span class="label">Inherited</span></div>
1184
+ <div class="row collapse"><div class="detail-description">
1185
+ <p class="long_description"></p>
1186
+ <table class="table table-bordered">
1187
+ <tr>
1188
+ <th>since</th>
1189
+ <td>.20</td>
1190
+ </tr>
1191
+ <tr>
1192
+ <th>inherited_from</th>
1193
+ <td>\MLA_List_Table::single_row()</td>
1194
+ </tr>
1195
+ </table>
1196
+ <h3>Parameters</h3>
1197
+ <div class="subelement argument">
1198
+ <h4>$item</h4>
1199
+ <code>object</code><p>the current item</p></div>
1200
+ </div></div>
1201
+ </div>
1202
+ <a name="_avail_mime_types" id="_avail_mime_types"></a><div class="element clickable method protected _avail_mime_types" data-toggle="collapse" data-target="._avail_mime_types .collapse">
1203
+ <h2>Get MIME types with one or more attachments for view preparation</h2>
1204
+ <pre>_avail_mime_types(array $num_posts) : array</pre>
1205
+ <div class="labels"><span class="label">Inherited</span></div>
1206
+ <div class="row collapse"><div class="detail-description">
1207
+ <p class="long_description"><p>Modeled after get_available_post_mime_types in wp-admin/includes/post.php,
1208
+ but uses the output of wp_count_attachments() as input.</p></p>
1209
+ <table class="table table-bordered">
1210
+ <tr>
1211
+ <th>since</th>
1212
+ <td>0.1</td>
1213
+ </tr>
1214
+ <tr>
1215
+ <th>inherited_from</th>
1216
+ <td>\MLA_List_Table::_avail_mime_types()</td>
1217
+ </tr>
1218
+ </table>
1219
+ <h3>Parameters</h3>
1220
+ <div class="subelement argument">
1221
+ <h4>$num_posts</h4>
1222
+ <code>array</code><p>Number of posts for each MIME type</p></div>
1223
+ <h3>Returns</h3>
1224
+ <div class="subelement response">
1225
+ <code>array</code>Mime type names</div>
1226
+ </div></div>
1227
+ </div>
1228
+ <a name="_build_inline_data" id="_build_inline_data"></a><div class="element clickable method protected _build_inline_data" data-toggle="collapse" data-target="._build_inline_data .collapse">
1229
+ <h2>Add hidden fields with the data for use in the inline editor</h2>
1230
+ <pre>_build_inline_data(object $item) : string</pre>
1231
+ <div class="labels"><span class="label">Inherited</span></div>
1232
+ <div class="row collapse"><div class="detail-description">
1233
+ <p class="long_description"></p>
1234
+ <table class="table table-bordered">
1235
+ <tr>
1236
+ <th>since</th>
1237
+ <td>0.20</td>
1238
+ </tr>
1239
+ <tr>
1240
+ <th>inherited_from</th>
1241
+ <td>\MLA_List_Table::_build_inline_data()</td>
1242
+ </tr>
1243
+ </table>
1244
+ <h3>Parameters</h3>
1245
+ <div class="subelement argument">
1246
+ <h4>$item</h4>
1247
+ <code>object</code><p>A singular attachment (post) object</p>
1248
+ </div>
1249
+ <h3>Returns</h3>
1250
+ <div class="subelement response">
1251
+ <code>string</code>HTML <div> with row data</div>
1252
+ </div></div>
1253
+ </div>
1254
+ <a name="_build_rollover_actions" id="_build_rollover_actions"></a><div class="element clickable method protected _build_rollover_actions" data-toggle="collapse" data-target="._build_rollover_actions .collapse">
1255
+ <h2>Add rollover actions to exactly one of the following displayed columns:
1256
+ 'ID_parent', 'title_name', 'post_title', 'post_name'</h2>
1257
+ <pre>_build_rollover_actions(object $item, string $column) : array</pre>
1258
+ <div class="labels"><span class="label">Inherited</span></div>
1259
+ <div class="row collapse"><div class="detail-description">
1260
+ <p class="long_description"></p>
1261
+ <table class="table table-bordered">
1262
+ <tr>
1263
+ <th>since</th>
1264
+ <td>0.1</td>
1265
+ </tr>
1266
+ <tr>
1267
+ <th>inherited_from</th>
1268
+ <td>\MLA_List_Table::_build_rollover_actions()</td>
1269
+ </tr>
1270
+ </table>
1271
+ <h3>Parameters</h3>
1272
+ <div class="subelement argument">
1273
+ <h4>$item</h4>
1274
+ <code>object</code><p>A singular attachment (post) object</p>
1275
+ </div>
1276
+ <div class="subelement argument">
1277
+ <h4>$column</h4>
1278
+ <code>string</code><p>Current column name</p></div>
1279
+ <h3>Returns</h3>
1280
+ <div class="subelement response">
1281
+ <code>array</code>Names and URLs of row-level actions</div>
1282
+ </div></div>
1283
+ </div>
1284
+ <a name="_format_post_status" id="_format_post_status"></a><div class="element clickable method protected _format_post_status" data-toggle="collapse" data-target="._format_post_status .collapse">
1285
+ <h2>Translate post_status 'future', 'pending', 'draft' and 'trash' to label</h2>
1286
+ <pre>_format_post_status(string $post_status) : string</pre>
1287
+ <div class="labels"><span class="label">Inherited</span></div>
1288
+ <div class="row collapse"><div class="detail-description">
1289
+ <p class="long_description"></p>
1290
+ <table class="table table-bordered">
1291
+ <tr>
1292
+ <th>since</th>
1293
+ <td>2.01</td>
1294
+ </tr>
1295
+ <tr>
1296
+ <th>inherited_from</th>
1297
+ <td>\MLA_List_Table::_format_post_status()</td>
1298
+ </tr>
1299
+ </table>
1300
+ <h3>Parameters</h3>
1301
+ <div class="subelement argument">
1302
+ <h4>$post_status</h4>
1303
+ <code>string</code><p>post_status</p></div>
1304
+ <h3>Returns</h3>
1305
+ <div class="subelement response">
1306
+ <code>string</code>Status label or empty string</div>
1307
+ </div></div>
1308
+ </div>
1309
+ <a name="_get_view" id="_get_view"></a><div class="element clickable method private _get_view" data-toggle="collapse" data-target="._get_view .collapse">
1310
+ <h2>Returns HTML markup for one view that can be used with this table</h2>
1311
+ <pre>_get_view(string $view_slug, string $current_view) : string</pre>
1312
+ <div class="labels"><span class="label">Inherited</span></div>
1313
+ <div class="row collapse"><div class="detail-description">
1314
+ <p class="long_description"></p>
1315
+ <table class="table table-bordered">
1316
+ <tr>
1317
+ <th>since</th>
1318
+ <td>1.40</td>
1319
+ </tr>
1320
+ <tr>
1321
+ <th>inherited_from</th>
1322
+ <td>\MLA_List_Table::_get_view()</td>
1323
+ </tr>
1324
+ </table>
1325
+ <h3>Parameters</h3>
1326
+ <div class="subelement argument">
1327
+ <h4>$view_slug</h4>
1328
+ <code>string</code><p>View slug, key to MLA_POST_MIME_TYPES array</p></div>
1329
+ <div class="subelement argument">
1330
+ <h4>$current_view</h4>
1331
+ <code>string</code><p>Slug for current view</p></div>
1332
+ <h3>Returns</h3>
1333
+ <div class="subelement response">
1334
+ <code>string</code>| false HTML for link to display the view, false if count = zero</div>
1335
+ </div></div>
1336
+ </div>
1337
+ <h3>
1338
+ <i class="icon-custom icon-property"></i> Properties</h3>
1339
+ <a name="%24currently_hidden" id="$currently_hidden"> </a><div class="element clickable property protected $currently_hidden" data-toggle="collapse" data-target=".$currently_hidden .collapse">
1340
+ <h2>Currently hidden columns</h2>
1341
+ <pre>$currently_hidden : array</pre>
1342
+ <div class="labels"><span class="label">Inherited</span></div>
1343
+ <div class="row collapse"><div class="detail-description">
1344
+ <p class="long_description"><p>Records hidden columns so row-level actions are not assigned to them.</p></p>
1345
+ <table class="table table-bordered">
1346
+ <tr>
1347
+ <th>since</th>
1348
+ <td>0.1</td>
1349
+ </tr>
1350
+ <tr>
1351
+ <th>inherited_from</th>
1352
+ <td>\MLA_List_Table::$$currently_hidden</td>
1353
+ </tr>
1354
+ </table>
1355
+ </div></div>
1356
+ </div>
1357
+ <a name="%24default_columns" id="$default_columns"> </a><div class="element clickable property protected $default_columns" data-toggle="collapse" data-target=".$default_columns .collapse">
1358
+ <h2>Table column definitions</h2>
1359
+ <pre>$default_columns : array</pre>
1360
+ <div class="labels"><span class="label">Inherited</span></div>
1361
+ <div class="row collapse"><div class="detail-description">
1362
+ <p class="long_description"><p>This array defines table columns and titles where the key is the column slug (and class)
1363
+ and the value is the column's title text. If you need a checkbox for bulk actions,
1364
+ use the special slug "cb".</p>
1365
+
1366
+ <p>The 'cb' column is treated differently than the rest. If including a checkbox
1367
+ column in your table you must create a column_cb() method. If you don't need
1368
+ bulk actions or checkboxes, simply leave the 'cb' entry out of your array.</p>
1369
+
1370
+ <p>All of the columns are added to this array by MLA_List_Table::mla_admin_init_action.</p></p>
1371
+ <table class="table table-bordered">
1372
+ <tr>
1373
+ <th>since</th>
1374
+ <td>0.1</td>
1375
+ </tr>
1376
+ <tr>
1377
+ <th>inherited_from</th>
1378
+ <td>\MLA_List_Table::$$default_columns</td>
1379
+ </tr>
1380
+ </table>
1381
+ </div></div>
1382
+ </div>
1383
+ <a name="%24default_hidden_columns" id="$default_hidden_columns"> </a><div class="element clickable property protected $default_hidden_columns" data-toggle="collapse" data-target=".$default_hidden_columns .collapse">
1384
+ <h2>Default values for hidden columns</h2>
1385
+ <pre>$default_hidden_columns : array</pre>
1386
+ <div class="labels"><span class="label">Inherited</span></div>
1387
+ <div class="row collapse"><div class="detail-description">
1388
+ <p class="long_description"><p>This array is used when the user-level option is not set, i.e.,
1389
+ the user has not altered the selection of hidden columns.</p>
1390
+
1391
+ <p>The value on the right-hand side must match the column slug, e.g.,
1392
+ array(0 => 'ID_parent, 1 => 'title_name').</p>
1393
+
1394
+ <p>Taxonomy and custom field columns are added to this array by
1395
+ MLA_List_Table::mla_admin_init_action.</p></p>
1396
+ <table class="table table-bordered">
1397
+ <tr>
1398
+ <th>since</th>
1399
+ <td>0.1</td>
1400
+ </tr>
1401
+ <tr>
1402
+ <th>inherited_from</th>
1403
+ <td>\MLA_List_Table::$$default_hidden_columns</td>
1404
+ </tr>
1405
+ </table>
1406
+ </div></div>
1407
+ </div>
1408
+ <a name="%24default_sortable_columns" id="$default_sortable_columns"> </a><div class="element clickable property protected $default_sortable_columns" data-toggle="collapse" data-target=".$default_sortable_columns .collapse">
1409
+ <h2>Sortable column definitions</h2>
1410
+ <pre>$default_sortable_columns : array</pre>
1411
+ <div class="labels"><span class="label">Inherited</span></div>
1412
+ <div class="row collapse"><div class="detail-description">
1413
+ <p class="long_description"><p>This array defines the table columns that can be sorted. The array key
1414
+ is the column slug that needs to be sortable, and the value is database column
1415
+ to sort by. Often, the key and value will be the same, but this is not always
1416
+ the case (as the value is a column name from the database, not the list table).</p>
1417
+
1418
+ <p>The array value also contains a boolean which is 'true' if the initial sort order
1419
+ for the column is DESC/Descending.</p>
1420
+
1421
+ <p>Taxonomy and custom field columns are added to this array by
1422
+ MLA_List_Table::mla_admin_init_action.</p></p>
1423
+ <table class="table table-bordered">
1424
+ <tr>
1425
+ <th>since</th>
1426
+ <td>0.1</td>
1427
+ </tr>
1428
+ <tr>
1429
+ <th>inherited_from</th>
1430
+ <td>\MLA_List_Table::$$default_sortable_columns</td>
1431
+ </tr>
1432
+ </table>
1433
+ </div></div>
1434
+ </div>
1435
+ <a name="%24mla_wpml_table" id="$mla_wpml_table"> </a><div class="element clickable property protected $mla_wpml_table" data-toggle="collapse" data-target=".$mla_wpml_table .collapse">
1436
+ <h2>The MLA_WPML_Table support object</h2>
1437
+ <pre>$mla_wpml_table : object</pre>
1438
+ <div class="labels"></div>
1439
+ <div class="row collapse"><div class="detail-description">
1440
+ <p class="long_description"></p>
1441
+ <table class="table table-bordered"><tr>
1442
+ <th>since</th>
1443
+ <td>2.11</td>
1444
+ </tr></table>
1445
+ </div></div>
1446
+ </div>
1447
+ <a name="%24rollover_id" id="$rollover_id"> </a><div class="element clickable property protected $rollover_id" data-toggle="collapse" data-target=".$rollover_id .collapse">
1448
+ <h2>Records assignment of row-level actions to a table row</h2>
1449
+ <pre>$rollover_id : int</pre>
1450
+ <div class="labels"><span class="label">Inherited</span></div>
1451
+ <div class="row collapse"><div class="detail-description">
1452
+ <p class="long_description"><p>Set to the current Post-ID when row-level actions are output for the row.</p></p>
1453
+ <table class="table table-bordered">
1454
+ <tr>
1455
+ <th>since</th>
1456
+ <td>0.1</td>
1457
+ </tr>
1458
+ <tr>
1459
+ <th>inherited_from</th>
1460
+ <td>\MLA_List_Table::$$rollover_id</td>
1461
+ </tr>
1462
+ </table>
1463
+ </div></div>
1464
+ </div>
1465
+ <a name="%24attached" id="$attached"> </a><div class="element clickable property private $attached" data-toggle="collapse" data-target=".$attached .collapse">
1466
+ <h2>True if the current view is "Attached"</h2>
1467
+ <pre>$attached : int</pre>
1468
+ <div class="labels"><span class="label">Inherited</span></div>
1469
+ <div class="row collapse"><div class="detail-description">
1470
+ <p class="long_description"></p>
1471
+ <table class="table table-bordered">
1472
+ <tr>
1473
+ <th>since</th>
1474
+ <td>2.11</td>
1475
+ </tr>
1476
+ <tr>
1477
+ <th>inherited_from</th>
1478
+ <td>\MLA_List_Table::$$attached</td>
1479
+ </tr>
1480
+ </table>
1481
+ </div></div>
1482
+ </div>
1483
+ <a name="%24detached" id="$detached"> </a><div class="element clickable property private $detached" data-toggle="collapse" data-target=".$detached .collapse">
1484
+ <h2>True if the current view is "Unattached"</h2>
1485
+ <pre>$detached : int</pre>
1486
+ <div class="labels"><span class="label">Inherited</span></div>
1487
+ <div class="row collapse"><div class="detail-description">
1488
+ <p class="long_description"><p>Declaration added in MLA v2.11 for WP 4.2 compatibility.</p></p>
1489
+ <table class="table table-bordered">
1490
+ <tr>
1491
+ <th>since</th>
1492
+ <td>0.1</td>
1493
+ </tr>
1494
+ <tr>
1495
+ <th>inherited_from</th>
1496
+ <td>\MLA_List_Table::$$detached</td>
1497
+ </tr>
1498
+ </table>
1499
+ </div></div>
1500
+ </div>
1501
+ <a name="%24is_trash" id="$is_trash"> </a><div class="element clickable property private $is_trash" data-toggle="collapse" data-target=".$is_trash .collapse">
1502
+ <h2>True if the current view is "Trash"</h2>
1503
+ <pre>$is_trash : int</pre>
1504
+ <div class="labels"><span class="label">Inherited</span></div>
1505
+ <div class="row collapse"><div class="detail-description">
1506
+ <p class="long_description"><p>Declaration added in MLA v2.11 for WP 4.2 compatibility.</p></p>
1507
+ <table class="table table-bordered">
1508
+ <tr>
1509
+ <th>since</th>
1510
+ <td>0.1</td>
1511
+ </tr>
1512
+ <tr>
1513
+ <th>inherited_from</th>
1514
+ <td>\MLA_List_Table::$$is_trash</td>
1515
+ </tr>
1516
+ </table>
1517
+ </div></div>
1518
+ </div>
1519
+ </div>
1520
+ </div>
1521
+ </div>
1522
+ </div>
1523
+ <div class="row"><footer class="span12">
1524
+ Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
1525
+ Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
1526
+ generated on 2015-06-06T19:41:36-07:00.<br></footer></div>
1527
+ </div>
1528
+ </body>
1529
+ </html>
phpDocs/classes/MLA_WPML_Table.html ADDED
@@ -0,0 +1,391 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html><html xmlns:date="http://exslt.org/dates-and-times" lang="en">
2
+ <head>
3
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4
+ <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
5
+ <meta charset="utf-8">
6
+ <title>Media Library Assistant » \MLA_WPML_Table</title>
7
+ <meta name="author" content="Mike van Riel">
8
+ <meta name="description" content="">
9
+ <link href="../css/template.css" rel="stylesheet" media="all">
10
+ <script src="../js/jquery-1.7.1.min.js" type="text/javascript"></script><script src="../js/jquery-ui-1.8.2.custom.min.js" type="text/javascript"></script><script src="../js/jquery.mousewheel.min.js" type="text/javascript"></script><script src="../js/bootstrap.js" type="text/javascript"></script><script src="../js/template.js" type="text/javascript"></script><script src="../js/prettify/prettify.min.js" type="text/javascript"></script><link rel="shortcut icon" href="../img/favicon.ico">
11
+ <link rel="apple-touch-icon" href="../img/apple-touch-icon.png">
12
+ <link rel="apple-touch-icon" sizes="72x72" href="../img/apple-touch-icon-72x72.png">
13
+ <link rel="apple-touch-icon" sizes="114x114" href="../img/apple-touch-icon-114x114.png">
14
+ </head>
15
+ <body>
16
+ <div class="navbar navbar-fixed-top">
17
+ <div class="navbar-inner"><div class="container">
18
+ <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></a><a class="brand" href="../index.html">Media Library Assistant</a><div class="nav-collapse"><ul class="nav">
19
+ <li class="dropdown">
20
+ <a href="#api" class="dropdown-toggle" data-toggle="dropdown">
21
+ API Documentation <b class="caret"></b></a><ul class="dropdown-menu">
22
+ <li><a>Packages</a></li>
23
+ <li><a href="../packages/Media%20Library%20Assistant.html"><i class="icon-folder-open"></i> Media Library Assistant</a></li>
24
+ </ul>
25
+ </li>
26
+ <li class="dropdown" id="charts-menu">
27
+ <a href="#charts" class="dropdown-toggle" data-toggle="dropdown">
28
+ Charts <b class="caret"></b></a><ul class="dropdown-menu"><li><a href="../graph_class.html"><i class="icon-list-alt"></i> Class hierarchy diagram</a></li></ul>
29
+ </li>
30
+ <li class="dropdown" id="reports-menu">
31
+ <a href="#reports" class="dropdown-toggle" data-toggle="dropdown">
32
+ Reports <b class="caret"></b></a><ul class="dropdown-menu">
33
+ <li><a href="../errors.html"><i class="icon-remove-sign"></i> Errors 
34
+ <span class="label label-info">0</span></a></li>
35
+ <li><a href="../markers.html"><i class="icon-map-marker"></i> Markers 
36
+ <ul><li>todo 
37
+ <span class="label label-info">1</span>
38
+ </li></ul></a></li>
39
+ <li><a href="../deprecated.html"><i class="icon-stop"></i> Deprecated elements 
40
+ <span class="label label-info">0</span></a></li>
41
+ </ul>
42
+ </li>
43
+ </ul></div>
44
+ </div></div>
45
+ <div class="go_to_top"><a href="#___" style="color: inherit">Back to top  <i class="icon-upload icon-white"></i></a></div>
46
+ </div>
47
+ <div id="___" class="container">
48
+ <noscript><div class="alert alert-warning">
49
+ Javascript is disabled; several features are only available
50
+ if Javascript is enabled.
51
+ </div></noscript>
52
+ <div class="row">
53
+ <div class="span4">
54
+ <span class="btn-group visibility" data-toggle="buttons-checkbox"><button class="btn public active" title="Show public elements">Public</button><button class="btn protected" title="Show protected elements">Protected</button><button class="btn private" title="Show private elements">Private</button><button class="btn inherited active" title="Show inherited elements">Inherited</button></span><div class="btn-group view pull-right" data-toggle="buttons-radio">
55
+ <button class="btn details" title="Show descriptions and method names"><i class="icon-list"></i></button><button class="btn simple" title="Show only method names"><i class="icon-align-justify"></i></button>
56
+ </div>
57
+ <ul class="side-nav nav nav-list">
58
+ <li class="nav-header">
59
+ <i class="icon-custom icon-method"></i> Methods</li>
60
+ <li class="method public "><a href="#__construct" title="__construct :: The constructor contains add_action and add_filter calls."><span class="description">The constructor contains add_action and add_filter calls.</span><pre>__construct()</pre></a></li>
61
+ <li class="method public "><a href="#mla_list_table_add_icl_styles" title="mla_list_table_add_icl_styles :: Add styles for the icl_translations table column"><span class="description">Add styles for the icl_translations table column</span><pre>mla_list_table_add_icl_styles()</pre></a></li>
62
+ <li class="method public "><a href="#mla_list_table_column_default" title="mla_list_table_column_default :: Supply a column value if no column-specific function has been defined"><span class="description">Supply a column value if no column-specific function has been defined</span><pre>mla_list_table_column_default()</pre></a></li>
63
+ <li class="method public "><a href="#mla_list_table_get_columns" title="mla_list_table_get_columns :: Filter the MLA_List_Table columns"><span class="description">Filter the MLA_List_Table columns</span><pre>mla_list_table_get_columns()</pre></a></li>
64
+ <li class="method public "><a href="#mla_list_table_new_instance" title="mla_list_table_new_instance :: Extend the MLA_List_Table class"><span class="description">Extend the MLA_List_Table class</span><pre>mla_list_table_new_instance()</pre></a></li>
65
+ <li class="method public "><a href="#mla_list_table_submenu_arguments" title="mla_list_table_submenu_arguments :: Filter the MLA_List_Table columns"><span class="description">Filter the MLA_List_Table columns</span><pre>mla_list_table_submenu_arguments()</pre></a></li>
66
+ <li class="method public "><a href="#mla_views_media_page_mla_menu_filter" title='mla_views_media_page_mla_menu_filter :: Handler for filter "views_{$this-&gt;screen-&gt;id}" in /wp-admin/includes/class-wp-list-table.php'><span class="description">Handler for filter "views_{$this-&gt;screen-&gt;id}" in /wp-admin/includes/class-wp-list-table.php</span><pre>mla_views_media_page_mla_menu_filter()</pre></a></li>
67
+ <li class="method public "><a href="#mla_wpml_media_view_upload_count_filter" title='mla_wpml_media_view_upload_count_filter :: Handler for filter "wpml-media_view-upload-count" in
68
+ /plugins/wpml-media/inc/wpml-media.class.php'><span class="description">Handler for filter "wpml-media_view-upload-count" in
69
+ /plugins/wpml-media/inc/wpml-media.class.php</span><pre>mla_wpml_media_view_upload_count_filter()</pre></a></li>
70
+ <li class="method public "><a href="#mla_wpml_media_view_upload_page_count_filter" title='mla_wpml_media_view_upload_page_count_filter :: Handler for filter "wpml-media_view-upload-page-count" in /plugins/wpml-media/inc/wpml-media.class.php'><span class="description">Handler for filter "wpml-media_view-upload-page-count" in /plugins/wpml-media/inc/wpml-media.class.php</span><pre>mla_wpml_media_view_upload_page_count_filter()</pre></a></li>
71
+ <li class="method public "><a href="#mla_wpml_media_view_upload_page_sql_filter" title='mla_wpml_media_view_upload_page_sql_filter :: Handler for filter "wpml-media_view-upload-page-sql" in /plugins/wpml-media/inc/wpml-media.class.php'><span class="description">Handler for filter "wpml-media_view-upload-page-sql" in /plugins/wpml-media/inc/wpml-media.class.php</span><pre>mla_wpml_media_view_upload_page_sql_filter()</pre></a></li>
72
+ <li class="method public "><a href="#mla_wpml_media_view_upload_sql_filter" title='mla_wpml_media_view_upload_sql_filter :: Handler for filter "wpml-media_view-upload-sql" in /plugins/wpml-media/inc/wpml-media.class.php'><span class="description">Handler for filter "wpml-media_view-upload-sql" in /plugins/wpml-media/inc/wpml-media.class.php</span><pre>mla_wpml_media_view_upload_sql_filter()</pre></a></li>
73
+ <li class="nav-header">
74
+ <i class="icon-custom icon-property"></i> Properties</li>
75
+ <li class="nav-header protected">» Protected</li>
76
+ <li class="property protected "><a href="#%24language_columns" title="$language_columns :: Table language column definitions"><span class="description">Table language column definitions</span><pre>$language_columns</pre></a></li>
77
+ <li class="property protected "><a href="#%24mla_list_table" title="$mla_list_table :: Reference to the MLA_List_Table object this object supports"><span class="description">Reference to the MLA_List_Table object this object supports</span><pre>$mla_list_table</pre></a></li>
78
+ </ul>
79
+ </div>
80
+ <div class="span8">
81
+ <a name="%5CMLA_WPML_Table" id="\MLA_WPML_Table"></a><ul class="breadcrumb">
82
+ <li>
83
+ <a href="../index.html"><i class="icon-custom icon-class"></i></a><span class="divider">\</span>
84
+ </li>
85
+ <li><a href="../namespaces/global.html">global</a></li>
86
+ <li class="active">
87
+ <span class="divider">\</span><a href="../classes/MLA_WPML_Table.html">MLA_WPML_Table</a>
88
+ </li>
89
+ </ul>
90
+ <div href="../classes/MLA_WPML_Table.html" class="element class">
91
+ <p class="short_description">Class MLA (Media Library Assistant) WPML Table provides support for the WPML Multilingual CMS
92
+ family of plugins, including WPML Media, for an MLA_List_Table object.</p>
93
+ <div class="details">
94
+ <p class="long_description"><p>An instance of this class is created in the class MLA_List_Table constructor (class-mla-list-table.php).</p></p>
95
+ <table class="table table-bordered">
96
+ <tr>
97
+ <th>package</th>
98
+ <td><a href="../packages/Media%20Library%20Assistant.html">Media Library Assistant</a></td>
99
+ </tr>
100
+ <tr>
101
+ <th>since</th>
102
+ <td>2.11</td>
103
+ </tr>
104
+ </table>
105
+ <h3>
106
+ <i class="icon-custom icon-method"></i> Methods</h3>
107
+ <a name="__construct" id="__construct"></a><div class="element clickable method public __construct" data-toggle="collapse" data-target=".__construct .collapse">
108
+ <h2>The constructor contains add_action and add_filter calls.</h2>
109
+ <pre>__construct(object $table) : void</pre>
110
+ <div class="labels"></div>
111
+ <div class="row collapse"><div class="detail-description">
112
+ <p class="long_description"></p>
113
+ <table class="table table-bordered"><tr>
114
+ <th>since</th>
115
+ <td>2.11</td>
116
+ </tr></table>
117
+ <h3>Parameters</h3>
118
+ <div class="subelement argument">
119
+ <h4>$table</h4>
120
+ <code>object</code><p>The MLA_List_Table object this object supports</p></div>
121
+ </div></div>
122
+ </div>
123
+ <a name="mla_list_table_add_icl_styles" id="mla_list_table_add_icl_styles"></a><div class="element clickable method public mla_list_table_add_icl_styles" data-toggle="collapse" data-target=".mla_list_table_add_icl_styles .collapse">
124
+ <h2>Add styles for the icl_translations table column</h2>
125
+ <pre>mla_list_table_add_icl_styles() : void</pre>
126
+ <div class="labels"></div>
127
+ <div class="row collapse"><div class="detail-description">
128
+ <p class="long_description"></p>
129
+ <table class="table table-bordered"><tr>
130
+ <th>since</th>
131
+ <td>2.11</td>
132
+ </tr></table>
133
+ </div></div>
134
+ </div>
135
+ <a name="mla_list_table_column_default" id="mla_list_table_column_default"></a><div class="element clickable method public mla_list_table_column_default" data-toggle="collapse" data-target=".mla_list_table_column_default .collapse">
136
+ <h2>Supply a column value if no column-specific function has been defined</h2>
137
+ <pre>mla_list_table_column_default(string $content, array $item, array $column_name) : string</pre>
138
+ <div class="labels"></div>
139
+ <div class="row collapse"><div class="detail-description">
140
+ <p class="long_description"><p>Fills in the Language columns with the item's translation status values.</p></p>
141
+ <table class="table table-bordered"><tr>
142
+ <th>since</th>
143
+ <td>2.11</td>
144
+ </tr></table>
145
+ <h3>Parameters</h3>
146
+ <div class="subelement argument">
147
+ <h4>$content</h4>
148
+ <code>string</code><p>NULL, indicating no default content</p></div>
149
+ <div class="subelement argument">
150
+ <h4>$item</h4>
151
+ <code>array</code><p>A singular item (one full row's worth of data)</p>
152
+ </div>
153
+ <div class="subelement argument">
154
+ <h4>$column_name</h4>
155
+ <code>array</code><p>The name/slug of the column to be processed</p>
156
+ </div>
157
+ <h3>Returns</h3>
158
+ <div class="subelement response">
159
+ <code>string</code>Text or HTML to be placed inside the column</div>
160
+ </div></div>
161
+ </div>
162
+ <a name="mla_list_table_get_columns" id="mla_list_table_get_columns"></a><div class="element clickable method public mla_list_table_get_columns" data-toggle="collapse" data-target=".mla_list_table_get_columns .collapse">
163
+ <h2>Filter the MLA_List_Table columns</h2>
164
+ <pre>mla_list_table_get_columns(array $columns) : array</pre>
165
+ <div class="labels"></div>
166
+ <div class="row collapse"><div class="detail-description">
167
+ <p class="long_description"><p>Inserts the language columns just after the item thumbnail column.
168
+ Defined as static because it is called before the List_Table object is created.
169
+ Added as a filter when the file is loaded.</p></p>
170
+ <table class="table table-bordered"><tr>
171
+ <th>since</th>
172
+ <td>2.11</td>
173
+ </tr></table>
174
+ <h3>Parameters</h3>
175
+ <div class="subelement argument">
176
+ <h4>$columns</h4>
177
+ <code>array</code><p>An array of columns. format: column_slug => Column Label</p>
178
+ </div>
179
+ <h3>Returns</h3>
180
+ <div class="subelement response">
181
+ <code>array</code>updated array of columns.</div>
182
+ </div></div>
183
+ </div>
184
+ <a name="mla_list_table_new_instance" id="mla_list_table_new_instance"></a><div class="element clickable method public mla_list_table_new_instance" data-toggle="collapse" data-target=".mla_list_table_new_instance .collapse">
185
+ <h2>Extend the MLA_List_Table class</h2>
186
+ <pre>mla_list_table_new_instance(object $mla_list_table) : object</pre>
187
+ <div class="labels"></div>
188
+ <div class="row collapse"><div class="detail-description">
189
+ <p class="long_description"><p>Adds a protected variable holding a reference to the WPML_List_Table object,
190
+ then creates the WPML_List_Table passing it a reference to the new "parent" object.</p></p>
191
+ <table class="table table-bordered"><tr>
192
+ <th>since</th>
193
+ <td>2.11</td>
194
+ </tr></table>
195
+ <h3>Parameters</h3>
196
+ <div class="subelement argument">
197
+ <h4>$mla_list_table</h4>
198
+ <code>object</code><p>NULL, to indicate no extension/use the base class.</p>
199
+ </div>
200
+ <h3>Returns</h3>
201
+ <div class="subelement response">
202
+ <code>object</code>updated mla_list_table object.</div>
203
+ </div></div>
204
+ </div>
205
+ <a name="mla_list_table_submenu_arguments" id="mla_list_table_submenu_arguments"></a><div class="element clickable method public mla_list_table_submenu_arguments" data-toggle="collapse" data-target=".mla_list_table_submenu_arguments .collapse">
206
+ <h2>Filter the MLA_List_Table columns</h2>
207
+ <pre>mla_list_table_submenu_arguments(array $submenu_arguments, boolean $include_filters) : array</pre>
208
+ <div class="labels"></div>
209
+ <div class="row collapse"><div class="detail-description">
210
+ <p class="long_description"><p>Inserts the language columns just after the item thumbnail column.
211
+ Defined as static because it is called before the List_Table object is created.
212
+ Added as a filter when the file is loaded.</p></p>
213
+ <table class="table table-bordered"><tr>
214
+ <th>since</th>
215
+ <td>2.11</td>
216
+ </tr></table>
217
+ <h3>Parameters</h3>
218
+ <div class="subelement argument">
219
+ <h4>$submenu_arguments</h4>
220
+ <code>array</code><p>An array of query arguments. format: attribute => value</p>
221
+ </div>
222
+ <div class="subelement argument">
223
+ <h4>$include_filters</h4>
224
+ <code>boolean</code><p>Include the "click filter" values in the results</p>
225
+ </div>
226
+ <h3>Returns</h3>
227
+ <div class="subelement response">
228
+ <code>array</code>updated array of query arguments.</div>
229
+ </div></div>
230
+ </div>
231
+ <a name="mla_views_media_page_mla_menu_filter" id="mla_views_media_page_mla_menu_filter"></a><div class="element clickable method public mla_views_media_page_mla_menu_filter" data-toggle="collapse" data-target=".mla_views_media_page_mla_menu_filter .collapse">
232
+ <h2>Handler for filter "views_{$this-&gt;screen-&gt;id}" in /wp-admin/includes/class-wp-list-table.php</h2>
233
+ <pre>mla_views_media_page_mla_menu_filter(array $views) : array</pre>
234
+ <div class="labels"></div>
235
+ <div class="row collapse"><div class="detail-description">
236
+ <p class="long_description"><p>Filter the list of available list table views, calling the WPML filter that adds language-specific views.</p></p>
237
+ <table class="table table-bordered"><tr>
238
+ <th>since</th>
239
+ <td>2.11</td>
240
+ </tr></table>
241
+ <h3>Parameters</h3>
242
+ <div class="subelement argument">
243
+ <h4>$views</h4>
244
+ <code>array</code><p>A list of available list table views</p></div>
245
+ <h3>Returns</h3>
246
+ <div class="subelement response">
247
+ <code>array</code>Updated list of available list table views</div>
248
+ </div></div>
249
+ </div>
250
+ <a name="mla_wpml_media_view_upload_count_filter" id="mla_wpml_media_view_upload_count_filter"></a><div class="element clickable method public mla_wpml_media_view_upload_count_filter" data-toggle="collapse" data-target=".mla_wpml_media_view_upload_count_filter .collapse">
251
+ <h2>Handler for filter "wpml-media_view-upload-count" in
252
+ /plugins/wpml-media/inc/wpml-media.class.php</h2>
253
+ <pre>mla_wpml_media_view_upload_count_filter(NULL $count, string $key, string $view, string $lang) : mixed</pre>
254
+ <div class="labels"></div>
255
+ <div class="row collapse"><div class="detail-description">
256
+ <p class="long_description"><p>Computes the number of attachments that satisfy a meta_query specification.
257
+ The count is automatically made language-specific by WPML filters.</p></p>
258
+ <table class="table table-bordered"><tr>
259
+ <th>since</th>
260
+ <td>2.11</td>
261
+ </tr></table>
262
+ <h3>Parameters</h3>
263
+ <div class="subelement argument">
264
+ <h4>$count</h4>
265
+ <code>NULL</code><p>default return value if not replacing count</p></div>
266
+ <div class="subelement argument">
267
+ <h4>$key</h4>
268
+ <code>string</code><p>key/slug value for the selected view</p>
269
+ </div>
270
+ <div class="subelement argument">
271
+ <h4>$view</h4>
272
+ <code>string</code><p>HTML <a></a> tag for the link to the selected view</p>
273
+ </div>
274
+ <div class="subelement argument">
275
+ <h4>$lang</h4>
276
+ <code>string</code><p>language code, e.g., 'en', 'es'</p>
277
+ </div>
278
+ <h3>Returns</h3>
279
+ <div class="subelement response">
280
+ <code>mixed</code>NULL to allow SQL query or replacement count value</div>
281
+ </div></div>
282
+ </div>
283
+ <a name="mla_wpml_media_view_upload_page_count_filter" id="mla_wpml_media_view_upload_page_count_filter"></a><div class="element clickable method public mla_wpml_media_view_upload_page_count_filter" data-toggle="collapse" data-target=".mla_wpml_media_view_upload_page_count_filter .collapse">
284
+ <h2>Handler for filter "wpml-media_view-upload-page-count" in /plugins/wpml-media/inc/wpml-media.class.php</h2>
285
+ <pre>mla_wpml_media_view_upload_page_count_filter(NULL $count, string $lang) : mixed</pre>
286
+ <div class="labels"></div>
287
+ <div class="row collapse"><div class="detail-description">
288
+ <p class="long_description"><p>Computes the number of language-specific attachments that satisfy a meta_query specification.
289
+ The count is made language-specific by WPML filters when the current_language is set.</p></p>
290
+ <table class="table table-bordered"><tr>
291
+ <th>since</th>
292
+ <td>2.11</td>
293
+ </tr></table>
294
+ <h3>Parameters</h3>
295
+ <div class="subelement argument">
296
+ <h4>$count</h4>
297
+ <code>NULL</code><p>default return value if not replacing count</p></div>
298
+ <div class="subelement argument">
299
+ <h4>$lang</h4>
300
+ <code>string</code><p>language code, e.g., 'en', 'es'</p>
301
+ </div>
302
+ <h3>Returns</h3>
303
+ <div class="subelement response">
304
+ <code>mixed</code>NULL to allow SQL query or replacement count value</div>
305
+ </div></div>
306
+ </div>
307
+ <a name="mla_wpml_media_view_upload_page_sql_filter" id="mla_wpml_media_view_upload_page_sql_filter"></a><div class="element clickable method public mla_wpml_media_view_upload_page_sql_filter" data-toggle="collapse" data-target=".mla_wpml_media_view_upload_page_sql_filter .collapse">
308
+ <h2>Handler for filter "wpml-media_view-upload-page-sql" in /plugins/wpml-media/inc/wpml-media.class.php</h2>
309
+ <pre>mla_wpml_media_view_upload_page_sql_filter(string $sql, string $lang) : mixed</pre>
310
+ <div class="labels"></div>
311
+ <div class="row collapse"><div class="detail-description">
312
+ <p class="long_description"><p>Computes the number of language-specific attachments that satisfy a meta_query specification.
313
+ The count is made language-specific by WPML filters when the current_language is set.</p></p>
314
+ <table class="table table-bordered"><tr>
315
+ <th>since</th>
316
+ <td>2.11</td>
317
+ </tr></table>
318
+ <h3>Parameters</h3>
319
+ <div class="subelement argument">
320
+ <h4>$sql</h4>
321
+ <code>string</code><p>SQL query string</p></div>
322
+ <div class="subelement argument">
323
+ <h4>$lang</h4>
324
+ <code>string</code><p>language code, e.g., 'en', 'es'</p>
325
+ </div>
326
+ <h3>Returns</h3>
327
+ <div class="subelement response">
328
+ <code>mixed</code>updated SQL query string</div>
329
+ </div></div>
330
+ </div>
331
+ <a name="mla_wpml_media_view_upload_sql_filter" id="mla_wpml_media_view_upload_sql_filter"></a><div class="element clickable method public mla_wpml_media_view_upload_sql_filter" data-toggle="collapse" data-target=".mla_wpml_media_view_upload_sql_filter .collapse">
332
+ <h2>Handler for filter "wpml-media_view-upload-sql" in /plugins/wpml-media/inc/wpml-media.class.php</h2>
333
+ <pre>mla_wpml_media_view_upload_sql_filter(string $sql, string $lang) : mixed</pre>
334
+ <div class="labels"></div>
335
+ <div class="row collapse"><div class="detail-description">
336
+ <p class="long_description"><p>Computes the number of language-specific attachments that satisfy a meta_query specification.
337
+ The count is made language-specific by WPML filters when the current_language is set.</p></p>
338
+ <table class="table table-bordered"><tr>
339
+ <th>since</th>
340
+ <td>2.11</td>
341
+ </tr></table>
342
+ <h3>Parameters</h3>
343
+ <div class="subelement argument">
344
+ <h4>$sql</h4>
345
+ <code>string</code><p>SQL query string</p></div>
346
+ <div class="subelement argument">
347
+ <h4>$lang</h4>
348
+ <code>string</code><p>language code, e.g., 'en', 'es'</p>
349
+ </div>
350
+ <h3>Returns</h3>
351
+ <div class="subelement response">
352
+ <code>mixed</code>updated SQL query string</div>
353
+ </div></div>
354
+ </div>
355
+ <h3>
356
+ <i class="icon-custom icon-property"></i> Properties</h3>
357
+ <a name="%24language_columns" id="$language_columns"> </a><div class="element clickable property protected $language_columns" data-toggle="collapse" data-target=".$language_columns .collapse">
358
+ <h2>Table language column definit