Version Description
- New: The Documentation/Example Plugins submenu lets you browse the list of MLA example plugins, install or update them in the Plugins/Installed Plugins area and see which examples you have already installed. See the Other Notes section section or the Settings/Media Library Assistant Documentation tab for more information.
- New: For the Media/Assistant submenu table, you can now ceate a filter dropdown for custom field values as an alternative to taxonomy terms. The Taxonomy Support section of the Settings/Media Library Assistant General tab lets you select a custom field and set the Filter option to use it.
- New: For the
[mla_gallery]
shortcode,link=download
is now available to force a download of the gallery item. - New: A new substitution parameter Field-level option/format value, ",kbmb(t,k,m)", formats values such as file size with kilobyte and megabyte abbreviations.
- New: Mapping support can be extended to "front end" file upload plugins by adding an **"MLA_AJAX_EXCEPTIONS" entry to the
wp-config.php
file. - New: A new example plugin,
mla-ui-elements-example.php
, provides shortcodes to improve the user experience for[mla-term-list]
,[mla_tag_cloud]
and[mla_gallery]
shortcodes. - New: The
mla-insert-fixit.php
example plugin has been enhanced with "Post/Page insert Modification" tools. The new tools let you add/replace/delete attributes of the<img >
tags for items inserted in posts/pages. New "Post to Library" and "Parent to Library" tools compose an item Title from the post/page in which it appears. - New: The
mla-simple-mapping-hooks-example.php
example plugin has been enhanced with a "update_menu_order" filter that updates the WordPressmenu_order
standard field. - New: The
mla-substitution-parameter-hooks-example.php
example plugin has been enhanced with "parent_terms:" and "page_terms:" prefixes that provide access to taxonomy terms assigned to an item's parent post/page and terms of the post/page on which the[mla_gallery]
shortcode appears. - New: The
mla-substitution-parameter-hooks-example.php
example plugin has been enhanced with a "conditional:" prefix that returns different values during the initial upload process Vs other contexts. - New: A new example plugin,
mla-multi-wp-query-example.php
, provides an [mla_gallery] parameter to combine items from each of multiple "taxonomy=term" queries. - New: The
mla-custom-taxonomy-example.php
example plugin has been limited to defining three new custom taxonomies. All other functions have been moved to themla-ui-elements-example.php
example plugin. - New: Separate
mla_phrase_delimiter
andmla_term_delimiter
parameters have been added to the[mla_gallery]
terms search parameters. - New: The "request:" prefix now handles multi-level array values by supporting compound names, e.g.,
tax_input.attachment_category
. - New: For the
[mla_gallery]
shortcode,page_parent
andpage_mime_type
are now available as Gallery-specific Substitution Parameters. - New: For the
[mla_gallery]
shortcode,found_rows
,current_rows
andmax_num_pages
are now available as substitution parameters for style and markup templates. - Fix: Corrected handling of Media Manager Modal (popup) Window "Search Media" text box for WP 4.6
- Fix: For the
[mla_gallery]
shortcode, the "index" attachment-specific substitution parameter is now set to the item's place in the entire gallery for themla_output=
"previous_link", "current_link" and "next_link" values. - Fix: A JavaScript conflict with the ToolSet Views Editor "Add Media" feature has been resolved.
- Fix: For the
[mla_gallery]
shortcode, a substitution parameter expansion defect (introduced in MLA v2.31) that affected parameters such asmla_caption
has been corrected. - Fix: Access to "attachment metadata" and
image_meta
during the initial upload process has been restored. - Fix: For the
[mla_tag_cloud]
shortcode, defects in the handling of the "orderby" parameter, e.g. random sorting, have been corrected.. - Fix: Parsing of the
mla_terms_search_phrases
string has been improved to handle quoted phrases that include the phrase or term delimiters. - Fix: For the
[mla_gallery]
shortcode, invalidmla_output
values are now replaced with the default, "gallery". - Fix: For the
[mla_term_list]
shortcode, default style templates are loaded for the "checklist" and "dropdown" formats.
Download this release
Release Info
Developer | dglingren |
Plugin | Media Library Assistant |
Version | 2.32 |
Comparing to | |
See all releases |
Code changes from version 2.31 to 2.32
- examples/{alexa-paige-plugin.php.txt → alexa-paige-plugin.php} +0 -0
- examples/{buddypress-hooks-example.php.txt → buddypress-hooks-example.php} +0 -0
- examples/{mla-a-z-cloud-example.php.txt → mla-a-z-cloud-example.php} +0 -0
- examples/{mla-acf-checkbox-example.php.txt → mla-acf-checkbox-example.php} +0 -0
- examples/{mla-advanced-custom-fields-example.php.txt → mla-advanced-custom-fields-example.php} +0 -0
- examples/{mla-audio-shortcode-example.php.txt → mla-audio-shortcode-example.php} +0 -0
- examples/{mla-bulk-edit-remap-example.php.txt → mla-bulk-edit-remap-example.php} +0 -0
- examples/{mla-child-term-hooks-example.php.txt → mla-child-term-hooks-example.php} +0 -0
- examples/{mla-cloud-hooks-example.php.txt → mla-cloud-hooks-example.php} +0 -0
- examples/{mla-current-user-example.php.txt → mla-current-user-example.php} +0 -0
- examples/{mla-custom-field-search-example.php.txt → mla-custom-field-search-example.php} +0 -0
- examples/{mla-custom-nolink-example.php.txt → mla-custom-nolink-example.php} +0 -0
- examples/mla-custom-taxonomy-example.php +131 -0
- examples/mla-custom-taxonomy-example.php.txt +0 -397
- examples/{mla-custom-view-example.php.txt → mla-custom-view-example.php} +0 -0
- examples/{mla-default-featured-image-example.php.txt → mla-default-featured-image-example.php} +0 -0
- examples/{mla-dynamic-references-example.php.txt → mla-dynamic-references-example.php} +0 -0
- examples/{mla-featured-field-shortcode.php.txt → mla-featured-field-shortcode.php} +0 -0
- examples/{mla-file-name-mapping-hooks-example.php.txt → mla-file-name-mapping-hooks-example.php} +0 -0
- examples/{mla-file-size-example.php.txt → mla-file-size-example.php} +2 -2
- examples/{mla-fixed-values-example.php.txt → mla-fixed-values-example.php} +0 -0
- examples/mla-hierarchical-mapping-example.php +238 -0
- examples/{mla-hooks-example.php.txt → mla-hooks-example.php} +4 -4
- examples/{mla-image-source-control-example.php.txt → mla-image-source-control-example.php} +0 -0
- examples/{mla-insert-fixit.php.txt → mla-insert-fixit.php} +452 -111
- examples/{mla-jhdean-mapping-hooks-example.php.txt → mla-jhdean-mapping-hooks-example.php} +0 -0
- examples/{mla-list-table-extranav-example.php.txt → mla-list-table-extranav-example.php} +0 -0
- examples/{mla-list-table-hooks-example.php.txt → mla-list-table-hooks-example.php} +0 -0
- examples/{mla-mapping-hooks-example.php.txt → mla-mapping-hooks-example.php} +0 -0
- examples/{mla-mapping-parent-data-example.php.txt → mla-mapping-parent-data-example.php} +0 -0
- examples/{mla-media-modal-hooks-example.php.txt → mla-media-modal-hooks-example.php} +0 -0
- examples/{mla-media-tagger-example.php.txt → mla-media-tagger-example.php} +0 -0
- examples/{mla-metabox-hooks-example.php.txt → mla-metabox-hooks-example.php} +0 -0
- examples/{mla-metadata-mapping-hooks-example.php.txt → mla-metadata-mapping-hooks-example.php} +0 -0
- examples/mla-multi-wp-query-example.php +175 -0
- examples/{mla-project-slug-example.php.txt → mla-project-slug-example.php} +0 -0
- examples/{mla-random-galleries-example.php.txt → mla-random-galleries-example.php} +0 -0
- examples/{mla-simple-mapping-hooks-example.php.txt → mla-simple-mapping-hooks-example.php} +57 -8
- examples/mla-substitution-parameter-hooks-example.php +430 -0
- examples/mla-substitution-parameter-hooks-example.php.txt +0 -180
- examples/{mla-tax-query-example.php.txt → mla-tax-query-example.php} +0 -0
- examples/{mla-term-list-hooks-example.php.txt → mla-term-list-hooks-example.php} +0 -0
- examples/mla-ui-elements-example.php +589 -0
- examples/{mla-unattached-fixit.php.txt → mla-unattached-fixit.php} +0 -0
- examples/{mla-upload-bulk-edit-example.php.txt → mla-upload-bulk-edit-example.php} +0 -0
- examples/{mla-viewer-replacement-example.php.txt → mla-viewer-replacement-example.php} +2 -2
- examples/{mla-yoast-seo-example.php.txt → mla-yoast-seo-example.php} +0 -0
- examples/{mla-zip-archive-example.php.txt → mla-zip-archive-example.php} +0 -0
- examples/{mqtranslate-example.php.txt → mqtranslate-example.php} +0 -0
- examples/{random-feature.php.txt → random-feature.php} +0 -0
- examples/{woofixit.php.txt → woofixit.php} +0 -0
- includes/class-mla-ajax.php +4 -2
- includes/class-mla-core-options.php +20 -2
- includes/class-mla-core.php +62 -3
- includes/class-mla-data-query.php +99 -8
- includes/class-mla-data-source.php +1 -1
- includes/class-mla-data.php +53 -32
- includes/class-mla-example-list-table.php +1349 -0
- includes/class-mla-file-downloader.php +123 -0
- includes/class-mla-list-table.php +52 -0
- includes/class-mla-media-modal-ajax.php +1 -0
- includes/class-mla-media-modal.php +5 -1
- includes/class-mla-options.php +27 -2
- includes/class-mla-settings.php +264 -71
- includes/class-mla-shortcode-support.php +243 -189
- includes/class-mla-upload-list-table.php +1 -1
- includes/class-mla-upload-optional-list-table.php +3 -3
- includes/mla-file-downloader.php +22 -0
- includes/mla-plugin-loader.php +26 -8
- index.php +4 -2
- js/mla-media-modal-scripts.js +29 -15
- js/mla-media-modal-scripts.min.js +1 -1
- phpDocs/.htaccess +5 -0
- phpDocs/classes.svg +0 -340
- phpDocs/classes/CPAC_Storage_Model_MLA.html +768 -282
- phpDocs/classes/MLA.html +1849 -741
- phpDocs/classes/MLACore.html +2340 -940
- phpDocs/classes/MLACoreOptions.html +1767 -557
- phpDocs/classes/MLAData.html +248 -1192
examples/{alexa-paige-plugin.php.txt → alexa-paige-plugin.php}
RENAMED
File without changes
|
examples/{buddypress-hooks-example.php.txt → buddypress-hooks-example.php}
RENAMED
File without changes
|
examples/{mla-a-z-cloud-example.php.txt → mla-a-z-cloud-example.php}
RENAMED
File without changes
|
examples/{mla-acf-checkbox-example.php.txt → mla-acf-checkbox-example.php}
RENAMED
File without changes
|
examples/{mla-advanced-custom-fields-example.php.txt → mla-advanced-custom-fields-example.php}
RENAMED
File without changes
|
examples/{mla-audio-shortcode-example.php.txt → mla-audio-shortcode-example.php}
RENAMED
File without changes
|
examples/{mla-bulk-edit-remap-example.php.txt → mla-bulk-edit-remap-example.php}
RENAMED
File without changes
|
examples/{mla-child-term-hooks-example.php.txt → mla-child-term-hooks-example.php}
RENAMED
File without changes
|
examples/{mla-cloud-hooks-example.php.txt → mla-cloud-hooks-example.php}
RENAMED
File without changes
|
examples/{mla-current-user-example.php.txt → mla-current-user-example.php}
RENAMED
File without changes
|
examples/{mla-custom-field-search-example.php.txt → mla-custom-field-search-example.php}
RENAMED
File without changes
|
examples/{mla-custom-nolink-example.php.txt → mla-custom-nolink-example.php}
RENAMED
File without changes
|
examples/mla-custom-taxonomy-example.php
ADDED
@@ -0,0 +1,131 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
Plugin Name: MLA Custom Taxonomy Example
|
4 |
+
Plugin URI: http://fairtradejudaica.org/media-library-assistant-a-wordpress-plugin/
|
5 |
+
Description: Defines custom taxonomies for support topic opened on 4/15/2016 by "direys"
|
6 |
+
Author: David Lingren
|
7 |
+
Version: 1.03
|
8 |
+
Author URI: http://fairtradejudaica.org/our-story/staff/
|
9 |
+
|
10 |
+
Copyright 2016 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 Custom Taxonomy Example Defines custom taxonomies
|
28 |
+
*
|
29 |
+
* Created for support topic "How do I provide a front-end search of my media items using Custom Fields?"
|
30 |
+
* opened on 4/15/2016 by "direys".
|
31 |
+
*
|
32 |
+
* @package MLA Custom Taxonomy Example
|
33 |
+
* @since 1.00
|
34 |
+
*/
|
35 |
+
class MLACustomTaxonomyExample {
|
36 |
+
/**
|
37 |
+
* Registers Species, Rooms and Finishes custom taxonomies
|
38 |
+
*
|
39 |
+
* @since 1.00
|
40 |
+
*
|
41 |
+
* @return void
|
42 |
+
*/
|
43 |
+
public static function build_taxonomies( ) {
|
44 |
+
$labels = array(
|
45 |
+
'name' => 'Species',
|
46 |
+
'singular_name' => 'Species',
|
47 |
+
'search_items' => 'Search Species',
|
48 |
+
'all_items' => 'All Species',
|
49 |
+
'parent_item' => 'Parent Species',
|
50 |
+
'parent_item_colon' => 'Parent Species:',
|
51 |
+
'edit_item' => 'Edit Species',
|
52 |
+
'update_item' => 'Update Species',
|
53 |
+
'add_new_item' => 'Add New Species',
|
54 |
+
'new_item_name' => 'New Species',
|
55 |
+
'menu_name' => 'Species',
|
56 |
+
);
|
57 |
+
|
58 |
+
register_taxonomy(
|
59 |
+
'species',
|
60 |
+
array( 'attachment' ),
|
61 |
+
array(
|
62 |
+
'hierarchical' => true,
|
63 |
+
'labels' => $labels,
|
64 |
+
'show_ui' => true,
|
65 |
+
'query_var' => true,
|
66 |
+
'rewrite' => true,
|
67 |
+
'update_count_callback' => '_update_generic_term_count'
|
68 |
+
)
|
69 |
+
);
|
70 |
+
|
71 |
+
$labels = array(
|
72 |
+
'name' => 'Rooms',
|
73 |
+
'singular_name' => 'Room',
|
74 |
+
'search_items' => 'Search Rooms',
|
75 |
+
'all_items' => 'All Rooms',
|
76 |
+
'parent_item' => 'Parent Room',
|
77 |
+
'parent_item_colon' => 'Parent Room:',
|
78 |
+
'edit_item' => 'Edit Room',
|
79 |
+
'update_item' => 'Update Room',
|
80 |
+
'add_new_item' => 'Add New Room',
|
81 |
+
'new_item_name' => 'New Room',
|
82 |
+
'menu_name' => 'Room',
|
83 |
+
);
|
84 |
+
|
85 |
+
register_taxonomy(
|
86 |
+
'room',
|
87 |
+
array( 'attachment' ),
|
88 |
+
array(
|
89 |
+
'hierarchical' => false,
|
90 |
+
'labels' => $labels,
|
91 |
+
'show_ui' => true,
|
92 |
+
'query_var' => true,
|
93 |
+
'rewrite' => true,
|
94 |
+
'update_count_callback' => '_update_generic_term_count'
|
95 |
+
)
|
96 |
+
);
|
97 |
+
|
98 |
+
$labels = array(
|
99 |
+
'name' => 'Finishes',
|
100 |
+
'singular_name' => 'Finish',
|
101 |
+
'search_items' => 'Search Finishes',
|
102 |
+
'all_items' => 'All Finishes',
|
103 |
+
'parent_item' => 'Parent Finish',
|
104 |
+
'parent_item_colon' => 'Parent Finish:',
|
105 |
+
'edit_item' => 'Edit Finish',
|
106 |
+
'update_item' => 'Update Finish',
|
107 |
+
'add_new_item' => 'Add New Finish',
|
108 |
+
'new_item_name' => 'New Finish',
|
109 |
+
'menu_name' => 'Finish',
|
110 |
+
);
|
111 |
+
|
112 |
+
register_taxonomy(
|
113 |
+
'finish',
|
114 |
+
array( 'attachment' ),
|
115 |
+
array(
|
116 |
+
'hierarchical' => false,
|
117 |
+
'labels' => $labels,
|
118 |
+
'show_ui' => true,
|
119 |
+
'query_var' => true,
|
120 |
+
'rewrite' => true,
|
121 |
+
'update_count_callback' => '_update_generic_term_count'
|
122 |
+
)
|
123 |
+
);
|
124 |
+
} // build_taxonomies
|
125 |
+
} // Class MLACustomTaxonomyExample
|
126 |
+
|
127 |
+
/*
|
128 |
+
* Install the filters at an early opportunity
|
129 |
+
*/
|
130 |
+
add_action('init', 'MLACustomTaxonomyExample::build_taxonomies');
|
131 |
+
?>
|
examples/mla-custom-taxonomy-example.php.txt
DELETED
@@ -1,397 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
Plugin Name: MLA Custom Taxonomy Example
|
4 |
-
Plugin URI: http://fairtradejudaica.org/media-library-assistant-a-wordpress-plugin/
|
5 |
-
Description: Defines custom taxonomies and uses mla_term_list to provide mla_gallery filtering.
|
6 |
-
Author: David Lingren
|
7 |
-
Version: 1.02
|
8 |
-
Author URI: http://fairtradejudaica.org/our-story/staff/
|
9 |
-
|
10 |
-
Copyright 2016 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 Custom Taxonomy Example Defines custom taxonomies and uses mla_term_list
|
28 |
-
* to provide mla_gallery filtering
|
29 |
-
*
|
30 |
-
* Created for support topic "How do I provide a front-end search of my media items using Custom Fields?"
|
31 |
-
* opened on 4/15/2016 by "direys":
|
32 |
-
* https://wordpress.org/support/topic/how-do-i-provide-a-front-end-search-of-my-media-items-using-custom-fields
|
33 |
-
*
|
34 |
-
* Enhanced for support topic "Dynamic search and filters"
|
35 |
-
* opened on 5/28/2016 by "ghislainsc"
|
36 |
-
* https://wordpress.org/support/topic/dynamic-search-and-filters#post-8480233
|
37 |
-
*
|
38 |
-
* @package MLA Custom Taxonomy Example
|
39 |
-
* @since 1.00
|
40 |
-
*/
|
41 |
-
class MLACustomTaxonomyExample {
|
42 |
-
/**
|
43 |
-
* Initialization function, similar to __construct()
|
44 |
-
*
|
45 |
-
* @since 1.00
|
46 |
-
*/
|
47 |
-
public static function initialize() {
|
48 |
-
// Comment out the next line to eliminate the custom taxonomies
|
49 |
-
self::_build_taxonomies();
|
50 |
-
|
51 |
-
// The filters are only useful for front-end posts/pages; exit if in the admin section
|
52 |
-
if ( is_admin() )
|
53 |
-
return;
|
54 |
-
|
55 |
-
add_filter( 'mla_term_list_attributes', 'MLACustomTaxonomyExample::mla_term_list_attributes', 10, 1 );
|
56 |
-
add_filter( 'mla_gallery_attributes', 'MLACustomTaxonomyExample::mla_gallery_attributes', 10, 1 );
|
57 |
-
|
58 |
-
// Add the custom shortcode for generating the items per page
|
59 |
-
add_shortcode( 'mcte_per_page', 'MLACustomTaxonomyExample::mcte_per_page' );
|
60 |
-
|
61 |
-
// Add the custom shortcode for generating "sticky" term search text boxes
|
62 |
-
add_shortcode( 'mcte_terms_search', 'MLACustomTaxonomyExample::mcte_terms_search' );
|
63 |
-
}
|
64 |
-
|
65 |
-
/**
|
66 |
-
* Registers Species, Rooms and Finishes custom taxonomies
|
67 |
-
*
|
68 |
-
* @since 1.00
|
69 |
-
*
|
70 |
-
* @return void
|
71 |
-
*/
|
72 |
-
private static function _build_taxonomies( ) {
|
73 |
-
$labels = array(
|
74 |
-
'name' => 'Species',
|
75 |
-
'singular_name' => 'Species',
|
76 |
-
'search_items' => 'Search Species',
|
77 |
-
'all_items' => 'All Species',
|
78 |
-
'parent_item' => 'Parent Species',
|
79 |
-
'parent_item_colon' => 'Parent Species:',
|
80 |
-
'edit_item' => 'Edit Species',
|
81 |
-
'update_item' => 'Update Species',
|
82 |
-
'add_new_item' => 'Add New Species',
|
83 |
-
'new_item_name' => 'New Species',
|
84 |
-
'menu_name' => 'Species',
|
85 |
-
);
|
86 |
-
|
87 |
-
register_taxonomy(
|
88 |
-
'species',
|
89 |
-
array( 'attachment' ),
|
90 |
-
array(
|
91 |
-
'hierarchical' => true,
|
92 |
-
'labels' => $labels,
|
93 |
-
'show_ui' => true,
|
94 |
-
'query_var' => true,
|
95 |
-
'rewrite' => true,
|
96 |
-
'update_count_callback' => '_update_generic_term_count'
|
97 |
-
)
|
98 |
-
);
|
99 |
-
|
100 |
-
$labels = array(
|
101 |
-
'name' => 'Rooms',
|
102 |
-
'singular_name' => 'Room',
|
103 |
-
'search_items' => 'Search Rooms',
|
104 |
-
'all_items' => 'All Rooms',
|
105 |
-
'parent_item' => 'Parent Room',
|
106 |
-
'parent_item_colon' => 'Parent Room:',
|
107 |
-
'edit_item' => 'Edit Room',
|
108 |
-
'update_item' => 'Update Room',
|
109 |
-
'add_new_item' => 'Add New Room',
|
110 |
-
'new_item_name' => 'New Room',
|
111 |
-
'menu_name' => 'Room',
|
112 |
-
);
|
113 |
-
|
114 |
-
register_taxonomy(
|
115 |
-
'room',
|
116 |
-
array( 'attachment' ),
|
117 |
-
array(
|
118 |
-
'hierarchical' => false,
|
119 |
-
'labels' => $labels,
|
120 |
-
'show_ui' => true,
|
121 |
-
'query_var' => true,
|
122 |
-
'rewrite' => true,
|
123 |
-
'update_count_callback' => '_update_generic_term_count'
|
124 |
-
)
|
125 |
-
);
|
126 |
-
|
127 |
-
$labels = array(
|
128 |
-
'name' => 'Finishes',
|
129 |
-
'singular_name' => 'Finish',
|
130 |
-
'search_items' => 'Search Finishes',
|
131 |
-
'all_items' => 'All Finishes',
|
132 |
-
'parent_item' => 'Parent Finish',
|
133 |
-
'parent_item_colon' => 'Parent Finish:',
|
134 |
-
'edit_item' => 'Edit Finish',
|
135 |
-
'update_item' => 'Update Finish',
|
136 |
-
'add_new_item' => 'Add New Finish',
|
137 |
-
'new_item_name' => 'New Finish',
|
138 |
-
'menu_name' => 'Finish',
|
139 |
-
);
|
140 |
-
|
141 |
-
register_taxonomy(
|
142 |
-
'finish',
|
143 |
-
array( 'attachment' ),
|
144 |
-
array(
|
145 |
-
'hierarchical' => false,
|
146 |
-
'labels' => $labels,
|
147 |
-
'show_ui' => true,
|
148 |
-
'query_var' => true,
|
149 |
-
'rewrite' => true,
|
150 |
-
'update_count_callback' => '_update_generic_term_count'
|
151 |
-
)
|
152 |
-
);
|
153 |
-
} // _build_taxonomies
|
154 |
-
|
155 |
-
/**
|
156 |
-
* Look for 'mcte_filters' that pass the selected terms from page to page of a paginated gallery
|
157 |
-
*
|
158 |
-
* The $shortcode_attributes array is where you will find any of your own parameters that are coded in the
|
159 |
-
* shortcode, e.g., [mla_term_list use_filters=true].
|
160 |
-
*
|
161 |
-
* @since 1.00
|
162 |
-
*
|
163 |
-
* @param array the shortcode parameters passed in to the shortcode
|
164 |
-
*/
|
165 |
-
public static function mla_term_list_attributes( $shortcode_attributes ) {
|
166 |
-
|
167 |
-
// See if this is a "filtered" term list
|
168 |
-
if ( !empty( $shortcode_attributes['use_filters'] ) && ( 'true' == strtolower( $shortcode_attributes['use_filters'] ) ) ) {
|
169 |
-
// Pagination links, e.g. Previous or Next, have mcte_filters that encode the form parameters
|
170 |
-
if ( !empty( $_REQUEST['mcte_filters'] ) ) {
|
171 |
-
$filters = json_decode( trim( stripslashes( $_REQUEST['mcte_filters'] ), '"' ), true );
|
172 |
-
|
173 |
-
if ( !empty( $filters['tax_input'] ) ) {
|
174 |
-
$_REQUEST['tax_input'] = $filters['tax_input'];
|
175 |
-
}
|
176 |
-
}
|
177 |
-
|
178 |
-
// If nothing is set for this taxonomy we're done
|
179 |
-
if ( empty( $_REQUEST['tax_input'] ) || !array_key_exists( $shortcode_attributes['taxonomy'], $_REQUEST['tax_input'] ) ) {
|
180 |
-
return $shortcode_attributes;
|
181 |
-
}
|
182 |
-
|
183 |
-
$terms = $_REQUEST['tax_input'][ $shortcode_attributes['taxonomy'] ];
|
184 |
-
|
185 |
-
// Check for a dropdown control with "All Terms" selected
|
186 |
-
$option_all = array_search( '0', $terms );
|
187 |
-
if ( false !== $option_all ) {
|
188 |
-
unset( $terms[ $option_all ] );
|
189 |
-
}
|
190 |
-
|
191 |
-
// Pass selected terms to the shortcode
|
192 |
-
if ( !empty( $terms ) ) {
|
193 |
-
$shortcode_attributes[ $shortcode_attributes['mla_item_parameter'] ] = implode( ',', $_REQUEST['tax_input'][ $shortcode_attributes['taxonomy'] ] );
|
194 |
-
}
|
195 |
-
|
196 |
-
unset( $shortcode_attributes['use_filters'] );
|
197 |
-
}
|
198 |
-
|
199 |
-
return $shortcode_attributes;
|
200 |
-
} // mla_term_list_attributes
|
201 |
-
|
202 |
-
/**
|
203 |
-
* Add the taxonomy query to the shortcode, limit posts_per_page and encode filters for pagination links
|
204 |
-
*
|
205 |
-
* The $shortcode_attributes array is where you will find any of your own parameters that are coded in the
|
206 |
-
* shortcode, e.g., [mla_gallery random_category="abc"].
|
207 |
-
*
|
208 |
-
* @since 1.00
|
209 |
-
*
|
210 |
-
* @param array the shortcode parameters passed in to the shortcode
|
211 |
-
*/
|
212 |
-
public static function mla_gallery_attributes( $shortcode_attributes ) {
|
213 |
-
/*
|
214 |
-
* Only process shortcodes that allow filters
|
215 |
-
*/
|
216 |
-
if ( empty( $shortcode_attributes['add_filters_to'] ) ) {
|
217 |
-
return $shortcode_attributes;
|
218 |
-
}
|
219 |
-
|
220 |
-
// Unpack filter values encoded for pagination links
|
221 |
-
if ( !empty( $_REQUEST['mcte_filters'] ) ) {
|
222 |
-
$filters = json_decode( trim( stripslashes( $_REQUEST['mcte_filters'] ), '"' ), true );
|
223 |
-
|
224 |
-
if ( isset( $filters['mcte_terms_search'] ) ) {
|
225 |
-
$_REQUEST['mcte_terms_search'] = $filters['mcte_terms_search'];
|
226 |
-
}
|
227 |
-
|
228 |
-
if ( isset( $filters['tax_input'] ) ) {
|
229 |
-
$_REQUEST['tax_input'] = $filters['tax_input'];
|
230 |
-
}
|
231 |
-
}
|
232 |
-
|
233 |
-
// Adjust posts_per_page/numberposts
|
234 |
-
if ( !empty( $_REQUEST['mcte_per_page'] ) ) {
|
235 |
-
if ( isset( $shortcode_attributes['numberposts'] ) && ! isset( $shortcode_attributes['posts_per_page'] )) {
|
236 |
-
$shortcode_attributes['posts_per_page'] = $shortcode_attributes['numberposts'];
|
237 |
-
unset( $shortcode_attributes['numberposts'] );
|
238 |
-
}
|
239 |
-
|
240 |
-
$shortcode_attributes['posts_per_page'] = $_REQUEST['mcte_per_page'];
|
241 |
-
}
|
242 |
-
|
243 |
-
// Add the terms search parameters, if present
|
244 |
-
if ( !empty( $_REQUEST['mcte_terms_search'] ) && is_array( $_REQUEST['mcte_terms_search'] ) && !empty( $_REQUEST['mcte_terms_search']['mla_terms_phrases'] ) ) {
|
245 |
-
$mcte_terms_search = $_REQUEST['mcte_terms_search'];
|
246 |
-
foreach( $mcte_terms_search as $key => $value ) {
|
247 |
-
if ( !empty( $value ) ) {
|
248 |
-
$shortcode_attributes[ $key ] = $value;
|
249 |
-
}
|
250 |
-
}
|
251 |
-
} else {
|
252 |
-
$mcte_terms_search = array();
|
253 |
-
}
|
254 |
-
|
255 |
-
// Add the taxonomy filter(s), if present
|
256 |
-
$taxonomy = $shortcode_attributes['add_filters_to'];
|
257 |
-
$tax_input = !empty( $_REQUEST['tax_input'] ) ? $_REQUEST['tax_input'] : array();
|
258 |
-
|
259 |
-
if ( ! ( empty( $shortcode_attributes[ $taxonomy ] ) && empty( $tax_input ) ) ) {
|
260 |
-
$shortcode_attributes['tax_query'] = "array( 'relation' => 'AND', ";
|
261 |
-
|
262 |
-
// Look for the optional "simple taxonomy query" as an initial filter
|
263 |
-
if ( !empty( $shortcode_attributes[ $taxonomy ] ) ) {
|
264 |
-
$values = "array( '" . implode( "', '", explode( ',', $shortcode_attributes[ $taxonomy ] ) ) . "' )";
|
265 |
-
$shortcode_attributes['tax_query'] .= "array('taxonomy' => '{$taxonomy}' ,'field' => 'slug','terms' => {$values}, 'operator' => 'IN'), ";
|
266 |
-
unset( $shortcode_attributes[ $taxonomy ] );
|
267 |
-
}
|
268 |
-
|
269 |
-
foreach ( $tax_input as $taxonomy => $terms ) {
|
270 |
-
// Check for a dropdown control with "All Terms" selected
|
271 |
-
$option_all = array_search( '0', $terms );
|
272 |
-
if ( false !== $option_all ) {
|
273 |
-
unset( $terms[ $option_all ] );
|
274 |
-
}
|
275 |
-
|
276 |
-
if ( !empty( $terms ) ) {
|
277 |
-
$values = 'array( ' . implode( ',', $terms ) . ' )';
|
278 |
-
$shortcode_attributes['tax_query'] .= "array('taxonomy' => '{$taxonomy}' ,'field' => 'term_id','terms' => {$values}, 'operator' => 'IN'), ";
|
279 |
-
}
|
280 |
-
}
|
281 |
-
|
282 |
-
$shortcode_attributes['tax_query'] .= ')';
|
283 |
-
}
|
284 |
-
|
285 |
-
/*
|
286 |
-
* Add the filter settings to pagination URLs
|
287 |
-
*/
|
288 |
-
if ( !empty( $shortcode_attributes['mla_output'] ) ) {
|
289 |
-
|
290 |
-
$filters = urlencode( json_encode( array( 'tax_input' => $tax_input, 'mcte_terms_search' => $mcte_terms_search ) ) );
|
291 |
-
$shortcode_attributes['mla_link_href'] = '[+new_url+]?[+new_page_text+]&mcte_filters=' . $filters;
|
292 |
-
|
293 |
-
if ( !empty( $shortcode_attributes['posts_per_page'] ) ) {
|
294 |
-
$shortcode_attributes['mla_link_href'] .= '&mcte_per_page=' . $shortcode_attributes['posts_per_page'];
|
295 |
-
}
|
296 |
-
}
|
297 |
-
|
298 |
-
unset( $shortcode_attributes['add_filters_to'] );
|
299 |
-
return $shortcode_attributes;
|
300 |
-
} // mla_gallery_attributes
|
301 |
-
|
302 |
-
/**
|
303 |
-
* Items per page shortcode
|
304 |
-
*
|
305 |
-
* This shortcode generates an HTML text box with a default mcte_per_page value.
|
306 |
-
*
|
307 |
-
* @since 1.01
|
308 |
-
*
|
309 |
-
* @param array the shortcode parameters
|
310 |
-
*
|
311 |
-
* @return string HTML markup for the generated form
|
312 |
-
*/
|
313 |
-
public static function mcte_per_page( $attr ) {
|
314 |
-
if ( isset( $attr['numberposts'] ) && ! isset( $attr['posts_per_page'] )) {
|
315 |
-
$attr['posts_per_page'] = $attr['numberposts'];
|
316 |
-
unset( $attr['numberposts'] );
|
317 |
-
}
|
318 |
-
|
319 |
-
if ( !empty( $_REQUEST['mcte_per_page'] ) ) {
|
320 |
-
$posts_per_page = $_REQUEST['mcte_per_page'];
|
321 |
-
} else {
|
322 |
-
$posts_per_page = isset( $attr['posts_per_page'] ) ? $attr['posts_per_page'] : 6;
|
323 |
-
}
|
324 |
-
|
325 |
-
return '<input name="mcte_per_page" id="mcte-per-page" type="text" size="2" value="' . $posts_per_page . '" />';
|
326 |
-
} // mcte_per_page
|
327 |
-
|
328 |
-
/**
|
329 |
-
* Terms search generator shortcode
|
330 |
-
*
|
331 |
-
* This shortcode generates an HTML text box with a default mla_terms_phrases value,
|
332 |
-
* and adds hidden parameters for the other Terms Search parameters
|
333 |
-
*
|
334 |
-
* @since 1.01
|
335 |
-
*
|
336 |
-
* @param array the shortcode parameters
|
337 |
-
*
|
338 |
-
* @return string HTML markup for the generated form
|
339 |
-
*/
|
340 |
-
public static function mcte_terms_search( $attr ) {
|
341 |
-
$default_arguments = array(
|
342 |
-
'mla_terms_phrases' => '',
|
343 |
-
'mla_terms_taxonomies' => '',
|
344 |
-
'mla_phrase_delimiter' => '',
|
345 |
-
'mla_phrase_connector' => '',
|
346 |
-
'mla_term_connector' => '',
|
347 |
-
);
|
348 |
-
|
349 |
-
// Make sure $attr is an array, even if it's empty
|
350 |
-
if ( empty( $attr ) ) {
|
351 |
-
$attr = array();
|
352 |
-
} elseif ( is_string( $attr ) ) {
|
353 |
-
$attr = shortcode_parse_atts( $attr );
|
354 |
-
}
|
355 |
-
|
356 |
-
// Accept only the attributes we need and supply defaults
|
357 |
-
$arguments = shortcode_atts( $default_arguments, $attr );
|
358 |
-
|
359 |
-
// Pagination links, e.g. Previous or Next, have mcte_filters that encode the form parameters
|
360 |
-
if ( !empty( $_REQUEST['mcte_filters'] ) ) {
|
361 |
-
$filters = json_decode( trim( stripslashes( $_REQUEST['mcte_filters'] ), '"' ), true );
|
362 |
-
|
363 |
-
if ( !empty( $filters['mcte_terms_search'] ) ) {
|
364 |
-
$_REQUEST['mcte_terms_search'] = $filters['mcte_terms_search'];
|
365 |
-
}
|
366 |
-
}
|
367 |
-
|
368 |
-
// mcte_terms_search has settings from the form or pagination link
|
369 |
-
if ( !empty( $_REQUEST['mcte_terms_search'] ) && is_array( $_REQUEST['mcte_terms_search'] ) ) {
|
370 |
-
foreach ( $arguments as $key => $value ) {
|
371 |
-
if ( !empty( $_REQUEST['mcte_terms_search'][ $key ] ) ) {
|
372 |
-
$arguments[ $key ] = $_REQUEST['mcte_terms_search'][ $key ];
|
373 |
-
}
|
374 |
-
}
|
375 |
-
}
|
376 |
-
|
377 |
-
// Always supply the terms phrases text box
|
378 |
-
$return_value = '<input name="mcte_terms_search[mla_terms_phrases]" id="mcte-terms-phrases" type="text" size="20" value="' . $arguments['mla_terms_phrases'] . "\" />\n";
|
379 |
-
unset( $arguments['mla_terms_phrases'] );
|
380 |
-
|
381 |
-
// Add optional parameters
|
382 |
-
foreach( $arguments as $key => $value ) {
|
383 |
-
if ( !empty( $value ) ) {
|
384 |
-
$id_value = str_replace( '_', '-', substr( $key, 4 ) );
|
385 |
-
$return_value .= sprintf( '<input name="mcte_terms_search[%1$s]" id="mcte-%2$s" type="hidden" value="%3$s" />%4$s', $key, $id_value, $value, "\n" );
|
386 |
-
}
|
387 |
-
}
|
388 |
-
|
389 |
-
return $return_value;
|
390 |
-
} // mcte_terms_search
|
391 |
-
} // Class MLACustomTaxonomyExample
|
392 |
-
|
393 |
-
/*
|
394 |
-
* Install the filters at an early opportunity
|
395 |
-
*/
|
396 |
-
add_action('init', 'MLACustomTaxonomyExample::initialize');
|
397 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
examples/{mla-custom-view-example.php.txt → mla-custom-view-example.php}
RENAMED
File without changes
|
examples/{mla-default-featured-image-example.php.txt → mla-default-featured-image-example.php}
RENAMED
File without changes
|
examples/{mla-dynamic-references-example.php.txt → mla-dynamic-references-example.php}
RENAMED
File without changes
|
examples/{mla-featured-field-shortcode.php.txt → mla-featured-field-shortcode.php}
RENAMED
File without changes
|
examples/{mla-file-name-mapping-hooks-example.php.txt → mla-file-name-mapping-hooks-example.php}
RENAMED
File without changes
|
examples/{mla-file-size-example.php.txt → mla-file-size-example.php}
RENAMED
@@ -110,12 +110,12 @@ class MLAFileSizeExample {
|
|
110 |
// Add a formatted file size element to the existing caption.
|
111 |
if ( 'file size' == self::$shortcode_attributes['my_filter'] ) {
|
112 |
|
113 |
-
// You can use
|
114 |
$my_setting = array(
|
115 |
'data_source' => 'file_size',
|
116 |
'option' => 'raw'
|
117 |
);
|
118 |
-
$file_size = (float)
|
119 |
|
120 |
if ( 1048576 < $file_size ) {
|
121 |
$file_size = number_format( ($file_size/1048576), 3 ).' MB';
|
110 |
// Add a formatted file size element to the existing caption.
|
111 |
if ( 'file size' == self::$shortcode_attributes['my_filter'] ) {
|
112 |
|
113 |
+
// You can use MLAShortcodes::mla_get_data_source() to get anything available.
|
114 |
$my_setting = array(
|
115 |
'data_source' => 'file_size',
|
116 |
'option' => 'raw'
|
117 |
);
|
118 |
+
$file_size = (float) MLAShortcodes::mla_get_data_source( $item_values['attachment_ID'], 'single_attachment_mapping', $my_setting, NULL );
|
119 |
|
120 |
if ( 1048576 < $file_size ) {
|
121 |
$file_size = number_format( ($file_size/1048576), 3 ).' MB';
|
examples/{mla-fixed-values-example.php.txt → mla-fixed-values-example.php}
RENAMED
File without changes
|
examples/mla-hierarchical-mapping-example.php
ADDED
@@ -0,0 +1,238 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Maps taxonomy terms from "template:([+xmp:lr.hierarchicalSubject+])" in EXIF/Template rule.
|
4 |
+
*
|
5 |
+
* @package MLA Hierarchical Mapping Example
|
6 |
+
* @version 1.00
|
7 |
+
*/
|
8 |
+
|
9 |
+
/*
|
10 |
+
Plugin Name: MLA Hierarchical Mapping Example
|
11 |
+
Plugin URI: http://fairtradejudaica.org/media-library-assistant-a-wordpress-plugin/
|
12 |
+
Description: Maps taxonomy terms from "template:([+xmp:lr.hierarchicalSubject+])" in EXIF/Template rule
|
13 |
+
Author: David Lingren
|
14 |
+
Version: 1.00
|
15 |
+
Author URI: http://fairtradejudaica.org/our-story/staff/
|
16 |
+
|
17 |
+
Copyright 2016 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 Hierarchical Mapping Example hooks all of the filters provided by the IPTC/EXIF and Custom Field mapping features
|
35 |
+
*
|
36 |
+
* @package MLA Hierarchical Mapping Example
|
37 |
+
* @since 1.00
|
38 |
+
*/
|
39 |
+
class MLAHierarchicalMappingExample {
|
40 |
+
/**
|
41 |
+
* Initialization function, similar to __construct()
|
42 |
+
*
|
43 |
+
* Installs filters and actions that handle the MLA hooks for uploading and mapping.
|
44 |
+
*
|
45 |
+
* @since 1.00
|
46 |
+
*
|
47 |
+
* @return void
|
48 |
+
*/
|
49 |
+
public static function initialize() {
|
50 |
+
/*
|
51 |
+
* The filters are only useful in the admin section; exit if in the "front-end" posts/pages.
|
52 |
+
*/
|
53 |
+
if ( ! is_admin() )
|
54 |
+
return;
|
55 |
+
|
56 |
+
add_filter( 'mla_mapping_settings', 'MLAHierarchicalMappingExample::mla_mapping_settings', 10, 4 );
|
57 |
+
add_filter( 'mla_mapping_exif_value', 'MLAHierarchicalMappingExample::mla_mapping_exif_value', 10, 5 );
|
58 |
+
add_filter( 'mla_mapping_updates', 'MLAHierarchicalMappingExample::mla_mapping_updates', 10, 5 );
|
59 |
+
}
|
60 |
+
|
61 |
+
/**
|
62 |
+
* Save the taxonomy slug(s) for hierarchical mapping
|
63 |
+
*
|
64 |
+
* Array elements are:
|
65 |
+
* 'post_id' => 0,
|
66 |
+
* 'mla_iptc_metadata' => array(),
|
67 |
+
* 'mla_exif_metadata' => array(),
|
68 |
+
* 'wp_image_metadata' => array(),
|
69 |
+
*
|
70 |
+
* @since 1.00
|
71 |
+
*
|
72 |
+
* @var array
|
73 |
+
*/
|
74 |
+
private static $target_taxonomies = NULL;
|
75 |
+
|
76 |
+
/**
|
77 |
+
* MLA Mapping Settings Filter
|
78 |
+
*
|
79 |
+
* This filter is called before any mapping rules are executed.
|
80 |
+
* You can add, change or delete rules from the array.
|
81 |
+
*
|
82 |
+
* @since 1.00
|
83 |
+
*
|
84 |
+
* @param array mapping rules
|
85 |
+
* @param integer post ID to be evaluated
|
86 |
+
* @param string category/scope to evaluate against, e.g., custom_field_mapping or single_attachment_mapping
|
87 |
+
* @param array attachment_metadata, default NULL
|
88 |
+
*
|
89 |
+
* @return array updated mapping rules
|
90 |
+
*/
|
91 |
+
public static function mla_mapping_settings( $settings, $post_id, $category, $attachment_metadata ) {
|
92 |
+
/*
|
93 |
+
* Go through taxonomy rules (once) looking for hierarchical term lists
|
94 |
+
*/
|
95 |
+
if ( is_null( self::$target_taxonomies ) && array_key_exists( 'taxonomy', $settings ) ) {
|
96 |
+
self::$target_taxonomies = array();
|
97 |
+
foreach( $settings['taxonomy'] as $slug => $rule ) {
|
98 |
+
if ( false !== strpos( $rule['exif_value'], '[+xmp:lr.hierarchicalSubject+]' ) ) {
|
99 |
+
self::$target_taxonomies[ $slug ] = $rule['parent'];
|
100 |
+
}
|
101 |
+
}
|
102 |
+
}
|
103 |
+
|
104 |
+
return $settings;
|
105 |
+
} // mla_mapping_settings_filter
|
106 |
+
|
107 |
+
/**
|
108 |
+
* Build and search a cache of taxonomy and term name to term ID mappings
|
109 |
+
*
|
110 |
+
* @since 1.00
|
111 |
+
*
|
112 |
+
* @param string term name (not slug)
|
113 |
+
* @param integer zero or term's parent term_id
|
114 |
+
* @param string taxonomy slug
|
115 |
+
*
|
116 |
+
* @return integer term_id for the term name
|
117 |
+
*/
|
118 |
+
private static function _get_term_id( $term_name, $term_parent, $taxonomy ) {
|
119 |
+
static $term_cache = array();
|
120 |
+
|
121 |
+
if ( isset( $term_cache[ $taxonomy ] ) && isset( $term_cache[ $taxonomy ][ $term_parent ] ) && isset( $term_cache[ $taxonomy ][ $term_parent ][ $term_name ] ) ) {
|
122 |
+
return $term_cache[ $taxonomy ][ $term_parent ][ $term_name ];
|
123 |
+
}
|
124 |
+
|
125 |
+
$post_term = term_exists( $term_name, $taxonomy, $term_parent );
|
126 |
+
if ( $post_term !== 0 && $post_term !== NULL ) {
|
127 |
+
$term_cache[ $taxonomy ][ $term_parent ][ $term_name ] = $post_term['term_id'];
|
128 |
+
return $post_term['term_id'];
|
129 |
+
}
|
130 |
+
|
131 |
+
$post_term = wp_insert_term( $term_name, $taxonomy, array( 'parent' => $term_parent ) );
|
132 |
+
if ( ( ! is_wp_error( $post_term ) ) && isset( $post_term['term_id'] ) ) {
|
133 |
+
$term_cache[ $taxonomy ][ $term_parent ][ $term_name ] = $post_term['term_id'];
|
134 |
+
return $post_term['term_id'];
|
135 |
+
}
|
136 |
+
|
137 |
+
return 0;
|
138 |
+
} // _get_term_id
|
139 |
+
|
140 |
+
/**
|
141 |
+
* MLA Mapping EXIF Value Filter
|
142 |
+
*
|
143 |
+
* This filter is called once for each IPTC/EXIF mapping rule, after the EXIF
|
144 |
+
* portion of the rule is evaluated. You can change the new value produced by
|
145 |
+
* the rule.
|
146 |
+
*
|
147 |
+
* @since 1.00
|
148 |
+
*
|
149 |
+
* @param mixed EXIF/Template value returned by the rule
|
150 |
+
* @param array custom_field_mapping rule
|
151 |
+
* @param integer post ID to be evaluated
|
152 |
+
* @param string category/scope to evaluate against: iptc_exif_standard_mapping, iptc_exif_taxonomy_mapping or iptc_exif_custom_mapping
|
153 |
+
* @param array attachment_metadata, default NULL
|
154 |
+
*
|
155 |
+
* @return array updated rule EXIF/Template value
|
156 |
+
*/
|
157 |
+
public static function mla_mapping_exif_value( $exif_value, $setting_value, $post_id, $category, $attachment_metadata ) {
|
158 |
+
/*
|
159 |
+
* Process the taxonomy rules that contain hierarchical term lists
|
160 |
+
*/
|
161 |
+
if ( in_array( $category, array( 'iptc_exif_mapping', 'iptc_exif_taxonomy_mapping' ) ) && array_key_exists( $setting_value, self::$target_taxonomies ) ) {
|
162 |
+
// Convert single entries to an array for convenience
|
163 |
+
if ( is_string( $exif_value ) ) {
|
164 |
+
$exif_value = array( $exif_value );
|
165 |
+
}
|
166 |
+
|
167 |
+
$term_ids = array();
|
168 |
+
$root_names = array();
|
169 |
+
foreach ( $exif_value as $term_list ) {
|
170 |
+
$term_parent = self::$target_taxonomies[ $setting_value ];
|
171 |
+
$term_array = explode( '|', $term_list );
|
172 |
+
$root_names[] = $term_array[0];
|
173 |
+
foreach ( $term_array as $term_name ) {
|
174 |
+
$term_id = self::_get_term_id( $term_name, $term_parent, $setting_value );
|
175 |
+
if ( $term_id ) {
|
176 |
+
$term_ids[] = $term_parent = $term_id;
|
177 |
+
}
|
178 |
+
}
|
179 |
+
}
|
180 |
+
|
181 |
+
/*
|
182 |
+
* Use the root names as a place holder so something will be present in the item updates.
|
183 |
+
* All of the values will be added back in the mla_mapping_updates() filter.
|
184 |
+
*/
|
185 |
+
$exif_value = $root_names;
|
186 |
+
self::$all_terms[ $post_id ][ $setting_value ] = $term_ids;
|
187 |
+
}
|
188 |
+
|
189 |
+
return $exif_value;
|
190 |
+
} // mla_mapping_exif_value_filter
|
191 |
+
|
192 |
+
/**
|
193 |
+
* Share the complete termlist between mla_mapping_exif_value_filter() and mla_mapping_updates()
|
194 |
+
*
|
195 |
+
* @since 1.00
|
196 |
+
*
|
197 |
+
* @var array ( post_id => array ( term_ids ) )
|
198 |
+
*/
|
199 |
+
private static $all_terms = array();
|
200 |
+
|
201 |
+
/**
|
202 |
+
* MLA Mapping Updates Filter
|
203 |
+
*
|
204 |
+
* This filter is called AFTER all mapping rules are applied.
|
205 |
+
* You can add, change or remove updates for the attachment's
|
206 |
+
* standard fields, taxonomies and/or custom fields.
|
207 |
+
*
|
208 |
+
* @since 1.00
|
209 |
+
*
|
210 |
+
* @param array updates for the attachment's standard fields, taxonomies and/or custom fields
|
211 |
+
* @param integer post ID to be evaluated
|
212 |
+
* @param string category/scope to evaluate against: custom_field_mapping or single_attachment_mapping
|
213 |
+
* @param array mapping rules
|
214 |
+
* @param array attachment_metadata, default NULL
|
215 |
+
*
|
216 |
+
* @return array updated attachment's updates
|
217 |
+
*/
|
218 |
+
public static function mla_mapping_updates( $updates, $post_id, $category, $settings, $attachment_metadata ) {
|
219 |
+
/*
|
220 |
+
* Replace the root terms with the full list.
|
221 |
+
*/
|
222 |
+
if ( isset( self::$all_terms[ $post_id ] ) ) {
|
223 |
+
foreach( self::$all_terms[ $post_id ] as $taxonomy => $terms ) {
|
224 |
+
$updates['taxonomy_updates']['inputs'][ $taxonomy ] = $terms;
|
225 |
+
}
|
226 |
+
|
227 |
+
unset( self::$all_terms[ $post_id ] );
|
228 |
+
}
|
229 |
+
|
230 |
+
return $updates;
|
231 |
+
} // mla_mapping_updates_filter
|
232 |
+
} //MLAHierarchicalMappingExample
|
233 |
+
|
234 |
+
/*
|
235 |
+
* Install the filters at an early opportunity
|
236 |
+
*/
|
237 |
+
add_action('init', 'MLAHierarchicalMappingExample::initialize');
|
238 |
+
?>
|
examples/{mla-hooks-example.php.txt → mla-hooks-example.php}
RENAMED
@@ -991,13 +991,13 @@ class MLAGalleryHooksExample {
|
|
991 |
/*
|
992 |
* Compose the file size in different formats.
|
993 |
*
|
994 |
-
* You can use
|
995 |
*/
|
996 |
$my_setting = array(
|
997 |
'data_source' => 'file_size',
|
998 |
'option' => 'raw'
|
999 |
);
|
1000 |
-
$file_size = (float)
|
1001 |
|
1002 |
if ( 1048576 < $file_size ) {
|
1003 |
$file_size = number_format( ($file_size/1048576), 3 ).' MB';
|
@@ -1074,12 +1074,12 @@ class MLAGalleryHooksExample {
|
|
1074 |
* For the fifth example, we compose a caption with "Inserted in" links.
|
1075 |
*/
|
1076 |
if ( 'show post inserts' == self::$shortcode_attributes['my_filter'] ) {
|
1077 |
-
// You can use
|
1078 |
$my_setting = array(
|
1079 |
'data_source' => 'inserted_in',
|
1080 |
'option' => 'raw'
|
1081 |
);
|
1082 |
-
$inserted_in =
|
1083 |
|
1084 |
if ( ' ' != $inserted_in ) {
|
1085 |
/*
|
991 |
/*
|
992 |
* Compose the file size in different formats.
|
993 |
*
|
994 |
+
* You can use MLAShortcodes::mla_get_data_source() to get anything available.
|
995 |
*/
|
996 |
$my_setting = array(
|
997 |
'data_source' => 'file_size',
|
998 |
'option' => 'raw'
|
999 |
);
|
1000 |
+
$file_size = (float) MLAShortcodes::mla_get_data_source( $item_values['attachment_ID'], 'single_attachment_mapping', $my_setting, NULL );
|
1001 |
|
1002 |
if ( 1048576 < $file_size ) {
|
1003 |
$file_size = number_format( ($file_size/1048576), 3 ).' MB';
|
1074 |
* For the fifth example, we compose a caption with "Inserted in" links.
|
1075 |
*/
|
1076 |
if ( 'show post inserts' == self::$shortcode_attributes['my_filter'] ) {
|
1077 |
+
// You can use MLAShortcodes::mla_get_data_source() to get anything available.
|
1078 |
$my_setting = array(
|
1079 |
'data_source' => 'inserted_in',
|
1080 |
'option' => 'raw'
|
1081 |
);
|
1082 |
+
$inserted_in = MLAShortcodes::mla_get_data_source( $item_values['attachment_ID'], 'single_attachment_mapping', $my_setting, NULL );
|
1083 |
|
1084 |
if ( ' ' != $inserted_in ) {
|
1085 |
/*
|
examples/{mla-image-source-control-example.php.txt → mla-image-source-control-example.php}
RENAMED
File without changes
|
examples/{mla-insert-fixit.php.txt → mla-insert-fixit.php}
RENAMED
@@ -5,7 +5,7 @@
|
|
5 |
* Adds a Tools/Insert Fixit submenu with buttons to perform the operations.
|
6 |
*
|
7 |
* @package Insert Fixit
|
8 |
-
* @version 1.
|
9 |
*/
|
10 |
|
11 |
/*
|
@@ -13,7 +13,7 @@ Plugin Name: MLA Insert Fixit
|
|
13 |
Plugin URI: http://fairtradejudaica.org/media-library-assistant-a-wordpress-plugin/
|
14 |
Description: Synchronizes Media Library values to and from post/page inserted images
|
15 |
Author: David Lingren
|
16 |
-
Version: 1.
|
17 |
Author URI: http://fairtradejudaica.org/our-story/staff/
|
18 |
|
19 |
Copyright 2015-2016 David Lingren
|
@@ -47,6 +47,10 @@ Copyright 2015-2016 David Lingren
|
|
47 |
* opened on 6/4/2016 by "Levy"
|
48 |
* https://wordpress.org/support/topic/how-do-i-extract-the-id-from-inserted_in-and-featured_in
|
49 |
*
|
|
|
|
|
|
|
|
|
50 |
* @package Insert Fixit
|
51 |
* @since 1.00
|
52 |
*/
|
@@ -58,7 +62,7 @@ class Insert_Fixit {
|
|
58 |
*
|
59 |
* @var string
|
60 |
*/
|
61 |
-
const CURRENT_VERSION = '1.
|
62 |
|
63 |
/**
|
64 |
* Slug prefix for registering and enqueueing submenu pages, style sheets and scripts
|
@@ -87,7 +91,7 @@ class Insert_Fixit {
|
|
87 |
*/
|
88 |
public static function initialize() {
|
89 |
self::$wp_4dot0_plus = version_compare( get_bloginfo('version'), '4.0', '>=' );
|
90 |
-
|
91 |
add_action( 'admin_menu', 'Insert_Fixit::admin_menu_action' );
|
92 |
}
|
93 |
|
@@ -130,38 +134,51 @@ class Insert_Fixit {
|
|
130 |
* @return void Echoes HTML markup for the submenu page
|
131 |
*/
|
132 |
public static function render_tools_page() {
|
133 |
-
error_log( 'Insert_Fixit::render_tools_page() $_REQUEST = ' . var_export( $_REQUEST, true ), 0 );
|
134 |
if ( !current_user_can( 'manage_options' ) ) {
|
135 |
echo "Insert Fixit - Error</h2>\n";
|
136 |
wp_die( 'You do not have permission to manage plugin settings.' );
|
137 |
}
|
138 |
-
|
139 |
$setting_actions = array(
|
140 |
-
'help' => array( 'handler' => '', 'comment' => '<strong>Enter first and (optional) last ID values above to restrict tool application range</strong>. To operate on one ID, enter just the "First ID". The default is to perform the operation on <strong>all posts/pages</strong> and <strong>all Media Library items (attachments)</strong>.<br /> <br />You can find post/page ID values by hovering over the post/page title in the "Title" column of the All Posts/All Pages submenu tables; look for the number following <code>post=</code
|
141 |
'warning' => array( 'handler' => '', 'comment' => '<strong>These tools make permanent updates to your database.</strong> Make a backup before you use the tools so you can restore your old values if you don’t like the results.' ),
|
142 |
|
143 |
-
'
|
144 |
-
'ALT from Library' => array( 'handler' => '
|
145 |
'comment' => 'Copy ALT Text from Media Library item to Post/Page inserts.' ),
|
146 |
-
'
|
147 |
-
'ALT to Library' => array( 'handler' => '
|
148 |
'comment' => 'Copy ALT Text from Post/Page inserts to Media Library item' ),
|
149 |
-
'
|
150 |
-
|
151 |
-
'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
152 |
'Attach Inserted In' => array( 'handler' => '_attach_inserted_in',
|
153 |
'comment' => 'Attach items to the first Post/Page they are inserted in' ),
|
154 |
'Attach Featured In' => array( 'handler' => '_attach_featured_in',
|
155 |
'comment' => 'Attach items to the first Post/Page for which they are the Featured Image' ),
|
156 |
-
'
|
157 |
-
'
|
158 |
-
'
|
159 |
'Image Inserts' => array( 'handler' => '_build_image_inserts_cache',
|
160 |
'comment' => 'Find all post/page inserts and save in cache for fifteen minutes' ),
|
161 |
'Image objects' => array( 'handler' => '_build_image_objects_cache',
|
162 |
'comment' => 'Find all image items and save in cache for fifteen minutes' ),
|
163 |
);
|
164 |
-
|
165 |
echo '<div class="wrap">' . "\n";
|
166 |
echo "\t\t" . '<div id="icon-tools" class="icon32"><br/></div>' . "\n";
|
167 |
echo "\t\t" . '<h2>Insert Fixit Tools v' . self::CURRENT_VERSION . '</h2>' . "\n";
|
@@ -172,7 +189,8 @@ error_log( 'Insert_Fixit::render_tools_page() $_REQUEST = ' . var_export( $_REQU
|
|
172 |
$action = $setting_actions[ $label ]['handler'];
|
173 |
if ( ! empty( $action ) ) {
|
174 |
if ( method_exists( 'Insert_Fixit', $action ) ) {
|
175 |
-
echo
|
|
|
176 |
} else {
|
177 |
echo "\t\t<br>ERROR: handler does not exist for action: \"{$label}\"\n";
|
178 |
}
|
@@ -184,35 +202,73 @@ error_log( 'Insert_Fixit::render_tools_page() $_REQUEST = ' . var_export( $_REQU
|
|
184 |
}
|
185 |
}
|
186 |
|
|
|
|
|
|
|
|
|
187 |
$post_lower = isset( $_REQUEST[ self::SLUG_PREFIX . 'post_lower' ] ) ? $_REQUEST[ self::SLUG_PREFIX . 'post_lower' ] : '';
|
|
|
188 |
$post_upper = isset( $_REQUEST[ self::SLUG_PREFIX . 'post_upper' ] ) ? $_REQUEST[ self::SLUG_PREFIX . 'post_upper' ] : '';
|
|
|
189 |
$attachment_lower = isset( $_REQUEST[ self::SLUG_PREFIX . 'attachment_lower' ] ) ? $_REQUEST[ self::SLUG_PREFIX . 'attachment_lower' ] : '';
|
|
|
190 |
$attachment_upper = isset( $_REQUEST[ self::SLUG_PREFIX . 'attachment_upper' ] ) ? $_REQUEST[ self::SLUG_PREFIX . 'attachment_upper' ] : '';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
191 |
|
192 |
echo "\t\t" . '<div style="width:700px">' . "\n";
|
193 |
echo "\t\t" . '<form action="' . admin_url( 'tools.php?page=' . self::SLUG_PREFIX . 'tools' ) . '" method="post" class="' . self::SLUG_PREFIX . 'tools-form-class" id="' . self::SLUG_PREFIX . 'tools-form-id">' . "\n";
|
194 |
-
echo "\t\t" . ' <p class="submit" style="padding-bottom: 0;">' . "\n";
|
195 |
echo "\t\t" . ' <table>' . "\n";
|
196 |
|
197 |
echo "\t\t" . ' <tr valign="top">' . "\n";
|
198 |
-
echo "\t\t" . ' <td width="24%" style="text-align: right; padding-right: 5px" >First Post/Page ID</td>' . "\n";
|
199 |
echo "\t\t" . ' <td width="24%" style="text-align: left;">' . "\n";
|
|
|
200 |
echo "\t\t" . ' <input name="' . self::SLUG_PREFIX . 'post_lower" type="text" size="5" value="' . $post_lower . '">' . "\n";
|
201 |
echo "\t\t" . ' </td>' . "\n";
|
202 |
-
echo "\t\t" . ' <td width="24%" style="text-align: right; padding-right: 5px" >First Attachment ID</td>' . "\n";
|
203 |
-
echo "\t\t" . ' <td width="24%" style="text-align: left;"
|
204 |
-
echo "\t\t" . '
|
205 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
206 |
echo "\t\t" . ' <tr valign="top">' . "\n";
|
207 |
-
echo "\t\t" . ' <td width="24%" style="text-align: right; padding-right: 5px" >
|
208 |
-
echo "\t\t" . ' <td style="text-align: left;"
|
209 |
-
echo "\t\t" . '
|
210 |
-
echo "\t\t" . '
|
|
|
|
|
|
|
|
|
|
|
|
|
211 |
echo "\t\t" . ' </tr>' . "\n";
|
212 |
echo "\t\t" . ' </table>' . "\n";
|
213 |
-
|
214 |
echo "\t\t" . ' <table>' . "\n";
|
215 |
-
|
216 |
foreach ( $setting_actions as $label => $action ) {
|
217 |
if ( empty( $action['handler'] ) ) {
|
218 |
echo "\t\t" . ' <tr><td colspan=2 style="padding: 2px 0px;">' . $action['comment'] . "</td></tr>\n";
|
@@ -224,7 +280,7 @@ error_log( 'Insert_Fixit::render_tools_page() $_REQUEST = ' . var_export( $_REQU
|
|
224 |
echo "\t\t" . ' </td></tr>' . "\n";
|
225 |
}
|
226 |
}
|
227 |
-
|
228 |
echo "\t\t" . ' </table>' . "\n";
|
229 |
echo "\t\t" . ' </p>' . "\n";
|
230 |
echo "\t\t" . '</form>' . "\n";
|
@@ -237,7 +293,7 @@ error_log( 'Insert_Fixit::render_tools_page() $_REQUEST = ' . var_export( $_REQU
|
|
237 |
* post/page ID => array(
|
238 |
* 'content' => post_content,
|
239 |
* 'files' => URL to img src,
|
240 |
-
* 'inserts' => array( 'src', src_offset', 'alt', 'alt_offset' )
|
241 |
* 'replacements' => array()
|
242 |
* )
|
243 |
*
|
@@ -258,18 +314,18 @@ error_log( 'Insert_Fixit::render_tools_page() $_REQUEST = ' . var_export( $_REQU
|
|
258 |
*/
|
259 |
private static function _build_image_inserts_cache( $use_cache = false ) {
|
260 |
global $wpdb;
|
261 |
-
|
262 |
if ( $use_cache ) {
|
263 |
self::$image_inserts = get_transient( self::SLUG_PREFIX . 'image_inserts' );
|
264 |
if ( is_array( self::$image_inserts ) ) {
|
265 |
-
error_log( __LINE__ . " Insert_Fixit::_build_image_inserts_cache using cached self::\$image_inserts " . var_export( self::$image_inserts, true ), 0 );
|
266 |
return;
|
267 |
}
|
268 |
}
|
269 |
|
270 |
$return = delete_transient( self::SLUG_PREFIX . 'image_inserts' );
|
271 |
-
error_log( __LINE__ . " Insert_Fixit::_build_image_inserts_cache delete_transient return = " . var_export( $return, true ), 0 );
|
272 |
-
|
273 |
if ( ! empty( $_REQUEST[ self::SLUG_PREFIX . 'post_lower' ] ) ) {
|
274 |
$lower_bound = (integer) $_REQUEST[ self::SLUG_PREFIX . 'post_lower' ];
|
275 |
} else {
|
@@ -286,37 +342,55 @@ error_log( __LINE__ . " Insert_Fixit::_build_image_inserts_cache delete_transien
|
|
286 |
|
287 |
$query = sprintf( 'SELECT ID, post_content FROM %1$s WHERE ( post_type IN ( \'post\', \'page\' ) AND ( post_status = \'publish\' ) AND ( ID >= %2$d ) AND ( ID <= %3$d ) AND ( post_content LIKE \'%4$s\' ) ) ORDER BY ID', $wpdb->posts, $lower_bound, $upper_bound, '%<img%' );
|
288 |
$results = $wpdb->get_results( $query );
|
289 |
-
error_log( __LINE__ . ' Insert_Fixit::_build_image_inserts_cache() $results = ' . var_export( $results, true ), 0 );
|
290 |
|
291 |
$upload_dir = wp_upload_dir();
|
292 |
-
error_log( __LINE__ . ' Insert_Fixit::_build_image_inserts_cache() $upload_dir = ' . var_export( $upload_dir, true ), 0 );
|
293 |
$upload_dir = $upload_dir['baseurl'] . '/';
|
294 |
|
295 |
$image_inserts = array();
|
296 |
foreach ( $results as $result ) {
|
297 |
-
$match_count = preg_match_all( '/\<img.*src="([^"]*)"
|
298 |
-
error_log( __LINE__ . " Insert_Fixit::_build_image_inserts_cache( {$result->ID} ) \$matches = " . var_export( $matches, true ), 0 );
|
299 |
if ( $match_count ) {
|
300 |
$image_inserts[ $result->ID ]['content'] = $result->post_content;
|
301 |
|
|
|
|
|
|
|
|
|
|
|
|
|
302 |
foreach( $matches[1] as $index => $match ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
303 |
$file = str_replace( $upload_dir, '', $match[0] );
|
304 |
$image_inserts[ $result->ID ]['files'][] = $file;
|
305 |
-
$image_inserts[ $result->ID ]['inserts'][ $index ]
|
|
|
306 |
}
|
307 |
|
308 |
-
|
309 |
-
|
310 |
-
$
|
|
|
|
|
|
|
|
|
|
|
311 |
}
|
312 |
|
313 |
$image_inserts[ $result->ID ]['replacements'] = array();
|
314 |
}
|
315 |
}
|
316 |
-
error_log( __LINE__ . " Insert_Fixit::_build_image_inserts_cache \$image_inserts " . var_export($image_inserts, true ), 0 );
|
317 |
|
318 |
$return = set_transient( self::SLUG_PREFIX . 'image_inserts', $image_inserts, 900 ); // fifteen minutes
|
319 |
-
error_log( __LINE__ . " Insert_Fixit::_build_image_inserts_cache set_transient return = " . var_export( $return, true ), 0 );
|
|
|
320 |
self::$image_inserts = $image_inserts;
|
321 |
return 'Image inserts cache refreshed.';
|
322 |
} // _build_image_inserts_cache
|
@@ -340,7 +414,7 @@ error_log( __LINE__ . " Insert_Fixit::_build_image_inserts_cache set_transient r
|
|
340 |
*/
|
341 |
private static function _build_featured_objects_cache( $use_cache = false, $unattached_only = false ) {
|
342 |
global $wpdb;
|
343 |
-
|
344 |
if ( $use_cache ) {
|
345 |
self::$featured_objects = get_transient( self::SLUG_PREFIX . 'featured_objects' );
|
346 |
if ( is_array( self::$featured_objects ) ) {
|
@@ -351,7 +425,7 @@ error_log( __LINE__ . " Insert_Fixit::_build_image_inserts_cache set_transient r
|
|
351 |
|
352 |
$return = delete_transient( self::SLUG_PREFIX . 'featured_objects' );
|
353 |
//error_log( __LINE__ . " Insert_Fixit::_build_featured_objects_cache delete_transient return = " . var_export( $return, true ), 0 );
|
354 |
-
|
355 |
if ( ! empty( $_REQUEST[ self::SLUG_PREFIX . 'attachment_lower' ] ) ) {
|
356 |
$lower_bound = (integer) $_REQUEST[ self::SLUG_PREFIX . 'attachment_lower' ];
|
357 |
} else {
|
@@ -370,7 +444,7 @@ error_log( __LINE__ . " Insert_Fixit::_build_image_inserts_cache set_transient r
|
|
370 |
$query[] = "SELECT p.ID, m.post_id FROM {$wpdb->postmeta} AS m INNER JOIN";
|
371 |
|
372 |
$where = str_replace( '%', '%%', wp_post_mime_type_where( 'image', '' ) );
|
373 |
-
|
374 |
if ( $unattached_only ) {
|
375 |
$where .= ' AND post_parent = 0';
|
376 |
}
|
@@ -389,10 +463,10 @@ error_log( __LINE__ . " Insert_Fixit::_build_image_inserts_cache set_transient r
|
|
389 |
$references[ $result->ID ][] = $result->post_id;
|
390 |
}
|
391 |
}
|
392 |
-
|
393 |
$return = set_transient( self::SLUG_PREFIX . 'featured_objects', $references, 900 ); // fifteen minutes
|
394 |
//error_log( __LINE__ . " Insert_Fixit::_build_featured_objects_cache set_transient return = " . var_export( $return, true ), 0 );
|
395 |
-
error_log( __LINE__ . " Insert_Fixit::_build_featured_objects_cache
|
396 |
self::$featured_objects = $references;
|
397 |
return 'Featured objects cache refreshed.';
|
398 |
} // _build_featured_objects_cache
|
@@ -416,18 +490,18 @@ error_log( __LINE__ . " Insert_Fixit::_build_featured_objects_cache set_transien
|
|
416 |
*/
|
417 |
private static function _build_image_objects_cache( $use_cache = false, $unattached_only = false ) {
|
418 |
global $wpdb;
|
419 |
-
|
420 |
if ( $use_cache ) {
|
421 |
self::$image_objects = get_transient( self::SLUG_PREFIX . 'image_objects' );
|
422 |
if ( is_array( self::$image_objects ) ) {
|
423 |
-
error_log( __LINE__ . " Insert_Fixit::_build_image_objects_cache using cached self::\$image_objects " . var_export( self::$image_objects, true ), 0 );
|
424 |
return;
|
425 |
}
|
426 |
}
|
427 |
|
428 |
$return = delete_transient( self::SLUG_PREFIX . 'image_objects' );
|
429 |
-
error_log( __LINE__ . " Insert_Fixit::_build_image_objects_cache delete_transient return = " . var_export( $return, true ), 0 );
|
430 |
-
|
431 |
if ( ! empty( $_REQUEST[ self::SLUG_PREFIX . 'attachment_lower' ] ) ) {
|
432 |
$lower_bound = (integer) $_REQUEST[ self::SLUG_PREFIX . 'attachment_lower' ];
|
433 |
} else {
|
@@ -443,20 +517,20 @@ error_log( __LINE__ . " Insert_Fixit::_build_image_objects_cache delete_transien
|
|
443 |
}
|
444 |
|
445 |
$where = str_replace( '%', '%%', wp_post_mime_type_where( 'image', '' ) );
|
446 |
-
|
447 |
if ( $unattached_only ) {
|
448 |
$where .= ' AND post_parent = 0';
|
449 |
}
|
450 |
-
|
451 |
$query = sprintf( 'SELECT ID FROM %1$s WHERE ( ( post_type = \'attachment\' ) %2$s AND ( ID >= %3$d ) AND ( ID <= %4$d ) ) ORDER BY ID', $wpdb->posts, $where, $lower_bound, $upper_bound );
|
452 |
$results = $wpdb->get_results( $query );
|
453 |
-
error_log( __LINE__ . ' Insert_Fixit::_build_image_objects_cache() $results = ' . var_export( $results, true ), 0 );
|
454 |
|
455 |
/*
|
456 |
* Load the image_inserts array
|
457 |
*/
|
458 |
self::_build_image_inserts_cache( true );
|
459 |
-
|
460 |
$references = array();
|
461 |
foreach ( $results as $result ) {
|
462 |
// assemble the files
|
@@ -499,7 +573,7 @@ error_log( __LINE__ . ' Insert_Fixit::_build_image_objects_cache() $results = '
|
|
499 |
* The array value is the post/page ID
|
500 |
*/
|
501 |
$inserts = array();
|
502 |
-
|
503 |
foreach( $files as $file ) {
|
504 |
foreach ( self::$image_inserts as $insert_id => $value ) {
|
505 |
if ( in_array( $file, $value['files'] ) ) {
|
@@ -507,19 +581,173 @@ error_log( __LINE__ . ' Insert_Fixit::_build_image_objects_cache() $results = '
|
|
507 |
}
|
508 |
} // foreach insert
|
509 |
} // foreach file
|
510 |
-
|
511 |
if ( ! empty( $inserts ) ) {
|
512 |
$references[ $result->ID ] = $inserts;
|
513 |
}
|
514 |
} // each result
|
515 |
|
516 |
$return = set_transient( self::SLUG_PREFIX . 'image_objects', $references, 900 ); // fifteen minutes
|
517 |
-
error_log( __LINE__ . " Insert_Fixit::_build_image_objects_cache set_transient return = " . var_export( $return, true ), 0 );
|
518 |
-
error_log( __LINE__ . " Insert_Fixit::_build_image_objects_cache
|
519 |
self::$image_objects = $references;
|
520 |
return 'Image objects cache refreshed.';
|
521 |
} // _build_image_objects_cache
|
522 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
523 |
/**
|
524 |
* Copy ALT Text from Media Library item to Post/Page inserts
|
525 |
*
|
@@ -527,69 +755,69 @@ error_log( __LINE__ . " Insert_Fixit::_build_image_objects_cache set_transient r
|
|
527 |
*
|
528 |
* @return string HTML markup for results/messages
|
529 |
*/
|
530 |
-
private static function
|
531 |
global $wpdb;
|
532 |
-
|
533 |
/*
|
534 |
* Load the image_inserts array
|
535 |
*/
|
536 |
self::_build_image_inserts_cache( true );
|
537 |
-
|
538 |
/*
|
539 |
* Load the image_objects array
|
540 |
*/
|
541 |
self::_build_image_objects_cache( true );
|
542 |
-
|
543 |
// Initialize statistics
|
544 |
$image_inserts = count( self::$image_inserts );
|
545 |
$image_objects = count( self::$image_objects );
|
546 |
$updates = 0;
|
547 |
$updated_posts = 0;
|
548 |
$errors = 0;
|
549 |
-
|
550 |
foreach ( self::$image_objects as $attachment_id => $references ) {
|
551 |
$alt_text = get_metadata( 'post', $attachment_id, '_wp_attachment_image_alt', true );
|
552 |
if ( empty( $alt_text ) ) {
|
553 |
$alt_text = '';
|
554 |
}
|
555 |
-
|
556 |
// Add replacements to each post/page in self::$image_inserts
|
557 |
foreach ( $references as $post_id => $files ) {
|
558 |
$inserts = self::$image_inserts[ $post_id ];
|
559 |
foreach ( $files as $file ) {
|
560 |
foreach ( $inserts['inserts'] as $insert ) {
|
561 |
-
error_log( __LINE__ . " Insert_Fixit::
|
562 |
-
if ( $file != $insert['src'] ) {
|
563 |
continue;
|
564 |
}
|
565 |
-
|
566 |
-
error_log( __LINE__ . " Insert_Fixit::
|
567 |
if ( $alt_text == $insert['alt'] ) {
|
568 |
continue;
|
569 |
}
|
570 |
-
|
571 |
// Queue replacement
|
572 |
self::$image_inserts[ $post_id ]['replacements'][ $insert['alt_offset'] ] = array( 'length' => strlen( $insert['alt'] ), 'text' => $alt_text );
|
573 |
} // foreach file
|
574 |
} // foreach reference
|
575 |
} // foreach insert
|
576 |
} // foreach attachment
|
577 |
-
|
578 |
// Apply replacements
|
579 |
foreach ( self::$image_inserts as $post_id => $inserts ) {
|
580 |
$replacements = $inserts['replacements'];
|
581 |
if ( ! empty( $replacements ) ) {
|
582 |
krsort( $replacements );
|
583 |
-
error_log( __LINE__ . " Insert_Fixit::
|
584 |
$post_content = $inserts['content'];
|
585 |
foreach ( $replacements as $offset => $replacement ) {
|
586 |
$post_content = substr_replace( $post_content, $replacement['text'], $offset, $replacement['length'] );
|
587 |
$updates++;
|
588 |
} // foreach replacement
|
589 |
-
error_log( __LINE__ . " Insert_Fixit::
|
590 |
$new_content = array( 'ID' => $post_id, 'post_content' => $post_content );
|
591 |
$result = wp_update_post( $new_content, true );
|
592 |
-
error_log( __LINE__ . " Insert_Fixit::
|
593 |
if ( is_wp_error( $result ) ) {
|
594 |
$errors++;
|
595 |
}
|
@@ -603,9 +831,9 @@ error_log( __LINE__ . " Insert_Fixit::_copy_from_media_library( {$post_id} ) upd
|
|
603 |
if ( $updated_posts ) {
|
604 |
delete_transient( self::SLUG_PREFIX . 'image_inserts' );
|
605 |
}
|
606 |
-
|
607 |
return "<br>Copy from Library matched {$image_inserts} posts/pages to {$image_objects} attachments and made {$updates} update(s) in {$updated_posts} posts/pages. There were {$errors} error(s).\n";
|
608 |
-
} //
|
609 |
|
610 |
/**
|
611 |
* Copy ALT Text from Post/Page inserts to Media Library item
|
@@ -614,30 +842,30 @@ error_log( __LINE__ . " Insert_Fixit::_copy_from_media_library( {$post_id} ) upd
|
|
614 |
*
|
615 |
* @return string HTML markup for results/messages
|
616 |
*/
|
617 |
-
private static function
|
618 |
global $wpdb;
|
619 |
-
|
620 |
/*
|
621 |
* Load the image_inserts array
|
622 |
*/
|
623 |
self::_build_image_inserts_cache( true );
|
624 |
-
|
625 |
/*
|
626 |
* Load the image_objects array
|
627 |
*/
|
628 |
self::_build_image_objects_cache( true );
|
629 |
-
|
630 |
$image_inserts = count( self::$image_inserts );
|
631 |
$image_objects = count( self::$image_objects );
|
632 |
$updated_attachments = 0;
|
633 |
$errors = 0;
|
634 |
-
|
635 |
foreach ( self::$image_objects as $attachment_id => $references ) {
|
636 |
$alt_text = get_metadata( 'post', $attachment_id, '_wp_attachment_image_alt', true );
|
637 |
if ( empty( $alt_text ) ) {
|
638 |
$alt_text = '';
|
639 |
}
|
640 |
-
|
641 |
// Make sure the most recent changes are the last updates applied
|
642 |
ksort( $references );
|
643 |
|
@@ -647,25 +875,25 @@ error_log( __LINE__ . " Insert_Fixit::_copy_from_media_library( {$post_id} ) upd
|
|
647 |
$inserts = self::$image_inserts[ $post_id ];
|
648 |
foreach ( $files as $file ) {
|
649 |
foreach ( $inserts['inserts'] as $insert ) {
|
650 |
-
error_log( __LINE__ . " Insert_Fixit::
|
651 |
-
if ( $file != $insert['src'] ) {
|
652 |
continue;
|
653 |
}
|
654 |
-
|
655 |
-
error_log( __LINE__ . " Insert_Fixit::
|
656 |
if ( $alt_text == $insert['alt'] ) {
|
657 |
continue;
|
658 |
}
|
659 |
-
|
660 |
// Queue replacement
|
661 |
$replacement = $insert['alt'];
|
662 |
} // foreach file
|
663 |
} // foreach reference
|
664 |
} // foreach insert
|
665 |
-
|
666 |
// Apply replacement
|
667 |
if ( ! is_null( $replacement ) ) {
|
668 |
-
error_log( __LINE__ . " Insert_Fixit::
|
669 |
if ( update_metadata( 'post', $attachment_id, '_wp_attachment_image_alt', $replacement ) ) {
|
670 |
$updated_attachments++;
|
671 |
} else {
|
@@ -673,21 +901,134 @@ error_log( __LINE__ . " Insert_Fixit::_copy_to_media_library( {$attachment_id} )
|
|
673 |
}
|
674 |
}
|
675 |
} // foreach attachment
|
676 |
-
|
677 |
/*
|
678 |
* Invalidate the image_objects cache, since Media Library item content has changed.
|
679 |
*/
|
680 |
if ( $updated_attachments ) {
|
681 |
delete_transient( self::SLUG_PREFIX . 'image_objects' );
|
682 |
}
|
683 |
-
|
684 |
-
return "<br>Copy to Library matched {$image_inserts} posts/pages to {$image_objects} attachments and updated {$updated_attachments} Media Library items. There were {$errors} error(s).\n";
|
685 |
-
} //
|
686 |
|
687 |
/**
|
688 |
-
* Copy
|
689 |
*
|
690 |
-
* @since 1.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
691 |
*
|
692 |
* @return string HTML markup for results/messages
|
693 |
*/
|
@@ -698,25 +1039,25 @@ error_log( __LINE__ . " Insert_Fixit::_copy_to_media_library( {$attachment_id} )
|
|
698 |
* Load the image_inserts array
|
699 |
*/
|
700 |
self::_build_image_inserts_cache( true );
|
701 |
-
|
702 |
/*
|
703 |
* Load the image_objects array
|
704 |
*/
|
705 |
self::_build_image_objects_cache( false, true );
|
706 |
-
|
707 |
// Initialize statistics
|
708 |
$image_inserts = count( self::$image_inserts );
|
709 |
$image_objects = count( self::$image_objects );
|
710 |
$inserted_in = 0;
|
711 |
$updated_attachments = 0;
|
712 |
$errors = 0;
|
713 |
-
|
714 |
foreach ( self::$image_objects as $attachment => $posts ) {
|
715 |
$inserted_in += count( $posts );
|
716 |
-
error_log( __LINE__ . " _attach_inserted_in( {$attachment} ) posts = " . var_export( $posts, true ), 0 );
|
717 |
$keys = array_keys( $posts );
|
718 |
$args = array( 'ID' => $attachment, 'post_parent' => $keys[0] );
|
719 |
-
error_log( __LINE__ . " _attach_inserted_in( {$attachment} ) args = " . var_export( $args, true ), 0 );
|
720 |
if ( wp_update_post( $args ) ) {
|
721 |
$updated_attachments++;
|
722 |
} else {
|
@@ -728,20 +1069,20 @@ error_log( __LINE__ . " _attach_inserted_in( {$attachment} ) args = " . var_expo
|
|
728 |
} // _attach_inserted_in
|
729 |
|
730 |
/**
|
731 |
-
*
|
732 |
*
|
733 |
-
* @since 1.
|
734 |
*
|
735 |
* @return string HTML markup for results/messages
|
736 |
*/
|
737 |
private static function _attach_featured_in() {
|
738 |
global $wpdb;
|
739 |
-
|
740 |
/*
|
741 |
* Load the featured_objects array
|
742 |
*/
|
743 |
self::_build_featured_objects_cache( false, true );
|
744 |
-
|
745 |
// Initialize statistics
|
746 |
$featured_objects = count( self::$featured_objects );
|
747 |
$featured_in = 0;
|
@@ -750,7 +1091,7 @@ error_log( __LINE__ . " _attach_inserted_in( {$attachment} ) args = " . var_expo
|
|
750 |
|
751 |
foreach ( self::$featured_objects as $attachment => $posts ) {
|
752 |
$featured_in += count( $posts );
|
753 |
-
|
754 |
$args = array( 'ID' => $attachment, 'post_parent' => reset( $posts ) );
|
755 |
if ( wp_update_post( $args ) ) {
|
756 |
$updates++;
|
@@ -758,7 +1099,7 @@ error_log( __LINE__ . " _attach_inserted_in( {$attachment} ) args = " . var_expo
|
|
758 |
$errors++;
|
759 |
}
|
760 |
}
|
761 |
-
|
762 |
return "<br>Attach Featured In found {$featured_objects} unattached items featured in {$featured_in} posts/pages and made {$updates} attachments. There were {$errors} error(s).\n";
|
763 |
} // _attach_featured_in
|
764 |
} //Insert_Fixit
|
5 |
* Adds a Tools/Insert Fixit submenu with buttons to perform the operations.
|
6 |
*
|
7 |
* @package Insert Fixit
|
8 |
+
* @version 1.03
|
9 |
*/
|
10 |
|
11 |
/*
|
13 |
Plugin URI: http://fairtradejudaica.org/media-library-assistant-a-wordpress-plugin/
|
14 |
Description: Synchronizes Media Library values to and from post/page inserted images
|
15 |
Author: David Lingren
|
16 |
+
Version: 1.03
|
17 |
Author URI: http://fairtradejudaica.org/our-story/staff/
|
18 |
|
19 |
Copyright 2015-2016 David Lingren
|
47 |
* opened on 6/4/2016 by "Levy"
|
48 |
* https://wordpress.org/support/topic/how-do-i-extract-the-id-from-inserted_in-and-featured_in
|
49 |
*
|
50 |
+
* Enhanced for support topic "Custom Field Question"
|
51 |
+
* opened on 6/8/2016 by "rainydaymum"
|
52 |
+
* https://wordpress.org/support/topic/custom-field-question-4
|
53 |
+
*
|
54 |
* @package Insert Fixit
|
55 |
* @since 1.00
|
56 |
*/
|
62 |
*
|
63 |
* @var string
|
64 |
*/
|
65 |
+
const CURRENT_VERSION = '1.03';
|
66 |
|
67 |
/**
|
68 |
* Slug prefix for registering and enqueueing submenu pages, style sheets and scripts
|
91 |
*/
|
92 |
public static function initialize() {
|
93 |
self::$wp_4dot0_plus = version_compare( get_bloginfo('version'), '4.0', '>=' );
|
94 |
+
|
95 |
add_action( 'admin_menu', 'Insert_Fixit::admin_menu_action' );
|
96 |
}
|
97 |
|
134 |
* @return void Echoes HTML markup for the submenu page
|
135 |
*/
|
136 |
public static function render_tools_page() {
|
137 |
+
//error_log( __LINE__ . ' Insert_Fixit::render_tools_page() $_REQUEST = ' . var_export( $_REQUEST, true ), 0 );
|
138 |
if ( !current_user_can( 'manage_options' ) ) {
|
139 |
echo "Insert Fixit - Error</h2>\n";
|
140 |
wp_die( 'You do not have permission to manage plugin settings.' );
|
141 |
}
|
142 |
+
|
143 |
$setting_actions = array(
|
144 |
+
'help' => array( 'handler' => '', 'comment' => '<strong>Enter first and (optional) last ID values above to restrict tool application range</strong>. To operate on one ID, enter just the "First ID". The default is to perform the operation on <strong>all posts/pages</strong> and <strong>all Media Library items (attachments)</strong>.<br /> <br />You can find post/page ID values by hovering over the post/page title in the "Title" column of the All Posts/All Pages submenu tables; look for the number following <code>post=</code>.<br /> <br />The <strong>Data Source</strong> and <strong>Attribute Name</strong> values are used in the "<strong>Add Attribute</strong>" tool.' ),
|
145 |
'warning' => array( 'handler' => '', 'comment' => '<strong>These tools make permanent updates to your database.</strong> Make a backup before you use the tools so you can restore your old values if you don’t like the results.' ),
|
146 |
|
147 |
+
'c00' => array( 'handler' => '', 'comment' => '<h3>Media Library item to Post/Page inserts</h3>' ),
|
148 |
+
'ALT from Library' => array( 'handler' => '_copy_alt_from_media_library',
|
149 |
'comment' => 'Copy ALT Text from Media Library item to Post/Page inserts.' ),
|
150 |
+
'c01' => array( 'handler' => '', 'comment' => '<h3>Post/Page inserts to Media Library item</h3>' ),
|
151 |
+
'ALT to Library' => array( 'handler' => '_copy_alt_to_media_library',
|
152 |
'comment' => 'Copy ALT Text from Post/Page inserts to Media Library item' ),
|
153 |
+
'Post to Library' => array( 'handler' => '_copy_title_to_media_library',
|
154 |
+
'comment' => 'Copy "page_terms: page_title + sequence" from Post/Page inserts to Media Library item' ),
|
155 |
+
'Parent to Library' => array( 'handler' => '_copy_title_to_media_library',
|
156 |
+
'comment' => 'Copy "parent_terms: parent_title + sequence" from Post/Page inserts to Media Library item' ),
|
157 |
+
'c02' => array( 'handler' => '', 'comment' => '<hr>' ),
|
158 |
+
'c03' => array( 'handler' => '', 'comment' => '<h3>Post/Page insert Modification</h3>' ),
|
159 |
+
'c04' => array( 'handler' => '', 'comment' => '<strong>NOTE:</strong> Tools in this section use the Data Source and Attribute values above.<br /> ' ),
|
160 |
+
'Add Attribute' => array( 'handler' => '_add_attribute',
|
161 |
+
'comment' => 'Add an HTML attribute, e.g., data-pin-description=alt_text, to Post/Page inserts.' ),
|
162 |
+
'Replace Attribute' => array( 'handler' => '_replace_attribute',
|
163 |
+
'comment' => 'Replace (or add) an HTML attribute, e.g., data-pin-description=alt_text, to Post/Page inserts.' ),
|
164 |
+
'Delete Attribute' => array( 'handler' => '_delete_attribute',
|
165 |
+
'comment' => 'Delete an HTML attribute, e.g., data-pin-description, from Post/Page inserts' ),
|
166 |
+
'c05' => array( 'handler' => '', 'comment' => '<hr>' ),
|
167 |
+
'c06' => array( 'handler' => '', 'comment' => '<h3>Attach Media Library item(s)</h3>' ),
|
168 |
+
'c07' => array( 'handler' => '', 'comment' => '<strong>NOTE:</strong> Tools in this section operate only on <strong>unattached</strong> Media Library items.<br /> ' ),
|
169 |
'Attach Inserted In' => array( 'handler' => '_attach_inserted_in',
|
170 |
'comment' => 'Attach items to the first Post/Page they are inserted in' ),
|
171 |
'Attach Featured In' => array( 'handler' => '_attach_featured_in',
|
172 |
'comment' => 'Attach items to the first Post/Page for which they are the Featured Image' ),
|
173 |
+
'c08' => array( 'handler' => '', 'comment' => '<hr>' ),
|
174 |
+
'c09' => array( 'handler' => '', 'comment' => '<h3>Refresh Caches</h3>' ),
|
175 |
+
'c10' => array( 'handler' => '', 'comment' => 'If you have a large number of posts/pages and/or Media Library items you can use the cache refresh operations to break up processing into smaller steps. Try clicking the "Image Inserts" button, then the "Image Objects" button to build these intermediate data structures and save them in the WordPress cache for fifteen minutes. That will make the "Copy" operations above go quicker.<br> ' ),
|
176 |
'Image Inserts' => array( 'handler' => '_build_image_inserts_cache',
|
177 |
'comment' => 'Find all post/page inserts and save in cache for fifteen minutes' ),
|
178 |
'Image objects' => array( 'handler' => '_build_image_objects_cache',
|
179 |
'comment' => 'Find all image items and save in cache for fifteen minutes' ),
|
180 |
);
|
181 |
+
|
182 |
echo '<div class="wrap">' . "\n";
|
183 |
echo "\t\t" . '<div id="icon-tools" class="icon32"><br/></div>' . "\n";
|
184 |
echo "\t\t" . '<h2>Insert Fixit Tools v' . self::CURRENT_VERSION . '</h2>' . "\n";
|
189 |
$action = $setting_actions[ $label ]['handler'];
|
190 |
if ( ! empty( $action ) ) {
|
191 |
if ( method_exists( 'Insert_Fixit', $action ) ) {
|
192 |
+
echo "\t\t<p style=\"font-size: large\"><strong>Results: </strong>\n";
|
193 |
+
echo "\t\t" . self::$action() . "</p>\n";
|
194 |
} else {
|
195 |
echo "\t\t<br>ERROR: handler does not exist for action: \"{$label}\"\n";
|
196 |
}
|
202 |
}
|
203 |
}
|
204 |
|
205 |
+
/*
|
206 |
+
* Extract relevant query arguments
|
207 |
+
*/
|
208 |
+
$old_post_lower = isset( $_REQUEST[ self::SLUG_PREFIX . 'old_post_lower' ] ) ? $_REQUEST[ self::SLUG_PREFIX . 'old_post_lower' ] : '';
|
209 |
$post_lower = isset( $_REQUEST[ self::SLUG_PREFIX . 'post_lower' ] ) ? $_REQUEST[ self::SLUG_PREFIX . 'post_lower' ] : '';
|
210 |
+
$old_post_upper = isset( $_REQUEST[ self::SLUG_PREFIX . 'old_post_upper' ] ) ? $_REQUEST[ self::SLUG_PREFIX . 'old_post_upper' ] : '';
|
211 |
$post_upper = isset( $_REQUEST[ self::SLUG_PREFIX . 'post_upper' ] ) ? $_REQUEST[ self::SLUG_PREFIX . 'post_upper' ] : '';
|
212 |
+
$old_attachment_lower = isset( $_REQUEST[ self::SLUG_PREFIX . 'old_attachment_lower' ] ) ? $_REQUEST[ self::SLUG_PREFIX . 'old_attachment_lower' ] : '';
|
213 |
$attachment_lower = isset( $_REQUEST[ self::SLUG_PREFIX . 'attachment_lower' ] ) ? $_REQUEST[ self::SLUG_PREFIX . 'attachment_lower' ] : '';
|
214 |
+
$old_attachment_upper = isset( $_REQUEST[ self::SLUG_PREFIX . 'old_attachment_upper' ] ) ? $_REQUEST[ self::SLUG_PREFIX . 'old_attachment_upper' ] : '';
|
215 |
$attachment_upper = isset( $_REQUEST[ self::SLUG_PREFIX . 'attachment_upper' ] ) ? $_REQUEST[ self::SLUG_PREFIX . 'attachment_upper' ] : '';
|
216 |
+
$old_data_source = isset( $_REQUEST[ self::SLUG_PREFIX . 'old_data_source' ] ) ? $_REQUEST[ self::SLUG_PREFIX . 'old_data_source' ] : '';
|
217 |
+
$data_source = isset( $_REQUEST[ self::SLUG_PREFIX . 'data_source' ] ) ? $_REQUEST[ self::SLUG_PREFIX . 'data_source' ] : '[+alt_text+]';
|
218 |
+
$old_attribute_name = isset( $_REQUEST[ self::SLUG_PREFIX . 'old_attribute_name' ] ) ? $_REQUEST[ self::SLUG_PREFIX . 'old_attribute_name' ] : '';
|
219 |
+
$attribute_name = isset( $_REQUEST[ self::SLUG_PREFIX . 'attribute_name' ] ) ? $_REQUEST[ self::SLUG_PREFIX . 'attribute_name' ] : 'data-pin-description';
|
220 |
+
|
221 |
+
/*
|
222 |
+
* Invalidate the caches if anything has changed
|
223 |
+
*/
|
224 |
+
if ( $old_post_lower !== $post_lower || $old_post_upper !== $post_upper || $old_attachment_lower !== $attachment_lower || $old_attachment_upper !== $attachment_upper || $old_data_source !== $data_source || $old_attribute_name !== $attribute_name ) {
|
225 |
+
delete_transient( self::SLUG_PREFIX . 'image_inserts' );
|
226 |
+
delete_transient( self::SLUG_PREFIX . 'image_objects' );
|
227 |
+
}
|
228 |
|
229 |
echo "\t\t" . '<div style="width:700px">' . "\n";
|
230 |
echo "\t\t" . '<form action="' . admin_url( 'tools.php?page=' . self::SLUG_PREFIX . 'tools' ) . '" method="post" class="' . self::SLUG_PREFIX . 'tools-form-class" id="' . self::SLUG_PREFIX . 'tools-form-id">' . "\n";
|
|
|
231 |
echo "\t\t" . ' <table>' . "\n";
|
232 |
|
233 |
echo "\t\t" . ' <tr valign="top">' . "\n";
|
234 |
+
echo "\t\t" . ' <td width="24%" style="text-align: right; padding-right: 5px" valign="middle">First Post/Page ID</td>' . "\n";
|
235 |
echo "\t\t" . ' <td width="24%" style="text-align: left;">' . "\n";
|
236 |
+
echo "\t\t" . ' <input name="' . self::SLUG_PREFIX . 'old_post_lower" type="hidden" value="' . $post_lower . '">' . "\n";
|
237 |
echo "\t\t" . ' <input name="' . self::SLUG_PREFIX . 'post_lower" type="text" size="5" value="' . $post_lower . '">' . "\n";
|
238 |
echo "\t\t" . ' </td>' . "\n";
|
239 |
+
echo "\t\t" . ' <td width="24%" style="text-align: right; padding-right: 5px" valign="middle">First Attachment ID</td>' . "\n";
|
240 |
+
echo "\t\t" . ' <td width="24%" style="text-align: left;">' . "\n";
|
241 |
+
echo "\t\t" . ' <input name="' . self::SLUG_PREFIX . 'old_attachment_lower" type="hidden" value="' . $attachment_lower . '">' . "\n";
|
242 |
+
echo "\t\t" . ' <input name="' . self::SLUG_PREFIX . 'attachment_lower" type="text" size="5" value="' . $attachment_lower . '">' . "\n";
|
243 |
+
echo "\t\t" . ' </td>' . "\n";
|
244 |
+
|
245 |
+
echo "\t\t" . ' <tr valign="top">' . "\n";
|
246 |
+
echo "\t\t" . ' <td width="24%" style="text-align: right; padding-right: 5px" valign="middle">Last Post/Page ID</td>' . "\n";
|
247 |
+
echo "\t\t" . ' <td width="24%" style="text-align: left;">' . "\n";
|
248 |
+
echo "\t\t" . ' <input name="' . self::SLUG_PREFIX . 'old_post_upper" type="hidden" value="' . $post_upper . '">' . "\n";
|
249 |
+
echo "\t\t" . ' <input name="' . self::SLUG_PREFIX . 'post_upper" type="text" size="5" value="' . $post_upper . '">' . "\n";
|
250 |
+
echo "\t\t" . ' </td>' . "\n";
|
251 |
+
echo "\t\t" . ' <td width="24%" style="text-align: right; padding-right: 5px" valign="middle">Last Attachment ID</td>' . "\n";
|
252 |
+
echo "\t\t" . ' <td width="24%" style="text-align: left;">' . "\n";
|
253 |
+
echo "\t\t" . ' <input name="' . self::SLUG_PREFIX . 'old_attachment_upper" type="hidden" value="' . $attachment_upper . '">' . "\n";
|
254 |
+
echo "\t\t" . ' <input name="' . self::SLUG_PREFIX . 'attachment_upper" type="text" size="5" value="' . $attachment_upper . '">' . "\n";
|
255 |
+
echo "\t\t" . ' </td>' . "\n";
|
256 |
echo "\t\t" . ' <tr valign="top">' . "\n";
|
257 |
+
echo "\t\t" . ' <td width="24%" style="text-align: right; padding-right: 5px" valign="middle">Data Source</td>' . "\n";
|
258 |
+
echo "\t\t" . ' <td width="24%" style="text-align: left;">' . "\n";
|
259 |
+
echo "\t\t" . ' <input name="' . self::SLUG_PREFIX . 'old_data_source" type="hidden" value="' . $data_source . '">' . "\n";
|
260 |
+
echo "\t\t" . ' <input name="' . self::SLUG_PREFIX . 'data_source" type="text" size="15" value="' . $data_source . '">' . "\n";
|
261 |
+
echo "\t\t" . ' </td>' . "\n";
|
262 |
+
echo "\t\t" . ' <td width="24%" style="text-align: right; padding-right: 5px" valign="middle">Attribute Name</td>' . "\n";
|
263 |
+
echo "\t\t" . ' <td width="24%" style="text-align: left;">' . "\n";
|
264 |
+
echo "\t\t" . ' <input name="' . self::SLUG_PREFIX . 'old_attribute_name" type="hidden" value="' . $attribute_name . '">' . "\n";
|
265 |
+
echo "\t\t" . ' <input name="' . self::SLUG_PREFIX . 'attribute_name" type="text" size="15" value="' . $attribute_name . '">' . "\n";
|
266 |
+
echo "\t\t" . ' </td>' . "\n";
|
267 |
echo "\t\t" . ' </tr>' . "\n";
|
268 |
echo "\t\t" . ' </table>' . "\n";
|
269 |
+
|
270 |
echo "\t\t" . ' <table>' . "\n";
|
271 |
+
|
272 |
foreach ( $setting_actions as $label => $action ) {
|
273 |
if ( empty( $action['handler'] ) ) {
|
274 |
echo "\t\t" . ' <tr><td colspan=2 style="padding: 2px 0px;">' . $action['comment'] . "</td></tr>\n";
|
280 |
echo "\t\t" . ' </td></tr>' . "\n";
|
281 |
}
|
282 |
}
|
283 |
+
|
284 |
echo "\t\t" . ' </table>' . "\n";
|
285 |
echo "\t\t" . ' </p>' . "\n";
|
286 |
echo "\t\t" . '</form>' . "\n";
|
293 |
* post/page ID => array(
|
294 |
* 'content' => post_content,
|
295 |
* 'files' => URL to img src,
|
296 |
+
* 'inserts' => array( 'src', 'src_offset', 'alt', 'alt_offset' )
|
297 |
* 'replacements' => array()
|
298 |
* )
|
299 |
*
|
314 |
*/
|
315 |
private static function _build_image_inserts_cache( $use_cache = false ) {
|
316 |
global $wpdb;
|
317 |
+
|
318 |
if ( $use_cache ) {
|
319 |
self::$image_inserts = get_transient( self::SLUG_PREFIX . 'image_inserts' );
|
320 |
if ( is_array( self::$image_inserts ) ) {
|
321 |
+
//error_log( __LINE__ . " Insert_Fixit::_build_image_inserts_cache using cached self::\$image_inserts " . var_export( self::$image_inserts, true ), 0 );
|
322 |
return;
|
323 |
}
|
324 |
}
|
325 |
|
326 |
$return = delete_transient( self::SLUG_PREFIX . 'image_inserts' );
|
327 |
+
//error_log( __LINE__ . " Insert_Fixit::_build_image_inserts_cache delete_transient return = " . var_export( $return, true ), 0 );
|
328 |
+
|
329 |
if ( ! empty( $_REQUEST[ self::SLUG_PREFIX . 'post_lower' ] ) ) {
|
330 |
$lower_bound = (integer) $_REQUEST[ self::SLUG_PREFIX . 'post_lower' ];
|
331 |
} else {
|
342 |
|
343 |
$query = sprintf( 'SELECT ID, post_content FROM %1$s WHERE ( post_type IN ( \'post\', \'page\' ) AND ( post_status = \'publish\' ) AND ( ID >= %2$d ) AND ( ID <= %3$d ) AND ( post_content LIKE \'%4$s\' ) ) ORDER BY ID', $wpdb->posts, $lower_bound, $upper_bound, '%<img%' );
|
344 |
$results = $wpdb->get_results( $query );
|
345 |
+
//error_log( __LINE__ . ' Insert_Fixit::_build_image_inserts_cache() $results = ' . var_export( $results, true ), 0 );
|
346 |
|
347 |
$upload_dir = wp_upload_dir();
|
348 |
+
//error_log( __LINE__ . ' Insert_Fixit::_build_image_inserts_cache() $upload_dir = ' . var_export( $upload_dir, true ), 0 );
|
349 |
$upload_dir = $upload_dir['baseurl'] . '/';
|
350 |
|
351 |
$image_inserts = array();
|
352 |
foreach ( $results as $result ) {
|
353 |
+
$match_count = preg_match_all( '/\<img.*(src="([^"]*)")[^\>]*\>/', $result->post_content, $matches, PREG_OFFSET_CAPTURE );
|
354 |
+
//error_log( __LINE__ . " Insert_Fixit::_build_image_inserts_cache( {$result->ID} ) \$matches = " . var_export( $matches, true ), 0 );
|
355 |
if ( $match_count ) {
|
356 |
$image_inserts[ $result->ID ]['content'] = $result->post_content;
|
357 |
|
358 |
+
// complete <img ... /> tag
|
359 |
+
foreach( $matches[0] as $index => $match ) {
|
360 |
+
$image_inserts[ $result->ID ]['inserts'][ $index ] = array( 'img' => $match[0], 'img_offset' => $match[1] );
|
361 |
+
}
|
362 |
+
|
363 |
+
// complete src= attribute
|
364 |
foreach( $matches[1] as $index => $match ) {
|
365 |
+
$image_inserts[ $result->ID ]['inserts'][ $index ]['src_att'] = $match[0];
|
366 |
+
$image_inserts[ $result->ID ]['inserts'][ $index ]['src_att_offset'] = $match[1];
|
367 |
+
}
|
368 |
+
|
369 |
+
// src= file URL
|
370 |
+
foreach( $matches[2] as $index => $match ) {
|
371 |
$file = str_replace( $upload_dir, '', $match[0] );
|
372 |
$image_inserts[ $result->ID ]['files'][] = $file;
|
373 |
+
$image_inserts[ $result->ID ]['inserts'][ $index ]['src'] = $file;
|
374 |
+
$image_inserts[ $result->ID ]['inserts'][ $index ]['src_offset'] = $match[1];
|
375 |
}
|
376 |
|
377 |
+
// alt= value if present
|
378 |
+
foreach ( $image_inserts[ $result->ID ]['inserts'] as $index => $insert ) {
|
379 |
+
$match_count = preg_match( '/alt="([^"]*)"/', $insert['img'], $matches, PREG_OFFSET_CAPTURE );
|
380 |
+
//error_log( __LINE__ . " Insert_Fixit::_build_image_inserts_cache( {$result->ID} ) \$matches = " . var_export( $matches, true ), 0 );
|
381 |
+
if ( $match_count ) {
|
382 |
+
$image_inserts[ $result->ID ]['inserts'][ $index ]['alt'] = $matches[1][0];
|
383 |
+
$image_inserts[ $result->ID ]['inserts'][ $index ]['alt_offset'] = $insert['img_offset'] + $matches[1][1];
|
384 |
+
}
|
385 |
}
|
386 |
|
387 |
$image_inserts[ $result->ID ]['replacements'] = array();
|
388 |
}
|
389 |
}
|
|
|
390 |
|
391 |
$return = set_transient( self::SLUG_PREFIX . 'image_inserts', $image_inserts, 900 ); // fifteen minutes
|
392 |
+
//error_log( __LINE__ . " Insert_Fixit::_build_image_inserts_cache set_transient return = " . var_export( $return, true ), 0 );
|
393 |
+
//error_log( __LINE__ . " Insert_Fixit::_build_image_inserts_cache image_inserts " . var_export($image_inserts, true ), 0 );
|
394 |
self::$image_inserts = $image_inserts;
|
395 |
return 'Image inserts cache refreshed.';
|
396 |
} // _build_image_inserts_cache
|
414 |
*/
|
415 |
private static function _build_featured_objects_cache( $use_cache = false, $unattached_only = false ) {
|
416 |
global $wpdb;
|
417 |
+
|
418 |
if ( $use_cache ) {
|
419 |
self::$featured_objects = get_transient( self::SLUG_PREFIX . 'featured_objects' );
|
420 |
if ( is_array( self::$featured_objects ) ) {
|
425 |
|
426 |
$return = delete_transient( self::SLUG_PREFIX . 'featured_objects' );
|
427 |
//error_log( __LINE__ . " Insert_Fixit::_build_featured_objects_cache delete_transient return = " . var_export( $return, true ), 0 );
|
428 |
+
|
429 |
if ( ! empty( $_REQUEST[ self::SLUG_PREFIX . 'attachment_lower' ] ) ) {
|
430 |
$lower_bound = (integer) $_REQUEST[ self::SLUG_PREFIX . 'attachment_lower' ];
|
431 |
} else {
|
444 |
$query[] = "SELECT p.ID, m.post_id FROM {$wpdb->postmeta} AS m INNER JOIN";
|
445 |
|
446 |
$where = str_replace( '%', '%%', wp_post_mime_type_where( 'image', '' ) );
|
447 |
+
|
448 |
if ( $unattached_only ) {
|
449 |
$where .= ' AND post_parent = 0';
|
450 |
}
|
463 |
$references[ $result->ID ][] = $result->post_id;
|
464 |
}
|
465 |
}
|
466 |
+
|
467 |
$return = set_transient( self::SLUG_PREFIX . 'featured_objects', $references, 900 ); // fifteen minutes
|
468 |
//error_log( __LINE__ . " Insert_Fixit::_build_featured_objects_cache set_transient return = " . var_export( $return, true ), 0 );
|
469 |
+
//error_log( __LINE__ . " Insert_Fixit::_build_featured_objects_cache references = " . var_export( $references, true ), 0 );
|
470 |
self::$featured_objects = $references;
|
471 |
return 'Featured objects cache refreshed.';
|
472 |
} // _build_featured_objects_cache
|
490 |
*/
|
491 |
private static function _build_image_objects_cache( $use_cache = false, $unattached_only = false ) {
|
492 |
global $wpdb;
|
493 |
+
|
494 |
if ( $use_cache ) {
|
495 |
self::$image_objects = get_transient( self::SLUG_PREFIX . 'image_objects' );
|
496 |
if ( is_array( self::$image_objects ) ) {
|
497 |
+
//error_log( __LINE__ . " Insert_Fixit::_build_image_objects_cache using cached self::\$image_objects " . var_export( self::$image_objects, true ), 0 );
|
498 |
return;
|
499 |
}
|
500 |
}
|
501 |
|
502 |
$return = delete_transient( self::SLUG_PREFIX . 'image_objects' );
|
503 |
+
//error_log( __LINE__ . " Insert_Fixit::_build_image_objects_cache delete_transient return = " . var_export( $return, true ), 0 );
|
504 |
+
|
505 |
if ( ! empty( $_REQUEST[ self::SLUG_PREFIX . 'attachment_lower' ] ) ) {
|
506 |
$lower_bound = (integer) $_REQUEST[ self::SLUG_PREFIX . 'attachment_lower' ];
|
507 |
} else {
|
517 |
}
|
518 |
|
519 |
$where = str_replace( '%', '%%', wp_post_mime_type_where( 'image', '' ) );
|
520 |
+
|
521 |
if ( $unattached_only ) {
|
522 |
$where .= ' AND post_parent = 0';
|
523 |
}
|
524 |
+
|
525 |
$query = sprintf( 'SELECT ID FROM %1$s WHERE ( ( post_type = \'attachment\' ) %2$s AND ( ID >= %3$d ) AND ( ID <= %4$d ) ) ORDER BY ID', $wpdb->posts, $where, $lower_bound, $upper_bound );
|
526 |
$results = $wpdb->get_results( $query );
|
527 |
+
//error_log( __LINE__ . ' Insert_Fixit::_build_image_objects_cache() $results = ' . var_export( $results, true ), 0 );
|
528 |
|
529 |
/*
|
530 |
* Load the image_inserts array
|
531 |
*/
|
532 |
self::_build_image_inserts_cache( true );
|
533 |
+
|
534 |
$references = array();
|
535 |
foreach ( $results as $result ) {
|
536 |
// assemble the files
|
573 |
* The array value is the post/page ID
|
574 |
*/
|
575 |
$inserts = array();
|
576 |
+
|
577 |
foreach( $files as $file ) {
|
578 |
foreach ( self::$image_inserts as $insert_id => $value ) {
|
579 |
if ( in_array( $file, $value['files'] ) ) {
|
581 |
}
|
582 |
} // foreach insert
|
583 |
} // foreach file
|
584 |
+
|
585 |
if ( ! empty( $inserts ) ) {
|
586 |
$references[ $result->ID ] = $inserts;
|
587 |
}
|
588 |
} // each result
|
589 |
|
590 |
$return = set_transient( self::SLUG_PREFIX . 'image_objects', $references, 900 ); // fifteen minutes
|
591 |
+
//error_log( __LINE__ . " Insert_Fixit::_build_image_objects_cache set_transient return = " . var_export( $return, true ), 0 );
|
592 |
+
//error_log( __LINE__ . " Insert_Fixit::_build_image_objects_cache references = " . var_export( $references, true ), 0 );
|
593 |
self::$image_objects = $references;
|
594 |
return 'Image objects cache refreshed.';
|
595 |
} // _build_image_objects_cache
|
596 |
|
597 |
+
/**
|
598 |
+
* Add, replace or delete an attribute from <img ... /> tags in a post/page
|
599 |
+
*
|
600 |
+
* @since 1.02
|
601 |
+
*
|
602 |
+
* @return string HTML markup for results/messages
|
603 |
+
*/
|
604 |
+
private static function _evaluate_add_attribute( $operation = 'Add' ) {
|
605 |
+
global $wpdb;
|
606 |
+
|
607 |
+
// Attribute name must be present
|
608 |
+
$attribute_name = isset( $_REQUEST[ self::SLUG_PREFIX . 'attribute_name' ] ) ? $_REQUEST[ self::SLUG_PREFIX . 'attribute_name' ] : 'data-pin-description';
|
609 |
+
|
610 |
+
$preg_pattern = '/ ' . $attribute_name . '="([^"]*)"[ ]*/';
|
611 |
+
//error_log( __LINE__ . " Insert_Fixit::_build_image_inserts_cache( {$operation} ) \$preg_pattern = " . var_export( $preg_pattern, true ), 0 );
|
612 |
+
|
613 |
+
/*
|
614 |
+
* Load the image_inserts array
|
615 |
+
*/
|
616 |
+
self::_build_image_inserts_cache( true );
|
617 |
+
|
618 |
+
/*
|
619 |
+
* Load the image_objects array
|
620 |
+
*/
|
621 |
+
self::_build_image_objects_cache( true );
|
622 |
+
|
623 |
+
// Initialize statistics
|
624 |
+
$image_inserts = count( self::$image_inserts );
|
625 |
+
$image_objects = count( self::$image_objects );
|
626 |
+
$updates = 0;
|
627 |
+
$updated_posts = 0;
|
628 |
+
$errors = 0;
|
629 |
+
|
630 |
+
if ( 'Delete' == $operation ) {
|
631 |
+
foreach ( self::$image_objects as $attachment_id => $references ) {
|
632 |
+
foreach ( $references as $post_id => $files ) {
|
633 |
+
$inserts = self::$image_inserts[ $post_id ];
|
634 |
+
foreach ( $files as $file ) {
|
635 |
+
foreach ( $inserts['inserts'] as $insert ) {
|
636 |
+
if ( $file != $insert['src'] ) {
|
637 |
+
continue;
|
638 |
+
}
|
639 |
+
|
640 |
+
//error_log( __LINE__ . " Insert_Fixit::_evaluate_add_attribute( {$attachment_id}, {$post_id}, {$file} ) insert = " . var_export( $insert, true ), 0 );
|
641 |
+
$match_count = preg_match( $preg_pattern, $insert['img'], $matches, PREG_OFFSET_CAPTURE );
|
642 |
+
//error_log( __LINE__ . " Insert_Fixit::_build_image_inserts_cache( {$match_count} ) \$matches = " . var_export( $matches, true ), 0 );
|
643 |
+
if ( $match_count ) {
|
644 |
+
$new_tag = substr_replace( $insert['img'], ' ', $matches[0][1], strlen( $matches[0][0] ) );
|
645 |
+
|
646 |
+
// Queue replacement
|
647 |
+
self::$image_inserts[ $post_id ]['replacements'][ $insert['img_offset'] ] = array( 'length' => strlen( $insert['img'] ), 'text' => $new_tag );
|
648 |
+
}
|
649 |
+
} // foreach file
|
650 |
+
} // foreach reference
|
651 |
+
} // foreach insert
|
652 |
+
}
|
653 |
+
} else {
|
654 |
+
// Find the data source
|
655 |
+
if ( ! empty( $_REQUEST[ self::SLUG_PREFIX . 'data_source' ] ) ) {
|
656 |
+
$data_source = $_REQUEST[ self::SLUG_PREFIX . 'data_source' ];
|
657 |
+
|
658 |
+
if ( 'template:' == substr( $data_source, 0, 9 ) ) {
|
659 |
+
$data_source = substr( $data_source, 9 );
|
660 |
+
} else {
|
661 |
+
$data_source = '(' . $data_source . ')';
|
662 |
+
}
|
663 |
+
} else {
|
664 |
+
$data_source = '([+alt_text+])';
|
665 |
+
}
|
666 |
+
|
667 |
+
$data_source = array(
|
668 |
+
'data_source' => 'template',
|
669 |
+
'meta_name' => $data_source,
|
670 |
+
'option' => 'text',
|
671 |
+
'format' => 'raw',
|
672 |
+
);
|
673 |
+
//error_log( __LINE__ . " Insert_Fixit::_evaluate_add_attribute( {$operation} ) data_source = " . var_export( $data_source, true ), 0 );
|
674 |
+
|
675 |
+
foreach ( self::$image_objects as $attachment_id => $references ) {
|
676 |
+
$data_value = MLAOptions::mla_get_data_source( $attachment_id, 'single_attachment_mapping', $data_source, NULL );
|
677 |
+
//error_log( __LINE__ . " Insert_Fixit::_evaluate_add_attribute( {$attachment_id} ) data_value = " . var_export( $data_value, true ), 0 );
|
678 |
+
if ( empty( $data_value ) ) {
|
679 |
+
$new_value = ' ';
|
680 |
+
} else {
|
681 |
+
$new_value = ' ' . $attribute_name . '="' . $data_value . '" ';
|
682 |
+
}
|
683 |
+
|
684 |
+
// Add replacements to each post/page in self::$image_inserts
|
685 |
+
foreach ( $references as $post_id => $files ) {
|
686 |
+
$inserts = self::$image_inserts[ $post_id ];
|
687 |
+
foreach ( $files as $file ) {
|
688 |
+
foreach ( $inserts['inserts'] as $insert ) {
|
689 |
+
//error_log( __LINE__ . " Insert_Fixit::_evaluate_add_attribute file test '{$file}' == " . var_export( $insert['src'], true ), 0 );
|
690 |
+
if ( $file != $insert['src'] ) {
|
691 |
+
continue;
|
692 |
+
}
|
693 |
+
|
694 |
+
//error_log( __LINE__ . " Insert_Fixit::_evaluate_add_attribute( {$operation}, {$attachment_id}, {$post_id}, {$file} ) insert = " . var_export( $insert, true ), 0 );
|
695 |
+
$match_count = preg_match( $preg_pattern, $insert['img'], $matches, PREG_OFFSET_CAPTURE );
|
696 |
+
//error_log( __LINE__ . " Insert_Fixit::_build_image_inserts_cache( {$match_count} ) \$matches = " . var_export( $matches, true ), 0 );
|
697 |
+
if ( $match_count ) {
|
698 |
+
if ( 'Replace' == $operation ) {
|
699 |
+
if ( $data_value != $matches[1][0] ) {
|
700 |
+
$new_tag = substr_replace( $insert['img'], $new_value, $matches[0][1], strlen( $matches[0][0] ) );
|
701 |
+
|
702 |
+
// Queue replacement
|
703 |
+
self::$image_inserts[ $post_id ]['replacements'][ $insert['img_offset'] ] = array( 'length' => strlen( $insert['img'] ), 'text' => $new_tag );
|
704 |
+
} // value changed
|
705 |
+
} // found attribute
|
706 |
+
} else {
|
707 |
+
// add after src= attribute
|
708 |
+
$new_offset = $insert['src_att_offset'] + strlen( $insert['src_att'] );
|
709 |
+
|
710 |
+
// Queue replacement
|
711 |
+
self::$image_inserts[ $post_id ]['replacements'][ $new_offset ] = array( 'length' => 0, 'text' => $new_value ); }
|
712 |
+
} // foreach file
|
713 |
+
} // foreach reference
|
714 |
+
} // foreach insert
|
715 |
+
} // foreach attachment
|
716 |
+
} // add/replace
|
717 |
+
|
718 |
+
// Apply replacements
|
719 |
+
foreach ( self::$image_inserts as $post_id => $inserts ) {
|
720 |
+
$replacements = $inserts['replacements'];
|
721 |
+
if ( ! empty( $replacements ) ) {
|
722 |
+
krsort( $replacements );
|
723 |
+
//error_log( __LINE__ . " Insert_Fixit::_evaluate_add_attribute( {$post_id} ) replacements = " . var_export( $replacements, true ), 0 );
|
724 |
+
$post_content = $inserts['content'];
|
725 |
+
foreach ( $replacements as $offset => $replacement ) {
|
726 |
+
$post_content = substr_replace( $post_content, $replacement['text'], $offset, $replacement['length'] );
|
727 |
+
$updates++;
|
728 |
+
} // foreach replacement
|
729 |
+
//error_log( __LINE__ . " Insert_Fixit::_evaluate_add_attribute( {$post_id} ) new post_content = " . var_export( $post_content, true ), 0 );
|
730 |
+
$new_content = array( 'ID' => $post_id, 'post_content' => $post_content );
|
731 |
+
$result = wp_update_post( $new_content, true );
|
732 |
+
//error_log( __LINE__ . " Insert_Fixit::_evaluate_add_attribute( {$post_id} ) update result = " . var_export( $result, true ), 0 );
|
733 |
+
if ( is_wp_error( $result ) ) {
|
734 |
+
$errors++;
|
735 |
+
}
|
736 |
+
|
737 |
+
$updated_posts++;
|
738 |
+
} // has replacements
|
739 |
+
} // foreach post/page
|
740 |
+
|
741 |
+
/*
|
742 |
+
* Invalidate the image_inserts cache, since post/page content has changed.
|
743 |
+
*/
|
744 |
+
if ( $updated_posts ) {
|
745 |
+
delete_transient( self::SLUG_PREFIX . 'image_inserts' );
|
746 |
+
}
|
747 |
+
|
748 |
+
return "<br>{$operation} Attribute matched {$image_inserts} posts/pages to {$image_objects} attachments and made {$updates} update(s) in {$updated_posts} posts/pages. There were {$errors} error(s).\n";
|
749 |
+
} // _evaluate_add_attribute
|
750 |
+
|
751 |
/**
|
752 |
* Copy ALT Text from Media Library item to Post/Page inserts
|
753 |
*
|
755 |
*
|
756 |
* @return string HTML markup for results/messages
|
757 |
*/
|
758 |
+
private static function _copy_alt_from_media_library() {
|
759 |
global $wpdb;
|
760 |
+
|
761 |
/*
|
762 |
* Load the image_inserts array
|
763 |
*/
|
764 |
self::_build_image_inserts_cache( true );
|
765 |
+
|
766 |
/*
|
767 |
* Load the image_objects array
|
768 |
*/
|
769 |
self::_build_image_objects_cache( true );
|
770 |
+
|
771 |
// Initialize statistics
|
772 |
$image_inserts = count( self::$image_inserts );
|
773 |
$image_objects = count( self::$image_objects );
|
774 |
$updates = 0;
|
775 |
$updated_posts = 0;
|
776 |
$errors = 0;
|
777 |
+
|
778 |
foreach ( self::$image_objects as $attachment_id => $references ) {
|
779 |
$alt_text = get_metadata( 'post', $attachment_id, '_wp_attachment_image_alt', true );
|
780 |
if ( empty( $alt_text ) ) {
|
781 |
$alt_text = '';
|
782 |
}
|
783 |
+
|
784 |
// Add replacements to each post/page in self::$image_inserts
|
785 |
foreach ( $references as $post_id => $files ) {
|
786 |
$inserts = self::$image_inserts[ $post_id ];
|
787 |
foreach ( $files as $file ) {
|
788 |
foreach ( $inserts['inserts'] as $insert ) {
|
789 |
+
//error_log( __LINE__ . " Insert_Fixit::_copy_alt_from_media_library file test '{$file}' == " . var_export( $insert['src'], true ), 0 );
|
790 |
+
if ( $file != $insert['src'] || ! isset( $insert['alt'] ) ) {
|
791 |
continue;
|
792 |
}
|
793 |
+
|
794 |
+
//error_log( __LINE__ . " Insert_Fixit::_copy_alt_from_media_library ALT text test '{$alt_text}' == " . var_export( $insert['alt'], true ), 0 );
|
795 |
if ( $alt_text == $insert['alt'] ) {
|
796 |
continue;
|
797 |
}
|
798 |
+
|
799 |
// Queue replacement
|
800 |
self::$image_inserts[ $post_id ]['replacements'][ $insert['alt_offset'] ] = array( 'length' => strlen( $insert['alt'] ), 'text' => $alt_text );
|
801 |
} // foreach file
|
802 |
} // foreach reference
|
803 |
} // foreach insert
|
804 |
} // foreach attachment
|
805 |
+
|
806 |
// Apply replacements
|
807 |
foreach ( self::$image_inserts as $post_id => $inserts ) {
|
808 |
$replacements = $inserts['replacements'];
|
809 |
if ( ! empty( $replacements ) ) {
|
810 |
krsort( $replacements );
|
811 |
+
//error_log( __LINE__ . " Insert_Fixit::_copy_alt_from_media_library( {$post_id} ) replacements = " . var_export( $replacements, true ), 0 );
|
812 |
$post_content = $inserts['content'];
|
813 |
foreach ( $replacements as $offset => $replacement ) {
|
814 |
$post_content = substr_replace( $post_content, $replacement['text'], $offset, $replacement['length'] );
|
815 |
$updates++;
|
816 |
} // foreach replacement
|
817 |
+
//error_log( __LINE__ . " Insert_Fixit::_copy_alt_from_media_library( {$post_id} ) new post_content = " . var_export( $post_content, true ), 0 );
|
818 |
$new_content = array( 'ID' => $post_id, 'post_content' => $post_content );
|
819 |
$result = wp_update_post( $new_content, true );
|
820 |
+
//error_log( __LINE__ . " Insert_Fixit::_copy_alt_from_media_library( {$post_id} ) update result = " . var_export( $result, true ), 0 );
|
821 |
if ( is_wp_error( $result ) ) {
|
822 |
$errors++;
|
823 |
}
|
831 |
if ( $updated_posts ) {
|
832 |
delete_transient( self::SLUG_PREFIX . 'image_inserts' );
|
833 |
}
|
834 |
+
|
835 |
return "<br>Copy from Library matched {$image_inserts} posts/pages to {$image_objects} attachments and made {$updates} update(s) in {$updated_posts} posts/pages. There were {$errors} error(s).\n";
|
836 |
+
} // _copy_alt_from_media_library
|
837 |
|
838 |
/**
|
839 |
* Copy ALT Text from Post/Page inserts to Media Library item
|
842 |
*
|
843 |
* @return string HTML markup for results/messages
|
844 |
*/
|
845 |
+
private static function _copy_alt_to_media_library() {
|
846 |
global $wpdb;
|
847 |
+
|
848 |
/*
|
849 |
* Load the image_inserts array
|
850 |
*/
|
851 |
self::_build_image_inserts_cache( true );
|
852 |
+
|
853 |
/*
|
854 |
* Load the image_objects array
|
855 |
*/
|
856 |
self::_build_image_objects_cache( true );
|
857 |
+
|
858 |
$image_inserts = count( self::$image_inserts );
|
859 |
$image_objects = count( self::$image_objects );
|
860 |
$updated_attachments = 0;
|
861 |
$errors = 0;
|
862 |
+
|
863 |
foreach ( self::$image_objects as $attachment_id => $references ) {
|
864 |
$alt_text = get_metadata( 'post', $attachment_id, '_wp_attachment_image_alt', true );
|
865 |
if ( empty( $alt_text ) ) {
|
866 |
$alt_text = '';
|
867 |
}
|
868 |
+
|
869 |
// Make sure the most recent changes are the last updates applied
|
870 |
ksort( $references );
|
871 |
|
875 |
$inserts = self::$image_inserts[ $post_id ];
|
876 |
foreach ( $files as $file ) {
|
877 |
foreach ( $inserts['inserts'] as $insert ) {
|
878 |
+
//error_log( __LINE__ . " Insert_Fixit::_copy_alt_to_media_library file test '{$file}' == " . var_export( $insert['src'], true ), 0 );
|
879 |
+
if ( $file != $insert['src'] || ! isset( $insert['alt'] ) ) {
|
880 |
continue;
|
881 |
}
|
882 |
+
|
883 |
+
//error_log( __LINE__ . " Insert_Fixit::_copy_alt_to_media_library ALT text test '{$alt_text}' == " . var_export( $insert['alt'], true ), 0 );
|
884 |
if ( $alt_text == $insert['alt'] ) {
|
885 |
continue;
|
886 |
}
|
887 |
+
|
888 |
// Queue replacement
|
889 |
$replacement = $insert['alt'];
|
890 |
} // foreach file
|
891 |
} // foreach reference
|
892 |
} // foreach insert
|
893 |
+
|
894 |
// Apply replacement
|
895 |
if ( ! is_null( $replacement ) ) {
|
896 |
+
//error_log( __LINE__ . " Insert_Fixit::_copy_alt_to_media_library( {$attachment_id} ) replacement = " . var_export( $replacement, true ), 0 );
|
897 |
if ( update_metadata( 'post', $attachment_id, '_wp_attachment_image_alt', $replacement ) ) {
|
898 |
$updated_attachments++;
|
899 |
} else {
|
901 |
}
|
902 |
}
|
903 |
} // foreach attachment
|
904 |
+
|
905 |
/*
|
906 |
* Invalidate the image_objects cache, since Media Library item content has changed.
|
907 |
*/
|
908 |
if ( $updated_attachments ) {
|
909 |
delete_transient( self::SLUG_PREFIX . 'image_objects' );
|
910 |
}
|
911 |
+
|
912 |
+
return "<br>Copy ALT to Library matched {$image_inserts} posts/pages to {$image_objects} attachments and updated {$updated_attachments} Media Library items. There were {$errors} error(s).\n";
|
913 |
+
} // _copy_alt_to_media_library
|
914 |
|
915 |
/**
|
916 |
+
* Copy Post/Page or parent values from inserts to Media Library item
|
917 |
*
|
918 |
+
* @since 1.03
|
919 |
+
*
|
920 |
+
* @return string HTML markup for results/messages
|
921 |
+
*/
|
922 |
+
private static function _copy_title_to_media_library() {
|
923 |
+
global $wpdb, $post;
|
924 |
+
|
925 |
+
/*
|
926 |
+
* Load the image_inserts array
|
927 |
+
*/
|
928 |
+
self::_build_image_inserts_cache( true );
|
929 |
+
|
930 |
+
/*
|
931 |
+
* Load the image_objects array
|
932 |
+
*/
|
933 |
+
self::_build_image_objects_cache( true );
|
934 |
+
|
935 |
+
$image_inserts = count( self::$image_inserts );
|
936 |
+
$image_objects = count( self::$image_objects );
|
937 |
+
$updated_attachments = 0;
|
938 |
+
$errors = 0;
|
939 |
+
|
940 |
+
// First, group all the inserts by the post/page ID they are in
|
941 |
+
$post_inserts = array();
|
942 |
+
foreach ( self::$image_objects as $attachment_id => $references ) {
|
943 |
+
foreach ( $references as $post_id => $files ) {
|
944 |
+
$post_inserts[ $post_id ][] = $attachment_id;
|
945 |
+
} // each reference
|
946 |
+
} // each attachment
|
947 |
+
//error_log( __LINE__ . " Insert_Fixit::_copy_title_to_media_library file test post_inserts = " . var_export( $post_inserts, true ), 0 );
|
948 |
+
|
949 |
+
foreach ( $post_inserts as $post_id => $references ) {
|
950 |
+
// Oldest attachments get lowest sequence numbers
|
951 |
+
//sort( $references , SORT_NUMERIC );
|
952 |
+
//error_log( __LINE__ . " Insert_Fixit::_copy_title_to_media_library file test '{$attachment_id}' references = " . var_export( $references, true ), 0 );
|
953 |
+
|
954 |
+
// Set the global $post object so page_terms: will work; get the post/page values
|
955 |
+
$post = get_post( $post_id );
|
956 |
+
|
957 |
+
foreach ( $references as $sequence => $attachment_id ) {
|
958 |
+
$sequence++;
|
959 |
+
|
960 |
+
if ( 'Post to Library' == $_REQUEST['insertfixit-action'] ) {
|
961 |
+
$template = "([+page_terms:category,single+]: )({$post->post_title} ){$sequence}";
|
962 |
+
} else {
|
963 |
+
$template = "([+parent_terms:category,single+]: )([+parent_title+] ){$sequence}";
|
964 |
+
}
|
965 |
+
|
966 |
+
// Find the data source
|
967 |
+
$data_source = array(
|
968 |
+
'data_source' => 'template',
|
969 |
+
'meta_name' => $template,
|
970 |
+
'option' => 'text',
|
971 |
+
'format' => 'raw',
|
972 |
+
);
|
973 |
+
$data_value = MLAOptions::mla_get_data_source( $attachment_id, 'single_attachment_mapping', $data_source, NULL );
|
974 |
+
//error_log( __LINE__ . " Insert_Fixit::_copy_title_to_media_library( {$attachment_id} ) data_value = " . var_export( $data_value, true ), 0 );
|
975 |
+
|
976 |
+
$new_content = array( 'ID' => $attachment_id, 'post_title' => $data_value );
|
977 |
+
$result = wp_update_post( $new_content, true );
|
978 |
+
//error_log( __LINE__ . " Insert_Fixit::_copy_title_to_media_library( {$attachment_id} ) update result = " . var_export( $result, true ), 0 );
|
979 |
+
|
980 |
+
if ( $result ) {
|
981 |
+
$updated_attachments++;
|
982 |
+
} else {
|
983 |
+
$errors++;
|
984 |
+
}
|
985 |
+
} // foreach reference
|
986 |
+
} // foreach attachment
|
987 |
+
|
988 |
+
/*
|
989 |
+
* Invalidate the image_objects cache, since Media Library item content has changed.
|
990 |
+
*/
|
991 |
+
if ( $updated_attachments ) {
|
992 |
+
delete_transient( self::SLUG_PREFIX . 'image_objects' );
|
993 |
+
}
|
994 |
+
|
995 |
+
return "<br>Copy Title to Library matched {$image_inserts} posts/pages to {$image_objects} attachments and updated {$updated_attachments} Media Library items. There were {$errors} error(s).\n";
|
996 |
+
} // _copy_title_to_media_library
|
997 |
+
|
998 |
+
/**
|
999 |
+
* Add an attribute to <img ... /> tags in a post/page
|
1000 |
+
* @since 1.02
|
1001 |
+
*
|
1002 |
+
* @return string HTML markup for results/messages
|
1003 |
+
*/
|
1004 |
+
private static function _add_attribute() {
|
1005 |
+
return self::_evaluate_add_attribute( 'Add' );
|
1006 |
+
} // _add_attribute
|
1007 |
+
|
1008 |
+
/**
|
1009 |
+
* Replace (or add) an attribute to <img ... /> tags in a post/page
|
1010 |
+
* @since 1.02
|
1011 |
+
*
|
1012 |
+
* @return string HTML markup for results/messages
|
1013 |
+
*/
|
1014 |
+
private static function _replace_attribute() {
|
1015 |
+
return self::_evaluate_add_attribute( 'Replace' );
|
1016 |
+
} // _replace_attribute
|
1017 |
+
|
1018 |
+
/**
|
1019 |
+
* Delete an attribute from <img ... /> tags in a post/page
|
1020 |
+
* @since 1.02
|
1021 |
+
*
|
1022 |
+
* @return string HTML markup for results/messages
|
1023 |
+
*/
|
1024 |
+
private static function _delete_attribute() {
|
1025 |
+
return self::_evaluate_add_attribute( 'Delete' );
|
1026 |
+
} // _delete_attribute
|
1027 |
+
|
1028 |
+
/**
|
1029 |
+
* Attach items to the first Post/Page they are inserted in
|
1030 |
+
*
|
1031 |
+
* @since 1.01
|
1032 |
*
|
1033 |
* @return string HTML markup for results/messages
|
1034 |
*/
|
1039 |
* Load the image_inserts array
|
1040 |
*/
|
1041 |
self::_build_image_inserts_cache( true );
|
1042 |
+
|
1043 |
/*
|
1044 |
* Load the image_objects array
|
1045 |
*/
|
1046 |
self::_build_image_objects_cache( false, true );
|
1047 |
+
|
1048 |
// Initialize statistics
|
1049 |
$image_inserts = count( self::$image_inserts );
|
1050 |
$image_objects = count( self::$image_objects );
|
1051 |
$inserted_in = 0;
|
1052 |
$updated_attachments = 0;
|
1053 |
$errors = 0;
|
1054 |
+
|
1055 |
foreach ( self::$image_objects as $attachment => $posts ) {
|
1056 |
$inserted_in += count( $posts );
|
1057 |
+
//error_log( __LINE__ . " _attach_inserted_in( {$attachment} ) posts = " . var_export( $posts, true ), 0 );
|
1058 |
$keys = array_keys( $posts );
|
1059 |
$args = array( 'ID' => $attachment, 'post_parent' => $keys[0] );
|
1060 |
+
//error_log( __LINE__ . " _attach_inserted_in( {$attachment} ) args = " . var_export( $args, true ), 0 );
|
1061 |
if ( wp_update_post( $args ) ) {
|
1062 |
$updated_attachments++;
|
1063 |
} else {
|
1069 |
} // _attach_inserted_in
|
1070 |
|
1071 |
/**
|
1072 |
+
* Attach items to the first Post/Page for which they are the Featured Image
|
1073 |
*
|
1074 |
+
* @since 1.01
|
1075 |
*
|
1076 |
* @return string HTML markup for results/messages
|
1077 |
*/
|
1078 |
private static function _attach_featured_in() {
|
1079 |
global $wpdb;
|
1080 |
+
|
1081 |
/*
|
1082 |
* Load the featured_objects array
|
1083 |
*/
|
1084 |
self::_build_featured_objects_cache( false, true );
|
1085 |
+
|
1086 |
// Initialize statistics
|
1087 |
$featured_objects = count( self::$featured_objects );
|
1088 |
$featured_in = 0;
|
1091 |
|
1092 |
foreach ( self::$featured_objects as $attachment => $posts ) {
|
1093 |
$featured_in += count( $posts );
|
1094 |
+
|
1095 |
$args = array( 'ID' => $attachment, 'post_parent' => reset( $posts ) );
|
1096 |
if ( wp_update_post( $args ) ) {
|
1097 |
$updates++;
|
1099 |
$errors++;
|
1100 |
}
|
1101 |
}
|
1102 |
+
|
1103 |
return "<br>Attach Featured In found {$featured_objects} unattached items featured in {$featured_in} posts/pages and made {$updates} attachments. There were {$errors} error(s).\n";
|
1104 |
} // _attach_featured_in
|
1105 |
} //Insert_Fixit
|
examples/{mla-jhdean-mapping-hooks-example.php.txt → mla-jhdean-mapping-hooks-example.php}
RENAMED
File without changes
|
examples/{mla-list-table-extranav-example.php.txt → mla-list-table-extranav-example.php}
RENAMED
File without changes
|
examples/{mla-list-table-hooks-example.php.txt → mla-list-table-hooks-example.php}
RENAMED
File without changes
|
examples/{mla-mapping-hooks-example.php.txt → mla-mapping-hooks-example.php}
RENAMED
File without changes
|
examples/{mla-mapping-parent-data-example.php.txt → mla-mapping-parent-data-example.php}
RENAMED
File without changes
|
examples/{mla-media-modal-hooks-example.php.txt → mla-media-modal-hooks-example.php}
RENAMED
File without changes
|
examples/{mla-media-tagger-example.php.txt → mla-media-tagger-example.php}
RENAMED
File without changes
|
examples/{mla-metabox-hooks-example.php.txt → mla-metabox-hooks-example.php}
RENAMED
File without changes
|
examples/{mla-metadata-mapping-hooks-example.php.txt → mla-metadata-mapping-hooks-example.php}
RENAMED
File without changes
|
examples/mla-multi-wp-query-example.php
ADDED
@@ -0,0 +1,175 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Provides an [mla_gallery] parameter to combine items from each of multiple "taxonomy=term" queries
|
4 |
+
*
|
5 |
+
* In this example, a custom "multi_wp_query" parameter gives one or more "simple taxonomy query" values.
|
6 |
+
* Each value is parsed into individual "taxonomy=term" queries that are executed separately. The query
|
7 |
+
* results are combined and returned to the [`mla_gallery]` shortcode as an "include" parameter to
|
8 |
+
* display the selected items. For example:
|
9 |
+
*
|
10 |
+
* [mla_gallery multi_wp_query="attachment_category=term1,term2|attachment_tag=term3,term4" orderby="date,DESC" numberposts=1]
|
11 |
+
*
|
12 |
+
* The example selects one "most recent" item from each of four terms in two categories.
|
13 |
+
*
|
14 |
+
* This example plugin uses three of the many filters available in the [mla_gallery] shortcode
|
15 |
+
* and illustrates some of the techniques you can use to customize the gallery display.
|
16 |
+
*
|
17 |
+
* Created for support topic "mla gallery - with latest image from four categories?"
|
18 |
+
* opened on 8/3/2016 by "mouret".
|
19 |
+
* https://wordpress.org/support/topic/mla-gallery-with-latest-image-from-four-categories
|
20 |
+
*
|
21 |
+
* @package MLA Multiple WP Query Example
|
22 |
+
* @version 1.00
|
23 |
+
*/
|
24 |
+
|
25 |
+
/*
|
26 |
+
Plugin Name: MLA Multiple WP Query Example
|
27 |
+
Plugin URI: http://fairtradejudaica.org/media-library-assistant-a-wordpress-plugin/
|
28 |
+
Description: Provides an [mla_gallery] parameter to combine items from each of multiple "taxonomy=term" queries.
|
29 |
+
Author: David Lingren
|
30 |
+
Version: 1.00
|
31 |
+
Author URI: http://fairtradejudaica.org/our-story/staff/
|
32 |
+
|
33 |
+
Copyright 2016 David Lingren
|
34 |
+
|
35 |
+
This program is free software; you can redistribute it and/or modify
|
36 |
+
it under the terms of the GNU General Public License as published by
|
37 |
+
the Free Software Foundation; either version 2 of the License, or
|
38 |
+
(at your option) any later version.
|
39 |
+
|
40 |
+
This program is distributed in the hope that it will be useful,
|
41 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
42 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
43 |
+
GNU General Public License for more details.
|
44 |
+
|
45 |
+
You can get a copy of the GNU General Public License by writing to the
|
46 |
+
Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
|
47 |
+
*/
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Class MLA Multiple WP Query Example provides an [mla_gallery] parameter to combine items from
|
51 |
+
* each of multiple "taxonomy=term" queries
|
52 |
+
*
|
53 |
+
* @package MLA Multiple WP Query Example
|
54 |
+
* @since 1.00
|
55 |
+
*/
|
56 |
+
class MLAMultipleWPQueryExample {
|
57 |
+
/**
|
58 |
+
* Initialization function, similar to __construct()
|
59 |
+
*
|
60 |
+
* Installs hooks for front-end requests; exits for admin-mode requests.
|
61 |
+
*
|
62 |
+
* @since 1.00
|
63 |
+
*
|
64 |
+
* @return void
|
65 |
+
*/
|
66 |
+
public static function initialize() {
|
67 |
+
/*
|
68 |
+
* The filters are only useful for front-end posts/pages; exit if in the admin section
|
69 |
+
*/
|
70 |
+
if ( is_admin() )
|
71 |
+
return;
|
72 |
+
|
73 |
+
add_filter( 'mla_gallery_attributes', 'MLAMultipleWPQueryExample::mla_gallery_attributes_filter', 10, 1 );
|
74 |
+
add_filter( 'mla_gallery_query_arguments', 'MLAMultipleWPQueryExample::mla_gallery_query_arguments_filter', 10, 1 );
|
75 |
+
}
|
76 |
+
|
77 |
+
/**
|
78 |
+
* Save the shortcode attributes
|
79 |
+
*
|
80 |
+
* @since 1.00
|
81 |
+
*
|
82 |
+
* @var array
|
83 |
+
*/
|
84 |
+
private static $shortcode_attributes = array();
|
85 |
+
|
86 |
+
/**
|
87 |
+
* MLA Gallery (Display) Attributes gives you an opportunity to record or modify
|
88 |
+
* the arguments passed in to the shortcode before they are merged with the
|
89 |
+
* default arguments used for the gallery display.
|
90 |
+
*
|
91 |
+
* @since 1.00
|
92 |
+
*
|
93 |
+
* @param array the shortcode parameters passed in to the shortcode
|
94 |
+
*
|
95 |
+
* @return array updated shortcode attributes
|
96 |
+
*/
|
97 |
+
public static function mla_gallery_attributes_filter( $shortcode_attributes ) {
|
98 |
+
/*
|
99 |
+
* Save the attributes for use in the later filters,
|
100 |
+
* and remove our custom parameter
|
101 |
+
*/
|
102 |
+
self::$shortcode_attributes = $shortcode_attributes;
|
103 |
+
unset( $shortcode_attributes['multi_wp_query'] );
|
104 |
+
|
105 |
+
return $shortcode_attributes;
|
106 |
+
} // mla_gallery_attributes_filter
|
107 |
+
|
108 |
+
/**
|
109 |
+
* MLA Gallery Query Arguments gives you an opportunity to record or modify the attachment
|
110 |
+
* query arguments after the shortcode attributes are merged with the default arguments.
|
111 |
+
*
|
112 |
+
* In this plugin the "multi_wp_query" parameter drives a series of queries that select the items.
|
113 |
+
* The item ID values are passed back to the [mla_gallery] shortcode as an "incliude" parameter.
|
114 |
+
*
|
115 |
+
* @since 1.00
|
116 |
+
*
|
117 |
+
* @param array shortcode arguments merged with attachment selection defaults
|
118 |
+
*
|
119 |
+
* @return array updated attachment query arguments
|
120 |
+
*/
|
121 |
+
public static function mla_gallery_query_arguments_filter( $all_query_parameters ) {
|
122 |
+
global $post;
|
123 |
+
|
124 |
+
if ( empty( self::$shortcode_attributes['multi_wp_query'] ) ) {
|
125 |
+
return $all_query_parameters;
|
126 |
+
}
|
127 |
+
|
128 |
+
/*
|
129 |
+
* Parse the parameter:
|
130 |
+
* 1) Split the taxonomy=term(s) elements
|
131 |
+
* 2) Split the term(s) lists
|
132 |
+
*/
|
133 |
+
$taxonomy_elements = explode( '|', self::$shortcode_attributes['multi_wp_query'] );
|
134 |
+
$taxonomy_queries = array();
|
135 |
+
foreach ( $taxonomy_elements as $query ) {
|
136 |
+
$taxonomy_elements = explode( '=', $query );
|
137 |
+
if ( 2 == count( $taxonomy_elements ) ) {
|
138 |
+
$taxonomy_queries[ $taxonomy_elements[0] ] = explode( ',', $taxonomy_elements[1] );
|
139 |
+
}
|
140 |
+
}
|
141 |
+
|
142 |
+
// Include all other parameters, e.g., orderby and numberposts, in the queries
|
143 |
+
$my_query_vars = $all_query_parameters;
|
144 |
+
$includes = array();
|
145 |
+
foreach( $taxonomy_queries as $taxonomy => $terms ) {
|
146 |
+
foreach ( $terms as $term ) {
|
147 |
+
$my_query_vars[ $taxonomy ] = $term;
|
148 |
+
$attachments = MLAShortcode_Support::mla_get_shortcode_attachments( $post->ID, $my_query_vars );
|
149 |
+
unset( $my_query_vars[ $taxonomy ] );
|
150 |
+
|
151 |
+
foreach ( $attachments as $attachment ) {
|
152 |
+
$includes[ $attachment->ID ] = $attachment->ID;
|
153 |
+
}
|
154 |
+
} // each term
|
155 |
+
} // each taxonomy
|
156 |
+
|
157 |
+
if ( empty( $includes ) ) {
|
158 |
+
$all_query_parameters['include'] = '1'; // return no items
|
159 |
+
} else {
|
160 |
+
$all_query_parameters['include'] = implode( ',', $includes );
|
161 |
+
}
|
162 |
+
|
163 |
+
// These parameters no longer apply
|
164 |
+
unset( $all_query_parameters['numberposts'] );
|
165 |
+
unset( $all_query_parameters['posts_per_page'] );
|
166 |
+
|
167 |
+
return $all_query_parameters;
|
168 |
+
} // mla_gallery_query_arguments_filter
|
169 |
+
} // Class MLAMultipleWPQueryExample
|
170 |
+
|
171 |
+
/*
|
172 |
+
* Install the filters at an early opportunity
|
173 |
+
*/
|
174 |
+
add_action('init', 'MLAMultipleWPQueryExample::initialize');
|
175 |
+
?>
|
examples/{mla-project-slug-example.php.txt → mla-project-slug-example.php}
RENAMED
File without changes
|
examples/{mla-random-galleries-example.php.txt → mla-random-galleries-example.php}
RENAMED
File without changes
|
examples/{mla-simple-mapping-hooks-example.php.txt → mla-simple-mapping-hooks-example.php}
RENAMED
@@ -2,21 +2,38 @@
|
|
2 |
/**
|
3 |
* Provides an example of the filters provided by the IPTC/EXIF and Custom Field mapping features
|
4 |
*
|
5 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
*
|
7 |
* @package MLA Simple Mapping Hooks Example
|
8 |
-
* @version 1.
|
9 |
*/
|
10 |
|
11 |
/*
|
12 |
Plugin Name: MLA Simple Mapping Hooks Example
|
13 |
Plugin URI: http://fairtradejudaica.org/media-library-assistant-a-wordpress-plugin/
|
14 |
-
Description:
|
15 |
Author: David Lingren
|
16 |
-
Version: 1.
|
17 |
Author URI: http://fairtradejudaica.org/our-story/staff/
|
18 |
|
19 |
-
Copyright 2014 -
|
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
|
@@ -62,7 +79,7 @@ class MLASimpleMappingHooksExample {
|
|
62 |
* This filter is applied in class-mla-options.php functions
|
63 |
* mla_evaluate_iptc_exif_mapping and mla_evaluate_custom_field_mapping
|
64 |
*/
|
65 |
-
add_filter( 'mla_mapping_updates', 'MLASimpleMappingHooksExample::
|
66 |
}
|
67 |
|
68 |
/**
|
@@ -82,7 +99,11 @@ class MLASimpleMappingHooksExample {
|
|
82 |
*
|
83 |
* @return array updated attachment's updates
|
84 |
*/
|
85 |
-
public static function
|
|
|
|
|
|
|
|
|
86 |
/*
|
87 |
* The first part of the example splits the IPTC "2#105 headline" field, if present, and
|
88 |
* updates two custom fields with the resulting values. You must define an IPTC/EXIF
|
@@ -120,6 +141,34 @@ class MLASimpleMappingHooksExample {
|
|
120 |
unset( $updates['custom_updates']['regex_split_headline'] );
|
121 |
}
|
122 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
123 |
/*
|
124 |
* Remove or comment out the next line to apply the Title and ALT Text cleanup logic
|
125 |
*/
|
@@ -180,7 +229,7 @@ class MLASimpleMappingHooksExample {
|
|
180 |
* To stop this rule's updates, return an empty array, i.e., return array();
|
181 |
*/
|
182 |
return $updates;
|
183 |
-
} //
|
184 |
} //MLASimpleMappingHooksExample
|
185 |
|
186 |
/*
|
2 |
/**
|
3 |
* Provides an example of the filters provided by the IPTC/EXIF and Custom Field mapping features
|
4 |
*
|
5 |
+
* In this example:
|
6 |
+
* - Define an IPTC/EXIF custom field mapping rule for "regex_split_headline"
|
7 |
+
* to populate the "damArtist" and "damEvent" custom fields
|
8 |
+
* - Define an IPTC/EXIF custom field mapping rule for "update_menu_order"
|
9 |
+
* to update the WordPress "menu_order" standard field
|
10 |
+
* - Remove or comment out the "return $updates" line to apply the Title and ALT Text cleanup logic
|
11 |
+
*
|
12 |
+
* Created for support topic "Quick question on replacing string(s) in image metadata"
|
13 |
+
* opened on 7/1/2014 by "AppleBag/Bubba":
|
14 |
+
* https://wordpress.org/support/topic/quick-question-on-replacing-strings-in-image-metadata
|
15 |
+
*
|
16 |
+
* Enhanced for support topic "Regex to Split Data to Custom Fields"
|
17 |
+
* opened on 8/21/2015 by "rockgeek":
|
18 |
+
* https://wordpress.org/support/topic/regex-to-split-data-to-custom-fields
|
19 |
+
*
|
20 |
+
* Enhanced for support topic "Replacing Sort Order attribute"
|
21 |
+
* opened on 8/4/2016 by "ciano":
|
22 |
+
* https://wordpress.org/support/topic/replacing-sort-order-attribute
|
23 |
*
|
24 |
* @package MLA Simple Mapping Hooks Example
|
25 |
+
* @version 1.02
|
26 |
*/
|
27 |
|
28 |
/*
|
29 |
Plugin Name: MLA Simple Mapping Hooks Example
|
30 |
Plugin URI: http://fairtradejudaica.org/media-library-assistant-a-wordpress-plugin/
|
31 |
+
Description: Populates custom fields based on a regular expression; updates menu_order; cleans up Title and ALT Text
|
32 |
Author: David Lingren
|
33 |
+
Version: 1.02
|
34 |
Author URI: http://fairtradejudaica.org/our-story/staff/
|
35 |
|
36 |
+
Copyright 2014 - 2016 David Lingren
|
37 |
|
38 |
This program is free software; you can redistribute it and/or modify
|
39 |
it under the terms of the GNU General Public License as published by
|
79 |
* This filter is applied in class-mla-options.php functions
|
80 |
* mla_evaluate_iptc_exif_mapping and mla_evaluate_custom_field_mapping
|
81 |
*/
|
82 |
+
add_filter( 'mla_mapping_updates', 'MLASimpleMappingHooksExample::mla_mapping_updates', 10, 5 );
|
83 |
}
|
84 |
|
85 |
/**
|
99 |
*
|
100 |
* @return array updated attachment's updates
|
101 |
*/
|
102 |
+
public static function mla_mapping_updates( $updates, $post_id, $category, $settings, $attachment_metadata ) {
|
103 |
+
//error_log( "MLASimpleMappingHooksExample::mla_mapping_updates( {$post_id}, {$category} ) \$updates = " . var_export( $updates, true ), 0 );
|
104 |
+
//error_log( 'MLASimpleMappingHooksExample::mla_mapping_updates $settings = ' . var_export( $settings, true ), 0 );
|
105 |
+
//error_log( 'MLASimpleMappingHooksExample::mla_mapping_updates $attachment_metadata = ' . var_export( $attachment_metadata, true ), 0 );
|
106 |
+
|
107 |
/*
|
108 |
* The first part of the example splits the IPTC "2#105 headline" field, if present, and
|
109 |
* updates two custom fields with the resulting values. You must define an IPTC/EXIF
|
141 |
unset( $updates['custom_updates']['regex_split_headline'] );
|
142 |
}
|
143 |
|
144 |
+
/*
|
145 |
+
* The second part of the example takes a numeric value from the "update_menu_order" rule
|
146 |
+
* and updates the WordPress "menu_order" standard field. You must define an IPTC/EXIF
|
147 |
+
* custom field mapping rule for "update_menu_order" to activate this logic.
|
148 |
+
*/
|
149 |
+
if ( isset( $updates['custom_updates'] ) && isset( $updates['custom_updates']['update_menu_order'] ) ) {
|
150 |
+
$new_value = absint( $updates['custom_updates']['update_menu_order'] );
|
151 |
+
|
152 |
+
/*
|
153 |
+
* If $updates[ 'menu_order' ] is set, some other mapping rule
|
154 |
+
* has been set up, so we respect the result. If not, use
|
155 |
+
* whatever the current Menu Order value is.
|
156 |
+
*/
|
157 |
+
if ( isset( $updates[ 'menu_order' ] ) ) {
|
158 |
+
$old_value = $updates[ 'menu_order' ];
|
159 |
+
} else {
|
160 |
+
$post = get_post( $post_id );
|
161 |
+
$old_value = $post->menu_order;
|
162 |
+
}
|
163 |
+
|
164 |
+
if ( $old_value != $new_value ) {
|
165 |
+
$updates[ 'menu_order' ] = $new_value;
|
166 |
+
}
|
167 |
+
|
168 |
+
// We don't actually store update_menu_order as a custom field
|
169 |
+
unset( $updates['custom_updates']['update_menu_order'] );
|
170 |
+
}
|
171 |
+
|
172 |
/*
|
173 |
* Remove or comment out the next line to apply the Title and ALT Text cleanup logic
|
174 |
*/
|
229 |
* To stop this rule's updates, return an empty array, i.e., return array();
|
230 |
*/
|
231 |
return $updates;
|
232 |
+
} // mla_mapping_updates
|
233 |
} //MLASimpleMappingHooksExample
|
234 |
|
235 |
/*
|
examples/mla-substitution-parameter-hooks-example.php
ADDED
@@ -0,0 +1,430 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Provides examples of the filters provided for Field-level Substitution Parameters
|
4 |
+
*
|
5 |
+
* In this example:
|
6 |
+
* - a "parent_terms:" prefix accesses taxonomy terms assigned to an item's parent post/page
|
7 |
+
* - a "page_terms:" prefix accesses taxonomy terms assigned to the current post/page
|
8 |
+
* - an "author:" prefix accesses all of the WP_User properties for an item's author
|
9 |
+
* - an "conditional:" prefix returns a value when a condition is true, e.g., during the upload process
|
10 |
+
*
|
11 |
+
* Created for support topic "Parent category tag"
|
12 |
+
* opened on 5/20/2016 by "Levy":
|
13 |
+
* https://wordpress.org/support/topic/parent-category-tag
|
14 |
+
*
|
15 |
+
* Enhanced for support topic "Automatically adding the author as a category"
|
16 |
+
* opened on 6/27/2016 by "badger41":
|
17 |
+
* https://wordpress.org/support/topic/automatically-adding-the-author-as-a-category
|
18 |
+
*
|
19 |
+
* Enhanced for support topic "Apply Category to JPG images only on Upload"
|
20 |
+
* opened on 7/11/2016 by "dg_Amanda":
|
21 |
+
* https://wordpress.org/support/topic/apply-category-to-jpg-images-only-on-upload
|
22 |
+
*
|
23 |
+
* Enhanced for support topic "How to add a number to the title of images inserted in same post?"
|
24 |
+
* opened on 7/19/2016 by "Levy":
|
25 |
+
* https://wordpress.org/support/topic/how-to-add-a-number-to-the-title-of-images-inserted-in-same-post
|
26 |
+
*
|
27 |
+
* @package MLA Substitution Parameter Hooks Example
|
28 |
+
* @version 1.03
|
29 |
+
*/
|
30 |
+
|
31 |
+
/*
|
32 |
+
Plugin Name: MLA Substitution Parameter Hooks Example
|
33 |
+
Plugin URI: http://fairtradejudaica.org/media-library-assistant-a-wordpress-plugin/
|
34 |
+
Description: Adds "parent_terms:", "page_terms:", "author:" and "conditional:" Field-level Substitution Parameters
|
35 |
+
Author: David Lingren
|
36 |
+
Version: 1.03
|
37 |
+
Author URI: http://fairtradejudaica.org/our-story/staff/
|
38 |
+
|
39 |
+
Copyright 2016 David Lingren
|
40 |
+
|
41 |
+
This program is free software; you can redistribute it and/or modify
|
42 |
+
it under the terms of the GNU General Public License as published by
|
43 |
+
the Free Software Foundation; either version 2 of the License, or
|
44 |
+
(at your option) any later version.
|
45 |
+
|
46 |
+
This program is distributed in the hope that it will be useful,
|
47 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
48 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
49 |
+
GNU General Public License for more details.
|
50 |
+
|
51 |
+
You can get a copy of the GNU General Public License by writing to the
|
52 |
+
Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
|
53 |
+
*/
|
54 |
+
|
55 |
+
/**
|
56 |
+
* Class MLA Substitution Parameter Hooks Example hooks four of the filters provided
|
57 |
+
* by the "Field-level substitution parameter filters (Hooks)"
|
58 |
+
*
|
59 |
+
* Call it anything you want, but give it an unlikely and hopefully unique name. Hiding
|
60 |
+
* everything else inside a class means this is the only name you have to worry about.
|
61 |
+
*
|
62 |
+
* @package MLA Substitution Parameter Hooks Example
|
63 |
+
* @since 1.00
|
64 |
+
*/
|
65 |
+
class MLASubstitutionParameterExample {
|
66 |
+
/**
|
67 |
+
* Initialization function, similar to __construct()
|
68 |
+
*
|
69 |
+
* Installs filters and actions that handle the MLA hooks for the
|
70 |
+
* "Field-level substitution parameters"
|
71 |
+
*
|
72 |
+
* @since 1.00
|
73 |
+
*
|
74 |
+
* @return void
|
75 |
+
*/
|
76 |
+
public static function initialize() {
|
77 |
+
/*
|
78 |
+
* Defined in /media-library-assistant/includes/class-mla-data.php
|
79 |
+
*/
|
80 |
+
//add_filter( 'mla_expand_custom_data_source', 'MLASubstitutionParameterExample::mla_expand_custom_data_source', 10, 9 );
|
81 |
+
add_filter( 'mla_expand_custom_prefix', 'MLASubstitutionParameterExample::mla_expand_custom_prefix', 10, 8 );
|
82 |
+
//add_filter( 'mla_apply_custom_format', 'MLASubstitutionParameterExample::mla_apply_custom_format', 10, 2 );
|
83 |
+
|
84 |
+
/*
|
85 |
+
* Defined in /media-library-assistant/includes/class-mla-data-source.php
|
86 |
+
*/
|
87 |
+
//add_filter( 'mla_evaluate_custom_data_source', 'MLASubstitutionParameterExample::mla_evaluate_custom_data_source', 10, 5 );
|
88 |
+
|
89 |
+
/*
|
90 |
+
* Additional hooks defined in "MLA Custom Field and IPTC/EXIF Mapping Actions and Filters (Hooks)".
|
91 |
+
* These are only required for the "conditional:is_upload" prefix processing.
|
92 |
+
*/
|
93 |
+
add_filter( 'mla_update_attachment_metadata_prefilter', 'MLASubstitutionParameterExample::mla_update_attachment_metadata_prefilter', 10, 3 );
|
94 |
+
add_filter( 'mla_update_attachment_metadata_postfilter', 'MLASubstitutionParameterExample::mla_update_attachment_metadata_postfilter', 10, 3 );
|
95 |
+
} // initialize
|
96 |
+
|
97 |
+
/**
|
98 |
+
* MLA Update Attachment Metadata Prefilter
|
99 |
+
*
|
100 |
+
* Used in this example to set the "is_upload" status before mapping rules are run.
|
101 |
+
*
|
102 |
+
* @since 1.01
|
103 |
+
*
|
104 |
+
* @param array attachment metadata
|
105 |
+
* @param integer The Post ID of the new/updated attachment
|
106 |
+
* @param array Processing options, e.g., 'is_upload'
|
107 |
+
*/
|
108 |
+
public static function mla_update_attachment_metadata_prefilter( $data, $post_id, $options ) {
|
109 |
+
self::$is_upload = $options['is_upload'];
|
110 |
+
|
111 |
+
return $data;
|
112 |
+
} // mla_update_attachment_metadata_prefilter
|
113 |
+
|
114 |
+
/**
|
115 |
+
* Share the upload status among mla_update_attachment_metadata_prefilter, mla_expand_custom_prefix
|
116 |
+
* and mla_update_attachment_metadata_postfilter
|
117 |
+
*
|
118 |
+
* @since 1.01
|
119 |
+
*
|
120 |
+
* @var boolean Upload status
|
121 |
+
*/
|
122 |
+
private static $is_upload = false;
|
123 |
+
|
124 |
+
/**
|
125 |
+
* MLA Update Attachment Metadata Postfilter
|
126 |
+
*
|
127 |
+
* Used in this example to clear the "is_upload" status after mapping rules are run.
|
128 |
+
*
|
129 |
+
* @since 1.01
|
130 |
+
*
|
131 |
+
* @param array attachment metadata
|
132 |
+
* @param integer The Post ID of the new/updated attachment
|
133 |
+
* @param array Processing options, e.g., 'is_upload'
|
134 |
+
*/
|
135 |
+
public static function mla_update_attachment_metadata_postfilter( $data, $post_id, $options ) {
|
136 |
+
self::$is_upload = false;
|
137 |
+
|
138 |
+
return $data;
|
139 |
+
} // mla_update_attachment_metadata_postfilter
|
140 |
+
|
141 |
+
/**
|
142 |
+
* MLA Expand Custom Data Source Filter
|
143 |
+
*
|
144 |
+
* For shortcode and Content Template processing, gives you an opportunity to generate a custom data value.
|
145 |
+
*
|
146 |
+
* @since 1.00
|
147 |
+
*
|
148 |
+
* @param string NULL, indicating that by default, no custom value is available
|
149 |
+
* @param string the entire data-source text including option/format and any arguments
|
150 |
+
* @param string the data-source name
|
151 |
+
* @param array data-source components; prefix (empty), value, option, format and args (if present)
|
152 |
+
* @param array values from the query, if any, e.g. shortcode parameters
|
153 |
+
* @param array item-level markup template values, if any
|
154 |
+
* @param integer attachment ID for attachment-specific values
|
155 |
+
* @param boolean for option 'multi', retain existing values
|
156 |
+
* @param string default option value
|
157 |
+
*/
|
158 |
+
public static function mla_expand_custom_data_source( $custom_value, $key, $candidate, $value, $query, $markup_values, $post_id, $keep_existing, $default_option ) {
|
159 |
+
/*
|
160 |
+
* Uncomment the error_log statements in any of the filters to see what's passed in
|
161 |
+
*/
|
162 |
+
//error_log( __LINE__ . " MLASubstitutionParameterExample::mla_expand_custom_data_source( {$key}, {$candidate}, {$post_id}, {$keep_existing}, {$default_option} ) value = " . var_export( $value, true ), 0 );
|
163 |
+
//error_log( __LINE__ . " MLASubstitutionParameterExample::mla_expand_custom_data_source( {$candidate}, {$post_id} ) query = " . var_export( $query, true ), 0 );
|
164 |
+
//error_log( __LINE__ . " MLASubstitutionParameterExample::mla_expand_custom_data_source( {$candidate}, {$post_id} ) markup_values = " . var_export( $markup_values, true ), 0 );
|
165 |
+
|
166 |
+
return $custom_value;
|
167 |
+
} // mla_expand_custom_data_source
|
168 |
+
|
169 |
+
/**
|
170 |
+
* Evaluate parent_terms: or page_terms: values
|
171 |
+
*
|
172 |
+
* @since 1.03
|
173 |
+
*
|
174 |
+
* @param mixed String or array - initial value
|
175 |
+
* @param integer The Post ID of the new/updated attachment
|
176 |
+
* @param string Taxonomy slug
|
177 |
+
* @param string Field name in term object
|
178 |
+
* @param string Format/option; text,single,export,unpack,array
|
179 |
+
*
|
180 |
+
* @return mixed String or array
|
181 |
+
*/
|
182 |
+
private static function _evaluate_terms( $custom_value, $post_id, $taxonomy, $qualifier, $option ) {
|
183 |
+
if ( 0 == $post_id ) {
|
184 |
+
return $custom_value;
|
185 |
+
}
|
186 |
+
|
187 |
+
if ( empty( $qualifier ) ) {
|
188 |
+
$qualifier = 'name';
|
189 |
+
}
|
190 |
+
|
191 |
+
$terms = get_object_term_cache( $post_id, $taxonomy );
|
192 |
+
if ( false === $terms ) {
|
193 |
+
$terms = wp_get_object_terms( $post_id, $taxonomy );
|
194 |
+
wp_cache_add( $post_id, $terms, $taxonomy . '_relationships' );
|
195 |
+
}
|
196 |
+
|
197 |
+
if ( 'array' == $option ) {
|
198 |
+
$custom_value = array();
|
199 |
+
} else {
|
200 |
+
$custom_value = '';
|
201 |
+
}
|
202 |
+
|
203 |
+
if ( is_wp_error( $terms ) ) {
|
204 |
+
$custom_value = implode( ',', $terms->get_error_messages() );
|
205 |
+
} elseif ( ! empty( $terms ) ) {
|
206 |
+
if ( 'single' == $option || 1 == count( $terms ) ) {
|
207 |
+
reset( $terms );
|
208 |
+
$term = current( $terms );
|
209 |
+
$fields = get_object_vars( $term );
|
210 |
+
$custom_value = isset( $fields[ $qualifier ] ) ? $fields[ $qualifier ] : $fields['name'];
|
211 |
+
$custom_value = sanitize_term_field( $qualifier, $custom_value, $term->term_id, $taxonomy, 'display' );
|
212 |
+
} elseif ( ( 'export' == $option ) || ( 'unpack' == $option ) ) {
|
213 |
+
$custom_value = sanitize_text_field( var_export( $terms, true ) );
|
214 |
+
} else {
|
215 |
+
foreach ( $terms as $term ) {
|
216 |
+
$fields = get_object_vars( $term );
|
217 |
+
$field_value = isset( $fields[ $qualifier ] ) ? $fields[ $qualifier ] : $fields['name'];
|
218 |
+
$field_value = sanitize_term_field( $qualifier, $field_value, $term->term_id, $taxonomy, 'display' );
|
219 |
+
|
220 |
+
if ( 'array' == $option ) {
|
221 |
+
$custom_value[] = $field_value;
|
222 |
+
} else {
|
223 |
+
$custom_value .= strlen( $custom_value ) ? ', ' . $field_value : $field_value;
|
224 |
+
}
|
225 |
+
}
|
226 |
+
}
|
227 |
+
}
|
228 |
+
|
229 |
+
return $custom_value;
|
230 |
+
} // _evaluate_terms
|
231 |
+
|
232 |
+
/**
|
233 |
+
* MLA Expand Custom Prefix Filter
|
234 |
+
*
|
235 |
+
* Gives you an opportunity to generate your custom data value when a parameter's prefix value is not recognized.
|
236 |
+
*
|
237 |
+
* @since 1.00
|
238 |
+
*
|
239 |
+
* @param string NULL, indicating that by default, no custom value is available
|
240 |
+
* @param string the data-source name
|
241 |
+
* @param array data-source components; prefix (empty), value, option, format and args (if present)
|
242 |
+
* @param array values from the query, if any, e.g. shortcode parameters
|
243 |
+
* @param array item-level markup template values, if any
|
244 |
+
* @param integer attachment ID for attachment-specific values
|
245 |
+
* @param boolean for option 'multi', retain existing values
|
246 |
+
* @param string default option value
|
247 |
+
*/
|
248 |
+
public static function mla_expand_custom_prefix( $custom_value, $key, $value, $query, $markup_values, $post_id, $keep_existing, $default_option ) {
|
249 |
+
static $author_cache = array();
|
250 |
+
|
251 |
+
//error_log( __LINE__ . " MLASubstitutionParameterExample::mla_expand_custom_prefix( {$key}, {$post_id}, {$keep_existing}, {$default_option} ) value = " . var_export( $value, true ), 0 );
|
252 |
+
//error_log( __LINE__ . " MLASubstitutionParameterExample::mla_expand_custom_prefix( {$key}, {$post_id} ) query = " . var_export( $query, true ), 0 );
|
253 |
+
//error_log( __LINE__ . " MLASubstitutionParameterExample::mla_expand_custom_prefix( {$key}, {$post_id} ) markup_values = " . var_export( $markup_values, true ), 0 );
|
254 |
+
|
255 |
+
if ( 0 == absint( $post_id ) ) {
|
256 |
+
return $custom_value;
|
257 |
+
}
|
258 |
+
|
259 |
+
// Look for field/value qualifier
|
260 |
+
$match_count = preg_match( '/^(.+)\((.+)\)/', $value['value'], $matches );
|
261 |
+
if ( $match_count ) {
|
262 |
+
$field = $matches[1];
|
263 |
+
$qualifier = $matches[2];
|
264 |
+
} else {
|
265 |
+
$field = $value['value'];
|
266 |
+
$qualifier = '';
|
267 |
+
}
|
268 |
+
|
269 |
+
if ( 'parent_terms' == $value['prefix'] ) {
|
270 |
+
if ( isset( $markup_values['parent'] ) ) {
|
271 |
+
$post_parent = absint( $markup_values['parent'] );
|
272 |
+
} else {
|
273 |
+
$item = get_post( $post_id );
|
274 |
+
$post_parent = absint( $item->post_parent );
|
275 |
+
}
|
276 |
+
|
277 |
+
$custom_value = self::_evaluate_terms( $custom_value, $post_parent, $field, $qualifier, $value['option'] );
|
278 |
+
} elseif ( 'page_terms' == $value['prefix'] ) {
|
279 |
+
if ( isset( $markup_values['page_ID'] ) ) {
|
280 |
+
$post_id = absint( $markup_values['page_ID'] );
|
281 |
+
} else {
|
282 |
+
global $post;
|
283 |
+
|
284 |
+
if ( isset( $post ) && !empty( $post->ID ) ) {
|
285 |
+
$post_id = absint( $post->ID );
|
286 |
+
} else {
|
287 |
+
$post_id = 0;
|
288 |
+
}
|
289 |
+
}
|
290 |
+
|
291 |
+
$custom_value = self::_evaluate_terms( $custom_value, $post_id, $field, $qualifier, $value['option'] );
|
292 |
+
} elseif ( 'author' == $value['prefix'] ) {
|
293 |
+
if ( isset( $markup_values['page_author'] ) ) {
|
294 |
+
$page_author = absint( $markup_values['page_author'] );
|
295 |
+
} else {
|
296 |
+
$item = get_post( $post_id );
|
297 |
+
$page_author = absint( $item->post_author );
|
298 |
+
}
|
299 |
+
|
300 |
+
// $page_author = $markup_values['page_author'];
|
301 |
+
if ( isset( $author_cache[ $page_author ] ) ) {
|
302 |
+
$author = $author_cache[ $page_author ];
|
303 |
+
} else {
|
304 |
+
$author = new WP_User( $page_author );
|
305 |
+
//error_log( __LINE__ . " MLASubstitutionParameterExample::mla_expand_custom_prefix( {$key}, {$post_id} ) author = " . var_export( $author, true ), 0 );
|
306 |
+
if ( $author instanceof WP_User && $author->ID == $page_author ) {
|
307 |
+
$author_cache[ $page_author ] = $author;
|
308 |
+
} else {
|
309 |
+
return $custom_value;
|
310 |
+
}
|
311 |
+
}
|
312 |
+
|
313 |
+
if ( property_exists( $author, $value['value'] ) ) {
|
314 |
+
$custom_value = $author->$value['value'];
|
315 |
+
} else {
|
316 |
+
$custom_value = $author->get( $value['value'] );
|
317 |
+
}
|
318 |
+
|
319 |
+
//error_log( __LINE__ . " MLASubstitutionParameterExample::mla_expand_custom_prefix( {$key}, {$post_id} ) custom_value = " . var_export( $custom_value, true ), 0 );
|
320 |
+
|
321 |
+
if ( is_array( $custom_value ) ) {
|
322 |
+
if ( 'single' == $value['option'] || 1 == count( $custom_value ) ) {
|
323 |
+
$custom_value = sanitize_text_field( reset( $custom_value ) );
|
324 |
+
} elseif ( ( 'export' == $value['option'] ) || ( 'unpack' == $value['option'] ) ) {
|
325 |
+
$custom_value = sanitize_text_field( var_export( $custom_value, true ) );
|
326 |
+
} else {
|
327 |
+
if ( 'array' == $value['option'] ) {
|
328 |
+
$new_value = array();
|
329 |
+
} else {
|
330 |
+
$custom_value = '';
|
331 |
+
}
|
332 |
+
|
333 |
+
foreach ( $custom_value as $element ) {
|
334 |
+
$field_value = sanitize_text_field( $element );
|
335 |
+
|
336 |
+
if ( 'array' == $value['option'] ) {
|
337 |
+
$custom_value[] = $field_value;
|
338 |
+
} else {
|
339 |
+
$custom_value .= strlen( $custom_value ) ? ', ' . $field_value : $field_value;
|
340 |
+
}
|
341 |
+
}
|
342 |
+
}
|
343 |
+
}
|
344 |
+
} elseif ( 'conditional' == $value['prefix'] ) {
|
345 |
+
if ( empty( $value['args'] ) ) {
|
346 |
+
return $custom_value;
|
347 |
+
}
|
348 |
+
|
349 |
+
$true_value = ( isset( $value['args'][0] ) && !empty( $value['args'][0] ) ) ? $value['args'][0] : '';
|
350 |
+
$false_value = ( isset( $value['args'][1] ) && !empty( $value['args'][1] ) ) ? $value['args'][1] : '';
|
351 |
+
$qualifier = ( isset( $value['args'][2] ) && !empty( $value['args'][2] ) ) ? $value['args'][2] : '';
|
352 |
+
|
353 |
+
switch ( $value['value'] ) {
|
354 |
+
case 'is_upload':
|
355 |
+
if ( self::$is_upload ) {
|
356 |
+
// Optional MIME type qualifier
|
357 |
+
if ( !empty( $qualifier ) ) {
|
358 |
+
$item = get_post( $post_id );
|
359 |
+
$post_mime_type = explode( '/', sanitize_mime_type( $item->post_mime_type ) );
|
360 |
+
//error_log( __LINE__ . " MLASubstitutionParameterExample::mla_expand_custom_prefix( {$key}, {$post_id} ) post_mime_type = " . var_export( $post_mime_type, true ), 0 );
|
361 |
+
$qualifier = explode( '/', sanitize_mime_type( $qualifier ) );
|
362 |
+
//error_log( __LINE__ . " MLASubstitutionParameterExample::mla_expand_custom_prefix( {$key}, {$post_id} ) qualifier = " . var_export( $qualifier, true ), 0 );
|
363 |
+
|
364 |
+
if ( isset( $qualifier[1] ) && isset( $post_mime_type[1] ) && ( $qualifier[1]!== $post_mime_type[1] ) ) {
|
365 |
+
$custom_value = $false_value;
|
366 |
+
break;
|
367 |
+
}
|
368 |
+
|
369 |
+
if ( isset( $qualifier[0] ) && isset( $post_mime_type[0] ) && ( $qualifier[0]!== $post_mime_type[0] ) ) {
|
370 |
+
$custom_value = $false_value;
|
371 |
+
break;
|
372 |
+
}
|
373 |
+
}
|
374 |
+
|
375 |
+
$custom_value = $true_value;
|
376 |
+
} else {
|
377 |
+
$custom_value = $false_value;
|
378 |
+
}
|
379 |
+
//error_log( __LINE__ . " MLASubstitutionParameterExample::mla_expand_custom_prefix( {$key}, {$post_id} ) value = '{$custom_value}', is_upload = " . var_export( self::$is_upload, true ), 0 );
|
380 |
+
break;
|
381 |
+
default:
|
382 |
+
// ignore anything else
|
383 |
+
}
|
384 |
+
}
|
385 |
+
|
386 |
+
return $custom_value;
|
387 |
+
} // mla_expand_custom_prefix
|
388 |
+
|
389 |
+
/**
|
390 |
+
* MLA Apply Custom Format Filter
|
391 |
+
*
|
392 |
+
* Gives you an opportunity to apply your custom option/format to the data value.
|
393 |
+
*
|
394 |
+
* @since 1.00
|
395 |
+
*
|
396 |
+
* @param string the data-source value
|
397 |
+
* @param array data-source components; prefix (empty), value, option, format and args (if present)
|
398 |
+
*/
|
399 |
+
public static function mla_apply_custom_format( $value, $args ) {
|
400 |
+
//error_log( __LINE__ . " MLASubstitutionParameterExample::mla_apply_custom_format( {$value} ) args = " . var_export( $args, true ), 0 );
|
401 |
+
|
402 |
+
return $value;
|
403 |
+
} // mla_apply_custom_format
|
404 |
+
|
405 |
+
/**
|
406 |
+
* MLA Evaluate Custom Data Source Filter
|
407 |
+
*
|
408 |
+
* For metadata mapping rules, gives you an opportunity to generate a custom data value.
|
409 |
+
*
|
410 |
+
* @since 1.00
|
411 |
+
*
|
412 |
+
* @param string NULL, indicating that by default, no custom value is available
|
413 |
+
* @param integer attachment ID for attachment-specific values
|
414 |
+
* @param string category/scope to evaluate against: custom_field_mapping or single_attachment_mapping
|
415 |
+
* @param array data source specification ( name, *data_source, *keep_existing, *format, mla_column, quick_edit, bulk_edit, *meta_name, *option, no_null )
|
416 |
+
* @param array _wp_attachment_metadata, default NULL (use current postmeta database value)
|
417 |
+
*/
|
418 |
+
public static function mla_evaluate_custom_data_source( $custom_value, $post_id, $category, $data_value, $attachment_metadata ) {
|
419 |
+
//error_log( __LINE__ . " MLASubstitutionParameterExample::mla_expand_custom_data_source( {$post_id}, {$category} ) data_value = " . var_export( $data_value, true ), 0 );
|
420 |
+
//error_log( __LINE__ . " MLASubstitutionParameterExample::mla_expand_custom_data_source( {$post_id}, {$category} ) attachment_metadata = " . var_export( $attachment_metadata, true ), 0 );
|
421 |
+
|
422 |
+
return $custom_value;
|
423 |
+
} // mla_evaluate_custom_data_source
|
424 |
+
} //MLASubstitutionParameterExample
|
425 |
+
|
426 |
+
/*
|
427 |
+
* Install the filters at an early opportunity
|
428 |
+
*/
|
429 |
+
add_action('init', 'MLASubstitutionParameterExample::initialize');
|
430 |
+
?>
|
examples/mla-substitution-parameter-hooks-example.php.txt
DELETED
@@ -1,180 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Provides examples of the filters provided for Field-level Substitution Parameters
|
4 |
-
*
|
5 |
-
* In this example:
|
6 |
-
* - a new "parent-terms:" prefix accesses taxonomy terms assigned to an item's parent post/page
|
7 |
-
*
|
8 |
-
* Created for support topic "Parent category tag"
|
9 |
-
* opened on 5/20/2016 by "Levy":
|
10 |
-
* https://wordpress.org/support/topic/parent-category-tag
|
11 |
-
*
|
12 |
-
* @package MLA Substitution Parameter Hooks Example
|
13 |
-
* @version 1.00
|
14 |
-
*/
|
15 |
-
|
16 |
-
/*
|
17 |
-
Plugin Name: MLA Substitution Parameter Hooks Example
|
18 |
-
Plugin URI: http://fairtradejudaica.org/media-library-assistant-a-wordpress-plugin/
|
19 |
-
Description: Provides examples of the filters provided for Field-level Substitution Parameters
|
20 |
-
Author: David Lingren
|
21 |
-
Version: 1.00
|
22 |
-
Author URI: http://fairtradejudaica.org/our-story/staff/
|
23 |
-
|
24 |
-
Copyright 2016 David Lingren
|
25 |
-
|
26 |
-
This program is free software; you can redistribute it and/or modify
|
27 |
-
it under the terms of the GNU General Public License as published by
|
28 |
-
the Free Software Foundation; either version 2 of the License, or
|
29 |
-
(at your option) any later version.
|
30 |
-
|
31 |
-
This program is distributed in the hope that it will be useful,
|
32 |
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
33 |
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
34 |
-
GNU General Public License for more details.
|
35 |
-
|
36 |
-
You can get a copy of the GNU General Public License by writing to the
|
37 |
-
Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
|
38 |
-
*/
|
39 |
-
|
40 |
-
/**
|
41 |
-
* Class MLA Substitution Parameter Hooks Example hooks all of the filters provided by the "Media Manager Enhancements" feature
|
42 |
-
*
|
43 |
-
* Call it anything you want, but give it an unlikely and hopefully unique name. Hiding everything
|
44 |
-
* else inside a class means this is the only name you have to worry about.
|
45 |
-
*
|
46 |
-
* @package MLA Substitution Parameter Hooks Example
|
47 |
-
* @since 1.00
|
48 |
-
*/
|
49 |
-
class MLASubstitutionParameterExample {
|
50 |
-
/**
|
51 |
-
* Initialization function, similar to __construct()
|
52 |
-
*
|
53 |
-
* Installs filters and actions that handle the MLA hooks for the "Media Manager Enhancements"
|
54 |
-
*
|
55 |
-
* @since 1.00
|
56 |
-
*
|
57 |
-
* @return void
|
58 |
-
*/
|
59 |
-
public static function initialize() {
|
60 |
-
/*
|
61 |
-
* add_filter parameters:
|
62 |
-
* $tag - name of the hook you're filtering; defined by [mla_gallery]
|
63 |
-
* $function_to_add - function to be called when [mla_gallery] applies the filter
|
64 |
-
* $priority - default 10; lower runs earlier, higher runs later
|
65 |
-
* $accepted_args - number of arguments your function accepts
|
66 |
-
*
|
67 |
-
* Comment out the filters you don't need; save them for future use
|
68 |
-
*/
|
69 |
-
|
70 |
-
|
71 |
-
/*
|
72 |
-
* Defined in /media-library-assistant/includes/class-mla-data.php
|
73 |
-
*/
|
74 |
-
add_filter( 'mla_expand_custom_data_source', 'MLASubstitutionParameterExample::mla_expand_custom_data_source', 10, 9 );
|
75 |
-
add_filter( 'mla_expand_custom_prefix', 'MLASubstitutionParameterExample::mla_expand_custom_prefix', 10, 8 );
|
76 |
-
add_filter( 'mla_apply_custom_format', 'MLASubstitutionParameterExample::mla_apply_custom_format', 10, 2 );
|
77 |
-
|
78 |
-
/*
|
79 |
-
* Defined in /media-library-assistant/includes/class-mla-data-source.php
|
80 |
-
*/
|
81 |
-
add_filter( 'mla_evaluate_custom_data_source', 'MLASubstitutionParameterExample::mla_evaluate_custom_data_source', 10, 5 );
|
82 |
-
} // initialize
|
83 |
-
|
84 |
-
/**
|
85 |
-
* MLA Expand Custom Data Source Filter
|
86 |
-
*
|
87 |
-
* For shortcode and Content Template processing, gives you an opportunity to generate a custom data value.
|
88 |
-
*
|
89 |
-
* @since 1.00
|
90 |
-
*
|
91 |
-
* @param string NULL, indicating that by default, no custom value is available
|
92 |
-
* @param string the entire data-source text including option/format and any arguments
|
93 |
-
* @param string the data-source name
|
94 |
-
* @param array data-source components; prefix (empty), value, option, format and args (if present)
|
95 |
-
* @param array values from the query, if any, e.g. shortcode parameters
|
96 |
-
* @param array item-level markup template values, if any
|
97 |
-
* @param integer attachment ID for attachment-specific values
|
98 |
-
* @param boolean for option 'multi', retain existing values
|
99 |
-
* @param string default option value
|
100 |
-
*/
|
101 |
-
public static function mla_expand_custom_data_source( $custom_value, $key, $candidate, $value, $query, $markup_values, $post_id, $keep_existing, $default_option ) {
|
102 |
-
/*
|
103 |
-
* Uncomment the error_log statements in any of the filters to see what's passed in
|
104 |
-
*/
|
105 |
-
//error_log( __LINE__ . " MLASubstitutionParameterExample::mla_expand_custom_data_source( {$key}, {$candidate}, {$post_id}, {$keep_existing}, {$default_option} ) value = " . var_export( $value, true ), 0 );
|
106 |
-
//error_log( __LINE__ . " MLASubstitutionParameterExample::mla_expand_custom_data_source( {$candidate}, {$post_id} ) query = " . var_export( $query, true ), 0 );
|
107 |
-
//error_log( __LINE__ . " MLASubstitutionParameterExample::mla_expand_custom_data_source( {$candidate}, {$post_id} ) markup_values = " . var_export( $markup_values, true ), 0 );
|
108 |
-
|
109 |
-
return $custom_value;
|
110 |
-
} // mla_expand_custom_data_source
|
111 |
-
|
112 |
-
/**
|
113 |
-
* MLA Expand Custom Prefix Filter
|
114 |
-
*
|
115 |
-
* Gives you an opportunity to generate your custom data value when a parameter's prefix value is not recognized.
|
116 |
-
*
|
117 |
-
* @since 1.00
|
118 |
-
*
|
119 |
-
* @param string NULL, indicating that by default, no custom value is available
|
120 |
-
* @param string the data-source name
|
121 |
-
* @param array data-source components; prefix (empty), value, option, format and args (if present)
|
122 |
-
* @param array values from the query, if any, e.g. shortcode parameters
|
123 |
-
* @param array item-level markup template values, if any
|
124 |
-
* @param integer attachment ID for attachment-specific values
|
125 |
-
* @param boolean for option 'multi', retain existing values
|
126 |
-
* @param string default option value
|
127 |
-
*/
|
128 |
-
public static function mla_expand_custom_prefix( $custom_value, $key, $value, $query, $markup_values, $post_id, $keep_existing, $default_option ) {
|
129 |
-
/*
|
130 |
-
* Uncomment the error_log statements in any of the filters to see what's passed in
|
131 |
-
*/
|
132 |
-
//error_log( __LINE__ . " MLASubstitutionParameterExample::mla_expand_custom_prefix( {$key}, {$post_id}, {$keep_existing}, {$default_option} ) value = " . var_export( $value, true ), 0 );
|
133 |
-
//error_log( __LINE__ . " MLASubstitutionParameterExample::mla_expand_custom_prefix( {$key}, {$post_id} ) query = " . var_export( $query, true ), 0 );
|
134 |
-
//error_log( __LINE__ . " MLASubstitutionParameterExample::mla_expand_custom_prefix( {$key}, {$post_id} ) markup_values = " . var_export( $markup_values, true ), 0 );
|
135 |
-
|
136 |
-
return $custom_value;
|
137 |
-
} // mla_expand_custom_prefix
|
138 |
-
|
139 |
-
/**
|
140 |
-
* MLA Apply Custom Format Filter
|
141 |
-
*
|
142 |
-
* Gives you an opportunity to apply your custom option/format to the data value.
|
143 |
-
*
|
144 |
-
* @since 1.00
|
145 |
-
*
|
146 |
-
* @param string the data-source value
|
147 |
-
* @param array data-source components; prefix (empty), value, option, format and args (if present)
|
148 |
-
*/
|
149 |
-
public static function mla_apply_custom_format( $value, $args ) {
|
150 |
-
//error_log( __LINE__ . " MLASubstitutionParameterExample::mla_apply_custom_format( {$value} ) args = " . var_export( $args, true ), 0 );
|
151 |
-
|
152 |
-
return $value;
|
153 |
-
} // mla_apply_custom_format
|
154 |
-
|
155 |
-
/**
|
156 |
-
* MLA Evaluate Custom Data Source Filter
|
157 |
-
*
|
158 |
-
* For metadata mapping rules, gives you an opportunity to generate a custom data value.
|
159 |
-
*
|
160 |
-
* @since 1.00
|
161 |
-
*
|
162 |
-
* @param string NULL, indicating that by default, no custom value is available
|
163 |
-
* @param integer attachment ID for attachment-specific values
|
164 |
-
* @param string category/scope to evaluate against: custom_field_mapping or single_attachment_mapping
|
165 |
-
* @param array data source specification ( name, *data_source, *keep_existing, *format, mla_column, quick_edit, bulk_edit, *meta_name, *option, no_null )
|
166 |
-
* @param array _wp_attachment_metadata, default NULL (use current postmeta database value)
|
167 |
-
*/
|
168 |
-
public static function mla_evaluate_custom_data_source( $custom_value, $post_id, $category, $data_value, $attachment_metadata ) {
|
169 |
-
//error_log( __LINE__ . " MLASubstitutionParameterExample::mla_expand_custom_data_source( {$post_id}, {$category} ) data_value = " . var_export( $data_value, true ), 0 );
|
170 |
-
//error_log( __LINE__ . " MLASubstitutionParameterExample::mla_expand_custom_data_source( {$post_id}, {$category} ) attachment_metadata = " . var_export( $attachment_metadata, true ), 0 );
|
171 |
-
|
172 |
-
return $custom_value;
|
173 |
-
} // mla_evaluate_custom_data_source
|
174 |
-
} //MLASubstitutionParameterExample
|
175 |
-
|
176 |
-
/*
|
177 |
-
* Install the filters at an early opportunity
|
178 |
-
*/
|
179 |
-
add_action('init', 'MLASubstitutionParameterExample::initialize');
|
180 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
examples/{mla-tax-query-example.php.txt → mla-tax-query-example.php}
RENAMED
File without changes
|
examples/{mla-term-list-hooks-example.php.txt → mla-term-list-hooks-example.php}
RENAMED
File without changes
|
examples/mla-ui-elements-example.php
ADDED
@@ -0,0 +1,589 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
Plugin Name: MLA UI Elements Example
|
4 |
+
Plugin URI: http://fairtradejudaica.org/media-library-assistant-a-wordpress-plugin/
|
5 |
+
Description: Provides shortcodes to improve user experience for [mla_term_list], [mla_tag_cloud] and [mla_gallery] shortcodes
|
6 |
+
Author: David Lingren
|
7 |
+
Version: 1.02
|
8 |
+
Author URI: http://fairtradejudaica.org/our-story/staff/
|
9 |
+
|
10 |
+
Copyright 2016 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 |
+
* User notes
|
28 |
+
*
|
29 |
+
* 1. If you add "use_filters=true" to an [mla_term_list] shortcode this plugin will retain the selected
|
30 |
+
* terms when the page is refreshed and pass them back into the shortcode.
|
31 |
+
*
|
32 |
+
* 2. If you add "add_filters_to=any" to an [mla_gallery] shortcode this plugin will retain settings for
|
33 |
+
* terms search, keyword search, taxonomy queries and posts_per_page when the page is refreshed or
|
34 |
+
* pagination moves to a new page.
|
35 |
+
*
|
36 |
+
* 3. If you add "add_filters_to=<taxonomy_slug>" to an [mla_gallery] shortcode this plugin will do the
|
37 |
+
* actions in 2. and will also match the taxonomy_slug to a simple taxonomy query (if present) and
|
38 |
+
* add that query to the taxonomy queries. If the simple query is 'muie-no-terms', it will be ignored.
|
39 |
+
*
|
40 |
+
* 4. Three shortcodes are provided to generate text box controls and retain their settings when the page
|
41 |
+
* is refreshed or pagination moves to a new page:
|
42 |
+
*
|
43 |
+
* [muie_per_page] generates an items per page text box
|
44 |
+
* [muie_terms_search] generates a terms search text box
|
45 |
+
* [muie_keyword_search] generates a keyword search text box
|
46 |
+
*
|
47 |
+
* 5. With a bit of work you can add a tag cloud that works with these filters. Here's an example you can
|
48 |
+
* adapt for your application:
|
49 |
+
*
|
50 |
+
* <style type='text/css'>
|
51 |
+
* #mla-tag-cloud .mla_current_item {
|
52 |
+
* color:#FF0000;
|
53 |
+
* font-weight:bold}
|
54 |
+
* </style>
|
55 |
+
* <span id=mla-tag-cloud>
|
56 |
+
* <strong>Tag Cloud</strong>
|
57 |
+
* [mla_tag_cloud taxonomy=attachment_tag number=20 current_item="{+request:current_item+}" mla_link_href="{+page_url+}?current_item={+term_id+}&tax_input{{+query:taxonomy+}}{}={+slug+}&muie_per_page={+template:({+request:muie_per_page+}|5)+}" mla_link_class="{+current_item_class+}"]
|
58 |
+
* </span>
|
59 |
+
*/
|
60 |
+
|
61 |
+
/**
|
62 |
+
* Class MLA UI Elements Example provides shortcodes to improve user experience for
|
63 |
+
* [mla_term_list], [mla_tag_cloud] and [mla_gallery] shortcodes
|
64 |
+
*
|
65 |
+
* Created for support topic "How do I provide a front-end search of my media items using Custom Fields?"
|
66 |
+
* opened on 4/15/2016 by "direys".
|
67 |
+
* https://wordpress.org/support/topic/how-do-i-provide-a-front-end-search-of-my-media-items-using-custom-fields
|
68 |
+
*
|
69 |
+
* Enhanced for support topic "Dynamic search and filters"
|
70 |
+
* opened on 5/28/2016 by "ghislainsc".
|
71 |
+
* https://wordpress.org/support/topic/dynamic-search-and-filters
|
72 |
+
*
|
73 |
+
* Enhanced for support topic "Limiting search results to attachment tags/'Justifying' gallery grids""
|
74 |
+
* opened on 7/2/2016 by "ceophoetography".
|
75 |
+
* https://wordpress.org/support/topic/limiting-search-results-to-attachment-tagsjustifying-gallery-grids
|
76 |
+
*
|
77 |
+
* @package MLA UI Elements Example
|
78 |
+
* @since 1.00
|
79 |
+
*/
|
80 |
+
class MLAUIElementsExample {
|
81 |
+
/**
|
82 |
+
* Initialization function, similar to __construct()
|
83 |
+
*
|
84 |
+
* @since 1.00
|
85 |
+
*/
|
86 |
+
public static function initialize() {
|
87 |
+
// The filters are only useful for front-end posts/pages; exit if in the admin section
|
88 |
+
if ( is_admin() )
|
89 |
+
return;
|
90 |
+
|
91 |
+
add_filter( 'mla_term_list_attributes', 'MLAUIElementsExample::mla_term_list_attributes', 10, 1 );
|
92 |
+
add_filter( 'mla_gallery_attributes', 'MLAUIElementsExample::mla_gallery_attributes', 10, 1 );
|
93 |
+
|
94 |
+
// Add the custom shortcode for generating the items per page
|
95 |
+
add_shortcode( 'muie_per_page', 'MLAUIElementsExample::muie_per_page' );
|
96 |
+
|
97 |
+
// Add the custom shortcode for generating "sticky" term search text box
|
98 |
+
add_shortcode( 'muie_terms_search', 'MLAUIElementsExample::muie_terms_search' );
|
99 |
+
|
100 |
+
// Add the custom shortcode for generating "sticky" keyword search text box
|
101 |
+
add_shortcode( 'muie_keyword_search', 'MLAUIElementsExample::muie_keyword_search' );
|
102 |
+
|
103 |
+
// Add the custom shortcode for generating assigned terms counts
|
104 |
+
add_shortcode( 'muie_assigned_items_count', 'MLAUIElementsExample::muie_assigned_items_count' );
|
105 |
+
}
|
106 |
+
|
107 |
+
/**
|
108 |
+
* Look for 'muie_filters' that pass the selected parameters from page to page of a paginated gallery
|
109 |
+
*
|
110 |
+
* The $shortcode_attributes array is where you will find any of your own parameters that are coded in the
|
111 |
+
* shortcode, e.g., [mla_term_list use_filters=true].
|
112 |
+
*
|
113 |
+
* @since 1.00
|
114 |
+
*
|
115 |
+
* @param array the shortcode parameters passed in to the shortcode
|
116 |
+
*/
|
117 |
+
public static function mla_term_list_attributes( $shortcode_attributes ) {
|
118 |
+
|
119 |
+
// See if this is a "filtered" term list
|
120 |
+
if ( !empty( $shortcode_attributes['use_filters'] ) && ( 'true' == strtolower( $shortcode_attributes['use_filters'] ) ) ) {
|
121 |
+
// Pagination links, e.g. Previous or Next, have muie_filters that encode the form parameters
|
122 |
+
if ( !empty( $_REQUEST['muie_filters'] ) ) {
|
123 |
+
$filters = json_decode( trim( stripslashes( $_REQUEST['muie_filters'] ), '"' ), true );
|
124 |
+
|
125 |
+
if ( !empty( $filters['tax_input'] ) ) {
|
126 |
+
$_REQUEST['tax_input'] = $filters['tax_input'];
|
127 |
+
}
|
128 |
+
}
|
129 |
+
|
130 |
+
// If nothing is set for this taxonomy we're done
|
131 |
+
if ( empty( $_REQUEST['tax_input'] ) || !array_key_exists( $shortcode_attributes['taxonomy'], $_REQUEST['tax_input'] ) ) {
|
132 |
+
return $shortcode_attributes;
|
133 |
+
}
|
134 |
+
|
135 |
+
$terms = $_REQUEST['tax_input'][ $shortcode_attributes['taxonomy'] ];
|
136 |
+
|
137 |
+
// Check for a dropdown control with "All Terms" selected
|
138 |
+
$option_all = array_search( '0', $terms );
|
139 |
+
if ( false !== $option_all ) {
|
140 |
+
unset( $terms[ $option_all ] );
|
141 |
+
}
|
142 |
+
|
143 |
+
// Pass selected terms to the shortcode
|
144 |
+
if ( !empty( $terms ) ) {
|
145 |
+
$shortcode_attributes[ $shortcode_attributes['mla_item_parameter'] ] = implode( ',', $_REQUEST['tax_input'][ $shortcode_attributes['taxonomy'] ] );
|
146 |
+
}
|
147 |
+
|
148 |
+
unset( $shortcode_attributes['use_filters'] );
|
149 |
+
}
|
150 |
+
|
151 |
+
return $shortcode_attributes;
|
152 |
+
} // mla_term_list_attributes
|
153 |
+
|
154 |
+
/**
|
155 |
+
* Add the taxonomy query to the shortcode, limit posts_per_page and encode filters for pagination links
|
156 |
+
*
|
157 |
+
* The $shortcode_attributes array is where you will find any of your own parameters that are coded in the
|
158 |
+
* shortcode, e.g., [mla_gallery random_category="abc"].
|
159 |
+
*
|
160 |
+
* @since 1.00
|
161 |
+
*
|
162 |
+
* @param array the shortcode parameters passed in to the shortcode
|
163 |
+
*/
|
164 |
+
public static function mla_gallery_attributes( $shortcode_attributes ) {
|
165 |
+
/*
|
166 |
+
* Only process shortcodes that allow filters
|
167 |
+
*/
|
168 |
+
if ( empty( $shortcode_attributes['add_filters_to'] ) ) {
|
169 |
+
return $shortcode_attributes;
|
170 |
+
}
|
171 |
+
|
172 |
+
// Unpack filter values encoded for pagination links
|
173 |
+
if ( !empty( $_REQUEST['muie_filters'] ) ) {
|
174 |
+
$filters = json_decode( trim( stripslashes( $_REQUEST['muie_filters'] ), '"' ), true );
|
175 |
+
|
176 |
+
if ( isset( $filters['muie_terms_search'] ) ) {
|
177 |
+
$_REQUEST['muie_terms_search'] = $filters['muie_terms_search'];
|
178 |
+
}
|
179 |
+
|
180 |
+
if ( isset( $filters['muie_keyword_search'] ) ) {
|
181 |
+
$_REQUEST['muie_keyword_search'] = $filters['muie_keyword_search'];
|
182 |
+
}
|
183 |
+
|
184 |
+
if ( isset( $filters['tax_input'] ) ) {
|
185 |
+
$_REQUEST['tax_input'] = $filters['tax_input'];
|
186 |
+
}
|
187 |
+
}
|
188 |
+
|
189 |
+
// Adjust posts_per_page/numberposts
|
190 |
+
if ( !empty( $_REQUEST['muie_per_page'] ) ) {
|
191 |
+
if ( isset( $shortcode_attributes['numberposts'] ) && ! isset( $shortcode_attributes['posts_per_page'] )) {
|
192 |
+
$shortcode_attributes['posts_per_page'] = $shortcode_attributes['numberposts'];
|
193 |
+
unset( $shortcode_attributes['numberposts'] );
|
194 |
+
}
|
195 |
+
|
196 |
+
$shortcode_attributes['posts_per_page'] = $_REQUEST['muie_per_page'];
|
197 |
+
}
|
198 |
+
|
199 |
+
// Add the terms search parameters, if present
|
200 |
+
if ( !empty( $_REQUEST['muie_terms_search'] ) && is_array( $_REQUEST['muie_terms_search'] ) && !empty( $_REQUEST['muie_terms_search']['mla_terms_phrases'] ) ) {
|
201 |
+
$muie_terms_search = $_REQUEST['muie_terms_search'];
|
202 |
+
foreach( $muie_terms_search as $key => $value ) {
|
203 |
+
if ( !empty( $value ) ) {
|
204 |
+
$shortcode_attributes[ $key ] = $value;
|
205 |
+
}
|
206 |
+
}
|
207 |
+
} else {
|
208 |
+
$muie_terms_search = array();
|
209 |
+
}
|
210 |
+
|
211 |
+
// Add the keyword search parameters, if present
|
212 |
+
if ( !empty( $_REQUEST['muie_keyword_search'] ) && is_array( $_REQUEST['muie_keyword_search'] ) && !empty( $_REQUEST['muie_keyword_search']['s'] ) ) {
|
213 |
+
$muie_keyword_search = $_REQUEST['muie_keyword_search'];
|
214 |
+
foreach( $muie_keyword_search as $key => $value ) {
|
215 |
+
if ( !empty( $value ) ) {
|
216 |
+
$shortcode_attributes[ $key ] = $value;
|
217 |
+
}
|
218 |
+
}
|
219 |
+
} else {
|
220 |
+
$muie_keyword_search = array();
|
221 |
+
}
|
222 |
+
|
223 |
+
// Add the taxonomy filter(s), if present
|
224 |
+
$filter_taxonomy = $shortcode_attributes['add_filters_to'];
|
225 |
+
$tax_input = !empty( $_REQUEST['tax_input'] ) ? $_REQUEST['tax_input'] : array();
|
226 |
+
|
227 |
+
if ( ! ( empty( $shortcode_attributes[ $filter_taxonomy ] ) && empty( $tax_input ) ) ) {
|
228 |
+
$tax_query = '';
|
229 |
+
|
230 |
+
// Look for the optional "simple taxonomy query" as an initial filter
|
231 |
+
if ( !empty( $shortcode_attributes[ $filter_taxonomy ] ) ) {
|
232 |
+
if ( 'muie-no-terms' !== $shortcode_attributes[ $filter_taxonomy ] ) {
|
233 |
+
$values = "array( '" . implode( "', '", explode( ',', $shortcode_attributes[ $filter_taxonomy ] ) ) . "' )";
|
234 |
+
$tax_query .= "array('taxonomy' => '{$filter_taxonomy}' ,'field' => 'slug','terms' => {$values}, 'operator' => 'IN'), ";
|
235 |
+
}
|
236 |
+
|
237 |
+
unset( $shortcode_attributes[ $filter_taxonomy ] );
|
238 |
+
}
|
239 |
+
|
240 |
+
foreach ( $tax_input as $taxonomy => $terms ) {
|
241 |
+
// simple taxonomy query overrides tax_input
|
242 |
+
if ( $taxonomy == $filter_taxonomy ) {
|
243 |
+
continue;
|
244 |
+
}
|
245 |
+
|
246 |
+
// Check for a dropdown control with "All Terms" selected
|
247 |
+
$option_all = array_search( '0', $terms );
|
248 |
+
if ( false !== $option_all ) {
|
249 |
+
unset( $terms[ $option_all ] );
|
250 |
+
}
|
251 |
+
|
252 |
+
if ( !empty( $terms ) ) {
|
253 |
+
$field = 'term_id';
|
254 |
+
foreach ( $terms as $term ) {
|
255 |
+
if ( ! is_integer( $term ) ) {
|
256 |
+
$field = 'slug';
|
257 |
+
break;
|
258 |
+
}
|
259 |
+
}
|
260 |
+
|
261 |
+
if ( 'term_id' == $field ) {
|
262 |
+
$values = 'array( ' . implode( ',', $terms ) . ' )';
|
263 |
+
} else {
|
264 |
+
$values = "array( '" . implode( "','", $terms ) . "' )";
|
265 |
+
}
|
266 |
+
|
267 |
+
$tax_query .= "array('taxonomy' => '{$taxonomy}' ,'field' => '{$field}','terms' => {$values}, 'operator' => 'IN'), ";
|
268 |
+
}
|
269 |
+
}
|
270 |
+
|
271 |
+
if ( ! empty( $tax_query ) ) {
|
272 |
+
$shortcode_attributes['tax_query'] = "array( 'relation' => 'AND', " . $tax_query . ')';
|
273 |
+
}
|
274 |
+
}
|
275 |
+
|
276 |
+
/*
|
277 |
+
* Add the filter settings to pagination URLs
|
278 |
+
*/
|
279 |
+
if ( !empty( $shortcode_attributes['mla_output'] ) ) {
|
280 |
+
|
281 |
+
$filters = urlencode( json_encode( array( 'tax_input' => $tax_input, 'muie_terms_search' => $muie_terms_search, 'muie_keyword_search' => $muie_keyword_search ) ) );
|
282 |
+
$shortcode_attributes['mla_link_href'] = '[+new_url+]?[+new_page_text+]&muie_filters=' . $filters;
|
283 |
+
|
284 |
+
if ( !empty( $shortcode_attributes['posts_per_page'] ) ) {
|
285 |
+
$shortcode_attributes['mla_link_href'] .= '&muie_per_page=' . $shortcode_attributes['posts_per_page'];
|
286 |
+
}
|
287 |
+
}
|
288 |
+
|
289 |
+
unset( $shortcode_attributes['add_filters_to'] );
|
290 |
+
return $shortcode_attributes;
|
291 |
+
} // mla_gallery_attributes
|
292 |
+
|
293 |
+
/**
|
294 |
+
* Items per page shortcode
|
295 |
+
*
|
296 |
+
* This shortcode generates an HTML text box with a default muie_per_page value.
|
297 |
+
*
|
298 |
+
* @since 1.00
|
299 |
+
*
|
300 |
+
* @param array the shortcode parameters
|
301 |
+
*
|
302 |
+
* @return string HTML markup for the generated form
|
303 |
+
*/
|
304 |
+
public static function muie_per_page( $attr ) {
|
305 |
+
if ( isset( $attr['numberposts'] ) && ! isset( $attr['posts_per_page'] )) {
|
306 |
+
$attr['posts_per_page'] = $attr['numberposts'];
|
307 |
+
unset( $attr['numberposts'] );
|
308 |
+
}
|
309 |
+
|
310 |
+
if ( !empty( $_REQUEST['muie_per_page'] ) ) {
|
311 |
+
$posts_per_page = $_REQUEST['muie_per_page'];
|
312 |
+
} else {
|
313 |
+
$posts_per_page = isset( $attr['posts_per_page'] ) ? $attr['posts_per_page'] : 6;
|
314 |
+
}
|
315 |
+
|
316 |
+
return '<input name="muie_per_page" id="muie-per-page" type="text" size="2" value="' . $posts_per_page . '" />';
|
317 |
+
} // muie_per_page
|
318 |
+
|
319 |
+
/**
|
320 |
+
* Terms search generator shortcode
|
321 |
+
*
|
322 |
+
* This shortcode generates an HTML text box with a default mla_terms_phrases value,
|
323 |
+
* and adds hidden parameters for the other Terms Search parameters
|
324 |
+
*
|
325 |
+
* @since 1.00
|
326 |
+
*
|
327 |
+
* @param array the shortcode parameters
|
328 |
+
*
|
329 |
+
* @return string HTML markup for the generated form
|
330 |
+
*/
|
331 |
+
public static function muie_terms_search( $attr ) {
|
332 |
+
$default_arguments = array(
|
333 |
+
'mla_terms_phrases' => '',
|
334 |
+
'mla_terms_taxonomies' => '',
|
335 |
+
'mla_phrase_delimiter' => '',
|
336 |
+
'mla_term_delimiter' => '',
|
337 |
+
'mla_phrase_connector' => '',
|
338 |
+
'mla_term_delimiter' => '',
|
339 |
+
'mla_term_connector' => '',
|
340 |
+
);
|
341 |
+
|
342 |
+
// Make sure $attr is an array, even if it's empty
|
343 |
+
if ( empty( $attr ) ) {
|
344 |
+
$attr = array();
|
345 |
+
} elseif ( is_string( $attr ) ) {
|
346 |
+
$attr = shortcode_parse_atts( $attr );
|
347 |
+
}
|
348 |
+
|
349 |
+
// Accept only the attributes we need and supply defaults
|
350 |
+
$arguments = shortcode_atts( $default_arguments, $attr );
|
351 |
+
|
352 |
+
// Pagination links, e.g. Previous or Next, have muie_filters that encode the form parameters
|
353 |
+
if ( !empty( $_REQUEST['muie_filters'] ) ) {
|
354 |
+
$filters = json_decode( trim( stripslashes( $_REQUEST['muie_filters'] ), '"' ), true );
|
355 |
+
|
356 |
+
if ( !empty( $filters['muie_terms_search'] ) ) {
|
357 |
+
$_REQUEST['muie_terms_search'] = $filters['muie_terms_search'];
|
358 |
+
}
|
359 |
+
}
|
360 |
+
|
361 |
+
// muie_terms_search has settings from the form or pagination link
|
362 |
+
if ( !empty( $_REQUEST['muie_terms_search'] ) && is_array( $_REQUEST['muie_terms_search'] ) ) {
|
363 |
+
foreach ( $arguments as $key => $value ) {
|
364 |
+
if ( !empty( $_REQUEST['muie_terms_search'][ $key ] ) ) {
|
365 |
+
$arguments[ $key ] = stripslashes( $_REQUEST['muie_terms_search'][ $key ] );
|
366 |
+
}
|
367 |
+
}
|
368 |
+
}
|
369 |
+
|
370 |
+
// Always supply the terms phrases text box, with the appropriate quoting
|
371 |
+
if ( false !== strpos( $arguments['mla_terms_phrases'], '"' ) ) {
|
372 |
+
$delimiter = '\'';
|
373 |
+
} else {
|
374 |
+
$delimiter = '"';
|
375 |
+
}
|
376 |
+
|
377 |
+
$return_value = '<input name="muie_terms_search[mla_terms_phrases]" id="muie-terms-phrases" type="text" size="20" value=' . $delimiter . $arguments['mla_terms_phrases'] . $delimiter . " />\n";
|
378 |
+
unset( $arguments['mla_terms_phrases'] );
|
379 |
+
|
380 |
+
// Add optional parameters
|
381 |
+
foreach( $arguments as $key => $value ) {
|
382 |
+
if ( !empty( $value ) ) {
|
383 |
+
$id_value = str_replace( '_', '-', substr( $key, 4 ) );
|
384 |
+
$return_value .= sprintf( '<input name="muie_terms_search[%1$s]" id="muie-%2$s" type="hidden" value="%3$s" />%4$s', $key, $id_value, $value, "\n" );
|
385 |
+
}
|
386 |
+
}
|
387 |
+
|
388 |
+
return $return_value;
|
389 |
+
} // muie_terms_search
|
390 |
+
|
391 |
+
/**
|
392 |
+
* Keyword search generator shortcode
|
393 |
+
*
|
394 |
+
* This shortcode generates an HTML text box with a default "s" (search string) value,
|
395 |
+
* and adds hidden parameters for the other Keyword Search parameters
|
396 |
+
*
|
397 |
+
* @since 1.00
|
398 |
+
*
|
399 |
+
* @param array the shortcode parameters
|
400 |
+
*
|
401 |
+
* @return string HTML markup for the generated form
|
402 |
+
*/
|
403 |
+
public static function muie_keyword_search( $attr ) {
|
404 |
+
$default_arguments = array(
|
405 |
+
's' => '',
|
406 |
+
'mla_search_fields' => '',
|
407 |
+
'mla_search_connector' => '',
|
408 |
+
'sentence' => '',
|
409 |
+
'exact' => '',
|
410 |
+
);
|
411 |
+
|
412 |
+
// Make sure $attr is an array, even if it's empty
|
413 |
+
if ( empty( $attr ) ) {
|
414 |
+
$attr = array();
|
415 |
+
} elseif ( is_string( $attr ) ) {
|
416 |
+
$attr = shortcode_parse_atts( $attr );
|
417 |
+
}
|
418 |
+
|
419 |
+
// Accept only the attributes we need and supply defaults
|
420 |
+
$arguments = shortcode_atts( $default_arguments, $attr );
|
421 |
+
|
422 |
+
// Pagination links, e.g. Previous or Next, have muie_filters that encode the form parameters
|
423 |
+
if ( !empty( $_REQUEST['muie_filters'] ) ) {
|
424 |
+
$filters = json_decode( trim( stripslashes( $_REQUEST['muie_filters'] ), '"' ), true );
|
425 |
+
|
426 |
+
if ( !empty( $filters['muie_keyword_search'] ) ) {
|
427 |
+
$_REQUEST['muie_keyword_search'] = $filters['muie_keyword_search'];
|
428 |
+
}
|
429 |
+
}
|
430 |
+
|
431 |
+
// muie_keyword_search has settings from the form or pagination link
|
432 |
+
if ( !empty( $_REQUEST['muie_keyword_search'] ) && is_array( $_REQUEST['muie_keyword_search'] ) ) {
|
433 |
+
foreach ( $arguments as $key => $value ) {
|
434 |
+
if ( !empty( $_REQUEST['muie_keyword_search'][ $key ] ) ) {
|
435 |
+
$arguments[ $key ] = stripslashes( $_REQUEST['muie_keyword_search'][ $key ] );
|
436 |
+
}
|
437 |
+
}
|
438 |
+
}
|
439 |
+
|
440 |
+
// Always supply the search text box, with the appropriate quoting
|
441 |
+
if ( false !== strpos( $arguments['s'], '"' ) ) {
|
442 |
+
$delimiter = '\'';
|
443 |
+
} else {
|
444 |
+
$delimiter = '"';
|
445 |
+
}
|
446 |
+
|
447 |
+
$return_value = '<input name="muie_keyword_search[s]" id="muie-s" type="text" size="20" value=' . $delimiter . $arguments['s'] . $delimiter . " />\n";
|
448 |
+
unset( $arguments['s'] );
|
449 |
+
|
450 |
+
// Add optional parameters
|
451 |
+
foreach( $arguments as $key => $value ) {
|
452 |
+
if ( !empty( $value ) ) {
|
453 |
+
$id_value = str_replace( '_', '-', substr( $key, 4 ) );
|
454 |
+
$return_value .= sprintf( '<input name="muie_keyword_search[%1$s]" id="muie-%2$s" type="hidden" value="%3$s" />%4$s', $key, $id_value, $value, "\n" );
|
455 |
+
}
|
456 |
+
}
|
457 |
+
|
458 |
+
return $return_value;
|
459 |
+
} // muie_keyword_search
|
460 |
+
|
461 |
+
/**
|
462 |
+
* Assigned items count shortcode
|
463 |
+
*
|
464 |
+
* This shortcode returns the number of items assigned to any term(s) in the selected taxonomy
|
465 |
+
*
|
466 |
+
* @since 1.01
|
467 |
+
*
|
468 |
+
* @param array the shortcode parameters
|
469 |
+
*
|
470 |
+
* @return string HTML markup for the generated form
|
471 |
+
*/
|
472 |
+
public static function muie_assigned_items_count( $attr ) {
|
473 |
+
global $wpdb;
|
474 |
+
|
475 |
+
$default_arguments = array(
|
476 |
+
'taxonomy' => '',
|
477 |
+
'post_type' => 'attachment',
|
478 |
+
'post_status' => 'inherit',
|
479 |
+
'post_mime_type' => 'image',
|
480 |
+
);
|
481 |
+
|
482 |
+
// Make sure $attr is an array, even if it's empty
|
483 |
+
if ( empty( $attr ) ) {
|
484 |
+
$attr = array();
|
485 |
+
} elseif ( is_string( $attr ) ) {
|
486 |
+
$attr = shortcode_parse_atts( $attr );
|
487 |
+
}
|
488 |
+
|
489 |
+
// Accept only the attributes we need and supply defaults
|
490 |
+
$arguments = shortcode_atts( $default_arguments, $attr );
|
491 |
+
|
492 |
+
/*
|
493 |
+
* Build an array of individual clauses that can be filtered
|
494 |
+
*/
|
495 |
+
$clauses = array( 'fields' => '', 'join' => '', 'where' => '', 'order' => '', 'orderby' => '', 'limits' => '', );
|
496 |
+
|
497 |
+
$clause_parameters = array();
|
498 |
+
|
499 |
+
$clause[] = 'LEFT JOIN `' . $wpdb->term_relationships . '` AS tr ON tt.term_taxonomy_id = tr.term_taxonomy_id';
|
500 |
+
$clause[] = 'LEFT JOIN `' . $wpdb->posts . '` AS p ON tr.object_id = p.ID';
|
501 |
+
|
502 |
+
/*
|
503 |
+
* Add type and status constraints
|
504 |
+
*/
|
505 |
+
if ( is_array( $arguments['post_type'] ) ) {
|
506 |
+
$post_types = $arguments['post_type'];
|
507 |
+
} else {
|
508 |
+
$post_types = array( $arguments['post_type'] );
|
509 |
+
}
|
510 |
+
|
511 |
+
$placeholders = array();
|
512 |
+
foreach ( $post_types as $post_type ) {
|
513 |
+
$placeholders[] = '%s';
|
514 |
+
$clause_parameters[] = $post_type;
|
515 |
+
}
|
516 |
+
|
517 |
+
$clause[] = 'AND p.post_type IN (' . join( ',', $placeholders ) . ')';
|
518 |
+
|
519 |
+
if ( is_array( $arguments['post_status'] ) ) {
|
520 |
+
$post_stati = $arguments['post_status'];
|
521 |
+
} else {
|
522 |
+
$post_stati = array( $arguments['post_status'] );
|
523 |
+
}
|
524 |
+
|
525 |
+
$placeholders = array();
|
526 |
+
foreach ( $post_stati as $post_status ) {
|
527 |
+
if ( ( 'private' != $post_status ) || is_user_logged_in() ) {
|
528 |
+
$placeholders[] = '%s';
|
529 |
+
$clause_parameters[] = $post_status;
|
530 |
+
}
|
531 |
+
}
|
532 |
+
$clause[] = 'AND p.post_status IN (' . join( ',', $placeholders ) . ')';
|
533 |
+
|
534 |
+
$clause = join(' ', $clause);
|
535 |
+
$clauses['join'] = $wpdb->prepare( $clause, $clause_parameters );
|
536 |
+
|
537 |
+
/*
|
538 |
+
* Start WHERE clause with a taxonomy constraint
|
539 |
+
*/
|
540 |
+
if ( is_array( $arguments['taxonomy'] ) ) {
|
541 |
+
$taxonomies = $arguments['taxonomy'];
|
542 |
+
} else {
|
543 |
+
$taxonomies = array( $arguments['taxonomy'] );
|
544 |
+
}
|
545 |
+
|
546 |
+
foreach ( $taxonomies as $taxonomy ) {
|
547 |
+
if ( ! taxonomy_exists( $taxonomy ) ) {
|
548 |
+
$error = new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy', 'media-library-assistant' ), $taxonomy );
|
549 |
+
return $error;
|
550 |
+
}
|
551 |
+
}
|
552 |
+
|
553 |
+
$clause_parameters = array();
|
554 |
+
$placeholders = array();
|
555 |
+
foreach ($taxonomies as $taxonomy) {
|
556 |
+
$placeholders[] = '%s';
|
557 |
+
$clause_parameters[] = $taxonomy;
|
558 |
+
}
|
559 |
+
|
560 |
+
$clause = array( 'tt.taxonomy IN (' . join( ',', $placeholders ) . ')' );
|
561 |
+
if ( 'all' !== strtolower( $arguments['post_mime_type'] ) ) {
|
562 |
+
$clause[] = str_replace( '%', '%%', wp_post_mime_type_where( $arguments['post_mime_type'], 'p' ) );
|
563 |
+
}
|
564 |
+
|
565 |
+
$clause = join(' ', $clause);
|
566 |
+
$clauses['where'] = $wpdb->prepare( $clause, $clause_parameters );
|
567 |
+
|
568 |
+
/*
|
569 |
+
* Build the final query
|
570 |
+
*/
|
571 |
+
$query = array( 'SELECT' );
|
572 |
+
$query[] = 'COUNT(*)'; // 'p.ID'; // $clauses['fields'];
|
573 |
+
$query[] = 'FROM ( SELECT DISTINCT p.ID FROM `' . $wpdb->term_taxonomy . '` AS tt';
|
574 |
+
$query[] = $clauses['join'];
|
575 |
+
$query[] = 'WHERE (';
|
576 |
+
$query[] = $clauses['where'];
|
577 |
+
$query[] = ') ) as subquery';
|
578 |
+
|
579 |
+
$query = join(' ', $query);
|
580 |
+
$count = $wpdb->get_var( $query );
|
581 |
+
return number_format( (float) $count );
|
582 |
+
} // muie_assigned_items_count
|
583 |
+
} // Class MLAUIElementsExample
|
584 |
+
|
585 |
+
/*
|
586 |
+
* Install the filters at an early opportunity
|
587 |
+
*/
|
588 |
+
add_action('init', 'MLAUIElementsExample::initialize');
|
589 |
+
?>
|
examples/{mla-unattached-fixit.php.txt → mla-unattached-fixit.php}
RENAMED
File without changes
|
examples/{mla-upload-bulk-edit-example.php.txt → mla-upload-bulk-edit-example.php}
RENAMED
File without changes
|
examples/{mla-viewer-replacement-example.php.txt → mla-viewer-replacement-example.php}
RENAMED
@@ -130,7 +130,7 @@ class MLAViewerReplacement {
|
|
130 |
return $item_values;
|
131 |
}
|
132 |
|
133 |
-
// You can use
|
134 |
$mla_viewer_caption = str_replace( '{+', '[+', str_replace( '+}', '+]', self::$shortcode_attributes['mla_viewer_caption'] ) );
|
135 |
$data_source = array(
|
136 |
'data_source' => 'template',
|
@@ -138,7 +138,7 @@ class MLAViewerReplacement {
|
|
138 |
'option' => 'text'
|
139 |
);
|
140 |
|
141 |
-
$mla_viewer_caption =
|
142 |
$item_values['caption'] = $mla_viewer_caption;
|
143 |
return $item_values;
|
144 |
} // mla_gallery_item_values_filter
|
130 |
return $item_values;
|
131 |
}
|
132 |
|
133 |
+
// You can use MLAShortcodes::mla_get_data_source() to get anything available.
|
134 |
$mla_viewer_caption = str_replace( '{+', '[+', str_replace( '+}', '+]', self::$shortcode_attributes['mla_viewer_caption'] ) );
|
135 |
$data_source = array(
|
136 |
'data_source' => 'template',
|
138 |
'option' => 'text'
|
139 |
);
|
140 |
|
141 |
+
$mla_viewer_caption = MLAShortcodes::mla_get_data_source( $item_values['attachment_ID'], 'single_attachment_mapping', $data_source, NULL );
|
142 |
$item_values['caption'] = $mla_viewer_caption;
|
143 |
return $item_values;
|
144 |
} // mla_gallery_item_values_filter
|
examples/{mla-yoast-seo-example.php.txt → mla-yoast-seo-example.php}
RENAMED
File without changes
|
examples/{mla-zip-archive-example.php.txt → mla-zip-archive-example.php}
RENAMED
File without changes
|
examples/{mqtranslate-example.php.txt → mqtranslate-example.php}
RENAMED
File without changes
|
examples/{random-feature.php.txt → random-feature.php}
RENAMED
File without changes
|
examples/{woofixit.php.txt → woofixit.php}
RENAMED
File without changes
|
includes/class-mla-ajax.php
CHANGED
@@ -32,6 +32,8 @@ class MLA_Ajax {
|
|
32 |
*/
|
33 |
public static function mla_admin_init_action( ) {
|
34 |
//error_log( __LINE__ . ' DEBUG: MLA_Ajax::mla_admin_init_action $_REQUEST = ' . var_export( $_REQUEST, true ), 0 );
|
|
|
|
|
35 |
/*
|
36 |
* If there's no action variable, we have nothing more to do
|
37 |
*/
|
@@ -231,7 +233,7 @@ class MLA_Ajax {
|
|
231 |
require_once( MLA_PLUGIN_PATH . 'includes/class-mla-data.php' );
|
232 |
MLAData::initialize();
|
233 |
}
|
234 |
-
|
235 |
$results = MLAData::mla_update_single_item( $post_id, $_REQUEST );
|
236 |
if ( false !== strpos( $results['message'], __( 'ERROR', 'media-library-assistant' ) ) ) {
|
237 |
wp_die( $results['message'] );
|
@@ -243,7 +245,7 @@ class MLA_Ajax {
|
|
243 |
require_once( MLA_PLUGIN_PATH . 'includes/class-mla-list-table.php' );
|
244 |
MLA_List_Table::mla_admin_init_action();
|
245 |
}
|
246 |
-
|
247 |
// Create an instance of our package class and echo the new HTML
|
248 |
$MLAListTable = apply_filters( 'mla_list_table_new_instance', NULL );
|
249 |
if ( is_null( $MLAListTable ) ) {
|
32 |
*/
|
33 |
public static function mla_admin_init_action( ) {
|
34 |
//error_log( __LINE__ . ' DEBUG: MLA_Ajax::mla_admin_init_action $_REQUEST = ' . var_export( $_REQUEST, true ), 0 );
|
35 |
+
MLACore::mla_debug_add( "MLA_Ajax::mla_admin_init_action \$_REQUEST = " . var_export( $_REQUEST, true ), MLACore::MLA_DEBUG_CATEGORY_AJAX );
|
36 |
+
|
37 |
/*
|
38 |
* If there's no action variable, we have nothing more to do
|
39 |
*/
|
233 |
require_once( MLA_PLUGIN_PATH . 'includes/class-mla-data.php' );
|
234 |
MLAData::initialize();
|
235 |
}
|
236 |
+
|
237 |
$results = MLAData::mla_update_single_item( $post_id, $_REQUEST );
|
238 |
if ( false !== strpos( $results['message'], __( 'ERROR', 'media-library-assistant' ) ) ) {
|
239 |
wp_die( $results['message'] );
|
245 |
require_once( MLA_PLUGIN_PATH . 'includes/class-mla-list-table.php' );
|
246 |
MLA_List_Table::mla_admin_init_action();
|
247 |
}
|
248 |
+
|
249 |
// Create an instance of our package class and echo the new HTML
|
250 |
$MLAListTable = apply_filters( 'mla_list_table_new_instance', NULL );
|
251 |
if ( is_null( $MLAListTable ) ) {
|
includes/class-mla-core-options.php
CHANGED
@@ -63,6 +63,21 @@ class MLACoreOptions {
|
|
63 |
*/
|
64 |
const MLA_TAXONOMY_SUPPORT = 'taxonomy_support';
|
65 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
/**
|
67 |
* Provides a unique name for the admin screen page title option
|
68 |
*/
|
@@ -460,7 +475,8 @@ class MLACoreOptions {
|
|
460 |
__( 'Check the "<strong>Checklist</strong>" box to enable the checklist-style meta box for a flat taxonomy.', 'media-library-assistant' ) . ' ' .
|
461 |
__( 'You must also check the <strong>"Enable enhanced checklist taxonomies"</strong> box below to enable this feature.', 'media-library-assistant' ) . '<br>' .
|
462 |
__( 'Check the "<strong>Checked On Top</strong>" box to moved checked terms to the top of the checklist-style meta box.', 'media-library-assistant' ) . '<br>' .
|
463 |
-
__( 'Use the "<strong>List Filter</strong>" option to select the taxonomy on which to filter the Assistant table listing.', 'media-library-assistant' )
|
|
|
464 |
'std' => array (
|
465 |
'tax_support' => array (
|
466 |
'attachment_category' => 'checked',
|
@@ -476,7 +492,9 @@ class MLACoreOptions {
|
|
476 |
),
|
477 |
'tax_flat_checklist' => array(),
|
478 |
'tax_checked_on_top' => NULL, // default "true", handled in mla_initialize_tax_checked_on_top
|
479 |
-
'tax_filter' => 'attachment_category'
|
|
|
|
|
480 |
),
|
481 |
'type' => 'custom',
|
482 |
'render' => 'mla_taxonomy_option_handler',
|
63 |
*/
|
64 |
const MLA_TAXONOMY_SUPPORT = 'taxonomy_support';
|
65 |
|
66 |
+
/**
|
67 |
+
* Provides a unique name for the "filter on custom field" key
|
68 |
+
*/
|
69 |
+
const MLA_FILTER_METAKEY = '(custom field)';
|
70 |
+
|
71 |
+
/**
|
72 |
+
* Provides a unique name for the "all custom field values" key
|
73 |
+
*/
|
74 |
+
const ALL_MLA_FILTER_METAKEY = '(all MLA_FILTER_METAKEY)';
|
75 |
+
|
76 |
+
/**
|
77 |
+
* Provides a unique name for the "no custom field values" key
|
78 |
+
*/
|
79 |
+
const NO_MLA_FILTER_METAKEY = '(no MLA_FILTER_METAKEY)';
|
80 |
+
|
81 |
/**
|
82 |
* Provides a unique name for the admin screen page title option
|
83 |
*/
|
475 |
__( 'Check the "<strong>Checklist</strong>" box to enable the checklist-style meta box for a flat taxonomy.', 'media-library-assistant' ) . ' ' .
|
476 |
__( 'You must also check the <strong>"Enable enhanced checklist taxonomies"</strong> box below to enable this feature.', 'media-library-assistant' ) . '<br>' .
|
477 |
__( 'Check the "<strong>Checked On Top</strong>" box to moved checked terms to the top of the checklist-style meta box.', 'media-library-assistant' ) . '<br>' .
|
478 |
+
__( 'Use the "<strong>List Filter</strong>" option to select the taxonomy (or custom field) on which to filter the Assistant table listing.', 'media-library-assistant' ) . '<br>' .
|
479 |
+
__( 'To <strong>filter on a custom field</strong>, enter the field name and select ASC (Ascending) ot DESC (Descending) order.', 'media-library-assistant' ),
|
480 |
'std' => array (
|
481 |
'tax_support' => array (
|
482 |
'attachment_category' => 'checked',
|
492 |
),
|
493 |
'tax_flat_checklist' => array(),
|
494 |
'tax_checked_on_top' => NULL, // default "true", handled in mla_initialize_tax_checked_on_top
|
495 |
+
'tax_filter' => 'attachment_category',
|
496 |
+
'tax_metakey_sort' => 'ASC',
|
497 |
+
'tax_metakey' => '',
|
498 |
),
|
499 |
'type' => 'custom',
|
500 |
'render' => 'mla_taxonomy_option_handler',
|
includes/class-mla-core.php
CHANGED
@@ -21,7 +21,7 @@ class MLACore {
|
|
21 |
*
|
22 |
* @var string
|
23 |
*/
|
24 |
-
const CURRENT_MLA_VERSION = '2.
|
25 |
|
26 |
/**
|
27 |
* Slug for registering and enqueueing plugin style sheets (moved from class-mla-main.php)
|
@@ -362,6 +362,39 @@ class MLACore {
|
|
362 |
wp_enqueue_style( MLAModal::JAVASCRIPT_MEDIA_MODAL_STYLES . '-bb' );
|
363 |
} // mla_wp_enqueue_media_action
|
364 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
365 |
/**
|
366 |
* Load a plugin text domain and alternate debug file
|
367 |
*
|
@@ -711,6 +744,7 @@ class MLACore {
|
|
711 |
* @return boolean|string
|
712 |
* true if the taxonomy is supported in this way else false.
|
713 |
* string if $tax_name is '' and $support_type is 'filter', returns the taxonomy to filter by.
|
|
|
714 |
*/
|
715 |
public static function mla_taxonomy_support($tax_name, $support_type = 'support') {
|
716 |
$tax_options = MLACore::mla_get_option( MLACoreOptions::MLA_TAXONOMY_SUPPORT );
|
@@ -775,6 +809,22 @@ class MLACore {
|
|
775 |
}
|
776 |
|
777 |
return ( $tax_name == $tax_filter );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
778 |
default:
|
779 |
return false;
|
780 |
} // $support_type
|
@@ -787,7 +837,9 @@ class MLACore {
|
|
787 |
*
|
788 |
* @param string Optional. 'support' (default), 'quick-edit', 'flat-checklist', 'term-search' or 'filter'
|
789 |
*
|
790 |
-
* @return array
|
|
|
|
|
791 |
*/
|
792 |
public static function mla_supported_taxonomies($support_type = 'support') {
|
793 |
$tax_options = MLACore::mla_get_option( MLACoreOptions::MLA_TAXONOMY_SUPPORT );
|
@@ -840,12 +892,19 @@ class MLACore {
|
|
840 |
}
|
841 |
|
842 |
return (array) isset( $tax_options['tax_filter'] ) ? $tax_options['tax_filter'] : MLACoreOptions::$mla_option_definitions[ MLACoreOptions::MLA_TAXONOMY_SUPPORT ]['std']['tax_filter'];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
843 |
default:
|
844 |
return array();
|
845 |
} // $support_type
|
846 |
} // mla_supported_taxonomies
|
847 |
|
848 |
-
|
849 |
/**
|
850 |
* Evaluate support information for custom field mapping
|
851 |
*
|
21 |
*
|
22 |
* @var string
|
23 |
*/
|
24 |
+
const CURRENT_MLA_VERSION = '2.32';
|
25 |
|
26 |
/**
|
27 |
* Slug for registering and enqueueing plugin style sheets (moved from class-mla-main.php)
|
362 |
wp_enqueue_style( MLAModal::JAVASCRIPT_MEDIA_MODAL_STYLES . '-bb' );
|
363 |
} // mla_wp_enqueue_media_action
|
364 |
|
365 |
+
/**
|
366 |
+
* Add the WPML suppress All languages filter
|
367 |
+
*
|
368 |
+
* The "add_action" for this function is in mla-plugin-loader.php, because the "initialize"
|
369 |
+
* function above doesn't run in time.
|
370 |
+
* Defined as public because it's an action.
|
371 |
+
*
|
372 |
+
* @since 2.32
|
373 |
+
*
|
374 |
+
* @return void
|
375 |
+
*/
|
376 |
+
public static function mla_plugins_loaded_action_wpml(){
|
377 |
+
/*
|
378 |
+
* Defined in /sitepress-multilingual-cms/sitepress.class.php
|
379 |
+
*/
|
380 |
+
add_filter( 'wpml_unset_lang_admin_bar', 'MLACore::wpml_unset_lang_admin_bar', 10, 1 );
|
381 |
+
//error_log( __LINE__ . " wpml_unset_lang_admin_bar added ", 0 );
|
382 |
+
} // mla_plugins_loaded_action_wpml
|
383 |
+
|
384 |
+
/**
|
385 |
+
* Restores All languages view to Media/Assistant submenu screen
|
386 |
+
*
|
387 |
+
* @since 2.32
|
388 |
+
*
|
389 |
+
* @param boolean true to suppress All languages, false to allow it
|
390 |
+
*/
|
391 |
+
public static function wpml_unset_lang_admin_bar( $suppress_all_languages ) {
|
392 |
+
global $pagenow, $mode;
|
393 |
+
|
394 |
+
//error_log( __LINE__ . " wpml_unset_lang_admin_bar( {$pagenow}, {$mode}, {$suppress_all_languages} ) returning " . var_export( $pagenow === 'upload.php' && $mode === 'grid', true ), 0 );
|
395 |
+
return $pagenow === 'upload.php' && $mode === 'grid';
|
396 |
+
}
|
397 |
+
|
398 |
/**
|
399 |
* Load a plugin text domain and alternate debug file
|
400 |
*
|
744 |
* @return boolean|string
|
745 |
* true if the taxonomy is supported in this way else false.
|
746 |
* string if $tax_name is '' and $support_type is 'filter', returns the taxonomy to filter by.
|
747 |
+
* string if $support_type is 'metakey', returns the custom field to filter by.
|
748 |
*/
|
749 |
public static function mla_taxonomy_support($tax_name, $support_type = 'support') {
|
750 |
$tax_options = MLACore::mla_get_option( MLACoreOptions::MLA_TAXONOMY_SUPPORT );
|
809 |
}
|
810 |
|
811 |
return ( $tax_name == $tax_filter );
|
812 |
+
case 'metakey':
|
813 |
+
if ( !empty( $_REQUEST['mla-general-options-save'] ) ) {
|
814 |
+
return isset( $_REQUEST['tax_metakey'] ) ? $_REQUEST['tax_metakey'] : '';
|
815 |
+
} elseif ( !empty( $_REQUEST['mla-general-options-reset'] ) ) {
|
816 |
+
return MLACoreOptions::$mla_option_definitions[ MLACoreOptions::MLA_TAXONOMY_SUPPORT ]['std']['tax_metakey'];
|
817 |
+
}
|
818 |
+
|
819 |
+
return isset( $tax_options['tax_metakey'] ) ? $tax_options['tax_metakey'] : MLACoreOptions::$mla_option_definitions[ MLACoreOptions::MLA_TAXONOMY_SUPPORT ]['std']['tax_metakey'];
|
820 |
+
case 'metakey_sort':
|
821 |
+
if ( !empty( $_REQUEST['mla-general-options-save'] ) ) {
|
822 |
+
return isset( $_REQUEST['tax_metakey_sort'] ) ? $_REQUEST['tax_metakey_sort'] : '';
|
823 |
+
} elseif ( !empty( $_REQUEST['mla-general-options-reset'] ) ) {
|
824 |
+
return MLACoreOptions::$mla_option_definitions[ MLACoreOptions::MLA_TAXONOMY_SUPPORT ]['std']['tax_metakey_sort'];
|
825 |
+
}
|
826 |
+
|
827 |
+
return isset( $tax_options['tax_metakey_sort'] ) ? $tax_options['tax_metakey_sort'] : MLACoreOptions::$mla_option_definitions[ MLACoreOptions::MLA_TAXONOMY_SUPPORT ]['std']['tax_metakey_sort'];
|
828 |
default:
|
829 |
return false;
|
830 |
} // $support_type
|
837 |
*
|
838 |
* @param string Optional. 'support' (default), 'quick-edit', 'flat-checklist', 'term-search' or 'filter'
|
839 |
*
|
840 |
+
* @return array|string
|
841 |
+
* array taxonomies assigned to $support_type; can be empty.
|
842 |
+
* string if $support_type is 'metakey', returns the custom field to filter by.
|
843 |
*/
|
844 |
public static function mla_supported_taxonomies($support_type = 'support') {
|
845 |
$tax_options = MLACore::mla_get_option( MLACoreOptions::MLA_TAXONOMY_SUPPORT );
|
892 |
}
|
893 |
|
894 |
return (array) isset( $tax_options['tax_filter'] ) ? $tax_options['tax_filter'] : MLACoreOptions::$mla_option_definitions[ MLACoreOptions::MLA_TAXONOMY_SUPPORT ]['std']['tax_filter'];
|
895 |
+
case 'metakey':
|
896 |
+
if ( !empty( $_REQUEST['mla-general-options-save'] ) ) {
|
897 |
+
return isset( $_REQUEST['tax_metakey'] ) ? $_REQUEST['tax_metakey'] : '';
|
898 |
+
} elseif ( !empty( $_REQUEST['mla-general-options-reset'] ) ) {
|
899 |
+
return MLACoreOptions::$mla_option_definitions[ MLACoreOptions::MLA_TAXONOMY_SUPPORT ]['std']['tax_metakey'];
|
900 |
+
}
|
901 |
+
|
902 |
+
return isset( $tax_options['tax_metakey'] ) ? $tax_options['tax_metakey'] : MLACoreOptions::$mla_option_definitions[ MLACoreOptions::MLA_TAXONOMY_SUPPORT ]['std']['tax_metakey'];
|
903 |
default:
|
904 |
return array();
|
905 |
} // $support_type
|
906 |
} // mla_supported_taxonomies
|
907 |
|
|
|
908 |
/**
|
909 |
* Evaluate support information for custom field mapping
|
910 |
*
|
includes/class-mla-data-query.php
CHANGED
@@ -782,9 +782,19 @@ class MLAQuery {
|
|
782 |
$clean_request[ $key ] = absint( $value );
|
783 |
break;
|
784 |
/*
|
785 |
-
* ['mla_filter_term'] - filter by
|
786 |
*/
|
787 |
case 'mla_filter_term':
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
788 |
$clean_request[ $key ] = intval( $value );
|
789 |
break;
|
790 |
case 'order':
|
@@ -1229,6 +1239,83 @@ class MLAQuery {
|
|
1229 |
return 0 < $match_count;
|
1230 |
}
|
1231 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1232 |
/**
|
1233 |
* Adds a keyword search to the WHERE clause, if required
|
1234 |
*
|
@@ -1255,7 +1342,10 @@ class MLAQuery {
|
|
1255 |
*/
|
1256 |
if ( isset( self::$search_parameters['mla_terms_search']['phrases'] ) ) {
|
1257 |
$terms_search_parameters = self::$search_parameters['mla_terms_search'];
|
1258 |
-
$
|
|
|
|
|
|
|
1259 |
if ( 1 < count( $terms ) ) {
|
1260 |
$terms_connector = '(';
|
1261 |
} else {
|
@@ -1263,17 +1353,18 @@ class MLAQuery {
|
|
1263 |
}
|
1264 |
|
1265 |
foreach ( $terms as $term ) {
|
1266 |
-
preg_match_all('/".*?("|$)|\'.*?(\'|$)|((?<=[\t ",+])|^)[^\t ",+]+/', $term, $matches);
|
1267 |
-
$phrases = array_map('MLAQuery::mla_search_terms_tidy', $matches[0]);
|
1268 |
|
1269 |
-
|
1270 |
-
|
1271 |
-
*/
|
1272 |
$quoted = array();
|
1273 |
foreach ( $phrases as $index => $phrase ) {
|
1274 |
-
$
|
|
|
1275 |
}
|
1276 |
|
|
|
|
|
|
|
1277 |
$tax_terms = array();
|
1278 |
$tax_counts = array();
|
1279 |
foreach ( $phrases as $index => $phrase ) {
|
782 |
$clean_request[ $key ] = absint( $value );
|
783 |
break;
|
784 |
/*
|
785 |
+
* ['mla_filter_term'] - filter by taxonomy term ID (-1 allowed), or by custom field
|
786 |
*/
|
787 |
case 'mla_filter_term':
|
788 |
+
if ( MLACoreOptions::MLA_FILTER_METAKEY == MLACore::mla_taxonomy_support('', 'filter') ) {
|
789 |
+
if ( MLACoreOptions::ALL_MLA_FILTER_METAKEY != $value ) {
|
790 |
+
$clean_request['mla-metakey'] = MLACore::mla_taxonomy_support('', 'metakey');
|
791 |
+
$clean_request['mla-metavalue'] = stripslashes( $value );
|
792 |
+
}
|
793 |
+
//error_log( __LINE__ . ' _prepare_list_table_query clean_request = ' . var_export( $clean_request, true ), 0 );
|
794 |
+
|
795 |
+
break;
|
796 |
+
}
|
797 |
+
|
798 |
$clean_request[ $key ] = intval( $value );
|
799 |
break;
|
800 |
case 'order':
|
1239 |
return 0 < $match_count;
|
1240 |
}
|
1241 |
|
1242 |
+
/**
|
1243 |
+
* Process a terms search term or phrase list with quoted phrases and variable delimiters
|
1244 |
+
*
|
1245 |
+
* @since 2.31
|
1246 |
+
*
|
1247 |
+
* @param string phrases, e.g., ( "a phrase" separate phrase ) without parens, space delimited
|
1248 |
+
* @param string inter-term/phrase delimiter
|
1249 |
+
* @param boolean true escape backslash values, false to preserve them
|
1250 |
+
*
|
1251 |
+
* @return array individual arguments, e.g. array( 0 => '"a phrase"', 1 => 'separate', 2 => 'phrase' )
|
1252 |
+
*/
|
1253 |
+
private static function _parse_terms_search( $whole_string, $delimiter = ',', $full_parse = false ) {
|
1254 |
+
$trim_list = " \n\t\r\0\x0B,";
|
1255 |
+
if ( false === strpos( $trim_list, $delimiter ) ) {
|
1256 |
+
$trim_list .= $delimiter;
|
1257 |
+
}
|
1258 |
+
|
1259 |
+
$whole_string = trim( $whole_string, $trim_list );
|
1260 |
+
$phrases = array();
|
1261 |
+
|
1262 |
+
while ( strlen( $whole_string ) ) {
|
1263 |
+
$argument = '';
|
1264 |
+
$index = 0;
|
1265 |
+
|
1266 |
+
// Check for enclosing quotes
|
1267 |
+
$current_delimiter = $whole_string[0];
|
1268 |
+
if ( '\'' == $current_delimiter || '"' == $current_delimiter ) {
|
1269 |
+
$index++;
|
1270 |
+
} else {
|
1271 |
+
$current_delimiter = '';
|
1272 |
+
}
|
1273 |
+
|
1274 |
+
while ( $index < strlen( $whole_string ) ) {
|
1275 |
+
$byte = $whole_string[ $index++ ];
|
1276 |
+
if ( '\\' == $byte && $full_parse ) {
|
1277 |
+
// could be a 1- to 3-digit octal value
|
1278 |
+
$digit_limit = $index + 3;
|
1279 |
+
$digit_index = $index;
|
1280 |
+
while ( $digit_index < $digit_limit ) {
|
1281 |
+
if ( ! ctype_digit( $whole_string[ $digit_index ] ) ) {
|
1282 |
+
break;
|
1283 |
+
} else {
|
1284 |
+
$digit_index++;
|
1285 |
+
}
|
1286 |
+
}
|
1287 |
+
|
1288 |
+
if ( $digit_count = $digit_index - $index ) {
|
1289 |
+
$argument .= chr( octdec( substr( $whole_string, $index, $digit_count ) ) );
|
1290 |
+
$index += $digit_count;
|
1291 |
+
} else {
|
1292 |
+
// accept the character following the backslash
|
1293 |
+
$argument .= $whole_string[ $index ];
|
1294 |
+
$index++;
|
1295 |
+
}
|
1296 |
+
} else {
|
1297 |
+
// just another character, but check for closing delimiter
|
1298 |
+
if ( $current_delimiter == $byte || ( empty( $current_delimiter ) && $delimiter == $byte ) ) {
|
1299 |
+
break;
|
1300 |
+
}
|
1301 |
+
|
1302 |
+
$argument .= $byte;
|
1303 |
+
}
|
1304 |
+
} // index < strlen
|
1305 |
+
|
1306 |
+
if ( $full_parse ) {
|
1307 |
+
$phrases[] = $argument;
|
1308 |
+
} else {
|
1309 |
+
// Restore quotes for word-boundary check
|
1310 |
+
$phrases[] = $current_delimiter . $argument . $current_delimiter;
|
1311 |
+
}
|
1312 |
+
|
1313 |
+
$whole_string = trim( substr( $whole_string, $index ), $trim_list );
|
1314 |
+
} // strlen( $whole_string )
|
1315 |
+
|
1316 |
+
return $phrases;
|
1317 |
+
}
|
1318 |
+
|
1319 |
/**
|
1320 |
* Adds a keyword search to the WHERE clause, if required
|
1321 |
*
|
1342 |
*/
|
1343 |
if ( isset( self::$search_parameters['mla_terms_search']['phrases'] ) ) {
|
1344 |
$terms_search_parameters = self::$search_parameters['mla_terms_search'];
|
1345 |
+
$term_delimiter = isset( $terms_search_parameters['term_delimiter'] ) ? $terms_search_parameters['term_delimiter'] : ',';
|
1346 |
+
$phrase_delimiter = isset( $terms_search_parameters['phrase_delimiter'] ) ? $terms_search_parameters['phrase_delimiter'] : ' ';
|
1347 |
+
|
1348 |
+
$terms = self::_parse_terms_search( $terms_search_parameters['phrases'], $term_delimiter );
|
1349 |
if ( 1 < count( $terms ) ) {
|
1350 |
$terms_connector = '(';
|
1351 |
} else {
|
1353 |
}
|
1354 |
|
1355 |
foreach ( $terms as $term ) {
|
|
|
|
|
1356 |
|
1357 |
+
// Find the quoted phrases for a word-boundary check
|
1358 |
+
$phrases = self::_parse_terms_search( $term, $phrase_delimiter, false );
|
|
|
1359 |
$quoted = array();
|
1360 |
foreach ( $phrases as $index => $phrase ) {
|
1361 |
+
$delimiter = substr( $phrase, 0, 1 );
|
1362 |
+
$quoted[ $index ] = ( '"' == $delimiter ) || ( "'" == $delimiter );
|
1363 |
}
|
1364 |
|
1365 |
+
// Strip delimiters and escape backslashes
|
1366 |
+
$phrases = self::_parse_terms_search( $term, $phrase_delimiter, true );
|
1367 |
+
|
1368 |
$tax_terms = array();
|
1369 |
$tax_counts = array();
|
1370 |
foreach ( $phrases as $index => $phrase ) {
|
includes/class-mla-data-source.php
CHANGED
@@ -157,7 +157,7 @@ class MLAData_Source {
|
|
157 |
);
|
158 |
$data_value = shortcode_atts( $default_arguments, $data_value );
|
159 |
|
160 |
-
return MLAData_Source::_evaluate_data_source( $post_id, $category, $data_value, $attachment_metadata
|
161 |
} // mla_get_data_source
|
162 |
|
163 |
/**
|
157 |
);
|
158 |
$data_value = shortcode_atts( $default_arguments, $data_value );
|
159 |
|
160 |
+
return MLAData_Source::_evaluate_data_source( $post_id, $category, $data_value, $attachment_metadata );
|
161 |
} // mla_get_data_source
|
162 |
|
163 |
/**
|
includes/class-mla-data.php
CHANGED
@@ -673,7 +673,7 @@ class MLAData {
|
|
673 |
*
|
674 |
* @param string arguments, e.g., ('d/m/Y H:i:s' , "arg, \" two" ) without parens
|
675 |
*
|
676 |
-
* @return array individual arguments, e.g. array( 0 => 'd/m/Y H:i:s', 1 => 'arg,
|
677 |
*/
|
678 |
private static function _parse_arguments( $argument_string ) {
|
679 |
$argument_string = trim( $argument_string, " \n\t\r\0\x0B," );
|
@@ -776,6 +776,43 @@ class MLAData {
|
|
776 |
$value = number_format( (float)$value );
|
777 |
}
|
778 |
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
779 |
case 'timestamp':
|
780 |
if ( is_numeric( $value ) ) {
|
781 |
/*
|
@@ -937,7 +974,14 @@ class MLAData {
|
|
937 |
if ( isset( $_REQUEST[ $value['value'] ] ) ) {
|
938 |
$record = $_REQUEST[ $value['value'] ];
|
939 |
} else {
|
940 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
941 |
}
|
942 |
|
943 |
if ( is_scalar( $record ) ) {
|
@@ -1236,7 +1280,7 @@ class MLAData {
|
|
1236 |
}
|
1237 |
|
1238 |
if ( false !== strpos( $tail, ',' ) ) {
|
1239 |
-
$match_count = preg_match( '/([^,]+)(,(text|single|export|unpack|array|multi|commas|raw|attr|url|timestamp|date|fraction|substr))(\(([^)]+)\))*/', $tail, $matches );
|
1240 |
if ( 1 == $match_count ) {
|
1241 |
$result['value'] = $matches[1];
|
1242 |
if ( ! empty( $matches[5] ) ) {
|
@@ -1248,34 +1292,10 @@ class MLAData {
|
|
1248 |
} else {
|
1249 |
$args = '';
|
1250 |
}
|
1251 |
-
|
1252 |
-
if (
|
1253 |
-
$result['option'] = 'text';
|
1254 |
-
$result['format'] = 'commas';
|
1255 |
-
} elseif ( 'raw' == $matches[3] ) {
|
1256 |
-
$result['option'] = 'text';
|
1257 |
-
$result['format'] = 'raw';
|
1258 |
-
} elseif ( 'attr' == $matches[3] ) {
|
1259 |
-
$result['option'] = 'text';
|
1260 |
-
$result['format'] = 'attr';
|
1261 |
-
} elseif ( 'url' == $matches[3] ) {
|
1262 |
-
$result['option'] = 'text';
|
1263 |
-
$result['format'] = 'url';
|
1264 |
-
} elseif ( 'timestamp' == $matches[3] ) {
|
1265 |
-
$result['option'] = 'text';
|
1266 |
-
$result['format'] = 'timestamp';
|
1267 |
-
$result['args'] = $args;
|
1268 |
-
} elseif ( 'date' == $matches[3] ) {
|
1269 |
-
$result['option'] = 'text';
|
1270 |
-
$result['format'] = 'date';
|
1271 |
-
$result['args'] = $args;
|
1272 |
-
} elseif ( 'fraction' == $matches[3] ) {
|
1273 |
-
$result['option'] = 'text';
|
1274 |
-
$result['format'] = 'fraction';
|
1275 |
-
$result['args'] = $args;
|
1276 |
-
} elseif ( 'substr' == $matches[3] ) {
|
1277 |
$result['option'] = 'text';
|
1278 |
-
$result['format'] =
|
1279 |
$result['args'] = $args;
|
1280 |
} else {
|
1281 |
$result['option'] = $matches[3];
|
@@ -1525,10 +1545,11 @@ class MLAData {
|
|
1525 |
* @param array PHP nested arrays
|
1526 |
* @param string data option; 'text'|'single'|'export'|'array'|'multi'
|
1527 |
* @param boolean keep existing values - for 'multi' option
|
|
|
1528 |
*
|
1529 |
* @return mixed string or array value matching key(.key ...) or ''
|
1530 |
*/
|
1531 |
-
public static function mla_find_array_element( $needle, $haystack, $option, $keep_existing = false ) {
|
1532 |
$key_array = explode( '.', $needle );
|
1533 |
if ( is_array( $key_array ) ) {
|
1534 |
foreach ( $key_array as $key ) {
|
@@ -1610,7 +1631,7 @@ class MLAData {
|
|
1610 |
return $haystack;
|
1611 |
break;
|
1612 |
default:
|
1613 |
-
$haystack = self::_bin_to_utf8( @implode(
|
1614 |
} // $option
|
1615 |
} // is_array
|
1616 |
|
673 |
*
|
674 |
* @param string arguments, e.g., ('d/m/Y H:i:s' , "arg, \" two" ) without parens
|
675 |
*
|
676 |
+
* @return array individual arguments, e.g. array( 0 => 'd/m/Y H:i:s', 1 => 'arg, " two' )
|
677 |
*/
|
678 |
private static function _parse_arguments( $argument_string ) {
|
679 |
$argument_string = trim( $argument_string, " \n\t\r\0\x0B," );
|
776 |
$value = number_format( (float)$value );
|
777 |
}
|
778 |
break;
|
779 |
+
case 'kbmb':
|
780 |
+
if ( is_numeric( $value ) ) {
|
781 |
+
$number = (string) $value;
|
782 |
+
} else {
|
783 |
+
$index = 0;
|
784 |
+
$number = '';
|
785 |
+
while ( $index < strlen( $value ) ) {
|
786 |
+
if ( ctype_digit( $value[ $index ] ) || ( '.' == $value[ $index ] ) ) {
|
787 |
+
$number .= $value[ $index ];
|
788 |
+
}
|
789 |
+
$index++;
|
790 |
+
}
|
791 |
+
}
|
792 |
+
|
793 |
+
$mb_suffix = ' MB';
|
794 |
+
$threshold = 10240;
|
795 |
+
$kb_suffix = ' KB';
|
796 |
+
|
797 |
+
if ( is_array( $args['args'] ) ) {
|
798 |
+
$mb_suffix = isset( $args['args'][2] ) ? $args['args'][2] : $mb_suffix;
|
799 |
+
$kb_suffix = isset( $args['args'][1] ) ? $args['args'][1] : $kb_suffix;
|
800 |
+
$args['args'] = $args['args'][0];
|
801 |
+
}
|
802 |
+
|
803 |
+
if ( is_numeric( $args['args'] ) ) {
|
804 |
+
$threshold = absint( $args['args'] );
|
805 |
+
}
|
806 |
+
|
807 |
+
$number = (float) $number;
|
808 |
+
if ( 1048576 < $number ) {
|
809 |
+
$value = number_format( ( $number/1048576 ), 3 ) . $mb_suffix;
|
810 |
+
} elseif ( $threshold < $number ) {
|
811 |
+
$value = number_format( ( $number/1024 ), 3 ) . $kb_suffix;
|
812 |
+
} else {
|
813 |
+
$value = number_format( $number );
|
814 |
+
}
|
815 |
+
break;
|
816 |
case 'timestamp':
|
817 |
if ( is_numeric( $value ) ) {
|
818 |
/*
|
974 |
if ( isset( $_REQUEST[ $value['value'] ] ) ) {
|
975 |
$record = $_REQUEST[ $value['value'] ];
|
976 |
} else {
|
977 |
+
// Look for compound names, e.g., tax_input.attachment_category
|
978 |
+
$key_array = explode( '.', $value['value'] );
|
979 |
+
if ( 1 < count( $key_array ) && isset( $_REQUEST[ $key_array[0] ] ) ) {
|
980 |
+
$array_value = array( $key_array[0] => $_REQUEST[ $key_array[0] ] );
|
981 |
+
$record = MLAData::mla_find_array_element( $value['value'], $array_value, $value['option'], false, ',' );
|
982 |
+
} else {
|
983 |
+
$record = '';
|
984 |
+
}
|
985 |
}
|
986 |
|
987 |
if ( is_scalar( $record ) ) {
|
1280 |
}
|
1281 |
|
1282 |
if ( false !== strpos( $tail, ',' ) ) {
|
1283 |
+
$match_count = preg_match( '/([^,]+)(,(text|single|export|unpack|array|multi|commas|raw|attr|url|kbmb|timestamp|date|fraction|substr))(\(([^)]+)\))*/', $tail, $matches );
|
1284 |
if ( 1 == $match_count ) {
|
1285 |
$result['value'] = $matches[1];
|
1286 |
if ( ! empty( $matches[5] ) ) {
|
1292 |
} else {
|
1293 |
$args = '';
|
1294 |
}
|
1295 |
+
|
1296 |
+
if ( in_array( $matches[3], array( 'commas', 'raw', 'attr', 'url', 'kbmb', 'timestamp', 'date', 'fraction', 'substr' ) ) ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1297 |
$result['option'] = 'text';
|
1298 |
+
$result['format'] = $matches[3];
|
1299 |
$result['args'] = $args;
|
1300 |
} else {
|
1301 |
$result['option'] = $matches[3];
|
1545 |
* @param array PHP nested arrays
|
1546 |
* @param string data option; 'text'|'single'|'export'|'array'|'multi'
|
1547 |
* @param boolean keep existing values - for 'multi' option
|
1548 |
+
* @param string inter-element glue for text implode
|
1549 |
*
|
1550 |
* @return mixed string or array value matching key(.key ...) or ''
|
1551 |
*/
|
1552 |
+
public static function mla_find_array_element( $needle, $haystack, $option, $keep_existing = false, $glue = ', ' ) {
|
1553 |
$key_array = explode( '.', $needle );
|
1554 |
if ( is_array( $key_array ) ) {
|
1555 |
foreach ( $key_array as $key ) {
|
1631 |
return $haystack;
|
1632 |
break;
|
1633 |
default:
|
1634 |
+
$haystack = self::_bin_to_utf8( @implode( $glue, $haystack ) );
|
1635 |
} // $option
|
1636 |
} // is_array
|
1637 |
|
includes/class-mla-example-list-table.php
ADDED
@@ -0,0 +1,1349 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Media Library Assistant extended List Table class for example plugins
|
4 |
+
*
|
5 |
+
* @package Media Library Assistant
|
6 |
+
* @since 2.32
|
7 |
+
*/
|
8 |
+
|
9 |
+
/*
|
10 |
+
* The WP_List_Table class isn't automatically available to plugins
|
11 |
+
*/
|
12 |
+
if ( !class_exists( 'WP_List_Table' ) ) {
|
13 |
+
require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' );
|
14 |
+
}
|
15 |
+
|
16 |
+
/*
|
17 |
+
* The WP_Upgrader classes aren't automatically available to plugins
|
18 |
+
*/
|
19 |
+
if ( !class_exists( 'WP_Upgrader' ) ) {
|
20 |
+
require_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
|
21 |
+
}
|
22 |
+
|
23 |
+
if ( !class_exists( 'WP_Upgrader_Skin' ) ) {
|
24 |
+
require_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader-skins.php' );
|
25 |
+
}
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Class MLA (Media Library Assistant) Example List Table implements the
|
29 |
+
* searchable database of example plugins for the "Documentation" admin settings tab
|
30 |
+
*
|
31 |
+
* Extends the core WP_List_Table class.
|
32 |
+
*
|
33 |
+
* @package Media Library Assistant
|
34 |
+
* @since 2.32
|
35 |
+
*/
|
36 |
+
class MLA_Example_List_Table extends WP_List_Table {
|
37 |
+
/**
|
38 |
+
* Table column definitions
|
39 |
+
*
|
40 |
+
* This array defines table columns and titles where the key is the column slug (and class)
|
41 |
+
* and the value is the column's title text.
|
42 |
+
*
|
43 |
+
* All of the columns are added to this array by MLA_Example_List_Table::mla_admin_init_action.
|
44 |
+
*
|
45 |
+
* @since 2.32
|
46 |
+
*
|
47 |
+
* @var array
|
48 |
+
*/
|
49 |
+
private static $default_columns = array();
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Default values for hidden columns
|
53 |
+
*
|
54 |
+
* This array is used when the user-level option is not set, i.e.,
|
55 |
+
* the user has not altered the selection of hidden columns.
|
56 |
+
*
|
57 |
+
* The value on the right-hand side must match the column slug, e.g.,
|
58 |
+
* array(0 => 'ID_parent, 1 => 'title_name').
|
59 |
+
*
|
60 |
+
* @since 2.32
|
61 |
+
*
|
62 |
+
* @var array
|
63 |
+
*/
|
64 |
+
private static $default_hidden_columns = array(
|
65 |
+
// 'name',
|
66 |
+
// 'version',
|
67 |
+
// 'installed_version',
|
68 |
+
// 'description'
|
69 |
+
// 'file'
|
70 |
+
// 'tags'
|
71 |
+
);
|
72 |
+
|
73 |
+
/**
|
74 |
+
* Sortable column definitions
|
75 |
+
*
|
76 |
+
* This array defines the table columns that can be sorted. The array key
|
77 |
+
* is the column slug that needs to be sortable, and the value is database column
|
78 |
+
* to sort by. Often, the key and value will be the same, but this is not always
|
79 |
+
* the case (as the value is a column name from the database, not the list table).
|
80 |
+
*
|
81 |
+
* The array value also contains a boolean which is 'true' if the data is currently
|
82 |
+
* sorted by that column. This is computed each time the table is displayed.
|
83 |
+
*
|
84 |
+
* @since 2.32
|
85 |
+
*
|
86 |
+
* @var array
|
87 |
+
*/
|
88 |
+
private static $default_sortable_columns = array(
|
89 |
+
'name' => array('name',false),
|
90 |
+
'version' => array('version',false),
|
91 |
+
'installed_version' => array('installed_version',true),
|
92 |
+
'description' => array('description',false),
|
93 |
+
'file' => array('file',false),
|
94 |
+
'tags' => array('tags',false),
|
95 |
+
);
|
96 |
+
|
97 |
+
/**
|
98 |
+
* Access the default list of hidden columns
|
99 |
+
*
|
100 |
+
* @since 2.32
|
101 |
+
*
|
102 |
+
* @return array default list of hidden columns
|
103 |
+
*/
|
104 |
+
private static function _default_hidden_columns( ) {
|
105 |
+
return self::$default_hidden_columns;
|
106 |
+
}
|
107 |
+
|
108 |
+
/**
|
109 |
+
* Return the names and display values of the sortable columns
|
110 |
+
*
|
111 |
+
* @since 2.32
|
112 |
+
*
|
113 |
+
* @return array name => array( orderby value, heading ) for sortable columns
|
114 |
+
*/
|
115 |
+
public static function mla_get_sortable_columns( ) {
|
116 |
+
$results = array() ;
|
117 |
+
|
118 |
+
foreach ( self::$default_sortable_columns as $key => $value ) {
|
119 |
+
$value[1] = self::$default_columns[ $key ];
|
120 |
+
$results[ $key ] = $value;
|
121 |
+
}
|
122 |
+
|
123 |
+
return $results;
|
124 |
+
}
|
125 |
+
|
126 |
+
/**
|
127 |
+
* Handler for filter 'get_user_option_managesettings_page_mla-settings-menu-examplecolumnshidden'
|
128 |
+
*
|
129 |
+
* Required because the screen.php get_hidden_columns function only uses
|
130 |
+
* the get_user_option result. Set when the file is loaded because the object
|
131 |
+
* is not created in time for the call from screen.php.
|
132 |
+
*
|
133 |
+
* @since 2.32
|
134 |
+
*
|
135 |
+
* @param mixed false or array with current list of hidden columns, if any
|
136 |
+
* @param string 'managesettings_page_mla-settings-menucolumnshidden'
|
137 |
+
* @param object WP_User object, if logged in
|
138 |
+
*
|
139 |
+
* @return array updated list of hidden columns
|
140 |
+
*/
|
141 |
+
public static function mla_manage_hidden_columns_filter( $result, $option, $user_data ) {
|
142 |
+
return $result ? $result : self::_default_hidden_columns();
|
143 |
+
}
|
144 |
+
|
145 |
+
/**
|
146 |
+
* Handler for filter 'manage_settings_page_mla-settings-menu_columns'
|
147 |
+
*
|
148 |
+
* This required filter dictates the table's columns and titles. Set when the
|
149 |
+
* file is loaded because the list_table object isn't created in time
|
150 |
+
* to affect the "screen options" setup.
|
151 |
+
*
|
152 |
+
* @since 2.32
|
153 |
+
*
|
154 |
+
* @return array list of table columns
|
155 |
+
*/
|
156 |
+
public static function mla_manage_columns_filter( ) {
|
157 |
+
return self::$default_columns;
|
158 |
+
}
|
159 |
+
|
160 |
+
/**
|
161 |
+
* Builds the $default_columns array with translated source texts.
|
162 |
+
*
|
163 |
+
* Called from MLATest::initialize because the $default_columns information might be
|
164 |
+
* accessed from "front end" posts/pages.
|
165 |
+
*
|
166 |
+
* @since 2.32
|
167 |
+
*
|
168 |
+
* @return void
|
169 |
+
*/
|
170 |
+
public static function mla_localize_default_columns_array( ) {
|
171 |
+
/*
|
172 |
+
* Build the default columns array at runtime to accomodate calls to the localization functions
|
173 |
+
*/
|
174 |
+
self::$default_columns = array(
|
175 |
+
'cb' => '<input type="checkbox" />', //Render a checkbox instead of text
|
176 |
+
'name' => _x( 'Name', 'list_table_column', 'media-library-assistant' ),
|
177 |
+
'version' => _x( 'Version', 'list_table_column', 'media-library-assistant' ),
|
178 |
+
'installed_version' => _x( 'Installed Version', 'list_table_column', 'media-library-assistant' ),
|
179 |
+
'description' => _x( 'Description', 'list_table_column', 'media-library-assistant' ),
|
180 |
+
'file' => _x( 'File Name', 'list_table_column', 'media-library-assistant' ),
|
181 |
+
'tags' => _x( 'Tags', 'list_table_column', 'media-library-assistant' ),
|
182 |
+
);
|
183 |
+
}
|
184 |
+
|
185 |
+
/**
|
186 |
+
* Print optional in-line styles for Example Plugins submenu table
|
187 |
+
*
|
188 |
+
* @since 2.32
|
189 |
+
*/
|
190 |
+
public static function mla_admin_print_styles_action() {
|
191 |
+
/*
|
192 |
+
* Suppress display of the hidden columns selection list (disabled),
|
193 |
+
* adjust width of the Version column
|
194 |
+
*/
|
195 |
+
echo " <style type='text/css'>\r\n";
|
196 |
+
//echo " form#adv-settings div.metabox-prefs,\r\n";
|
197 |
+
//echo " form#adv-settings fieldset.metabox-prefs {\r\n";
|
198 |
+
//echo " display: none;\r\n";
|
199 |
+
//echo " }\r\n\r\n";
|
200 |
+
echo " table.example_plugins th.column-version,\r\n";
|
201 |
+
echo " table.example_plugins td.column-version {\r\n";
|
202 |
+
echo " width: 6em;\r\n";
|
203 |
+
echo " }\r\n\r\n";
|
204 |
+
echo " table.example_plugins th.column-installed_version,\r\n";
|
205 |
+
echo " table.example_plugins td.column-installed_version {\r\n";
|
206 |
+
echo " width: 7em;\r\n";
|
207 |
+
echo " }\r\n";
|
208 |
+
echo " </style>\r\n";
|
209 |
+
}
|
210 |
+
|
211 |
+
/**
|
212 |
+
* Called in the admin_init action because the list_table object isn't
|
213 |
+
* created in time to affect the "screen options" setup.
|
214 |
+
*
|
215 |
+
* @since 2.32
|
216 |
+
*
|
217 |
+
* @return void
|
218 |
+
*/
|
219 |
+
public static function mla_admin_init_action( ) {
|
220 |
+
//error_log( __LINE__ . ' mla_admin_init_action request = ' . var_export( $_REQUEST, true ), 0 );
|
221 |
+
if ( isset( $_REQUEST['mla-example-cancel'] ) ) {
|
222 |
+
unset( $_REQUEST['mla-example-display'] );
|
223 |
+
}
|
224 |
+
|
225 |
+
if ( isset( $_REQUEST['mla-example-display'] ) || isset( $_REQUEST['mla-example-search'] ) ) {
|
226 |
+
add_filter( 'get_user_option_managesettings_page_' . MLACoreOptions::MLA_SETTINGS_SLUG . '-documentationcolumnshidden', 'MLA_Example_List_Table::mla_manage_hidden_columns_filter', 10, 3 );
|
227 |
+
add_filter( 'manage_settings_page_' . MLACoreOptions::MLA_SETTINGS_SLUG . '-documentation_columns', 'MLA_Example_List_Table::mla_manage_columns_filter', 10, 0 );
|
228 |
+
add_action( 'admin_print_styles', 'MLA_Example_List_Table::mla_admin_print_styles_action' );
|
229 |
+
}
|
230 |
+
}
|
231 |
+
|
232 |
+
/**
|
233 |
+
* Calls the parent constructor to set some default values.
|
234 |
+
*
|
235 |
+
* @since 2.32
|
236 |
+
*
|
237 |
+
* @return void
|
238 |
+
*/
|
239 |
+
function __construct( ) {
|
240 |
+
//Set parent defaults
|
241 |
+
parent::__construct( array(
|
242 |
+
'singular' => 'example_plugin', //singular name of the listed records
|
243 |
+
'plural' => 'example_plugins', //plural name of the listed records
|
244 |
+
'ajax' => false, //does this table support ajax?
|
245 |
+
'screen' => 'settings_page_' . MLACoreOptions::MLA_SETTINGS_SLUG . '-example'
|
246 |
+
) );
|
247 |
+
|
248 |
+
/*
|
249 |
+
* NOTE: There is one add_action call at the end of this source file.
|
250 |
+
*/
|
251 |
+
}
|
252 |
+
|
253 |
+
/**
|
254 |
+
* Get the name of the default primary column.
|
255 |
+
*
|
256 |
+
* @since 2.32
|
257 |
+
* @access protected
|
258 |
+
*
|
259 |
+
* @return string Name of the default primary column
|
260 |
+
*/
|
261 |
+
protected function get_default_primary_column_name() {
|
262 |
+
return 'name';
|
263 |
+
}
|
264 |
+
|
265 |
+
/**
|
266 |
+
* Supply a column value if no column-specific function has been defined
|
267 |
+
*
|
268 |
+
* Called when the parent class can't find a method specifically built for a
|
269 |
+
* given column. All columns should have a specific method, so this function
|
270 |
+
* returns a troubleshooting message.
|
271 |
+
*
|
272 |
+
* @since 2.32
|
273 |
+
*
|
274 |
+
* @param array A singular item (one full row's worth of data)
|
275 |
+
* @param array The name/slug of the column to be processed
|
276 |
+
* @return string Text or HTML to be placed inside the column
|
277 |
+
*/
|
278 |
+
function column_default( $item, $column_name ) {
|
279 |
+
//Show the whole array for troubleshooting purposes
|
280 |
+
/* translators: 1: column_name 2: column_values */
|
281 |
+
return sprintf( __( 'column_default: %1$s, %2$s', 'media-library-assistant' ), $column_name, print_r( $item, true ) );
|
282 |
+
}
|
283 |
+
|
284 |
+
/**
|
285 |
+
* Displays checkboxes for using bulk actions. The 'cb' column
|
286 |
+
* is given special treatment when columns are processed.
|
287 |
+
*
|
288 |
+
* @since 2.32
|
289 |
+
*
|
290 |
+
* @param object An MLA example_plugin object
|
291 |
+
* @return string HTML markup to be placed inside the column
|
292 |
+
*/
|
293 |
+
function column_cb( $item ) {
|
294 |
+
return sprintf( '<input type="checkbox" name="cb_mla_item_ID[]" value="%1$s" />',
|
295 |
+
/*%1$s*/ $item->post_ID
|
296 |
+
);
|
297 |
+
}
|
298 |
+
|
299 |
+
/**
|
300 |
+
* Add rollover actions to a table column
|
301 |
+
*
|
302 |
+
* @since 2.32
|
303 |
+
*
|
304 |
+
* @param object An MLA example_plugin object
|
305 |
+
* @param string Current column name
|
306 |
+
*
|
307 |
+
* @return array Names and URLs of row-level actions
|
308 |
+
*/
|
309 |
+
private function _build_rollover_actions( $item, $column ) {
|
310 |
+
$actions = array();
|
311 |
+
|
312 |
+
/*
|
313 |
+
* Compose view arguments
|
314 |
+
*/
|
315 |
+
|
316 |
+
$view_args = array(
|
317 |
+
'page' => MLACoreOptions::MLA_SETTINGS_SLUG . '-documentation',
|
318 |
+
'mla_tab' => 'documentation',
|
319 |
+
'mla-example-display' => 'true',
|
320 |
+
'mla_item_ID' => urlencode( $item->post_ID )
|
321 |
+
);
|
322 |
+
|
323 |
+
if ( isset( $_REQUEST['paged'] ) ) {
|
324 |
+
$view_args['paged'] = $_REQUEST['paged'];
|
325 |
+
}
|
326 |
+
|
327 |
+
if ( isset( $_REQUEST['order'] ) ) {
|
328 |
+
$view_args['order'] = $_REQUEST['order'];
|
329 |
+
}
|
330 |
+
|
331 |
+
if ( isset( $_REQUEST['orderby'] ) ) {
|
332 |
+
$view_args['orderby'] = $_REQUEST['orderby'];
|
333 |
+
}
|
334 |
+
|
335 |
+
if ( empty( $item->installed_version ) ) {
|
336 |
+
if ( current_user_can( 'install_plugins' ) ) {
|
337 |
+
$actions['install'] = '<a href="' . add_query_arg( $view_args, wp_nonce_url( '?mla_admin_action=' . MLA::MLA_ADMIN_SINGLE_EDIT_DISPLAY, MLACore::MLA_ADMIN_NONCE_ACTION, MLACore::MLA_ADMIN_NONCE_NAME ) ) . '" title="' . __( 'Install this plugin', 'media-library-assistant' ) . '">' . __( 'Install', 'media-library-assistant' ) . '</a>';
|
338 |
+
}
|
339 |
+
} else {
|
340 |
+
if ( current_user_can( 'update_plugins' ) ) {
|
341 |
+
$actions['update'] = '<a href="' . add_query_arg( $view_args, wp_nonce_url( '?mla_admin_action=' . MLA::MLA_ADMIN_SINGLE_EDIT_UPDATE, MLACore::MLA_ADMIN_NONCE_ACTION, MLACore::MLA_ADMIN_NONCE_NAME ) ) . '" title="' . __( 'Update this plugin', 'media-library-assistant' ) . '">' . __( 'Update', 'media-library-assistant' ) . '</a>';
|
342 |
+
}
|
343 |
+
}
|
344 |
+
|
345 |
+
if ( current_user_can( 'upload_files' ) && ( false === strpos( $item->file, '/' ) ) ) {
|
346 |
+
$args = array(
|
347 |
+
'page' => MLACore::ADMIN_PAGE_SLUG,
|
348 |
+
'mla_download_file' => urlencode( MLA_PLUGIN_PATH . 'examples/' . $item->file ),
|
349 |
+
'mla_download_type' => 'text/plain'
|
350 |
+
);
|
351 |
+
$actions['download'] = '<a href="' . add_query_arg( $args, wp_nonce_url( 'upload.php', MLACore::MLA_ADMIN_NONCE_ACTION, MLACore::MLA_ADMIN_NONCE_NAME ) ) . '" title="' . __( 'Download', 'media-library-assistant' ) . ' “' . esc_attr( $item->file ) . '”">' . __( 'Download', 'media-library-assistant' ) . '</a>';
|
352 |
+
}
|
353 |
+
|
354 |
+
return $actions;
|
355 |
+
}
|
356 |
+
|
357 |
+
/**
|
358 |
+
* Supply the content for the Name column
|
359 |
+
*
|
360 |
+
* @since 2.32
|
361 |
+
*
|
362 |
+
* @param object An MLA example_plugin object
|
363 |
+
* @return string HTML markup to be placed inside the column
|
364 |
+
*/
|
365 |
+
function column_name( $item ) {
|
366 |
+
$row_actions = self::_build_rollover_actions( $item, 'name' );
|
367 |
+
$slug = esc_attr( $item->name );
|
368 |
+
return sprintf( '%1$s<br>%2$s', /*%1$s*/ $slug, /*%2$s*/ $this->row_actions( $row_actions ) );
|
369 |
+
}
|
370 |
+
|
371 |
+
/**
|
372 |
+
* Supply the content for the Version column
|
373 |
+
*
|
374 |
+
* @since 2.32
|
375 |
+
*
|
376 |
+
* @param object An MLA example_plugin object
|
377 |
+
* @return string HTML markup to be placed inside the column
|
378 |
+
*/
|
379 |
+
function column_version( $item ) {
|
380 |
+
return esc_attr( $item->version );
|
381 |
+
}
|
382 |
+
|
383 |
+
/**
|
384 |
+
* Supply the content for the Installed Version column
|
385 |
+
*
|
386 |
+
* @since 2.32
|
387 |
+
*
|
388 |
+
* @param object An MLA example_plugin object
|
389 |
+
* @return string HTML markup to be placed inside the column
|
390 |
+
*/
|
391 |
+
function column_installed_version( $item ) {
|
392 |
+
return esc_attr( $item->installed_version ) . '<br>' . esc_attr( $item->status );
|
393 |
+
}
|
394 |
+
|
395 |
+
/**
|
396 |
+
* Supply the content for the Description column
|
397 |
+
*
|
398 |
+
* @since 2.32
|
399 |
+
*
|
400 |
+
* @param object An MLA example_plugin object
|
401 |
+
* @return string HTML markup to be placed inside the column
|
402 |
+
*/
|
403 |
+
function column_description( $item ) {
|
404 |
+
return esc_attr( $item->description );
|
405 |
+
}
|
406 |
+
|
407 |
+
/**
|
408 |
+
* Supply the content for the File Name column
|
409 |
+
*
|
410 |
+
* @since 2.32
|
411 |
+
*
|
412 |
+
* @param object An MLA example_plugin object
|
413 |
+
* @return string HTML markup to be placed inside the column
|
414 |
+
*/
|
415 |
+
function column_file( $item ) {
|
416 |
+
return esc_attr( $item->file );
|
417 |
+
}
|
418 |
+
|
419 |
+
/**
|
420 |
+
* Supply the content for the Tags column
|
421 |
+
*
|
422 |
+
* @since 2.32
|
423 |
+
*
|
424 |
+
* @param object An MLA example_plugin object
|
425 |
+
* @return string HTML markup to be placed inside the column
|
426 |
+
*/
|
427 |
+
function column_tags( $item ) {
|
428 |
+
return esc_attr( $item->tags );
|
429 |
+
}
|
430 |
+
|
431 |
+
/**
|
432 |
+
* This method dictates the table's columns and titles
|
433 |
+
*
|
434 |
+
* @since 2.32
|
435 |
+
*
|
436 |
+
* @return array Column information: 'slugs'=>'Visible Titles'
|
437 |
+
*/
|
438 |
+
function get_columns( ) {
|
439 |
+
return $columns = MLA_Example_List_Table::mla_manage_columns_filter();
|
440 |
+
}
|
441 |
+
|
442 |
+
/**
|
443 |
+
* Returns the list of currently hidden columns from a user option or
|
444 |
+
* from default values if the option is not set
|
445 |
+
*
|
446 |
+
* @since 2.32
|
447 |
+
*
|
448 |
+
* @return array Column information,e.g., array(0 => 'ID_parent, 1 => 'title_name')
|
449 |
+
*/
|
450 |
+
function get_hidden_columns( ) {
|
451 |
+
$columns = get_user_option( 'managesettings_page_' . MLACoreOptions::MLA_SETTINGS_SLUG . '-documentationcolumnshidden' );
|
452 |
+
|
453 |
+
if ( is_array( $columns ) ) {
|
454 |
+
return $columns;
|
455 |
+
}
|
456 |
+
|
457 |
+
return self::_default_hidden_columns();
|
458 |
+
}
|
459 |
+
|
460 |
+
/**
|
461 |
+
* Returns an array where the key is the column that needs to be sortable
|
462 |
+
* and the value is db column to sort by. Also notes the current sort column,
|
463 |
+
* if set.
|
464 |
+
*
|
465 |
+
* @since 2.32
|
466 |
+
*
|
467 |
+
* @return array Sortable column information,e.g.,
|
468 |
+
* 'slugs'=>array('data_values',boolean)
|
469 |
+
*/
|
470 |
+
function get_sortable_columns( ) {
|
471 |
+
$columns = self::$default_sortable_columns;
|
472 |
+
|
473 |
+
if ( isset( $_REQUEST['orderby'] ) ) {
|
474 |
+
$needle = array( $_REQUEST['orderby'], false );
|
475 |
+
$key = array_search( $needle, $columns );
|
476 |
+
if ( $key ) {
|
477 |
+
$columns[ $key ][ 1 ] = true;
|
478 |
+
}
|
479 |
+
} else {
|
480 |
+
$columns['name'][ 1 ] = true;
|
481 |
+
}
|
482 |
+
|
483 |
+
return $columns;
|
484 |
+
}
|
485 |
+
|
486 |
+
/**
|
487 |
+
* Returns HTML markup for one view that can be used with this table
|
488 |
+
*
|
489 |
+
* @since 1.40
|
490 |
+
*
|
491 |
+
* @param string View slug
|
492 |
+
* @param array count and labels for the View
|
493 |
+
* @param string Slug for current view
|
494 |
+
*
|
495 |
+
* @return string | false HTML for link to display the view, false if count = zero
|
496 |
+
*/
|
497 |
+
function _get_view( $view_slug, $example_item, $current_view ) {
|
498 |
+
static $base_url = NULL;
|
499 |
+
|
500 |
+
$class = ( $view_slug == $current_view ) ? ' class="current"' : '';
|
501 |
+
|
502 |
+
/*
|
503 |
+
* Calculate the common values once per page load
|
504 |
+
*/
|
505 |
+
if ( is_null( $base_url ) ) {
|
506 |
+
/*
|
507 |
+
* Remember the view filters
|
508 |
+
*/
|
509 |
+
$base_url = wp_nonce_url( 'options-general.php?page=' . MLACoreOptions::MLA_SETTINGS_SLUG . '-documentation&mla_tab=documentation&mla-example-search=Search', MLACore::MLA_ADMIN_NONCE_ACTION, MLACore::MLA_ADMIN_NONCE_NAME );
|
510 |
+
|
511 |
+
if ( isset( $_REQUEST['s'] ) ) {
|
512 |
+
$base_url = add_query_arg( array( 's' => $_REQUEST['s'] ), $base_url );
|
513 |
+
}
|
514 |
+
}
|
515 |
+
|
516 |
+
$singular = sprintf('%s <span class="count">(%%s)</span>', $example_item['singular'] );
|
517 |
+
$plural = sprintf('%s <span class="count">(%%s)</span>', $example_item['plural'] );
|
518 |
+
$nooped_plural = _n_noop( $singular, $plural, 'media-library-assistant' );
|
519 |
+
return "<a href='" . add_query_arg( array( 'mla_example_view' => $view_slug ), $base_url )
|
520 |
+
. "'$class>" . sprintf( translate_nooped_plural( $nooped_plural, $example_item['count'], 'media-library-assistant' ), number_format_i18n( $example_item['count'] ) ) . '</a>';
|
521 |
+
} // _get_view
|
522 |
+
|
523 |
+
/**
|
524 |
+
* Returns an associative array listing all the views that can be used with this table.
|
525 |
+
* These are listed across the top of the page and managed by WordPress.
|
526 |
+
*
|
527 |
+
* @since 1.40
|
528 |
+
*
|
529 |
+
* @return array View information,e.g., array ( id => link )
|
530 |
+
*/
|
531 |
+
function get_views( ) {
|
532 |
+
/*
|
533 |
+
* Find current view
|
534 |
+
*/
|
535 |
+
$current_view = isset( $_REQUEST['mla_example_view'] ) ? $_REQUEST['mla_example_view'] : 'all';
|
536 |
+
|
537 |
+
/*
|
538 |
+
* Generate the list of views, retaining keyword search criterion
|
539 |
+
*/
|
540 |
+
$s = isset( $_REQUEST['s'] ) ? $_REQUEST['s'] : '';
|
541 |
+
$example_items = self::_tabulate_example_items( $s );
|
542 |
+
$view_links = array();
|
543 |
+
foreach ( $example_items as $slug => $item )
|
544 |
+
$view_links[ $slug ] = self::_get_view( $slug, $item, $current_view );
|
545 |
+
|
546 |
+
return $view_links;
|
547 |
+
}
|
548 |
+
|
549 |
+
/**
|
550 |
+
* Get an associative array ( option_name => option_title ) with the list
|
551 |
+
* of bulk actions available on this table.
|
552 |
+
*
|
553 |
+
* @since 2.32
|
554 |
+
*
|
555 |
+
* @return array Contains all the bulk actions: 'slugs'=>'Visible Titles'
|
556 |
+
*/
|
557 |
+
function get_bulk_actions( ) {
|
558 |
+
return array(
|
559 |
+
'install' => __( 'Install', 'media-library-assistant' ),
|
560 |
+
'update' => __( 'Update', 'media-library-assistant' ),
|
561 |
+
);
|
562 |
+
}
|
563 |
+
|
564 |
+
/**
|
565 |
+
* Prepares the list of items for displaying
|
566 |
+
*
|
567 |
+
* This is where you prepare your data for display. This method will usually
|
568 |
+
* be used to query the database, sort and filter the data, and generally
|
569 |
+
* get it ready to be displayed. At a minimum, we should set $this->items and
|
570 |
+
* $this->set_pagination_args().
|
571 |
+
*
|
572 |
+
* @since 2.32
|
573 |
+
*
|
574 |
+
* @return void
|
575 |
+
*/
|
576 |
+
function prepare_items( ) {
|
577 |
+
$this->_column_headers = array(
|
578 |
+
$this->get_columns(),
|
579 |
+
$this->get_hidden_columns(),
|
580 |
+
$this->get_sortable_columns()
|
581 |
+
);
|
582 |
+
|
583 |
+
/*
|
584 |
+
* REQUIRED for pagination.
|
585 |
+
*/
|
586 |
+
$total_items = self::_count_example_items( $_REQUEST );
|
587 |
+
$user = get_current_user_id();
|
588 |
+
$screen = get_current_screen();
|
589 |
+
$option = $screen->get_option( 'per_page', 'option' );
|
590 |
+
if ( is_string( $option ) ) {
|
591 |
+
$per_page = get_user_meta( $user, $option, true );
|
592 |
+
} else {
|
593 |
+
$per_page = 10;
|
594 |
+
}
|
595 |
+
|
596 |
+
if ( empty( $per_page ) || $per_page < 1 ) {
|
597 |
+
$per_page = $screen->get_option( 'per_page', 'default' );
|
598 |
+
}
|
599 |
+
|
600 |
+
/*
|
601 |
+
* REQUIRED. We also have to register our pagination options & calculations.
|
602 |
+
*/
|
603 |
+
$this->set_pagination_args( array(
|
604 |
+
'total_items' => $total_items,
|
605 |
+
'per_page' => $per_page,
|
606 |
+
'total_pages' => ceil( $total_items / $per_page )
|
607 |
+
) );
|
608 |
+
|
609 |
+
$current_page = $this->get_pagenum();
|
610 |
+
|
611 |
+
/*
|
612 |
+
* REQUIRED. Assign sorted and paginated data to the items property, where
|
613 |
+
* it can be used by the rest of the class.
|
614 |
+
*/
|
615 |
+
$this->items = self::_query_example_items( $_REQUEST, ( ( $current_page - 1 ) * $per_page ), $per_page );
|
616 |
+
}
|
617 |
+
|
618 |
+
/**
|
619 |
+
* Generates (echoes) content for a single row of the table
|
620 |
+
*
|
621 |
+
* @since 2.32
|
622 |
+
*
|
623 |
+
* @param object the current item
|
624 |
+
*
|
625 |
+
* @return void Echoes the row HTML
|
626 |
+
*/
|
627 |
+
function single_row( $item ) {
|
628 |
+
static $row_class = '';
|
629 |
+
$row_class = ( $row_class == '' ? ' class="alternate"' : '' );
|
630 |
+
|
631 |
+
echo '<tr id="example-' . $item->post_ID . '"' . $row_class . '>';
|
632 |
+
echo parent::single_row_columns( $item );
|
633 |
+
echo '</tr>';
|
634 |
+
}
|
635 |
+
|
636 |
+
/**
|
637 |
+
* Install or update an Example Plugin
|
638 |
+
*
|
639 |
+
* @since 2.32
|
640 |
+
*
|
641 |
+
* @param integer MLA Example Plugin ID
|
642 |
+
* @param boolean true to update an already-installed plugin, false to install new plugin
|
643 |
+
*
|
644 |
+
* @return string empty or error message
|
645 |
+
*/
|
646 |
+
private static function _process_example_plugin( $ID, $update = false ) {
|
647 |
+
global $wp_filesystem;
|
648 |
+
|
649 |
+
$plugin = MLA_Example_List_Table::_find_example_plugin( $ID );
|
650 |
+
if ( !$plugin ) {
|
651 |
+
/* translators: 1: plugin name */
|
652 |
+
return sprintf( __( 'Example plugin "%1$s" not found', 'media-library-assistant' ), $ID );
|
653 |
+
}
|
654 |
+
|
655 |
+
$source_parts = explode( '/', $plugin->file );
|
656 |
+
if ( $source_is_dir = 1 < count( $source_parts ) ) {
|
657 |
+
$source_dir = $source_parts[0];
|
658 |
+
$source_file = $source_parts[1];
|
659 |
+
} else {
|
660 |
+
$source_dir = str_replace( '.php', '', $source_parts[0] );
|
661 |
+
$source_file = $source_parts[0];
|
662 |
+
}
|
663 |
+
|
664 |
+
$result = validate_plugin( $source_file );
|
665 |
+
$target_is_file = ( 0 === $result );
|
666 |
+
|
667 |
+
$source_root = MLA_PLUGIN_PATH . 'examples/' . $source_dir;
|
668 |
+
$target_root = WP_PLUGIN_DIR . '/' . $source_dir;
|
669 |
+
|
670 |
+
$upgrader = new WP_Upgrader( new MLA_Upgrader_Skin() );
|
671 |
+
$upgrader->init();
|
672 |
+
$result = $upgrader->fs_connect( array( WP_PLUGIN_DIR, $target_root ) );
|
673 |
+
if ( is_wp_error($result) ) {
|
674 |
+
/* translators: 1: plugin name, 2: WP_Error message */
|
675 |
+
return sprintf( __( 'Example plugin "%1$s" fs_connect failed; no action taken. Error: %2$s', 'media-library-assistant' ), $plugin->name, $result->get_error_message() );
|
676 |
+
}
|
677 |
+
|
678 |
+
if ( true !== $result ) {
|
679 |
+
/* translators: 1: plugin name */
|
680 |
+
return sprintf( __( 'Example plugin "%1$s" fs_connect failed; no action taken', 'media-library-assistant' ), $plugin->name );
|
681 |
+
}
|
682 |
+
|
683 |
+
/*
|
684 |
+
* Convert a single-file plugin to (temporary) directory-based plugin
|
685 |
+
*/
|
686 |
+
if ( !$source_is_dir ) {
|
687 |
+
global $wp_filesystem;
|
688 |
+
|
689 |
+
$result = $wp_filesystem->mkdir( $source_root, FS_CHMOD_DIR );
|
690 |
+
$result = $wp_filesystem->copy( $source_root . '.php', $source_root . '/' . $source_file );
|
691 |
+
}
|
692 |
+
|
693 |
+
$upgrader_args = array(
|
694 |
+
'source' => $source_root,
|
695 |
+
'destination' => $target_root,
|
696 |
+
'clear_destination' => $update,
|
697 |
+
'clear_working' => !$source_is_dir,
|
698 |
+
'abort_if_destination_exists' => !$update,
|
699 |
+
'hook_extra' => array()
|
700 |
+
);
|
701 |
+
|
702 |
+
$result = $upgrader->install_package( $upgrader_args );
|
703 |
+
if ( is_wp_error($result) ) {
|
704 |
+
/* translators: 1: plugin name, 2: WP_Error message */
|
705 |
+
return sprintf( __( 'Example plugin "%1$s" install_package failed; no action taken. Error: %2$s', 'media-library-assistant' ), $plugin->name, $result->get_error_message() );
|
706 |
+
}
|
707 |
+
|
708 |
+
self::_update_example_plugin( $ID, 'installed_version', $plugin->version );
|
709 |
+
if ( !$update ) {
|
710 |
+
self::_update_example_plugin( $ID, 'status', 'Inactive' );
|
711 |
+
}
|
712 |
+
|
713 |
+
if ( $target_is_file ) {
|
714 |
+
if ( ! $wp_filesystem->delete( WP_PLUGIN_DIR . '/' . $source_file, false, 'f' ) ) {
|
715 |
+
/* translators: 1: plugin name, 2: WP_Error message */
|
716 |
+
return sprintf( __( 'Example plugin "%1$s" remove old single file failed.', 'media-library-assistant' ), $plugin->name );
|
717 |
+
return new WP_Error( 'remove_old_failed', $this->strings['remove_old_failed'] );
|
718 |
+
}
|
719 |
+
}
|
720 |
+
|
721 |
+
return '';
|
722 |
+
}
|
723 |
+
|
724 |
+
/**
|
725 |
+
* Process an Example Plugin Install action
|
726 |
+
*
|
727 |
+
* @since 2.32
|
728 |
+
*
|
729 |
+
* @param integer MLA Example Plugin ID
|
730 |
+
*
|
731 |
+
* @return string status/error messages
|
732 |
+
*/
|
733 |
+
public static function mla_install_example_plugin( $ID ) {
|
734 |
+
$plugin = MLA_Example_List_Table::_find_example_plugin( $ID );
|
735 |
+
if ( !$plugin ) {
|
736 |
+
/* translators: 1: plugin name */
|
737 |
+
return sprintf( __( 'Example plugin "%1$s" not found', 'media-library-assistant' ), $ID );
|
738 |
+
}
|
739 |
+
|
740 |
+
if ( !empty( $plugin->installed_version ) ) {
|
741 |
+
/* translators: 1: plugin name */
|
742 |
+
return sprintf( __( 'Example plugin "%1$s" already installed; no action taken', 'media-library-assistant' ), $plugin->name );
|
743 |
+
}
|
744 |
+
|
745 |
+
$result = self::_process_example_plugin( $ID, false );
|
746 |
+
if ( empty( $result) ) {
|
747 |
+
/* translators: 1: plugin name */
|
748 |
+
return sprintf( __( 'Example plugin "%1$s" installed', 'media-library-assistant' ), $plugin->name );
|
749 |
+
}
|
750 |
+
|
751 |
+
return $result;
|
752 |
+
}
|
753 |
+
|
754 |
+
/**
|
755 |
+
* Process an Example Plugin Update action
|
756 |
+
*
|
757 |
+
* @since 2.32
|
758 |
+
*
|
759 |
+
* @param integer MLA Example Plugin ID
|
760 |
+
*
|
761 |
+
* @return string status/error messages
|
762 |
+
*/
|
763 |
+
public static function mla_update_example_plugin( $ID ) {
|
764 |
+
$plugin = MLA_Example_List_Table::_find_example_plugin( $ID );
|
765 |
+
if ( !$plugin ) {
|
766 |
+
/* translators: 1: plugin name */
|
767 |
+
return sprintf( __( 'Example plugin "%1$s" not found', 'media-library-assistant' ), $ID );
|
768 |
+
}
|
769 |
+
|
770 |
+
if ( empty( $plugin->installed_version ) ) {
|
771 |
+
/* translators: 1: plugin name */
|
772 |
+
return sprintf( __( 'Example plugin "%1$s" not installed; no action taken', 'media-library-assistant' ), $plugin->name );
|
773 |
+
}
|
774 |
+
|
775 |
+
$result = self::_process_example_plugin( $ID, true );
|
776 |
+
if ( empty( $result) ) {
|
777 |
+
/* translators: 1: plugin name */
|
778 |
+
return sprintf( __( 'Example plugin "%1$s" updated', 'media-library-assistant' ), $plugin->name );
|
779 |
+
}
|
780 |
+
|
781 |
+
return $result;
|
782 |
+
}
|
783 |
+
|
784 |
+
/**
|
785 |
+
* Callback to sort array by a 'Name' key.
|
786 |
+
*
|
787 |
+
* @since 2.32
|
788 |
+
*
|
789 |
+
* @param array The first array
|
790 |
+
* @param array The second array
|
791 |
+
*
|
792 |
+
* @return integer The comparison result
|
793 |
+
*/
|
794 |
+
private static function _sort_uname_callback( $a, $b ) {
|
795 |
+
return strnatcasecmp( $a['Name'], $b['Name'] );
|
796 |
+
}
|
797 |
+
|
798 |
+
/**
|
799 |
+
* In-memory representation of the Example Plugins
|
800 |
+
*
|
801 |
+
* @since 2.32
|
802 |
+
*
|
803 |
+
* @var array ID => ( post_ID, name, version, description, file, tags )
|
804 |
+
*/
|
805 |
+
private static $_example_plugin_items = NULL;
|
806 |
+
|
807 |
+
/**
|
808 |
+
* Highest existing Post MIME Type ID value
|
809 |
+
*
|
810 |
+
* @since 2.32
|
811 |
+
*
|
812 |
+
* @var integer
|
813 |
+
*/
|
814 |
+
private static $_example_plugin_highest_ID = 0;
|
815 |
+
|
816 |
+
/**
|
817 |
+
* Assemble the in-memory representation of the Example Plugins
|
818 |
+
*
|
819 |
+
* @since 1.40
|
820 |
+
*
|
821 |
+
* @param boolean Force a reload/recalculation of types
|
822 |
+
*
|
823 |
+
* @return boolean Success (true) or failure (false) of the operation
|
824 |
+
*/
|
825 |
+
private static function _get_example_plugin_items( $force_refresh = false ) {
|
826 |
+
if ( false == $force_refresh && NULL != self::$_example_plugin_items ) {
|
827 |
+
return true;
|
828 |
+
}
|
829 |
+
|
830 |
+
/*
|
831 |
+
* Begin code adapted from /wp-admin/includes/plugin.php function get_plugins()
|
832 |
+
*/
|
833 |
+
$wp_plugins = array ();
|
834 |
+
$plugin_root = MLA_PLUGIN_PATH . 'examples';
|
835 |
+
|
836 |
+
// Files in media-library-assistant/examples directory
|
837 |
+
$plugins_dir = @ opendir( $plugin_root);
|
838 |
+
$plugin_files = array();
|
839 |
+
if ( $plugins_dir ) {
|
840 |
+
while ( ( $file = readdir( $plugins_dir ) ) !== false ) {
|
841 |
+
if ( substr( $file, 0, 1 ) == '.' ) {
|
842 |
+
continue;
|
843 |
+
}
|
844 |
+
|
845 |
+
if ( is_dir( $plugin_root . '/' . $file ) ) {
|
846 |
+
$plugins_subdir = @ opendir( $plugin_root . '/' . $file );
|
847 |
+
if ( $plugins_subdir ) {
|
848 |
+
while ( ( $subfile = readdir( $plugins_subdir ) ) !== false ) {
|
849 |
+
if ( substr( $subfile, 0, 1 ) == '.' )
|
850 |
+
continue;
|
851 |
+
if ( substr( $subfile, -4 ) == '.php' )
|
852 |
+
$plugin_files[] = "$file/$subfile";
|
853 |
+
}
|
854 |
+
closedir( $plugins_subdir );
|
855 |
+
}
|
856 |
+
} else {
|
857 |
+
if ( substr( $file, -4 ) == '.php' ) {
|
858 |
+
$plugin_files[] = $file;
|
859 |
+
}
|
860 |
+
}
|
861 |
+
}
|
862 |
+
closedir( $plugins_dir );
|
863 |
+
}
|
864 |
+
|
865 |
+
if ( empty($plugin_files) ) {
|
866 |
+
self::$_example_plugin_items = $wp_plugins;
|
867 |
+
return true;
|
868 |
+
}
|
869 |
+
|
870 |
+
foreach ( $plugin_files as $plugin_file ) {
|
871 |
+
if ( !is_readable( "$plugin_root/$plugin_file" ) )
|
872 |
+
continue;
|
873 |
+
|
874 |
+
$default_headers = array(
|
875 |
+
'Name' => 'Plugin Name',
|
876 |
+
'Version' => 'Version',
|
877 |
+
'Description' => 'Description',
|
878 |
+
'Tags' => 'Tags',
|
879 |
+
);
|
880 |
+
|
881 |
+
$plugin_data = get_file_data( "$plugin_root/$plugin_file", $default_headers, 'mla_example_plugins' );
|
882 |
+
if ( empty ( $plugin_data['Name'] ) )
|
883 |
+
continue;
|
884 |
+
|
885 |
+
$wp_plugins[plugin_basename( $plugin_file )] = $plugin_data;
|
886 |
+
}
|
887 |
+
|
888 |
+
uasort( $wp_plugins, 'self::_sort_uname_callback' );
|
889 |
+
|
890 |
+
/*
|
891 |
+
* End code adapted from /wp-admin/includes/plugin.php function get_plugins()
|
892 |
+
*/
|
893 |
+
|
894 |
+
/*
|
895 |
+
* Compose the array
|
896 |
+
*/
|
897 |
+
$example_plugins = array();
|
898 |
+
foreach( $wp_plugins as $file => $metadata ) {
|
899 |
+
$plugin_status = validate_plugin( $file );
|
900 |
+
if( 0 === $plugin_status ) {
|
901 |
+
$plugin_file = $file;
|
902 |
+
$plugin_status = get_plugin_data( WP_PLUGIN_DIR . '/' . $file );
|
903 |
+
$plugin_version = $plugin_status['Version'];
|
904 |
+
} else {
|
905 |
+
// Look for a directory-based target for a single-file source
|
906 |
+
if ( false === strpos( $file, '/' ) ) {
|
907 |
+
$source_dir = str_replace( '.php', '', $file );
|
908 |
+
$plugin_status = validate_plugin( "{$source_dir}/{$file}" );
|
909 |
+
if( 0 === $plugin_status ) {
|
910 |
+
$plugin_file = "{$source_dir}/{$file}";
|
911 |
+
$plugin_status = get_plugin_data( WP_PLUGIN_DIR . "/{$plugin_file}" );
|
912 |
+
$plugin_version = $plugin_status['Version'];
|
913 |
+
} else {
|
914 |
+
$plugin_version = '';
|
915 |
+
}
|
916 |
+
} else {
|
917 |
+
$plugin_version = '';
|
918 |
+
}
|
919 |
+
}
|
920 |
+
|
921 |
+
if ( !empty( $plugin_version ) ) {
|
922 |
+
if ( is_plugin_active_for_network( $plugin_file ) ) {
|
923 |
+
$plugin_status = __ ( 'Network' );
|
924 |
+
} elseif ( is_plugin_active( $plugin_file ) ) {
|
925 |
+
$plugin_status = __ ( 'Active' );
|
926 |
+
} else {
|
927 |
+
$plugin_status = __ ( 'Inactive' );
|
928 |
+
}
|
929 |
+
} else {
|
930 |
+
$plugin_status = '';
|
931 |
+
}
|
932 |
+
|
933 |
+
$slug = sanitize_title( str_replace( '.php', '', $file ) );
|
934 |
+
$example_plugins[ $slug ] = array(
|
935 |
+
'name' => $metadata['Name'],
|
936 |
+
'version' => $metadata['Version'],
|
937 |
+
'installed_version' => $plugin_version,
|
938 |
+
'status' => $plugin_status,
|
939 |
+
'description' => $metadata['Description'],
|
940 |
+
'file' => $file,
|
941 |
+
'tags' => $metadata['Tags'],
|
942 |
+
);
|
943 |
+
}
|
944 |
+
|
945 |
+
self::$_example_plugin_items = array();
|
946 |
+
self::$_example_plugin_highest_ID = 0;
|
947 |
+
|
948 |
+
/*
|
949 |
+
* Load and number the entries
|
950 |
+
*/
|
951 |
+
foreach ( $example_plugins as $slug => $value ) {
|
952 |
+
self::$_example_plugin_items[ $slug ] = $value;
|
953 |
+
self::$_example_plugin_items[ $slug ]['post_ID'] = ++self::$_example_plugin_highest_ID;
|
954 |
+
}
|
955 |
+
|
956 |
+
return true;
|
957 |
+
}
|
958 |
+
|
959 |
+
/**
|
960 |
+
* Sanitize and expand query arguments from request variables
|
961 |
+
*
|
962 |
+
* @since 2.32
|
963 |
+
*
|
964 |
+
* @param array query parameters from web page, usually found in $_REQUEST
|
965 |
+
* @param int Optional number of rows (default 0) to skip over to reach desired page
|
966 |
+
* @param int Optional number of rows on each page (0 = all rows, default)
|
967 |
+
*
|
968 |
+
* @return array revised arguments suitable for query
|
969 |
+
*/
|
970 |
+
private static function _prepare_example_items_query( $raw_request, $offset = 0, $count = 0 ) {
|
971 |
+
/*
|
972 |
+
* Go through the $raw_request, take only the arguments that are used in the query and
|
973 |
+
* sanitize or validate them.
|
974 |
+
*/
|
975 |
+
if ( ! is_array( $raw_request ) ) {
|
976 |
+
/* translators: 1: ERROR tag 2: function name 3: non-array value */
|
977 |
+
error_log( sprintf( _x( '%1$s: %2$s non-array "%3$s"', 'error_log', 'media-library-assistant' ), __( 'ERROR', 'media-library-assistant' ), 'MLAMime::_prepare_view_items_query', var_export( $raw_request, true ) ), 0 );
|
978 |
+
return NULL;
|
979 |
+
}
|
980 |
+
|
981 |
+
$clean_request = array (
|
982 |
+
'mla_example_view' => 'all',
|
983 |
+
'orderby' => 'name',
|
984 |
+
'order' => 'ASC',
|
985 |
+
's' => ''
|
986 |
+
);
|
987 |
+
|
988 |
+
foreach ( $raw_request as $key => $value ) {
|
989 |
+
switch ( $key ) {
|
990 |
+
case 'mla_example_view':
|
991 |
+
$clean_request[ $key ] = $value;
|
992 |
+
break;
|
993 |
+
case 'orderby':
|
994 |
+
if ( 'none' == $value ) {
|
995 |
+
$clean_request[ $key ] = $value;
|
996 |
+
} else {
|
997 |
+
$sortable_columns = MLA_Example_List_Table::mla_get_sortable_columns();
|
998 |
+
foreach ($sortable_columns as $sort_key => $sort_value ) {
|
999 |
+
if ( $value == $sort_value[0] ) {
|
1000 |
+
$clean_request[ $key ] = $value;
|
1001 |
+
break;
|
1002 |
+
}
|
1003 |
+
} // foreach
|
1004 |
+
}
|
1005 |
+
break;
|
1006 |
+
case 'order':
|
1007 |
+
switch ( $value = strtoupper ($value ) ) {
|
1008 |
+
case 'ASC':
|
1009 |
+
case 'DESC':
|
1010 |
+
$clean_request[ $key ] = $value;
|
1011 |
+
break;
|
1012 |
+
default:
|
1013 |
+
$clean_request[ $key ] = 'ASC';
|
1014 |
+
}
|
1015 |
+
break;
|
1016 |
+
/*
|
1017 |
+
* ['s'] - Search items by one or more keywords
|
1018 |
+
*/
|
1019 |
+
case 's':
|
1020 |
+
$clean_request[ $key ] = stripslashes( trim( $value ) );
|
1021 |
+
break;
|
1022 |
+
default:
|
1023 |
+
// ignore anything else in $_REQUEST
|
1024 |
+
} // switch $key
|
1025 |
+
} // foreach $raw_request
|
1026 |
+
|
1027 |
+
/*
|
1028 |
+
* Ignore incoming paged value; use offset and count instead
|
1029 |
+
*/
|
1030 |
+
if ( ( (int) $count ) > 0 ) {
|
1031 |
+
$clean_request['offset'] = $offset;
|
1032 |
+
$clean_request['posts_per_page'] = $count;
|
1033 |
+
}
|
1034 |
+
|
1035 |
+
return $clean_request;
|
1036 |
+
}
|
1037 |
+
|
1038 |
+
/**
|
1039 |
+
* Query the plugin_examples items
|
1040 |
+
*
|
1041 |
+
* @since 2.32
|
1042 |
+
*
|
1043 |
+
* @param array query parameters from web page, usually found in $_REQUEST
|
1044 |
+
*
|
1045 |
+
* @return array query results; array of MLA post_mime_type objects
|
1046 |
+
*/
|
1047 |
+
private static function _execute_example_items_query( $request ) {
|
1048 |
+
if ( ! self::_get_example_plugin_items() ) {
|
1049 |
+
return array ();
|
1050 |
+
}
|
1051 |
+
|
1052 |
+
/*
|
1053 |
+
* Sort and filter the list
|
1054 |
+
*/
|
1055 |
+
$keywords = isset( $request['s'] ) ? $request['s'] : '';
|
1056 |
+
preg_match_all('/".*?("|$)|((?<=[\t ",+])|^)[^\t ",+]+/', $keywords, $matches);
|
1057 |
+
$keywords = array_map( 'MLAQuery::mla_search_terms_tidy', $matches[0]);
|
1058 |
+
$view = isset( $request['mla_example_view'] ) ? $request['mla_example_view'] : 'all';
|
1059 |
+
$index = 0;
|
1060 |
+
$sorted_types = array();
|
1061 |
+
|
1062 |
+
foreach ( self::$_example_plugin_items as $slug => $value ) {
|
1063 |
+
$index++;
|
1064 |
+
if ( ! empty( $keywords ) ) {
|
1065 |
+
$found = false;
|
1066 |
+
foreach ( $keywords as $keyword ) {
|
1067 |
+
//$found |= false !== stripos( $slug, $keyword );
|
1068 |
+
$found |= false !== stripos( $value['name'], $keyword );
|
1069 |
+
$found |= false !== stripos( $value['description'], $keyword );
|
1070 |
+
$found |= false !== stripos( $value['file'], $keyword );
|
1071 |
+
$found |= false !== stripos( $value['tags'], $keyword );
|
1072 |
+
}
|
1073 |
+
|
1074 |
+
if ( ! $found ) {
|
1075 |
+
continue;
|
1076 |
+
}
|
1077 |
+
}
|
1078 |
+
|
1079 |
+
switch( $view ) {
|
1080 |
+
case 'active':
|
1081 |
+
$found = 'Active' === $value['status'];
|
1082 |
+
break;
|
1083 |
+
case 'inactive':
|
1084 |
+
$found = 'Inactive' === $value['status'];
|
1085 |
+
break;
|
1086 |
+
case 'network':
|
1087 |
+
$found = 'Network' === $value['status'];
|
1088 |
+
break;
|
1089 |
+
case 'uninstalled':
|
1090 |
+
$found = '' === $value['status'];
|
1091 |
+
break;
|
1092 |
+
default:
|
1093 |
+
$found = true;
|
1094 |
+
}// $view
|
1095 |
+
|
1096 |
+
if ( ! $found ) {
|
1097 |
+
continue;
|
1098 |
+
}
|
1099 |
+
|
1100 |
+
$value['post_ID'] = $index;
|
1101 |
+
switch ( $request['orderby'] ) {
|
1102 |
+
case 'name':
|
1103 |
+
$sorted_types[ ( empty( $value['name'] ) ? chr(1) : $value['name'] ) . $index ] = (object) $value;
|
1104 |
+
break;
|
1105 |
+
case 'version':
|
1106 |
+
$sorted_types[ ( empty( $value['version'] ) ? chr(1) : $value['version'] ) . $index ] = (object) $value;
|
1107 |
+
break;
|
1108 |
+
case 'installed_version':
|
1109 |
+
$sorted_types[ ( empty( $value['installed_version'] ) ? chr(1) : $value['installed_version'] ) . $index ] = (object) $value;
|
1110 |
+
break;
|
1111 |
+
case 'description':
|
1112 |
+
$sorted_types[ ( empty( $value['description'] ) ? chr(1) : $value['description'] ) . $index ] = (object) $value;
|
1113 |
+
break;
|
1114 |
+
case 'file':
|
1115 |
+
$sorted_types[ ( empty( $value['file'] ) ? chr(1) : $value['file'] ) . $index ] = (object) $value;
|
1116 |
+
break;
|
1117 |
+
case 'tags':
|
1118 |
+
$sorted_types[ ( empty( $value['tags'] ) ? chr(1) : $value['tags'] ) . $index ] = (object) $value;
|
1119 |
+
break;
|
1120 |
+
default:
|
1121 |
+
$sorted_types[ $slug ] = (object) $value;
|
1122 |
+
break;
|
1123 |
+
} //orderby
|
1124 |
+
}
|
1125 |
+
ksort( $sorted_types );
|
1126 |
+
|
1127 |
+
if ( 'DESC' == $request['order'] ) {
|
1128 |
+
$sorted_types = array_reverse( $sorted_types, true );
|
1129 |
+
}
|
1130 |
+
|
1131 |
+
/*
|
1132 |
+
* Paginate the sorted list
|
1133 |
+
*/
|
1134 |
+
$results = array();
|
1135 |
+
$offset = isset( $request['offset'] ) ? $request['offset'] : 0;
|
1136 |
+
$count = isset( $request['posts_per_page'] ) ? $request['posts_per_page'] : -1;
|
1137 |
+
foreach ( $sorted_types as $value ) {
|
1138 |
+
if ( $offset ) {
|
1139 |
+
$offset--;
|
1140 |
+
} elseif ( $count-- ) {
|
1141 |
+
$results[] = $value;
|
1142 |
+
} else {
|
1143 |
+
break;
|
1144 |
+
}
|
1145 |
+
}
|
1146 |
+
|
1147 |
+
return $results;
|
1148 |
+
}
|
1149 |
+
|
1150 |
+
/**
|
1151 |
+
* Get the total number of MLA example_plugin objects
|
1152 |
+
*
|
1153 |
+
* @since 2.32
|
1154 |
+
*
|
1155 |
+
* @param array Query variables, e.g., from $_REQUEST
|
1156 |
+
*
|
1157 |
+
* @return integer Number of MLA example_plugin objects
|
1158 |
+
*/
|
1159 |
+
private static function _count_example_items( $request ) {
|
1160 |
+
$request = self::_prepare_example_items_query( $request );
|
1161 |
+
$results = self::_execute_example_items_query( $request );
|
1162 |
+
return count( $results );
|
1163 |
+
}
|
1164 |
+
|
1165 |
+
/**
|
1166 |
+
* Retrieve MLA example_plugin objects for list table display
|
1167 |
+
*
|
1168 |
+
* @since 2.32
|
1169 |
+
*
|
1170 |
+
* @param array query parameters from web page, usually found in $_REQUEST
|
1171 |
+
* @param int number of rows to skip over to reach desired page
|
1172 |
+
* @param int number of rows on each page
|
1173 |
+
*
|
1174 |
+
* @return array MLA example_plugin objects
|
1175 |
+
*/
|
1176 |
+
private static function _query_example_items( $request, $offset, $count ) {
|
1177 |
+
$request = self::_prepare_example_items_query( $request, $offset, $count );
|
1178 |
+
$results = self::_execute_example_items_query( $request );
|
1179 |
+
return $results;
|
1180 |
+
}
|
1181 |
+
|
1182 |
+
/**
|
1183 |
+
* Find an Example Plugin given its ID
|
1184 |
+
*
|
1185 |
+
* @since 2.32
|
1186 |
+
*
|
1187 |
+
* @param integer MLA Example Plugin ID
|
1188 |
+
*
|
1189 |
+
* @return mixed MLA example_plugin object if it exists else false
|
1190 |
+
*/
|
1191 |
+
private static function _find_example_plugin( $ID ) {
|
1192 |
+
if ( ! self::_get_example_plugin_items() ) {
|
1193 |
+
return false;
|
1194 |
+
}
|
1195 |
+
|
1196 |
+
$plugin_ID = (string) $ID;
|
1197 |
+
foreach ( self::$_example_plugin_items as $slug => $value ) {
|
1198 |
+
if ( $plugin_ID == $value['post_ID'] ) {
|
1199 |
+
return (object) $value;
|
1200 |
+
}
|
1201 |
+
}
|
1202 |
+
|
1203 |
+
return false;
|
1204 |
+
}
|
1205 |
+
|
1206 |
+
/**
|
1207 |
+
* Update an Example Plugin given its ID
|
1208 |
+
*
|
1209 |
+
* @since 2.32
|
1210 |
+
*
|
1211 |
+
* @param integer MLA Example Plugin ID
|
1212 |
+
* @param string MLA Example Plugin property
|
1213 |
+
* @param string MLA Example Plugin new value
|
1214 |
+
*
|
1215 |
+
* @return boolean true if object exists else false
|
1216 |
+
*/
|
1217 |
+
private static function _update_example_plugin( $ID, $key, $value ) {
|
1218 |
+
if ( ! self::_get_example_plugin_items() ) {
|
1219 |
+
return false;
|
1220 |
+
}
|
1221 |
+
|
1222 |
+
$plugin_ID = (string) $ID;
|
1223 |
+
foreach ( self::$_example_plugin_items as $slug => $item ) {
|
1224 |
+
if ( $plugin_ID == $item['post_ID'] ) {
|
1225 |
+
self::$_example_plugin_items[ $slug ][ $key ] = $value;
|
1226 |
+
return true;
|
1227 |
+
}
|
1228 |
+
}
|
1229 |
+
|
1230 |
+
return false;
|
1231 |
+
}
|
1232 |
+
|
1233 |
+
/**
|
1234 |
+
* Tabulate MLA example_plugin objects by view for list table display
|
1235 |
+
*
|
1236 |
+
* @since 2.32
|
1237 |
+
*
|
1238 |
+
* @param string keyword search criterion, optional
|
1239 |
+
*
|
1240 |
+
* @return array ( 'singular' label, 'plural' label, 'count' of items )
|
1241 |
+
*/
|
1242 |
+
private static function _tabulate_example_items( $s = '' ) {
|
1243 |
+
if ( empty( $s ) ) {
|
1244 |
+
$request = array( 'mla_example_view' => 'all' );
|
1245 |
+
} else {
|
1246 |
+
$request = array( 's' => $s );
|
1247 |
+
}
|
1248 |
+
|
1249 |
+
$items = self::_query_example_items( $request, 0, 0 );
|
1250 |
+
|
1251 |
+
$example_items = array(
|
1252 |
+
'all' => array(
|
1253 |
+
'singular' => _x( 'All', 'table_view_singular', 'media_library-assistant' ),
|
1254 |
+
'plural' => _x( 'All', 'table_view_plural', 'media_library-assistant' ),
|
1255 |
+
'count' => 0 ),
|
1256 |
+
'active' => array(
|
1257 |
+
'singular' => _x( 'Active', 'table_view_singular', 'media_library-assistant' ),
|
1258 |
+
'plural' => _x( 'Active', 'table_view_plural', 'media_library-assistant' ),
|
1259 |
+
'count' => 0 ),
|
1260 |
+
'inactive' => array(
|
1261 |
+
'singular' => _x( 'Inactive', 'table_view_singular', 'media_library-assistant' ),
|
1262 |
+
'plural' => _x( 'Inactive', 'table_view_plural', 'media_library-assistant' ),
|
1263 |
+
'count' => 0 ),
|
1264 |
+
'network' => array(
|
1265 |
+
'singular' => _x( 'Network', 'table_view_singular', 'media_library-assistant' ),
|
1266 |
+
'plural' => _x( 'Network', 'table_view_plural', 'media_library-assistant' ),
|
1267 |
+
'count' => 0 ),
|
1268 |
+
'uninstalled' => array(
|
1269 |
+
'singular' => _x( 'Uninstalled', 'table_view_singular', 'media_library-assistant' ),
|
1270 |
+
'plural' => _x( 'Uninstalled', 'table_view_plural', 'media_library-assistant' ),
|
1271 |
+
'count' => 0 ),
|
1272 |
+
);
|
1273 |
+
|
1274 |
+
foreach ( $items as $value ) {
|
1275 |
+
$example_items['all']['count']++;
|
1276 |
+
|
1277 |
+
switch ( $value->status ) {
|
1278 |
+
case 'Active':
|
1279 |
+
$example_items[ 'active' ]['count']++;
|
1280 |
+
break;
|
1281 |
+
case 'Inactive':
|
1282 |
+
$example_items[ 'inactive' ]['count']++;
|
1283 |
+
break;
|
1284 |
+
case 'Network':
|
1285 |
+
$example_items[ 'network' ]['count']++;
|
1286 |
+
break;
|
1287 |
+
default:
|
1288 |
+
$example_items[ 'uninstalled' ]['count']++;
|
1289 |
+
break;
|
1290 |
+
}
|
1291 |
+
}
|
1292 |
+
|
1293 |
+
return $example_items;
|
1294 |
+
}
|
1295 |
+
} // class MLA_Example_List_Table
|
1296 |
+
|
1297 |
+
/**
|
1298 |
+
* Skin for the MLA_Example_List_Table Install and Update functions.
|
1299 |
+
*
|
1300 |
+
* Extends the core WP_Upgrader_Skin class.
|
1301 |
+
*
|
1302 |
+
* @package Media Library Assistant
|
1303 |
+
* @since 2.32
|
1304 |
+
*/
|
1305 |
+
class MLA_Upgrader_Skin extends WP_Upgrader_Skin {
|
1306 |
+
/**
|
1307 |
+
* Messages sent to MLA_Upgrader_Skin::feedback()
|
1308 |
+
*
|
1309 |
+
* @since 2.32
|
1310 |
+
*
|
1311 |
+
* @var array
|
1312 |
+
*/
|
1313 |
+
public $feedback = array();
|
1314 |
+
|
1315 |
+
/**
|
1316 |
+
* Receive feedback from the WP_Upgrader::install() process
|
1317 |
+
*
|
1318 |
+
* @since 2.32
|
1319 |
+
*
|
1320 |
+
* @param string $string
|
1321 |
+
*/
|
1322 |
+
public function feedback($string) {
|
1323 |
+
if ( isset( $this->upgrader->strings[$string] ) )
|
1324 |
+
$string = $this->upgrader->strings[$string];
|
1325 |
+
|
1326 |
+
if ( strpos($string, '%') !== false ) {
|
1327 |
+
$args = func_get_args();
|
1328 |
+
$args = array_splice($args, 1);
|
1329 |
+
if ( $args ) {
|
1330 |
+
$args = array_map( 'strip_tags', $args );
|
1331 |
+
$args = array_map( 'esc_html', $args );
|
1332 |
+
$string = vsprintf($string, $args);
|
1333 |
+
}
|
1334 |
+
}
|
1335 |
+
|
1336 |
+
if ( empty($string) ) {
|
1337 |
+
return;
|
1338 |
+
}
|
1339 |
+
|
1340 |
+
$this->feedback[] = $string;
|
1341 |
+
}
|
1342 |
+
}
|
1343 |
+
|
1344 |
+
/*
|
1345 |
+
* Actions are added here, when the source file is loaded, because the MLA_Example_List_Table
|
1346 |
+
* object is created too late to be useful.
|
1347 |
+
*/
|
1348 |
+
add_action( 'admin_init', 'MLA_Example_List_Table::mla_admin_init_action' );
|
1349 |
+
?>
|
includes/class-mla-file-downloader.php
ADDED
@@ -0,0 +1,123 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* File download support for [mla_gallery]
|
4 |
+
*
|
5 |
+
* @package Media Library Assistant
|
6 |
+
* @since 2.32
|
7 |
+
*/
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Class MLA (Media Library Assistant) File Downloader provides file streaming to client.
|
11 |
+
*
|
12 |
+
* @package Media Library Assistant
|
13 |
+
* @since 2.32
|
14 |
+
*/
|
15 |
+
class MLAFileDownloader {
|
16 |
+
/**
|
17 |
+
* Log debug information if true
|
18 |
+
*
|
19 |
+
* @since 2.32
|
20 |
+
*
|
21 |
+
* @var boolean
|
22 |
+
*/
|
23 |
+
public static $mla_debug = false;
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Process secure file download
|
27 |
+
*
|
28 |
+
* Requires mla_download_file and mla_download_type in $_REQUEST.
|
29 |
+
*
|
30 |
+
* @since 2.32
|
31 |
+
*
|
32 |
+
* @return void echos file contents and calls exit();
|
33 |
+
*/
|
34 |
+
public static function mla_process_download_file() {
|
35 |
+
self::_mla_debug_add( 'mla_process_download_file, REQUEST = ' . var_export( $_REQUEST, true ) );
|
36 |
+
if ( isset( $_REQUEST['mla_download_file'] ) && isset( $_REQUEST['mla_download_type'] ) ) {
|
37 |
+
if( ini_get( 'zlib.output_compression' ) ) {
|
38 |
+
ini_set( 'zlib.output_compression', 'Off' );
|
39 |
+
}
|
40 |
+
|
41 |
+
$file_name = $_REQUEST['mla_download_file'];
|
42 |
+
|
43 |
+
header('Pragma: public'); // required
|
44 |
+
header('Expires: 0'); // no cache
|
45 |
+
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
|
46 |
+
header('Last-Modified: '.gmdate ( 'D, d M Y H:i:s', filemtime ( $file_name ) ).' GMT');
|
47 |
+
header('Cache-Control: private',false);
|
48 |
+
header('Content-Type: '.$_REQUEST['mla_download_type']);
|
49 |
+
header('Content-Disposition: attachment; filename="'.basename( $file_name ).'"');
|
50 |
+
header('Content-Transfer-Encoding: binary');
|
51 |
+
header('Content-Length: '.filesize( $file_name )); // provide file size
|
52 |
+
header('Connection: close');
|
53 |
+
|
54 |
+
readfile( $file_name );
|
55 |
+
exit();
|
56 |
+
} else {
|
57 |
+
$message = __( 'ERROR', 'media-library-assistant' ) . ': ' . 'download argument(s) not set.';
|
58 |
+
self::_mla_debug_add( $message );
|
59 |
+
}
|
60 |
+
|
61 |
+
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
|
62 |
+
echo '<html xmlns="http://www.w3.org/1999/xhtml">';
|
63 |
+
echo '<head>';
|
64 |
+
echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />';
|
65 |
+
echo '<title>Download Error</title>';
|
66 |
+
echo '</head>';
|
67 |
+
echo '';
|
68 |
+
echo '<body>';
|
69 |
+
echo $message;
|
70 |
+
echo '</body>';
|
71 |
+
echo '</html> ';
|
72 |
+
exit();
|
73 |
+
}
|
74 |
+
|
75 |
+
/**
|
76 |
+
* Log debug information
|
77 |
+
*
|
78 |
+
* @since 2.32
|
79 |
+
*
|
80 |
+
* @param string $message Error message.
|
81 |
+
*/
|
82 |
+
private static function _mla_debug_add( $message ) {
|
83 |
+
if ( self::$mla_debug ) {
|
84 |
+
if ( class_exists( 'MLACore' ) ) {
|
85 |
+
MLACore::mla_debug_add( $message );
|
86 |
+
} else {
|
87 |
+
error_log( $message, 0);
|
88 |
+
}
|
89 |
+
}
|
90 |
+
}
|
91 |
+
|
92 |
+
/**
|
93 |
+
* Abort the operation and exit
|
94 |
+
*
|
95 |
+
* @since 2.32
|
96 |
+
*
|
97 |
+
* @param string $message Error message.
|
98 |
+
* @param string $title Optional. Error title. Default empty.
|
99 |
+
* @param integer $response Optional. HTML response code. Default 500.
|
100 |
+
|
101 |
+
* @return void echos page content and calls exit();
|
102 |
+
*/
|
103 |
+
private static function _mla_die( $message, $title = '', $response = 500 ) {
|
104 |
+
self::_mla_debug_add( __LINE__ . " _mla_die( '{$message}', '{$title}', '{$response}' )" );
|
105 |
+
exit();
|
106 |
+
}
|
107 |
+
|
108 |
+
/**
|
109 |
+
* Log the message and return error message array
|
110 |
+
*
|
111 |
+
* @since 2.32
|
112 |
+
*
|
113 |
+
* @param string $message Error message.
|
114 |
+
* @param string $line Optional. Line number in the caller.
|
115 |
+
*
|
116 |
+
* @return array( 'error' => message )
|
117 |
+
*/
|
118 |
+
private static function _mla_error_return( $message, $line = '' ) {
|
119 |
+
self::_mla_debug_add( $line . " MLAFileDownloader::_mla_error_return '{$message}'" );
|
120 |
+
return array( 'error' => $message );
|
121 |
+
}
|
122 |
+
} // Class MLAFileDownloader
|
123 |
+
?>
|
includes/class-mla-list-table.php
CHANGED
@@ -145,6 +145,50 @@ class MLA_List_Table extends WP_List_Table {
|
|
145 |
return $available;
|
146 |
}
|
147 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
148 |
/**
|
149 |
* Get dropdown box of terms to filter by, if available
|
150 |
*
|
@@ -159,6 +203,14 @@ class MLA_List_Table extends WP_List_Table {
|
|
159 |
$dropdown = '';
|
160 |
$tax_filter = MLACore::mla_taxonomy_support('', 'filter');
|
161 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
162 |
if ( ( '' != $tax_filter ) && ( is_object_in_taxonomy( 'attachment', $tax_filter ) ) ) {
|
163 |
$tax_object = get_taxonomy( $tax_filter );
|
164 |
$dropdown_options = array_merge( array(
|
145 |
return $available;
|
146 |
}
|
147 |
|
148 |
+
/**
|
149 |
+
* Get dropdown box of custom field values to filter by, if available
|
150 |
+
*
|
151 |
+
* @since 2.32
|
152 |
+
*
|
153 |
+
* @param string currently selected value || '' (default)
|
154 |
+
* @param array additional wp_dropdown_categories options; default empty
|
155 |
+
*
|
156 |
+
* @return string HTML markup for dropdown box
|
157 |
+
*/
|
158 |
+
public static function mla_get_custom_field_filter_dropdown( $selected = MLACoreOptions::ALL_MLA_FILTER_METAKEY, $dropdown_options = array() ) {
|
159 |
+
global $wpdb;
|
160 |
+
|
161 |
+
$dropdown = '';
|
162 |
+
$tax_metakey = MLACore::mla_taxonomy_support('', 'metakey');
|
163 |
+
if ( empty( $tax_metakey ) ) {
|
164 |
+
return $dropdown;
|
165 |
+
}
|
166 |
+
|
167 |
+
$tax_metakey_sort = MLACore::mla_taxonomy_support('', 'metakey_sort');
|
168 |
+
$values = $wpdb->get_col( $wpdb->prepare( "
|
169 |
+
SELECT DISTINCT meta_value
|
170 |
+
FROM $wpdb->postmeta
|
171 |
+
WHERE meta_key = %s
|
172 |
+
ORDER BY meta_value
|
173 |
+
", $tax_metakey ) . $tax_metakey_sort );
|
174 |
+
|
175 |
+
if ( empty( $values ) ) {
|
176 |
+
return $dropdown;
|
177 |
+
}
|
178 |
+
|
179 |
+
$dropdown = '<select name="mla_filter_term" class="postform" id="name">' . "\n";
|
180 |
+
$selected_attribute = ( $selected == MLACoreOptions::ALL_MLA_FILTER_METAKEY ) ? ' selected="selected"' : '';
|
181 |
+
$value = __( 'All', 'media-library-assistant' ) . ' ' . $tax_metakey;
|
182 |
+
$dropdown .= "\t" . sprintf( '<option value="%1$s"%2$s>%3$s</option>', esc_attr( MLACoreOptions::ALL_MLA_FILTER_METAKEY ), $selected_attribute, _wp_specialchars( $value ) ) . "\n";
|
183 |
+
foreach ( $values as $value ) {
|
184 |
+
$selected_attribute = ( $selected == $value ) ? ' selected="selected"' : '';
|
185 |
+
$dropdown .= "\t" . sprintf( '<option value="%1$s"%2$s>%3$s</option>', esc_attr( $value ), $selected_attribute, _wp_specialchars( $value ) ) . "\n";
|
186 |
+
}
|
187 |
+
$dropdown .= '</select>';
|
188 |
+
|
189 |
+
return $dropdown;
|
190 |
+
}
|
191 |
+
|
192 |
/**
|
193 |
* Get dropdown box of terms to filter by, if available
|
194 |
*
|
203 |
$dropdown = '';
|
204 |
$tax_filter = MLACore::mla_taxonomy_support('', 'filter');
|
205 |
|
206 |
+
if ( MLACoreOptions::MLA_FILTER_METAKEY == $tax_filter ) {
|
207 |
+
if ( 0 == intval( $selected ) ) {
|
208 |
+
$selected = MLACoreOptions::ALL_MLA_FILTER_METAKEY;
|
209 |
+
}
|
210 |
+
|
211 |
+
return self::mla_get_custom_field_filter_dropdown( $selected, $dropdown_options );
|
212 |
+
}
|
213 |
+
|
214 |
if ( ( '' != $tax_filter ) && ( is_object_in_taxonomy( 'attachment', $tax_filter ) ) ) {
|
215 |
$tax_object = get_taxonomy( $tax_filter );
|
216 |
$dropdown_options = array_merge( array(
|
includes/class-mla-media-modal-ajax.php
CHANGED
@@ -615,6 +615,7 @@ class MLAModal_Ajax {
|
|
615 |
'mla_filter_month', 'mla_filter_term', 'mla_terms_search',
|
616 |
'mla_search_value', 's', 'mla_search_fields', 'mla_search_connector'
|
617 |
) ) );
|
|
|
618 |
|
619 |
$query = apply_filters( 'mla_media_modal_query_initial_terms', $query, $raw_query );
|
620 |
|
615 |
'mla_filter_month', 'mla_filter_term', 'mla_terms_search',
|
616 |
'mla_search_value', 's', 'mla_search_fields', 'mla_search_connector'
|
617 |
) ) );
|
618 |
+
//error_log( __LINE__ . ' mla_query_attachments_action query = ' . var_export( $query, true ), 0 );
|
619 |
|
620 |
$query = apply_filters( 'mla_media_modal_query_initial_terms', $query, $raw_query );
|
621 |
|
includes/class-mla-media-modal.php
CHANGED
@@ -134,10 +134,12 @@ class MLAModal {
|
|
134 |
* @return array ( 'class' => $class_array, 'value' => $value_array, 'text' => $text_array )
|
135 |
*/
|
136 |
public static function mla_terms_options( $markup ) {
|
|
|
137 |
$match_count = preg_match_all( "#\<option(( class=\"([^\"]+)\" )|( ))value=((\'([^\']+)\')|(\"([^\"]+)\"))([^\>]*)\>([^\<]*)\<.*#", $markup, $matches );
|
138 |
if ( ( $match_count == false ) || ( $match_count == 0 ) ) {
|
139 |
return array( 'class' => array( '' ), 'value' => array( '0' ), 'text' => array( 'Show all terms' ) );
|
140 |
}
|
|
|
141 |
|
142 |
$class_array = array();
|
143 |
$value_array = array();
|
@@ -201,6 +203,7 @@ class MLAModal {
|
|
201 |
'termsClass' => array(),
|
202 |
'termsIndent' => ' ',
|
203 |
'termsTaxonomy' => '',
|
|
|
204 |
'termsText' => array(),
|
205 |
'termsValue' => array(),
|
206 |
);
|
@@ -247,6 +250,7 @@ class MLAModal {
|
|
247 |
|
248 |
self::$mla_media_modal_settings['termsTaxonomy'] = MLACore::mla_taxonomy_support('', 'filter');
|
249 |
$terms_options = self::mla_terms_options( MLA_List_Table::mla_get_taxonomy_filter_dropdown() );
|
|
|
250 |
self::$mla_media_modal_settings['termsClass'] = $terms_options['class'];
|
251 |
self::$mla_media_modal_settings['termsValue'] = $terms_options['value'];
|
252 |
self::$mla_media_modal_settings['termsText'] = $terms_options['text'];
|
@@ -305,7 +309,7 @@ class MLAModal {
|
|
305 |
'filterMime' => 'all',
|
306 |
'filterUploaded' => 'all',
|
307 |
'filterMonth' => 0,
|
308 |
-
'filterTerm' => 0,
|
309 |
'searchConnector' => $search_defaults['search_connector'],
|
310 |
'searchFields' => $search_defaults['search_fields'],
|
311 |
'searchValue' => '',
|
134 |
* @return array ( 'class' => $class_array, 'value' => $value_array, 'text' => $text_array )
|
135 |
*/
|
136 |
public static function mla_terms_options( $markup ) {
|
137 |
+
//error_log( __LINE__ . ' mla_terms_options markup = ' . var_export( $markup, true ), 0 );
|
138 |
$match_count = preg_match_all( "#\<option(( class=\"([^\"]+)\" )|( ))value=((\'([^\']+)\')|(\"([^\"]+)\"))([^\>]*)\>([^\<]*)\<.*#", $markup, $matches );
|
139 |
if ( ( $match_count == false ) || ( $match_count == 0 ) ) {
|
140 |
return array( 'class' => array( '' ), 'value' => array( '0' ), 'text' => array( 'Show all terms' ) );
|
141 |
}
|
142 |
+
//error_log( __LINE__ . ' mla_terms_options matches = ' . var_export( $matches, true ), 0 );
|
143 |
|
144 |
$class_array = array();
|
145 |
$value_array = array();
|
203 |
'termsClass' => array(),
|
204 |
'termsIndent' => ' ',
|
205 |
'termsTaxonomy' => '',
|
206 |
+
'termsCustom' => false,
|
207 |
'termsText' => array(),
|
208 |
'termsValue' => array(),
|
209 |
);
|
250 |
|
251 |
self::$mla_media_modal_settings['termsTaxonomy'] = MLACore::mla_taxonomy_support('', 'filter');
|
252 |
$terms_options = self::mla_terms_options( MLA_List_Table::mla_get_taxonomy_filter_dropdown() );
|
253 |
+
self::$mla_media_modal_settings['termsCustom'] = ( MLACoreOptions::MLA_FILTER_METAKEY == self::$mla_media_modal_settings['termsTaxonomy'] );
|
254 |
self::$mla_media_modal_settings['termsClass'] = $terms_options['class'];
|
255 |
self::$mla_media_modal_settings['termsValue'] = $terms_options['value'];
|
256 |
self::$mla_media_modal_settings['termsText'] = $terms_options['text'];
|
309 |
'filterMime' => 'all',
|
310 |
'filterUploaded' => 'all',
|
311 |
'filterMonth' => 0,
|
312 |
+
'filterTerm' => self::$mla_media_modal_settings['termsCustom'] ? MLACoreOptions::ALL_MLA_FILTER_METAKEY : 0,
|
313 |
'searchConnector' => $search_defaults['search_connector'],
|
314 |
'searchFields' => $search_defaults['search_fields'],
|
315 |
'searchValue' => '',
|
includes/class-mla-options.php
CHANGED
@@ -509,6 +509,8 @@ class MLAOptions {
|
|
509 |
$tax_flat_checklist = isset( $current_values['tax_flat_checklist'] ) ? $current_values['tax_flat_checklist'] : MLACoreOptions::$mla_option_definitions[ MLACoreOptions::MLA_TAXONOMY_SUPPORT ]['std']['tax_flat_checklist'];
|
510 |
$tax_checked_on_top = isset( $current_values['tax_checked_on_top'] ) ? $current_values['tax_checked_on_top'] : MLACoreOptions::$mla_option_definitions[ MLACoreOptions::MLA_TAXONOMY_SUPPORT ]['std']['tax_checked_on_top'];
|
511 |
$tax_filter = isset( $current_values['tax_filter'] ) ? $current_values['tax_filter'] : MLACoreOptions::$mla_option_definitions[ MLACoreOptions::MLA_TAXONOMY_SUPPORT ]['std']['tax_filter'];
|
|
|
|
|
512 |
|
513 |
/*
|
514 |
* Always display our own taxonomies, even if not registered.
|
@@ -571,6 +573,25 @@ class MLAOptions {
|
|
571 |
$row .= MLAData::mla_parse_template( $taxonomy_row, $option_values );
|
572 |
}
|
573 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
574 |
$option_values = array (
|
575 |
'Support' => __( 'Support', 'media-library-assistant' ),
|
576 |
'Inline Edit' => __( 'Inline Edit', 'media-library-assistant' ),
|
@@ -592,10 +613,12 @@ class MLAOptions {
|
|
592 |
$tax_flat_checklist = isset( $args['tax_flat_checklist'] ) ? $args['tax_flat_checklist'] : MLACoreOptions::$mla_option_definitions[ MLACoreOptions::MLA_TAXONOMY_SUPPORT ]['std']['tax_flat_checklist'];
|
593 |
$tax_checked_on_top = isset( $args['tax_checked_on_top'] ) ? $args['tax_checked_on_top'] : MLACoreOptions::$mla_option_definitions[ MLACoreOptions::MLA_TAXONOMY_SUPPORT ]['std']['tax_checked_on_top'];
|
594 |
$tax_filter = isset( $args['tax_filter'] ) ? $args['tax_filter'] : MLACoreOptions::$mla_option_definitions[ MLACoreOptions::MLA_TAXONOMY_SUPPORT ]['std']['tax_filter'];
|
|
|
|
|
595 |
|
596 |
$msg = '';
|
597 |
|
598 |
-
if ( !empty($tax_filter) && !array_key_exists( $tax_filter, $tax_support ) ) {
|
599 |
/* translators: 1: taxonomy name */
|
600 |
$msg .= '<br>' . sprintf( __( 'List Filter ignored; %1$s not supported.', 'media-library-assistant' ), $tax_filter ) . "\r\n";
|
601 |
$tax_filter = '';
|
@@ -641,7 +664,9 @@ class MLAOptions {
|
|
641 |
'tax_term_search' => $tax_term_search,
|
642 |
'tax_flat_checklist' => $tax_flat_checklist,
|
643 |
'tax_checked_on_top' => $tax_checked_on_top,
|
644 |
-
'tax_filter' => $tax_filter
|
|
|
|
|
645 |
);
|
646 |
|
647 |
MLACore::mla_update_option( $key, $value );
|
509 |
$tax_flat_checklist = isset( $current_values['tax_flat_checklist'] ) ? $current_values['tax_flat_checklist'] : MLACoreOptions::$mla_option_definitions[ MLACoreOptions::MLA_TAXONOMY_SUPPORT ]['std']['tax_flat_checklist'];
|
510 |
$tax_checked_on_top = isset( $current_values['tax_checked_on_top'] ) ? $current_values['tax_checked_on_top'] : MLACoreOptions::$mla_option_definitions[ MLACoreOptions::MLA_TAXONOMY_SUPPORT ]['std']['tax_checked_on_top'];
|
511 |
$tax_filter = isset( $current_values['tax_filter'] ) ? $current_values['tax_filter'] : MLACoreOptions::$mla_option_definitions[ MLACoreOptions::MLA_TAXONOMY_SUPPORT ]['std']['tax_filter'];
|
512 |
+
$tax_metakey_sort = isset( $current_values['tax_metakey_sort'] ) ? $current_values['tax_metakey_sort'] : MLACoreOptions::$mla_option_definitions[ MLACoreOptions::MLA_TAXONOMY_SUPPORT ]['std']['tax_metakey_sort'];
|
513 |
+
$tax_metakey = isset( $current_values['tax_metakey'] ) ? $current_values['tax_metakey'] : MLACoreOptions::$mla_option_definitions[ MLACoreOptions::MLA_TAXONOMY_SUPPORT ]['std']['tax_metakey'];
|
514 |
|
515 |
/*
|
516 |
* Always display our own taxonomies, even if not registered.
|
573 |
$row .= MLAData::mla_parse_template( $taxonomy_row, $option_values );
|
574 |
}
|
575 |
|
576 |
+
/*
|
577 |
+
* Add the "filter on custom field" row
|
578 |
+
*/
|
579 |
+
$selected = empty( $tax_metakey ) ? 'none' : $tax_metakey;
|
580 |
+
$tax_metakey_options = MLAOptions::_compose_custom_field_option_list( $selected, array() );
|
581 |
+
|
582 |
+
$option_values = array (
|
583 |
+
'key' => MLACoreOptions::MLA_FILTER_METAKEY,
|
584 |
+
'name' => '( ' . __( 'Custom Field', 'media-library-assistant' ) . ' )',
|
585 |
+
'asc_checked' => ( 'ASC' == $tax_metakey_sort ) ? 'checked=checked' : '',
|
586 |
+
'desc_checked' => ( 'DESC' == $tax_metakey_sort ) ? 'checked=checked' : '',
|
587 |
+
'tax_metakey_options' => $tax_metakey_options,
|
588 |
+
'tax_metakey_size' => '20',
|
589 |
+
'tax_metakey_text' => $tax_metakey,
|
590 |
+
'filter_checked' => ( MLACoreOptions::MLA_FILTER_METAKEY == $tax_filter ) ? 'checked=checked' : ''
|
591 |
+
);
|
592 |
+
|
593 |
+
$row .= MLAData::mla_parse_template( MLAOptions::$mla_option_templates['taxonomy-metakey-row'], $option_values );
|
594 |
+
|
595 |
$option_values = array (
|
596 |
'Support' => __( 'Support', 'media-library-assistant' ),
|
597 |
'Inline Edit' => __( 'Inline Edit', 'media-library-assistant' ),
|
613 |
$tax_flat_checklist = isset( $args['tax_flat_checklist'] ) ? $args['tax_flat_checklist'] : MLACoreOptions::$mla_option_definitions[ MLACoreOptions::MLA_TAXONOMY_SUPPORT ]['std']['tax_flat_checklist'];
|
614 |
$tax_checked_on_top = isset( $args['tax_checked_on_top'] ) ? $args['tax_checked_on_top'] : MLACoreOptions::$mla_option_definitions[ MLACoreOptions::MLA_TAXONOMY_SUPPORT ]['std']['tax_checked_on_top'];
|
615 |
$tax_filter = isset( $args['tax_filter'] ) ? $args['tax_filter'] : MLACoreOptions::$mla_option_definitions[ MLACoreOptions::MLA_TAXONOMY_SUPPORT ]['std']['tax_filter'];
|
616 |
+
$tax_metakey_sort = isset( $args['tax_metakey_sort'] ) ? $args['tax_metakey_sort'] : MLACoreOptions::$mla_option_definitions[ MLACoreOptions::MLA_TAXONOMY_SUPPORT ]['std']['tax_metakey_sort'];
|
617 |
+
$tax_metakey = isset( $args['tax_metakey'] ) ? stripslashes( $args['tax_metakey'] ) : MLACoreOptions::$mla_option_definitions[ MLACoreOptions::MLA_TAXONOMY_SUPPORT ]['std']['tax_metakey'];
|
618 |
|
619 |
$msg = '';
|
620 |
|
621 |
+
if ( !empty($tax_filter) && ! ( array_key_exists( $tax_filter, $tax_support ) || ( MLACoreOptions::MLA_FILTER_METAKEY == $tax_filter ) ) ) {
|
622 |
/* translators: 1: taxonomy name */
|
623 |
$msg .= '<br>' . sprintf( __( 'List Filter ignored; %1$s not supported.', 'media-library-assistant' ), $tax_filter ) . "\r\n";
|
624 |
$tax_filter = '';
|
664 |
'tax_term_search' => $tax_term_search,
|
665 |
'tax_flat_checklist' => $tax_flat_checklist,
|
666 |
'tax_checked_on_top' => $tax_checked_on_top,
|
667 |
+
'tax_filter' => $tax_filter,
|
668 |
+
'tax_metakey_sort' => $tax_metakey_sort,
|
669 |
+
'tax_metakey' => $tax_metakey,
|
670 |
);
|
671 |
|
672 |
MLACore::mla_update_option( $key, $value );
|
includes/class-mla-settings.php
CHANGED
@@ -267,7 +267,7 @@ class MLASettings {
|
|
267 |
public static function mla_deactivation_hook( ) {
|
268 |
$delete_option_settings = 'checked' === MLACore::mla_get_option( MLACoreOptions::MLA_DELETE_OPTION_SETTINGS );
|
269 |
$delete_option_backups = 'checked' === MLACore::mla_get_option( MLACoreOptions::MLA_DELETE_OPTION_BACKUPS );
|
270 |
-
|
271 |
/*
|
272 |
* We only need the uninstall file if one or both options are true,
|
273 |
* otherwise disable it to prevent a false "Delete files and data" warning
|
@@ -427,7 +427,7 @@ class MLASettings {
|
|
427 |
'fieldsId' => '#mla-display-settings-custom-field-tab',
|
428 |
'totalItems' => $wpdb->get_var( "SELECT COUNT(*) FROM {$wpdb->posts} WHERE `post_type` = 'attachment'" )
|
429 |
);
|
430 |
-
|
431 |
$script_variables = array_merge( $script_variables, $mapping_variables, $tab_variables );
|
432 |
|
433 |
wp_localize_script( self::JAVASCRIPT_INLINE_MAPPING_CUSTOM_SLUG,
|
@@ -446,7 +446,7 @@ class MLASettings {
|
|
446 |
'fieldsId' => '#mla-display-settings-iptc-exif-tab',
|
447 |
'totalItems' => $wpdb->get_var( "SELECT COUNT(*) FROM {$wpdb->posts} WHERE `post_type` = 'attachment' AND ( `post_mime_type` LIKE 'image/%' OR `post_mime_type` LIKE 'application/%pdf%' )" ),
|
448 |
);
|
449 |
-
|
450 |
$script_variables = array_merge( $script_variables, $mapping_variables, $tab_variables );
|
451 |
|
452 |
wp_localize_script( self::JAVASCRIPT_INLINE_MAPPING_IPTC_EXIF_SLUG,
|
@@ -525,6 +525,19 @@ class MLASettings {
|
|
525 |
|
526 |
add_screen_option( $option, $args );
|
527 |
} // upload
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
528 |
} // isset mla_tab
|
529 |
}
|
530 |
|
@@ -539,9 +552,9 @@ class MLASettings {
|
|
539 |
$screen = get_current_screen();
|
540 |
|
541 |
/*
|
542 |
-
* Is this our page and the Views or
|
543 |
*/
|
544 |
-
if ( ! in_array( $screen->id, array( 'settings_page_' . MLACoreOptions::MLA_SETTINGS_SLUG . '-view', 'settings_page_' . MLACoreOptions::MLA_SETTINGS_SLUG . '-upload' ) ) ) {
|
545 |
return;
|
546 |
}
|
547 |
|
@@ -552,6 +565,8 @@ class MLASettings {
|
|
552 |
*/
|
553 |
if ( isset( $_REQUEST['mla-optional-uploads-display'] ) || isset( $_REQUEST['mla-optional-uploads-search'] ) ) {
|
554 |
$file_suffix .= '-optional';
|
|
|
|
|
555 |
} elseif ( isset( $_REQUEST['mla_admin_action'] ) ) {
|
556 |
switch ( $_REQUEST['mla_admin_action'] ) {
|
557 |
case MLA::MLA_ADMIN_SINGLE_EDIT_DISPLAY:
|
@@ -632,7 +647,7 @@ class MLASettings {
|
|
632 |
* @return string|void New value if this is our option, otherwise nothing
|
633 |
*/
|
634 |
public static function mla_set_screen_option_filter( $status, $option, $value ) {
|
635 |
-
if (
|
636 |
return $value;
|
637 |
} elseif ( $status ) {
|
638 |
return $status;
|
@@ -1015,7 +1030,7 @@ class MLASettings {
|
|
1015 |
*/
|
1016 |
public static function mla_update_option_row( $key, $value, $option_table = NULL ) {
|
1017 |
$default = MLACore::mla_get_option( $key, true, false, $option_table );
|
1018 |
-
|
1019 |
/*
|
1020 |
* Checkbox logic is done in the switch statements below,
|
1021 |
* custom logic is done in the handler.
|
@@ -1031,7 +1046,7 @@ class MLASettings {
|
|
1031 |
unset( $_REQUEST[ MLA_OPTION_PREFIX . $key ] );
|
1032 |
}
|
1033 |
}
|
1034 |
-
|
1035 |
if ( isset( $_REQUEST[ MLA_OPTION_PREFIX . $key ] ) ) {
|
1036 |
$message = '<br>update_option(' . $key . ")\r\n";
|
1037 |
switch ( $value['type'] ) {
|
@@ -1434,7 +1449,7 @@ class MLASettings {
|
|
1434 |
// array("name" => "shortcode", "description" => "This shortcode...")
|
1435 |
array( 'name' => 'mla_gallery', 'description' => __( 'enhanced version of the WordPress [gallery] shortcode.', 'media-library-assistant' ) . sprintf( ' %1$s <a href="%2$s">%3$s</a>.', __( 'For complete documentation', 'media-library-assistant' ), admin_url( 'options-general.php?page=' . MLACoreOptions::MLA_SETTINGS_SLUG . '-documentation&mla_tab=documentation#mla_gallery' ), __( 'click here', 'media-library-assistant' ) ) ),
|
1436 |
array( 'name' => 'mla_tag_cloud', 'description' => __( 'enhanced version of the WordPress Tag Cloud.', 'media-library-assistant' ) . sprintf( ' %1$s <a href="%2$s">%3$s</a>.', __( 'For complete documentation', 'media-library-assistant' ), admin_url( 'options-general.php?page=' . MLACoreOptions::MLA_SETTINGS_SLUG . '-documentation&mla_tab=documentation#mla_tag_cloud' ), __( 'click here', 'media-library-assistant' ) ) ),
|
1437 |
-
array( 'name' => 'mla_term_list', 'description' => __( 'provides flat or hierarchical lists, dropdown controls and checkbox lists of taxonomy terms.', 'media-library-assistant' ) . sprintf( ' %1$s <a href="%2$s">%3$s</a>.', __( 'For complete documentation', 'media-library-assistant' ), admin_url( 'options-general.php?page=' . MLACoreOptions::MLA_SETTINGS_SLUG . '-documentation&mla_tab=documentation#
|
1438 |
);
|
1439 |
|
1440 |
$shortcode_list = '';
|
@@ -1974,14 +1989,15 @@ class MLASettings {
|
|
1974 |
'mla-optional-uploads-search'
|
1975 |
), $_SERVER['REQUEST_URI'] ) );
|
1976 |
|
1977 |
-
|
1978 |
-
|
1979 |
-
|
1980 |
-
|
1981 |
-
|
1982 |
-
|
1983 |
-
|
1984 |
-
|
|
|
1985 |
|
1986 |
// Create an instance of our package class
|
1987 |
$MLAListUploadTable = new MLA_Upload_Optional_List_Table();
|
@@ -2001,6 +2017,7 @@ class MLASettings {
|
|
2001 |
'results' => ! empty( $_REQUEST['s'] ) ? '<h2 class="alignleft">' . __( 'Displaying search results for', 'media-library-assistant' ) . ': "' . $_REQUEST['s'] . '"</h2>' : '',
|
2002 |
'Search Known MIME' => __( 'Search Known MIME Types', 'media-library-assistant' ),
|
2003 |
's' => isset( $_REQUEST['s'] ) ? $_REQUEST['s'] : '',
|
|
|
2004 |
'To search by' => __( 'To search by extension, use ".", e.g., ".doc"', 'media-library-assistant' ),
|
2005 |
'Cancel' => __( 'Cancel', 'media-library-assistant' ),
|
2006 |
);
|
@@ -2024,7 +2041,7 @@ class MLASettings {
|
|
2024 |
*
|
2025 |
* @since 1.40
|
2026 |
*
|
2027 |
-
* @param
|
2028 |
*
|
2029 |
* @return array 'message' => status/error messages, 'body' => tab content
|
2030 |
*/
|
@@ -2365,7 +2382,7 @@ class MLASettings {
|
|
2365 |
'Go to Style Templates' => sprintf( '%1$s [mla_%2$s] %3$s', __( 'Go to', 'media-library-assistant' ), $shortcode, __( 'Style Templates', 'media-library-assistant' ) ),
|
2366 |
'Go to Markup Templates' => sprintf( '%1$s [mla_%2$s] %3$s', __( 'Go to', 'media-library-assistant' ), $shortcode, __( 'Markup Templates', 'media-library-assistant' ) ),
|
2367 |
);
|
2368 |
-
|
2369 |
$shortcode_jump_rows .= MLAData::mla_parse_template( self::$page_template_array['shortcode-jump-row'], $template_values );
|
2370 |
}
|
2371 |
|
@@ -2441,7 +2458,7 @@ class MLASettings {
|
|
2441 |
* Add style templates by shortcode; defaults go first
|
2442 |
*/
|
2443 |
$style_sections_list = '';
|
2444 |
-
|
2445 |
foreach( MLATemplate_Support::$mla_template_definitions['style'] as $shortcode => $definition ) {
|
2446 |
$templates = MLATemplate_Support::mla_get_style_templates( $definition['slug'] );
|
2447 |
$style_options_list = '';
|
@@ -2450,14 +2467,14 @@ class MLASettings {
|
|
2450 |
if ( !array_key_exists( $default, $templates ) ) {
|
2451 |
continue;
|
2452 |
}
|
2453 |
-
|
2454 |
$value =$templates[ $default ];
|
2455 |
if ( ! empty( $value ) ) {
|
2456 |
$template_values = array (
|
2457 |
'help' => __( 'This default template cannot be altered or deleted, but you can copy the styles.', 'media-library-assistant' )
|
2458 |
);
|
2459 |
$control_cells = MLAData::mla_parse_template( self::$page_template_array['mla-gallery-default'], $template_values );
|
2460 |
-
|
2461 |
$template_values = array (
|
2462 |
'Name' => __( 'Name', 'media-library-assistant' ),
|
2463 |
'name_name' => "mla_style_templates_name[{$shortcode}][{$default}]",
|
@@ -2471,18 +2488,18 @@ class MLASettings {
|
|
2471 |
'value_text' => esc_textarea( $value ),
|
2472 |
'value_help' => $definition['help'],
|
2473 |
);
|
2474 |
-
|
2475 |
$style_options_list .= MLAData::mla_parse_template( self::$page_template_array['mla-gallery-style'], $template_values );
|
2476 |
} // $value
|
2477 |
} // foreach default
|
2478 |
|
2479 |
foreach ( $templates as $name => $value ) {
|
2480 |
$slug = sanitize_title( $name );
|
2481 |
-
|
2482 |
if ( in_array( $name, $definition['default_names'] ) ) {
|
2483 |
continue; // already handled above
|
2484 |
}
|
2485 |
-
|
2486 |
$template_values = array (
|
2487 |
'name' => "mla_style_templates_delete[{$shortcode}][{$slug}]",
|
2488 |
'id' => "mla_style_templates_delete_{$shortcode}_{$slug}",
|
@@ -2490,7 +2507,7 @@ class MLASettings {
|
|
2490 |
'help' => __( 'Check the box to delete this template when you press Update at the bottom of the page.', 'media-library-assistant' )
|
2491 |
);
|
2492 |
$control_cells = MLAData::mla_parse_template( self::$page_template_array['mla-gallery-delete'], $template_values );
|
2493 |
-
|
2494 |
$template_values = array (
|
2495 |
'Name' => __( 'Name', 'media-library-assistant' ),
|
2496 |
'name_name' => "mla_style_templates_name[{$shortcode}][{$slug}]",
|
@@ -2504,10 +2521,10 @@ class MLASettings {
|
|
2504 |
'value_text' => esc_textarea( $value ),
|
2505 |
'value_help' => $definition['help'],
|
2506 |
);
|
2507 |
-
|
2508 |
$style_options_list .= MLAData::mla_parse_template( self::$page_template_array['mla-gallery-style'], $template_values );
|
2509 |
} // foreach $templates
|
2510 |
-
|
2511 |
/*
|
2512 |
* Add blank style template for additions
|
2513 |
*/
|
@@ -2516,7 +2533,7 @@ class MLASettings {
|
|
2516 |
'help' => __( 'Fill in a name and styles to add a new template.', 'media-library-assistant' )
|
2517 |
);
|
2518 |
$control_cells = MLAData::mla_parse_template( self::$page_template_array['mla-gallery-default'], $template_values );
|
2519 |
-
|
2520 |
$template_values = array (
|
2521 |
'Name' => __( 'Name', 'media-library-assistant' ),
|
2522 |
'name_name' => "mla_style_templates_name[{$shortcode}][blank]",
|
@@ -2530,7 +2547,7 @@ class MLASettings {
|
|
2530 |
'value_text' => '',
|
2531 |
'value_help' => $definition['help'],
|
2532 |
);
|
2533 |
-
|
2534 |
$style_options_list .= MLAData::mla_parse_template( self::$page_template_array['mla-gallery-style'], $template_values );
|
2535 |
} // $value
|
2536 |
|
@@ -2548,7 +2565,7 @@ class MLASettings {
|
|
2548 |
|
2549 |
$style_sections_list .= MLAData::mla_parse_template( self::$page_template_array['templates-list'], $template_values );
|
2550 |
} // $shortcode
|
2551 |
-
|
2552 |
$page_values['style_sections_list'] = $style_sections_list;
|
2553 |
|
2554 |
/*
|
@@ -2559,7 +2576,7 @@ class MLASettings {
|
|
2559 |
foreach( MLATemplate_Support::$mla_template_definitions['markup'] as $shortcode => $definition ) {
|
2560 |
$templates = MLATemplate_Support::mla_get_markup_templates( $definition['slug'] );
|
2561 |
$markup_options_list = '';
|
2562 |
-
|
2563 |
$sorted_sections = array();
|
2564 |
foreach( MLATemplate_Support::$mla_template_definitions['markup'][ $shortcode ]['sections'] as $section_slug => $section_definition ) {
|
2565 |
$sorted_sections[ $section_definition['order'] ] = $section_definition;
|
@@ -2571,7 +2588,7 @@ class MLASettings {
|
|
2571 |
if ( !array_key_exists( $default, $templates ) ) {
|
2572 |
continue;
|
2573 |
}
|
2574 |
-
|
2575 |
$value =$templates[ $default ];
|
2576 |
if ( ! empty( $value ) ) {
|
2577 |
$sections_list = '';
|
@@ -2586,10 +2603,10 @@ class MLASettings {
|
|
2586 |
'text' => isset( $value[ $section_slug ] ) ? esc_textarea( $value[ $section_slug ] ) : '',
|
2587 |
'help' => $section_definition['help'],
|
2588 |
);
|
2589 |
-
|
2590 |
$sections_list .= MLAData::mla_parse_template( self::$page_template_array['template-section'], $template_values );
|
2591 |
} // $section
|
2592 |
-
|
2593 |
$template_values = array (
|
2594 |
'help' => __( 'This default template cannot be altered or deleted, but you can copy the markup.', 'media-library-assistant' )
|
2595 |
);
|
@@ -2604,14 +2621,14 @@ class MLASettings {
|
|
2604 |
'control_cells' => $control_cells,
|
2605 |
'sections_list' => $sections_list,
|
2606 |
);
|
2607 |
-
|
2608 |
$markup_options_list .= MLAData::mla_parse_template( self::$page_template_array['mla-gallery-markup'], $template_values );
|
2609 |
} // $value
|
2610 |
} // foreach default
|
2611 |
-
|
2612 |
foreach ( $templates as $name => $value ) {
|
2613 |
$slug = sanitize_title( $name );
|
2614 |
-
|
2615 |
if ( in_array( $name, $definition['default_names'] ) ) {
|
2616 |
continue; // already handled above
|
2617 |
}
|
@@ -2629,10 +2646,10 @@ class MLASettings {
|
|
2629 |
'text' => isset( $value[ $section_slug ] ) ? esc_textarea( $value[ $section_slug ] ) : '',
|
2630 |
'help' => $section_definition['help'],
|
2631 |
);
|
2632 |
-
|
2633 |
$sections_list .= MLAData::mla_parse_template( self::$page_template_array['template-section'], $template_values );
|
2634 |
} // $section
|
2635 |
-
|
2636 |
$template_values = array (
|
2637 |
'name' => "mla_markup_templates_delete[{$shortcode}][{$slug}]",
|
2638 |
'id' => "mla_markup_templates_delete_{$shortcode}_{$slug}",
|
@@ -2650,11 +2667,11 @@ class MLASettings {
|
|
2650 |
'control_cells' => $control_cells,
|
2651 |
'sections_list' => $sections_list,
|
2652 |
);
|
2653 |
-
|
2654 |
$markup_options_list .= MLAData::mla_parse_template( self::$page_template_array['mla-gallery-markup'], $template_values );
|
2655 |
} // $value
|
2656 |
} // foreach $templates
|
2657 |
-
|
2658 |
/*
|
2659 |
* Add blank markup template for additions
|
2660 |
*/
|
@@ -2663,7 +2680,7 @@ class MLASettings {
|
|
2663 |
'help' => __( 'Fill in a name and markup to add a new template.', 'media-library-assistant' )
|
2664 |
);
|
2665 |
$control_cells = MLAData::mla_parse_template( self::$page_template_array['mla-gallery-default'], $template_values );
|
2666 |
-
|
2667 |
$sections_list = '';
|
2668 |
foreach( $sorted_sections as $section_definition ) {
|
2669 |
$section_slug = $section_definition['slug'];
|
@@ -2676,10 +2693,10 @@ class MLASettings {
|
|
2676 |
'text' => '',
|
2677 |
'help' => $section_definition['help'],
|
2678 |
);
|
2679 |
-
|
2680 |
$sections_list .= MLAData::mla_parse_template( self::$page_template_array['template-section'], $template_values );
|
2681 |
} // $section
|
2682 |
-
|
2683 |
$template_values = array (
|
2684 |
'Name' => __( 'Name', 'media-library-assistant' ),
|
2685 |
'name_name' => "mla_markup_templates_name[{$shortcode}][blank]",
|
@@ -2688,7 +2705,7 @@ class MLASettings {
|
|
2688 |
'control_cells' => $control_cells,
|
2689 |
'sections_list' => $sections_list,
|
2690 |
);
|
2691 |
-
|
2692 |
$markup_options_list .= MLAData::mla_parse_template( self::$page_template_array['mla-gallery-markup'], $template_values );
|
2693 |
} // $value
|
2694 |
|
@@ -2706,7 +2723,7 @@ class MLASettings {
|
|
2706 |
|
2707 |
$markup_sections_list .= MLAData::mla_parse_template( self::$page_template_array['templates-list'], $template_values );
|
2708 |
} // $shortcode
|
2709 |
-
|
2710 |
$page_values['markup_sections_list'] = $markup_sections_list;
|
2711 |
|
2712 |
$page_content['body'] = MLAData::mla_parse_template( self::$page_template_array['mla-gallery-tab'], $page_values );
|
@@ -2998,6 +3015,77 @@ class MLASettings {
|
|
2998 |
return $page_content;
|
2999 |
}
|
3000 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3001 |
/**
|
3002 |
* Compose the Documentation tab content for the Settings subpage
|
3003 |
*
|
@@ -3007,17 +3095,122 @@ class MLASettings {
|
|
3007 |
* @return array 'message' => status/error messages, 'body' => tab content
|
3008 |
*/
|
3009 |
private static function _compose_documentation_tab( ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3010 |
$page_template = MLACore::mla_load_template( 'documentation-settings-tab.tpl' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3011 |
$page_values = array(
|
|
|
3012 |
'translate_url' => MLA_PLUGIN_URL . 'languages/MLA Internationalization Guide.pdf',
|
3013 |
'phpDocs_url' => MLA_PLUGIN_URL . 'phpDocs/index.html',
|
3014 |
-
'examples_url' => MLA_PLUGIN_URL . 'examples/'
|
3015 |
);
|
3016 |
|
3017 |
-
|
3018 |
-
|
3019 |
-
'body' => MLAData::mla_parse_template( $page_template['documentation-tab'], $page_values )
|
3020 |
-
);
|
3021 |
}
|
3022 |
|
3023 |
/**
|
@@ -3368,7 +3561,7 @@ class MLASettings {
|
|
3368 |
$this_setting_changed = "checked" == $old_value;
|
3369 |
}
|
3370 |
}
|
3371 |
-
|
3372 |
/*
|
3373 |
* Always update to scrub default settings
|
3374 |
*/
|
@@ -3397,7 +3590,7 @@ class MLASettings {
|
|
3397 |
$templates_changed = false;
|
3398 |
foreach ( $new_names as $shortcode => $template_names ) {
|
3399 |
$definition = MLATemplate_Support::$mla_template_definitions['style'][ $shortcode ];
|
3400 |
-
|
3401 |
foreach ( $template_names as $name => $new_name ) {
|
3402 |
if ( in_array( $name, $definition['default_names'] ) ) {
|
3403 |
continue;
|
@@ -3409,7 +3602,7 @@ class MLASettings {
|
|
3409 |
$templates_changed = true;
|
3410 |
continue;
|
3411 |
}
|
3412 |
-
|
3413 |
$new_slug = sanitize_title( $new_name );
|
3414 |
if ( 'blank' == $name ) {
|
3415 |
if ( '' == $new_slug ) {
|
@@ -3419,7 +3612,7 @@ class MLASettings {
|
|
3419 |
$error_list .= '<br>' . sprintf( __( '%1$s: Reserved name "%2$s", new %3$s discarded.', 'media-library-assistant' ), __( 'ERROR', 'media-library-assistant' ), $new_slug, __( 'Style Template', 'media-library-assistant' ) );
|
3420 |
continue;
|
3421 |
}
|
3422 |
-
|
3423 |
if ( array_key_exists( $new_slug, $old_templates ) ) {
|
3424 |
/* translators: 1: ERROR tag 2: template name 3: template type */
|
3425 |
$error_list .= '<br>' . sprintf( __( '%1$s: Duplicate name "%2$s", new %3$s discarded.', 'media-library-assistant' ), __( 'ERROR', 'media-library-assistant' ), $new_slug, __( 'Style Template', 'media-library-assistant' ) );
|
@@ -3430,7 +3623,7 @@ class MLASettings {
|
|
3430 |
$templates_changed = true;
|
3431 |
}
|
3432 |
} // 'blank' - reserved name
|
3433 |
-
|
3434 |
/*
|
3435 |
* Handle name changes, check for duplicates
|
3436 |
*/
|
@@ -3439,7 +3632,7 @@ class MLASettings {
|
|
3439 |
$error_list .= '<br>' . sprintf( __( '%1$s: Blank %2$s, reverting to "%3$s".', 'media-library-assistant' ), __( 'ERROR', 'media-library-assistant' ), __( 'style template name', 'media-library-assistant' ), $name );
|
3440 |
$new_slug = $name;
|
3441 |
}
|
3442 |
-
|
3443 |
if ( $new_slug != $name ) {
|
3444 |
if ( array_key_exists( $new_slug, $old_templates ) ) {
|
3445 |
/* translators: 1: ERROR tag 2: element name 3: new value 4: old value */
|
@@ -3455,13 +3648,13 @@ class MLASettings {
|
|
3455 |
$templates_changed = true;
|
3456 |
}
|
3457 |
} // name changed
|
3458 |
-
|
3459 |
if ( ( 'blank' != $name ) && ( $new_values[ $shortcode ][ $name ] != $old_templates[ $name ] ) ) {
|
3460 |
/* translators: 1: template type 2: template name */
|
3461 |
$message_list .= '<br>' . sprintf( _x( 'Updating contents of %1$s "%2$s".', 'message_list', 'media-library-assistant' ), __( 'Style Template', 'media-library-assistant' ), $new_slug );
|
3462 |
$templates_changed = true;
|
3463 |
}
|
3464 |
-
|
3465 |
/*
|
3466 |
* Encode shortcode assignment in template content
|
3467 |
*/
|
@@ -3485,14 +3678,14 @@ class MLASettings {
|
|
3485 |
$new_names = $_REQUEST['mla_markup_templates_name'];
|
3486 |
$new_deletes = isset( $_REQUEST['mla_markup_templates_delete'] ) ? $_REQUEST['mla_markup_templates_delete']: array();
|
3487 |
$new_values = stripslashes_deep( $_REQUEST['mla_markup_templates_sections'] );
|
3488 |
-
|
3489 |
/*
|
3490 |
* Build new markup template array, noting changes
|
3491 |
*/
|
3492 |
$templates_changed = false;
|
3493 |
foreach ( $new_names as $shortcode => $template_names ) {
|
3494 |
$definition = MLATemplate_Support::$mla_template_definitions['markup'][ $shortcode ];
|
3495 |
-
|
3496 |
foreach ( $template_names as $name => $new_name ) {
|
3497 |
if ( in_array( $name, $definition['default_names'] ) ) {
|
3498 |
continue;
|
@@ -3504,19 +3697,19 @@ class MLASettings {
|
|
3504 |
$templates_changed = true;
|
3505 |
continue;
|
3506 |
}
|
3507 |
-
|
3508 |
$new_slug = sanitize_title( $new_name );
|
3509 |
if ( 'blank' == $name ) {
|
3510 |
if ( '' == $new_slug ) {
|
3511 |
continue;
|
3512 |
}
|
3513 |
-
|
3514 |
if ( 'blank' == $new_slug ) {
|
3515 |
/* translators: 1: ERROR tag 2: template name 3: template type */
|
3516 |
$error_list .= '<br>' . sprintf( __( '%1$s: Reserved name "%2$s", new %3$s discarded.', 'media-library-assistant' ), __( 'ERROR', 'media-library-assistant' ), $new_slug, __( 'markup template', 'media-library-assistant' ) );
|
3517 |
continue;
|
3518 |
}
|
3519 |
-
|
3520 |
if ( array_key_exists( $new_slug, $old_templates ) ) {
|
3521 |
/* translators: 1: ERROR tag 2: template name 3: template type */
|
3522 |
$error_list .= '<br>' . sprintf( __( '%1$s: Duplicate name "%2$s", new %3$s discarded.', 'media-library-assistant' ), __( 'ERROR', 'media-library-assistant' ), $new_slug, __( 'markup template', 'media-library-assistant' ) );
|
@@ -3527,7 +3720,7 @@ class MLASettings {
|
|
3527 |
$templates_changed = true;
|
3528 |
}
|
3529 |
} // 'blank' - reserved name
|
3530 |
-
|
3531 |
/*
|
3532 |
* Handle name changes, check for duplicates
|
3533 |
*/
|
@@ -3536,7 +3729,7 @@ class MLASettings {
|
|
3536 |
$error_list .= '<br>' . sprintf( __( '%1$s: Blank %2$s, reverting to "%3$s".', 'media-library-assistant' ), __( 'ERROR', 'media-library-assistant' ), __( 'markup template name', 'media-library-assistant' ), $name );
|
3537 |
$new_slug = $name;
|
3538 |
}
|
3539 |
-
|
3540 |
if ( $new_slug != $name ) {
|
3541 |
if ( array_key_exists( $new_slug, $old_templates ) ) {
|
3542 |
/* translators: 1: ERROR tag 2: element name 3: new value 4: old value */
|
@@ -3552,7 +3745,7 @@ class MLASettings {
|
|
3552 |
$templates_changed = true;
|
3553 |
}
|
3554 |
} // name changed
|
3555 |
-
|
3556 |
if ( 'blank' != $name ) {
|
3557 |
foreach ( $new_values[ $shortcode ][ $name ] as $section_name => $section_value ) {
|
3558 |
$old_value = isset( $old_templates[ $name ][ $section_name ] ) ? $old_templates[ $name ][ $section_name ] : '';
|
@@ -3563,7 +3756,7 @@ class MLASettings {
|
|
3563 |
}
|
3564 |
}
|
3565 |
} // ! 'blank'
|
3566 |
-
|
3567 |
/*
|
3568 |
* Encode shortcode assignment in template content
|
3569 |
*/
|
@@ -4310,7 +4503,7 @@ class MLASettings {
|
|
4310 |
$message_list = '';
|
4311 |
$settings = array();
|
4312 |
$stored_count = 0;
|
4313 |
-
|
4314 |
/*
|
4315 |
* These are WordPress options, not MLA options
|
4316 |
*/
|
@@ -4468,7 +4661,7 @@ class MLASettings {
|
|
4468 |
$unchanged_count++;
|
4469 |
$message_list .= "<br>{$key} " . _x( 'unchanged', 'message_list', 'media-library-assistant' );
|
4470 |
}
|
4471 |
-
|
4472 |
if ( 'default' === $value ) {
|
4473 |
$value = '';
|
4474 |
}
|
267 |
public static function mla_deactivation_hook( ) {
|
268 |
$delete_option_settings = 'checked' === MLACore::mla_get_option( MLACoreOptions::MLA_DELETE_OPTION_SETTINGS );
|
269 |
$delete_option_backups = 'checked' === MLACore::mla_get_option( MLACoreOptions::MLA_DELETE_OPTION_BACKUPS );
|
270 |
+
|
271 |
/*
|
272 |
* We only need the uninstall file if one or both options are true,
|
273 |
* otherwise disable it to prevent a false "Delete files and data" warning
|
427 |
'fieldsId' => '#mla-display-settings-custom-field-tab',
|
428 |
'totalItems' => $wpdb->get_var( "SELECT COUNT(*) FROM {$wpdb->posts} WHERE `post_type` = 'attachment'" )
|
429 |
);
|
430 |
+
|
431 |
$script_variables = array_merge( $script_variables, $mapping_variables, $tab_variables );
|
432 |
|
433 |
wp_localize_script( self::JAVASCRIPT_INLINE_MAPPING_CUSTOM_SLUG,
|
446 |
'fieldsId' => '#mla-display-settings-iptc-exif-tab',
|
447 |
'totalItems' => $wpdb->get_var( "SELECT COUNT(*) FROM {$wpdb->posts} WHERE `post_type` = 'attachment' AND ( `post_mime_type` LIKE 'image/%' OR `post_mime_type` LIKE 'application/%pdf%' )" ),
|
448 |
);
|
449 |
+
|
450 |
$script_variables = array_merge( $script_variables, $mapping_variables, $tab_variables );
|
451 |
|
452 |
wp_localize_script( self::JAVASCRIPT_INLINE_MAPPING_IPTC_EXIF_SLUG,
|
525 |
|
526 |
add_screen_option( $option, $args );
|
527 |
} // upload
|
528 |
+
elseif ( 'documentation' == $_REQUEST['mla_tab'] ) {
|
529 |
+
if ( isset( $_REQUEST['mla-example-display'] ) || isset( $_REQUEST['mla-example-search'] ) ) {
|
530 |
+
$option = 'per_page';
|
531 |
+
|
532 |
+
$args = array(
|
533 |
+
'label' => __( 'Plugins per page', 'media-library-assistant' ),
|
534 |
+
'default' => 10,
|
535 |
+
'option' => 'mla_example_plugins_per_page'
|
536 |
+
);
|
537 |
+
|
538 |
+
add_screen_option( $option, $args );
|
539 |
+
}
|
540 |
+
} // documentation
|
541 |
} // isset mla_tab
|
542 |
}
|
543 |
|
552 |
$screen = get_current_screen();
|
553 |
|
554 |
/*
|
555 |
+
* Is this our page and the Views, Uploads or Documentation tab?
|
556 |
*/
|
557 |
+
if ( ! in_array( $screen->id, array( 'settings_page_' . MLACoreOptions::MLA_SETTINGS_SLUG . '-view', 'settings_page_' . MLACoreOptions::MLA_SETTINGS_SLUG . '-upload', 'settings_page_' . MLACoreOptions::MLA_SETTINGS_SLUG . '-documentation' ) ) ) {
|
558 |
return;
|
559 |
}
|
560 |
|
565 |
*/
|
566 |
if ( isset( $_REQUEST['mla-optional-uploads-display'] ) || isset( $_REQUEST['mla-optional-uploads-search'] ) ) {
|
567 |
$file_suffix .= '-optional';
|
568 |
+
} elseif ( isset( $_REQUEST['mla-example-display'] ) || isset( $_REQUEST['mla-example-search'] ) ) {
|
569 |
+
$file_suffix = str_replace( '-documentation', '-example', $file_suffix );
|
570 |
} elseif ( isset( $_REQUEST['mla_admin_action'] ) ) {
|
571 |
switch ( $_REQUEST['mla_admin_action'] ) {
|
572 |
case MLA::MLA_ADMIN_SINGLE_EDIT_DISPLAY:
|
647 |
* @return string|void New value if this is our option, otherwise nothing
|
648 |
*/
|
649 |
public static function mla_set_screen_option_filter( $status, $option, $value ) {
|
650 |
+
if ( in_array( $option, array ( 'mla_views_per_page', 'mla_uploads_per_page', 'mla_types_per_page', 'mla_example_plugins_per_page' ) ) ) {
|
651 |
return $value;
|
652 |
} elseif ( $status ) {
|
653 |
return $status;
|
1030 |
*/
|
1031 |
public static function mla_update_option_row( $key, $value, $option_table = NULL ) {
|
1032 |
$default = MLACore::mla_get_option( $key, true, false, $option_table );
|
1033 |
+
|
1034 |
/*
|
1035 |
* Checkbox logic is done in the switch statements below,
|
1036 |
* custom logic is done in the handler.
|
1046 |
unset( $_REQUEST[ MLA_OPTION_PREFIX . $key ] );
|
1047 |
}
|
1048 |
}
|
1049 |
+
|
1050 |
if ( isset( $_REQUEST[ MLA_OPTION_PREFIX . $key ] ) ) {
|
1051 |
$message = '<br>update_option(' . $key . ")\r\n";
|
1052 |
switch ( $value['type'] ) {
|
1449 |
// array("name" => "shortcode", "description" => "This shortcode...")
|
1450 |
array( 'name' => 'mla_gallery', 'description' => __( 'enhanced version of the WordPress [gallery] shortcode.', 'media-library-assistant' ) . sprintf( ' %1$s <a href="%2$s">%3$s</a>.', __( 'For complete documentation', 'media-library-assistant' ), admin_url( 'options-general.php?page=' . MLACoreOptions::MLA_SETTINGS_SLUG . '-documentation&mla_tab=documentation#mla_gallery' ), __( 'click here', 'media-library-assistant' ) ) ),
|
1451 |
array( 'name' => 'mla_tag_cloud', 'description' => __( 'enhanced version of the WordPress Tag Cloud.', 'media-library-assistant' ) . sprintf( ' %1$s <a href="%2$s">%3$s</a>.', __( 'For complete documentation', 'media-library-assistant' ), admin_url( 'options-general.php?page=' . MLACoreOptions::MLA_SETTINGS_SLUG . '-documentation&mla_tab=documentation#mla_tag_cloud' ), __( 'click here', 'media-library-assistant' ) ) ),
|
1452 |
+
array( 'name' => 'mla_term_list', 'description' => __( 'provides flat or hierarchical lists, dropdown controls and checkbox lists of taxonomy terms.', 'media-library-assistant' ) . sprintf( ' %1$s <a href="%2$s">%3$s</a>.', __( 'For complete documentation', 'media-library-assistant' ), admin_url( 'options-general.php?page=' . MLACoreOptions::MLA_SETTINGS_SLUG . '-documentation&mla_tab=documentation#mla_term_list' ), __( 'click here', 'media-library-assistant' ) ) ),
|
1453 |
);
|
1454 |
|
1455 |
$shortcode_list = '';
|
1989 |
'mla-optional-uploads-search'
|
1990 |
), $_SERVER['REQUEST_URI'] ) );
|
1991 |
|
1992 |
+
/*
|
1993 |
+
* Suppress display of the hidden columns selection list
|
1994 |
+
*/
|
1995 |
+
echo " <style type='text/css'>\r\n";
|
1996 |
+
echo " form#adv-settings div.metabox-prefs,\r\n";
|
1997 |
+
echo " form#adv-settings fieldset.metabox-prefs {\r\n";
|
1998 |
+
echo " display: none;\r\n";
|
1999 |
+
echo " }\r\n";
|
2000 |
+
echo " </style>\r\n";
|
2001 |
|
2002 |
// Create an instance of our package class
|
2003 |
$MLAListUploadTable = new MLA_Upload_Optional_List_Table();
|
2017 |
'results' => ! empty( $_REQUEST['s'] ) ? '<h2 class="alignleft">' . __( 'Displaying search results for', 'media-library-assistant' ) . ': "' . $_REQUEST['s'] . '"</h2>' : '',
|
2018 |
'Search Known MIME' => __( 'Search Known MIME Types', 'media-library-assistant' ),
|
2019 |
's' => isset( $_REQUEST['s'] ) ? $_REQUEST['s'] : '',
|
2020 |
+
'Search Types' => __( 'Search Types', 'media-library-assistant' ),
|
2021 |
'To search by' => __( 'To search by extension, use ".", e.g., ".doc"', 'media-library-assistant' ),
|
2022 |
'Cancel' => __( 'Cancel', 'media-library-assistant' ),
|
2023 |
);
|
2041 |
*
|
2042 |
* @since 1.40
|
2043 |
*
|
2044 |
+
* @param integer MLA Optional Upload MIME Type ID
|
2045 |
*
|
2046 |
* @return array 'message' => status/error messages, 'body' => tab content
|
2047 |
*/
|
2382 |
'Go to Style Templates' => sprintf( '%1$s [mla_%2$s] %3$s', __( 'Go to', 'media-library-assistant' ), $shortcode, __( 'Style Templates', 'media-library-assistant' ) ),
|
2383 |
'Go to Markup Templates' => sprintf( '%1$s [mla_%2$s] %3$s', __( 'Go to', 'media-library-assistant' ), $shortcode, __( 'Markup Templates', 'media-library-assistant' ) ),
|
2384 |
);
|
2385 |
+
|
2386 |
$shortcode_jump_rows .= MLAData::mla_parse_template( self::$page_template_array['shortcode-jump-row'], $template_values );
|
2387 |
}
|
2388 |
|
2458 |
* Add style templates by shortcode; defaults go first
|
2459 |
*/
|
2460 |
$style_sections_list = '';
|
2461 |
+
|
2462 |
foreach( MLATemplate_Support::$mla_template_definitions['style'] as $shortcode => $definition ) {
|
2463 |
$templates = MLATemplate_Support::mla_get_style_templates( $definition['slug'] );
|
2464 |
$style_options_list = '';
|
2467 |
if ( !array_key_exists( $default, $templates ) ) {
|
2468 |
continue;
|
2469 |
}
|
2470 |
+
|
2471 |
$value =$templates[ $default ];
|
2472 |
if ( ! empty( $value ) ) {
|
2473 |
$template_values = array (
|
2474 |
'help' => __( 'This default template cannot be altered or deleted, but you can copy the styles.', 'media-library-assistant' )
|
2475 |
);
|
2476 |
$control_cells = MLAData::mla_parse_template( self::$page_template_array['mla-gallery-default'], $template_values );
|
2477 |
+
|
2478 |
$template_values = array (
|
2479 |
'Name' => __( 'Name', 'media-library-assistant' ),
|
2480 |
'name_name' => "mla_style_templates_name[{$shortcode}][{$default}]",
|
2488 |
'value_text' => esc_textarea( $value ),
|
2489 |
'value_help' => $definition['help'],
|
2490 |
);
|
2491 |
+
|
2492 |
$style_options_list .= MLAData::mla_parse_template( self::$page_template_array['mla-gallery-style'], $template_values );
|
2493 |
} // $value
|
2494 |
} // foreach default
|
2495 |
|
2496 |
foreach ( $templates as $name => $value ) {
|
2497 |
$slug = sanitize_title( $name );
|
2498 |
+
|
2499 |
if ( in_array( $name, $definition['default_names'] ) ) {
|
2500 |
continue; // already handled above
|
2501 |
}
|
2502 |
+
|
2503 |
$template_values = array (
|
2504 |
'name' => "mla_style_templates_delete[{$shortcode}][{$slug}]",
|
2505 |
'id' => "mla_style_templates_delete_{$shortcode}_{$slug}",
|
2507 |
'help' => __( 'Check the box to delete this template when you press Update at the bottom of the page.', 'media-library-assistant' )
|
2508 |
);
|
2509 |
$control_cells = MLAData::mla_parse_template( self::$page_template_array['mla-gallery-delete'], $template_values );
|
2510 |
+
|
2511 |
$template_values = array (
|
2512 |
'Name' => __( 'Name', 'media-library-assistant' ),
|
2513 |
'name_name' => "mla_style_templates_name[{$shortcode}][{$slug}]",
|
2521 |
'value_text' => esc_textarea( $value ),
|
2522 |
'value_help' => $definition['help'],
|
2523 |
);
|
2524 |
+
|
2525 |
$style_options_list .= MLAData::mla_parse_template( self::$page_template_array['mla-gallery-style'], $template_values );
|
2526 |
} // foreach $templates
|
2527 |
+
|
2528 |
/*
|
2529 |
* Add blank style template for additions
|
2530 |
*/
|
2533 |
'help' => __( 'Fill in a name and styles to add a new template.', 'media-library-assistant' )
|
2534 |
);
|
2535 |
$control_cells = MLAData::mla_parse_template( self::$page_template_array['mla-gallery-default'], $template_values );
|
2536 |
+
|
2537 |
$template_values = array (
|
2538 |
'Name' => __( 'Name', 'media-library-assistant' ),
|
2539 |
'name_name' => "mla_style_templates_name[{$shortcode}][blank]",
|
2547 |
'value_text' => '',
|
2548 |
'value_help' => $definition['help'],
|
2549 |
);
|
2550 |
+
|
2551 |
$style_options_list .= MLAData::mla_parse_template( self::$page_template_array['mla-gallery-style'], $template_values );
|
2552 |
} // $value
|
2553 |
|
2565 |
|
2566 |
$style_sections_list .= MLAData::mla_parse_template( self::$page_template_array['templates-list'], $template_values );
|
2567 |
} // $shortcode
|
2568 |
+
|
2569 |
$page_values['style_sections_list'] = $style_sections_list;
|
2570 |
|
2571 |
/*
|
2576 |
foreach( MLATemplate_Support::$mla_template_definitions['markup'] as $shortcode => $definition ) {
|
2577 |
$templates = MLATemplate_Support::mla_get_markup_templates( $definition['slug'] );
|
2578 |
$markup_options_list = '';
|
2579 |
+
|
2580 |
$sorted_sections = array();
|
2581 |
foreach( MLATemplate_Support::$mla_template_definitions['markup'][ $shortcode ]['sections'] as $section_slug => $section_definition ) {
|
2582 |
$sorted_sections[ $section_definition['order'] ] = $section_definition;
|
2588 |
if ( !array_key_exists( $default, $templates ) ) {
|
2589 |
continue;
|
2590 |
}
|
2591 |
+
|
2592 |
$value =$templates[ $default ];
|
2593 |
if ( ! empty( $value ) ) {
|
2594 |
$sections_list = '';
|
2603 |
'text' => isset( $value[ $section_slug ] ) ? esc_textarea( $value[ $section_slug ] ) : '',
|
2604 |
'help' => $section_definition['help'],
|
2605 |
);
|
2606 |
+
|
2607 |
$sections_list .= MLAData::mla_parse_template( self::$page_template_array['template-section'], $template_values );
|
2608 |
} // $section
|
2609 |
+
|
2610 |
$template_values = array (
|
2611 |
'help' => __( 'This default template cannot be altered or deleted, but you can copy the markup.', 'media-library-assistant' )
|
2612 |
);
|
2621 |
'control_cells' => $control_cells,
|
2622 |
'sections_list' => $sections_list,
|
2623 |
);
|
2624 |
+
|
2625 |
$markup_options_list .= MLAData::mla_parse_template( self::$page_template_array['mla-gallery-markup'], $template_values );
|
2626 |
} // $value
|
2627 |
} // foreach default
|
2628 |
+
|
2629 |
foreach ( $templates as $name => $value ) {
|
2630 |
$slug = sanitize_title( $name );
|
2631 |
+
|
2632 |
if ( in_array( $name, $definition['default_names'] ) ) {
|
2633 |
continue; // already handled above
|
2634 |
}
|
2646 |
'text' => isset( $value[ $section_slug ] ) ? esc_textarea( $value[ $section_slug ] ) : '',
|
2647 |
'help' => $section_definition['help'],
|
2648 |
);
|
2649 |
+
|
2650 |
$sections_list .= MLAData::mla_parse_template( self::$page_template_array['template-section'], $template_values );
|
2651 |
} // $section
|
2652 |
+
|
2653 |
$template_values = array (
|
2654 |
'name' => "mla_markup_templates_delete[{$shortcode}][{$slug}]",
|
2655 |
'id' => "mla_markup_templates_delete_{$shortcode}_{$slug}",
|
2667 |
'control_cells' => $control_cells,
|
2668 |
'sections_list' => $sections_list,
|
2669 |
);
|
2670 |
+
|
2671 |
$markup_options_list .= MLAData::mla_parse_template( self::$page_template_array['mla-gallery-markup'], $template_values );
|
2672 |
} // $value
|
2673 |
} // foreach $templates
|
2674 |
+
|
2675 |
/*
|
2676 |
* Add blank markup template for additions
|
2677 |
*/
|
2680 |
'help' => __( 'Fill in a name and markup to add a new template.', 'media-library-assistant' )
|
2681 |
);
|
2682 |
$control_cells = MLAData::mla_parse_template( self::$page_template_array['mla-gallery-default'], $template_values );
|
2683 |
+
|
2684 |
$sections_list = '';
|
2685 |
foreach( $sorted_sections as $section_definition ) {
|
2686 |
$section_slug = $section_definition['slug'];
|
2693 |
'text' => '',
|
2694 |
'help' => $section_definition['help'],
|
2695 |
);
|
2696 |
+
|
2697 |
$sections_list .= MLAData::mla_parse_template( self::$page_template_array['template-section'], $template_values );
|
2698 |
} // $section
|
2699 |
+
|
2700 |
$template_values = array (
|
2701 |
'Name' => __( 'Name', 'media-library-assistant' ),
|
2702 |
'name_name' => "mla_markup_templates_name[{$shortcode}][blank]",
|
2705 |
'control_cells' => $control_cells,
|
2706 |
'sections_list' => $sections_list,
|
2707 |
);
|
2708 |
+
|
2709 |
$markup_options_list .= MLAData::mla_parse_template( self::$page_template_array['mla-gallery-markup'], $template_values );
|
2710 |
} // $value
|
2711 |
|
2723 |
|
2724 |
$markup_sections_list .= MLAData::mla_parse_template( self::$page_template_array['templates-list'], $template_values );
|
2725 |
} // $shortcode
|
2726 |
+
|
2727 |
$page_values['markup_sections_list'] = $markup_sections_list;
|
2728 |
|
2729 |
$page_content['body'] = MLAData::mla_parse_template( self::$page_template_array['mla-gallery-tab'], $page_values );
|
3015 |
return $page_content;
|
3016 |
}
|
3017 |
|
3018 |
+
/**
|
3019 |
+
* Compose the Example Plugin tab content for the Settings/Documentation subpage
|
3020 |
+
*
|
3021 |
+
* @since 2.32
|
3022 |
+
*
|
3023 |
+
* @return array 'message' => status/error messages, 'body' => tab content
|
3024 |
+
*/
|
3025 |
+
private static function _compose_example_tab() {
|
3026 |
+
$page_template_array = MLACore::mla_load_template( 'admin-display-settings-example-tab.tpl' );
|
3027 |
+
|
3028 |
+
/*
|
3029 |
+
* Display the Example Plugin Table
|
3030 |
+
*/
|
3031 |
+
$_SERVER['REQUEST_URI'] = add_query_arg( array( 'mla-example-display' => 'true' ), remove_query_arg( array(
|
3032 |
+
'mla_admin_action',
|
3033 |
+
'mla_item_slug',
|
3034 |
+
'mla_item_ID',
|
3035 |
+
'_wpnonce',
|
3036 |
+
'_wp_http_referer',
|
3037 |
+
'action',
|
3038 |
+
'action2',
|
3039 |
+
'cb_attachment',
|
3040 |
+
'mla-example-search'
|
3041 |
+
), $_SERVER['REQUEST_URI'] ) );
|
3042 |
+
|
3043 |
+
// Create an instance of our package class
|
3044 |
+
$MLAListExampleTable = new MLA_Example_List_Table();
|
3045 |
+
|
3046 |
+
// Fetch, prepare, sort, and filter our data
|
3047 |
+
$MLAListExampleTable->prepare_items();
|
3048 |
+
|
3049 |
+
$page_content = array(
|
3050 |
+
'message' => '',
|
3051 |
+
'body' => ''
|
3052 |
+
);
|
3053 |
+
|
3054 |
+
$page_values = array(
|
3055 |
+
'results' => ! empty( $_REQUEST['s'] ) ? ' - ' . __( 'Displaying search results for', 'media-library-assistant' ) . ': "' . $_REQUEST['s'] . '"' : '',
|
3056 |
+
'In this tab' => __( 'In this tab you can browse the list of MLA example plugins, install or update them in the Plugins/Installed Plugins area and see which examples you have already installed. <strong>To activate, deactivate or delete</strong> the plugins you must go to the Plugins/Installed Plugins admin submenu.' ),
|
3057 |
+
/* translators: 1: Documentation hyperlink */
|
3058 |
+
'You can find' => sprintf( __( 'You can find more information about using the example plugins in the %1$s section of the Documentation or by clicking the <strong>"Help"</strong> tab in the upper-right corner of this screen.', 'media-library-assistant' ), '<a href="[+settingsURL+]?page=mla-settings-menu-documentation&mla_tab=documentation#mla_example_plugins" title="' . __( 'Example plugin documentation', 'media-library-assistant' ) . '">' . __( 'The Example Plugins', 'media-library-assistant' ) . '</a>' ),
|
3059 |
+
'views' => '',
|
3060 |
+
'settingsURL' => admin_url('options-general.php'),
|
3061 |
+
'form_url' => admin_url( 'options-general.php' ) . '?page=mla-settings-menu-documentation&mla_tab=documentation',
|
3062 |
+
'_wpnonce' => wp_nonce_field( MLACore::MLA_ADMIN_NONCE_ACTION, MLACore::MLA_ADMIN_NONCE_NAME, true, false ),
|
3063 |
+
'Example Plugins' => __( 'Example Plugins', 'media-library-assistant' ),
|
3064 |
+
'Search Example Plugins' => __( 'Search Example Plugins', 'media-library-assistant' ),
|
3065 |
+
's' => isset( $_REQUEST['s'] ) ? esc_attr( stripslashes( $_REQUEST['s'] ) ) : '',
|
3066 |
+
'Search Plugins' => __( 'Search Plugins', 'media-library-assistant' ),
|
3067 |
+
'Search help' => __( 'Searches Name, Description, File Name and Tags', 'media-library-assistant' ),
|
3068 |
+
'Cancel' => __( 'Cancel', 'media-library-assistant' ),
|
3069 |
+
);
|
3070 |
+
|
3071 |
+
ob_start();
|
3072 |
+
$MLAListExampleTable->views();
|
3073 |
+
$page_values['views'] = ob_get_contents();
|
3074 |
+
ob_end_clean();
|
3075 |
+
|
3076 |
+
$page_content['body'] = MLAData::mla_parse_template( $page_template_array['before-example-table'], $page_values );
|
3077 |
+
|
3078 |
+
// Now we can render the completed list table
|
3079 |
+
ob_start();
|
3080 |
+
$MLAListExampleTable->display();
|
3081 |
+
$page_content['body'] .= ob_get_contents();
|
3082 |
+
ob_end_clean();
|
3083 |
+
|
3084 |
+
$page_content['body'] .= MLAData::mla_parse_template( $page_template_array['after-example-table'], $page_values );
|
3085 |
+
|
3086 |
+
return $page_content;
|
3087 |
+
}
|
3088 |
+
|
3089 |
/**
|
3090 |
* Compose the Documentation tab content for the Settings subpage
|
3091 |
*
|
3095 |
* @return array 'message' => status/error messages, 'body' => tab content
|
3096 |
*/
|
3097 |
private static function _compose_documentation_tab( ) {
|
3098 |
+
/*
|
3099 |
+
* Untangle confusion between searching, canceling and selecting on the Example Plugins submenu
|
3100 |
+
*/
|
3101 |
+
$bulk_action = self::_current_bulk_action();
|
3102 |
+
if ( isset( $_REQUEST['mla-example-cancel'] ) || $bulk_action && ( $bulk_action == 'install' ) ) {
|
3103 |
+
unset( $_REQUEST['mla-example-search'] );
|
3104 |
+
unset( $_REQUEST['s'] );
|
3105 |
+
}
|
3106 |
+
|
3107 |
+
/*
|
3108 |
+
* Display or Cancel the Example Plugins submenu, if requested
|
3109 |
+
*/
|
3110 |
+
if ( !empty( $_REQUEST['mla-example-search'] ) ) {
|
3111 |
+
check_admin_referer( MLACore::MLA_ADMIN_NONCE_ACTION, MLACore::MLA_ADMIN_NONCE_NAME );
|
3112 |
+
$page_content = self::_compose_example_tab();
|
3113 |
+
} elseif ( !empty( $_REQUEST['mla-example-cancel'] ) ) {
|
3114 |
+
$page_content = array(
|
3115 |
+
'message' => '',
|
3116 |
+
'body' => ''
|
3117 |
+
);
|
3118 |
+
} elseif ( !empty( $_REQUEST['mla-example-display'] ) ) {
|
3119 |
+
if ( 'true' != $_REQUEST['mla-example-display'] ) {
|
3120 |
+
check_admin_referer( MLACore::MLA_ADMIN_NONCE_ACTION, MLACore::MLA_ADMIN_NONCE_NAME );
|
3121 |
+
//unset( $_REQUEST['s'] );
|
3122 |
+
}
|
3123 |
+
$page_content = self::_compose_example_tab();
|
3124 |
+
} else {
|
3125 |
+
$page_content = array(
|
3126 |
+
'message' => '',
|
3127 |
+
'body' => ''
|
3128 |
+
);
|
3129 |
+
}
|
3130 |
+
|
3131 |
+
/*
|
3132 |
+
* Process bulk actions that affect an array of items
|
3133 |
+
*/
|
3134 |
+
if ( $bulk_action && ( $bulk_action != 'none' ) ) {
|
3135 |
+
$bulk_message = '';
|
3136 |
+
if ( isset( $_REQUEST['cb_mla_item_ID'] ) ) {
|
3137 |
+
foreach ( $_REQUEST['cb_mla_item_ID'] as $ID ) {
|
3138 |
+
switch ( $bulk_action ) {
|
3139 |
+
case 'install':
|
3140 |
+
$item_content = MLA_Example_List_Table::mla_install_example_plugin( $ID );
|
3141 |
+
break;
|
3142 |
+
case 'update':
|
3143 |
+
$item_content = MLA_Example_List_Table::mla_update_example_plugin( $ID );
|
3144 |
+
break;
|
3145 |
+
default:
|
3146 |
+
/* translators: 1: bulk_action, e.g., delete, edit, restore, trash */
|
3147 |
+
$item_content = sprintf( __( 'Unknown bulk action %1$s', 'media-library-assistant' ), $bulk_action );
|
3148 |
+
break 2; // Exit the switch and the foreach
|
3149 |
+
;
|
3150 |
+
} // switch ($_REQUEST['mla_admin_action'])
|
3151 |
+
|
3152 |
+
$bulk_message .= $item_content . '<br>';
|
3153 |
+
} // foreach $ID
|
3154 |
+
} // isset cb_attachment
|
3155 |
+
else {
|
3156 |
+
/* translators: 1: action name, e.g., edit */
|
3157 |
+
$bulk_message = sprintf( __( 'Bulk Action %1$s - no items selected.', 'media-library-assistant' ), $bulk_action );
|
3158 |
+
}
|
3159 |
+
|
3160 |
+
$page_content = self::_compose_example_tab();
|
3161 |
+
$page_content['message'] = $bulk_message;
|
3162 |
+
} // $bulk_action
|
3163 |
+
|
3164 |
+
/*
|
3165 |
+
* Process row-level actions that affect a single item
|
3166 |
+
*/
|
3167 |
+
if ( !empty( $_REQUEST['mla_admin_action'] ) ) {
|
3168 |
+
check_admin_referer( MLACore::MLA_ADMIN_NONCE_ACTION, MLACore::MLA_ADMIN_NONCE_NAME );
|
3169 |
+
$action_content = array( 'message' => '' );
|
3170 |
+
if ( empty( $_REQUEST['mla_item_ID'] ) ) {
|
3171 |
+
/* translators: 1: bulk_action, e.g., single_item_delete, single_item_edit */
|
3172 |
+
$action_content['message'] = sprintf( __( 'Empty mla_item_ID - "%1$s"', 'media-library-assistant' ), $_REQUEST['mla_admin_action'] );
|
3173 |
+
} else {
|
3174 |
+
switch ( $_REQUEST['mla_admin_action'] ) {
|
3175 |
+
case MLA::MLA_ADMIN_SINGLE_EDIT_DISPLAY:
|
3176 |
+
$action_content = MLA_Example_List_Table::mla_install_example_plugin( $_REQUEST['mla_item_ID'] );
|
3177 |
+
break;
|
3178 |
+
case MLA::MLA_ADMIN_SINGLE_EDIT_UPDATE:
|
3179 |
+
$action_content = MLA_Example_List_Table::mla_update_example_plugin( $_REQUEST['mla_item_ID'] );
|
3180 |
+
break;
|
3181 |
+
default:
|
3182 |
+
/* translators: 1: bulk_action, e.g., single_item_delete, single_item_edit */
|
3183 |
+
$action_content = sprintf( __( 'Unknown mla_admin_action - "%1$s"', 'media-library-assistant' ), $_REQUEST['mla_admin_action'] );
|
3184 |
+
break;
|
3185 |
+
} // switch ($_REQUEST['mla_admin_action'])
|
3186 |
+
}
|
3187 |
+
|
3188 |
+
$page_content = self::_compose_example_tab();
|
3189 |
+
$page_content['message'] = $action_content;
|
3190 |
+
} // (!empty($_REQUEST['mla_admin_action'])
|
3191 |
+
|
3192 |
+
if ( !empty( $page_content['body'] ) ) {
|
3193 |
+
return $page_content;
|
3194 |
+
}
|
3195 |
+
|
3196 |
$page_template = MLACore::mla_load_template( 'documentation-settings-tab.tpl' );
|
3197 |
+
if ( ! is_array( $page_template ) ) {
|
3198 |
+
/* translators: 1: ERROR tag 2: function name 3: non-array value */
|
3199 |
+
error_log( sprintf( _x( '%1$s: %2$s non-array "%3$s"', 'error_log', 'media-library-assistant' ), __( 'ERROR', 'media-library-assistant' ), 'MLASettings::_compose_documentation_tab', var_export( $page_template, true ) ), 0 );
|
3200 |
+
return '';
|
3201 |
+
}
|
3202 |
+
|
3203 |
+
/*
|
3204 |
+
* Display the Documentation tab
|
3205 |
+
*/
|
3206 |
$page_values = array(
|
3207 |
+
'example_url' => wp_nonce_url( '?page=mla-settings-menu-documentation&mla_tab=documentation&mla-example-search=Search', MLACore::MLA_ADMIN_NONCE_ACTION, MLACore::MLA_ADMIN_NONCE_NAME ),
|
3208 |
'translate_url' => MLA_PLUGIN_URL . 'languages/MLA Internationalization Guide.pdf',
|
3209 |
'phpDocs_url' => MLA_PLUGIN_URL . 'phpDocs/index.html',
|
|
|
3210 |
);
|
3211 |
|
3212 |
+
$page_content['body'] = MLAData::mla_parse_template( $page_template['documentation-tab'], $page_values );
|
3213 |
+
return $page_content;
|
|
|
|
|
3214 |
}
|
3215 |
|
3216 |
/**
|
3561 |
$this_setting_changed = "checked" == $old_value;
|
3562 |
}
|
3563 |
}
|
3564 |
+
|
3565 |
/*
|
3566 |
* Always update to scrub default settings
|
3567 |
*/
|
3590 |
$templates_changed = false;
|
3591 |
foreach ( $new_names as $shortcode => $template_names ) {
|
3592 |
$definition = MLATemplate_Support::$mla_template_definitions['style'][ $shortcode ];
|
3593 |
+
|
3594 |
foreach ( $template_names as $name => $new_name ) {
|
3595 |
if ( in_array( $name, $definition['default_names'] ) ) {
|
3596 |
continue;
|
3602 |
$templates_changed = true;
|
3603 |
continue;
|
3604 |
}
|
3605 |
+
|
3606 |
$new_slug = sanitize_title( $new_name );
|
3607 |
if ( 'blank' == $name ) {
|
3608 |
if ( '' == $new_slug ) {
|
3612 |
$error_list .= '<br>' . sprintf( __( '%1$s: Reserved name "%2$s", new %3$s discarded.', 'media-library-assistant' ), __( 'ERROR', 'media-library-assistant' ), $new_slug, __( 'Style Template', 'media-library-assistant' ) );
|
3613 |
continue;
|
3614 |
}
|
3615 |
+
|
3616 |
if ( array_key_exists( $new_slug, $old_templates ) ) {
|
3617 |
/* translators: 1: ERROR tag 2: template name 3: template type */
|
3618 |
$error_list .= '<br>' . sprintf( __( '%1$s: Duplicate name "%2$s", new %3$s discarded.', 'media-library-assistant' ), __( 'ERROR', 'media-library-assistant' ), $new_slug, __( 'Style Template', 'media-library-assistant' ) );
|
3623 |
$templates_changed = true;
|
3624 |
}
|
3625 |
} // 'blank' - reserved name
|
3626 |
+
|
3627 |
/*
|
3628 |
* Handle name changes, check for duplicates
|
3629 |
*/
|
3632 |
$error_list .= '<br>' . sprintf( __( '%1$s: Blank %2$s, reverting to "%3$s".', 'media-library-assistant' ), __( 'ERROR', 'media-library-assistant' ), __( 'style template name', 'media-library-assistant' ), $name );
|
3633 |
$new_slug = $name;
|
3634 |
}
|
3635 |
+
|
3636 |
if ( $new_slug != $name ) {
|
3637 |
if ( array_key_exists( $new_slug, $old_templates ) ) {
|
3638 |
/* translators: 1: ERROR tag 2: element name 3: new value 4: old value */
|
3648 |
$templates_changed = true;
|
3649 |
}
|
3650 |
} // name changed
|
3651 |
+
|
3652 |
if ( ( 'blank' != $name ) && ( $new_values[ $shortcode ][ $name ] != $old_templates[ $name ] ) ) {
|
3653 |
/* translators: 1: template type 2: template name */
|
3654 |
$message_list .= '<br>' . sprintf( _x( 'Updating contents of %1$s "%2$s".', 'message_list', 'media-library-assistant' ), __( 'Style Template', 'media-library-assistant' ), $new_slug );
|
3655 |
$templates_changed = true;
|
3656 |
}
|
3657 |
+
|
3658 |
/*
|
3659 |
* Encode shortcode assignment in template content
|
3660 |
*/
|
3678 |
$new_names = $_REQUEST['mla_markup_templates_name'];
|
3679 |
$new_deletes = isset( $_REQUEST['mla_markup_templates_delete'] ) ? $_REQUEST['mla_markup_templates_delete']: array();
|
3680 |
$new_values = stripslashes_deep( $_REQUEST['mla_markup_templates_sections'] );
|
3681 |
+
|
3682 |
/*
|
3683 |
* Build new markup template array, noting changes
|
3684 |
*/
|
3685 |
$templates_changed = false;
|
3686 |
foreach ( $new_names as $shortcode => $template_names ) {
|
3687 |
$definition = MLATemplate_Support::$mla_template_definitions['markup'][ $shortcode ];
|
3688 |
+
|
3689 |
foreach ( $template_names as $name => $new_name ) {
|
3690 |
if ( in_array( $name, $definition['default_names'] ) ) {
|
3691 |
continue;
|
3697 |
$templates_changed = true;
|
3698 |
continue;
|
3699 |
}
|
3700 |
+
|
3701 |
$new_slug = sanitize_title( $new_name );
|
3702 |
if ( 'blank' == $name ) {
|
3703 |
if ( '' == $new_slug ) {
|
3704 |
continue;
|
3705 |
}
|
3706 |
+
|
3707 |
if ( 'blank' == $new_slug ) {
|
3708 |
/* translators: 1: ERROR tag 2: template name 3: template type */
|
3709 |
$error_list .= '<br>' . sprintf( __( '%1$s: Reserved name "%2$s", new %3$s discarded.', 'media-library-assistant' ), __( 'ERROR', 'media-library-assistant' ), $new_slug, __( 'markup template', 'media-library-assistant' ) );
|
3710 |
continue;
|
3711 |
}
|
3712 |
+
|
3713 |
if ( array_key_exists( $new_slug, $old_templates ) ) {
|
3714 |
/* translators: 1: ERROR tag 2: template name 3: template type */
|
3715 |
$error_list .= '<br>' . sprintf( __( '%1$s: Duplicate name "%2$s", new %3$s discarded.', 'media-library-assistant' ), __( 'ERROR', 'media-library-assistant' ), $new_slug, __( 'markup template', 'media-library-assistant' ) );
|
3720 |
$templates_changed = true;
|
3721 |
}
|
3722 |
} // 'blank' - reserved name
|
3723 |
+
|
3724 |
/*
|
3725 |
* Handle name changes, check for duplicates
|
3726 |
*/
|
3729 |
$error_list .= '<br>' . sprintf( __( '%1$s: Blank %2$s, reverting to "%3$s".', 'media-library-assistant' ), __( 'ERROR', 'media-library-assistant' ), __( 'markup template name', 'media-library-assistant' ), $name );
|
3730 |
$new_slug = $name;
|
3731 |
}
|
3732 |
+
|
3733 |
if ( $new_slug != $name ) {
|
3734 |
if ( array_key_exists( $new_slug, $old_templates ) ) {
|
3735 |
/* translators: 1: ERROR tag 2: element name 3: new value 4: old value */
|
3745 |
$templates_changed = true;
|
3746 |
}
|
3747 |
} // name changed
|
3748 |
+
|
3749 |
if ( 'blank' != $name ) {
|
3750 |
foreach ( $new_values[ $shortcode ][ $name ] as $section_name => $section_value ) {
|
3751 |
$old_value = isset( $old_templates[ $name ][ $section_name ] ) ? $old_templates[ $name ][ $section_name ] : '';
|
3756 |
}
|
3757 |
}
|
3758 |
} // ! 'blank'
|
3759 |
+
|
3760 |
/*
|
3761 |
* Encode shortcode assignment in template content
|
3762 |
*/
|
4503 |
$message_list = '';
|
4504 |
$settings = array();
|
4505 |
$stored_count = 0;
|
4506 |
+
|
4507 |
/*
|
4508 |
* These are WordPress options, not MLA options
|
4509 |
*/
|
4661 |
$unchanged_count++;
|
4662 |
$message_list .= "<br>{$key} " . _x( 'unchanged', 'message_list', 'media-library-assistant' );
|
4663 |
}
|
4664 |
+
|
4665 |
if ( 'default' === $value ) {
|
4666 |
$value = '';
|
4667 |
}
|
includes/class-mla-shortcode-support.php
CHANGED
@@ -58,7 +58,7 @@ class MLAShortcode_Support {
|
|
58 |
|
59 |
MLACore::mla_debug_add( "MLAShortcode_Support::mla_ghostscript_present( {$ghostscript_only} ) explicit_path = " . var_export( $explicit_path, true ), MLACore::MLA_DEBUG_CATEGORY_THUMBNAIL );
|
60 |
MLACore::mla_debug_add( "MLAShortcode_Support::mla_ghostscript_present( {$ghostscript_only} ) ghostscript_present = " . var_export( $ghostscript_present, true ), MLACore::MLA_DEBUG_CATEGORY_THUMBNAIL );
|
61 |
-
|
62 |
if ( ! $ghostscript_only ) {
|
63 |
if ( isset( $ghostscript_present ) ) {
|
64 |
MLACore::mla_debug_add( '<strong>MLAShortcode_Support::mla_ghostscript_present</strong>, ghostscript_present = ' . var_export( $ghostscript_present, true ), MLACore::MLA_DEBUG_CATEGORY_THUMBNAIL );
|
@@ -190,7 +190,7 @@ class MLAShortcode_Support {
|
|
190 |
if ( ( false !== $break_tag ) && ( ($break_tag + 3) == strlen( $value ) ) ) {
|
191 |
$value = substr( $value, 0, ( strlen( $value ) - 3) );
|
192 |
}
|
193 |
-
|
194 |
if ( is_numeric( $key ) ) {
|
195 |
if ( '/>' !== $value ) {
|
196 |
$new_attr .= $value . ' ';
|
@@ -200,9 +200,9 @@ class MLAShortcode_Support {
|
|
200 |
$new_attr .= $key . '=' . $delimiter . $value . $delimiter . ' ';
|
201 |
}
|
202 |
}
|
203 |
-
|
204 |
$attr = shortcode_parse_atts( $new_attr );
|
205 |
-
|
206 |
/*
|
207 |
* Remove empty values and still-invalid parameters
|
208 |
*/
|
@@ -211,13 +211,13 @@ class MLAShortcode_Support {
|
|
211 |
if ( is_numeric( $key ) || empty( $value ) ) {
|
212 |
continue;
|
213 |
}
|
214 |
-
|
215 |
$new_attr[ $key ] = $value;
|
216 |
}
|
217 |
-
|
218 |
$attr = $new_attr;
|
219 |
} // not_valid
|
220 |
-
|
221 |
/*
|
222 |
* Look for parameters in an enclosing shortcode
|
223 |
*/
|
@@ -226,7 +226,7 @@ class MLAShortcode_Support {
|
|
226 |
$new_attr = shortcode_parse_atts( $content );
|
227 |
$attr = array_merge( $attr, $new_attr );
|
228 |
}
|
229 |
-
|
230 |
return $attr;
|
231 |
}
|
232 |
|
@@ -306,7 +306,7 @@ class MLAShortcode_Support {
|
|
306 |
$attr[ $mla_page_parameter ] = $_REQUEST[ $mla_page_parameter ];
|
307 |
}
|
308 |
}
|
309 |
-
|
310 |
/*
|
311 |
* These are the parameters for gallery display
|
312 |
*/
|
@@ -374,7 +374,7 @@ class MLAShortcode_Support {
|
|
374 |
'icontag' => $html5 ? 'div' : 'dt',
|
375 |
'captiontag' => $html5 ? 'figcaption' : 'dd',
|
376 |
'columns' => MLACore::mla_get_option('mla_gallery_columns'),
|
377 |
-
'link' => 'permalink', // or 'post'
|
378 |
// Photonic-specific
|
379 |
'id' => NULL,
|
380 |
'style' => NULL,
|
@@ -415,8 +415,10 @@ class MLAShortcode_Support {
|
|
415 |
'page_status' => $post->post_status,
|
416 |
'page_name' => $post->post_name,
|
417 |
'page_modified' => $post->post_modified,
|
|
|
418 |
'page_guid' => $post->guid,
|
419 |
'page_type' => $post->post_type,
|
|
|
420 |
'page_url' => get_page_link(),
|
421 |
);
|
422 |
|
@@ -428,7 +430,7 @@ class MLAShortcode_Support {
|
|
428 |
if ( !empty( $arguments ) ) {
|
429 |
$attr = wp_parse_args( $attr, self::_validate_attributes( array(), $arguments ) );
|
430 |
}
|
431 |
-
|
432 |
/*
|
433 |
* Look for page-level, 'request:' and 'query:' substitution parameters,
|
434 |
* which can be added to any input parameter
|
@@ -455,7 +457,7 @@ class MLAShortcode_Support {
|
|
455 |
$content = apply_filters( 'mla_gallery_initial_content', $content, $attr );
|
456 |
$arguments = shortcode_atts( $default_arguments, $attr );
|
457 |
$arguments = apply_filters( 'mla_gallery_arguments', $arguments );
|
458 |
-
|
459 |
/*
|
460 |
* Look for "no effect" alternate gallery shortcode to support plugins such as Justified Image Grid
|
461 |
*/
|
@@ -480,13 +482,17 @@ class MLAShortcode_Support {
|
|
480 |
* Determine output type
|
481 |
*/
|
482 |
$output_parameters = array_map( 'strtolower', array_map( 'trim', explode( ',', $arguments['mla_output'] ) ) );
|
|
|
|
|
|
|
|
|
483 |
$is_gallery = 'gallery' == $output_parameters[0];
|
484 |
$is_pagination = in_array( $output_parameters[0], array( 'previous_page', 'next_page', 'paginate_links' ) );
|
485 |
|
486 |
if ( $is_pagination && ( NULL !== $arguments['mla_paginate_rows'] ) ) {
|
487 |
$attachments['found_rows'] = absint( $arguments['mla_paginate_rows'] );
|
488 |
} else {
|
489 |
-
$attachments = self::mla_get_shortcode_attachments( $post->ID, $attr, $is_pagination );
|
490 |
}
|
491 |
|
492 |
if ( is_string( $attachments ) ) {
|
@@ -505,6 +511,24 @@ class MLAShortcode_Support {
|
|
505 |
return $output;
|
506 |
} // empty $attachments
|
507 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
508 |
/*
|
509 |
* Look for user-specified alternate gallery shortcode
|
510 |
*/
|
@@ -537,20 +561,20 @@ class MLAShortcode_Support {
|
|
537 |
*/
|
538 |
$mla_alt_ids_value = is_null( $arguments['mla_alt_ids_value'] ) ? NULL : str_replace( '{+', '[+', str_replace( '+}', '+]', $arguments['mla_alt_ids_value'] ) );
|
539 |
$mla_alt_shortcode_ids = array();
|
540 |
-
|
541 |
if ( is_null( $mla_alt_ids_value ) ) {
|
542 |
foreach ( $attachments as $value ) {
|
543 |
$mla_alt_shortcode_ids[] = $value->ID;
|
544 |
} // foreach $attachments
|
545 |
-
|
546 |
$mla_alt_shortcode_ids = $arguments['mla_alt_ids_name'] . '="' . implode( ',', $mla_alt_shortcode_ids ) . '"';
|
547 |
-
|
548 |
if ( self::$mla_debug ) {
|
549 |
$output = MLACore::mla_debug_flush();
|
550 |
} else {
|
551 |
$output = '';
|
552 |
}
|
553 |
-
|
554 |
/*
|
555 |
* Execute the alternate gallery shortcode with the new parameters
|
556 |
*/
|
@@ -700,7 +724,10 @@ class MLAShortcode_Support {
|
|
700 |
'itemwidth' => $width_string,
|
701 |
'margin' => $margin_string,
|
702 |
'float' => $float,
|
703 |
-
'size_class' => sanitize_html_class( $size_class )
|
|
|
|
|
|
|
704 |
) );
|
705 |
|
706 |
$style_template = $gallery_style = '';
|
@@ -823,7 +850,7 @@ class MLAShortcode_Support {
|
|
823 |
*/
|
824 |
$markup_values = apply_filters( 'mla_gallery_open_values', $markup_values );
|
825 |
|
826 |
-
if ($is_gallery ) {
|
827 |
//$markup_values = apply_filters( 'mla_gallery_open_values', $markup_values );
|
828 |
|
829 |
$open_template = apply_filters( 'mla_gallery_open_template', $open_template );
|
@@ -836,19 +863,13 @@ class MLAShortcode_Support {
|
|
836 |
$gallery_open = apply_filters( 'mla_gallery_open_parse', $gallery_open, $open_template, $markup_values );
|
837 |
$output .= apply_filters( 'mla_gallery_style', $gallery_style . $gallery_open, $style_values, $markup_values, $style_template, $open_template );
|
838 |
} else {
|
839 |
-
if ( ! isset( $attachments['found_rows'] ) ) {
|
840 |
-
$attachments['found_rows'] = 0;
|
841 |
-
}
|
842 |
-
|
843 |
/*
|
844 |
* Handle 'previous_page', 'next_page', and 'paginate_links'
|
845 |
*/
|
846 |
-
$pagination_result = self::_process_pagination_output_types( $output_parameters, $markup_values, $arguments, $attr, $
|
847 |
if ( false !== $pagination_result ) {
|
848 |
return $pagination_result;
|
849 |
}
|
850 |
-
|
851 |
-
unset( $attachments['found_rows'] );
|
852 |
}
|
853 |
|
854 |
/*
|
@@ -865,36 +886,41 @@ class MLAShortcode_Support {
|
|
865 |
$is_wrap = isset( $output_parameters[1] ) && 'wrap' == $output_parameters[1];
|
866 |
$current_id = empty( $arguments['id'] ) ? $markup_values['id'] : $arguments['id'];
|
867 |
|
|
|
868 |
foreach ( $attachments as $id => $attachment ) {
|
869 |
if ( $attachment->ID == $current_id ) {
|
870 |
break;
|
871 |
}
|
|
|
|
|
872 |
}
|
873 |
|
874 |
-
switch ( $link_type ) {
|
875 |
-
case 'previous_link':
|
876 |
-
$target_id = $id - 1;
|
877 |
-
break;
|
878 |
-
case 'next_link':
|
879 |
-
$target_id = $id + 1;
|
880 |
-
break;
|
881 |
-
case 'current_link':
|
882 |
-
default:
|
883 |
-
$target_id = $id;
|
884 |
-
} // link_type
|
885 |
-
|
886 |
$target = NULL;
|
887 |
-
if ( isset( $
|
888 |
-
$target = $attachments[ $target_id ];
|
889 |
-
} elseif ( $is_wrap ) {
|
890 |
switch ( $link_type ) {
|
891 |
case 'previous_link':
|
892 |
-
$
|
893 |
break;
|
894 |
case 'next_link':
|
895 |
-
$
|
|
|
|
|
|
|
|
|
896 |
} // link_type
|
897 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
898 |
|
899 |
if ( isset( $target ) ) {
|
900 |
$attachments = array( $target );
|
@@ -914,7 +940,7 @@ class MLAShortcode_Support {
|
|
914 |
/*
|
915 |
* fill in item-specific elements
|
916 |
*/
|
917 |
-
$item_values['index'] = (string) 1 + $column_index;
|
918 |
$item_values['last_in_row'] = '';
|
919 |
|
920 |
$item_values['excerpt'] = wptexturize( $attachment->post_excerpt );
|
@@ -946,17 +972,6 @@ class MLAShortcode_Support {
|
|
946 |
$item_values['caption'] = '';
|
947 |
$item_values['captiontag_content'] = '';
|
948 |
|
949 |
-
$item_values['pagelink'] = '';
|
950 |
-
$item_values['filelink'] = '';
|
951 |
-
$item_values['link'] = '';
|
952 |
-
$item_values['pagelink_url'] = '';
|
953 |
-
$item_values['filelink_url'] = '';
|
954 |
-
$item_values['link_url'] = '';
|
955 |
-
$item_values['thumbnail_content'] = '';
|
956 |
-
$item_values['thumbnail_width'] = '';
|
957 |
-
$item_values['thumbnail_height'] = '';
|
958 |
-
$item_values['thumbnail_url'] = '';
|
959 |
-
|
960 |
$user = get_user_by( 'id', $attachment->post_author );
|
961 |
if ( isset( $user->data->display_name ) ) {
|
962 |
$item_values['author'] = wptexturize( $user->data->display_name );
|
@@ -1079,6 +1094,7 @@ class MLAShortcode_Support {
|
|
1079 |
$item_values['pagelink'] = sprintf( '<a href=\'%1$s\'>%2$s</a>', $attachment->guid, $attachment->post_title );
|
1080 |
$item_values['filelink'] = sprintf( '<a href=\'%1$s\'>%2$s</a>', get_permalink( $attachment->ID ), $attachment->post_title );
|
1081 |
}
|
|
|
1082 |
if ( in_array( $attachment->post_mime_type, array( 'image/svg+xml' ) ) ) {
|
1083 |
$registered_dimensions = self::_registered_dimensions();
|
1084 |
if ( isset( $registered_dimensions[ $size_class ] ) ) {
|
@@ -1221,6 +1237,23 @@ class MLAShortcode_Support {
|
|
1221 |
}
|
1222 |
} // process <img> tag
|
1223 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1224 |
switch ( $arguments['link'] ) {
|
1225 |
case 'permalink':
|
1226 |
case 'post':
|
@@ -1230,6 +1263,9 @@ class MLAShortcode_Support {
|
|
1230 |
case 'full':
|
1231 |
$item_values['link'] = $item_values['filelink'];
|
1232 |
break;
|
|
|
|
|
|
|
1233 |
default:
|
1234 |
$item_values['link'] = $item_values['filelink'];
|
1235 |
|
@@ -1259,6 +1295,13 @@ class MLAShortcode_Support {
|
|
1259 |
$item_values['filelink_url'] = '';
|
1260 |
}
|
1261 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1262 |
$match_count = preg_match_all( '#href=\'([^\']+)\'#', $item_values['link'], $matches, PREG_OFFSET_CAPTURE );
|
1263 |
if ( ! ( ( $match_count == false ) || ( $match_count == 0 ) ) ) {
|
1264 |
$item_values['link_url'] = $matches[1][0][0];
|
@@ -1307,7 +1350,7 @@ class MLAShortcode_Support {
|
|
1307 |
*/
|
1308 |
$feature = get_the_post_thumbnail( $attachment->ID, $size, array( 'class' => 'attachment-thumbnail' ) );
|
1309 |
$feature = apply_filters( 'mla_gallery_featured_image', $feature, $attachment, $size, $item_values );
|
1310 |
-
|
1311 |
if ( ! empty( $feature ) ) {
|
1312 |
$match_count = preg_match_all( '# width=\"([^\"]+)\" height=\"([^\"]+)\" src=\"([^\"]+)\" #', $feature, $matches, PREG_OFFSET_CAPTURE );
|
1313 |
if ( ! ( ( $match_count == false ) || ( $match_count == 0 ) ) ) {
|
@@ -1447,9 +1490,11 @@ class MLAShortcode_Support {
|
|
1447 |
if ( false === strpos( $link_attributes, 'title=' ) ) {
|
1448 |
$item_values['pagelink'] = sprintf( '<a %1$shref="%2$s" title="%3$s">%4$s</a>', $link_attributes, $item_values['pagelink_url'], $rollover_text, $item_values['thumbnail_content'] );
|
1449 |
$item_values['filelink'] = sprintf( '<a %1$shref="%2$s" title="%3$s">%4$s</a>', $link_attributes, $item_values['filelink_url'], $rollover_text, $item_values['thumbnail_content'] );
|
|
|
1450 |
} else {
|
1451 |
$item_values['pagelink'] = sprintf( '<a %1$shref="%2$s">%3$s</a>', $link_attributes, $item_values['pagelink_url'], $item_values['thumbnail_content'] );
|
1452 |
$item_values['filelink'] = sprintf( '<a %1$shref="%2$s">%3$s</a>', $link_attributes, $item_values['filelink_url'], $item_values['thumbnail_content'] );
|
|
|
1453 |
}
|
1454 |
if ( ! empty( $link_href ) ) {
|
1455 |
$item_values['link'] = sprintf( '<a %1$shref="%2$s" title="%3$s">%4$s</a>', $link_attributes, $link_href, $rollover_text, $item_values['thumbnail_content'] );
|
@@ -1457,6 +1502,8 @@ class MLAShortcode_Support {
|
|
1457 |
$item_values['link'] = $item_values['pagelink'];
|
1458 |
} elseif ( 'file' == $arguments['link'] ) {
|
1459 |
$item_values['link'] = $item_values['filelink'];
|
|
|
|
|
1460 |
} elseif ( 'span' == $arguments['link'] ) {
|
1461 |
$item_values['link'] = sprintf( '<a %1$s>%2$s</a>', $link_attributes, $item_values['thumbnail_content'] );
|
1462 |
} else {
|
@@ -1714,7 +1761,7 @@ class MLAShortcode_Support {
|
|
1714 |
$template = $arguments['mla_markup'];
|
1715 |
} else {
|
1716 |
$output_parameters = array_map( 'strtolower', array_map( 'trim', explode( ',', $arguments['mla_output'] ) ) );
|
1717 |
-
|
1718 |
if ( 'grid' == $output_parameters[0] ) {
|
1719 |
$template = MLACore::mla_get_option('default_tag_cloud_markup');
|
1720 |
} elseif ( in_array( $output_parameters[0], array( 'list', 'ulist', 'olist', 'dlist' ) ) ) {
|
@@ -1723,15 +1770,19 @@ class MLAShortcode_Support {
|
|
1723 |
} else {
|
1724 |
$template = 'tag-cloud-ul';
|
1725 |
}
|
|
|
|
|
1726 |
}
|
1727 |
}
|
1728 |
|
1729 |
/*
|
1730 |
* Apply default arguments set in the markup template
|
1731 |
*/
|
1732 |
-
|
1733 |
-
|
1734 |
-
|
|
|
|
|
1735 |
}
|
1736 |
|
1737 |
/*
|
@@ -1820,11 +1871,11 @@ class MLAShortcode_Support {
|
|
1820 |
if ( empty( $attr['itemtag'] ) ) {
|
1821 |
$arguments['itemtag'] = 'dl';
|
1822 |
}
|
1823 |
-
|
1824 |
if ( empty( $attr['termtag'] ) ) {
|
1825 |
$arguments['termtag'] = 'dt';
|
1826 |
}
|
1827 |
-
|
1828 |
if ( empty( $attr['captiontag'] ) ) {
|
1829 |
$arguments['captiontag'] = 'dd';
|
1830 |
}
|
@@ -1841,7 +1892,7 @@ class MLAShortcode_Support {
|
|
1841 |
$default_markup = 'tag-cloud-ul';
|
1842 |
$arguments['termtag'] = 'li';
|
1843 |
$arguments['captiontag'] = '';
|
1844 |
-
|
1845 |
switch ( $output_parameters[0] ) {
|
1846 |
case 'ulist':
|
1847 |
$arguments['itemtag'] = 'ul';
|
@@ -1920,7 +1971,7 @@ class MLAShortcode_Support {
|
|
1920 |
if ( self::$mla_debug ) {
|
1921 |
MLACore::mla_debug_add( '<strong>' . __( 'mla_debug empty cloud', 'media-library-assistant' ) . '</strong>, query = ' . var_export( $arguments, true ) );
|
1922 |
$cloud = MLACore::mla_debug_flush();
|
1923 |
-
|
1924 |
if ( '<p></p>' == $cloud ) {
|
1925 |
$cloud = '';
|
1926 |
}
|
@@ -1988,11 +2039,11 @@ class MLAShortcode_Support {
|
|
1988 |
if ( 'array' == $arguments['mla_output'] ) {
|
1989 |
return array( $cloud );
|
1990 |
}
|
1991 |
-
|
1992 |
if ( empty($arguments['echo']) ) {
|
1993 |
return $cloud;
|
1994 |
}
|
1995 |
-
|
1996 |
echo $cloud;
|
1997 |
return;
|
1998 |
}
|
@@ -2345,7 +2396,10 @@ class MLAShortcode_Support {
|
|
2345 |
}
|
2346 |
|
2347 |
if ( ! empty( $arguments['mla_link_class'] ) ) {
|
2348 |
-
$
|
|
|
|
|
|
|
2349 |
}
|
2350 |
|
2351 |
$item_values['link_attributes'] = $link_attributes;
|
@@ -2549,11 +2603,11 @@ class MLAShortcode_Support {
|
|
2549 |
} else {
|
2550 |
$open_template = false;
|
2551 |
}
|
2552 |
-
|
2553 |
if ( false === $open_template ) {
|
2554 |
$open_template = MLATemplate_support::mla_fetch_custom_template( $markup_values['mla_markup'], 'term-list', 'markup', 'open' );
|
2555 |
}
|
2556 |
-
|
2557 |
/*
|
2558 |
* Fall back to default template if no Open section
|
2559 |
*/
|
@@ -2565,7 +2619,7 @@ class MLAShortcode_Support {
|
|
2565 |
} else {
|
2566 |
$open_template = false;
|
2567 |
}
|
2568 |
-
|
2569 |
if ( false === $open_template ) {
|
2570 |
$open_template = MLATemplate_support::mla_fetch_custom_template( $default_markup, 'term-list', 'markup', 'open' );
|
2571 |
}
|
@@ -2580,11 +2634,11 @@ class MLAShortcode_Support {
|
|
2580 |
} else {
|
2581 |
$item_template = false;
|
2582 |
}
|
2583 |
-
|
2584 |
if ( false === $item_template ) {
|
2585 |
$item_template = MLATemplate_support::mla_fetch_custom_template( $markup_values['mla_markup'], 'term-list', 'markup', 'item' );
|
2586 |
}
|
2587 |
-
|
2588 |
if ( empty( $item_template ) ) {
|
2589 |
$item_template = '';
|
2590 |
}
|
@@ -2594,11 +2648,11 @@ class MLAShortcode_Support {
|
|
2594 |
} else {
|
2595 |
$close_template = false;
|
2596 |
}
|
2597 |
-
|
2598 |
if ( false === $close_template ) {
|
2599 |
$close_template = MLATemplate_support::mla_fetch_custom_template( $markup_values['mla_markup'], 'term-list', 'markup', 'close' );
|
2600 |
}
|
2601 |
-
|
2602 |
if ( empty( $close_template ) ) {
|
2603 |
$close_template = '';
|
2604 |
}
|
@@ -2609,7 +2663,7 @@ class MLAShortcode_Support {
|
|
2609 |
*/
|
2610 |
$new_text = $open_template . $close_template;
|
2611 |
$markup_values = MLAData::mla_expand_field_level_parameters( $new_text, $attr, $markup_values );
|
2612 |
-
|
2613 |
$markup_values = apply_filters( 'mla_term_list_open_values', $markup_values );
|
2614 |
$open_template = apply_filters( 'mla_term_list_open_template', $open_template );
|
2615 |
if ( empty( $open_template ) ) {
|
@@ -2617,14 +2671,14 @@ class MLAShortcode_Support {
|
|
2617 |
} else {
|
2618 |
$gallery_open = MLAData::mla_parse_template( $open_template, $markup_values );
|
2619 |
}
|
2620 |
-
|
2621 |
$list .= apply_filters( 'mla_term_list_open_parse', $gallery_open, $open_template, $markup_values );
|
2622 |
}
|
2623 |
} // is_list
|
2624 |
|
2625 |
foreach ( $terms as $key => $term ) {
|
2626 |
$item_values = $markup_values;
|
2627 |
-
|
2628 |
/*
|
2629 |
* fill in item-specific elements
|
2630 |
*/
|
@@ -2673,7 +2727,7 @@ class MLAShortcode_Support {
|
|
2673 |
}
|
2674 |
}
|
2675 |
}
|
2676 |
-
|
2677 |
/*
|
2678 |
* Add item_specific field-level substitution parameters
|
2679 |
*/
|
@@ -2766,7 +2820,7 @@ class MLAShortcode_Support {
|
|
2766 |
} else {
|
2767 |
$pad = '';
|
2768 |
}
|
2769 |
-
|
2770 |
if ( empty( $arguments['mla_option_text'] ) ) {
|
2771 |
$item_values['thelabel'] = $pad . $item_values['link_text'];
|
2772 |
} else {
|
@@ -2780,7 +2834,7 @@ class MLAShortcode_Support {
|
|
2780 |
}
|
2781 |
|
2782 |
$item_values['popular'] = ''; // TODO Calculate 'term-list-popular'
|
2783 |
-
|
2784 |
if ( $item_values['current_item_class'] == $arguments['current_item_class'] ) {
|
2785 |
if ( $is_dropdown ) {
|
2786 |
$item_values['selected'] = 'selected=selected';
|
@@ -2850,7 +2904,7 @@ class MLAShortcode_Support {
|
|
2850 |
'mla_link_text' => '',
|
2851 |
'mla_rollover_text' => '',
|
2852 |
'mla_caption' => '',
|
2853 |
-
|
2854 |
'mla_option_text' => '',
|
2855 |
'mla_option_value' => '',
|
2856 |
);
|
@@ -3007,7 +3061,7 @@ class MLAShortcode_Support {
|
|
3007 |
$template = $arguments['mla_markup'];
|
3008 |
} else {
|
3009 |
$output_parameters = array_map( 'strtolower', array_map( 'trim', explode( ',', $arguments['mla_output'] ) ) );
|
3010 |
-
|
3011 |
if ( in_array( $output_parameters[0], array( 'list', 'ulist', 'olist', 'dlist' ) ) ) {
|
3012 |
if ( ( 'dlist' == $output_parameters[0] ) || ('list' == $output_parameters[0] && 'dd' == $arguments['captiontag'] ) ) {
|
3013 |
$template = 'term-list-dl';
|
@@ -3020,7 +3074,7 @@ class MLAShortcode_Support {
|
|
3020 |
$template = 'term-list-checklist';
|
3021 |
}
|
3022 |
}
|
3023 |
-
|
3024 |
/*
|
3025 |
* Apply default arguments set in the markup template
|
3026 |
*/
|
@@ -3108,7 +3162,7 @@ class MLAShortcode_Support {
|
|
3108 |
$output_parameters = array_map( 'strtolower', array_map( 'trim', explode( ',', $arguments['mla_output'] ) ) );
|
3109 |
|
3110 |
if ( $is_list = in_array( $output_parameters[0], array( 'list', 'ulist', 'olist', 'dlist' ) ) ) {
|
3111 |
-
$default_style = '
|
3112 |
|
3113 |
if ( 'list' == $output_parameters[0] && 'dd' == $arguments['captiontag'] ) {
|
3114 |
$default_markup = 'term-list-dl';
|
@@ -3118,7 +3172,7 @@ class MLAShortcode_Support {
|
|
3118 |
$default_markup = 'term-list-ul';
|
3119 |
$arguments['termtag'] = 'li';
|
3120 |
$arguments['captiontag'] = '';
|
3121 |
-
|
3122 |
switch ( $output_parameters[0] ) {
|
3123 |
case 'ulist':
|
3124 |
$arguments['itemtag'] = 'ul';
|
@@ -3147,7 +3201,7 @@ class MLAShortcode_Support {
|
|
3147 |
}
|
3148 |
|
3149 |
if ( $is_dropdown = 'dropdown' == $output_parameters[0] ) {
|
3150 |
-
$default_style = '
|
3151 |
$default_markup = 'term-list-dropdown';
|
3152 |
$arguments['itemtag'] = 'select';
|
3153 |
$arguments['termtag'] = 'option';
|
@@ -3162,7 +3216,7 @@ class MLAShortcode_Support {
|
|
3162 |
}
|
3163 |
|
3164 |
if ( $is_checklist = 'checklist' == $output_parameters[0] ) {
|
3165 |
-
$default_style = '
|
3166 |
$default_markup = 'term-list-checklist';
|
3167 |
$arguments['termtag'] = 'li';
|
3168 |
|
@@ -3176,7 +3230,7 @@ class MLAShortcode_Support {
|
|
3176 |
}
|
3177 |
|
3178 |
$is_hierarchical = !empty( $arguments['hierarchical'] ) && ( 'true' == strtolower( $arguments['hierarchical'] ) );
|
3179 |
-
|
3180 |
/*
|
3181 |
* Convert lists to arrays
|
3182 |
*/
|
@@ -3199,7 +3253,7 @@ class MLAShortcode_Support {
|
|
3199 |
} else {
|
3200 |
$exclude_later = NULL;
|
3201 |
}
|
3202 |
-
|
3203 |
$tags = self::mla_get_terms( $arguments );
|
3204 |
if ( !empty( $exclude_later ) ) {
|
3205 |
$arguments['exclude'] = $exclude_later;
|
@@ -3238,7 +3292,7 @@ class MLAShortcode_Support {
|
|
3238 |
if ( self::$mla_debug ) {
|
3239 |
MLACore::mla_debug_add( '<strong>' . __( 'mla_debug empty list', 'media-library-assistant' ) . '</strong>, query = ' . var_export( $arguments, true ) );
|
3240 |
$list = MLACore::mla_debug_flush();
|
3241 |
-
|
3242 |
if ( '<p></p>' == $list ) {
|
3243 |
$list = '';
|
3244 |
}
|
@@ -3248,7 +3302,7 @@ class MLAShortcode_Support {
|
|
3248 |
|
3249 |
if ( 'array' == $arguments['mla_output'] ) {
|
3250 |
$list .= $arguments['mla_nolink_text'];
|
3251 |
-
|
3252 |
if ( empty( $list ) ) {
|
3253 |
return array();
|
3254 |
} else {
|
@@ -3286,7 +3340,7 @@ class MLAShortcode_Support {
|
|
3286 |
if ( empty($arguments['echo']) ) {
|
3287 |
return $list;
|
3288 |
}
|
3289 |
-
|
3290 |
echo $list;
|
3291 |
return;
|
3292 |
}
|
@@ -3300,18 +3354,18 @@ class MLAShortcode_Support {
|
|
3300 |
|
3301 |
if ( $is_hierarchical ) {
|
3302 |
$tags = self::_get_term_tree( $tags, $arguments );
|
3303 |
-
|
3304 |
if ( is_wp_error( $tags ) ) {
|
3305 |
$list = '<strong>' . __( 'ERROR', 'media-library-assistant' ) . ': ' . $tags->get_error_message() . '</strong>, ' . $tags->get_error_data( $tags->get_error_code() );
|
3306 |
|
3307 |
if ( 'array' == $arguments['mla_output'] ) {
|
3308 |
return array( $list );
|
3309 |
}
|
3310 |
-
|
3311 |
if ( empty($arguments['echo']) ) {
|
3312 |
return $list;
|
3313 |
}
|
3314 |
-
|
3315 |
echo $list;
|
3316 |
return;
|
3317 |
}
|
@@ -3332,22 +3386,22 @@ class MLAShortcode_Support {
|
|
3332 |
$link = get_term_link( intval($tag->term_id), $tag->taxonomy );
|
3333 |
$tags[ $key ]->term_link = $link;
|
3334 |
}
|
3335 |
-
|
3336 |
if ( is_wp_error( $link ) ) {
|
3337 |
$list = '<strong>' . __( 'ERROR', 'media-library-assistant' ) . ': ' . $link->get_error_message() . '</strong>, ' . $link->get_error_data( $link->get_error_code() );
|
3338 |
-
|
3339 |
if ( 'array' == $arguments['mla_output'] ) {
|
3340 |
return array( $list );
|
3341 |
}
|
3342 |
-
|
3343 |
if ( empty($arguments['echo']) ) {
|
3344 |
return $list;
|
3345 |
}
|
3346 |
-
|
3347 |
echo $list;
|
3348 |
return;
|
3349 |
}
|
3350 |
-
|
3351 |
if ( 'edit' == $arguments['link'] ) {
|
3352 |
$tags[ $key ]->link = $tags[ $key ]->edit_link;
|
3353 |
} else {
|
@@ -3380,7 +3434,7 @@ class MLAShortcode_Support {
|
|
3380 |
array_unshift( $tags[ $option_all->taxonomy ], $option_all );
|
3381 |
$found_rows += 1;
|
3382 |
}
|
3383 |
-
|
3384 |
$style_values = array_merge( $page_values, array(
|
3385 |
'mla_output' => $arguments['mla_output'],
|
3386 |
'mla_style' => $arguments['mla_style'],
|
@@ -3403,7 +3457,7 @@ class MLAShortcode_Support {
|
|
3403 |
) );
|
3404 |
|
3405 |
$style_template = $gallery_style = '';
|
3406 |
-
$use_mla_term_list_style =
|
3407 |
if ( apply_filters( 'use_mla_term_list_style', $use_mla_term_list_style, $style_values['mla_style'] ) ) {
|
3408 |
$style_template = MLATemplate_support::mla_fetch_custom_template( $style_values['mla_style'], 'term-list', 'style' );
|
3409 |
if ( empty( $style_template ) ) {
|
@@ -3431,7 +3485,7 @@ class MLAShortcode_Support {
|
|
3431 |
* Accumulate links for flat and array output
|
3432 |
*/
|
3433 |
$tag_links = array();
|
3434 |
-
|
3435 |
if ( $is_hierarchical ) {
|
3436 |
foreach( $tags as $taxonomy => $root_terms ) {
|
3437 |
|
@@ -3489,7 +3543,7 @@ class MLAShortcode_Support {
|
|
3489 |
if ( empty( $attr['mla_output'] ) ) {
|
3490 |
return 'mla_output is empty';
|
3491 |
}
|
3492 |
-
|
3493 |
switch ( $attr['mla_output'] ) {
|
3494 |
case 'wp_list_categories':
|
3495 |
return wp_list_categories( $attr );
|
@@ -3501,7 +3555,7 @@ class MLAShortcode_Support {
|
|
3501 |
default:
|
3502 |
//return 'mla_output not recognized';
|
3503 |
}
|
3504 |
-
|
3505 |
return self::mla_term_list( $attr );
|
3506 |
}
|
3507 |
|
@@ -3962,7 +4016,7 @@ class MLAShortcode_Support {
|
|
3962 |
global $wpdb;
|
3963 |
|
3964 |
$results = array ();
|
3965 |
-
$order = isset( $query_parameters['order'] ) ? ' ' . $query_parameters['order'] : '';
|
3966 |
$orderby = isset( $query_parameters['orderby'] ) ? $query_parameters['orderby'] : '';
|
3967 |
$meta_key = isset( $query_parameters['meta_key'] ) ? $query_parameters['meta_key'] : '';
|
3968 |
|
@@ -3975,7 +4029,7 @@ class MLAShortcode_Support {
|
|
3975 |
'empty_orderby_default' => 'post_date',
|
3976 |
'explicit_orderby_field' => 'post__in',
|
3977 |
'explicit_orderby_column' => 'ID',
|
3978 |
-
'
|
3979 |
'author' => 'post_author',
|
3980 |
'date' => 'post_date',
|
3981 |
'description' => 'post_content',
|
@@ -4027,29 +4081,35 @@ class MLAShortcode_Support {
|
|
4027 |
$obmatches = preg_split('/\s*,\s*/', trim($query_parameters['orderby']));
|
4028 |
foreach ( $obmatches as $index => $value ) {
|
4029 |
$count = preg_match('/([a-z0-9_]+)(\s+(ASC|DESC))?/i', $value, $matches);
|
4030 |
-
|
4031 |
-
|
4032 |
-
if ( (
|
4033 |
-
|
4034 |
-
}
|
4035 |
-
|
4036 |
-
|
4037 |
-
|
4038 |
-
$
|
4039 |
-
|
4040 |
-
|
4041 |
-
|
4042 |
-
|
4043 |
-
|
4044 |
-
|
4045 |
-
|
4046 |
-
|
4047 |
-
|
4048 |
-
|
4049 |
-
|
4050 |
-
|
4051 |
-
|
4052 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4053 |
} // valid column specification
|
4054 |
} // foreach $obmatches
|
4055 |
|
@@ -4128,6 +4188,7 @@ class MLAShortcode_Support {
|
|
4128 |
'mla_terms_taxonomies' => '',
|
4129 |
'mla_phrase_delimiter' => '',
|
4130 |
'mla_phrase_connector' => '',
|
|
|
4131 |
'mla_term_connector' => '',
|
4132 |
// Search
|
4133 |
's' => '',
|
@@ -4150,7 +4211,7 @@ class MLAShortcode_Support {
|
|
4150 |
*
|
4151 |
* @param int Post ID of the parent
|
4152 |
* @param array Attributes of the shortcode
|
4153 |
-
* @param boolean true to calculate and return ['
|
4154 |
*
|
4155 |
* @return array List of attachments returned from WP_Query
|
4156 |
*/
|
@@ -4515,6 +4576,7 @@ class MLAShortcode_Support {
|
|
4515 |
unset( $arguments[ $key ] );
|
4516 |
break;
|
4517 |
case 'mla_phrase_delimiter':
|
|
|
4518 |
if ( ! empty( $value ) ) {
|
4519 |
MLAQuery::$search_parameters[ $key ] = substr( $value, 0, 1 );
|
4520 |
}
|
@@ -4523,6 +4585,7 @@ class MLAShortcode_Support {
|
|
4523 |
break;
|
4524 |
case 'mla_terms_phrases':
|
4525 |
$children_ok = false;
|
|
|
4526 |
// fallthru
|
4527 |
case 'mla_terms_taxonomies':
|
4528 |
case 'mla_search_fields':
|
@@ -4537,7 +4600,7 @@ class MLAShortcode_Support {
|
|
4537 |
unset( $arguments[ $key ] );
|
4538 |
break;
|
4539 |
case 's':
|
4540 |
-
MLAQuery::$search_parameters['s'] = trim( $value );
|
4541 |
// fallthru
|
4542 |
case 'author_name':
|
4543 |
case 'category_name':
|
@@ -4695,11 +4758,11 @@ class MLAShortcode_Support {
|
|
4695 |
|
4696 |
if ( ! empty($query_arguments['include']) ) {
|
4697 |
$incposts = wp_parse_id_list( $query_arguments['include'] );
|
4698 |
-
|
4699 |
if ( ! ( isset( $query_arguments['posts_per_page'] ) && ( 0 < $query_arguments['posts_per_page'] ) ) ) {
|
4700 |
$query_arguments['posts_per_page'] = count($incposts); // only the number of posts included
|
4701 |
}
|
4702 |
-
|
4703 |
$query_arguments['post__in'] = $incposts;
|
4704 |
unset( $query_arguments['include'] );
|
4705 |
} elseif ( ! empty($query_arguments['exclude']) ) {
|
@@ -4752,7 +4815,7 @@ class MLAShortcode_Support {
|
|
4752 |
MLAQuery::$search_parameters['mla_terms_search']['phrases'] = MLAQuery::$search_parameters['mla_terms_phrases'];
|
4753 |
|
4754 |
if ( empty( MLAQuery::$search_parameters['mla_phrase_delimiter'] ) ) {
|
4755 |
-
MLAQuery::$search_parameters['mla_terms_search']['phrase_delimiter'] = '
|
4756 |
} else {
|
4757 |
MLAQuery::$search_parameters['mla_terms_search']['phrase_delimiter'] = MLAQuery::$search_parameters['mla_phrase_delimiter'];
|
4758 |
}
|
@@ -4763,6 +4826,12 @@ class MLAShortcode_Support {
|
|
4763 |
MLAQuery::$search_parameters['mla_terms_search']['radio_phrases'] = MLAQuery::$search_parameters['mla_phrase_connector'];
|
4764 |
}
|
4765 |
|
|
|
|
|
|
|
|
|
|
|
|
|
4766 |
if ( empty( MLAQuery::$search_parameters['mla_term_connector'] ) ) {
|
4767 |
MLAQuery::$search_parameters['mla_terms_search']['radio_terms'] = 'OR';
|
4768 |
} else {
|
@@ -4851,7 +4920,7 @@ class MLAShortcode_Support {
|
|
4851 |
if ( class_exists( 'MLA_Polylang' ) ) {
|
4852 |
$query_arguments = apply_filters( 'mla_get_shortcode_attachments_final_terms', $query_arguments, $return_found_rows );
|
4853 |
}
|
4854 |
-
|
4855 |
MLAShortcodes::$mla_gallery_wp_query_object = new WP_Query;
|
4856 |
$attachments = MLAShortcodes::$mla_gallery_wp_query_object->query( $query_arguments );
|
4857 |
|
@@ -4866,7 +4935,8 @@ class MLAShortcode_Support {
|
|
4866 |
}
|
4867 |
|
4868 |
if ( $return_found_rows ) {
|
4869 |
-
$attachments['found_rows'] = MLAShortcodes::$mla_gallery_wp_query_object->found_posts;
|
|
|
4870 |
}
|
4871 |
|
4872 |
if ( ! empty( MLAQuery::$search_parameters ) ) {
|
@@ -5155,7 +5225,7 @@ class MLAShortcode_Support {
|
|
5155 |
/*
|
5156 |
* Build an array of individual clauses that can be filtered
|
5157 |
*/
|
5158 |
-
$clauses = array( 'fields' => '', 'join' => '', 'where' => '', '
|
5159 |
|
5160 |
/*
|
5161 |
* If we're not counting attachments per term, strip
|
@@ -5312,7 +5382,7 @@ class MLAShortcode_Support {
|
|
5312 |
/*
|
5313 |
* For the inner/initial query, always select the most popular terms
|
5314 |
*/
|
5315 |
-
if ( $arguments['no_orderby'] ) {
|
5316 |
$arguments['orderby'] = 'count';
|
5317 |
$arguments['order'] = 'DESC';
|
5318 |
}
|
@@ -5320,38 +5390,22 @@ class MLAShortcode_Support {
|
|
5320 |
/*
|
5321 |
* Add sort order
|
5322 |
*/
|
5323 |
-
|
5324 |
-
|
5325 |
-
|
5326 |
-
$
|
5327 |
}
|
5328 |
|
5329 |
-
$
|
5330 |
-
|
5331 |
-
|
5332 |
-
|
5333 |
-
|
5334 |
-
|
5335 |
-
|
5336 |
-
|
5337 |
-
if ( 'true' == strtolower( $arguments['preserve_case'] ) ) {
|
5338 |
-
$binary_keys = array( 'name', 'slug', );
|
5339 |
-
} else {
|
5340 |
-
$binary_keys = array();
|
5341 |
-
}
|
5342 |
-
|
5343 |
-
$allowed_keys = array(
|
5344 |
-
'empty_orderby_default' => 'name',
|
5345 |
-
'count' => 'count',
|
5346 |
-
'id' => 'term_id',
|
5347 |
-
'name' => 'name',
|
5348 |
-
'random' => 'RAND()',
|
5349 |
-
'slug' => 'slug',
|
5350 |
-
);
|
5351 |
|
5352 |
-
|
5353 |
-
$clauses['orderby'] = substr( $clause, 0, strrpos( $clause, ' ' . $order ) );
|
5354 |
-
} // add ORDER BY
|
5355 |
|
5356 |
/*
|
5357 |
* Add pagination
|
@@ -5390,7 +5444,7 @@ class MLAShortcode_Support {
|
|
5390 |
* If specifically told to omit the ORDER BY clause or the COUNT,
|
5391 |
* supply a sort order for the initial/inner query only
|
5392 |
*/
|
5393 |
-
if ( ! ( $
|
5394 |
$query[] = 'ORDER BY count DESC, t.term_id ASC';
|
5395 |
}
|
5396 |
|
@@ -5406,9 +5460,9 @@ class MLAShortcode_Support {
|
|
5406 |
* $final_clauses, if present, require an SQL subquery
|
5407 |
*/
|
5408 |
$final_clauses = array();
|
5409 |
-
|
|
|
5410 |
$final_clauses[] = $clauses['orderby'];
|
5411 |
-
$final_clauses[] = $clauses['order'];
|
5412 |
}
|
5413 |
|
5414 |
if ( '' !== $clauses['limits'] ) {
|
@@ -5469,11 +5523,11 @@ class MLAShortcode_Support {
|
|
5469 |
*/
|
5470 |
private static function _get_term_tree( &$terms, $arguments = array() ) {
|
5471 |
$term = current( $terms );
|
5472 |
-
|
5473 |
if ( empty( $term ) or ! isset( $term->parent ) ) {
|
5474 |
return array();
|
5475 |
}
|
5476 |
-
|
5477 |
/*
|
5478 |
* Set found_rows aside to be restored later
|
5479 |
*/
|
@@ -5487,7 +5541,7 @@ class MLAShortcode_Support {
|
|
5487 |
$child_of = ! empty( $arguments['child_of'] ) ? absint( $arguments['child_of'] ) : NULL;
|
5488 |
$include_tree = ! empty( $arguments['include_tree'] ) ? wp_parse_id_list( $arguments['include_tree'] ) : NULL;
|
5489 |
$exclude_tree = empty( $include_tree ) && !empty( $arguments['exclude_tree'] ) ? wp_parse_id_list( $arguments['exclude_tree'] ) : NULL;
|
5490 |
-
|
5491 |
$depth = !empty( $arguments['depth'] ) ? absint( $arguments['depth'] ) : 0;
|
5492 |
$term_tree = array();
|
5493 |
$root_ids = array();
|
@@ -5531,12 +5585,12 @@ class MLAShortcode_Support {
|
|
5531 |
$term_tree[ $taxonomy ] = array();
|
5532 |
$root_ids[ $taxonomy ] = array();
|
5533 |
}
|
5534 |
-
|
5535 |
while ( !empty( $tax_parents ) ) {
|
5536 |
foreach( $tax_parents as $parent_id => $children ) {
|
5537 |
foreach( $children as $index => $child ) {
|
5538 |
if ( ! array_key_exists( $child->term_id, $tax_parents ) ) {
|
5539 |
-
|
5540 |
if ( array_key_exists( $child->parent, $root_ids[ $taxonomy ] ) ) {
|
5541 |
// Found a root node - attach the leaf
|
5542 |
$term_tree[ $taxonomy ][ $root_ids[ $taxonomy ][ $child->parent ] ]->children[] = $child;
|
@@ -5554,7 +5608,7 @@ class MLAShortcode_Support {
|
|
5554 |
$term_tree[ $taxonomy ][] = $child;
|
5555 |
$root_ids[ $taxonomy ][ $child->term_id ] = count( $term_tree[ $taxonomy ] ) - 1;
|
5556 |
} // Move the leaf node
|
5557 |
-
|
5558 |
unset( $tax_parents[ $parent_id ][ $index ] );
|
5559 |
if ( empty( $tax_parents[ $parent_id ] ) ) {
|
5560 |
unset( $tax_parents[ $parent_id ] );
|
@@ -5579,7 +5633,7 @@ class MLAShortcode_Support {
|
|
5579 |
continue;
|
5580 |
}
|
5581 |
} // $child_of
|
5582 |
-
|
5583 |
if ( $include_tree ) {
|
5584 |
$result = self::_find_include_tree( $term_tree[ $taxonomy ], $include_tree );
|
5585 |
if ( false !== $result ) {
|
@@ -5589,14 +5643,14 @@ class MLAShortcode_Support {
|
|
5589 |
continue;
|
5590 |
}
|
5591 |
} // $include_tree
|
5592 |
-
|
5593 |
if ( $exclude_tree ) {
|
5594 |
self::_remove_exclude_tree( $term_tree[ $taxonomy ], $exclude_tree );
|
5595 |
} // $include_tree
|
5596 |
-
|
5597 |
$term_count = 0;
|
5598 |
$root_limit = count( $term_tree[ $taxonomy ] );
|
5599 |
-
|
5600 |
if ( $root_limit ) {
|
5601 |
for ( $root_index = 0; $root_index < $root_limit; $root_index++ ) {
|
5602 |
if ( isset( $term_tree[ $taxonomy ][ $root_index ] ) ) {
|
@@ -5614,7 +5668,7 @@ class MLAShortcode_Support {
|
|
5614 |
$term_tree[ $taxonomy ]['found_rows'] = $term_count;
|
5615 |
$all_terms_count += $term_count;
|
5616 |
}
|
5617 |
-
|
5618 |
$term_tree['found_rows'] = $all_terms_count;
|
5619 |
return $term_tree;
|
5620 |
} // _get_term_tree
|
@@ -5634,13 +5688,13 @@ class MLAShortcode_Support {
|
|
5634 |
if ( $parent_id == $parent->term_id ) {
|
5635 |
return $parent;
|
5636 |
}
|
5637 |
-
|
5638 |
$result = self::_find_child_of( $parent->children, $parent_id );
|
5639 |
if ( false !== $result ) {
|
5640 |
return $result;
|
5641 |
}
|
5642 |
}
|
5643 |
-
|
5644 |
return false;
|
5645 |
} // _find_child_of
|
5646 |
|
@@ -5656,7 +5710,7 @@ class MLAShortcode_Support {
|
|
5656 |
*/
|
5657 |
private static function _find_include_tree( &$terms, $include_tree ) {
|
5658 |
$new_tree = array();
|
5659 |
-
|
5660 |
foreach( $terms as $term ) {
|
5661 |
if ( in_array( $term->term_id, $include_tree ) ) {
|
5662 |
$new_tree[] = $term;
|
@@ -5671,7 +5725,7 @@ class MLAShortcode_Support {
|
|
5671 |
if ( empty( $new_tree ) ) {
|
5672 |
return false;
|
5673 |
}
|
5674 |
-
|
5675 |
return $new_tree;
|
5676 |
} // _find_include_tree
|
5677 |
|
@@ -5711,13 +5765,13 @@ class MLAShortcode_Support {
|
|
5711 |
private static function _count_term_children( &$parent, $depth = 0 ) {
|
5712 |
$term_count = 0;
|
5713 |
$child_level = $parent->level + 1;
|
5714 |
-
|
5715 |
// level is zero-based, depth is one-based
|
5716 |
if ( $depth && $child_level >= $depth ) {
|
5717 |
$parent->children = array();
|
5718 |
return 0;
|
5719 |
}
|
5720 |
-
|
5721 |
$child_limit = count( $parent->children );
|
5722 |
for ( $child_index = 0; $child_index < $child_limit; $child_index++ ) {
|
5723 |
if ( isset( $parent->children[ $child_index ] ) ) {
|
58 |
|
59 |
MLACore::mla_debug_add( "MLAShortcode_Support::mla_ghostscript_present( {$ghostscript_only} ) explicit_path = " . var_export( $explicit_path, true ), MLACore::MLA_DEBUG_CATEGORY_THUMBNAIL );
|
60 |
MLACore::mla_debug_add( "MLAShortcode_Support::mla_ghostscript_present( {$ghostscript_only} ) ghostscript_present = " . var_export( $ghostscript_present, true ), MLACore::MLA_DEBUG_CATEGORY_THUMBNAIL );
|
61 |
+
|
62 |
if ( ! $ghostscript_only ) {
|
63 |
if ( isset( $ghostscript_present ) ) {
|
64 |
MLACore::mla_debug_add( '<strong>MLAShortcode_Support::mla_ghostscript_present</strong>, ghostscript_present = ' . var_export( $ghostscript_present, true ), MLACore::MLA_DEBUG_CATEGORY_THUMBNAIL );
|
190 |
if ( ( false !== $break_tag ) && ( ($break_tag + 3) == strlen( $value ) ) ) {
|
191 |
$value = substr( $value, 0, ( strlen( $value ) - 3) );
|
192 |
}
|
193 |
+
|
194 |
if ( is_numeric( $key ) ) {
|
195 |
if ( '/>' !== $value ) {
|
196 |
$new_attr .= $value . ' ';
|
200 |
$new_attr .= $key . '=' . $delimiter . $value . $delimiter . ' ';
|
201 |
}
|
202 |
}
|
203 |
+
|
204 |
$attr = shortcode_parse_atts( $new_attr );
|
205 |
+
|
206 |
/*
|
207 |
* Remove empty values and still-invalid parameters
|
208 |
*/
|
211 |
if ( is_numeric( $key ) || empty( $value ) ) {
|
212 |
continue;
|
213 |
}
|
214 |
+
|
215 |
$new_attr[ $key ] = $value;
|
216 |
}
|
217 |
+
|
218 |
$attr = $new_attr;
|
219 |
} // not_valid
|
220 |
+
|
221 |
/*
|
222 |
* Look for parameters in an enclosing shortcode
|
223 |
*/
|
226 |
$new_attr = shortcode_parse_atts( $content );
|
227 |
$attr = array_merge( $attr, $new_attr );
|
228 |
}
|
229 |
+
|
230 |
return $attr;
|
231 |
}
|
232 |
|
306 |
$attr[ $mla_page_parameter ] = $_REQUEST[ $mla_page_parameter ];
|
307 |
}
|
308 |
}
|
309 |
+
|
310 |
/*
|
311 |
* These are the parameters for gallery display
|
312 |
*/
|
374 |
'icontag' => $html5 ? 'div' : 'dt',
|
375 |
'captiontag' => $html5 ? 'figcaption' : 'dd',
|
376 |
'columns' => MLACore::mla_get_option('mla_gallery_columns'),
|
377 |
+
'link' => 'permalink', // or 'post', 'file', a registered size, etc.
|
378 |
// Photonic-specific
|
379 |
'id' => NULL,
|
380 |
'style' => NULL,
|
415 |
'page_status' => $post->post_status,
|
416 |
'page_name' => $post->post_name,
|
417 |
'page_modified' => $post->post_modified,
|
418 |
+
'page_parent' => $post->post_parent,
|
419 |
'page_guid' => $post->guid,
|
420 |
'page_type' => $post->post_type,
|
421 |
+
'page_mime_type' => $post->post_mime_type,
|
422 |
'page_url' => get_page_link(),
|
423 |
);
|
424 |
|
430 |
if ( !empty( $arguments ) ) {
|
431 |
$attr = wp_parse_args( $attr, self::_validate_attributes( array(), $arguments ) );
|
432 |
}
|
433 |
+
|
434 |
/*
|
435 |
* Look for page-level, 'request:' and 'query:' substitution parameters,
|
436 |
* which can be added to any input parameter
|
457 |
$content = apply_filters( 'mla_gallery_initial_content', $content, $attr );
|
458 |
$arguments = shortcode_atts( $default_arguments, $attr );
|
459 |
$arguments = apply_filters( 'mla_gallery_arguments', $arguments );
|
460 |
+
|
461 |
/*
|
462 |
* Look for "no effect" alternate gallery shortcode to support plugins such as Justified Image Grid
|
463 |
*/
|
482 |
* Determine output type
|
483 |
*/
|
484 |
$output_parameters = array_map( 'strtolower', array_map( 'trim', explode( ',', $arguments['mla_output'] ) ) );
|
485 |
+
if ( ! in_array( $output_parameters[0], array( 'gallery', 'next_link', 'current_link', 'previous_link', 'next_page', 'previous_page', 'paginate_links' ) ) ) {
|
486 |
+
$output_parameters[0] = 'gallery';
|
487 |
+
}
|
488 |
+
|
489 |
$is_gallery = 'gallery' == $output_parameters[0];
|
490 |
$is_pagination = in_array( $output_parameters[0], array( 'previous_page', 'next_page', 'paginate_links' ) );
|
491 |
|
492 |
if ( $is_pagination && ( NULL !== $arguments['mla_paginate_rows'] ) ) {
|
493 |
$attachments['found_rows'] = absint( $arguments['mla_paginate_rows'] );
|
494 |
} else {
|
495 |
+
$attachments = self::mla_get_shortcode_attachments( $post->ID, $attr, true ); // $is_pagination );
|
496 |
}
|
497 |
|
498 |
if ( is_string( $attachments ) ) {
|
511 |
return $output;
|
512 |
} // empty $attachments
|
513 |
|
514 |
+
$current_rows = count( $attachments );
|
515 |
+
|
516 |
+
if ( isset( $attachments['found_rows'] ) ) {
|
517 |
+
$found_rows = $attachments['found_rows'];
|
518 |
+
unset( $attachments['found_rows'] );
|
519 |
+
$current_rows--;
|
520 |
+
} else {
|
521 |
+
$found_rows = $current_rows;
|
522 |
+
}
|
523 |
+
|
524 |
+
if ( isset( $attachments['max_num_pages'] ) ) {
|
525 |
+
$max_num_pages = $attachments['max_num_pages'];
|
526 |
+
unset( $attachments['max_num_pages'] );
|
527 |
+
$current_rows--;
|
528 |
+
} else {
|
529 |
+
$max_num_pages = 1;
|
530 |
+
}
|
531 |
+
|
532 |
/*
|
533 |
* Look for user-specified alternate gallery shortcode
|
534 |
*/
|
561 |
*/
|
562 |
$mla_alt_ids_value = is_null( $arguments['mla_alt_ids_value'] ) ? NULL : str_replace( '{+', '[+', str_replace( '+}', '+]', $arguments['mla_alt_ids_value'] ) );
|
563 |
$mla_alt_shortcode_ids = array();
|
564 |
+
|
565 |
if ( is_null( $mla_alt_ids_value ) ) {
|
566 |
foreach ( $attachments as $value ) {
|
567 |
$mla_alt_shortcode_ids[] = $value->ID;
|
568 |
} // foreach $attachments
|
569 |
+
|
570 |
$mla_alt_shortcode_ids = $arguments['mla_alt_ids_name'] . '="' . implode( ',', $mla_alt_shortcode_ids ) . '"';
|
571 |
+
|
572 |
if ( self::$mla_debug ) {
|
573 |
$output = MLACore::mla_debug_flush();
|
574 |
} else {
|
575 |
$output = '';
|
576 |
}
|
577 |
+
|
578 |
/*
|
579 |
* Execute the alternate gallery shortcode with the new parameters
|
580 |
*/
|
724 |
'itemwidth' => $width_string,
|
725 |
'margin' => $margin_string,
|
726 |
'float' => $float,
|
727 |
+
'size_class' => sanitize_html_class( $size_class ),
|
728 |
+
'found_rows' => $found_rows,
|
729 |
+
'current_rows' => $current_rows,
|
730 |
+
'max_num_pages' => $max_num_pages,
|
731 |
) );
|
732 |
|
733 |
$style_template = $gallery_style = '';
|
850 |
*/
|
851 |
$markup_values = apply_filters( 'mla_gallery_open_values', $markup_values );
|
852 |
|
853 |
+
if ( $is_gallery ) {
|
854 |
//$markup_values = apply_filters( 'mla_gallery_open_values', $markup_values );
|
855 |
|
856 |
$open_template = apply_filters( 'mla_gallery_open_template', $open_template );
|
863 |
$gallery_open = apply_filters( 'mla_gallery_open_parse', $gallery_open, $open_template, $markup_values );
|
864 |
$output .= apply_filters( 'mla_gallery_style', $gallery_style . $gallery_open, $style_values, $markup_values, $style_template, $open_template );
|
865 |
} else {
|
|
|
|
|
|
|
|
|
866 |
/*
|
867 |
* Handle 'previous_page', 'next_page', and 'paginate_links'
|
868 |
*/
|
869 |
+
$pagination_result = self::_process_pagination_output_types( $output_parameters, $markup_values, $arguments, $attr, $found_rows, $output );
|
870 |
if ( false !== $pagination_result ) {
|
871 |
return $pagination_result;
|
872 |
}
|
|
|
|
|
873 |
}
|
874 |
|
875 |
/*
|
886 |
$is_wrap = isset( $output_parameters[1] ) && 'wrap' == $output_parameters[1];
|
887 |
$current_id = empty( $arguments['id'] ) ? $markup_values['id'] : $arguments['id'];
|
888 |
|
889 |
+
$pagination_index = 1;
|
890 |
foreach ( $attachments as $id => $attachment ) {
|
891 |
if ( $attachment->ID == $current_id ) {
|
892 |
break;
|
893 |
}
|
894 |
+
|
895 |
+
$pagination_index++;
|
896 |
}
|
897 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
898 |
$target = NULL;
|
899 |
+
if ( isset( $id ) ) {
|
|
|
|
|
900 |
switch ( $link_type ) {
|
901 |
case 'previous_link':
|
902 |
+
$target_id = $id - 1;
|
903 |
break;
|
904 |
case 'next_link':
|
905 |
+
$target_id = $id + 1;
|
906 |
+
break;
|
907 |
+
case 'current_link':
|
908 |
+
default:
|
909 |
+
$target_id = $id;
|
910 |
} // link_type
|
911 |
+
|
912 |
+
if ( isset( $attachments[ $target_id ] ) ) {
|
913 |
+
$target = $attachments[ $target_id ];
|
914 |
+
} elseif ( $is_wrap ) {
|
915 |
+
switch ( $link_type ) {
|
916 |
+
case 'previous_link':
|
917 |
+
$target = array_pop( $attachments );
|
918 |
+
break;
|
919 |
+
case 'next_link':
|
920 |
+
$target = array_shift( $attachments );
|
921 |
+
} // link_type
|
922 |
+
} // is_wrap
|
923 |
+
} // isset id
|
924 |
|
925 |
if ( isset( $target ) ) {
|
926 |
$attachments = array( $target );
|
940 |
/*
|
941 |
* fill in item-specific elements
|
942 |
*/
|
943 |
+
$item_values['index'] = (string) $is_gallery ? 1 + $column_index : $pagination_index;
|
944 |
$item_values['last_in_row'] = '';
|
945 |
|
946 |
$item_values['excerpt'] = wptexturize( $attachment->post_excerpt );
|
972 |
$item_values['caption'] = '';
|
973 |
$item_values['captiontag_content'] = '';
|
974 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
975 |
$user = get_user_by( 'id', $attachment->post_author );
|
976 |
if ( isset( $user->data->display_name ) ) {
|
977 |
$item_values['author'] = wptexturize( $user->data->display_name );
|
1094 |
$item_values['pagelink'] = sprintf( '<a href=\'%1$s\'>%2$s</a>', $attachment->guid, $attachment->post_title );
|
1095 |
$item_values['filelink'] = sprintf( '<a href=\'%1$s\'>%2$s</a>', get_permalink( $attachment->ID ), $attachment->post_title );
|
1096 |
}
|
1097 |
+
|
1098 |
if ( in_array( $attachment->post_mime_type, array( 'image/svg+xml' ) ) ) {
|
1099 |
$registered_dimensions = self::_registered_dimensions();
|
1100 |
if ( isset( $registered_dimensions[ $size_class ] ) ) {
|
1237 |
}
|
1238 |
} // process <img> tag
|
1239 |
|
1240 |
+
/*
|
1241 |
+
* Create download link with all Content Parameters
|
1242 |
+
*/
|
1243 |
+
$match_count = preg_match( '#href=\'([^\']+)\'#', $item_values['filelink'], $matches, PREG_OFFSET_CAPTURE );
|
1244 |
+
if ( ! ( ( $match_count == false ) || ( $match_count == 0 ) ) ) {
|
1245 |
+
$args = array( 'mla_download_file' => urlencode( $item_values['base_dir'] . '/' . $item_values['base_file'] ), 'mla_download_type' => $item_values['mime_type'] );
|
1246 |
+
if ( 'log' == $arguments['mla_debug'] ) {
|
1247 |
+
$args['mla_debug'] = 'log';
|
1248 |
+
}
|
1249 |
+
|
1250 |
+
$item_values['downloadlink_url'] = add_query_arg( $args, MLA_PLUGIN_URL . 'includes/mla-file-downloader.php' );
|
1251 |
+
$item_values['downloadlink'] = preg_replace( '#' . $matches[0][0] . '#', sprintf( 'href=\'%1$s\'', $item_values['downloadlink_url'] ), $item_values['filelink'] );
|
1252 |
+
} else {
|
1253 |
+
$item_values['downloadlink_url'] = $item_values['filelink_url'];
|
1254 |
+
$item_values['downloadlink'] = $item_values['filelink'];
|
1255 |
+
}
|
1256 |
+
|
1257 |
switch ( $arguments['link'] ) {
|
1258 |
case 'permalink':
|
1259 |
case 'post':
|
1263 |
case 'full':
|
1264 |
$item_values['link'] = $item_values['filelink'];
|
1265 |
break;
|
1266 |
+
case 'download':
|
1267 |
+
$item_values['link'] = $item_values['downloadlink'];
|
1268 |
+
break;
|
1269 |
default:
|
1270 |
$item_values['link'] = $item_values['filelink'];
|
1271 |
|
1295 |
$item_values['filelink_url'] = '';
|
1296 |
}
|
1297 |
|
1298 |
+
$match_count = preg_match_all( '#href=\'([^\']+)\'#', $item_values['downloadlink'], $matches, PREG_OFFSET_CAPTURE );
|
1299 |
+
if ( ! ( ( $match_count == false ) || ( $match_count == 0 ) ) ) {
|
1300 |
+
$item_values['downloadlink_url'] = $matches[1][0][0];
|
1301 |
+
} else {
|
1302 |
+
$item_values['downloadlink_url'] = '';
|
1303 |
+
}
|
1304 |
+
|
1305 |
$match_count = preg_match_all( '#href=\'([^\']+)\'#', $item_values['link'], $matches, PREG_OFFSET_CAPTURE );
|
1306 |
if ( ! ( ( $match_count == false ) || ( $match_count == 0 ) ) ) {
|
1307 |
$item_values['link_url'] = $matches[1][0][0];
|
1350 |
*/
|
1351 |
$feature = get_the_post_thumbnail( $attachment->ID, $size, array( 'class' => 'attachment-thumbnail' ) );
|
1352 |
$feature = apply_filters( 'mla_gallery_featured_image', $feature, $attachment, $size, $item_values );
|
1353 |
+
|
1354 |
if ( ! empty( $feature ) ) {
|
1355 |
$match_count = preg_match_all( '# width=\"([^\"]+)\" height=\"([^\"]+)\" src=\"([^\"]+)\" #', $feature, $matches, PREG_OFFSET_CAPTURE );
|
1356 |
if ( ! ( ( $match_count == false ) || ( $match_count == 0 ) ) ) {
|
1490 |
if ( false === strpos( $link_attributes, 'title=' ) ) {
|
1491 |
$item_values['pagelink'] = sprintf( '<a %1$shref="%2$s" title="%3$s">%4$s</a>', $link_attributes, $item_values['pagelink_url'], $rollover_text, $item_values['thumbnail_content'] );
|
1492 |
$item_values['filelink'] = sprintf( '<a %1$shref="%2$s" title="%3$s">%4$s</a>', $link_attributes, $item_values['filelink_url'], $rollover_text, $item_values['thumbnail_content'] );
|
1493 |
+
$item_values['downloadlink'] = sprintf( '<a %1$shref="%2$s" title="%3$s">%4$s</a>', $link_attributes, $item_values['downloadlink_url'], $rollover_text, $item_values['thumbnail_content'] );
|
1494 |
} else {
|
1495 |
$item_values['pagelink'] = sprintf( '<a %1$shref="%2$s">%3$s</a>', $link_attributes, $item_values['pagelink_url'], $item_values['thumbnail_content'] );
|
1496 |
$item_values['filelink'] = sprintf( '<a %1$shref="%2$s">%3$s</a>', $link_attributes, $item_values['filelink_url'], $item_values['thumbnail_content'] );
|
1497 |
+
$item_values['downloadlink'] = sprintf( '<a %1$shref="%2$s">%3$s</a>', $link_attributes, $item_values['downloadlink_url'], $item_values['thumbnail_content'] );
|
1498 |
}
|
1499 |
if ( ! empty( $link_href ) ) {
|
1500 |
$item_values['link'] = sprintf( '<a %1$shref="%2$s" title="%3$s">%4$s</a>', $link_attributes, $link_href, $rollover_text, $item_values['thumbnail_content'] );
|
1502 |
$item_values['link'] = $item_values['pagelink'];
|
1503 |
} elseif ( 'file' == $arguments['link'] ) {
|
1504 |
$item_values['link'] = $item_values['filelink'];
|
1505 |
+
} elseif ( 'download' == $arguments['link'] ) {
|
1506 |
+
$item_values['link'] = $item_values['downloadlink'];
|
1507 |
} elseif ( 'span' == $arguments['link'] ) {
|
1508 |
$item_values['link'] = sprintf( '<a %1$s>%2$s</a>', $link_attributes, $item_values['thumbnail_content'] );
|
1509 |
} else {
|
1761 |
$template = $arguments['mla_markup'];
|
1762 |
} else {
|
1763 |
$output_parameters = array_map( 'strtolower', array_map( 'trim', explode( ',', $arguments['mla_output'] ) ) );
|
1764 |
+
|
1765 |
if ( 'grid' == $output_parameters[0] ) {
|
1766 |
$template = MLACore::mla_get_option('default_tag_cloud_markup');
|
1767 |
} elseif ( in_array( $output_parameters[0], array( 'list', 'ulist', 'olist', 'dlist' ) ) ) {
|
1770 |
} else {
|
1771 |
$template = 'tag-cloud-ul';
|
1772 |
}
|
1773 |
+
} else {
|
1774 |
+
$template = NULL;
|
1775 |
}
|
1776 |
}
|
1777 |
|
1778 |
/*
|
1779 |
* Apply default arguments set in the markup template
|
1780 |
*/
|
1781 |
+
if ( !empty( $template ) ) {
|
1782 |
+
$arguments = MLATemplate_Support::mla_fetch_custom_template( $template, 'tag-cloud', 'markup', 'arguments' );
|
1783 |
+
if ( !empty( $arguments ) ) {
|
1784 |
+
$attr = wp_parse_args( $attr, self::_validate_attributes( array(), $arguments ) );
|
1785 |
+
}
|
1786 |
}
|
1787 |
|
1788 |
/*
|
1871 |
if ( empty( $attr['itemtag'] ) ) {
|
1872 |
$arguments['itemtag'] = 'dl';
|
1873 |
}
|
1874 |
+
|
1875 |
if ( empty( $attr['termtag'] ) ) {
|
1876 |
$arguments['termtag'] = 'dt';
|
1877 |
}
|
1878 |
+
|
1879 |
if ( empty( $attr['captiontag'] ) ) {
|
1880 |
$arguments['captiontag'] = 'dd';
|
1881 |
}
|
1892 |
$default_markup = 'tag-cloud-ul';
|
1893 |
$arguments['termtag'] = 'li';
|
1894 |
$arguments['captiontag'] = '';
|
1895 |
+
|
1896 |
switch ( $output_parameters[0] ) {
|
1897 |
case 'ulist':
|
1898 |
$arguments['itemtag'] = 'ul';
|
1971 |
if ( self::$mla_debug ) {
|
1972 |
MLACore::mla_debug_add( '<strong>' . __( 'mla_debug empty cloud', 'media-library-assistant' ) . '</strong>, query = ' . var_export( $arguments, true ) );
|
1973 |
$cloud = MLACore::mla_debug_flush();
|
1974 |
+
|
1975 |
if ( '<p></p>' == $cloud ) {
|
1976 |
$cloud = '';
|
1977 |
}
|
2039 |
if ( 'array' == $arguments['mla_output'] ) {
|
2040 |
return array( $cloud );
|
2041 |
}
|
2042 |
+
|
2043 |
if ( empty($arguments['echo']) ) {
|
2044 |
return $cloud;
|
2045 |
}
|
2046 |
+
|
2047 |
echo $cloud;
|
2048 |
return;
|
2049 |
}
|
2396 |
}
|
2397 |
|
2398 |
if ( ! empty( $arguments['mla_link_class'] ) ) {
|
2399 |
+
$class_attributes = self::_process_shortcode_parameter( $arguments['mla_link_class'], $item_values );
|
2400 |
+
if ( !empty( $class_attributes ) ) {
|
2401 |
+
$link_attributes .= 'class="' . $class_attributes . '" ';
|
2402 |
+
}
|
2403 |
}
|
2404 |
|
2405 |
$item_values['link_attributes'] = $link_attributes;
|
2603 |
} else {
|
2604 |
$open_template = false;
|
2605 |
}
|
2606 |
+
|
2607 |
if ( false === $open_template ) {
|
2608 |
$open_template = MLATemplate_support::mla_fetch_custom_template( $markup_values['mla_markup'], 'term-list', 'markup', 'open' );
|
2609 |
}
|
2610 |
+
|
2611 |
/*
|
2612 |
* Fall back to default template if no Open section
|
2613 |
*/
|
2619 |
} else {
|
2620 |
$open_template = false;
|
2621 |
}
|
2622 |
+
|
2623 |
if ( false === $open_template ) {
|
2624 |
$open_template = MLATemplate_support::mla_fetch_custom_template( $default_markup, 'term-list', 'markup', 'open' );
|
2625 |
}
|
2634 |
} else {
|
2635 |
$item_template = false;
|
2636 |
}
|
2637 |
+
|
2638 |
if ( false === $item_template ) {
|
2639 |
$item_template = MLATemplate_support::mla_fetch_custom_template( $markup_values['mla_markup'], 'term-list', 'markup', 'item' );
|
2640 |
}
|
2641 |
+
|
2642 |
if ( empty( $item_template ) ) {
|
2643 |
$item_template = '';
|
2644 |
}
|
2648 |
} else {
|
2649 |
$close_template = false;
|
2650 |
}
|
2651 |
+
|
2652 |
if ( false === $close_template ) {
|
2653 |
$close_template = MLATemplate_support::mla_fetch_custom_template( $markup_values['mla_markup'], 'term-list', 'markup', 'close' );
|
2654 |
}
|
2655 |
+
|
2656 |
if ( empty( $close_template ) ) {
|
2657 |
$close_template = '';
|
2658 |
}
|
2663 |
*/
|
2664 |
$new_text = $open_template . $close_template;
|
2665 |
$markup_values = MLAData::mla_expand_field_level_parameters( $new_text, $attr, $markup_values );
|
2666 |
+
|
2667 |
$markup_values = apply_filters( 'mla_term_list_open_values', $markup_values );
|
2668 |
$open_template = apply_filters( 'mla_term_list_open_template', $open_template );
|
2669 |
if ( empty( $open_template ) ) {
|
2671 |
} else {
|
2672 |
$gallery_open = MLAData::mla_parse_template( $open_template, $markup_values );
|
2673 |
}
|
2674 |
+
|
2675 |
$list .= apply_filters( 'mla_term_list_open_parse', $gallery_open, $open_template, $markup_values );
|
2676 |
}
|
2677 |
} // is_list
|
2678 |
|
2679 |
foreach ( $terms as $key => $term ) {
|
2680 |
$item_values = $markup_values;
|
2681 |
+
|
2682 |
/*
|
2683 |
* fill in item-specific elements
|
2684 |
*/
|
2727 |
}
|
2728 |
}
|
2729 |
}
|
2730 |
+
|
2731 |
/*
|
2732 |
* Add item_specific field-level substitution parameters
|
2733 |
*/
|
2820 |
} else {
|
2821 |
$pad = '';
|
2822 |
}
|
2823 |
+
|
2824 |
if ( empty( $arguments['mla_option_text'] ) ) {
|
2825 |
$item_values['thelabel'] = $pad . $item_values['link_text'];
|
2826 |
} else {
|
2834 |
}
|
2835 |
|
2836 |
$item_values['popular'] = ''; // TODO Calculate 'term-list-popular'
|
2837 |
+
|
2838 |
if ( $item_values['current_item_class'] == $arguments['current_item_class'] ) {
|
2839 |
if ( $is_dropdown ) {
|
2840 |
$item_values['selected'] = 'selected=selected';
|
2904 |
'mla_link_text' => '',
|
2905 |
'mla_rollover_text' => '',
|
2906 |
'mla_caption' => '',
|
2907 |
+
|
2908 |
'mla_option_text' => '',
|
2909 |
'mla_option_value' => '',
|
2910 |
);
|
3061 |
$template = $arguments['mla_markup'];
|
3062 |
} else {
|
3063 |
$output_parameters = array_map( 'strtolower', array_map( 'trim', explode( ',', $arguments['mla_output'] ) ) );
|
3064 |
+
|
3065 |
if ( in_array( $output_parameters[0], array( 'list', 'ulist', 'olist', 'dlist' ) ) ) {
|
3066 |
if ( ( 'dlist' == $output_parameters[0] ) || ('list' == $output_parameters[0] && 'dd' == $arguments['captiontag'] ) ) {
|
3067 |
$template = 'term-list-dl';
|
3074 |
$template = 'term-list-checklist';
|
3075 |
}
|
3076 |
}
|
3077 |
+
|
3078 |
/*
|
3079 |
* Apply default arguments set in the markup template
|
3080 |
*/
|
3162 |
$output_parameters = array_map( 'strtolower', array_map( 'trim', explode( ',', $arguments['mla_output'] ) ) );
|
3163 |
|
3164 |
if ( $is_list = in_array( $output_parameters[0], array( 'list', 'ulist', 'olist', 'dlist' ) ) ) {
|
3165 |
+
$default_style = 'term-list';
|
3166 |
|
3167 |
if ( 'list' == $output_parameters[0] && 'dd' == $arguments['captiontag'] ) {
|
3168 |
$default_markup = 'term-list-dl';
|
3172 |
$default_markup = 'term-list-ul';
|
3173 |
$arguments['termtag'] = 'li';
|
3174 |
$arguments['captiontag'] = '';
|
3175 |
+
|
3176 |
switch ( $output_parameters[0] ) {
|
3177 |
case 'ulist':
|
3178 |
$arguments['itemtag'] = 'ul';
|
3201 |
}
|
3202 |
|
3203 |
if ( $is_dropdown = 'dropdown' == $output_parameters[0] ) {
|
3204 |
+
$default_style = 'term-list';
|
3205 |
$default_markup = 'term-list-dropdown';
|
3206 |
$arguments['itemtag'] = 'select';
|
3207 |
$arguments['termtag'] = 'option';
|
3216 |
}
|
3217 |
|
3218 |
if ( $is_checklist = 'checklist' == $output_parameters[0] ) {
|
3219 |
+
$default_style = 'term-list';
|
3220 |
$default_markup = 'term-list-checklist';
|
3221 |
$arguments['termtag'] = 'li';
|
3222 |
|
3230 |
}
|
3231 |
|
3232 |
$is_hierarchical = !empty( $arguments['hierarchical'] ) && ( 'true' == strtolower( $arguments['hierarchical'] ) );
|
3233 |
+
|
3234 |
/*
|
3235 |
* Convert lists to arrays
|
3236 |
*/
|
3253 |
} else {
|
3254 |
$exclude_later = NULL;
|
3255 |
}
|
3256 |
+
|
3257 |
$tags = self::mla_get_terms( $arguments );
|
3258 |
if ( !empty( $exclude_later ) ) {
|
3259 |
$arguments['exclude'] = $exclude_later;
|
3292 |
if ( self::$mla_debug ) {
|
3293 |
MLACore::mla_debug_add( '<strong>' . __( 'mla_debug empty list', 'media-library-assistant' ) . '</strong>, query = ' . var_export( $arguments, true ) );
|
3294 |
$list = MLACore::mla_debug_flush();
|
3295 |
+
|
3296 |
if ( '<p></p>' == $list ) {
|
3297 |
$list = '';
|
3298 |
}
|
3302 |
|
3303 |
if ( 'array' == $arguments['mla_output'] ) {
|
3304 |
$list .= $arguments['mla_nolink_text'];
|
3305 |
+
|
3306 |
if ( empty( $list ) ) {
|
3307 |
return array();
|
3308 |
} else {
|
3340 |
if ( empty($arguments['echo']) ) {
|
3341 |
return $list;
|
3342 |
}
|
3343 |
+
|
3344 |
echo $list;
|
3345 |
return;
|
3346 |
}
|
3354 |
|
3355 |
if ( $is_hierarchical ) {
|
3356 |
$tags = self::_get_term_tree( $tags, $arguments );
|
3357 |
+
|
3358 |
if ( is_wp_error( $tags ) ) {
|
3359 |
$list = '<strong>' . __( 'ERROR', 'media-library-assistant' ) . ': ' . $tags->get_error_message() . '</strong>, ' . $tags->get_error_data( $tags->get_error_code() );
|
3360 |
|
3361 |
if ( 'array' == $arguments['mla_output'] ) {
|
3362 |
return array( $list );
|
3363 |
}
|
3364 |
+
|
3365 |
if ( empty($arguments['echo']) ) {
|
3366 |
return $list;
|
3367 |
}
|
3368 |
+
|
3369 |
echo $list;
|
3370 |
return;
|
3371 |
}
|
3386 |
$link = get_term_link( intval($tag->term_id), $tag->taxonomy );
|
3387 |
$tags[ $key ]->term_link = $link;
|
3388 |
}
|
3389 |
+
|
3390 |
if ( is_wp_error( $link ) ) {
|
3391 |
$list = '<strong>' . __( 'ERROR', 'media-library-assistant' ) . ': ' . $link->get_error_message() . '</strong>, ' . $link->get_error_data( $link->get_error_code() );
|
3392 |
+
|
3393 |
if ( 'array' == $arguments['mla_output'] ) {
|
3394 |
return array( $list );
|
3395 |
}
|
3396 |
+
|
3397 |
if ( empty($arguments['echo']) ) {
|
3398 |
return $list;
|
3399 |
}
|
3400 |
+
|
3401 |
echo $list;
|
3402 |
return;
|
3403 |
}
|
3404 |
+
|
3405 |
if ( 'edit' == $arguments['link'] ) {
|
3406 |
$tags[ $key ]->link = $tags[ $key ]->edit_link;
|
3407 |
} else {
|
3434 |
array_unshift( $tags[ $option_all->taxonomy ], $option_all );
|
3435 |
$found_rows += 1;
|
3436 |
}
|
3437 |
+
|
3438 |
$style_values = array_merge( $page_values, array(
|
3439 |
'mla_output' => $arguments['mla_output'],
|
3440 |
'mla_style' => $arguments['mla_style'],
|
3457 |
) );
|
3458 |
|
3459 |
$style_template = $gallery_style = '';
|
3460 |
+
$use_mla_term_list_style = 'none' != strtolower( $style_values['mla_style'] );
|
3461 |
if ( apply_filters( 'use_mla_term_list_style', $use_mla_term_list_style, $style_values['mla_style'] ) ) {
|
3462 |
$style_template = MLATemplate_support::mla_fetch_custom_template( $style_values['mla_style'], 'term-list', 'style' );
|
3463 |
if ( empty( $style_template ) ) {
|
3485 |
* Accumulate links for flat and array output
|
3486 |
*/
|
3487 |
$tag_links = array();
|
3488 |
+
|
3489 |
if ( $is_hierarchical ) {
|
3490 |
foreach( $tags as $taxonomy => $root_terms ) {
|
3491 |
|
3543 |
if ( empty( $attr['mla_output'] ) ) {
|
3544 |
return 'mla_output is empty';
|
3545 |
}
|
3546 |
+
|
3547 |
switch ( $attr['mla_output'] ) {
|
3548 |
case 'wp_list_categories':
|
3549 |
return wp_list_categories( $attr );
|
3555 |
default:
|
3556 |
//return 'mla_output not recognized';
|
3557 |
}
|
3558 |
+
|
3559 |
return self::mla_term_list( $attr );
|
3560 |
}
|
3561 |
|
4016 |
global $wpdb;
|
4017 |
|
4018 |
$results = array ();
|
4019 |
+
$order = isset( $query_parameters['order'] ) ? ' ' . trim( strtoupper( $query_parameters['order'] ) ) : '';
|
4020 |
$orderby = isset( $query_parameters['orderby'] ) ? $query_parameters['orderby'] : '';
|
4021 |
$meta_key = isset( $query_parameters['meta_key'] ) ? $query_parameters['meta_key'] : '';
|
4022 |
|
4029 |
'empty_orderby_default' => 'post_date',
|
4030 |
'explicit_orderby_field' => 'post__in',
|
4031 |
'explicit_orderby_column' => 'ID',
|
4032 |
+
'id' => 'ID',
|
4033 |
'author' => 'post_author',
|
4034 |
'date' => 'post_date',
|
4035 |
'description' => 'post_content',
|
4081 |
$obmatches = preg_split('/\s*,\s*/', trim($query_parameters['orderby']));
|
4082 |
foreach ( $obmatches as $index => $value ) {
|
4083 |
$count = preg_match('/([a-z0-9_]+)(\s+(ASC|DESC))?/i', $value, $matches);
|
4084 |
+
if ( $count && ( $value == $matches[0] ) ) {
|
4085 |
+
$matches[1] = strtolower( $matches[1] );
|
4086 |
+
if ( isset( $matches[2] ) ) {
|
4087 |
+
$matches[2] = strtoupper( $matches[2] );
|
4088 |
+
}
|
4089 |
+
|
4090 |
+
if ( array_key_exists( $matches[1], $allowed_keys ) ) {
|
4091 |
+
if ( ( 'rand' == $matches[1] ) || ( 'random' == $matches[1] ) ){
|
4092 |
+
$results[] = 'RAND()';
|
4093 |
+
} else {
|
4094 |
+
switch ( $matches[1] ) {
|
4095 |
+
case $meta_key:
|
4096 |
+
case 'meta_value':
|
4097 |
+
$matches[1] = "$wpdb->postmeta.meta_value";
|
4098 |
+
break;
|
4099 |
+
case 'meta_value_num':
|
4100 |
+
$matches[1] = "$wpdb->postmeta.meta_value+0";
|
4101 |
+
break;
|
4102 |
+
default:
|
4103 |
+
if ( in_array( $matches[1], $binary_keys ) ) {
|
4104 |
+
$matches[1] = 'BINARY ' . $table_prefix . $allowed_keys[ $matches[1] ];
|
4105 |
+
} else {
|
4106 |
+
$matches[1] = $table_prefix . $allowed_keys[ $matches[1] ];
|
4107 |
+
}
|
4108 |
+
} // switch $matches[1]
|
4109 |
+
|
4110 |
+
$results[] = isset( $matches[2] ) ? $matches[1] . $matches[2] : $matches[1] . $order;
|
4111 |
+
} // not 'rand'
|
4112 |
+
} // allowed key
|
4113 |
} // valid column specification
|
4114 |
} // foreach $obmatches
|
4115 |
|
4188 |
'mla_terms_taxonomies' => '',
|
4189 |
'mla_phrase_delimiter' => '',
|
4190 |
'mla_phrase_connector' => '',
|
4191 |
+
'mla_term_delimiter' => '',
|
4192 |
'mla_term_connector' => '',
|
4193 |
// Search
|
4194 |
's' => '',
|
4211 |
*
|
4212 |
* @param int Post ID of the parent
|
4213 |
* @param array Attributes of the shortcode
|
4214 |
+
* @param boolean true to calculate and return ['found_rows', 'max_num_pages'] as array elements
|
4215 |
*
|
4216 |
* @return array List of attachments returned from WP_Query
|
4217 |
*/
|
4576 |
unset( $arguments[ $key ] );
|
4577 |
break;
|
4578 |
case 'mla_phrase_delimiter':
|
4579 |
+
case 'mla_term_delimiter':
|
4580 |
if ( ! empty( $value ) ) {
|
4581 |
MLAQuery::$search_parameters[ $key ] = substr( $value, 0, 1 );
|
4582 |
}
|
4585 |
break;
|
4586 |
case 'mla_terms_phrases':
|
4587 |
$children_ok = false;
|
4588 |
+
$value = stripslashes( trim( $value ) );
|
4589 |
// fallthru
|
4590 |
case 'mla_terms_taxonomies':
|
4591 |
case 'mla_search_fields':
|
4600 |
unset( $arguments[ $key ] );
|
4601 |
break;
|
4602 |
case 's':
|
4603 |
+
MLAQuery::$search_parameters['s'] = stripslashes( trim( $value ) );
|
4604 |
// fallthru
|
4605 |
case 'author_name':
|
4606 |
case 'category_name':
|
4758 |
|
4759 |
if ( ! empty($query_arguments['include']) ) {
|
4760 |
$incposts = wp_parse_id_list( $query_arguments['include'] );
|
4761 |
+
|
4762 |
if ( ! ( isset( $query_arguments['posts_per_page'] ) && ( 0 < $query_arguments['posts_per_page'] ) ) ) {
|
4763 |
$query_arguments['posts_per_page'] = count($incposts); // only the number of posts included
|
4764 |
}
|
4765 |
+
|
4766 |
$query_arguments['post__in'] = $incposts;
|
4767 |
unset( $query_arguments['include'] );
|
4768 |
} elseif ( ! empty($query_arguments['exclude']) ) {
|
4815 |
MLAQuery::$search_parameters['mla_terms_search']['phrases'] = MLAQuery::$search_parameters['mla_terms_phrases'];
|
4816 |
|
4817 |
if ( empty( MLAQuery::$search_parameters['mla_phrase_delimiter'] ) ) {
|
4818 |
+
MLAQuery::$search_parameters['mla_terms_search']['phrase_delimiter'] = ' ';
|
4819 |
} else {
|
4820 |
MLAQuery::$search_parameters['mla_terms_search']['phrase_delimiter'] = MLAQuery::$search_parameters['mla_phrase_delimiter'];
|
4821 |
}
|
4826 |
MLAQuery::$search_parameters['mla_terms_search']['radio_phrases'] = MLAQuery::$search_parameters['mla_phrase_connector'];
|
4827 |
}
|
4828 |
|
4829 |
+
if ( empty( MLAQuery::$search_parameters['mla_term_delimiter'] ) ) {
|
4830 |
+
MLAQuery::$search_parameters['mla_terms_search']['term_delimiter'] = ',';
|
4831 |
+
} else {
|
4832 |
+
MLAQuery::$search_parameters['mla_terms_search']['term_delimiter'] = MLAQuery::$search_parameters['mla_term_delimiter'];
|
4833 |
+
}
|
4834 |
+
|
4835 |
if ( empty( MLAQuery::$search_parameters['mla_term_connector'] ) ) {
|
4836 |
MLAQuery::$search_parameters['mla_terms_search']['radio_terms'] = 'OR';
|
4837 |
} else {
|
4920 |
if ( class_exists( 'MLA_Polylang' ) ) {
|
4921 |
$query_arguments = apply_filters( 'mla_get_shortcode_attachments_final_terms', $query_arguments, $return_found_rows );
|
4922 |
}
|
4923 |
+
|
4924 |
MLAShortcodes::$mla_gallery_wp_query_object = new WP_Query;
|
4925 |
$attachments = MLAShortcodes::$mla_gallery_wp_query_object->query( $query_arguments );
|
4926 |
|
4935 |
}
|
4936 |
|
4937 |
if ( $return_found_rows ) {
|
4938 |
+
$attachments['found_rows'] = absint( MLAShortcodes::$mla_gallery_wp_query_object->found_posts );
|
4939 |
+
$attachments['max_num_pages'] = absint( MLAShortcodes::$mla_gallery_wp_query_object->max_num_pages );
|
4940 |
}
|
4941 |
|
4942 |
if ( ! empty( MLAQuery::$search_parameters ) ) {
|
5225 |
/*
|
5226 |
* Build an array of individual clauses that can be filtered
|
5227 |
*/
|
5228 |
+
$clauses = array( 'fields' => '', 'join' => '', 'where' => '', 'orderby' => '', 'limits' => '', );
|
5229 |
|
5230 |
/*
|
5231 |
* If we're not counting attachments per term, strip
|
5382 |
/*
|
5383 |
* For the inner/initial query, always select the most popular terms
|
5384 |
*/
|
5385 |
+
if ( $no_orderby = 'true' == (string) $arguments['no_orderby'] ) {
|
5386 |
$arguments['orderby'] = 'count';
|
5387 |
$arguments['order'] = 'DESC';
|
5388 |
}
|
5390 |
/*
|
5391 |
* Add sort order
|
5392 |
*/
|
5393 |
+
if ( 'true' == strtolower( $arguments['preserve_case'] ) ) {
|
5394 |
+
$binary_keys = array( 'name', 'slug', );
|
5395 |
+
} else {
|
5396 |
+
$binary_keys = array();
|
5397 |
}
|
5398 |
|
5399 |
+
$allowed_keys = array(
|
5400 |
+
'empty_orderby_default' => 'name',
|
5401 |
+
'count' => 'count',
|
5402 |
+
'id' => 'term_id',
|
5403 |
+
'name' => 'name',
|
5404 |
+
'random' => 'RAND()',
|
5405 |
+
'slug' => 'slug',
|
5406 |
+
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5407 |
|
5408 |
+
$clauses['orderby'] = 'ORDER BY ' . self::_validate_sql_orderby( $arguments, '', $allowed_keys, $binary_keys );
|
|
|
|
|
5409 |
|
5410 |
/*
|
5411 |
* Add pagination
|
5444 |
* If specifically told to omit the ORDER BY clause or the COUNT,
|
5445 |
* supply a sort order for the initial/inner query only
|
5446 |
*/
|
5447 |
+
if ( ! ( $no_orderby || $no_count ) ) {
|
5448 |
$query[] = 'ORDER BY count DESC, t.term_id ASC';
|
5449 |
}
|
5450 |
|
5460 |
* $final_clauses, if present, require an SQL subquery
|
5461 |
*/
|
5462 |
$final_clauses = array();
|
5463 |
+
|
5464 |
+
if ( 'ORDER BY count DESC' != $clauses['orderby'] ) {
|
5465 |
$final_clauses[] = $clauses['orderby'];
|
|
|
5466 |
}
|
5467 |
|
5468 |
if ( '' !== $clauses['limits'] ) {
|
5523 |
*/
|
5524 |
private static function _get_term_tree( &$terms, $arguments = array() ) {
|
5525 |
$term = current( $terms );
|
5526 |
+
|
5527 |
if ( empty( $term ) or ! isset( $term->parent ) ) {
|
5528 |
return array();
|
5529 |
}
|
5530 |
+
|
5531 |
/*
|
5532 |
* Set found_rows aside to be restored later
|
5533 |
*/
|
5541 |
$child_of = ! empty( $arguments['child_of'] ) ? absint( $arguments['child_of'] ) : NULL;
|
5542 |
$include_tree = ! empty( $arguments['include_tree'] ) ? wp_parse_id_list( $arguments['include_tree'] ) : NULL;
|
5543 |
$exclude_tree = empty( $include_tree ) && !empty( $arguments['exclude_tree'] ) ? wp_parse_id_list( $arguments['exclude_tree'] ) : NULL;
|
5544 |
+
|
5545 |
$depth = !empty( $arguments['depth'] ) ? absint( $arguments['depth'] ) : 0;
|
5546 |
$term_tree = array();
|
5547 |
$root_ids = array();
|
5585 |
$term_tree[ $taxonomy ] = array();
|
5586 |
$root_ids[ $taxonomy ] = array();
|
5587 |
}
|
5588 |
+
|
5589 |
while ( !empty( $tax_parents ) ) {
|
5590 |
foreach( $tax_parents as $parent_id => $children ) {
|
5591 |
foreach( $children as $index => $child ) {
|
5592 |
if ( ! array_key_exists( $child->term_id, $tax_parents ) ) {
|
5593 |
+
|
5594 |
if ( array_key_exists( $child->parent, $root_ids[ $taxonomy ] ) ) {
|
5595 |
// Found a root node - attach the leaf
|
5596 |
$term_tree[ $taxonomy ][ $root_ids[ $taxonomy ][ $child->parent ] ]->children[] = $child;
|
5608 |
$term_tree[ $taxonomy ][] = $child;
|
5609 |
$root_ids[ $taxonomy ][ $child->term_id ] = count( $term_tree[ $taxonomy ] ) - 1;
|
5610 |
} // Move the leaf node
|
5611 |
+
|
5612 |
unset( $tax_parents[ $parent_id ][ $index ] );
|
5613 |
if ( empty( $tax_parents[ $parent_id ] ) ) {
|
5614 |
unset( $tax_parents[ $parent_id ] );
|
5633 |
continue;
|
5634 |
}
|
5635 |
} // $child_of
|
5636 |
+
|
5637 |
if ( $include_tree ) {
|
5638 |
$result = self::_find_include_tree( $term_tree[ $taxonomy ], $include_tree );
|
5639 |
if ( false !== $result ) {
|
5643 |
continue;
|
5644 |
}
|
5645 |
} // $include_tree
|
5646 |
+
|
5647 |
if ( $exclude_tree ) {
|
5648 |
self::_remove_exclude_tree( $term_tree[ $taxonomy ], $exclude_tree );
|
5649 |
} // $include_tree
|
5650 |
+
|
5651 |
$term_count = 0;
|
5652 |
$root_limit = count( $term_tree[ $taxonomy ] );
|
5653 |
+
|
5654 |
if ( $root_limit ) {
|
5655 |
for ( $root_index = 0; $root_index < $root_limit; $root_index++ ) {
|
5656 |
if ( isset( $term_tree[ $taxonomy ][ $root_index ] ) ) {
|
5668 |
$term_tree[ $taxonomy ]['found_rows'] = $term_count;
|
5669 |
$all_terms_count += $term_count;
|
5670 |
}
|
5671 |
+
|
5672 |
$term_tree['found_rows'] = $all_terms_count;
|
5673 |
return $term_tree;
|
5674 |
} // _get_term_tree
|
5688 |
if ( $parent_id == $parent->term_id ) {
|
5689 |
return $parent;
|
5690 |
}
|
5691 |
+
|
5692 |
$result = self::_find_child_of( $parent->children, $parent_id );
|
5693 |
if ( false !== $result ) {
|
5694 |
return $result;
|
5695 |
}
|
5696 |
}
|
5697 |
+
|
5698 |
return false;
|
5699 |
} // _find_child_of
|
5700 |
|
5710 |
*/
|
5711 |
private static function _find_include_tree( &$terms, $include_tree ) {
|
5712 |
$new_tree = array();
|
5713 |
+
|
5714 |
foreach( $terms as $term ) {
|
5715 |
if ( in_array( $term->term_id, $include_tree ) ) {
|
5716 |
$new_tree[] = $term;
|
5725 |
if ( empty( $new_tree ) ) {
|
5726 |
return false;
|
5727 |
}
|
5728 |
+
|
5729 |
return $new_tree;
|
5730 |
} // _find_include_tree
|
5731 |
|
5765 |
private static function _count_term_children( &$parent, $depth = 0 ) {
|
5766 |
$term_count = 0;
|
5767 |
$child_level = $parent->level + 1;
|
5768 |
+
|
5769 |
// level is zero-based, depth is one-based
|
5770 |
if ( $depth && $child_level >= $depth ) {
|
5771 |
$parent->children = array();
|
5772 |
return 0;
|
5773 |
}
|
5774 |
+
|
5775 |
$child_limit = count( $parent->children );
|
5776 |
for ( $child_index = 0; $child_index < $child_limit; $child_index++ ) {
|
5777 |
if ( isset( $parent->children[ $child_index ] ) ) {
|
includes/class-mla-upload-list-table.php
CHANGED
@@ -627,7 +627,7 @@ class MLA_Upload_List_Table extends WP_List_Table {
|
|
627 |
$columns[ $key ][ 1 ] = true;
|
628 |
}
|
629 |
} else {
|
630 |
-
$columns['
|
631 |
}
|
632 |
|
633 |
return $columns;
|
627 |
$columns[ $key ][ 1 ] = true;
|
628 |
}
|
629 |
} else {
|
630 |
+
$columns['name'][ 1 ] = true;
|
631 |
}
|
632 |
|
633 |
return $columns;
|
includes/class-mla-upload-optional-list-table.php
CHANGED
@@ -115,7 +115,7 @@ class MLA_Upload_Optional_List_Table extends WP_List_Table {
|
|
115 |
}
|
116 |
|
117 |
/**
|
118 |
-
* Handler for filter 'get_user_option_managesettings_page_mla-settings-menu-
|
119 |
*
|
120 |
* Required because the screen.php get_hidden_columns function only uses
|
121 |
* the get_user_option result. Set when the file is loaded because the object
|
@@ -365,7 +365,7 @@ class MLA_Upload_Optional_List_Table extends WP_List_Table {
|
|
365 |
* @return array Column information,e.g., array(0 => 'ID_parent, 1 => 'title_name')
|
366 |
*/
|
367 |
function get_hidden_columns( ) {
|
368 |
-
$columns = get_user_option( 'managesettings_page_' . MLACoreOptions::MLA_SETTINGS_SLUG . '-
|
369 |
|
370 |
if ( is_array( $columns ) ) {
|
371 |
return $columns;
|
@@ -394,7 +394,7 @@ class MLA_Upload_Optional_List_Table extends WP_List_Table {
|
|
394 |
$columns[ $key ][ 1 ] = true;
|
395 |
}
|
396 |
} else {
|
397 |
-
$columns['
|
398 |
}
|
399 |
|
400 |
return $columns;
|
115 |
}
|
116 |
|
117 |
/**
|
118 |
+
* Handler for filter 'get_user_option_managesettings_page_mla-settings-menu-uploadcolumnshidden'
|
119 |
*
|
120 |
* Required because the screen.php get_hidden_columns function only uses
|
121 |
* the get_user_option result. Set when the file is loaded because the object
|
365 |
* @return array Column information,e.g., array(0 => 'ID_parent, 1 => 'title_name')
|
366 |
*/
|
367 |
function get_hidden_columns( ) {
|
368 |
+
$columns = get_user_option( 'managesettings_page_' . MLACoreOptions::MLA_SETTINGS_SLUG . '-uploadcolumnshidden' );
|
369 |
|
370 |
if ( is_array( $columns ) ) {
|
371 |
return $columns;
|
394 |
$columns[ $key ][ 1 ] = true;
|
395 |
}
|
396 |
} else {
|
397 |
+
$columns['name'][ 1 ] = true;
|
398 |
}
|
399 |
|
400 |
return $columns;
|
includes/mla-file-downloader.php
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Stand-alone file download handler for the [mla_gallery]
|
4 |
+
*
|
5 |
+
* @package Media Library Assistant
|
6 |
+
* @since 2.32
|
7 |
+
*/
|
8 |
+
|
9 |
+
/*
|
10 |
+
* Process [mla_gallery link=download] requests
|
11 |
+
*/
|
12 |
+
//@ini_set('error_log','C:\Program Files (x86)\Apache Software Foundation\Apache24\logs\php-errors.log');
|
13 |
+
|
14 |
+
require_once( pathinfo( __FILE__, PATHINFO_DIRNAME ) . '/class-mla-file-downloader.php' );
|
15 |
+
|
16 |
+
if ( isset( $_REQUEST['mla_download_file'] ) && isset( $_REQUEST['mla_download_type'] ) ) {
|
17 |
+
MLAFileDownloader::$mla_debug = isset( $_REQUEST['mla_debug'] ) && 'log' == $_REQUEST['mla_debug'];
|
18 |
+
MLAFileDownloader::mla_process_download_file();
|
19 |
+
}
|
20 |
+
|
21 |
+
MLAFileDownloader::_mla_die( 'MLA File Download parameters not set', __LINE__, 500 );
|
22 |
+
?>
|
includes/mla-plugin-loader.php
CHANGED
@@ -25,6 +25,13 @@ if ( ! defined('MLA_DEBUG_LEVEL') ) {
|
|
25 |
define('MLA_DEBUG_LEVEL', 0);
|
26 |
}
|
27 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
/**
|
29 |
* Accumulates error messages from name conflict tests
|
30 |
*
|
@@ -65,6 +72,7 @@ if ( ! empty( $mla_plugin_loader_error_messages ) ) {
|
|
65 |
* Minimum support functions required by all other components
|
66 |
*/
|
67 |
require_once( MLA_PLUGIN_PATH . 'includes/class-mla-core.php' );
|
|
|
68 |
add_action( 'plugins_loaded', 'MLACore::mla_plugins_loaded_action', 0x7FFFFFFF );
|
69 |
add_action( 'init', 'MLACore::initialize', 0x7FFFFFFF );
|
70 |
|
@@ -78,8 +86,6 @@ if ( ! empty( $mla_plugin_loader_error_messages ) ) {
|
|
78 |
}
|
79 |
|
80 |
if( defined('DOING_AJAX') && DOING_AJAX ) {
|
81 |
-
//error_log( __LINE__ . ' plugin loader request = ' . var_export( $_REQUEST, true ), 0 );
|
82 |
-
|
83 |
/*
|
84 |
* Ajax handlers
|
85 |
*/
|
@@ -90,17 +96,23 @@ if ( ! empty( $mla_plugin_loader_error_messages ) ) {
|
|
90 |
* Quick and Bulk Edit requires full support for content templates, etc.
|
91 |
* IPTC/EXIF and Custom Field mapping require full support, too.
|
92 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
93 |
$ajax_only = true;
|
94 |
if ( isset( $_REQUEST['action'] ) ) {
|
95 |
-
if ( in_array( $_REQUEST['action'],
|
96 |
$ajax_only = false;
|
97 |
}
|
98 |
}
|
99 |
-
|
100 |
//Look for WPML flat taxonomy autocomplete
|
101 |
if ( isset( $_GET['action'] ) && ( 'ajax-tag-search' == $_GET['action'] ) ) {
|
102 |
global $sitepress;
|
103 |
-
|
104 |
if ( is_object( $sitepress ) ) {
|
105 |
$ajax_only = false;
|
106 |
}
|
@@ -109,7 +121,7 @@ if ( ! empty( $mla_plugin_loader_error_messages ) ) {
|
|
109 |
if ( $ajax_only ) {
|
110 |
require_once( MLA_PLUGIN_PATH . 'includes/class-mla-data-query.php' );
|
111 |
add_action( 'init', 'MLAQuery::initialize', 0x7FFFFFFF );
|
112 |
-
|
113 |
/*
|
114 |
* Other plugins such as "No Cache AJAX Widgets" might need shortcodes
|
115 |
*/
|
@@ -125,7 +137,7 @@ if ( ! empty( $mla_plugin_loader_error_messages ) ) {
|
|
125 |
*/
|
126 |
require_once( MLA_PLUGIN_PATH . 'includes/class-mla-data-query.php' );
|
127 |
add_action( 'init', 'MLAQuery::initialize', 0x7FFFFFFF );
|
128 |
-
|
129 |
require_once( MLA_PLUGIN_PATH . 'includes/class-mla-data.php' );
|
130 |
add_action( 'init', 'MLAData::initialize', 0x7FFFFFFF );
|
131 |
|
@@ -186,9 +198,15 @@ if ( ! empty( $mla_plugin_loader_error_messages ) ) {
|
|
186 |
require_once( MLA_PLUGIN_PATH . 'includes/class-mla-upload-optional-list-table.php' );
|
187 |
|
188 |
/*
|
189 |
-
* Custom list table package for the
|
190 |
* Doesn't need an initialize function; has a constructor.
|
191 |
*/
|
192 |
require_once( MLA_PLUGIN_PATH . 'includes/class-mla-upload-list-table.php' );
|
|
|
|
|
|
|
|
|
|
|
|
|
193 |
}
|
194 |
?>
|
25 |
define('MLA_DEBUG_LEVEL', 0);
|
26 |
}
|
27 |
|
28 |
+
if ( ! defined('MLA_AJAX_EXCEPTIONS') ) {
|
29 |
+
/**
|
30 |
+
* Activates full MLA load for specified AJAX actions; can be set in wp-config.php
|
31 |
+
*/
|
32 |
+
define('MLA_AJAX_EXCEPTIONS', '');
|
33 |
+
}
|
34 |
+
|
35 |
/**
|
36 |
* Accumulates error messages from name conflict tests
|
37 |
*
|
72 |
* Minimum support functions required by all other components
|
73 |
*/
|
74 |
require_once( MLA_PLUGIN_PATH . 'includes/class-mla-core.php' );
|
75 |
+
//add_action( 'plugins_loaded', 'MLACore::mla_plugins_loaded_action_wpml', 1 );
|
76 |
add_action( 'plugins_loaded', 'MLACore::mla_plugins_loaded_action', 0x7FFFFFFF );
|
77 |
add_action( 'init', 'MLACore::initialize', 0x7FFFFFFF );
|
78 |
|
86 |
}
|
87 |
|
88 |
if( defined('DOING_AJAX') && DOING_AJAX ) {
|
|
|
|
|
89 |
/*
|
90 |
* Ajax handlers
|
91 |
*/
|
96 |
* Quick and Bulk Edit requires full support for content templates, etc.
|
97 |
* IPTC/EXIF and Custom Field mapping require full support, too.
|
98 |
*/
|
99 |
+
$ajax_exceptions = array( MLACore::JAVASCRIPT_INLINE_EDIT_SLUG, 'mla-inline-mapping-iptc-exif-scripts', 'mla-inline-mapping-custom-scripts', 'mla-polylang-quick-translate', 'mla-inline-edit-upload-scripts', 'mla-inline-edit-view-scripts', 'upload-attachment' );
|
100 |
+
|
101 |
+
if ( MLA_AJAX_EXCEPTIONS ) {
|
102 |
+
$ajax_exceptions = array_merge( $ajax_exceptions, explode( ',', MLA_AJAX_EXCEPTIONS ) );
|
103 |
+
}
|
104 |
+
|
105 |
$ajax_only = true;
|
106 |
if ( isset( $_REQUEST['action'] ) ) {
|
107 |
+
if ( in_array( $_REQUEST['action'], $ajax_exceptions ) ) {
|
108 |
$ajax_only = false;
|
109 |
}
|
110 |
}
|
111 |
+
|
112 |
//Look for WPML flat taxonomy autocomplete
|
113 |
if ( isset( $_GET['action'] ) && ( 'ajax-tag-search' == $_GET['action'] ) ) {
|
114 |
global $sitepress;
|
115 |
+
|
116 |
if ( is_object( $sitepress ) ) {
|
117 |
$ajax_only = false;
|
118 |
}
|
121 |
if ( $ajax_only ) {
|
122 |
require_once( MLA_PLUGIN_PATH . 'includes/class-mla-data-query.php' );
|
123 |
add_action( 'init', 'MLAQuery::initialize', 0x7FFFFFFF );
|
124 |
+
|
125 |
/*
|
126 |
* Other plugins such as "No Cache AJAX Widgets" might need shortcodes
|
127 |
*/
|
137 |
*/
|
138 |
require_once( MLA_PLUGIN_PATH . 'includes/class-mla-data-query.php' );
|
139 |
add_action( 'init', 'MLAQuery::initialize', 0x7FFFFFFF );
|
140 |
+
|
141 |
require_once( MLA_PLUGIN_PATH . 'includes/class-mla-data.php' );
|
142 |
add_action( 'init', 'MLAData::initialize', 0x7FFFFFFF );
|
143 |
|
198 |
require_once( MLA_PLUGIN_PATH . 'includes/class-mla-upload-optional-list-table.php' );
|
199 |
|
200 |
/*
|
201 |
+
* Custom list table package for the Upload MIME Type Views.
|
202 |
* Doesn't need an initialize function; has a constructor.
|
203 |
*/
|
204 |
require_once( MLA_PLUGIN_PATH . 'includes/class-mla-upload-list-table.php' );
|
205 |
+
|
206 |
+
/*
|
207 |
+
* Custom list table package for the Example Plugin Views.
|
208 |
+
* Doesn't need an initialize function; has a constructor.
|
209 |
+
*/
|
210 |
+
require_once( MLA_PLUGIN_PATH . 'includes/class-mla-example-list-table.php' );
|
211 |
}
|
212 |
?>
|
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 |
*/
|
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.
|
20 |
Author URI: http://fairtradejudaica.org/our-story/staff/
|
21 |
|
22 |
Copyright 2011-2016 David Lingren
|
@@ -113,6 +113,7 @@ $mla_name_conflict_candidates =
|
|
113 |
'MLAData_Source' => 'class',
|
114 |
'MLAData' => 'class',
|
115 |
'MLAEdit' => 'class',
|
|
|
116 |
'MLAImageProcessor' => 'class',
|
117 |
'MLAMutex' => 'class',
|
118 |
'MLA_List_Table' => 'class',
|
@@ -128,6 +129,7 @@ $mla_name_conflict_candidates =
|
|
128 |
'MLAShortcode_Support' => 'class',
|
129 |
'MLAShortcodes' => 'class',
|
130 |
'MLA_Thumbnail' => 'class',
|
|
|
131 |
'MLA_Upload_List_Table' => 'class',
|
132 |
'MLA_Upload_Optional_List_Table' => 'class',
|
133 |
'MLA_View_List_Table' => 'class',
|
6 |
* will the rest of the plugin be loaded and run.
|
7 |
*
|
8 |
* @package Media Library Assistant
|
9 |
+
* @version 2.32
|
10 |
*/
|
11 |
|
12 |
/*
|
16 |
Author: David Lingren, Fair Trade Judaica
|
17 |
Text Domain: media-library-assistant
|
18 |
Domain Path: /languages
|
19 |
+
Version: 2.32
|
20 |
Author URI: http://fairtradejudaica.org/our-story/staff/
|
21 |
|
22 |
Copyright 2011-2016 David Lingren
|
113 |
'MLAData_Source' => 'class',
|
114 |
'MLAData' => 'class',
|
115 |
'MLAEdit' => 'class',
|
116 |
+
'MLA_Example_List_Table' => 'class',
|
117 |
'MLAImageProcessor' => 'class',
|
118 |
'MLAMutex' => 'class',
|
119 |
'MLA_List_Table' => 'class',
|
129 |
'MLAShortcode_Support' => 'class',
|
130 |
'MLAShortcodes' => 'class',
|
131 |
'MLA_Thumbnail' => 'class',
|
132 |
+
'MLA_Upgrader_Skin' => 'class',
|
133 |
'MLA_Upload_List_Table' => 'class',
|
134 |
'MLA_Upload_Optional_List_Table' => 'class',
|
135 |
'MLA_View_List_Table' => 'class',
|
js/mla-media-modal-scripts.js
CHANGED
@@ -112,6 +112,12 @@ var wp, wpAjax, ajaxurl, jQuery, _,
|
|
112 |
return;
|
113 |
}
|
114 |
|
|
|
|
|
|
|
|
|
|
|
|
|
115 |
/*
|
116 |
* Parse outgoing Ajax requests, look for the 'query-attachments' action and stuff
|
117 |
* our arguments into the "s" field because MMMW only monitors that one field.
|
@@ -462,13 +468,19 @@ var wp, wpAjax, ajaxurl, jQuery, _,
|
|
462 |
id: 'media-attachment-term-filters',
|
463 |
|
464 |
createFilters: function() {
|
465 |
-
var state = this.controller._state, index,
|
466 |
filters = {};
|
467 |
|
468 |
_.each( mlaModal.settings.termsText || {}, function( text, key ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
469 |
filters[ key ] = {
|
470 |
text: text,
|
471 |
-
props: { s: { 'mla_filter_term':
|
472 |
};
|
473 |
});
|
474 |
|
@@ -757,9 +769,10 @@ wp.media.view.MlaSearch.on( 'all', MlaSearchOn );
|
|
757 |
wp.media.view.AttachmentsBrowser = wp.media.view.AttachmentsBrowser.extend({
|
758 |
/* for debug : trace every event triggered in this.controller * /
|
759 |
toolbarEvent: function( eventName ) {
|
760 |
-
var id = this.model.attributes.id;
|
761 |
-
console.log('toolbarEvent this.model.attributes: ', JSON.stringify( this.model.attributes ));
|
762 |
-
console.log('toolbarEvent( ', id, ' ) Event: ', eventName);
|
|
|
763 |
}, // */
|
764 |
|
765 |
createToolbar: function() {
|
@@ -772,17 +785,18 @@ wp.media.view.MlaSearch.on( 'all', MlaSearchOn );
|
|
772 |
mlaModal.settings.query[ state ].searchFields = _.clone( mlaModal.settings.query.initial.searchFields );
|
773 |
}
|
774 |
|
775 |
-
/* for debug : trace every event triggered in the this.controller * /
|
776 |
-
this.stopListening( this.controller );
|
777 |
-
this.listenTo( this.controller, 'all', this.toolbarEvent );
|
778 |
-
// */
|
779 |
-
|
780 |
// Apply the original method to create the toolbar
|
781 |
//wp.media.view.AttachmentsBrowser.__super__.createToolbar.apply( this, arguments );
|
782 |
mlaAttachmentsBrowser.prototype.createToolbar.apply( this, arguments );
|
783 |
mlaModal.utility.mlaAttachmentsBrowser = this;
|
784 |
filters = this.options.filters;
|
785 |
|
|
|
|
|
|
|
|
|
|
|
|
|
786 |
// Enhanced Media Library (eml) plugin has CSS styles that require this patch
|
787 |
if ( typeof window.eml !== "undefined" ) {
|
788 |
$( '.media-toolbar', this.$el ).css( 'overflow', 'hidden' );
|
@@ -854,12 +868,12 @@ this.listenTo( this.controller, 'all', this.toolbarEvent );
|
|
854 |
},
|
855 |
|
856 |
hideDefaultSearch: function() {
|
857 |
-
var defaultSearch = $( '#media-search-input',
|
858 |
-
|
859 |
if ( 0 === defaultSearch.length ) {
|
860 |
-
defaultSearch = $( 'div.media-toolbar-primary > input.search',
|
861 |
}
|
862 |
-
|
863 |
defaultSearch.hide();
|
864 |
},
|
865 |
|
@@ -1289,7 +1303,7 @@ this.listenTo( this.controller, 'all', this.toolbarEvent );
|
|
1289 |
//wp.media.model.Selection.__super__.initialize.apply( this, arguments );
|
1290 |
mlaSelection.prototype.initialize.apply( this, arguments );
|
1291 |
|
1292 |
-
/* for debug : trace every event triggered in the wp.media.model.Selection
|
1293 |
this.stopListening( this );
|
1294 |
this.listenTo( this, 'all', this.selectionEvent );
|
1295 |
// */
|
112 |
return;
|
113 |
}
|
114 |
|
115 |
+
// Toolset Views editor locks uploads to "Uploaded to this post"
|
116 |
+
mlaModal.settings.pagenow = typeof pagenow === 'undefined' ? 'unknown' : pagenow;
|
117 |
+
if ( mlaModal.settings.pagenow === 'toolset_page_views-editor' ){
|
118 |
+
return;
|
119 |
+
}
|
120 |
+
|
121 |
/*
|
122 |
* Parse outgoing Ajax requests, look for the 'query-attachments' action and stuff
|
123 |
* our arguments into the "s" field because MMMW only monitors that one field.
|
468 |
id: 'media-attachment-term-filters',
|
469 |
|
470 |
createFilters: function() {
|
471 |
+
var state = this.controller._state, index, filterTerm,
|
472 |
filters = {};
|
473 |
|
474 |
_.each( mlaModal.settings.termsText || {}, function( text, key ) {
|
475 |
+
if ( mlaModal.settings.termsCustom ) {
|
476 |
+
filterTerm = mlaModal.settings.termsValue[ key ];
|
477 |
+
} else {
|
478 |
+
filterTerm = parseInt( mlaModal.settings.termsValue[ key ] );
|
479 |
+
}
|
480 |
+
|
481 |
filters[ key ] = {
|
482 |
text: text,
|
483 |
+
props: { s: { 'mla_filter_term': filterTerm } }
|
484 |
};
|
485 |
});
|
486 |
|
769 |
wp.media.view.AttachmentsBrowser = wp.media.view.AttachmentsBrowser.extend({
|
770 |
/* for debug : trace every event triggered in this.controller * /
|
771 |
toolbarEvent: function( eventName ) {
|
772 |
+
//var id = this.model.attributes.id;
|
773 |
+
//console.log('toolbarEvent this.model.attributes: ', JSON.stringify( this.model.attributes ));
|
774 |
+
//console.log('toolbarEvent( ', id, ' ) Event: ', eventName);
|
775 |
+
console.log('toolbarEvent( ) Event: ', eventName);
|
776 |
}, // */
|
777 |
|
778 |
createToolbar: function() {
|
785 |
mlaModal.settings.query[ state ].searchFields = _.clone( mlaModal.settings.query.initial.searchFields );
|
786 |
}
|
787 |
|
|
|
|
|
|
|
|
|
|
|
788 |
// Apply the original method to create the toolbar
|
789 |
//wp.media.view.AttachmentsBrowser.__super__.createToolbar.apply( this, arguments );
|
790 |
mlaAttachmentsBrowser.prototype.createToolbar.apply( this, arguments );
|
791 |
mlaModal.utility.mlaAttachmentsBrowser = this;
|
792 |
filters = this.options.filters;
|
793 |
|
794 |
+
/* for debug : trace every event triggered in the this.controller * /
|
795 |
+
this.controller.off( null, this.toolbarEvent );
|
796 |
+
this.controller.on( 'all', this.toolbarEvent );
|
797 |
+
console.log( 'listening to controller events' );
|
798 |
+
// */
|
799 |
+
|
800 |
// Enhanced Media Library (eml) plugin has CSS styles that require this patch
|
801 |
if ( typeof window.eml !== "undefined" ) {
|
802 |
$( '.media-toolbar', this.$el ).css( 'overflow', 'hidden' );
|
868 |
},
|
869 |
|
870 |
hideDefaultSearch: function() {
|
871 |
+
var defaultSearch = $( '#media-search-input', mlaModal.settings.$el );
|
872 |
+
|
873 |
if ( 0 === defaultSearch.length ) {
|
874 |
+
defaultSearch = $( 'div.media-toolbar-primary > input.search', mlaModal.settings.$el )
|
875 |
}
|
876 |
+
|
877 |
defaultSearch.hide();
|
878 |
},
|
879 |
|
1303 |
//wp.media.model.Selection.__super__.initialize.apply( this, arguments );
|
1304 |
mlaSelection.prototype.initialize.apply( this, arguments );
|
1305 |
|
1306 |
+
/* for debug : trace every event triggered in the wp.media.model.Selection * /
|
1307 |
this.stopListening( this );
|
1308 |
this.listenTo( this, 'all', this.selectionEvent );
|
1309 |
// */
|
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(d){var c=wp.media.view.AttachmentsBrowser,b=wp.media.view.AttachmentCompat,a=wp.media.model.Selection;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(k,g){var j=mlaModal.settings.state,i,f,h,e;if(_.isObject(k)){g=k}else{g=g||{};g.data=_.extend(g.data||{},{action:k})}if("query-attachments"==g.data.action){i=g.data.query;f=typeof i.s;if("object"==f){h=i.s}else{if("string"==f){h={mla_search_value:i.s}}else{h={mla_search_value:""}}}if("undefined"!=typeof i.post_mime_type){mlaModal.settings.query[j].filterMime=i.post_mime_type}else{mlaModal.settings.query[j].filterMime="all"}if("undefined"!=typeof h.mla_filter_month){mlaModal.settings.query[j].filterMonth=h.mla_filter_month}else{if("undefined"!=typeof i.year){mlaModal.settings.query[j].filterMonth=(100*i.year)+(1*i.monthnum)}else{}}if("undefined"!=typeof h.mla_filter_term){mlaModal.settings.query[j].filterTerm=h.mla_filter_term}if("undefined"!=typeof h.mla_search_value){mlaModal.settings.query[j].searchValue=h.mla_search_value}e={mla_filter_month:mlaModal.settings.query[j].filterMonth,mla_filter_term:mlaModal.settings.query[j].filterTerm,mla_terms_search:mlaModal.settings.query[j].termsSearch,mla_search_clicks:mlaModal.settings.query[j].searchClicks,mla_search_value:mlaModal.settings.query[j].searchValue,mla_search_fields:mlaModal.settings.query[j].searchFields,mla_search_connector:mlaModal.settings.query[j].searchConnector};mlaModal.settings.query[j].termsSearch="";d("#mla-terms-search-input").html("").val("");g.data.query.s=e}return mlaModal.utility.originalMediaAjax.call(this,g)};if(mlaModal.settings.enableMimeTypes){wp.media.view.AttachmentFilters.Mla=wp.media.view.AttachmentFilters.extend({createFilters:function(){var f=this.controller._state,e={};_.each(mlaModal.settings.allMimeTypes||{},function(h,g){if(("grid"===mlaModal.settings.screen)||("trash"!==g)){e[g]={text:h,props:{type:g,uploadedTo:null,orderby:"date",order:"DESC"}}}});e.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){e.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=e;if("undefined"===typeof e[mlaModal.settings.query[f].filterMime]){mlaModal.settings.query[f].filterMime="all"}if(mlaModal.settings.query[f].filterMime!="all"){this.model.set(e[mlaModal.settings.query[f].filterMime].props,{silent:false})}},select:function(){var h=this.controller._state,e=this.model,g=mlaModal.settings.query[h].filterMime,f=e.toJSON();if(false===mlaModal.settings.enableSearchBox){if("string"==typeof f.search){mlaModal.settings.query[h].searchValue=f.search}else{mlaModal.settings.query[h].searchValue=""}}_.find(this.filters,function(j,k){var i=_.all(j.props,function(m,l){return m===(_.isUndefined(f[l])?null:f[l])});if(i){return g=k}});this.$el.val(g)},change:function(){var f=d(this.el).closest("div.media-toolbar"),e=this.filters[this.el.value];if(e){this.model.set(e.props,{silent:true});d("#mla-search-submit",f).click()}}});wp.media.view.AttachmentFilters.MlaUploaded=wp.media.view.AttachmentFilters.extend({createFilters:function(){var f=this.model.get("type"),e=wp.media.view.settings.mimeTypes,i,h=this.controller._state,g={};if(e&&f){i=e[f]}_.each(mlaModal.settings.uploadMimeTypes||{},function(k,j){if(("grid"===mlaModal.settings.screen)||("trash"!==j)){g[j]={text:k,props:{type:j,uploadedTo:null,orderby:"date",order:"DESC"}}}});g.all={text:i||wp.media.view.l10n.allMediaItems,props:{uploadedTo:null,orderby:"date",order:"DESC"},priority:10};g.uploaded={text:wp.media.view.l10n.uploadedToThisPost,props:{type:null,uploadedTo:wp.media.view.settings.post.id,orderby:"menuOrder",order:"ASC"},priority:20};g.unattached={text:wp.media.view.l10n.unattached,props:{uploadedTo:0,orderby:"menuOrder",order:"ASC"},priority:50};this.filters=g;if("undefined"===typeof g[mlaModal.settings.query[h].filterUploaded]){mlaModal.settings.query[h].filterUploaded="all"}if(mlaModal.settings.query[h].filterUploaded!="all"){this.model.set(g[mlaModal.settings.query[h].filterUploaded].props,{silent:false})}},select:function(){var h=this.controller._state,e=this.model,g=mlaModal.settings.query[h].filterMime,f=e.toJSON();if(false===mlaModal.settings.enableSearchBox){if("string"==typeof f.search){mlaModal.settings.query[h].searchValue=f.search}else{mlaModal.settings.query[h].searchValue=""}}_.find(this.filters,function(j,k){var i=_.all(j.props,function(m,l){return m===(_.isUndefined(f[l])?null:f[l])});if(i){return g=k}});this.$el.val(g)},change:function(){var f=d(this.el).closest("div.media-toolbar"),e=this.filters[this.el.value];if(e){this.model.set(e.props,{silent:true});d("#mla-search-submit",f).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 f=this.controller._state,e={};_.each(mlaModal.settings.months||{},function(h,g){e[g]={text:h,props:{s:{mla_filter_month:g}}}});this.filters=e;if("undefined"===typeof e[mlaModal.settings.query[f].filterMonth]){mlaModal.settings.query[f].filterMonth=0}if(mlaModal.settings.query[f].filterMonth>0){this.model.set(e[mlaModal.settings.query[f].filterMonth].props,{silent:false})}},select:function(){var h=this.controller._state,e=this.model,g=mlaModal.settings.query[h].filterMonth,f=e.toJSON();if(_.isUndefined(f.s)){f.s={}}if(false===mlaModal.settings.enableSearchBox){if("string"==typeof f.search){mlaModal.settings.query[h].searchValue=f.search}else{mlaModal.settings.query[h].searchValue=""}}if(_.isUndefined(f.s.mla_filter_month)){f.s.mla_filter_month=mlaModal.settings.query[h].filterMonth}else{mlaModal.settings.query[h].filterMonth=f.s.mla_filter_month}_.find(this.filters,function(j,k){var i=_.all(j.props,function(l){return l.mla_filter_month==mlaModal.settings.query[h].filterMonth});if(i){return g=k}});this.$el.val(g)},change:function(){var e=this.filters[this.el.value],f;if(e){f={s:{mla_filter_month:e.props.s.mla_filter_month}};this.model.set(f)}}})}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 g=this.controller._state,e,f={};_.each(mlaModal.settings.termsText||{},function(i,h){f[h]={text:i,props:{s:{mla_filter_term:parseInt(mlaModal.settings.termsValue[h])}}}});this.filters=f;e=_.indexOf(mlaModal.settings.termsValue,mlaModal.settings.query[g].filterTerm);if(e>0){this.model.set(f[e].props,{silent:false})}},select:function(){var h=this.controller._state,e=this.model,g=mlaModal.settings.query[h].filterTerm,f=e.toJSON();if(_.isUndefined(f.s)){f.s={}}if(false===mlaModal.settings.enableSearchBox){if("string"==typeof f.search){mlaModal.settings.query[h].searchValue=f.search}else{mlaModal.settings.query[h].searchValue=""}}if(_.isUndefined(f.s.mla_filter_term)){f.s.mla_filter_term=mlaModal.settings.query[h].filterTerm}else{mlaModal.settings.query[h].filterTerm=f.s.mla_filter_term}_.find(this.filters,function(j,k){var i=_.all(j.props,function(l){return l.mla_filter_term==mlaModal.settings.query[h].filterTerm});if(i){return g=k}});this.$el.val(g)},change:function(){var e=this.filters[this.el.value],f;if(e){f={s:{mla_filter_term:e.props.s.mla_filter_term}};this.model.set(f)}}})}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(f){var e=d(this.el).closest("div.media-toolbar");if(("click"==f.type)&&("mla_terms_search"===f.target.name)){mlaTaxonomy.termsSearch.open();d("#mla-terms-search-form").off("submit");d("#mla-terms-search-form").submit(function(j){var g,i,h={phrases:"",taxonomies:[]};j.preventDefault();g=d("#mla-terms-search-form").serializeArray();for(i=0;i<g.length;i++){switch(g[i].name){case"mla_terms_search[phrases]":h.phrases=g[i].value;break;case"mla_terms_search[radio_phrases]":h.radio_phrases=g[i].value;break;case"mla_terms_search[radio_terms]":h.radio_terms=g[i].value;break;case"mla_terms_search[taxonomies][]":h.taxonomies[h.taxonomies.length]=g[i].value;break}}mlaModal.settings.query[mlaModal.settings.state].termsSearch=h;d("#mla-search-submit",e).click();return false});d("#mla-terms-search-input").keypress(function(g){if(13==g.which){g.preventDefault();d("#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 e=this.controller._state;if("undefined"===typeof mlaModal.settings.query[e]){mlaModal.settings.query[e]=_.clone(mlaModal.settings.query.initial);mlaModal.settings.query[e].searchFields=_.clone(mlaModal.settings.query.initial.searchFields)}},render:function(){var f=this.controller._state,e=_.extend(mlaModal.strings,mlaModal.settings.query[f]);this.$el.html(this.template(e));return this},search:function(g){var h=this.controller._state,e,i,f;if(("input"==g.type)&&("s[mla_search_value]"==g.target.name)){mlaModal.settings.query[h].searchValue=g.target.value;return}if(("click"==g.type)&&("mla_search_submit"!=g.target.name)){return}switch(g.target.name){case"s[mla_search_value]":mlaModal.settings.query[h].searchValue=g.target.value;break;case"mla_search_submit":e={mla_filter_month:mlaModal.settings.query[h].filterMonth,mla_filter_term:mlaModal.settings.query[h].filterTerm,mla_terms_search:mlaModal.settings.query[h].termsSearch,mla_search_clicks:mlaModal.settings.query[h].searchClicks++,mla_search_value:mlaModal.settings.query[h].searchValue,mla_search_fields:mlaModal.settings.query[h].searchFields,mla_search_connector:mlaModal.settings.query[h].searchConnector};this.model.set({s:e});break;case"s[mla_search_connector]":mlaModal.settings.query[h].searchConnector=g.target.value;break;case"s[mla_search_title]":i=mlaModal.settings.query[h].searchFields;f=i.indexOf("title");if(-1==f){i.push("title")}else{i.splice(f,1)}mlaModal.settings.query[h].searchFields=i;break;case"s[mla_search_name]":f=mlaModal.settings.query[h].searchFields.indexOf("name");if(-1==f){mlaModal.settings.query[h].searchFields.push("name")}else{mlaModal.settings.query[h].searchFields.splice(f,1)}break;case"s[mla_search_alt_text]":f=mlaModal.settings.query[h].searchFields.indexOf("alt-text");if(-1==f){mlaModal.settings.query[h].searchFields.push("alt-text")}else{mlaModal.settings.query[h].searchFields.splice(f,1)}break;case"s[mla_search_excerpt]":f=mlaModal.settings.query[h].searchFields.indexOf("excerpt");if(-1==f){mlaModal.settings.query[h].searchFields.push("excerpt")}else{mlaModal.settings.query[h].searchFields.splice(f,1)}break;case"s[mla_search_content]":f=mlaModal.settings.query[h].searchFields.indexOf("content");if(-1==f){mlaModal.settings.query[h].searchFields.push("content")}else{mlaModal.settings.query[h].searchFields.splice(f,1)}break;case"s[mla_search_terms]":f=mlaModal.settings.query[h].searchFields.indexOf("terms");if(-1==f){mlaModal.settings.query[h].searchFields.push("terms")}else{mlaModal.settings.query[h].searchFields.splice(f,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 f=this.controller._state,e={mla_filter_month:mlaModal.settings.query[f].filterMonth,mla_filter_term:mlaModal.settings.query[f].filterTerm,mla_terms_search:mlaModal.settings.query[f].termsSearch,mla_search_clicks:mlaModal.settings.query[f].searchClicks++,mla_search_value:mlaModal.settings.query[f].searchValue,mla_search_fields:mlaModal.settings.query[f].searchFields,mla_search_connector:mlaModal.settings.query[f].searchConnector};this.model.set({s:e})}})}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 e,f=this.controller._state;mlaModal.settings.state=f;mlaModal.settings.$el=this.controller.$el;if("undefined"===typeof mlaModal.settings.query[f]){mlaModal.settings.query[f]=_.clone(mlaModal.settings.query.initial);mlaModal.settings.query[f].searchFields=_.clone(mlaModal.settings.query.initial.searchFields)}c.prototype.createToolbar.apply(this,arguments);mlaModal.utility.mlaAttachmentsBrowser=this;e=this.options.filters;if(typeof window.eml!=="undefined"){d(".media-toolbar",this.$el).css("overflow","hidden")}if(("all"===e)&&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(("uploaded"===e)&&mlaModal.settings.enableMimeTypes){this.toolbar.unset("filters",{silent:true});this.toolbar.set("filters",new wp.media.view.AttachmentFilters.MlaUploaded({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.controller.on("content:activate",this.hideDefaultSearch);this.controller.on("edit:activate",this.hideDefaultSearch);this.controller.on("router:render",this.hideDefaultSearch);this.controller.on("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(){var e=d("#media-search-input",this.el);if(0===e.length){e=d("div.media-toolbar-primary > input.search",this.el)}e.hide()},updateFilters:function(e,f){var g={};if(this.options.search&&mlaModal.settings.enableTermsDropdown&&mlaModal.settings.termsTaxonomy==e){g=mlaModal.utility.parseTermsOptions(f);mlaModal.settings.termsClass=g.termsClass;mlaModal.settings.termsText=g.termsText;mlaModal.settings.termsValue=g.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(k){var j={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]]},g=2,e,f,i=/\<option(( class=\"([^\"]+)\" )|( ))value=((\'([^\']+)\')|(\"([^\"]+)\"))([^\>]*)\>([^\<]*)\<.*/g,h=[];if("object"===typeof k){g=mlaModal.settings.termsValue.length;for(e=2;e<g;e++){h[e]={termsClass:mlaModal.settings.termsClass[e],termsText:mlaModal.settings.termsText[e],termsValue:mlaModal.settings.termsValue[e]};if("undefined"!==typeof k[mlaModal.settings.termsValue[e]]){delete k[mlaModal.settings.termsValue[e]]}}for(f in k){h[e++]={termsClass:"level-0",termsText:k[f],termsValue:f.toString()}}if(g===e){return{termsClass:mlaModal.settings.termsClass,termsText:mlaModal.settings.termsText,termsValue:mlaModal.settings.termsValue}}h.sort(function(m,l){if(m.termsText>l.termsText){return 1}else{if(m.termsText<l.termsText){return -1}else{return 0}}});e=2;for(f in h){j.termsClass[e]=h[f].termsClass;j.termsText[e]=h[f].termsText;j.termsValue[e++]=h[f].termsValue}return j}h=i.exec(k);while(null!==(h=i.exec(k))){j.termsClass[g]=h[3];j.termsValue[g]=("undefined"===typeof h[6])?h[9]:h[7];j.termsText[g++]=h[11].replace(" ",mlaModal.settings.termsIndent)}return j};mlaModal.utility.arrayCleanup=function(g){var f=[],e=("string"===typeof g);if(e){g=g.split(mlaModal.settings.comma)}jQuery.each(g,function(h,i){i=jQuery.trim(i);if(i&&jQuery.inArray(i,f)==-1){f.push(i)}});f.sort();if(e){f=f.join(mlaModal.settings.comma)}return f};mlaModal.utility.parseTaxonomyId=function(f){var e=f.split("-");e.shift();e.shift();return e.join("-")};mlaModal.tagBox={cleanTags:function(f){var e=mlaModal.settings.comma;if(","!==e){f=f.replace(new RegExp(e,"g"),",")}f=f.replace(/\s*,\s*/g,",").replace(/,+/g,",").replace(/[,\s]+$/,"").replace(/^[,\s]+/,"");if(","!==e){f=f.replace(/,/g,e)}return f},parseTags:function(h){var l=h.id,f=l.split("-check-num-")[1],i=d(h).closest(".tagsdiv"),k=i.find(".the-tags"),e=mlaModal.settings.comma,g=k.val().split(e),j=[];delete g[f];d.each(g,function(m,n){n=d.trim(n);if(n){j.push(n)}});k.val(this.cleanTags(j.join(e)));this.quickClicks(i);return false},quickClicks:function(g){var j=d(".the-tags",g),h=d(".tagchecklist",g),i=d(g).attr("id"),e,f;if(!j.length){return}f=j.prop("disabled");e=j.val().split(mlaModal.settings.comma);h.empty();d.each(e,function(l,n){var m,k;n=d.trim(n);if(!n){return}m=d("<span />").text(n);if(!f){k=d('<a id="'+i+"-check-num-"+l+'" class="ntdelbutton">X</a>');k.click(function(){mlaModal.tagBox.parseTags(this)});m.prepend(" ").prepend(k)}h.append(m)})},flushTags:function(k,h,g){var m,e,i,n=d(".the-tags",k),j=d("input.newtag",k),l=mlaModal.settings.comma;h=h||false;i=h?d(h).text():j.val();m=n.val();e=m?m+l+i:i;e=mlaModal.utility.arrayCleanup(this.cleanTags(e));n.val(e);this.quickClicks(k);if(!h){j.val("")}if("undefined"==typeof(g)){j.focus()}return false},getCloud:function(f,e){d.post(ajaxurl,{action:"get-tagcloud",tax:e},function(h,g){if(0===h||"success"!=g){h=wpAjax.broken}h=d('<p id="tagcloud-'+e+'" class="the-tagcloud">'+h+"</p>");d("a",h).click(function(){mlaModal.tagBox.flushTags(d(this).closest(".mla-taxonomy-field").children(".tagsdiv"),this);return false});d("#"+f).after(h)})},init:function(i,e,g){var h,f;h=d("#mla-taxonomy-"+e,g);f=d("div.ajaxtag",h);mlaModal.tagBox.quickClicks(h);d("input.tagadd",f).click(function(){mlaModal.tagBox.flushTags(d(this).closest(".tagsdiv"))});d("input.newtag",f).keyup(function(j){if(13==j.which){mlaModal.tagBox.flushTags(h);return false}}).keypress(function(j){if(13==j.which){j.preventDefault();return false}}).each(function(){d(this).suggest(ajaxurl+"?action=ajax-tag-search&tax="+e,{delay:500,resultsClass:"mla_ac_results",selectClass:"mla_ac_over",matchClass:"mla_ac_match",minchars:2,multiple:true,multipleSep:mlaModal.settings.comma+" "})});h.siblings(":first").click(function(){mlaModal.tagBox.getCloud(d("a",this).attr("id"),e);d("a",this).unbind().click(function(){d(this).siblings(".the-tagcloud").toggle();return false});return false});d(".compat-field-"+e+" td",g).on("mouseleave",function(){var m,k=this,j=mlaModal.utility.arrayCleanup(d(".server-tags",k).val()),l=mlaModal.utility.arrayCleanup(d(".the-tags",k).val());if(j===l){return}d(k).css("opacity","0.5");m={id:i,};m[e]=l;wp.media.post(mlaModal.settings.ajaxUpdateCompatAction,m).done(function(o){var p,n,q;for(n in o){if("object"===typeof(o[n]["object-terms"])){if(null!==mlaModal.utility.mlaAttachmentsBrowser){mlaModal.utility.mlaAttachmentsBrowser.updateFilters(n,o[n]["object-terms"])}delete o[n]["object-terms"]}for(q in o[n]){d("#"+q,k).replaceWith(o[n][q])}p=d("#mla-taxonomy-"+n,k);mlaModal.tagBox.quickClicks(p)}d(k).css("opacity","1.0")})});h.on("change",function(j){j.stopPropagation();return false});d(".the-tags, .server-tags .newtag",h).on("change",function(j){j.stopPropagation();return false})}};if(mlaModal.settings.enableDetailsCategory||mlaModal.settings.enableDetailsTag){wp.media.view.AttachmentCompat=wp.media.view.AttachmentCompat.extend({initialize:function(){b.prototype.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(){a.prototype.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(e){mlaModal.cid=e.cid});this.on("change:uploading",function(){mlaModal.uploading=true});this.on("change",function(e){var f=false,g;if(mlaModal.uploading&&mlaModal.cid===e.cid){mlaModal.uploading=false;f=true}else{if(false===e.attributes.uploading){g=_.clone(e.changed);delete g.title;delete g.caption;delete g.alt;delete g.description;if(!_.isEmpty(g)){f=true}}}if(true===f){mlaModal.utility.hookCompatTaxonomies(e.get("id"),mlaModal.settings.$el)}})}})}mlaModal.utility.hookCompatTaxonomies=function(h,f){var e,g=null;d(".mla-taxonomy-field .categorydiv",f).each(function(){e=mlaModal.utility.parseTaxonomyId(d(this).attr("id"));if(-1!=mlaModal.settings.enhancedTaxonomies.indexOf(e)){d(".compat-field-"+e+" th",f).click({id:h,currentTaxonomy:e,el:f},function(i){mlaModal.utility.fillCompatTaxonomies(i.data)});d("tr.compat-field-"+e,f).each(function(){if(d(this).hasClass("mla-taxonomy-row")){d(this).show()}else{d(this).remove()}});if(null===g){g=e}}else{d("tr.compat-field-"+e,f).each(function(){if(d(this).hasClass("mla-taxonomy-row")){d(this).remove()}})}});d(".mla-taxonomy-field .tagsdiv",f).each(function(){e=mlaModal.utility.parseTaxonomyId(d(this).attr("id"));if(-1!=mlaModal.settings.enhancedTaxonomies.indexOf(e)){d(".compat-field-"+e+" th",f).click({id:h,currentTaxonomy:e,el:f},function(i){mlaModal.utility.fillCompatTaxonomies(i.data)});d("tr.compat-field-"+e,f).each(function(){if(d(this).hasClass("mla-taxonomy-row")){d(this).show()}else{d(this).remove()}});if(null===g){g=e}}else{d("tr.compat-field-"+e,f).each(function(){if(d(this).hasClass("mla-taxonomy-row")){d(this).remove()}})}});if(mlaModal.settings.enableTermsAutofill&&null!==g){d(".compat-field-"+g+" th",f).click()}};mlaModal.utility.fillCompatTaxonomies=function(i){var f=i.el,h=[],e,g;d(".mla-taxonomy-field .categorydiv",f).each(function(){e=mlaModal.utility.parseTaxonomyId(d(this).attr("id"));h[h.length]=e;g=".compat-field-"+e;if("undefined"===typeof(mlaModal.initialHTML[e])){mlaModal.initialHTML[e]=d(g,f).html()}else{d(g,f).html(mlaModal.initialHTML[e])}d(g+" .categorydiv",f).html(mlaModal.strings.loadingText)});d(".mla-taxonomy-field .tagsdiv",f).each(function(){e=mlaModal.utility.parseTaxonomyId(d(this).attr("id"));h[h.length]=e;g=".compat-field-"+e;if("undefined"===typeof(mlaModal.initialHTML[e])){mlaModal.initialHTML[e]=d(g,f).html()}else{d(g,f).html(mlaModal.initialHTML[e])}d(g+" .tagsdiv",f).html(mlaModal.strings.loadingText)});if(h.length){wp.media.post(mlaModal.settings.ajaxFillCompatAction,{id:i.id,query:h,}).done(function(k){var j,l;for(j in k){l=".compat-field-"+j;d(l,f).html(k[j])}mlaModal.utility.supportCompatTaxonomies(i);d(".compat-field-"+i.currentTaxonomy+" td",f).show()})}};mlaModal.utility.supportCompatTaxonomies=function(g){var f=g.id,e=g.el;if(mlaModal.settings.enableDetailsCategory){d(".mla-taxonomy-field .categorydiv",e).each(function(){var j=d(this),h,k,i,n,l,p,o,m;i=mlaModal.utility.parseTaxonomyId(d(this).attr("id"));n=i+"_tab";l="#mla-"+i;p="#mla-new-"+i;o="#mla-search-"+i;m="#mla-attachments-"+f+"-"+i;if(i=="category"){n="cats"}j.find(".category-tabs").show();d(".compat-field-"+i+" th",e).click(function(){d(this).siblings("td").slideToggle()});j.on("mouseleave",function(){var t,q,s=[],r=j.find(l+"-checklist input:checked");r.each(function(){s[s.length]=d(this).val()});s.sort(function(v,u){return v-u});s=s.join(",");q=j.siblings(m).val();if(q===s){return}j.siblings(m).val(s);j.prop("disabled",true);t={id:f,};t[i]=s;wp.media.post(mlaModal.settings.ajaxUpdateCompatAction,t).done(function(v){var u,w;for(u in v){for(w in v[u]){j.find("#"+w).html(v[u][w])}}j.find(o).val("");j.find(l+"-searcher").addClass("mla-hidden-children");j.prop("disabled",false)})});j.on('change input[type="checkbox"]',function(q){q.stopPropagation();return false});j.find(l+"-tabs a").click(function(){var q=d(this).attr("href");d(this).parent().addClass("tabs").siblings("li").removeClass("tabs");j.find(l+"-tabs").siblings(".tabs-panel").hide();j.find(q).show();d(this).focus();if("#mla-"+i+"-all"==q){deleteUserSetting(n)}else{setUserSetting(n,"pop")}return false});if(getUserSetting(n)){j.find(l+'-tabs a[href="#mla-'+i+'-pop"]').click()}j.find(l+"-add-toggle").click(function(){j.find(l+"-searcher").addClass("mla-hidden-children");j.find(l+"-adder").toggleClass("mla-hidden-children");j.find(l+'-tabs a[href="#mla-'+i+'-all"]').click();j.find(l+"-checklist li").show();j.find(l+"-checklist-pop li").show();if(false===j.find(l+"-adder").hasClass("mla-hidden-children")){j.find(p).val("").removeClass("form-input-tip");j.find(p).focus()}return false});j.find(p).keypress(function(q){if(13===q.keyCode){q.preventDefault();j.find(l+"-add-submit").click()}});j.find(l+"-add-submit").click(function(){j.find(p).focus()});h=function(q){if(!j.find(p).val()){return false}q.data+="&"+j.find(l+"-checklist :checked").serialize();j.prop("disabled",true);return q};k=function(v,u){var t,q=j.find("#new"+i+"_parent");j.prop("disabled",false);if("undefined"!=u.parsed.responses[0]&&(t=u.parsed.responses[0].supplemental.newcat_parent)){q.before(t);q.remove();if(null!==mlaModal.utility.mlaAttachmentsBrowser){mlaModal.utility.mlaAttachmentsBrowser.updateFilters(i,t)}}};j.find(l+"-checklist").wpList({alt:"",response:"mla-"+i+"-ajax-response",addBefore:h,addAfter:k});j.find(l+"-checklist, "+l+"-checklist-pop").on("click",'li.popular-category > label input[type="checkbox"]',function(){var q=d(this),s=q.is(":checked"),r=q.val();if(r&&q.parents("#mla-taxonomy-"+i).length){d("#in-"+i+"-"+r+", #in-popular-"+i+"-"+r).prop("checked",s)}});d.extend(d.expr[":"],{matchTerms:function(s,r,q,t){return(s.textContent||s.innerText||"").toLowerCase().indexOf((q[3]||"").toLowerCase())>=0}});j.find(o).keypress(function(q){if(13===q.keyCode){q.preventDefault();j.find(o).val("");j.find(l+"-searcher").addClass("mla-hidden-children");j.find(l+"-checklist li").show();j.find(l+"-checklist-pop li").show();return}});j.find(o).keyup(function(s){var u,t,v,r,q;if(13===s.keyCode){s.preventDefault();j.find(l+"-search-toggle").focus();return}u=j.find(o).val();t=j.find(l+"-checklist li");v=j.find(l+"-checklist-pop li");if(0<u.length){t.hide();v.hide()}else{t.show();v.show()}r=j.find(l+"-checklist label:matchTerms('"+u+"')");r.closest("li").find("li").andSelf().show();r.parents(l+"-checklist li").show();q=j.find(l+"-checklist-pop label:matchTerms('"+u+"')");q.closest("li").find("li").andSelf().show();q.parents(l+"-checklist li").show()});j.find(l+"-search-toggle").click(function(){j.find(l+"-adder ").addClass("mla-hidden-children");j.find(l+"-searcher").toggleClass("mla-hidden-children");j.find(l+'-tabs a[href="#mla-'+i+'-all"]').click();j.find(l+"-checklist li").show();j.find(l+"-checklist-pop li").show();if(false===j.find(l+"-searcher").hasClass("mla-hidden-children")){j.find(o).val("").removeClass("form-input-tip");j.find(o).focus()}return false})})}if(mlaModal.settings.enableDetailsTag){d(".mla-taxonomy-field .tagsdiv",e).each(function(){var h=mlaModal.utility.parseTaxonomyId(d(this).attr("id"));d(".compat-field-"+h+" th",e).click(function(){d(this).siblings("td").slideToggle()});mlaModal.tagBox.init(f,h,e)})}}}(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(d){var c=wp.media.view.AttachmentsBrowser,b=wp.media.view.AttachmentCompat,a=wp.media.model.Selection;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.settings.pagenow=typeof pagenow==="undefined"?"unknown":pagenow;if(mlaModal.settings.pagenow==="toolset_page_views-editor"){return}mlaModal.utility.originalMediaAjax=wp.media.ajax;wp.media.ajax=function(k,g){var j=mlaModal.settings.state,i,f,h,e;if(_.isObject(k)){g=k}else{g=g||{};g.data=_.extend(g.data||{},{action:k})}if("query-attachments"==g.data.action){i=g.data.query;f=typeof i.s;if("object"==f){h=i.s}else{if("string"==f){h={mla_search_value:i.s}}else{h={mla_search_value:""}}}if("undefined"!=typeof i.post_mime_type){mlaModal.settings.query[j].filterMime=i.post_mime_type}else{mlaModal.settings.query[j].filterMime="all"}if("undefined"!=typeof h.mla_filter_month){mlaModal.settings.query[j].filterMonth=h.mla_filter_month}else{if("undefined"!=typeof i.year){mlaModal.settings.query[j].filterMonth=(100*i.year)+(1*i.monthnum)}else{}}if("undefined"!=typeof h.mla_filter_term){mlaModal.settings.query[j].filterTerm=h.mla_filter_term}if("undefined"!=typeof h.mla_search_value){mlaModal.settings.query[j].searchValue=h.mla_search_value}e={mla_filter_month:mlaModal.settings.query[j].filterMonth,mla_filter_term:mlaModal.settings.query[j].filterTerm,mla_terms_search:mlaModal.settings.query[j].termsSearch,mla_search_clicks:mlaModal.settings.query[j].searchClicks,mla_search_value:mlaModal.settings.query[j].searchValue,mla_search_fields:mlaModal.settings.query[j].searchFields,mla_search_connector:mlaModal.settings.query[j].searchConnector};mlaModal.settings.query[j].termsSearch="";d("#mla-terms-search-input").html("").val("");g.data.query.s=e}return mlaModal.utility.originalMediaAjax.call(this,g)};if(mlaModal.settings.enableMimeTypes){wp.media.view.AttachmentFilters.Mla=wp.media.view.AttachmentFilters.extend({createFilters:function(){var f=this.controller._state,e={};_.each(mlaModal.settings.allMimeTypes||{},function(h,g){if(("grid"===mlaModal.settings.screen)||("trash"!==g)){e[g]={text:h,props:{type:g,uploadedTo:null,orderby:"date",order:"DESC"}}}});e.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){e.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=e;if("undefined"===typeof e[mlaModal.settings.query[f].filterMime]){mlaModal.settings.query[f].filterMime="all"}if(mlaModal.settings.query[f].filterMime!="all"){this.model.set(e[mlaModal.settings.query[f].filterMime].props,{silent:false})}},select:function(){var h=this.controller._state,e=this.model,g=mlaModal.settings.query[h].filterMime,f=e.toJSON();if(false===mlaModal.settings.enableSearchBox){if("string"==typeof f.search){mlaModal.settings.query[h].searchValue=f.search}else{mlaModal.settings.query[h].searchValue=""}}_.find(this.filters,function(j,k){var i=_.all(j.props,function(m,l){return m===(_.isUndefined(f[l])?null:f[l])});if(i){return g=k}});this.$el.val(g)},change:function(){var f=d(this.el).closest("div.media-toolbar"),e=this.filters[this.el.value];if(e){this.model.set(e.props,{silent:true});d("#mla-search-submit",f).click()}}});wp.media.view.AttachmentFilters.MlaUploaded=wp.media.view.AttachmentFilters.extend({createFilters:function(){var f=this.model.get("type"),e=wp.media.view.settings.mimeTypes,i,h=this.controller._state,g={};if(e&&f){i=e[f]}_.each(mlaModal.settings.uploadMimeTypes||{},function(k,j){if(("grid"===mlaModal.settings.screen)||("trash"!==j)){g[j]={text:k,props:{type:j,uploadedTo:null,orderby:"date",order:"DESC"}}}});g.all={text:i||wp.media.view.l10n.allMediaItems,props:{uploadedTo:null,orderby:"date",order:"DESC"},priority:10};g.uploaded={text:wp.media.view.l10n.uploadedToThisPost,props:{type:null,uploadedTo:wp.media.view.settings.post.id,orderby:"menuOrder",order:"ASC"},priority:20};g.unattached={text:wp.media.view.l10n.unattached,props:{uploadedTo:0,orderby:"menuOrder",order:"ASC"},priority:50};this.filters=g;if("undefined"===typeof g[mlaModal.settings.query[h].filterUploaded]){mlaModal.settings.query[h].filterUploaded="all"}if(mlaModal.settings.query[h].filterUploaded!="all"){this.model.set(g[mlaModal.settings.query[h].filterUploaded].props,{silent:false})}},select:function(){var h=this.controller._state,e=this.model,g=mlaModal.settings.query[h].filterMime,f=e.toJSON();if(false===mlaModal.settings.enableSearchBox){if("string"==typeof f.search){mlaModal.settings.query[h].searchValue=f.search}else{mlaModal.settings.query[h].searchValue=""}}_.find(this.filters,function(j,k){var i=_.all(j.props,function(m,l){return m===(_.isUndefined(f[l])?null:f[l])});if(i){return g=k}});this.$el.val(g)},change:function(){var f=d(this.el).closest("div.media-toolbar"),e=this.filters[this.el.value];if(e){this.model.set(e.props,{silent:true});d("#mla-search-submit",f).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 f=this.controller._state,e={};_.each(mlaModal.settings.months||{},function(h,g){e[g]={text:h,props:{s:{mla_filter_month:g}}}});this.filters=e;if("undefined"===typeof e[mlaModal.settings.query[f].filterMonth]){mlaModal.settings.query[f].filterMonth=0}if(mlaModal.settings.query[f].filterMonth>0){this.model.set(e[mlaModal.settings.query[f].filterMonth].props,{silent:false})}},select:function(){var h=this.controller._state,e=this.model,g=mlaModal.settings.query[h].filterMonth,f=e.toJSON();if(_.isUndefined(f.s)){f.s={}}if(false===mlaModal.settings.enableSearchBox){if("string"==typeof f.search){mlaModal.settings.query[h].searchValue=f.search}else{mlaModal.settings.query[h].searchValue=""}}if(_.isUndefined(f.s.mla_filter_month)){f.s.mla_filter_month=mlaModal.settings.query[h].filterMonth}else{mlaModal.settings.query[h].filterMonth=f.s.mla_filter_month}_.find(this.filters,function(j,k){var i=_.all(j.props,function(l){return l.mla_filter_month==mlaModal.settings.query[h].filterMonth});if(i){return g=k}});this.$el.val(g)},change:function(){var e=this.filters[this.el.value],f;if(e){f={s:{mla_filter_month:e.props.s.mla_filter_month}};this.model.set(f)}}})}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 h=this.controller._state,e,f,g={};_.each(mlaModal.settings.termsText||{},function(j,i){if(mlaModal.settings.termsCustom){f=mlaModal.settings.termsValue[i]}else{f=parseInt(mlaModal.settings.termsValue[i])}g[i]={text:j,props:{s:{mla_filter_term:f}}}});this.filters=g;e=_.indexOf(mlaModal.settings.termsValue,mlaModal.settings.query[h].filterTerm);if(e>0){this.model.set(g[e].props,{silent:false})}},select:function(){var h=this.controller._state,e=this.model,g=mlaModal.settings.query[h].filterTerm,f=e.toJSON();if(_.isUndefined(f.s)){f.s={}}if(false===mlaModal.settings.enableSearchBox){if("string"==typeof f.search){mlaModal.settings.query[h].searchValue=f.search}else{mlaModal.settings.query[h].searchValue=""}}if(_.isUndefined(f.s.mla_filter_term)){f.s.mla_filter_term=mlaModal.settings.query[h].filterTerm}else{mlaModal.settings.query[h].filterTerm=f.s.mla_filter_term}_.find(this.filters,function(j,k){var i=_.all(j.props,function(l){return l.mla_filter_term==mlaModal.settings.query[h].filterTerm});if(i){return g=k}});this.$el.val(g)},change:function(){var e=this.filters[this.el.value],f;if(e){f={s:{mla_filter_term:e.props.s.mla_filter_term}};this.model.set(f)}}})}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(f){var e=d(this.el).closest("div.media-toolbar");if(("click"==f.type)&&("mla_terms_search"===f.target.name)){mlaTaxonomy.termsSearch.open();d("#mla-terms-search-form").off("submit");d("#mla-terms-search-form").submit(function(j){var g,i,h={phrases:"",taxonomies:[]};j.preventDefault();g=d("#mla-terms-search-form").serializeArray();for(i=0;i<g.length;i++){switch(g[i].name){case"mla_terms_search[phrases]":h.phrases=g[i].value;break;case"mla_terms_search[radio_phrases]":h.radio_phrases=g[i].value;break;case"mla_terms_search[radio_terms]":h.radio_terms=g[i].value;break;case"mla_terms_search[taxonomies][]":h.taxonomies[h.taxonomies.length]=g[i].value;break}}mlaModal.settings.query[mlaModal.settings.state].termsSearch=h;d("#mla-search-submit",e).click();return false});d("#mla-terms-search-input").keypress(function(g){if(13==g.which){g.preventDefault();d("#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 e=this.controller._state;if("undefined"===typeof mlaModal.settings.query[e]){mlaModal.settings.query[e]=_.clone(mlaModal.settings.query.initial);mlaModal.settings.query[e].searchFields=_.clone(mlaModal.settings.query.initial.searchFields)}},render:function(){var f=this.controller._state,e=_.extend(mlaModal.strings,mlaModal.settings.query[f]);this.$el.html(this.template(e));return this},search:function(g){var h=this.controller._state,e,i,f;if(("input"==g.type)&&("s[mla_search_value]"==g.target.name)){mlaModal.settings.query[h].searchValue=g.target.value;return}if(("click"==g.type)&&("mla_search_submit"!=g.target.name)){return}switch(g.target.name){case"s[mla_search_value]":mlaModal.settings.query[h].searchValue=g.target.value;break;case"mla_search_submit":e={mla_filter_month:mlaModal.settings.query[h].filterMonth,mla_filter_term:mlaModal.settings.query[h].filterTerm,mla_terms_search:mlaModal.settings.query[h].termsSearch,mla_search_clicks:mlaModal.settings.query[h].searchClicks++,mla_search_value:mlaModal.settings.query[h].searchValue,mla_search_fields:mlaModal.settings.query[h].searchFields,mla_search_connector:mlaModal.settings.query[h].searchConnector};this.model.set({s:e});break;case"s[mla_search_connector]":mlaModal.settings.query[h].searchConnector=g.target.value;break;case"s[mla_search_title]":i=mlaModal.settings.query[h].searchFields;f=i.indexOf("title");if(-1==f){i.push("title")}else{i.splice(f,1)}mlaModal.settings.query[h].searchFields=i;break;case"s[mla_search_name]":f=mlaModal.settings.query[h].searchFields.indexOf("name");if(-1==f){mlaModal.settings.query[h].searchFields.push("name")}else{mlaModal.settings.query[h].searchFields.splice(f,1)}break;case"s[mla_search_alt_text]":f=mlaModal.settings.query[h].searchFields.indexOf("alt-text");if(-1==f){mlaModal.settings.query[h].searchFields.push("alt-text")}else{mlaModal.settings.query[h].searchFields.splice(f,1)}break;case"s[mla_search_excerpt]":f=mlaModal.settings.query[h].searchFields.indexOf("excerpt");if(-1==f){mlaModal.settings.query[h].searchFields.push("excerpt")}else{mlaModal.settings.query[h].searchFields.splice(f,1)}break;case"s[mla_search_content]":f=mlaModal.settings.query[h].searchFields.indexOf("content");if(-1==f){mlaModal.settings.query[h].searchFields.push("content")}else{mlaModal.settings.query[h].searchFields.splice(f,1)}break;case"s[mla_search_terms]":f=mlaModal.settings.query[h].searchFields.indexOf("terms");if(-1==f){mlaModal.settings.query[h].searchFields.push("terms")}else{mlaModal.settings.query[h].searchFields.splice(f,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 f=this.controller._state,e={mla_filter_month:mlaModal.settings.query[f].filterMonth,mla_filter_term:mlaModal.settings.query[f].filterTerm,mla_terms_search:mlaModal.settings.query[f].termsSearch,mla_search_clicks:mlaModal.settings.query[f].searchClicks++,mla_search_value:mlaModal.settings.query[f].searchValue,mla_search_fields:mlaModal.settings.query[f].searchFields,mla_search_connector:mlaModal.settings.query[f].searchConnector};this.model.set({s:e})}})}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 e,f=this.controller._state;mlaModal.settings.state=f;mlaModal.settings.$el=this.controller.$el;if("undefined"===typeof mlaModal.settings.query[f]){mlaModal.settings.query[f]=_.clone(mlaModal.settings.query.initial);mlaModal.settings.query[f].searchFields=_.clone(mlaModal.settings.query.initial.searchFields)}c.prototype.createToolbar.apply(this,arguments);mlaModal.utility.mlaAttachmentsBrowser=this;e=this.options.filters;if(typeof window.eml!=="undefined"){d(".media-toolbar",this.$el).css("overflow","hidden")}if(("all"===e)&&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(("uploaded"===e)&&mlaModal.settings.enableMimeTypes){this.toolbar.unset("filters",{silent:true});this.toolbar.set("filters",new wp.media.view.AttachmentFilters.MlaUploaded({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.controller.on("content:activate",this.hideDefaultSearch);this.controller.on("edit:activate",this.hideDefaultSearch);this.controller.on("router:render",this.hideDefaultSearch);this.controller.on("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(){var e=d("#media-search-input",mlaModal.settings.$el);if(0===e.length){e=d("div.media-toolbar-primary > input.search",mlaModal.settings.$el)}e.hide()},updateFilters:function(e,f){var g={};if(this.options.search&&mlaModal.settings.enableTermsDropdown&&mlaModal.settings.termsTaxonomy==e){g=mlaModal.utility.parseTermsOptions(f);mlaModal.settings.termsClass=g.termsClass;mlaModal.settings.termsText=g.termsText;mlaModal.settings.termsValue=g.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(k){var j={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]]},g=2,e,f,i=/\<option(( class=\"([^\"]+)\" )|( ))value=((\'([^\']+)\')|(\"([^\"]+)\"))([^\>]*)\>([^\<]*)\<.*/g,h=[];if("object"===typeof k){g=mlaModal.settings.termsValue.length;for(e=2;e<g;e++){h[e]={termsClass:mlaModal.settings.termsClass[e],termsText:mlaModal.settings.termsText[e],termsValue:mlaModal.settings.termsValue[e]};if("undefined"!==typeof k[mlaModal.settings.termsValue[e]]){delete k[mlaModal.settings.termsValue[e]]}}for(f in k){h[e++]={termsClass:"level-0",termsText:k[f],termsValue:f.toString()}}if(g===e){return{termsClass:mlaModal.settings.termsClass,termsText:mlaModal.settings.termsText,termsValue:mlaModal.settings.termsValue}}h.sort(function(m,l){if(m.termsText>l.termsText){return 1}else{if(m.termsText<l.termsText){return -1}else{return 0}}});e=2;for(f in h){j.termsClass[e]=h[f].termsClass;j.termsText[e]=h[f].termsText;j.termsValue[e++]=h[f].termsValue}return j}h=i.exec(k);while(null!==(h=i.exec(k))){j.termsClass[g]=h[3];j.termsValue[g]=("undefined"===typeof h[6])?h[9]:h[7];j.termsText[g++]=h[11].replace(" ",mlaModal.settings.termsIndent)}return j};mlaModal.utility.arrayCleanup=function(g){var f=[],e=("string"===typeof g);if(e){g=g.split(mlaModal.settings.comma)}jQuery.each(g,function(h,i){i=jQuery.trim(i);if(i&&jQuery.inArray(i,f)==-1){f.push(i)}});f.sort();if(e){f=f.join(mlaModal.settings.comma)}return f};mlaModal.utility.parseTaxonomyId=function(f){var e=f.split("-");e.shift();e.shift();return e.join("-")};mlaModal.tagBox={cleanTags:function(f){var e=mlaModal.settings.comma;if(","!==e){f=f.replace(new RegExp(e,"g"),",")}f=f.replace(/\s*,\s*/g,",").replace(/,+/g,",").replace(/[,\s]+$/,"").replace(/^[,\s]+/,"");if(","!==e){f=f.replace(/,/g,e)}return f},parseTags:function(h){var l=h.id,f=l.split("-check-num-")[1],i=d(h).closest(".tagsdiv"),k=i.find(".the-tags"),e=mlaModal.settings.comma,g=k.val().split(e),j=[];delete g[f];d.each(g,function(m,n){n=d.trim(n);if(n){j.push(n)}});k.val(this.cleanTags(j.join(e)));this.quickClicks(i);return false},quickClicks:function(g){var j=d(".the-tags",g),h=d(".tagchecklist",g),i=d(g).attr("id"),e,f;if(!j.length){return}f=j.prop("disabled");e=j.val().split(mlaModal.settings.comma);h.empty();d.each(e,function(l,n){var m,k;n=d.trim(n);if(!n){return}m=d("<span />").text(n);if(!f){k=d('<a id="'+i+"-check-num-"+l+'" class="ntdelbutton">X</a>');k.click(function(){mlaModal.tagBox.parseTags(this)});m.prepend(" ").prepend(k)}h.append(m)})},flushTags:function(k,h,g){var m,e,i,n=d(".the-tags",k),j=d("input.newtag",k),l=mlaModal.settings.comma;h=h||false;i=h?d(h).text():j.val();m=n.val();e=m?m+l+i:i;e=mlaModal.utility.arrayCleanup(this.cleanTags(e));n.val(e);this.quickClicks(k);if(!h){j.val("")}if("undefined"==typeof(g)){j.focus()}return false},getCloud:function(f,e){d.post(ajaxurl,{action:"get-tagcloud",tax:e},function(h,g){if(0===h||"success"!=g){h=wpAjax.broken}h=d('<p id="tagcloud-'+e+'" class="the-tagcloud">'+h+"</p>");d("a",h).click(function(){mlaModal.tagBox.flushTags(d(this).closest(".mla-taxonomy-field").children(".tagsdiv"),this);return false});d("#"+f).after(h)})},init:function(i,e,g){var h,f;h=d("#mla-taxonomy-"+e,g);f=d("div.ajaxtag",h);mlaModal.tagBox.quickClicks(h);d("input.tagadd",f).click(function(){mlaModal.tagBox.flushTags(d(this).closest(".tagsdiv"))});d("input.newtag",f).keyup(function(j){if(13==j.which){mlaModal.tagBox.flushTags(h);return false}}).keypress(function(j){if(13==j.which){j.preventDefault();return false}}).each(function(){d(this).suggest(ajaxurl+"?action=ajax-tag-search&tax="+e,{delay:500,resultsClass:"mla_ac_results",selectClass:"mla_ac_over",matchClass:"mla_ac_match",minchars:2,multiple:true,multipleSep:mlaModal.settings.comma+" "})});h.siblings(":first").click(function(){mlaModal.tagBox.getCloud(d("a",this).attr("id"),e);d("a",this).unbind().click(function(){d(this).siblings(".the-tagcloud").toggle();return false});return false});d(".compat-field-"+e+" td",g).on("mouseleave",function(){var m,k=this,j=mlaModal.utility.arrayCleanup(d(".server-tags",k).val()),l=mlaModal.utility.arrayCleanup(d(".the-tags",k).val());if(j===l){return}d(k).css("opacity","0.5");m={id:i};m[e]=l;wp.media.post(mlaModal.settings.ajaxUpdateCompatAction,m).done(function(o){var p,n,q;for(n in o){if("object"===typeof(o[n]["object-terms"])){if(null!==mlaModal.utility.mlaAttachmentsBrowser){mlaModal.utility.mlaAttachmentsBrowser.updateFilters(n,o[n]["object-terms"])}delete o[n]["object-terms"]}for(q in o[n]){d("#"+q,k).replaceWith(o[n][q])}p=d("#mla-taxonomy-"+n,k);mlaModal.tagBox.quickClicks(p)}d(k).css("opacity","1.0")})});h.on("change",function(j){j.stopPropagation();return false});d(".the-tags, .server-tags .newtag",h).on("change",function(j){j.stopPropagation();return false})}};if(mlaModal.settings.enableDetailsCategory||mlaModal.settings.enableDetailsTag){wp.media.view.AttachmentCompat=wp.media.view.AttachmentCompat.extend({initialize:function(){b.prototype.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(){a.prototype.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(e){mlaModal.cid=e.cid});this.on("change:uploading",function(){mlaModal.uploading=true});this.on("change",function(e){var f=false,g;if(mlaModal.uploading&&mlaModal.cid===e.cid){mlaModal.uploading=false;f=true}else{if(false===e.attributes.uploading){g=_.clone(e.changed);delete g.title;delete g.caption;delete g.alt;delete g.description;if(!_.isEmpty(g)){f=true}}}if(true===f){mlaModal.utility.hookCompatTaxonomies(e.get("id"),mlaModal.settings.$el)}})}})}mlaModal.utility.hookCompatTaxonomies=function(h,f){var e,g=null;d(".mla-taxonomy-field .categorydiv",f).each(function(){e=mlaModal.utility.parseTaxonomyId(d(this).attr("id"));if(-1!=mlaModal.settings.enhancedTaxonomies.indexOf(e)){d(".compat-field-"+e+" th",f).click({id:h,currentTaxonomy:e,el:f},function(i){mlaModal.utility.fillCompatTaxonomies(i.data)});d("tr.compat-field-"+e,f).each(function(){if(d(this).hasClass("mla-taxonomy-row")){d(this).show()}else{d(this).remove()}});if(null===g){g=e}}else{d("tr.compat-field-"+e,f).each(function(){if(d(this).hasClass("mla-taxonomy-row")){d(this).remove()}})}});d(".mla-taxonomy-field .tagsdiv",f).each(function(){e=mlaModal.utility.parseTaxonomyId(d(this).attr("id"));if(-1!=mlaModal.settings.enhancedTaxonomies.indexOf(e)){d(".compat-field-"+e+" th",f).click({id:h,currentTaxonomy:e,el:f},function(i){mlaModal.utility.fillCompatTaxonomies(i.data)});d("tr.compat-field-"+e,f).each(function(){if(d(this).hasClass("mla-taxonomy-row")){d(this).show()}else{d(this).remove()}});if(null===g){g=e}}else{d("tr.compat-field-"+e,f).each(function(){if(d(this).hasClass("mla-taxonomy-row")){d(this).remove()}})}});if(mlaModal.settings.enableTermsAutofill&&null!==g){d(".compat-field-"+g+" th",f).click()}};mlaModal.utility.fillCompatTaxonomies=function(i){var f=i.el,h=[],e,g;d(".mla-taxonomy-field .categorydiv",f).each(function(){e=mlaModal.utility.parseTaxonomyId(d(this).attr("id"));h[h.length]=e;g=".compat-field-"+e;if("undefined"===typeof(mlaModal.initialHTML[e])){mlaModal.initialHTML[e]=d(g,f).html()}else{d(g,f).html(mlaModal.initialHTML[e])}d(g+" .categorydiv",f).html(mlaModal.strings.loadingText)});d(".mla-taxonomy-field .tagsdiv",f).each(function(){e=mlaModal.utility.parseTaxonomyId(d(this).attr("id"));h[h.length]=e;g=".compat-field-"+e;if("undefined"===typeof(mlaModal.initialHTML[e])){mlaModal.initialHTML[e]=d(g,f).html()}else{d(g,f).html(mlaModal.initialHTML[e])}d(g+" .tagsdiv",f).html(mlaModal.strings.loadingText)});if(h.length){wp.media.post(mlaModal.settings.ajaxFillCompatAction,{id:i.id,query:h}).done(function(k){var j,l;for(j in k){l=".compat-field-"+j;d(l,f).html(k[j])}mlaModal.utility.supportCompatTaxonomies(i);d(".compat-field-"+i.currentTaxonomy+" td",f).show()})}};mlaModal.utility.supportCompatTaxonomies=function(g){var f=g.id,e=g.el;if(mlaModal.settings.enableDetailsCategory){d(".mla-taxonomy-field .categorydiv",e).each(function(){var j=d(this),h,k,i,n,l,p,o,m;i=mlaModal.utility.parseTaxonomyId(d(this).attr("id"));n=i+"_tab";l="#mla-"+i;p="#mla-new-"+i;o="#mla-search-"+i;m="#mla-attachments-"+f+"-"+i;if(i=="category"){n="cats"}j.find(".category-tabs").show();d(".compat-field-"+i+" th",e).click(function(){d(this).siblings("td").slideToggle()});j.on("mouseleave",function(){var t,q,s=[],r=j.find(l+"-checklist input:checked");r.each(function(){s[s.length]=d(this).val()});s.sort(function(v,u){return v-u});s=s.join(",");q=j.siblings(m).val();if(q===s){return}j.siblings(m).val(s);j.prop("disabled",true);t={id:f};t[i]=s;wp.media.post(mlaModal.settings.ajaxUpdateCompatAction,t).done(function(v){var u,w;for(u in v){for(w in v[u]){j.find("#"+w).html(v[u][w])}}j.find(o).val("");j.find(l+"-searcher").addClass("mla-hidden-children");j.prop("disabled",false)})});j.on('change input[type="checkbox"]',function(q){q.stopPropagation();return false});j.find(l+"-tabs a").click(function(){var q=d(this).attr("href");d(this).parent().addClass("tabs").siblings("li").removeClass("tabs");j.find(l+"-tabs").siblings(".tabs-panel").hide();j.find(q).show();d(this).focus();if("#mla-"+i+"-all"==q){deleteUserSetting(n)}else{setUserSetting(n,"pop")}return false});if(getUserSetting(n)){j.find(l+'-tabs a[href="#mla-'+i+'-pop"]').click()}j.find(l+"-add-toggle").click(function(){j.find(l+"-searcher").addClass("mla-hidden-children");j.find(l+"-adder").toggleClass("mla-hidden-children");j.find(l+'-tabs a[href="#mla-'+i+'-all"]').click();j.find(l+"-checklist li").show();j.find(l+"-checklist-pop li").show();if(false===j.find(l+"-adder").hasClass("mla-hidden-children")){j.find(p).val("").removeClass("form-input-tip");j.find(p).focus()}return false});j.find(p).keypress(function(q){if(13===q.keyCode){q.preventDefault();j.find(l+"-add-submit").click()}});j.find(l+"-add-submit").click(function(){j.find(p).focus()});h=function(q){if(!j.find(p).val()){return false}q.data+="&"+j.find(l+"-checklist :checked").serialize();j.prop("disabled",true);return q};k=function(v,u){var t,q=j.find("#new"+i+"_parent");j.prop("disabled",false);if("undefined"!=u.parsed.responses[0]&&(t=u.parsed.responses[0].supplemental.newcat_parent)){q.before(t);q.remove();if(null!==mlaModal.utility.mlaAttachmentsBrowser){mlaModal.utility.mlaAttachmentsBrowser.updateFilters(i,t)}}};j.find(l+"-checklist").wpList({alt:"",response:"mla-"+i+"-ajax-response",addBefore:h,addAfter:k});j.find(l+"-checklist, "+l+"-checklist-pop").on("click",'li.popular-category > label input[type="checkbox"]',function(){var q=d(this),s=q.is(":checked"),r=q.val();if(r&&q.parents("#mla-taxonomy-"+i).length){d("#in-"+i+"-"+r+", #in-popular-"+i+"-"+r).prop("checked",s)}});d.extend(d.expr[":"],{matchTerms:function(s,r,q,t){return(s.textContent||s.innerText||"").toLowerCase().indexOf((q[3]||"").toLowerCase())>=0}});j.find(o).keypress(function(q){if(13===q.keyCode){q.preventDefault();j.find(o).val("");j.find(l+"-searcher").addClass("mla-hidden-children");j.find(l+"-checklist li").show();j.find(l+"-checklist-pop li").show();return}});j.find(o).keyup(function(s){var u,t,v,r,q;if(13===s.keyCode){s.preventDefault();j.find(l+"-search-toggle").focus();return}u=j.find(o).val();t=j.find(l+"-checklist li");v=j.find(l+"-checklist-pop li");if(0<u.length){t.hide();v.hide()}else{t.show();v.show()}r=j.find(l+"-checklist label:matchTerms('"+u+"')");r.closest("li").find("li").andSelf().show();r.parents(l+"-checklist li").show();q=j.find(l+"-checklist-pop label:matchTerms('"+u+"')");q.closest("li").find("li").andSelf().show();q.parents(l+"-checklist li").show()});j.find(l+"-search-toggle").click(function(){j.find(l+"-adder ").addClass("mla-hidden-children");j.find(l+"-searcher").toggleClass("mla-hidden-children");j.find(l+'-tabs a[href="#mla-'+i+'-all"]').click();j.find(l+"-checklist li").show();j.find(l+"-checklist-pop li").show();if(false===j.find(l+"-searcher").hasClass("mla-hidden-children")){j.find(o).val("").removeClass("form-input-tip");j.find(o).focus()}return false})})}if(mlaModal.settings.enableDetailsTag){d(".mla-taxonomy-field .tagsdiv",e).each(function(){var h=mlaModal.utility.parseTaxonomyId(d(this).attr("id"));d(".compat-field-"+h+" th",e).click(function(){d(this).siblings("td").slideToggle()});mlaModal.tagBox.init(f,h,e)})}}}(jQuery));
|
phpDocs/.htaccess
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Fixes a vulnerability in CentOS: http://stackoverflow.com/questions/20533279/prevent-php-from-parsing-non-php-files-such-as-somefile-php-txt
|
2 |
+
<FilesMatch \.php\.txt$>
|
3 |
+
RemoveHandler .php
|
4 |
+
ForceType text/plain
|
5 |
+
</FilesMatch>
|
phpDocs/classes.svg
DELETED
@@ -1,340 +0,0 @@
|
|
1 |
-
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
2 |
-
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
3 |
-
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
4 |
-
<!-- Generated by graphviz version 2.28.0 (20110507.0327)
|
5 |
-
-->
|
6 |
-
<!-- Title: G Pages: 1 -->
|
7 |
-
<svg width="730pt" height="2108pt"
|
8 |
-
viewBox="0.00 0.00 730.00 2108.27" 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 2104.27)">
|
10 |
-
<title>G</title>
|
11 |
-
<polygon fill="white" stroke="white" points="-4,5 -4,-2104.27 727,-2104.27 727,5 -4,5"/>
|
12 |
-
<g id="graph2" class="cluster"><title>cluster_global</title>
|
13 |
-
<polyline fill="none" stroke="gray" points="263,-184.27 702,-184.27 "/>
|
14 |
-
<path fill="none" stroke="gray" d="M702,-184.27C708,-184.27 714,-190.27 714,-196.27"/>
|
15 |
-
<polyline fill="none" stroke="gray" points="714,-196.27 714,-2080.27 "/>
|
16 |
-
<path fill="none" stroke="gray" d="M714,-2080.27C714,-2086.27 708,-2092.27 702,-2092.27"/>
|
17 |
-
<polyline fill="none" stroke="gray" points="702,-2092.27 263,-2092.27 "/>
|
18 |
-
<path fill="none" stroke="gray" d="M263,-2092.27C257,-2092.27 251,-2086.27 251,-2080.27"/>
|
19 |
-
<polyline fill="none" stroke="gray" points="251,-2080.27 251,-196.27 "/>
|
20 |
-
<path fill="none" stroke="gray" d="M251,-196.27C251,-190.27 257,-184.27 263,-184.27"/>
|
21 |
-
<text text-anchor="middle" x="482.5" y="-2079.47" 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="675,-2010.27 517,-2010.27 517,-1974.27 675,-1974.27 675,-2010.27"/>
|
27 |
-
<text text-anchor="middle" x="596" y="-1989.47" font-family="Courier,monospace" font-size="11.00">MNA_Pad_Counts_Walker</text>
|
28 |
-
</a>
|
29 |
-
</g>
|
30 |
-
<!-- \\Walker_Category -->
|
31 |
-
<g id="node39" class="node"><title>\\Walker_Category</title>
|
32 |
-
<ellipse fill="none" stroke="black" cx="315" cy="-158.27" rx="77.1866" ry="18"/>
|
33 |
-
<text text-anchor="middle" x="315" y="-154.57" font-family="Times New Roman,serif" font-size="14.00" fill="gray">\Walker_Category</text>
|
34 |
-
</g>
|
35 |
-
<!-- \\MNA_Pad_Counts_Walker->\\Walker_Category -->
|
36 |
-
<g id="edge3" class="edge"><title>\\MNA_Pad_Counts_Walker->\\Walker_Category</title>
|
37 |
-
<path fill="none" stroke="black" d="M516.887,-1986.01C504.978,-1981.66 494.009,-1975.09 486,-1965.27 360.549,-1811.44 541.135,-332.707 414,-180.27 409.749,-175.173 404.596,-171.105 398.902,-167.874"/>
|
38 |
-
<polygon fill="none" stroke="black" points="400.099,-164.568 389.563,-163.455 397.106,-170.896 400.099,-164.568"/>
|
39 |
-
</g>
|
40 |
-
<!-- \\CPAC_Storage_Model_MLA -->
|
41 |
-
<g id="node3" class="node"><title>\\CPAC_Storage_Model_MLA</title>
|
42 |
-
<a xlink:href="includes.class-mla-admin-columns-support.html" xlink:title="CPAC_Storage_Model_MLA" target="_parent">
|
43 |
-
<polygon fill="none" stroke="black" points="678.5,-1038.27 513.5,-1038.27 513.5,-1002.27 678.5,-1002.27 678.5,-1038.27"/>
|
44 |
-
<text text-anchor="middle" x="596" y="-1017.47" font-family="Courier,monospace" font-size="11.00">CPAC_Storage_Model_MLA</text>
|
45 |
-
</a>
|
46 |
-
</g>
|
47 |
-
<!-- \\CPAC_Storage_Model -->
|
48 |
-
<g id="node41" class="node"><title>\\CPAC_Storage_Model</title>
|
49 |
-
<ellipse fill="none" stroke="black" cx="315" cy="-104.27" rx="98.5829" ry="18"/>
|
50 |
-
<text text-anchor="middle" x="315" y="-100.57" font-family="Times New Roman,serif" font-size="14.00" fill="gray">\CPAC_Storage_Model</text>
|
51 |
-
</g>
|
52 |
-
<!-- \\CPAC_Storage_Model_MLA->\\CPAC_Storage_Model -->
|
53 |
-
<g id="edge5" class="edge"><title>\\CPAC_Storage_Model_MLA->\\CPAC_Storage_Model</title>
|
54 |
-
<path fill="none" stroke="black" d="M513.41,-1012.25C502.939,-1007.97 493.333,-1001.88 486,-993.27 361.337,-846.953 536.748,-279.197 414,-131.27 410.566,-127.132 406.562,-123.597 402.171,-120.579"/>
|
55 |
-
<polygon fill="none" stroke="black" points="403.699,-117.418 393.299,-115.392 400.165,-123.461 403.699,-117.418"/>
|
56 |
-
</g>
|
57 |
-
<!-- \\MLA_Ajax -->
|
58 |
-
<g id="node4" class="node"><title>\\MLA_Ajax</title>
|
59 |
-
<a xlink:href="includes.class-mla-ajax.html" xlink:title="MLA_Ajax" target="_parent">
|
60 |
-
<polygon fill="none" stroke="black" points="631.5,-1956.27 560.5,-1956.27 560.5,-1920.27 631.5,-1920.27 631.5,-1956.27"/>
|
61 |
-
<text text-anchor="middle" x="596" y="-1935.47" font-family="Courier,monospace" font-size="11.00">MLA_Ajax</text>
|
62 |
-
</a>
|
63 |
-
</g>
|
64 |
-
<!-- \\MLACoreOptions -->
|
65 |
-
<g id="node5" class="node"><title>\\MLACoreOptions</title>
|
66 |
-
<a xlink:href="includes.class-mla-core-options.html" xlink:title="MLACoreOptions" target="_parent">
|
67 |
-
<polygon fill="none" stroke="black" points="651.5,-1902.27 540.5,-1902.27 540.5,-1866.27 651.5,-1866.27 651.5,-1902.27"/>
|
68 |
-
<text text-anchor="middle" x="596" y="-1881.47" font-family="Courier,monospace" font-size="11.00">MLACoreOptions</text>
|
69 |
-
</a>
|
70 |
-
</g>
|
71 |
-
<!-- \\MLACore -->
|
72 |
-
<g id="node6" class="node"><title>\\MLACore</title>
|
73 |
-
<a xlink:href="includes.class-mla-core.html" xlink:title="MLACore" target="_parent">
|
74 |
-
<polygon fill="none" stroke="black" points="628,-1848.27 564,-1848.27 564,-1812.27 628,-1812.27 628,-1848.27"/>
|
75 |
-
<text text-anchor="middle" x="596" y="-1827.47" font-family="Courier,monospace" font-size="11.00">MLACore</text>
|
76 |
-
</a>
|
77 |
-
</g>
|
78 |
-
<!-- \\MLA_Checklist_Walker -->
|
79 |
-
<g id="node7" class="node"><title>\\MLA_Checklist_Walker</title>
|
80 |
-
<a xlink:href="includes.class-mla-core.html" xlink:title="MLA_Checklist_Walker" target="_parent">
|
81 |
-
<polygon fill="none" stroke="black" points="672,-1794.27 520,-1794.27 520,-1758.27 672,-1758.27 672,-1794.27"/>
|
82 |
-
<text text-anchor="middle" x="596" y="-1773.47" font-family="Courier,monospace" font-size="11.00">MLA_Checklist_Walker</text>
|
83 |
-
</a>
|
84 |
-
</g>
|
85 |
-
<!-- \\MLA_Checklist_Walker->\\Walker_Category -->
|
86 |
-
<g id="edge7" class="edge"><title>\\MLA_Checklist_Walker->\\Walker_Category</title>
|
87 |
-
<path fill="none" stroke="black" d="M519.976,-1771.03C506.898,-1766.72 494.716,-1759.9 486,-1749.27 375.329,-1614.33 526.148,-313.982 414,-180.27 409.735,-175.185 404.572,-171.125 398.872,-167.899"/>
|
88 |
-
<polygon fill="none" stroke="black" points="400.062,-164.591 389.525,-163.488 397.074,-170.921 400.062,-164.591"/>
|
89 |
-
</g>
|
90 |
-
<!-- \\MLAPDF -->
|
91 |
-
<g id="node8" class="node"><title>\\MLAPDF</title>
|
92 |
-
<a xlink:href="includes.class-mla-data-pdf.html" xlink:title="MLAPDF" target="_parent">
|
93 |
-
<polygon fill="none" stroke="black" points="624.5,-1740.27 567.5,-1740.27 567.5,-1704.27 624.5,-1704.27 624.5,-1740.27"/>
|
94 |
-
<text text-anchor="middle" x="596" y="-1719.47" font-family="Courier,monospace" font-size="11.00">MLAPDF</text>
|
95 |
-
</a>
|
96 |
-
</g>
|
97 |
-
<!-- \\MLAQuery -->
|
98 |
-
<g id="node9" class="node"><title>\\MLAQuery</title>
|
99 |
-
<a xlink:href="includes.class-mla-data-query.html" xlink:title="MLAQuery" target="_parent">
|
100 |
-
<polygon fill="none" stroke="black" points="631.5,-1686.27 560.5,-1686.27 560.5,-1650.27 631.5,-1650.27 631.5,-1686.27"/>
|
101 |
-
<text text-anchor="middle" x="596" y="-1665.47" font-family="Courier,monospace" font-size="11.00">MLAQuery</text>
|
102 |
-
</a>
|
103 |
-
</g>
|
104 |
-
<!-- \\MLAReferences -->
|
105 |
-
<g id="node10" class="node"><title>\\MLAReferences</title>
|
106 |
-
<a xlink:href="includes.class-mla-data-references.html" xlink:title="MLAReferences" target="_parent">
|
107 |
-
<polygon fill="none" stroke="black" points="648,-1632.27 544,-1632.27 544,-1596.27 648,-1596.27 648,-1632.27"/>
|
108 |
-
<text text-anchor="middle" x="596" y="-1611.47" font-family="Courier,monospace" font-size="11.00">MLAReferences</text>
|
109 |
-
</a>
|
110 |
-
</g>
|
111 |
-
<!-- \\MLAData_Source -->
|
112 |
-
<g id="node11" class="node"><title>\\MLAData_Source</title>
|
113 |
-
<a xlink:href="includes.class-mla-data-source.html" xlink:title="MLAData_Source" target="_parent">
|
114 |
-
<polygon fill="none" stroke="black" points="651.5,-1578.27 540.5,-1578.27 540.5,-1542.27 651.5,-1542.27 651.5,-1578.27"/>
|
115 |
-
<text text-anchor="middle" x="596" y="-1557.47" font-family="Courier,monospace" font-size="11.00">MLAData_Source</text>
|
116 |
-
</a>
|
117 |
-
</g>
|
118 |
-
<!-- \\MLAData -->
|
119 |
-
<g id="node12" class="node"><title>\\MLAData</title>
|
120 |
-
<a xlink:href="includes.class-mla-data.html" xlink:title="MLAData" target="_parent">
|
121 |
-
<polygon fill="none" stroke="black" points="628,-1524.27 564,-1524.27 564,-1488.27 628,-1488.27 628,-1524.27"/>
|
122 |
-
<text text-anchor="middle" x="596" y="-1503.47" font-family="Courier,monospace" font-size="11.00">MLAData</text>
|
123 |
-
</a>
|
124 |
-
</g>
|
125 |
-
<!-- \\MLAEdit -->
|
126 |
-
<g id="node13" class="node"><title>\\MLAEdit</title>
|
127 |
-
<a xlink:href="includes.class-mla-edit-media.html" xlink:title="MLAEdit" target="_parent">
|
128 |
-
<polygon fill="none" stroke="black" points="628,-1470.27 564,-1470.27 564,-1434.27 628,-1434.27 628,-1470.27"/>
|
129 |
-
<text text-anchor="middle" x="596" y="-1449.47" font-family="Courier,monospace" font-size="11.00">MLAEdit</text>
|
130 |
-
</a>
|
131 |
-
</g>
|
132 |
-
<!-- \\MLAImageProcessor -->
|
133 |
-
<g id="node14" class="node"><title>\\MLAImageProcessor</title>
|
134 |
-
<a xlink:href="includes.class-mla-image-processor.html" xlink:title="MLAImageProcessor" target="_parent">
|
135 |
-
<polygon fill="none" stroke="black" points="661.5,-1416.27 530.5,-1416.27 530.5,-1380.27 661.5,-1380.27 661.5,-1416.27"/>
|
136 |
-
<text text-anchor="middle" x="596" y="-1395.47" font-family="Courier,monospace" font-size="11.00">MLAImageProcessor</text>
|
137 |
-
</a>
|
138 |
-
</g>
|
139 |
-
<!-- \\MLAMutex -->
|
140 |
-
<g id="node15" class="node"><title>\\MLAMutex</title>
|
141 |
-
<a xlink:href="includes.class-mla-image-processor.html" xlink:title="MLAMutex" target="_parent">
|
142 |
-
<polygon fill="none" stroke="black" points="631.5,-1362.27 560.5,-1362.27 560.5,-1326.27 631.5,-1326.27 631.5,-1362.27"/>
|
143 |
-
<text text-anchor="middle" x="596" y="-1341.47" font-family="Courier,monospace" font-size="11.00">MLAMutex</text>
|
144 |
-
</a>
|
145 |
-
</g>
|
146 |
-
<!-- \\MLA_List_Table -->
|
147 |
-
<g id="node16" class="node"><title>\\MLA_List_Table</title>
|
148 |
-
<a xlink:href="includes.class-mla-list-table.html" xlink:title="MLA_List_Table" target="_parent">
|
149 |
-
<polygon fill="none" stroke="black" points="370.5,-1147.27 259.5,-1147.27 259.5,-1111.27 370.5,-1111.27 370.5,-1147.27"/>
|
150 |
-
<text text-anchor="middle" x="315" y="-1126.47" font-family="Courier,monospace" font-size="11.00">MLA_List_Table</text>
|
151 |
-
</a>
|
152 |
-
</g>
|
153 |
-
<!-- \\WP_List_Table -->
|
154 |
-
<g id="node44" class="node"><title>\\WP_List_Table</title>
|
155 |
-
<ellipse fill="none" stroke="black" cx="72" cy="-566.27" rx="71.4873" ry="18"/>
|
156 |
-
<text text-anchor="middle" x="72" y="-562.57" font-family="Times New Roman,serif" font-size="14.00" fill="gray">\WP_List_Table</text>
|
157 |
-
</g>
|
158 |
-
<!-- \\MLA_List_Table->\\WP_List_Table -->
|
159 |
-
<g id="edge9" class="edge"><title>\\MLA_List_Table->\\WP_List_Table</title>
|
160 |
-
<path fill="none" stroke="black" d="M259.354,-1127.5C243.634,-1124.43 227.618,-1118.46 216,-1107.27 139.963,-1034.04 89.9668,-695.24 76.5978,-594.559"/>
|
161 |
-
<polygon fill="none" stroke="black" points="80.0528,-593.987 75.2829,-584.527 73.1122,-594.897 80.0528,-593.987"/>
|
162 |
-
</g>
|
163 |
-
<!-- \\MLA -->
|
164 |
-
<g id="node17" class="node"><title>\\MLA</title>
|
165 |
-
<a xlink:href="includes.class-mla-main.html" xlink:title="MLA" target="_parent">
|
166 |
-
<polygon fill="none" stroke="black" points="623,-1308.27 569,-1308.27 569,-1272.27 623,-1272.27 623,-1308.27"/>
|
167 |
-
<text text-anchor="middle" x="596" y="-1287.47" font-family="Courier,monospace" font-size="11.00">MLA</text>
|
168 |
-
</a>
|
169 |
-
</g>
|
170 |
-
<!-- \\MLAModal_Ajax -->
|
171 |
-
<g id="node18" class="node"><title>\\MLAModal_Ajax</title>
|
172 |
-
<a xlink:href="includes.class-mla-media-modal-ajax.html" xlink:title="MLAModal_Ajax" target="_parent">
|
173 |
-
<polygon fill="none" stroke="black" points="648,-1254.27 544,-1254.27 544,-1218.27 648,-1218.27 648,-1254.27"/>
|
174 |
-
<text text-anchor="middle" x="596" y="-1233.47" font-family="Courier,monospace" font-size="11.00">MLAModal_Ajax</text>
|
175 |
-
</a>
|
176 |
-
</g>
|
177 |
-
<!-- \\MLAModal -->
|
178 |
-
<g id="node19" class="node"><title>\\MLAModal</title>
|
179 |
-
<a xlink:href="includes.class-mla-media-modal.html" xlink:title="MLAModal" target="_parent">
|
180 |
-
<polygon fill="none" stroke="black" points="631.5,-1200.27 560.5,-1200.27 560.5,-1164.27 631.5,-1164.27 631.5,-1200.27"/>
|
181 |
-
<text text-anchor="middle" x="596" y="-1179.47" font-family="Courier,monospace" font-size="11.00">MLAModal</text>
|
182 |
-
</a>
|
183 |
-
</g>
|
184 |
-
<!-- \\MLAMime -->
|
185 |
-
<g id="node20" class="node"><title>\\MLAMime</title>
|
186 |
-
<a xlink:href="includes.class-mla-mime-types.html" xlink:title="MLAMime" target="_parent">
|
187 |
-
<polygon fill="none" stroke="black" points="628,-1146.27 564,-1146.27 564,-1110.27 628,-1110.27 628,-1146.27"/>
|
188 |
-
<text text-anchor="middle" x="596" y="-1125.47" font-family="Courier,monospace" font-size="11.00">MLAMime</text>
|
189 |
-
</a>
|
190 |
-
</g>
|
191 |
-
<!-- \\MLAObjects -->
|
192 |
-
<g id="node21" class="node"><title>\\MLAObjects</title>
|
193 |
-
<a xlink:href="includes.class-mla-objects.html" xlink:title="MLAObjects" target="_parent">
|
194 |
-
<polygon fill="none" stroke="black" points="638,-1092.27 554,-1092.27 554,-1056.27 638,-1056.27 638,-1092.27"/>
|
195 |
-
<text text-anchor="middle" x="596" y="-1071.47" font-family="Courier,monospace" font-size="11.00">MLAObjects</text>
|
196 |
-
</a>
|
197 |
-
</g>
|
198 |
-
<!-- \\MLATextWidget -->
|
199 |
-
<g id="node22" class="node"><title>\\MLATextWidget</title>
|
200 |
-
<a xlink:href="includes.class-mla-objects.html" xlink:title="MLATextWidget" target="_parent">
|
201 |
-
<polygon fill="none" stroke="black" points="648,-606.27 544,-606.27 544,-570.27 648,-570.27 648,-606.27"/>
|
202 |
-
<text text-anchor="middle" x="596" y="-585.47" font-family="Courier,monospace" font-size="11.00">MLATextWidget</text>
|
203 |
-
</a>
|
204 |
-
</g>
|
205 |
-
<!-- \\WP_Widget -->
|
206 |
-
<g id="node46" class="node"><title>\\WP_Widget</title>
|
207 |
-
<ellipse fill="none" stroke="black" cx="315" cy="-50.2701" rx="58.4896" ry="18"/>
|
208 |
-
<text text-anchor="middle" x="315" y="-46.5701" font-family="Times New Roman,serif" font-size="14.00" fill="gray">\WP_Widget</text>
|
209 |
-
</g>
|
210 |
-
<!-- \\MLATextWidget->\\WP_Widget -->
|
211 |
-
<g id="edge11" class="edge"><title>\\MLATextWidget->\\WP_Widget</title>
|
212 |
-
<path fill="none" stroke="black" d="M543.997,-587.548C523.185,-584.55 500.622,-577.354 486,-561.27 339.706,-400.351 558.188,-240.079 414,-77.2701 405.552,-67.7315 394.075,-61.4257 381.948,-57.2878"/>
|
213 |
-
<polygon fill="none" stroke="black" points="382.71,-53.8639 372.129,-54.4137 380.743,-60.582 382.71,-53.8639"/>
|
214 |
-
</g>
|
215 |
-
<!-- \\MLAOptions -->
|
216 |
-
<g id="node23" class="node"><title>\\MLAOptions</title>
|
217 |
-
<a xlink:href="includes.class-mla-options.html" xlink:title="MLAOptions" target="_parent">
|
218 |
-
<polygon fill="none" stroke="black" points="638,-984.27 554,-984.27 554,-948.27 638,-948.27 638,-984.27"/>
|
219 |
-
<text text-anchor="middle" x="596" y="-963.47" font-family="Courier,monospace" font-size="11.00">MLAOptions</text>
|
220 |
-
</a>
|
221 |
-
</g>
|
222 |
-
<!-- \\MLA_Polylang -->
|
223 |
-
<g id="node24" class="node"><title>\\MLA_Polylang</title>
|
224 |
-
<a xlink:href="includes.class-mla-polylang-support.html" xlink:title="MLA_Polylang" target="_parent">
|
225 |
-
<polygon fill="none" stroke="black" points="645,-930.27 547,-930.27 547,-894.27 645,-894.27 645,-930.27"/>
|
226 |
-
<text text-anchor="middle" x="596" y="-909.47" font-family="Courier,monospace" font-size="11.00">MLA_Polylang</text>
|
227 |
-
</a>
|
228 |
-
</g>
|
229 |
-
<!-- \\MLASettings -->
|
230 |
-
<g id="node25" class="node"><title>\\MLASettings</title>
|
231 |
-
<a xlink:href="includes.class-mla-settings.html" xlink:title="MLASettings" target="_parent">
|
232 |
-
<polygon fill="none" stroke="black" points="641.5,-876.27 550.5,-876.27 550.5,-840.27 641.5,-840.27 641.5,-876.27"/>
|
233 |
-
<text text-anchor="middle" x="596" y="-855.47" font-family="Courier,monospace" font-size="11.00">MLASettings</text>
|
234 |
-
</a>
|
235 |
-
</g>
|
236 |
-
<!-- \\MLAShortcode_Support -->
|
237 |
-
<g id="node26" class="node"><title>\\MLAShortcode_Support</title>
|
238 |
-
<a xlink:href="includes.class-mla-shortcode-support.html" xlink:title="MLAShortcode_Support" target="_parent">
|
239 |
-
<polygon fill="none" stroke="black" points="672,-822.27 520,-822.27 520,-786.27 672,-786.27 672,-822.27"/>
|
240 |
-
<text text-anchor="middle" x="596" y="-801.47" font-family="Courier,monospace" font-size="11.00">MLAShortcode_Support</text>
|
241 |
-
</a>
|
242 |
-
</g>
|
243 |
-
<!-- \\MLAShortcodes -->
|
244 |
-
<g id="node27" class="node"><title>\\MLAShortcodes</title>
|
245 |
-
<a xlink:href="includes.class-mla-shortcodes.html" xlink:title="MLAShortcodes" target="_parent">
|
246 |
-
<polygon fill="none" stroke="black" points="648,-768.27 544,-768.27 544,-732.27 648,-732.27 648,-768.27"/>
|
247 |
-
<text text-anchor="middle" x="596" y="-747.47" font-family="Courier,monospace" font-size="11.00">MLAShortcodes</text>
|
248 |
-
</a>
|
249 |
-
</g>
|
250 |
-
<!-- \\MLATemplate_Support -->
|
251 |
-
<g id="node28" class="node"><title>\\MLATemplate_Support</title>
|
252 |
-
<a xlink:href="includes.class-mla-template-support.html" xlink:title="MLATemplate_Support" target="_parent">
|
253 |
-
<polygon fill="none" stroke="black" points="668.5,-714.27 523.5,-714.27 523.5,-678.27 668.5,-678.27 668.5,-714.27"/>
|
254 |
-
<text text-anchor="middle" x="596" y="-693.47" font-family="Courier,monospace" font-size="11.00">MLATemplate_Support</text>
|
255 |
-
</a>
|
256 |
-
</g>
|
257 |
-
<!-- \\MLA_Thumbnail -->
|
258 |
-
<g id="node29" class="node"><title>\\MLA_Thumbnail</title>
|
259 |
-
<a xlink:href="includes.class-mla-thumbnail-generation.html" xlink:title="MLA_Thumbnail" target="_parent">
|
260 |
-
<polygon fill="none" stroke="black" points="648,-660.27 544,-660.27 544,-624.27 648,-624.27 648,-660.27"/>
|
261 |
-
<text text-anchor="middle" x="596" y="-639.47" font-family="Courier,monospace" font-size="11.00">MLA_Thumbnail</text>
|
262 |
-
</a>
|
263 |
-
</g>
|
264 |
-
<!-- \\MLA_Upload_List_Table -->
|
265 |
-
<g id="node30" class="node"><title>\\MLA_Upload_List_Table</title>
|
266 |
-
<a xlink:href="includes.class-mla-upload-list-table.html" xlink:title="MLA_Upload_List_Table" target="_parent">
|
267 |
-
<polygon fill="none" stroke="black" points="675,-552.27 517,-552.27 517,-516.27 675,-516.27 675,-552.27"/>
|
268 |
-
<text text-anchor="middle" x="596" y="-531.47" font-family="Courier,monospace" font-size="11.00">MLA_Upload_List_Table</text>
|
269 |
-
</a>
|
270 |
-
</g>
|
271 |
-
<!-- \\MLA_Upload_List_Table->\\WP_List_Table -->
|
272 |
-
<g id="edge13" class="edge"><title>\\MLA_Upload_List_Table->\\WP_List_Table</title>
|
273 |
-
<path fill="none" stroke="black" d="M516.918,-526.968C505.23,-522.707 494.328,-516.43 486,-507.27 339.706,-346.351 564.374,-180.383 414,-23.2701 383.323,8.78162 360.254,-1.11822 316,-4.27014"/>
|
274 |
-
</g>
|
275 |
-
<!-- \\MLA_Upload_Optional_List_Table -->
|
276 |
-
<g id="node31" class="node"><title>\\MLA_Upload_Optional_List_Table</title>
|
277 |
-
<a xlink:href="includes.class-mla-upload-optional-list-table.html" xlink:title="MLA_Upload_Optional_List_Table" target="_parent">
|
278 |
-
<polygon fill="none" stroke="black" points="705.5,-498.27 486.5,-498.27 486.5,-462.27 705.5,-462.27 705.5,-498.27"/>
|
279 |
-
<text text-anchor="middle" x="596" y="-477.47" font-family="Courier,monospace" font-size="11.00">MLA_Upload_Optional_List_Table</text>
|
280 |
-
</a>
|
281 |
-
</g>
|
282 |
-
<!-- \\MLA_Upload_Optional_List_Table->\\WP_List_Table -->
|
283 |
-
<g id="edge15" class="edge"><title>\\MLA_Upload_Optional_List_Table->\\WP_List_Table</title>
|
284 |
-
<path fill="none" stroke="black" d="M496.052,-462.061C492.425,-459.477 489.046,-456.56 486,-453.27 354.352,-311.086 549.252,-162.03 414,-23.2701 383.032,8.50074 360.254,-1.11822 316,-4.27014"/>
|
285 |
-
</g>
|
286 |
-
<!-- \\MLA_View_List_Table -->
|
287 |
-
<g id="node32" class="node"><title>\\MLA_View_List_Table</title>
|
288 |
-
<a xlink:href="includes.class-mla-view-list-table.html" xlink:title="MLA_View_List_Table" target="_parent">
|
289 |
-
<polygon fill="none" stroke="black" points="668.5,-390.27 523.5,-390.27 523.5,-354.27 668.5,-354.27 668.5,-390.27"/>
|
290 |
-
<text text-anchor="middle" x="596" y="-369.47" font-family="Courier,monospace" font-size="11.00">MLA_View_List_Table</text>
|
291 |
-
</a>
|
292 |
-
</g>
|
293 |
-
<!-- \\MLA_View_List_Table->\\WP_List_Table -->
|
294 |
-
<g id="edge17" class="edge"><title>\\MLA_View_List_Table->\\WP_List_Table</title>
|
295 |
-
<path fill="none" stroke="black" d="M523.348,-366.378C509.446,-362.196 496.084,-355.587 486,-345.27 383.497,-240.399 519.16,-125.477 414,-23.2701 382.185,7.65184 360.254,-1.11822 316,-4.27014"/>
|
296 |
-
<path fill="none" stroke="black" d="M314,-4.27014C269.746,-7.42207 248.39,7.04956 216,-23.2701 138.578,-95.7439 89.4654,-437.245 76.4655,-538.137"/>
|
297 |
-
<polygon fill="none" stroke="black" points="72.9776,-537.821 75.1887,-548.183 79.9218,-538.704 72.9776,-537.821"/>
|
298 |
-
</g>
|
299 |
-
<!-- \\MLA_WPML -->
|
300 |
-
<g id="node33" class="node"><title>\\MLA_WPML</title>
|
301 |
-
<a xlink:href="includes.class-mla-wpml-support.html" xlink:title="MLA_WPML" target="_parent">
|
302 |
-
<polygon fill="none" stroke="black" points="631.5,-444.27 560.5,-444.27 560.5,-408.27 631.5,-408.27 631.5,-444.27"/>
|
303 |
-
<text text-anchor="middle" x="596" y="-423.47" font-family="Courier,monospace" font-size="11.00">MLA_WPML</text>
|
304 |
-
</a>
|
305 |
-
</g>
|
306 |
-
<!-- \\MLA_WPML_List_Table -->
|
307 |
-
<g id="node34" class="node"><title>\\MLA_WPML_List_Table</title>
|
308 |
-
<a xlink:href="includes.class-mla-wpml-support.html" xlink:title="MLA_WPML_List_Table" target="_parent">
|
309 |
-
<polygon fill="none" stroke="black" points="668.5,-2064.27 523.5,-2064.27 523.5,-2028.27 668.5,-2028.27 668.5,-2064.27"/>
|
310 |
-
<text text-anchor="middle" x="596" y="-2043.47" font-family="Courier,monospace" font-size="11.00">MLA_WPML_List_Table</text>
|
311 |
-
</a>
|
312 |
-
</g>
|
313 |
-
<!-- \\MLA_WPML_List_Table->\\MLA_List_Table -->
|
314 |
-
<g id="edge19" class="edge"><title>\\MLA_WPML_List_Table->\\MLA_List_Table</title>
|
315 |
-
<path fill="none" stroke="black" d="M523.384,-2040.7C509.395,-2036.51 495.989,-2029.81 486,-2019.27 363.683,-1890.15 324.814,-1294.73 317.408,-1157.53"/>
|
316 |
-
<polygon fill="none" stroke="black" points="320.896,-1157.21 316.874,-1147.41 313.906,-1157.58 320.896,-1157.21"/>
|
317 |
-
</g>
|
318 |
-
<!-- \\MLA_WPML_Table -->
|
319 |
-
<g id="node35" class="node"><title>\\MLA_WPML_Table</title>
|
320 |
-
<a xlink:href="includes.class-mla-wpml-support.html" xlink:title="MLA_WPML_Table" target="_parent">
|
321 |
-
<polygon fill="none" stroke="black" points="651.5,-336.27 540.5,-336.27 540.5,-300.27 651.5,-300.27 651.5,-336.27"/>
|
322 |
-
<text text-anchor="middle" x="596" y="-315.47" font-family="Courier,monospace" font-size="11.00">MLA_WPML_Table</text>
|
323 |
-
</a>
|
324 |
-
</g>
|
325 |
-
<!-- \\MLAUninstall -->
|
326 |
-
<g id="node36" class="node"><title>\\MLAUninstall</title>
|
327 |
-
<a xlink:href="mla-uninstall.html" xlink:title="MLAUninstall" target="_parent">
|
328 |
-
<polygon fill="none" stroke="black" points="645,-282.27 547,-282.27 547,-246.27 645,-246.27 645,-282.27"/>
|
329 |
-
<text text-anchor="middle" x="596" y="-261.47" font-family="Courier,monospace" font-size="11.00">MLAUninstall</text>
|
330 |
-
</a>
|
331 |
-
</g>
|
332 |
-
<!-- \\MLATest -->
|
333 |
-
<g id="node37" class="node"><title>\\MLATest</title>
|
334 |
-
<a xlink:href="tests.class-mla-tests.html" xlink:title="MLATest" target="_parent">
|
335 |
-
<polygon fill="none" stroke="black" points="628,-228.27 564,-228.27 564,-192.27 628,-192.27 628,-228.27"/>
|
336 |
-
<text text-anchor="middle" x="596" y="-207.47" font-family="Courier,monospace" font-size="11.00">MLATest</text>
|
337 |
-
</a>
|
338 |
-
</g>
|
339 |
-
</g>
|
340 |
-
</svg>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
phpDocs/classes/CPAC_Storage_Model_MLA.html
CHANGED
@@ -1,290 +1,776 @@
|
|
1 |
-
<!DOCTYPE html
|
|
|
2 |
<head>
|
3 |
-
<meta
|
4 |
-
<meta
|
5 |
-
<
|
6 |
-
<
|
7 |
-
<meta name="
|
8 |
-
|
9 |
-
<link href="../css/
|
10 |
-
<
|
11 |
-
<link rel="
|
12 |
-
<link
|
13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
</head>
|
15 |
<body>
|
|
|
16 |
<div class="navbar navbar-fixed-top">
|
17 |
-
<div class="navbar-inner"
|
18 |
-
<
|
19 |
-
<
|
20 |
-
<
|
21 |
-
|
22 |
-
<
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
<li class="dropdown" id="charts-menu">
|
27 |
-
<a href="#
|
28 |
-
|
29 |
-
</
|
30 |
-
<
|
31 |
-
<
|
32 |
-
|
33 |
-
<
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
<
|
40 |
-
|
41 |
-
</
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
</div>
|
47 |
-
|
48 |
-
<
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
<div class="
|
53 |
-
<div class="
|
54 |
-
<
|
55 |
-
<
|
56 |
-
</div>
|
57 |
-
<
|
58 |
-
<
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
<li class="
|
64 |
-
<li class="
|
65 |
-
<li class="
|
66 |
-
<li class="
|
67 |
-
|
68 |
-
|
69 |
-
<li class="
|
70 |
-
<li class="
|
71 |
-
<li class="
|
72 |
-
|
73 |
-
|
74 |
-
<li class="
|
75 |
-
<li class="
|
76 |
-
<li class="
|
77 |
-
<li class="
|
78 |
-
<
|
79 |
-
<li class="
|
80 |
-
</
|
81 |
-
</
|
82 |
-
<
|
83 |
-
<
|
84 |
-
<li>
|
85 |
-
<
|
86 |
-
</li>
|
87 |
-
<li><a href="../
|
88 |
-
<li class="
|
89 |
-
<
|
90 |
-
</li>
|
91 |
-
</
|
92 |
-
<
|
93 |
-
<
|
94 |
-
<
|
95 |
-
<
|
96 |
-
<
|
97 |
-
<
|
98 |
-
<
|
99 |
-
<
|
100 |
-
</
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
</
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
<
|
109 |
-
<
|
110 |
-
|
111 |
-
<
|
112 |
-
<
|
113 |
-
<
|
114 |
-
|
115 |
-
<
|
116 |
-
|
117 |
-
<
|
118 |
-
</
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
<
|
123 |
-
<
|
124 |
-
<
|
125 |
-
<
|
126 |
-
<
|
127 |
-
|
128 |
-
<
|
129 |
-
<
|
130 |
-
</
|
131 |
-
<
|
132 |
-
<
|
133 |
-
|
134 |
-
</
|
135 |
-
|
136 |
-
<
|
137 |
-
<
|
138 |
-
<
|
139 |
-
<
|
140 |
-
<
|
141 |
-
<
|
142 |
-
<
|
143 |
-
<
|
144 |
-
<
|
145 |
-
</
|
146 |
-
|
147 |
-
<
|
148 |
-
<
|
149 |
-
</
|
150 |
-
|
151 |
-
<
|
152 |
-
|
153 |
-
|
154 |
-
<
|
155 |
-
<
|
156 |
-
<
|
157 |
-
|
158 |
-
<
|
159 |
-
<
|
160 |
-
</
|
161 |
-
<
|
162 |
-
<
|
163 |
-
|
164 |
-
</
|
165 |
-
|
166 |
-
<
|
167 |
-
<
|
168 |
-
|
169 |
-
<
|
170 |
-
<
|
171 |
-
|
172 |
-
<
|
173 |
-
<
|
174 |
-
|
175 |
-
|
176 |
-
</
|
177 |
-
|
178 |
-
<
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
<
|
183 |
-
<
|
184 |
-
<
|
185 |
-
<div class="
|
186 |
-
<
|
187 |
-
<
|
188 |
-
|
189 |
-
<
|
190 |
-
<
|
191 |
-
</
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
<
|
199 |
-
<
|
200 |
-
<
|
201 |
-
<th>
|
202 |
-
|
203 |
-
</
|
204 |
-
<
|
205 |
-
|
206 |
-
|
207 |
-
</
|
208 |
-
</
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
<
|
214 |
-
<div class="row
|
215 |
-
<
|
216 |
-
<
|
217 |
-
|
218 |
-
<
|
219 |
-
</
|
220 |
-
|
221 |
-
<div class="
|
222 |
-
<
|
223 |
-
|
224 |
-
|
225 |
-
<
|
226 |
-
<
|
227 |
-
<
|
228 |
-
|
229 |
-
|
230 |
-
<
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
<
|
236 |
-
<
|
237 |
-
|
238 |
-
<
|
239 |
-
|
240 |
-
<
|
241 |
-
<
|
242 |
-
|
243 |
-
|
244 |
-
<
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
</
|
250 |
-
</div>
|
251 |
-
|
252 |
-
|
253 |
-
<
|
254 |
-
<div class="
|
255 |
-
<div class="
|
256 |
-
<
|
257 |
-
|
258 |
-
|
259 |
-
<
|
260 |
-
|
261 |
-
<
|
262 |
-
<
|
263 |
-
<
|
264 |
-
|
265 |
-
</
|
266 |
-
<
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
<
|
276 |
-
<
|
277 |
-
|
278 |
-
</
|
279 |
-
</
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
288 |
</div>
|
|
|
289 |
</body>
|
290 |
</html>
|
1 |
+
<!DOCTYPE html>
|
2 |
+
<html lang="en">
|
3 |
<head>
|
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</title>
|
7 |
+
<meta name="author" content=""/>
|
8 |
+
<meta name="description" content=""/>
|
9 |
+
|
10 |
+
<link href="../css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
|
11 |
+
<link href="../css/font-awesome.min.css" rel="stylesheet">
|
12 |
+
<link href="../css/prism.css" rel="stylesheet" media="all"/>
|
13 |
+
<link href="../css/template.css" rel="stylesheet" media="all"/>
|
14 |
+
|
15 |
+
<!--[if lt IE 9]>
|
16 |
+
<script src="../js/html5.js"></script>
|
17 |
+
<![endif]-->
|
18 |
+
<script src="../js/jquery-1.11.0.min.js"></script>
|
19 |
+
<script src="../js/ui/1.10.4/jquery-ui.min.js"></script>
|
20 |
+
<script src="../js/bootstrap.min.js"></script>
|
21 |
+
<script src="../js/jquery.smooth-scroll.js"></script>
|
22 |
+
<script src="../js/prism.min.js"></script>
|
23 |
+
<!-- TODO: Add http://jscrollpane.kelvinluck.com/ to style the scrollbars for browsers not using webkit-->
|
24 |
+
<script type="text/javascript">
|
25 |
+
function loadExternalCodeSnippets() {
|
26 |
+
Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach(function (pre) {
|
27 |
+
var src = pre.getAttribute('data-src');
|
28 |
+
var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
|
29 |
+
var language = 'php';
|
30 |
+
|
31 |
+
var code = document.createElement('code');
|
32 |
+
code.className = 'language-' + language;
|
33 |
+
|
34 |
+
pre.textContent = '';
|
35 |
+
|
36 |
+
code.textContent = 'Loading…';
|
37 |
+
|
38 |
+
pre.appendChild(code);
|
39 |
+
|
40 |
+
var xhr = new XMLHttpRequest();
|
41 |
+
|
42 |
+
xhr.open('GET', src, true);
|
43 |
+
|
44 |
+
xhr.onreadystatechange = function () {
|
45 |
+
if (xhr.readyState == 4) {
|
46 |
+
|
47 |
+
if (xhr.status < 400 && xhr.responseText) {
|
48 |
+
code.textContent = xhr.responseText;
|
49 |
+
|
50 |
+
Prism.highlightElement(code);
|
51 |
+
}
|
52 |
+
else if (xhr.status >= 400) {
|
53 |
+
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
|
54 |
+
}
|
55 |
+
else {
|
56 |
+
code.textContent = '✖ Error: File does not exist or is empty';
|
57 |
+
}
|
58 |
+
}
|
59 |
+
};
|
60 |
+
|
61 |
+
xhr.send(null);
|
62 |
+
});
|
63 |
+
}
|
64 |
+
|
65 |
+
$(document).ready(function(){
|
66 |
+
loadExternalCodeSnippets();
|
67 |
+
});
|
68 |
+
$('#source-view').on('shown', function () {
|
69 |
+
loadExternalCodeSnippets();
|
70 |
+
})
|
71 |
+
</script>
|
72 |
+
|
73 |
+
<link rel="shortcut icon" href="../images/favicon.ico"/>
|
74 |
+
<link rel="apple-touch-icon" href="../images/apple-touch-icon.png"/>
|
75 |
+
<link rel="apple-touch-icon" sizes="72x72" href="../images/apple-touch-icon-72x72.png"/>
|
76 |
+
<link rel="apple-touch-icon" sizes="114x114" href="../images/apple-touch-icon-114x114.png"/>
|
77 |
</head>
|
78 |
<body>
|
79 |
+
|
80 |
<div class="navbar navbar-fixed-top">
|
81 |
+
<div class="navbar-inner">
|
82 |
+
<div class="container">
|
83 |
+
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
|
84 |
+
<i class="icon-ellipsis-vertical"></i>
|
85 |
+
</a>
|
86 |
+
<a class="brand" href="../index.html">Media Library Assistant</a>
|
87 |
+
|
88 |
+
<div class="nav-collapse">
|
89 |
+
<ul class="nav pull-right">
|
90 |
+
<li class="dropdown" id="charts-menu">
|
91 |
+
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
92 |
+
Charts <b class="caret"></b>
|
93 |
+
</a>
|
94 |
+
<ul class="dropdown-menu">
|
95 |
+
<li>
|
96 |
+
<a href="../graphs/class.html">
|
97 |
+
<i class="icon-list-alt"></i> Class hierarchy diagram
|
98 |
+
</a>
|
99 |
+
</li>
|
100 |
+
</ul>
|
101 |
+
</li>
|
102 |
+
<li class="dropdown" id="reports-menu">
|
103 |
+
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
104 |
+
Reports <b class="caret"></b>
|
105 |
+
</a>
|
106 |
+
<ul class="dropdown-menu">
|
107 |
+
<li>
|
108 |
+
<a href="../reports/errors.html">
|
109 |
+
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">0</span>
|
110 |
+
</a>
|
111 |
+
</li>
|
112 |
+
<li>
|
113 |
+
<a href="../reports/markers.html">
|
114 |
+
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">3</span>
|
115 |
+
</a>
|
116 |
+
</li>
|
117 |
+
<li>
|
118 |
+
<a href="../reports/deprecated.html">
|
119 |
+
<i class="icon-list-alt"></i> Deprecated <span class="label label-info pull-right">0</span>
|
120 |
+
</a>
|
121 |
+
</li>
|
122 |
+
</ul>
|
123 |
+
</li>
|
124 |
+
</ul>
|
125 |
+
</div>
|
126 |
+
</div>
|
127 |
+
</div>
|
128 |
+
<!--<div class="go_to_top">-->
|
129 |
+
<!--<a href="#___" style="color: inherit">Back to top  <i class="icon-upload icon-white"></i></a>-->
|
130 |
+
<!--</div>-->
|
131 |
</div>
|
132 |
+
|
133 |
+
<div id="___" class="container-fluid">
|
134 |
+
<section class="row-fluid">
|
135 |
+
<div class="span2 sidebar">
|
136 |
+
<div class="accordion" style="margin-bottom: 0">
|
137 |
+
<div class="accordion-group">
|
138 |
+
<div class="accordion-heading">
|
139 |
+
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-119964867"></a>
|
140 |
+
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
141 |
+
</div>
|
142 |
+
<div id="namespace-119964867" class="accordion-body collapse in">
|
143 |
+
<div class="accordion-inner">
|
144 |
+
|
145 |
+
|
146 |
+
<ul>
|
147 |
+
<li class="class"><a href="../classes/CPAC_Storage_Model_MLA.html">CPAC_Storage_Model_MLA</a></li>
|
148 |
+
<li class="class"><a href="../classes/MLA.html">MLA</a></li>
|
149 |
+
<li class="class"><a href="../classes/MLA_Ajax.html">MLA_Ajax</a></li>
|
150 |
+
<li class="class"><a href="../classes/MLA_Checklist_Walker.html">MLA_Checklist_Walker</a></li>
|
151 |
+
<li class="class"><a href="../classes/MLA_Example_List_Table.html">MLA_Example_List_Table</a></li>
|
152 |
+
<li class="class"><a href="../classes/MLA_List_Table.html">MLA_List_Table</a></li>
|
153 |
+
<li class="class"><a href="../classes/MLA_Polylang.html">MLA_Polylang</a></li>
|
154 |
+
<li class="class"><a href="../classes/MLA_Thumbnail.html">MLA_Thumbnail</a></li>
|
155 |
+
<li class="class"><a href="../classes/MLA_Upgrader_Skin.html">MLA_Upgrader_Skin</a></li>
|
156 |
+
<li class="class"><a href="../classes/MLA_Upload_List_Table.html">MLA_Upload_List_Table</a></li>
|
157 |
+
<li class="class"><a href="../classes/MLA_Upload_Optional_List_Table.html">MLA_Upload_Optional_List_Table</a></li>
|
158 |
+
<li class="class"><a href="../classes/MLA_View_List_Table.html">MLA_View_List_Table</a></li>
|
159 |
+
<li class="class"><a href="../classes/MLA_WPML.html">MLA_WPML</a></li>
|
160 |
+
<li class="class"><a href="../classes/MLA_WPML_List_Table.html">MLA_WPML_List_Table</a></li>
|
161 |
+
<li class="class"><a href="../classes/MLA_WPML_Table.html">MLA_WPML_Table</a></li>
|
162 |
+
<li class="class"><a href="../classes/MLACore.html">MLACore</a></li>
|
163 |
+
<li class="class"><a href="../classes/MLACoreOptions.html">MLACoreOptions</a></li>
|
164 |
+
<li class="class"><a href="../classes/MLAData.html">MLAData</a></li>
|
165 |
+
<li class="class"><a href="../classes/MLAData_Source.html">MLAData_Source</a></li>
|
166 |
+
<li class="class"><a href="../classes/MLAEdit.html">MLAEdit</a></li>
|
167 |
+
<li class="class"><a href="../classes/MLAFileDownloader.html">MLAFileDownloader</a></li>
|
168 |
+
<li class="class"><a href="../classes/MLAImageProcessor.html">MLAImageProcessor</a></li>
|
169 |
+
<li class="class"><a href="../classes/MLAMime.html">MLAMime</a></li>
|
170 |
+
<li class="class"><a href="../classes/MLAModal.html">MLAModal</a></li>
|
171 |
+
<li class="class"><a href="../classes/MLAModal_Ajax.html">MLAModal_Ajax</a></li>
|
172 |
+
<li class="class"><a href="../classes/MLAMutex.html">MLAMutex</a></li>
|
173 |
+
<li class="class"><a href="../classes/MLAObjects.html">MLAObjects</a></li>
|
174 |
+
<li class="class"><a href="../classes/MLAOptions.html">MLAOptions</a></li>
|
175 |
+
<li class="class"><a href="../classes/MLAPDF.html">MLAPDF</a></li>
|
176 |
+
<li class="class"><a href="../classes/MLAQuery.html">MLAQuery</a></li>
|
177 |
+
<li class="class"><a href="../classes/MLAReferences.html">MLAReferences</a></li>
|
178 |
+
<li class="class"><a href="../classes/MLASettings.html">MLASettings</a></li>
|
179 |
+
<li class="class"><a href="../classes/MLAShortcode_Support.html">MLAShortcode_Support</a></li>
|
180 |
+
<li class="class"><a href="../classes/MLAShortcodes.html">MLAShortcodes</a></li>
|
181 |
+
<li class="class"><a href="../classes/MLATemplate_Support.html">MLATemplate_Support</a></li>
|
182 |
+
<li class="class"><a href="../classes/MLATest.html">MLATest</a></li>
|
183 |
+
<li class="class"><a href="../classes/MLATextWidget.html">MLATextWidget</a></li>
|
184 |
+
<li class="class"><a href="../classes/MLAUninstall.html">MLAUninstall</a></li>
|
185 |
+
</ul>
|
186 |
+
</div>
|
187 |
+
</div>
|
188 |
+
</div>
|
189 |
+
</div>
|
190 |
+
|
191 |
+
</div>
|
192 |
+
</section>
|
193 |
+
<section class="row-fluid">
|
194 |
+
<div class="span10 offset2">
|
195 |
+
<div class="row-fluid">
|
196 |
+
<div class="span8 content class">
|
197 |
+
<nav>
|
198 |
+
<a href="../namespaces/default.html">\</a> <i class="icon-level-up"></i>
|
199 |
+
</nav>
|
200 |
+
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal"><i class="icon-code"></i></a>
|
201 |
+
|
202 |
+
<h1><small>\</small>CPAC_Storage_Model_MLA</h1>
|
203 |
+
<p><em>Class CPAC Storage Model MLA (Media Library Assistant) supports the Admin Columns plugin</em></p>
|
204 |
+
|
205 |
+
|
206 |
+
|
207 |
+
<section id="summary">
|
208 |
+
<h2>Summary</h2>
|
209 |
+
<section class="row-fluid heading">
|
210 |
+
<section class="span4">
|
211 |
+
<a href="#methods">Methods</a>
|
212 |
+
</section>
|
213 |
+
<section class="span4">
|
214 |
+
<a href="#properties">Properties</a>
|
215 |
+
</section>
|
216 |
+
<section class="span4">
|
217 |
+
<a href="#constants">Constants</a>
|
218 |
+
</section>
|
219 |
+
</section>
|
220 |
+
<section class="row-fluid public">
|
221 |
+
<section class="span4">
|
222 |
+
<a href="../classes/CPAC_Storage_Model_MLA.html#method___construct" class="">__construct()</a><br />
|
223 |
+
<a href="../classes/CPAC_Storage_Model_MLA.html#method_init_manage_columns" class="">init_manage_columns()</a><br />
|
224 |
+
<a href="../classes/CPAC_Storage_Model_MLA.html#method_get_default_columns" class="">get_default_columns()</a><br />
|
225 |
+
<a href="../classes/CPAC_Storage_Model_MLA.html#method_get_default_column_names" class="">get_default_column_names()</a><br />
|
226 |
+
<a href="../classes/CPAC_Storage_Model_MLA.html#method_get_meta" class="">get_meta()</a><br />
|
227 |
+
<a href="../classes/CPAC_Storage_Model_MLA.html#method_manage_value" class="">manage_value()</a><br />
|
228 |
+
<a href="../classes/CPAC_Storage_Model_MLA.html#method_is_current_screen" class="">is_current_screen()</a><br />
|
229 |
+
<a href="../classes/CPAC_Storage_Model_MLA.html#method_is_columns_screen" class="">is_columns_screen()</a><br />
|
230 |
+
<a href="../classes/CPAC_Storage_Model_MLA.html#method_get_edit_link" class="">get_edit_link()</a><br />
|
231 |
+
</section>
|
232 |
+
<section class="span4">
|
233 |
+
<a href="../classes/CPAC_Storage_Model_MLA.html#property_subpage" class="">$subpage</a><br />
|
234 |
+
</section>
|
235 |
+
<section class="span4">
|
236 |
+
<em>No constants found</em>
|
237 |
+
</section>
|
238 |
+
</section>
|
239 |
+
<section class="row-fluid protected">
|
240 |
+
<section class="span4">
|
241 |
+
<a href="../classes/CPAC_Storage_Model_MLA.html#method_get_screen_link" class="">get_screen_link()</a><br />
|
242 |
+
</section>
|
243 |
+
<section class="span4">
|
244 |
+
<em>No protected properties found</em>
|
245 |
+
</section>
|
246 |
+
<section class="span4">
|
247 |
+
<em>N/A</em>
|
248 |
+
</section>
|
249 |
+
</section>
|
250 |
+
<section class="row-fluid private">
|
251 |
+
<section class="span4">
|
252 |
+
<em>No private methods found</em>
|
253 |
+
</section>
|
254 |
+
<section class="span4">
|
255 |
+
<em>No private properties found</em>
|
256 |
+
</section>
|
257 |
+
<section class="span4">
|
258 |
+
<em>N/A</em>
|
259 |
+
</section>
|
260 |
+
</section>
|
261 |
+
</section>
|
262 |
+
</div>
|
263 |
+
<aside class="span4 detailsbar">
|
264 |
+
|
265 |
+
|
266 |
+
<dl>
|
267 |
+
<dt>File</dt>
|
268 |
+
<dd><a href="../files/includes.class-mla-admin-columns-support.html"><div class="path-wrapper">includes\class-mla-admin-columns-support.php</div></a></dd>
|
269 |
+
<dt>Package</dt>
|
270 |
+
<dd><div class="namespace-wrapper">Media Library Assistant</div></dd>
|
271 |
+
<dt>Class hierarchy</dt>
|
272 |
+
<dd class="hierarchy">
|
273 |
+
|
274 |
+
<div class="namespace-wrapper">\CPAC_Storage_Model</div>
|
275 |
+
<div class="namespace-wrapper">\CPAC_Storage_Model_MLA</div>
|
276 |
+
</dd>
|
277 |
+
|
278 |
+
|
279 |
+
|
280 |
+
|
281 |
+
|
282 |
+
</dl>
|
283 |
+
<h2>Tags</h2>
|
284 |
+
<table class="table table-condensed">
|
285 |
+
<tr>
|
286 |
+
<th>
|
287 |
+
since
|
288 |
+
</th>
|
289 |
+
<td>
|
290 |
+
|
291 |
+
</td>
|
292 |
+
</tr>
|
293 |
+
</table>
|
294 |
+
</aside>
|
295 |
+
</div>
|
296 |
+
|
297 |
+
|
298 |
+
<a id="properties" name="properties"></a>
|
299 |
+
<div class="row-fluid">
|
300 |
+
<div class="span8 content class">
|
301 |
+
<h2>Properties</h2>
|
302 |
+
</div>
|
303 |
+
<aside class="span4 detailsbar"></aside>
|
304 |
+
</div>
|
305 |
+
|
306 |
+
<div class="row-fluid">
|
307 |
+
<div class="span8 content class">
|
308 |
+
<a id="property_subpage" name="property_subpage" class="anchor"></a>
|
309 |
+
<article class="property">
|
310 |
+
<h3 class="public ">$subpage</h3>
|
311 |
+
<pre class="signature">$subpage : string</pre>
|
312 |
+
<p><em>Identifies submenu entry in the Admin sidebar, e.g., Media/Assistant in Media</em></p>
|
313 |
+
|
314 |
+
|
315 |
+
<h4>Type</h4>
|
316 |
+
string
|
317 |
+
</article>
|
318 |
+
</div>
|
319 |
+
<aside class="span4 detailsbar">
|
320 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
321 |
+
<dl>
|
322 |
+
</dl>
|
323 |
+
<h2>Tags</h2>
|
324 |
+
<table class="table table-condensed">
|
325 |
+
<tr>
|
326 |
+
<th>
|
327 |
+
since
|
328 |
+
</th>
|
329 |
+
<td>
|
330 |
+
|
331 |
+
</td>
|
332 |
+
</tr>
|
333 |
+
</table>
|
334 |
+
</aside>
|
335 |
+
</div>
|
336 |
+
|
337 |
+
|
338 |
+
<a id="methods" name="methods"></a>
|
339 |
+
<div class="row-fluid">
|
340 |
+
<div class="span8 content class"><h2>Methods</h2></div>
|
341 |
+
<aside class="span4 detailsbar"></aside>
|
342 |
+
</div>
|
343 |
+
|
344 |
+
<div class="row-fluid">
|
345 |
+
<div class="span8 content class">
|
346 |
+
<a id="method___construct" name="method___construct" class="anchor"></a>
|
347 |
+
<article class="method">
|
348 |
+
<h3 class="public ">__construct()</h3>
|
349 |
+
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
350 |
+
<pre class="signature" style="margin-right: 54px;">__construct() </pre>
|
351 |
+
<p><em>Initializes some properties, installs filters and then
|
352 |
+
calls the parent constructor to set some default configs.</em></p>
|
353 |
+
|
354 |
+
|
355 |
+
|
356 |
+
|
357 |
+
|
358 |
+
</article>
|
359 |
+
</div>
|
360 |
+
<aside class="span4 detailsbar">
|
361 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
362 |
+
<dl>
|
363 |
+
</dl>
|
364 |
+
<h2>Tags</h2>
|
365 |
+
<table class="table table-condensed">
|
366 |
+
<tr>
|
367 |
+
<th>
|
368 |
+
since
|
369 |
+
</th>
|
370 |
+
<td>
|
371 |
+
2.22
|
372 |
+
</td>
|
373 |
+
</tr>
|
374 |
+
</table>
|
375 |
+
</aside>
|
376 |
+
</div>
|
377 |
+
|
378 |
+
<div class="row-fluid">
|
379 |
+
<div class="span8 content class">
|
380 |
+
<a id="method_init_manage_columns" name="method_init_manage_columns" class="anchor"></a>
|
381 |
+
<article class="method">
|
382 |
+
<h3 class="public ">init_manage_columns()</h3>
|
383 |
+
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
384 |
+
<pre class="signature" style="margin-right: 54px;">init_manage_columns() </pre>
|
385 |
+
<p><em>Added in Admin Columns update to v2.4.9</em></p>
|
386 |
+
|
387 |
+
|
388 |
+
|
389 |
+
|
390 |
+
|
391 |
+
</article>
|
392 |
+
</div>
|
393 |
+
<aside class="span4 detailsbar">
|
394 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
395 |
+
<dl>
|
396 |
+
</dl>
|
397 |
+
<h2>Tags</h2>
|
398 |
+
<table class="table table-condensed">
|
399 |
+
<tr>
|
400 |
+
<th>
|
401 |
+
since
|
402 |
+
</th>
|
403 |
+
<td>
|
404 |
+
2.23
|
405 |
+
</td>
|
406 |
+
</tr>
|
407 |
+
</table>
|
408 |
+
</aside>
|
409 |
+
</div>
|
410 |
+
|
411 |
+
<div class="row-fluid">
|
412 |
+
<div class="span8 content class">
|
413 |
+
<a id="method_get_default_columns" name="method_get_default_columns" class="anchor"></a>
|
414 |
+
<article class="method">
|
415 |
+
<h3 class="public ">get_default_columns()</h3>
|
416 |
+
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
417 |
+
<pre class="signature" style="margin-right: 54px;">get_default_columns() : array</pre>
|
418 |
+
<p><em>Returns the Media/Assistant submenu table column definitions</em></p>
|
419 |
+
|
420 |
+
|
421 |
+
|
422 |
+
|
423 |
+
<h4>Returns</h4>
|
424 |
+
array
|
425 |
+
— <p>( 'column_slug' => 'column_heading' )</p>
|
426 |
+
|
427 |
+
</article>
|
428 |
+
</div>
|
429 |
+
<aside class="span4 detailsbar">
|
430 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
431 |
+
<dl>
|
432 |
+
</dl>
|
433 |
+
<h2>Tags</h2>
|
434 |
+
<table class="table table-condensed">
|
435 |
+
<tr>
|
436 |
+
<th>
|
437 |
+
since
|
438 |
+
</th>
|
439 |
+
<td>
|
440 |
+
2.22
|
441 |
+
</td>
|
442 |
+
</tr>
|
443 |
+
</table>
|
444 |
+
</aside>
|
445 |
+
</div>
|
446 |
+
|
447 |
+
<div class="row-fluid">
|
448 |
+
<div class="span8 content class">
|
449 |
+
<a id="method_get_default_column_names" name="method_get_default_column_names" class="anchor"></a>
|
450 |
+
<article class="method">
|
451 |
+
<h3 class="public ">get_default_column_names()</h3>
|
452 |
+
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
453 |
+
<pre class="signature" style="margin-right: 54px;">get_default_column_names() : array</pre>
|
454 |
+
<p><em>Returns the Media/Assistant submenu table column slugs/keys</em></p>
|
455 |
+
|
456 |
+
|
457 |
+
|
458 |
+
|
459 |
+
<h4>Returns</h4>
|
460 |
+
array
|
461 |
+
— <p>( index => 'column_slug' )</p>
|
462 |
+
|
463 |
+
</article>
|
464 |
+
</div>
|
465 |
+
<aside class="span4 detailsbar">
|
466 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
467 |
+
<dl>
|
468 |
+
</dl>
|
469 |
+
<h2>Tags</h2>
|
470 |
+
<table class="table table-condensed">
|
471 |
+
<tr>
|
472 |
+
<th>
|
473 |
+
since
|
474 |
+
</th>
|
475 |
+
<td>
|
476 |
+
2.22
|
477 |
+
</td>
|
478 |
+
</tr>
|
479 |
+
</table>
|
480 |
+
</aside>
|
481 |
+
</div>
|
482 |
+
|
483 |
+
<div class="row-fluid">
|
484 |
+
<div class="span8 content class">
|
485 |
+
<a id="method_get_meta" name="method_get_meta" class="anchor"></a>
|
486 |
+
<article class="method">
|
487 |
+
<h3 class="public ">get_meta()</h3>
|
488 |
+
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
489 |
+
<pre class="signature" style="margin-right: 54px;">get_meta() : array</pre>
|
490 |
+
<p><em>Returns the custom fields assigned to Media Library items, removing those already present
|
491 |
+
in the Media/Assistant submenu table</em></p>
|
492 |
+
|
493 |
+
|
494 |
+
|
495 |
+
|
496 |
+
<h4>Returns</h4>
|
497 |
+
array
|
498 |
+
— <p>( index => array( 0 => 'custom field name' ) )</p>
|
499 |
+
|
500 |
+
</article>
|
501 |
+
</div>
|
502 |
+
<aside class="span4 detailsbar">
|
503 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
504 |
+
<dl>
|
505 |
+
</dl>
|
506 |
+
<h2>Tags</h2>
|
507 |
+
<table class="table table-condensed">
|
508 |
+
<tr>
|
509 |
+
<th>
|
510 |
+
since
|
511 |
+
</th>
|
512 |
+
<td>
|
513 |
+
2.22
|
514 |
+
</td>
|
515 |
+
</tr>
|
516 |
+
</table>
|
517 |
+
</aside>
|
518 |
+
</div>
|
519 |
+
|
520 |
+
<div class="row-fluid">
|
521 |
+
<div class="span8 content class">
|
522 |
+
<a id="method_manage_value" name="method_manage_value" class="anchor"></a>
|
523 |
+
<article class="method">
|
524 |
+
<h3 class="public ">manage_value()</h3>
|
525 |
+
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
526 |
+
<pre class="signature" style="margin-right: 54px;">manage_value(string <span class="argument">$content</span>, object <span class="argument">$item</span>, string <span class="argument">$column_name</span>) : string</pre>
|
527 |
+
<p><em>Return the content of an Admin Columns custom column</em></p>
|
528 |
+
|
529 |
+
|
530 |
+
<h4>Parameters</h4>
|
531 |
+
<table class="table table-condensed table-hover">
|
532 |
+
<tr>
|
533 |
+
<td>string</td>
|
534 |
+
<td>$content </td>
|
535 |
+
<td><p>Current column content (empty string)</p></td>
|
536 |
+
</tr>
|
537 |
+
<tr>
|
538 |
+
<td>object</td>
|
539 |
+
<td>$item </td>
|
540 |
+
<td><p>Current Media Library item</p></td>
|
541 |
+
</tr>
|
542 |
+
<tr>
|
543 |
+
<td>string</td>
|
544 |
+
<td>$column_name </td>
|
545 |
+
<td><p>Current column slug</p></td>
|
546 |
+
</tr>
|
547 |
+
</table>
|
548 |
+
|
549 |
+
|
550 |
+
<h4>Returns</h4>
|
551 |
+
string
|
552 |
+
— <p>Column value or NULL if not an Admin Columns custom column</p>
|
553 |
+
|
554 |
+
</article>
|
555 |
+
</div>
|
556 |
+
<aside class="span4 detailsbar">
|
557 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
558 |
+
<dl>
|
559 |
+
</dl>
|
560 |
+
<h2>Tags</h2>
|
561 |
+
<table class="table table-condensed">
|
562 |
+
<tr>
|
563 |
+
<th>
|
564 |
+
since
|
565 |
+
</th>
|
566 |
+
<td>
|
567 |
+
2.22
|
568 |
+
</td>
|
569 |
+
</tr>
|
570 |
+
</table>
|
571 |
+
</aside>
|
572 |
+
</div>
|
573 |
+
|
574 |
+
<div class="row-fluid">
|
575 |
+
<div class="span8 content class">
|
576 |
+
<a id="method_is_current_screen" name="method_is_current_screen" class="anchor"></a>
|
577 |
+
<article class="method">
|
578 |
+
<h3 class="public ">is_current_screen()</h3>
|
579 |
+
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
580 |
+
<pre class="signature" style="margin-right: 54px;">is_current_screen() : boolean</pre>
|
581 |
+
<p><em>Test for current screen = the Media/Assistant submenu screen,
|
582 |
+
For Admin Columns 2.4.9+</em></p>
|
583 |
+
|
584 |
+
|
585 |
+
|
586 |
+
|
587 |
+
<h4>Returns</h4>
|
588 |
+
boolean
|
589 |
+
— <p>true if the Media/Assistant submenu is the current screen</p>
|
590 |
+
|
591 |
+
</article>
|
592 |
+
</div>
|
593 |
+
<aside class="span4 detailsbar">
|
594 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
595 |
+
<dl>
|
596 |
+
</dl>
|
597 |
+
<h2>Tags</h2>
|
598 |
+
<table class="table table-condensed">
|
599 |
+
<tr>
|
600 |
+
<th>
|
601 |
+
since
|
602 |
+
</th>
|
603 |
+
<td>
|
604 |
+
2.23
|
605 |
+
</td>
|
606 |
+
</tr>
|
607 |
+
</table>
|
608 |
+
</aside>
|
609 |
+
</div>
|
610 |
+
|
611 |
+
<div class="row-fluid">
|
612 |
+
<div class="span8 content class">
|
613 |
+
<a id="method_is_columns_screen" name="method_is_columns_screen" class="anchor"></a>
|
614 |
+
<article class="method">
|
615 |
+
<h3 class="public ">is_columns_screen()</h3>
|
616 |
+
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
617 |
+
<pre class="signature" style="margin-right: 54px;">is_columns_screen() : boolean</pre>
|
618 |
+
<p><em>Test for current screen = the Media/Assistant submenu screen</em></p>
|
619 |
+
|
620 |
+
|
621 |
+
|
622 |
+
|
623 |
+
<h4>Returns</h4>
|
624 |
+
boolean
|
625 |
+
— <p>true if the Media/Assistant submenu is the current screen</p>
|
626 |
+
|
627 |
+
</article>
|
628 |
+
</div>
|
629 |
+
<aside class="span4 detailsbar">
|
630 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
631 |
+
<dl>
|
632 |
+
</dl>
|
633 |
+
<h2>Tags</h2>
|
634 |
+
<table class="table table-condensed">
|
635 |
+
<tr>
|
636 |
+
<th>
|
637 |
+
since
|
638 |
+
</th>
|
639 |
+
<td>
|
640 |
+
2.22
|
641 |
+
</td>
|
642 |
+
</tr>
|
643 |
+
</table>
|
644 |
+
</aside>
|
645 |
+
</div>
|
646 |
+
|
647 |
+
<div class="row-fluid">
|
648 |
+
<div class="span8 content class">
|
649 |
+
<a id="method_get_edit_link" name="method_get_edit_link" class="anchor"></a>
|
650 |
+
<article class="method">
|
651 |
+
<h3 class="public ">get_edit_link()</h3>
|
652 |
+
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
653 |
+
<pre class="signature" style="margin-right: 54px;">get_edit_link() : string</pre>
|
654 |
+
<p><em>Return a link to the Media/Assistant submenu Edit columns screen</em></p>
|
655 |
+
|
656 |
+
|
657 |
+
|
658 |
+
|
659 |
+
<h4>Returns</h4>
|
660 |
+
string
|
661 |
+
— <p>Link to the Media/Assistant submenu Edit columns screen</p>
|
662 |
+
|
663 |
+
</article>
|
664 |
+
</div>
|
665 |
+
<aside class="span4 detailsbar">
|
666 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
667 |
+
<dl>
|
668 |
+
</dl>
|
669 |
+
<h2>Tags</h2>
|
670 |
+
<table class="table table-condensed">
|
671 |
+
<tr>
|
672 |
+
<th>
|
673 |
+
since
|
674 |
+
</th>
|
675 |
+
<td>
|
676 |
+
2.22
|
677 |
+
</td>
|
678 |
+
</tr>
|
679 |
+
</table>
|
680 |
+
</aside>
|
681 |
+
</div>
|
682 |
+
|
683 |
+
<div class="row-fluid">
|
684 |
+
<div class="span8 content class">
|
685 |
+
<a id="method_get_screen_link" name="method_get_screen_link" class="anchor"></a>
|
686 |
+
<article class="method">
|
687 |
+
<h3 class="protected ">get_screen_link()</h3>
|
688 |
+
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
689 |
+
<pre class="signature" style="margin-right: 54px;">get_screen_link() : string</pre>
|
690 |
+
<p><em>Return a link to the Media/Assistant submenu screen</em></p>
|
691 |
+
|
692 |
+
|
693 |
+
|
694 |
+
|
695 |
+
<h4>Returns</h4>
|
696 |
+
string
|
697 |
+
— <p>Link to the Media/Assistant submenu screen</p>
|
698 |
+
|
699 |
+
</article>
|
700 |
+
</div>
|
701 |
+
<aside class="span4 detailsbar">
|
702 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
703 |
+
<dl>
|
704 |
+
</dl>
|
705 |
+
<h2>Tags</h2>
|
706 |
+
<table class="table table-condensed">
|
707 |
+
<tr>
|
708 |
+
<th>
|
709 |
+
since
|
710 |
+
</th>
|
711 |
+
<td>
|
712 |
+
2.22
|
713 |
+
</td>
|
714 |
+
</tr>
|
715 |
+
</table>
|
716 |
+
</aside>
|
717 |
+
</div>
|
718 |
+
|
719 |
+
</div>
|
720 |
+
</section>
|
721 |
+
|
722 |
+
<div id="source-view" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="source-view-label" aria-hidden="true">
|
723 |
+
<div class="modal-header">
|
724 |
+
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
725 |
+
<h3 id="source-view-label">class-mla-admin-columns-support.php</h3>
|
726 |
+
</div>
|
727 |
+
<div class="modal-body">
|
728 |
+
<pre data-src="../files/includes\class-mla-admin-columns-support.php.txt" class="language-php line-numbers"></pre>
|
729 |
+
</div>
|
730 |
+
</div>
|
731 |
+
|
732 |
+
<footer class="row-fluid">
|
733 |
+
<section class="span10 offset2">
|
734 |
+
<section class="row-fluid">
|
735 |
+
<section class="span10 offset1">
|
736 |
+
<section class="row-fluid footer-sections">
|
737 |
+
<section class="span4">
|
738 |
+
<h1><i class="icon-code"></i></h1>
|
739 |
+
<div>
|
740 |
+
<ul>
|
741 |
+
</ul>
|
742 |
+
</div>
|
743 |
+
</section>
|
744 |
+
<section class="span4">
|
745 |
+
<h1><i class="icon-bar-chart"></i></h1>
|
746 |
+
<div>
|
747 |
+
<ul>
|
748 |
+
<li><a href="../graphs/class.html">Class Hierarchy Diagram</a></li>
|
749 |
+
</ul>
|
750 |
+
</div>
|
751 |
+
</section>
|
752 |
+
<section class="span4">
|
753 |
+
<h1><i class="icon-pushpin"></i></h1>
|
754 |
+
<div>
|
755 |
+
<ul>
|
756 |
+
<li><a href="../reports/errors.html">Errors</a></li>
|
757 |
+
<li><a href="../reports/markers.html">Markers</a></li>
|
758 |
+
</ul>
|
759 |
+
</div>
|
760 |
+
</section>
|
761 |
+
</section>
|
762 |
+
</section>
|
763 |
+
</section>
|
764 |
+
<section class="row-fluid">
|
765 |
+
<section class="span10 offset1">
|
766 |
+
<hr />
|
767 |
+
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
768 |
+
on August 12th, 2016 at 21:22.
|
769 |
+
</section>
|
770 |
+
</section>
|
771 |
+
</section>
|
772 |
+
</footer>
|
773 |
</div>
|
774 |
+
|
775 |
</body>
|
776 |
</html>
|
phpDocs/classes/MLA.html
CHANGED
@@ -1,750 +1,1858 @@
|
|
1 |
-
<!DOCTYPE html
|
|
|
2 |
<head>
|
3 |
-
<meta
|
4 |
-
<meta
|
5 |
-
<
|
6 |
-
<
|
7 |
-
<meta name="
|
8 |
-
|
9 |
-
<link href="../css/
|
10 |
-
<
|
11 |
-
<link rel="
|
12 |
-
<link
|
13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
</head>
|
15 |
<body>
|
|
|
16 |
<div class="navbar navbar-fixed-top">
|
17 |
-
<div class="navbar-inner"
|
18 |
-
<
|
19 |
-
<
|
20 |
-
<
|
21 |
-
|
22 |
-
<
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
<li class="dropdown" id="charts-menu">
|
27 |
-
<a href="#
|
28 |
-
|
29 |
-
</
|
30 |
-
<
|
31 |
-
<
|
32 |
-
|
33 |
-
<
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
<
|
40 |
-
|
41 |
-
</
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
</div>
|
47 |
-
|
48 |
-
<
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
<div class="
|
53 |
-
<div class="
|
54 |
-
<
|
55 |
-
<
|
56 |
-
</div>
|
57 |
-
<
|
58 |
-
<
|
59 |
-
|
60 |
-
|
61 |
-
<
|
62 |
-
<li class="
|
63 |
-
<li class="
|
64 |
-
<li class="
|
65 |
-
<li class="
|
66 |
-
<li class="
|
67 |
-
<li class="
|
68 |
-
<li class="
|
69 |
-
<li class="
|
70 |
-
<li class="
|
71 |
-
|
72 |
-
|
73 |
-
<li class="
|
74 |
-
<li class="
|
75 |
-
<li class="
|
76 |
-
<li class="
|
77 |
-
<li class="
|
78 |
-
<li class="
|
79 |
-
<li class="
|
80 |
-
<li class="
|
81 |
-
<li class="
|
82 |
-
<li class="
|
83 |
-
<li class="
|
84 |
-
<li class="
|
85 |
-
<li class="
|
86 |
-
<li class="
|
87 |
-
<li class="
|
88 |
-
<li class="
|
89 |
-
<li class="
|
90 |
-
<li class="
|
91 |
-
<li class="
|
92 |
-
<
|
93 |
-
<li class="
|
94 |
-
<li class="
|
95 |
-
<li class="
|
96 |
-
<li class="
|
97 |
-
<
|
98 |
-
<li class="
|
99 |
-
<li class="
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
</
|
107 |
-
</
|
108 |
-
<
|
109 |
-
<
|
110 |
-
<
|
111 |
-
<
|
112 |
-
|
113 |
-
<
|
114 |
-
|
115 |
-
<
|
116 |
-
|
117 |
-
</
|
118 |
-
<
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
<
|
124 |
-
<
|
125 |
-
<
|
126 |
-
<
|
127 |
-
</
|
128 |
-
|
129 |
-
<
|
130 |
-
<
|
131 |
-
</
|
132 |
-
|
133 |
-
<
|
134 |
-
|
135 |
-
|
136 |
-
<
|
137 |
-
<
|
138 |
-
<
|
139 |
-
<
|
140 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
141 |
to set up the Ajax handlers, enqueue JavaScript and CSS files, and
|
142 |
-
set up the Assistant submenu.</p
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
</
|
148 |
-
</div>
|
149 |
-
<
|
150 |
-
<
|
151 |
-
<
|
152 |
-
<
|
153 |
-
|
154 |
-
<
|
155 |
-
<table class="table table-
|
156 |
-
<
|
157 |
-
<
|
158 |
-
|
159 |
-
</
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
<
|
169 |
-
<
|
170 |
-
|
171 |
-
|
172 |
-
</
|
173 |
-
<a
|
174 |
-
<
|
175 |
-
<
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
</
|
183 |
-
<
|
184 |
-
<
|
185 |
-
<
|
186 |
-
<
|
187 |
-
</
|
188 |
-
</
|
189 |
-
<
|
190 |
-
<
|
191 |
-
<
|
192 |
-
|
193 |
-
|
194 |
-
<
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
</
|
199 |
-
</
|
200 |
-
</div>
|
201 |
-
|
202 |
-
<
|
203 |
-
<
|
204 |
-
<
|
205 |
-
<
|
206 |
-
<
|
207 |
-
|
208 |
-
|
209 |
-
<
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
<
|
218 |
-
<
|
219 |
-
<
|
220 |
-
<
|
221 |
-
|
222 |
-
<
|
223 |
-
<
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
<
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
<
|
238 |
-
<
|
239 |
-
<
|
240 |
-
<
|
241 |
-
<
|
242 |
-
<
|
243 |
-
<
|
244 |
-
|
245 |
-
|
246 |
-
<h4
|
247 |
-
<
|
248 |
-
|
249 |
-
<
|
250 |
-
<
|
251 |
-
<
|
252 |
-
</
|
253 |
-
</
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
<
|
260 |
-
<
|
261 |
-
<
|
262 |
-
<
|
263 |
-
</
|
264 |
-
<
|
265 |
-
<
|
266 |
-
<
|
267 |
-
<
|
268 |
-
|
269 |
-
</
|
270 |
-
<
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
<
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
<
|
283 |
-
<
|
284 |
-
|
285 |
-
<
|
286 |
-
<
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
</
|
294 |
-
</div>
|
295 |
-
<
|
296 |
-
<
|
297 |
-
<
|
298 |
-
<
|
299 |
-
|
300 |
-
<
|
301 |
-
<table class="table table-
|
302 |
-
<
|
303 |
-
<
|
304 |
-
|
305 |
-
</
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
<
|
315 |
-
<
|
316 |
-
|
317 |
-
<
|
318 |
-
<
|
319 |
-
<
|
320 |
-
<
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
<
|
331 |
-
<
|
332 |
-
<
|
333 |
-
<
|
334 |
-
|
335 |
-
<
|
336 |
-
|
337 |
-
<
|
338 |
-
<
|
339 |
-
|
340 |
-
|
341 |
-
<
|
342 |
-
|
343 |
-
|
344 |
-
</
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
<div class="
|
350 |
-
<
|
351 |
-
|
352 |
-
|
353 |
-
<
|
354 |
-
<
|
355 |
-
<pre>
|
356 |
-
<
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
</
|
363 |
-
|
364 |
-
<
|
365 |
-
<
|
366 |
-
<
|
367 |
-
<
|
368 |
-
|
369 |
-
<
|
370 |
-
|
371 |
-
<
|
372 |
-
<
|
373 |
-
|
374 |
-
</
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
<
|
384 |
-
<
|
385 |
-
|
386 |
-
|
387 |
-
</
|
388 |
-
<a
|
389 |
-
<
|
390 |
-
<
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
</
|
398 |
-
<
|
399 |
-
<
|
400 |
-
<
|
401 |
-
<
|
402 |
-
</
|
403 |
-
<
|
404 |
-
<
|
405 |
-
<
|
406 |
-
<
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
<
|
418 |
-
<
|
419 |
-
<
|
420 |
-
|
421 |
-
<h3>
|
422 |
-
<
|
423 |
-
<
|
424 |
-
<
|
425 |
-
|
426 |
-
|
427 |
-
<
|
428 |
-
<
|
429 |
-
|
430 |
-
|
431 |
-
<
|
432 |
-
<
|
433 |
-
|
434 |
-
<
|
435 |
-
<
|
436 |
-
<
|
437 |
-
<
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
<
|
443 |
-
|
444 |
-
<
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
<
|
449 |
-
<
|
450 |
-
<
|
451 |
-
<
|
452 |
-
|
453 |
-
<
|
454 |
-
|
455 |
-
|
456 |
-
<
|
457 |
-
|
458 |
-
|
459 |
-
<
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
</
|
466 |
-
|
467 |
-
<div class="
|
468 |
-
<
|
469 |
-
<
|
470 |
-
<
|
471 |
-
<
|
472 |
-
<
|
473 |
-
</
|
474 |
-
</
|
475 |
-
|
476 |
-
|
477 |
-
<
|
478 |
-
<
|
479 |
-
<
|
480 |
-
<
|
481 |
-
<
|
482 |
-
<
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
</
|
487 |
-
<
|
488 |
-
|
489 |
-
<
|
490 |
-
<
|
491 |
-
<
|
492 |
-
<
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
<
|
498 |
-
|
499 |
-
<
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
<
|
504 |
-
|
505 |
-
<
|
506 |
-
<
|
507 |
-
|
508 |
-
</
|
509 |
-
|
510 |
-
<
|
511 |
-
<
|
512 |
-
|
513 |
-
|
514 |
-
<
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
</
|
520 |
-
|
521 |
-
|
522 |
-
<
|
523 |
-
|
524 |
-
|
525 |
-
<
|
526 |
-
<
|
527 |
-
<
|
528 |
-
<
|
529 |
-
<
|
530 |
-
<p
|
531 |
-
|
532 |
-
<
|
533 |
-
<
|
534 |
-
|
535 |
-
<
|
536 |
-
<
|
537 |
-
<
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
</
|
543 |
-
|
544 |
-
<
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
<
|
549 |
-
<
|
550 |
-
<
|
551 |
-
<
|
552 |
-
|
553 |
-
</
|
554 |
-
<
|
555 |
-
<
|
556 |
-
<
|
557 |
-
|
558 |
-
|
559 |
-
<
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
</
|
565 |
-
</div>
|
566 |
-
|
567 |
-
<
|
568 |
-
<
|
569 |
-
<
|
570 |
-
<
|
571 |
-
<
|
572 |
-
<
|
573 |
-
<
|
574 |
-
<
|
575 |
-
|
576 |
-
|
577 |
-
</
|
578 |
-
<
|
579 |
-
<
|
580 |
-
<
|
581 |
-
<
|
582 |
-
<
|
583 |
-
|
584 |
-
<
|
585 |
-
<
|
586 |
-
<td
|
587 |
-
</
|
588 |
-
|
589 |
-
<
|
590 |
-
<
|
591 |
-
<
|
592 |
-
<
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
<
|
598 |
-
|
599 |
-
<
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
<
|
604 |
-
<
|
605 |
-
<
|
606 |
-
|
607 |
-
|
608 |
-
<
|
609 |
-
<
|
610 |
-
<
|
611 |
-
<
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
<div class="row
|
623 |
-
<
|
624 |
-
<
|
625 |
-
<
|
626 |
-
<
|
627 |
-
|
628 |
-
</
|
629 |
-
</
|
630 |
-
|
631 |
-
|
632 |
-
<
|
633 |
-
<
|
634 |
-
<
|
635 |
-
<
|
636 |
-
<
|
637 |
-
<
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
</
|
642 |
-
<
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
<
|
648 |
-
|
649 |
-
<p
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
</
|
656 |
-
<
|
657 |
-
|
658 |
-
<
|
659 |
-
<
|
660 |
-
<
|
661 |
-
<
|
662 |
-
|
663 |
-
|
664 |
-
<td>
|
665 |
-
|
666 |
-
</
|
667 |
-
</
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
<div class="row
|
673 |
-
<
|
674 |
-
<
|
675 |
-
<
|
676 |
-
<
|
677 |
-
|
678 |
-
</
|
679 |
-
</
|
680 |
-
|
681 |
-
|
682 |
-
<
|
683 |
-
<
|
684 |
-
<
|
685 |
-
<
|
686 |
-
<
|
687 |
-
<
|
688 |
-
|
689 |
-
</
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
|
694 |
-
|
695 |
-
<
|
696 |
-
<
|
697 |
-
<
|
698 |
-
<
|
699 |
-
|
700 |
-
<
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
|
706 |
-
<
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
<a
|
717 |
-
<
|
718 |
-
<
|
719 |
-
<
|
720 |
-
<
|
721 |
-
<p
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
</
|
728 |
-
|
729 |
-
<
|
730 |
-
<
|
731 |
-
<
|
732 |
-
<
|
733 |
-
|
734 |
-
<
|
735 |
-
<
|
736 |
-
<
|
737 |
-
|
738 |
-
|
739 |
-
</
|
740 |
-
|
741 |
-
|
742 |
-
</
|
743 |
-
</
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
748 |
</div>
|
|
|
749 |
</body>
|
750 |
</html>
|
1 |
+
<!DOCTYPE html>
|
2 |
+
<html lang="en">
|
3 |
<head>
|
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</title>
|
7 |
+
<meta name="author" content=""/>
|
8 |
+
<meta name="description" content=""/>
|
9 |
+
|
10 |
+
<link href="../css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
|
11 |
+
<link href="../css/font-awesome.min.css" rel="stylesheet">
|
12 |
+
<link href="../css/prism.css" rel="stylesheet" media="all"/>
|
13 |
+
<link href="../css/template.css" rel="stylesheet" media="all"/>
|
14 |
+
|
15 |
+
<!--[if lt IE 9]>
|
16 |
+
<script src="../js/html5.js"></script>
|
17 |
+
<![endif]-->
|
18 |
+
<script src="../js/jquery-1.11.0.min.js"></script>
|
19 |
+
<script src="../js/ui/1.10.4/jquery-ui.min.js"></script>
|
20 |
+
<script src="../js/bootstrap.min.js"></script>
|
21 |
+
<script src="../js/jquery.smooth-scroll.js"></script>
|
22 |
+
<script src="../js/prism.min.js"></script>
|
23 |
+
<!-- TODO: Add http://jscrollpane.kelvinluck.com/ to style the scrollbars for browsers not using webkit-->
|
24 |
+
<script type="text/javascript">
|
25 |
+
function loadExternalCodeSnippets() {
|
26 |
+
Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach(function (pre) {
|
27 |
+
var src = pre.getAttribute('data-src');
|
28 |
+
var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
|
29 |
+
var language = 'php';
|
30 |
+
|
31 |
+
var code = document.createElement('code');
|
32 |
+
code.className = 'language-' + language;
|
33 |
+
|
34 |
+
pre.textContent = '';
|
35 |
+
|
36 |
+
code.textContent = 'Loading…';
|
37 |
+
|
38 |
+
pre.appendChild(code);
|
39 |
+
|
40 |
+
var xhr = new XMLHttpRequest();
|
41 |
+
|
42 |
+
xhr.open('GET', src, true);
|
43 |
+
|
44 |
+
xhr.onreadystatechange = function () {
|
45 |
+
if (xhr.readyState == 4) {
|
46 |
+
|
47 |
+
if (xhr.status < 400 && xhr.responseText) {
|
48 |
+
code.textContent = xhr.responseText;
|
49 |
+
|
50 |
+
Prism.highlightElement(code);
|
51 |
+
}
|
52 |
+
else if (xhr.status >= 400) {
|
53 |
+
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
|
54 |
+
}
|
55 |
+
else {
|
56 |
+
code.textContent = '✖ Error: File does not exist or is empty';
|
57 |
+
}
|
58 |
+
}
|
59 |
+
};
|
60 |
+
|
61 |
+
xhr.send(null);
|
62 |
+
});
|
63 |
+
}
|
64 |
+
|
65 |
+
$(document).ready(function(){
|
66 |
+
loadExternalCodeSnippets();
|
67 |
+
});
|
68 |
+
$('#source-view').on('shown', function () {
|
69 |
+
loadExternalCodeSnippets();
|
70 |
+
})
|
71 |
+
</script>
|
72 |
+
|
73 |
+
<link rel="shortcut icon" href="../images/favicon.ico"/>
|
74 |
+
<link rel="apple-touch-icon" href="../images/apple-touch-icon.png"/>
|
75 |
+
<link rel="apple-touch-icon" sizes="72x72" href="../images/apple-touch-icon-72x72.png"/>
|
76 |
+
<link rel="apple-touch-icon" sizes="114x114" href="../images/apple-touch-icon-114x114.png"/>
|
77 |
</head>
|
78 |
<body>
|
79 |
+
|
80 |
<div class="navbar navbar-fixed-top">
|
81 |
+
<div class="navbar-inner">
|
82 |
+
<div class="container">
|
83 |
+
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
|
84 |
+
<i class="icon-ellipsis-vertical"></i>
|
85 |
+
</a>
|
86 |
+
<a class="brand" href="../index.html">Media Library Assistant</a>
|
87 |
+
|
88 |
+
<div class="nav-collapse">
|
89 |
+
<ul class="nav pull-right">
|
90 |
+
<li class="dropdown" id="charts-menu">
|
91 |
+
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
92 |
+
Charts <b class="caret"></b>
|
93 |
+
</a>
|
94 |
+
<ul class="dropdown-menu">
|
95 |
+
<li>
|
96 |
+
<a href="../graphs/class.html">
|
97 |
+
<i class="icon-list-alt"></i> Class hierarchy diagram
|
98 |
+
</a>
|
99 |
+
</li>
|
100 |
+
</ul>
|
101 |
+
</li>
|
102 |
+
<li class="dropdown" id="reports-menu">
|
103 |
+
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
104 |
+
Reports <b class="caret"></b>
|
105 |
+
</a>
|
106 |
+
<ul class="dropdown-menu">
|
107 |
+
<li>
|
108 |
+
<a href="../reports/errors.html">
|
109 |
+
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">0</span>
|
110 |
+
</a>
|
111 |
+
</li>
|
112 |
+
<li>
|
113 |
+
<a href="../reports/markers.html">
|
114 |
+
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">3</span>
|
115 |
+
</a>
|
116 |
+
</li>
|
117 |
+
<li>
|
118 |
+
<a href="../reports/deprecated.html">
|
119 |
+
<i class="icon-list-alt"></i> Deprecated <span class="label label-info pull-right">0</span>
|
120 |
+
</a>
|
121 |
+
</li>
|
122 |
+
</ul>
|
123 |
+
</li>
|
124 |
+
</ul>
|
125 |
+
</div>
|
126 |
+
</div>
|
127 |
+
</div>
|
128 |
+
<!--<div class="go_to_top">-->
|
129 |
+
<!--<a href="#___" style="color: inherit">Back to top  <i class="icon-upload icon-white"></i></a>-->
|
130 |
+
<!--</div>-->
|
131 |
</div>
|
132 |
+
|
133 |
+
<div id="___" class="container-fluid">
|
134 |
+
<section class="row-fluid">
|
135 |
+
<div class="span2 sidebar">
|
136 |
+
<div class="accordion" style="margin-bottom: 0">
|
137 |
+
<div class="accordion-group">
|
138 |
+
<div class="accordion-heading">
|
139 |
+
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-365966996"></a>
|
140 |
+
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
141 |
+
</div>
|
142 |
+
<div id="namespace-365966996" class="accordion-body collapse in">
|
143 |
+
<div class="accordion-inner">
|
144 |
+
|
145 |
+
|
146 |
+
<ul>
|
147 |
+
<li class="class"><a href="../classes/CPAC_Storage_Model_MLA.html">CPAC_Storage_Model_MLA</a></li>
|
148 |
+
<li class="class"><a href="../classes/MLA.html">MLA</a></li>
|
149 |
+
<li class="class"><a href="../classes/MLA_Ajax.html">MLA_Ajax</a></li>
|
150 |
+
<li class="class"><a href="../classes/MLA_Checklist_Walker.html">MLA_Checklist_Walker</a></li>
|
151 |
+
<li class="class"><a href="../classes/MLA_Example_List_Table.html">MLA_Example_List_Table</a></li>
|
152 |
+
<li class="class"><a href="../classes/MLA_List_Table.html">MLA_List_Table</a></li>
|
153 |
+
<li class="class"><a href="../classes/MLA_Polylang.html">MLA_Polylang</a></li>
|
154 |
+
<li class="class"><a href="../classes/MLA_Thumbnail.html">MLA_Thumbnail</a></li>
|
155 |
+
<li class="class"><a href="../classes/MLA_Upgrader_Skin.html">MLA_Upgrader_Skin</a></li>
|
156 |
+
<li class="class"><a href="../classes/MLA_Upload_List_Table.html">MLA_Upload_List_Table</a></li>
|
157 |
+
<li class="class"><a href="../classes/MLA_Upload_Optional_List_Table.html">MLA_Upload_Optional_List_Table</a></li>
|
158 |
+
<li class="class"><a href="../classes/MLA_View_List_Table.html">MLA_View_List_Table</a></li>
|
159 |
+
<li class="class"><a href="../classes/MLA_WPML.html">MLA_WPML</a></li>
|
160 |
+
<li class="class"><a href="../classes/MLA_WPML_List_Table.html">MLA_WPML_List_Table</a></li>
|
161 |
+
<li class="class"><a href="../classes/MLA_WPML_Table.html">MLA_WPML_Table</a></li>
|
162 |
+
<li class="class"><a href="../classes/MLACore.html">MLACore</a></li>
|
163 |
+
<li class="class"><a href="../classes/MLACoreOptions.html">MLACoreOptions</a></li>
|
164 |
+
<li class="class"><a href="../classes/MLAData.html">MLAData</a></li>
|
165 |
+
<li class="class"><a href="../classes/MLAData_Source.html">MLAData_Source</a></li>
|
166 |
+
<li class="class"><a href="../classes/MLAEdit.html">MLAEdit</a></li>
|
167 |
+
<li class="class"><a href="../classes/MLAFileDownloader.html">MLAFileDownloader</a></li>
|
168 |
+
<li class="class"><a href="../classes/MLAImageProcessor.html">MLAImageProcessor</a></li>
|
169 |
+
<li class="class"><a href="../classes/MLAMime.html">MLAMime</a></li>
|
170 |
+
<li class="class"><a href="../classes/MLAModal.html">MLAModal</a></li>
|
171 |
+
<li class="class"><a href="../classes/MLAModal_Ajax.html">MLAModal_Ajax</a></li>
|
172 |
+
<li class="class"><a href="../classes/MLAMutex.html">MLAMutex</a></li>
|
173 |
+
<li class="class"><a href="../classes/MLAObjects.html">MLAObjects</a></li>
|
174 |
+
<li class="class"><a href="../classes/MLAOptions.html">MLAOptions</a></li>
|
175 |
+
<li class="class"><a href="../classes/MLAPDF.html">MLAPDF</a></li>
|
176 |
+
<li class="class"><a href="../classes/MLAQuery.html">MLAQuery</a></li>
|
177 |
+
<li class="class"><a href="../classes/MLAReferences.html">MLAReferences</a></li>
|
178 |
+
<li class="class"><a href="../classes/MLASettings.html">MLASettings</a></li>
|
179 |
+
<li class="class"><a href="../classes/MLAShortcode_Support.html">MLAShortcode_Support</a></li>
|
180 |
+
<li class="class"><a href="../classes/MLAShortcodes.html">MLAShortcodes</a></li>
|
181 |
+
<li class="class"><a href="../classes/MLATemplate_Support.html">MLATemplate_Support</a></li>
|
182 |
+
<li class="class"><a href="../classes/MLATest.html">MLATest</a></li>
|
183 |
+
<li class="class"><a href="../classes/MLATextWidget.html">MLATextWidget</a></li>
|
184 |
+
<li class="class"><a href="../classes/MLAUninstall.html">MLAUninstall</a></li>
|
185 |
+
</ul>
|
186 |
+
</div>
|
187 |
+
</div>
|
188 |
+
</div>
|
189 |
+
</div>
|
190 |
+
|
191 |
+
</div>
|
192 |
+
</section>
|
193 |
+
<section class="row-fluid">
|
194 |
+
<div class="span10 offset2">
|
195 |
+
<div class="row-fluid">
|
196 |
+
<div class="span8 content class">
|
197 |
+
<nav>
|
198 |
+
<a href="../namespaces/default.html">\</a> <i class="icon-level-up"></i>
|
199 |
+
</nav>
|
200 |
+
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal"><i class="icon-code"></i></a>
|
201 |
+
|
202 |
+
<h1><small>\</small>MLA</h1>
|
203 |
+
<p><em>Class MLA (Media Library Assistant) provides several enhancements to the handling
|
204 |
+
of images and files held in the WordPress Media Library.</em></p>
|
205 |
+
|
206 |
+
|
207 |
+
|
208 |
+
<section id="summary">
|
209 |
+
<h2>Summary</h2>
|
210 |
+
<section class="row-fluid heading">
|
211 |
+
<section class="span4">
|
212 |
+
<a href="#methods">Methods</a>
|
213 |
+
</section>
|
214 |
+
<section class="span4">
|
215 |
+
<a href="#properties">Properties</a>
|
216 |
+
</section>
|
217 |
+
<section class="span4">
|
218 |
+
<a href="#constants">Constants</a>
|
219 |
+
</section>
|
220 |
+
</section>
|
221 |
+
<section class="row-fluid public">
|
222 |
+
<section class="span4">
|
223 |
+
<a href="../classes/MLA.html#method_mla_name_conflict_reporting_action" class="">mla_name_conflict_reporting_action()</a><br />
|
224 |
+
<a href="../classes/MLA.html#method_initialize" class="">initialize()</a><br />
|
225 |
+
<a href="../classes/MLA.html#method_mla_admin_init_action" class="">mla_admin_init_action()</a><br />
|
226 |
+
<a href="../classes/MLA.html#method_mla_admin_print_styles_action" class="">mla_admin_print_styles_action()</a><br />
|
227 |
+
<a href="../classes/MLA.html#method_mla_admin_enqueue_scripts_action" class="">mla_admin_enqueue_scripts_action()</a><br />
|
228 |
+
<a href="../classes/MLA.html#method_mla_admin_menu_action" class="">mla_admin_menu_action()</a><br />
|
229 |
+
<a href="../classes/MLA.html#method_mla_load_media_action" class="">mla_load_media_action()</a><br />
|
230 |
+
<a href="../classes/MLA.html#method_mla_add_menu_options" class="">mla_add_menu_options()</a><br />
|
231 |
+
<a href="../classes/MLA.html#method_mla_add_help_tab" class="">mla_add_help_tab()</a><br />
|
232 |
+
<a href="../classes/MLA.html#method_mla_screen_options_show_screen_filter" class="">mla_screen_options_show_screen_filter()</a><br />
|
233 |
+
<a href="../classes/MLA.html#method_mla_set_screen_option_filter" class="">mla_set_screen_option_filter()</a><br />
|
234 |
+
<a href="../classes/MLA.html#method_mla_parent_file_filter" class="">mla_parent_file_filter()</a><br />
|
235 |
+
<a href="../classes/MLA.html#method_mla_prepare_bulk_edits" class="">mla_prepare_bulk_edits()</a><br />
|
236 |
+
<a href="../classes/MLA.html#method_mla_process_bulk_action" class="">mla_process_bulk_action()</a><br />
|
237 |
+
<a href="../classes/MLA.html#method_mla_clear_filter_by" class="">mla_clear_filter_by()</a><br />
|
238 |
+
<a href="../classes/MLA.html#method_mla_render_admin_page" class="">mla_render_admin_page()</a><br />
|
239 |
+
<a href="../classes/MLA.html#method_mla_inline_edit_ajax_action" class="">mla_inline_edit_ajax_action()</a><br />
|
240 |
+
<a href="../classes/MLA.html#method_mla_set_parent_form" class="">mla_set_parent_form()</a><br />
|
241 |
+
<a href="../classes/MLA.html#method_mla_authors_dropdown" class="">mla_authors_dropdown()</a><br />
|
242 |
+
</section>
|
243 |
+
<section class="span4">
|
244 |
+
<em>No public properties found</em>
|
245 |
+
</section>
|
246 |
+
<section class="span4">
|
247 |
+
<a href="../classes/MLA.html#constant_MLA_DEVELOPMENT_VERSION" class="">MLA_DEVELOPMENT_VERSION</a><br />
|
248 |
+
<a href="../classes/MLA.html#constant_JAVASCRIPT_INLINE_EDIT_OBJECT" class="">JAVASCRIPT_INLINE_EDIT_OBJECT</a><br />
|
249 |
+
<a href="../classes/MLA.html#constant_MLA_ADMIN_SINGLE_EDIT_DISPLAY" class="">MLA_ADMIN_SINGLE_EDIT_DISPLAY</a><br />
|
250 |
+
<a href="../classes/MLA.html#constant_MLA_ADMIN_SINGLE_EDIT_UPDATE" class="">MLA_ADMIN_SINGLE_EDIT_UPDATE</a><br />
|
251 |
+
<a href="../classes/MLA.html#constant_MLA_ADMIN_SINGLE_CUSTOM_FIELD_MAP" class="">MLA_ADMIN_SINGLE_CUSTOM_FIELD_MAP</a><br />
|
252 |
+
<a href="../classes/MLA.html#constant_MLA_ADMIN_SINGLE_MAP" class="">MLA_ADMIN_SINGLE_MAP</a><br />
|
253 |
+
<a href="../classes/MLA.html#constant_MLA_ADMIN_SET_PARENT" class="">MLA_ADMIN_SET_PARENT</a><br />
|
254 |
+
<a href="../classes/MLA.html#constant_MLA_ADMIN_TERMS_SEARCH" class="">MLA_ADMIN_TERMS_SEARCH</a><br />
|
255 |
+
</section>
|
256 |
+
</section>
|
257 |
+
<section class="row-fluid protected">
|
258 |
+
<section class="span4">
|
259 |
+
<em>No protected methods found</em>
|
260 |
+
</section>
|
261 |
+
<section class="span4">
|
262 |
+
<em>No protected properties found</em>
|
263 |
+
</section>
|
264 |
+
<section class="span4">
|
265 |
+
<em>N/A</em>
|
266 |
+
</section>
|
267 |
+
</section>
|
268 |
+
<section class="row-fluid private">
|
269 |
+
<section class="span4">
|
270 |
+
<a href="../classes/MLA.html#method__process_mla_download_file" class="">_process_mla_download_file()</a><br />
|
271 |
+
<a href="../classes/MLA.html#method__process_bulk_value" class="">_process_bulk_value()</a><br />
|
272 |
+
<a href="../classes/MLA.html#method__bulk_edit_ajax_handler" class="">_bulk_edit_ajax_handler()</a><br />
|
273 |
+
<a href="../classes/MLA.html#method__compose_post_type_select" class="">_compose_post_type_select()</a><br />
|
274 |
+
<a href="../classes/MLA.html#method__build_inline_edit_form" class="">_build_inline_edit_form()</a><br />
|
275 |
+
<a href="../classes/MLA.html#method__current_bulk_action" class="">_current_bulk_action()</a><br />
|
276 |
+
<a href="../classes/MLA.html#method__delete_single_item" class="">_delete_single_item()</a><br />
|
277 |
+
<a href="../classes/MLA.html#method__restore_single_item" class="">_restore_single_item()</a><br />
|
278 |
+
<a href="../classes/MLA.html#method__trash_single_item" class="">_trash_single_item()</a><br />
|
279 |
+
</section>
|
280 |
+
<section class="span4">
|
281 |
+
<a href="../classes/MLA.html#property_page_hooks" class="">$page_hooks</a><br />
|
282 |
+
<a href="../classes/MLA.html#property_mla_language_support_error_messages" class="">$mla_language_support_error_messages</a><br />
|
283 |
+
</section>
|
284 |
+
<section class="span4">
|
285 |
+
<em>N/A</em>
|
286 |
+
</section>
|
287 |
+
</section>
|
288 |
+
</section>
|
289 |
+
</div>
|
290 |
+
<aside class="span4 detailsbar">
|
291 |
+
|
292 |
+
|
293 |
+
<dl>
|
294 |
+
<dt>File</dt>
|
295 |
+
<dd><a href="../files/includes.class-mla-main.html"><div class="path-wrapper">includes\class-mla-main.php</div></a></dd>
|
296 |
+
<dt>Package</dt>
|
297 |
+
<dd><div class="namespace-wrapper">Media Library Assistant</div></dd>
|
298 |
+
<dt>Class hierarchy</dt>
|
299 |
+
<dd class="hierarchy">
|
300 |
+
<div class="namespace-wrapper">\MLA</div>
|
301 |
+
</dd>
|
302 |
+
|
303 |
+
|
304 |
+
|
305 |
+
|
306 |
+
|
307 |
+
</dl>
|
308 |
+
<h2>Tags</h2>
|
309 |
+
<table class="table table-condensed">
|
310 |
+
<tr>
|
311 |
+
<th>
|
312 |
+
since
|
313 |
+
</th>
|
314 |
+
<td>
|
315 |
+
|
316 |
+
</td>
|
317 |
+
</tr>
|
318 |
+
</table>
|
319 |
+
</aside>
|
320 |
+
</div>
|
321 |
+
|
322 |
+
<a id="constants" name="constants"></a>
|
323 |
+
<div class="row-fluid">
|
324 |
+
<div class="span8 content class">
|
325 |
+
<h2>Constants</h2>
|
326 |
+
</div>
|
327 |
+
<aside class="span4 detailsbar"></aside>
|
328 |
+
</div>
|
329 |
+
|
330 |
+
<div class="row-fluid">
|
331 |
+
<div class="span8 content class">
|
332 |
+
<a id="constant_MLA_DEVELOPMENT_VERSION" name="constant_MLA_DEVELOPMENT_VERSION" class="anchor"></a>
|
333 |
+
<article id="constant_MLA_DEVELOPMENT_VERSION" class="constant">
|
334 |
+
<h3 class="">MLA_DEVELOPMENT_VERSION</h3>
|
335 |
+
<pre class="signature">MLA_DEVELOPMENT_VERSION</pre>
|
336 |
+
<p><em>Current date for Development Version, empty for production versions</em></p>
|
337 |
+
|
338 |
+
</article>
|
339 |
+
</div>
|
340 |
+
<aside class="span4 detailsbar">
|
341 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
342 |
+
<dl>
|
343 |
+
</dl>
|
344 |
+
<h2>Tags</h2>
|
345 |
+
<table class="table table-condensed">
|
346 |
+
<tr>
|
347 |
+
<th>
|
348 |
+
since
|
349 |
+
</th>
|
350 |
+
<td>
|
351 |
+
|
352 |
+
</td>
|
353 |
+
</tr>
|
354 |
+
</table>
|
355 |
+
</aside>
|
356 |
+
</div>
|
357 |
+
|
358 |
+
<div class="row-fluid">
|
359 |
+
<div class="span8 content class">
|
360 |
+
<a id="constant_JAVASCRIPT_INLINE_EDIT_OBJECT" name="constant_JAVASCRIPT_INLINE_EDIT_OBJECT" class="anchor"></a>
|
361 |
+
<article id="constant_JAVASCRIPT_INLINE_EDIT_OBJECT" class="constant">
|
362 |
+
<h3 class="">JAVASCRIPT_INLINE_EDIT_OBJECT</h3>
|
363 |
+
<pre class="signature">JAVASCRIPT_INLINE_EDIT_OBJECT</pre>
|
364 |
+
<p><em>Object name for localizing JavaScript - MLA List Table</em></p>
|
365 |
+
|
366 |
+
</article>
|
367 |
+
</div>
|
368 |
+
<aside class="span4 detailsbar">
|
369 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
370 |
+
<dl>
|
371 |
+
</dl>
|
372 |
+
<h2>Tags</h2>
|
373 |
+
<table class="table table-condensed">
|
374 |
+
<tr>
|
375 |
+
<th>
|
376 |
+
since
|
377 |
+
</th>
|
378 |
+
<td>
|
379 |
+
|
380 |
+
</td>
|
381 |
+
</tr>
|
382 |
+
</table>
|
383 |
+
</aside>
|
384 |
+
</div>
|
385 |
+
|
386 |
+
<div class="row-fluid">
|
387 |
+
<div class="span8 content class">
|
388 |
+
<a id="constant_MLA_ADMIN_SINGLE_EDIT_DISPLAY" name="constant_MLA_ADMIN_SINGLE_EDIT_DISPLAY" class="anchor"></a>
|
389 |
+
<article id="constant_MLA_ADMIN_SINGLE_EDIT_DISPLAY" class="constant">
|
390 |
+
<h3 class="">MLA_ADMIN_SINGLE_EDIT_DISPLAY</h3>
|
391 |
+
<pre class="signature">MLA_ADMIN_SINGLE_EDIT_DISPLAY</pre>
|
392 |
+
<p><em>mla_admin_action value to display a single item for editing</em></p>
|
393 |
+
<p>Used by class-mla-view-list-table.php and class-mla-upload-list-table.php</p>
|
394 |
+
</article>
|
395 |
+
</div>
|
396 |
+
<aside class="span4 detailsbar">
|
397 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
398 |
+
<dl>
|
399 |
+
</dl>
|
400 |
+
<h2>Tags</h2>
|
401 |
+
<table class="table table-condensed">
|
402 |
+
<tr>
|
403 |
+
<th>
|
404 |
+
since
|
405 |
+
</th>
|
406 |
+
<td>
|
407 |
+
|
408 |
+
</td>
|
409 |
+
</tr>
|
410 |
+
</table>
|
411 |
+
</aside>
|
412 |
+
</div>
|
413 |
+
|
414 |
+
<div class="row-fluid">
|
415 |
+
<div class="span8 content class">
|
416 |
+
<a id="constant_MLA_ADMIN_SINGLE_EDIT_UPDATE" name="constant_MLA_ADMIN_SINGLE_EDIT_UPDATE" class="anchor"></a>
|
417 |
+
<article id="constant_MLA_ADMIN_SINGLE_EDIT_UPDATE" class="constant">
|
418 |
+
<h3 class="">MLA_ADMIN_SINGLE_EDIT_UPDATE</h3>
|
419 |
+
<pre class="signature">MLA_ADMIN_SINGLE_EDIT_UPDATE</pre>
|
420 |
+
<p><em>mla_admin_action value for updating a single item</em></p>
|
421 |
+
<p>Used by class-mla-view-list-table.php and class-mla-upload-list-table.php</p>
|
422 |
+
</article>
|
423 |
+
</div>
|
424 |
+
<aside class="span4 detailsbar">
|
425 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
426 |
+
<dl>
|
427 |
+
</dl>
|
428 |
+
<h2>Tags</h2>
|
429 |
+
<table class="table table-condensed">
|
430 |
+
<tr>
|
431 |
+
<th>
|
432 |
+
since
|
433 |
+
</th>
|
434 |
+
<td>
|
435 |
+
|
436 |
+
</td>
|
437 |
+
</tr>
|
438 |
+
</table>
|
439 |
+
</aside>
|
440 |
+
</div>
|
441 |
+
|
442 |
+
<div class="row-fluid">
|
443 |
+
<div class="span8 content class">
|
444 |
+
<a id="constant_MLA_ADMIN_SINGLE_CUSTOM_FIELD_MAP" name="constant_MLA_ADMIN_SINGLE_CUSTOM_FIELD_MAP" class="anchor"></a>
|
445 |
+
<article id="constant_MLA_ADMIN_SINGLE_CUSTOM_FIELD_MAP" class="constant">
|
446 |
+
<h3 class="">MLA_ADMIN_SINGLE_CUSTOM_FIELD_MAP</h3>
|
447 |
+
<pre class="signature">MLA_ADMIN_SINGLE_CUSTOM_FIELD_MAP</pre>
|
448 |
+
<p><em>mla_admin_action value for mapping Custom Field metadata</em></p>
|
449 |
+
|
450 |
+
</article>
|
451 |
+
</div>
|
452 |
+
<aside class="span4 detailsbar">
|
453 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
454 |
+
<dl>
|
455 |
+
</dl>
|
456 |
+
<h2>Tags</h2>
|
457 |
+
<table class="table table-condensed">
|
458 |
+
<tr>
|
459 |
+
<th>
|
460 |
+
since
|
461 |
+
</th>
|
462 |
+
<td>
|
463 |
+
|
464 |
+
</td>
|
465 |
+
</tr>
|
466 |
+
</table>
|
467 |
+
</aside>
|
468 |
+
</div>
|
469 |
+
|
470 |
+
<div class="row-fluid">
|
471 |
+
<div class="span8 content class">
|
472 |
+
<a id="constant_MLA_ADMIN_SINGLE_MAP" name="constant_MLA_ADMIN_SINGLE_MAP" class="anchor"></a>
|
473 |
+
<article id="constant_MLA_ADMIN_SINGLE_MAP" class="constant">
|
474 |
+
<h3 class="">MLA_ADMIN_SINGLE_MAP</h3>
|
475 |
+
<pre class="signature">MLA_ADMIN_SINGLE_MAP</pre>
|
476 |
+
<p><em>mla_admin_action value for mapping IPTC/EXIF metadata</em></p>
|
477 |
+
|
478 |
+
</article>
|
479 |
+
</div>
|
480 |
+
<aside class="span4 detailsbar">
|
481 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
482 |
+
<dl>
|
483 |
+
</dl>
|
484 |
+
<h2>Tags</h2>
|
485 |
+
<table class="table table-condensed">
|
486 |
+
<tr>
|
487 |
+
<th>
|
488 |
+
since
|
489 |
+
</th>
|
490 |
+
<td>
|
491 |
+
|
492 |
+
</td>
|
493 |
+
</tr>
|
494 |
+
</table>
|
495 |
+
</aside>
|
496 |
+
</div>
|
497 |
+
|
498 |
+
<div class="row-fluid">
|
499 |
+
<div class="span8 content class">
|
500 |
+
<a id="constant_MLA_ADMIN_SET_PARENT" name="constant_MLA_ADMIN_SET_PARENT" class="anchor"></a>
|
501 |
+
<article id="constant_MLA_ADMIN_SET_PARENT" class="constant">
|
502 |
+
<h3 class="">MLA_ADMIN_SET_PARENT</h3>
|
503 |
+
<pre class="signature">MLA_ADMIN_SET_PARENT</pre>
|
504 |
+
<p><em>mla_admin_action value for setting an item's parent object</em></p>
|
505 |
+
|
506 |
+
</article>
|
507 |
+
</div>
|
508 |
+
<aside class="span4 detailsbar">
|
509 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
510 |
+
<dl>
|
511 |
+
</dl>
|
512 |
+
<h2>Tags</h2>
|
513 |
+
<table class="table table-condensed">
|
514 |
+
<tr>
|
515 |
+
<th>
|
516 |
+
since
|
517 |
+
</th>
|
518 |
+
<td>
|
519 |
+
|
520 |
+
</td>
|
521 |
+
</tr>
|
522 |
+
</table>
|
523 |
+
</aside>
|
524 |
+
</div>
|
525 |
+
|
526 |
+
<div class="row-fluid">
|
527 |
+
<div class="span8 content class">
|
528 |
+
<a id="constant_MLA_ADMIN_TERMS_SEARCH" name="constant_MLA_ADMIN_TERMS_SEARCH" class="anchor"></a>
|
529 |
+
<article id="constant_MLA_ADMIN_TERMS_SEARCH" class="constant">
|
530 |
+
<h3 class="">MLA_ADMIN_TERMS_SEARCH</h3>
|
531 |
+
<pre class="signature">MLA_ADMIN_TERMS_SEARCH</pre>
|
532 |
+
<p><em>mla_admin_action value for searching taxonomy terms</em></p>
|
533 |
+
|
534 |
+
</article>
|
535 |
+
</div>
|
536 |
+
<aside class="span4 detailsbar">
|
537 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
538 |
+
<dl>
|
539 |
+
</dl>
|
540 |
+
<h2>Tags</h2>
|
541 |
+
<table class="table table-condensed">
|
542 |
+
<tr>
|
543 |
+
<th>
|
544 |
+
since
|
545 |
+
</th>
|
546 |
+
<td>
|
547 |
+
|
548 |
+
</td>
|
549 |
+
</tr>
|
550 |
+
</table>
|
551 |
+
</aside>
|
552 |
+
</div>
|
553 |
+
|
554 |
+
|
555 |
+
<a id="properties" name="properties"></a>
|
556 |
+
<div class="row-fluid">
|
557 |
+
<div class="span8 content class">
|
558 |
+
<h2>Properties</h2>
|
559 |
+
</div>
|
560 |
+
<aside class="span4 detailsbar"></aside>
|
561 |
+
</div>
|
562 |
+
|
563 |
+
<div class="row-fluid">
|
564 |
+
<div class="span8 content class">
|
565 |
+
<a id="property_page_hooks" name="property_page_hooks" class="anchor"></a>
|
566 |
+
<article class="property">
|
567 |
+
<h3 class="private ">$page_hooks</h3>
|
568 |
+
<pre class="signature">$page_hooks : array</pre>
|
569 |
+
<p><em>Holds screen ids to match help text to corresponding screen</em></p>
|
570 |
+
|
571 |
+
|
572 |
+
<h4>Type</h4>
|
573 |
+
array
|
574 |
+
</article>
|
575 |
+
</div>
|
576 |
+
<aside class="span4 detailsbar">
|
577 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
578 |
+
<dl>
|
579 |
+
</dl>
|
580 |
+
<h2>Tags</h2>
|
581 |
+
<table class="table table-condensed">
|
582 |
+
<tr>
|
583 |
+
<th>
|
584 |
+
since
|
585 |
+
</th>
|
586 |
+
<td>
|
587 |
+
|
588 |
+
</td>
|
589 |
+
</tr>
|
590 |
+
</table>
|
591 |
+
</aside>
|
592 |
+
</div>
|
593 |
+
|
594 |
+
<div class="row-fluid">
|
595 |
+
<div class="span8 content class">
|
596 |
+
<a id="property_mla_language_support_error_messages" name="property_mla_language_support_error_messages" class="anchor"></a>
|
597 |
+
<article class="property">
|
598 |
+
<h3 class="private ">$mla_language_support_error_messages</h3>
|
599 |
+
<pre class="signature">$mla_language_support_error_messages : </pre>
|
600 |
+
<p><em>Accumulates error messages from name conflict tests</em></p>
|
601 |
+
|
602 |
+
|
603 |
+
<h4>Type</h4>
|
604 |
+
|
605 |
+
</article>
|
606 |
+
</div>
|
607 |
+
<aside class="span4 detailsbar">
|
608 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
609 |
+
<dl>
|
610 |
+
</dl>
|
611 |
+
<h2>Tags</h2>
|
612 |
+
<table class="table table-condensed">
|
613 |
+
<tr>
|
614 |
+
<th>
|
615 |
+
since
|
616 |
+
</th>
|
617 |
+
<td>
|
618 |
+
|
619 |
+
</td>
|
620 |
+
</tr>
|
621 |
+
</table>
|
622 |
+
</aside>
|
623 |
+
</div>
|
624 |
+
|
625 |
+
|
626 |
+
<a id="methods" name="methods"></a>
|
627 |
+
<div class="row-fluid">
|
628 |
+
<div class="span8 content class"><h2>Methods</h2></div>
|
629 |
+
<aside class="span4 detailsbar"></aside>
|
630 |
+
</div>
|
631 |
+
|
632 |
+
<div class="row-fluid">
|
633 |
+
<div class="span8 content class">
|
634 |
+
<a id="method_mla_name_conflict_reporting_action" name="method_mla_name_conflict_reporting_action" class="anchor"></a>
|
635 |
+
<article class="method">
|
636 |
+
<h3 class="public ">mla_name_conflict_reporting_action()</h3>
|
637 |
+
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
638 |
+
<pre class="signature" style="margin-right: 54px;">mla_name_conflict_reporting_action() </pre>
|
639 |
+
<p><em>Displays name conflict error messages at the top of the Dashboard</em></p>
|
640 |
+
|
641 |
+
|
642 |
+
|
643 |
+
|
644 |
+
|
645 |
+
</article>
|
646 |
+
</div>
|
647 |
+
<aside class="span4 detailsbar">
|
648 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
649 |
+
<span class="label label-info">static</span>
|
650 |
+
<dl>
|
651 |
+
</dl>
|
652 |
+
<h2>Tags</h2>
|
653 |
+
<table class="table table-condensed">
|
654 |
+
<tr>
|
655 |
+
<th>
|
656 |
+
since
|
657 |
+
</th>
|
658 |
+
<td>
|
659 |
+
2.11
|
660 |
+
</td>
|
661 |
+
</tr>
|
662 |
+
</table>
|
663 |
+
</aside>
|
664 |
+
</div>
|
665 |
+
|
666 |
+
<div class="row-fluid">
|
667 |
+
<div class="span8 content class">
|
668 |
+
<a id="method_initialize" name="method_initialize" class="anchor"></a>
|
669 |
+
<article class="method">
|
670 |
+
<h3 class="public ">initialize()</h3>
|
671 |
+
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
672 |
+
<pre class="signature" style="margin-right: 54px;">initialize() : void</pre>
|
673 |
+
<p><em>Initialization function, similar to __construct()</em></p>
|
674 |
+
<p>This function contains add_action and add_filter calls
|
675 |
to set up the Ajax handlers, enqueue JavaScript and CSS files, and
|
676 |
+
set up the Assistant submenu.</p>
|
677 |
+
|
678 |
+
|
679 |
+
|
680 |
+
|
681 |
+
</article>
|
682 |
+
</div>
|
683 |
+
<aside class="span4 detailsbar">
|
684 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
685 |
+
<span class="label label-info">static</span>
|
686 |
+
<dl>
|
687 |
+
</dl>
|
688 |
+
<h2>Tags</h2>
|
689 |
+
<table class="table table-condensed">
|
690 |
+
<tr>
|
691 |
+
<th>
|
692 |
+
since
|
693 |
+
</th>
|
694 |
+
<td>
|
695 |
+
0.1
|
696 |
+
</td>
|
697 |
+
</tr>
|
698 |
+
</table>
|
699 |
+
</aside>
|
700 |
+
</div>
|
701 |
+
|
702 |
+
<div class="row-fluid">
|
703 |
+
<div class="span8 content class">
|
704 |
+
<a id="method_mla_admin_init_action" name="method_mla_admin_init_action" class="anchor"></a>
|
705 |
+
<article class="method">
|
706 |
+
<h3 class="public ">mla_admin_init_action()</h3>
|
707 |
+
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
708 |
+
<pre class="signature" style="margin-right: 54px;">mla_admin_init_action() : void</pre>
|
709 |
+
<p><em>Load the plugin's Ajax handler or process Edit Media update actions</em></p>
|
710 |
+
|
711 |
+
|
712 |
+
|
713 |
+
|
714 |
+
|
715 |
+
</article>
|
716 |
+
</div>
|
717 |
+
<aside class="span4 detailsbar">
|
718 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
719 |
+
<span class="label label-info">static</span>
|
720 |
+
<dl>
|
721 |
+
</dl>
|
722 |
+
<h2>Tags</h2>
|
723 |
+
<table class="table table-condensed">
|
724 |
+
<tr>
|
725 |
+
<th>
|
726 |
+
since
|
727 |
+
</th>
|
728 |
+
<td>
|
729 |
+
0.20
|
730 |
+
</td>
|
731 |
+
</tr>
|
732 |
+
</table>
|
733 |
+
</aside>
|
734 |
+
</div>
|
735 |
+
|
736 |
+
<div class="row-fluid">
|
737 |
+
<div class="span8 content class">
|
738 |
+
<a id="method_mla_admin_print_styles_action" name="method_mla_admin_print_styles_action" class="anchor"></a>
|
739 |
+
<article class="method">
|
740 |
+
<h3 class="public ">mla_admin_print_styles_action()</h3>
|
741 |
+
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
742 |
+
<pre class="signature" style="margin-right: 54px;">mla_admin_print_styles_action() </pre>
|
743 |
+
<p><em>Print optional in-lne styles for Media/Assistant submenu table</em></p>
|
744 |
+
|
745 |
+
|
746 |
+
|
747 |
+
|
748 |
+
|
749 |
+
</article>
|
750 |
+
</div>
|
751 |
+
<aside class="span4 detailsbar">
|
752 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
753 |
+
<span class="label label-info">static</span>
|
754 |
+
<dl>
|
755 |
+
</dl>
|
756 |
+
<h2>Tags</h2>
|
757 |
+
<table class="table table-condensed">
|
758 |
+
<tr>
|
759 |
+
<th>
|
760 |
+
since
|
761 |
+
</th>
|
762 |
+
<td>
|
763 |
+
2.13
|
764 |
+
</td>
|
765 |
+
</tr>
|
766 |
+
</table>
|
767 |
+
</aside>
|
768 |
+
</div>
|
769 |
+
|
770 |
+
<div class="row-fluid">
|
771 |
+
<div class="span8 content class">
|
772 |
+
<a id="method_mla_admin_enqueue_scripts_action" name="method_mla_admin_enqueue_scripts_action" class="anchor"></a>
|
773 |
+
<article class="method">
|
774 |
+
<h3 class="public ">mla_admin_enqueue_scripts_action()</h3>
|
775 |
+
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
776 |
+
<pre class="signature" style="margin-right: 54px;">mla_admin_enqueue_scripts_action( <span class="argument">$page_hook</span>) : void</pre>
|
777 |
+
<p><em>Load the plugin's Style Sheet and Javascript files</em></p>
|
778 |
+
|
779 |
+
|
780 |
+
<h4>Parameters</h4>
|
781 |
+
<table class="table table-condensed table-hover">
|
782 |
+
<tr>
|
783 |
+
<td></td>
|
784 |
+
<td>$page_hook </td>
|
785 |
+
<td></td>
|
786 |
+
</tr>
|
787 |
+
</table>
|
788 |
+
|
789 |
+
|
790 |
+
|
791 |
+
</article>
|
792 |
+
</div>
|
793 |
+
<aside class="span4 detailsbar">
|
794 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
795 |
+
<span class="label label-info">static</span>
|
796 |
+
<dl>
|
797 |
+
</dl>
|
798 |
+
<h2>Tags</h2>
|
799 |
+
<table class="table table-condensed">
|
800 |
+
<tr>
|
801 |
+
<th>
|
802 |
+
since
|
803 |
+
</th>
|
804 |
+
<td>
|
805 |
+
0.1
|
806 |
+
</td>
|
807 |
+
</tr>
|
808 |
+
</table>
|
809 |
+
</aside>
|
810 |
+
</div>
|
811 |
+
|
812 |
+
<div class="row-fluid">
|
813 |
+
<div class="span8 content class">
|
814 |
+
<a id="method_mla_admin_menu_action" name="method_mla_admin_menu_action" class="anchor"></a>
|
815 |
+
<article class="method">
|
816 |
+
<h3 class="public ">mla_admin_menu_action()</h3>
|
817 |
+
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
818 |
+
<pre class="signature" style="margin-right: 54px;">mla_admin_menu_action() : void</pre>
|
819 |
+
<p><em>Add the submenu pages</em></p>
|
820 |
+
<p>Add a submenu page in the "Media" section,
|
821 |
+
add settings page in the "Settings" section.
|
822 |
+
add settings link in the Plugins section entry for MLA.</p>
|
823 |
+
|
824 |
+
|
825 |
+
|
826 |
+
|
827 |
+
</article>
|
828 |
+
</div>
|
829 |
+
<aside class="span4 detailsbar">
|
830 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
831 |
+
<span class="label label-info">static</span>
|
832 |
+
<dl>
|
833 |
+
</dl>
|
834 |
+
<h2>Tags</h2>
|
835 |
+
<table class="table table-condensed">
|
836 |
+
<tr>
|
837 |
+
<th>
|
838 |
+
since
|
839 |
+
</th>
|
840 |
+
<td>
|
841 |
+
0.1
|
842 |
+
</td>
|
843 |
+
</tr>
|
844 |
+
</table>
|
845 |
+
</aside>
|
846 |
+
</div>
|
847 |
+
|
848 |
+
<div class="row-fluid">
|
849 |
+
<div class="span8 content class">
|
850 |
+
<a id="method_mla_load_media_action" name="method_mla_load_media_action" class="anchor"></a>
|
851 |
+
<article class="method">
|
852 |
+
<h3 class="public ">mla_load_media_action()</h3>
|
853 |
+
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
854 |
+
<pre class="signature" style="margin-right: 54px;">mla_load_media_action() : void</pre>
|
855 |
+
<p><em>Redirect to Media/Assistant if Media/Library is hidden or a trash/delete
|
856 |
+
returns from Media/Edit Media initiated from Media/Assistant</em></p>
|
857 |
+
|
858 |
+
|
859 |
+
|
860 |
+
|
861 |
+
|
862 |
+
</article>
|
863 |
+
</div>
|
864 |
+
<aside class="span4 detailsbar">
|
865 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
866 |
+
<span class="label label-info">static</span>
|
867 |
+
<dl>
|
868 |
+
</dl>
|
869 |
+
<h2>Tags</h2>
|
870 |
+
<table class="table table-condensed">
|
871 |
+
<tr>
|
872 |
+
<th>
|
873 |
+
since
|
874 |
+
</th>
|
875 |
+
<td>
|
876 |
+
1.60
|
877 |
+
</td>
|
878 |
+
</tr>
|
879 |
+
</table>
|
880 |
+
</aside>
|
881 |
+
</div>
|
882 |
+
|
883 |
+
<div class="row-fluid">
|
884 |
+
<div class="span8 content class">
|
885 |
+
<a id="method_mla_add_menu_options" name="method_mla_add_menu_options" class="anchor"></a>
|
886 |
+
<article class="method">
|
887 |
+
<h3 class="public ">mla_add_menu_options()</h3>
|
888 |
+
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
889 |
+
<pre class="signature" style="margin-right: 54px;">mla_add_menu_options() : void</pre>
|
890 |
+
<p><em>Add the "XX Entries per page" filter to the Screen Options tab</em></p>
|
891 |
+
|
892 |
+
|
893 |
+
|
894 |
+
|
895 |
+
|
896 |
+
</article>
|
897 |
+
</div>
|
898 |
+
<aside class="span4 detailsbar">
|
899 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
900 |
+
<span class="label label-info">static</span>
|
901 |
+
<dl>
|
902 |
+
</dl>
|
903 |
+
<h2>Tags</h2>
|
904 |
+
<table class="table table-condensed">
|
905 |
+
<tr>
|
906 |
+
<th>
|
907 |
+
since
|
908 |
+
</th>
|
909 |
+
<td>
|
910 |
+
0.1
|
911 |
+
</td>
|
912 |
+
</tr>
|
913 |
+
</table>
|
914 |
+
</aside>
|
915 |
+
</div>
|
916 |
+
|
917 |
+
<div class="row-fluid">
|
918 |
+
<div class="span8 content class">
|
919 |
+
<a id="method_mla_add_help_tab" name="method_mla_add_help_tab" class="anchor"></a>
|
920 |
+
<article class="method">
|
921 |
+
<h3 class="public ">mla_add_help_tab()</h3>
|
922 |
+
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
923 |
+
<pre class="signature" style="margin-right: 54px;">mla_add_help_tab() : void</pre>
|
924 |
+
<p><em>Add contextual help tabs to all the MLA pages</em></p>
|
925 |
+
|
926 |
+
|
927 |
+
|
928 |
+
|
929 |
+
|
930 |
+
</article>
|
931 |
+
</div>
|
932 |
+
<aside class="span4 detailsbar">
|
933 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
934 |
+
<span class="label label-info">static</span>
|
935 |
+
<dl>
|
936 |
+
</dl>
|
937 |
+
<h2>Tags</h2>
|
938 |
+
<table class="table table-condensed">
|
939 |
+
<tr>
|
940 |
+
<th>
|
941 |
+
since
|
942 |
+
</th>
|
943 |
+
<td>
|
944 |
+
0.1
|
945 |
+
</td>
|
946 |
+
</tr>
|
947 |
+
</table>
|
948 |
+
</aside>
|
949 |
+
</div>
|
950 |
+
|
951 |
+
<div class="row-fluid">
|
952 |
+
<div class="span8 content class">
|
953 |
+
<a id="method_mla_screen_options_show_screen_filter" name="method_mla_screen_options_show_screen_filter" class="anchor"></a>
|
954 |
+
<article class="method">
|
955 |
+
<h3 class="public ">mla_screen_options_show_screen_filter()</h3>
|
956 |
+
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
957 |
+
<pre class="signature" style="margin-right: 54px;">mla_screen_options_show_screen_filter( <span class="argument">$show_screen</span>, <span class="argument">$this_screen</span>) : boolean</pre>
|
958 |
+
<p><em>Only show screen options on the table-list screen</em></p>
|
959 |
+
|
960 |
+
|
961 |
+
<h4>Parameters</h4>
|
962 |
+
<table class="table table-condensed table-hover">
|
963 |
+
<tr>
|
964 |
+
<td></td>
|
965 |
+
<td>$show_screen </td>
|
966 |
+
<td></td>
|
967 |
+
</tr>
|
968 |
+
<tr>
|
969 |
+
<td></td>
|
970 |
+
<td>$this_screen </td>
|
971 |
+
<td></td>
|
972 |
+
</tr>
|
973 |
+
</table>
|
974 |
+
|
975 |
+
|
976 |
+
<h4>Returns</h4>
|
977 |
+
boolean
|
978 |
+
— <p>True to display "Screen Options", false to suppress them</p>
|
979 |
+
|
980 |
+
</article>
|
981 |
+
</div>
|
982 |
+
<aside class="span4 detailsbar">
|
983 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
984 |
+
<span class="label label-info">static</span>
|
985 |
+
<dl>
|
986 |
+
</dl>
|
987 |
+
<h2>Tags</h2>
|
988 |
+
<table class="table table-condensed">
|
989 |
+
<tr>
|
990 |
+
<th>
|
991 |
+
since
|
992 |
+
</th>
|
993 |
+
<td>
|
994 |
+
0.1
|
995 |
+
</td>
|
996 |
+
</tr>
|
997 |
+
</table>
|
998 |
+
</aside>
|
999 |
+
</div>
|
1000 |
+
|
1001 |
+
<div class="row-fluid">
|
1002 |
+
<div class="span8 content class">
|
1003 |
+
<a id="method_mla_set_screen_option_filter" name="method_mla_set_screen_option_filter" class="anchor"></a>
|
1004 |
+
<article class="method">
|
1005 |
+
<h3 class="public ">mla_set_screen_option_filter()</h3>
|
1006 |
+
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
1007 |
+
<pre class="signature" style="margin-right: 54px;">mla_set_screen_option_filter( <span class="argument">$status</span>, <span class="argument">$option</span>, <span class="argument">$value</span>) : string|void</pre>
|
1008 |
+
<p><em>Save the "Entries per page" option set by this user</em></p>
|
1009 |
+
|
1010 |
+
|
1011 |
+
<h4>Parameters</h4>
|
1012 |
+
<table class="table table-condensed table-hover">
|
1013 |
+
<tr>
|
1014 |
+
<td></td>
|
1015 |
+
<td>$status </td>
|
1016 |
+
<td></td>
|
1017 |
+
</tr>
|
1018 |
+
<tr>
|
1019 |
+
<td></td>
|
1020 |
+
<td>$option </td>
|
1021 |
+
<td></td>
|
1022 |
+
</tr>
|
1023 |
+
<tr>
|
1024 |
+
<td></td>
|
1025 |
+
<td>$value </td>
|
1026 |
+
<td></td>
|
1027 |
+
</tr>
|
1028 |
+
</table>
|
1029 |
+
|
1030 |
+
|
1031 |
+
<h4>Returns</h4>
|
1032 |
+
string|void
|
1033 |
+
— <p>New value if this is our option, otherwise nothing</p>
|
1034 |
+
|
1035 |
+
</article>
|
1036 |
+
</div>
|
1037 |
+
<aside class="span4 detailsbar">
|
1038 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1039 |
+
<span class="label label-info">static</span>
|
1040 |
+
<dl>
|
1041 |
+
</dl>
|
1042 |
+
<h2>Tags</h2>
|
1043 |
+
<table class="table table-condensed">
|
1044 |
+
<tr>
|
1045 |
+
<th>
|
1046 |
+
since
|
1047 |
+
</th>
|
1048 |
+
<td>
|
1049 |
+
0.1
|
1050 |
+
</td>
|
1051 |
+
</tr>
|
1052 |
+
</table>
|
1053 |
+
</aside>
|
1054 |
+
</div>
|
1055 |
+
|
1056 |
+
<div class="row-fluid">
|
1057 |
+
<div class="span8 content class">
|
1058 |
+
<a id="method_mla_parent_file_filter" name="method_mla_parent_file_filter" class="anchor"></a>
|
1059 |
+
<article class="method">
|
1060 |
+
<h3 class="public ">mla_parent_file_filter()</h3>
|
1061 |
+
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
1062 |
+
<pre class="signature" style="margin-right: 54px;">mla_parent_file_filter( <span class="argument">$parent_file</span>) : string</pre>
|
1063 |
+
<p><em>Cleanup menus for Edit Tags/Categories page</em></p>
|
1064 |
+
<p>Fixes the submenu bolding when going to the Edit Media screen.</p>
|
1065 |
+
|
1066 |
+
<h4>Parameters</h4>
|
1067 |
+
<table class="table table-condensed table-hover">
|
1068 |
+
<tr>
|
1069 |
+
<td></td>
|
1070 |
+
<td>$parent_file </td>
|
1071 |
+
<td></td>
|
1072 |
+
</tr>
|
1073 |
+
</table>
|
1074 |
+
|
1075 |
+
|
1076 |
+
<h4>Returns</h4>
|
1077 |
+
string
|
1078 |
+
— <p>The updated top-level menu page</p>
|
1079 |
+
|
1080 |
+
</article>
|
1081 |
+
</div>
|
1082 |
+
<aside class="span4 detailsbar">
|
1083 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1084 |
+
<span class="label label-info">static</span>
|
1085 |
+
<dl>
|
1086 |
+
</dl>
|
1087 |
+
<h2>Tags</h2>
|
1088 |
+
<table class="table table-condensed">
|
1089 |
+
<tr>
|
1090 |
+
<th>
|
1091 |
+
since
|
1092 |
+
</th>
|
1093 |
+
<td>
|
1094 |
+
0.1
|
1095 |
+
</td>
|
1096 |
+
</tr>
|
1097 |
+
</table>
|
1098 |
+
</aside>
|
1099 |
+
</div>
|
1100 |
+
|
1101 |
+
<div class="row-fluid">
|
1102 |
+
<div class="span8 content class">
|
1103 |
+
<a id="method_mla_prepare_bulk_edits" name="method_mla_prepare_bulk_edits" class="anchor"></a>
|
1104 |
+
<article class="method">
|
1105 |
+
<h3 class="public ">mla_prepare_bulk_edits()</h3>
|
1106 |
+
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
1107 |
+
<pre class="signature" style="margin-right: 54px;">mla_prepare_bulk_edits(integer <span class="argument">$post_id</span>, array <span class="argument">$request</span>, array <span class="argument">$custom_field_map</span>) : array</pre>
|
1108 |
+
<p><em>Prepare Bulk Edit field-level updates</em></p>
|
1109 |
+
|
1110 |
+
|
1111 |
+
<h4>Parameters</h4>
|
1112 |
+
<table class="table table-condensed table-hover">
|
1113 |
+
<tr>
|
1114 |
+
<td>integer</td>
|
1115 |
+
<td>$post_id </td>
|
1116 |
+
<td><p>Current post ID</p></td>
|
1117 |
+
</tr>
|
1118 |
+
<tr>
|
1119 |
+
<td>array</td>
|
1120 |
+
<td>$request </td>
|
1121 |
+
<td><p>Form elements, e.g., from $_REQUEST</p></td>
|
1122 |
+
</tr>
|
1123 |
+
<tr>
|
1124 |
+
<td>array</td>
|
1125 |
+
<td>$custom_field_map </td>
|
1126 |
+
<td><p>Form id to field name mapping</p></td>
|
1127 |
+
</tr>
|
1128 |
+
</table>
|
1129 |
+
|
1130 |
+
|
1131 |
+
<h4>Returns</h4>
|
1132 |
+
array
|
1133 |
+
— <p>Non-empty form elements</p>
|
1134 |
+
|
1135 |
+
</article>
|
1136 |
+
</div>
|
1137 |
+
<aside class="span4 detailsbar">
|
1138 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1139 |
+
<span class="label label-info">static</span>
|
1140 |
+
<dl>
|
1141 |
+
</dl>
|
1142 |
+
<h2>Tags</h2>
|
1143 |
+
<table class="table table-condensed">
|
1144 |
+
<tr>
|
1145 |
+
<th>
|
1146 |
+
since
|
1147 |
+
</th>
|
1148 |
+
<td>
|
1149 |
+
2.11
|
1150 |
+
</td>
|
1151 |
+
</tr>
|
1152 |
+
</table>
|
1153 |
+
</aside>
|
1154 |
+
</div>
|
1155 |
+
|
1156 |
+
<div class="row-fluid">
|
1157 |
+
<div class="span8 content class">
|
1158 |
+
<a id="method_mla_process_bulk_action" name="method_mla_process_bulk_action" class="anchor"></a>
|
1159 |
+
<article class="method">
|
1160 |
+
<h3 class="public ">mla_process_bulk_action()</h3>
|
1161 |
+
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
1162 |
+
<pre class="signature" style="margin-right: 54px;">mla_process_bulk_action( <span class="argument">$bulk_action</span>, <span class="argument">$request = NULL</span>) : array</pre>
|
1163 |
+
<p><em>Process bulk action for one or more attachments</em></p>
|
1164 |
+
|
1165 |
+
|
1166 |
+
<h4>Parameters</h4>
|
1167 |
+
<table class="table table-condensed table-hover">
|
1168 |
+
<tr>
|
1169 |
+
<td></td>
|
1170 |
+
<td>$bulk_action </td>
|
1171 |
+
<td></td>
|
1172 |
+
</tr>
|
1173 |
+
<tr>
|
1174 |
+
<td></td>
|
1175 |
+
<td>$request </td>
|
1176 |
+
<td></td>
|
1177 |
+
</tr>
|
1178 |
+
</table>
|
1179 |
+
|
1180 |
+
|
1181 |
+
<h4>Returns</h4>
|
1182 |
+
array
|
1183 |
+
— <p>messages and page content: ( 'message', 'body', 'unchanged', 'success', 'failure', 'item_results' )</p>
|
1184 |
+
|
1185 |
+
</article>
|
1186 |
+
</div>
|
1187 |
+
<aside class="span4 detailsbar">
|
1188 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1189 |
+
<span class="label label-info">static</span>
|
1190 |
+
<dl>
|
1191 |
+
</dl>
|
1192 |
+
<h2>Tags</h2>
|
1193 |
+
<table class="table table-condensed">
|
1194 |
+
<tr>
|
1195 |
+
<th>
|
1196 |
+
since
|
1197 |
+
</th>
|
1198 |
+
<td>
|
1199 |
+
2.00
|
1200 |
+
</td>
|
1201 |
+
</tr>
|
1202 |
+
</table>
|
1203 |
+
</aside>
|
1204 |
+
</div>
|
1205 |
+
|
1206 |
+
<div class="row-fluid">
|
1207 |
+
<div class="span8 content class">
|
1208 |
+
<a id="method_mla_clear_filter_by" name="method_mla_clear_filter_by" class="anchor"></a>
|
1209 |
+
<article class="method">
|
1210 |
+
<h3 class="public ">mla_clear_filter_by()</h3>
|
1211 |
+
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
1212 |
+
<pre class="signature" style="margin-right: 54px;">mla_clear_filter_by(array <span class="argument">$preserves = array()</span>) : void</pre>
|
1213 |
+
<p><em>Clear the Media/Assistant submenu Filter-by variables</em></p>
|
1214 |
+
|
1215 |
+
|
1216 |
+
<h4>Parameters</h4>
|
1217 |
+
<table class="table table-condensed table-hover">
|
1218 |
+
<tr>
|
1219 |
+
<td>array</td>
|
1220 |
+
<td>$preserves </td>
|
1221 |
+
<td><p>Filters to be retained</p></td>
|
1222 |
+
</tr>
|
1223 |
+
</table>
|
1224 |
+
|
1225 |
+
|
1226 |
+
|
1227 |
+
</article>
|
1228 |
+
</div>
|
1229 |
+
<aside class="span4 detailsbar">
|
1230 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1231 |
+
<span class="label label-info">static</span>
|
1232 |
+
<dl>
|
1233 |
+
</dl>
|
1234 |
+
<h2>Tags</h2>
|
1235 |
+
<table class="table table-condensed">
|
1236 |
+
<tr>
|
1237 |
+
<th>
|
1238 |
+
since
|
1239 |
+
</th>
|
1240 |
+
<td>
|
1241 |
+
2.13
|
1242 |
+
</td>
|
1243 |
+
</tr>
|
1244 |
+
</table>
|
1245 |
+
</aside>
|
1246 |
+
</div>
|
1247 |
+
|
1248 |
+
<div class="row-fluid">
|
1249 |
+
<div class="span8 content class">
|
1250 |
+
<a id="method_mla_render_admin_page" name="method_mla_render_admin_page" class="anchor"></a>
|
1251 |
+
<article class="method">
|
1252 |
+
<h3 class="public ">mla_render_admin_page()</h3>
|
1253 |
+
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
1254 |
+
<pre class="signature" style="margin-right: 54px;">mla_render_admin_page() : void</pre>
|
1255 |
+
<p><em>Render the "Assistant" subpage in the Media section, using the list_table package</em></p>
|
1256 |
+
|
1257 |
+
|
1258 |
+
|
1259 |
+
|
1260 |
+
|
1261 |
+
</article>
|
1262 |
+
</div>
|
1263 |
+
<aside class="span4 detailsbar">
|
1264 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1265 |
+
<span class="label label-info">static</span>
|
1266 |
+
<dl>
|
1267 |
+
</dl>
|
1268 |
+
<h2>Tags</h2>
|
1269 |
+
<table class="table table-condensed">
|
1270 |
+
<tr>
|
1271 |
+
<th>
|
1272 |
+
since
|
1273 |
+
</th>
|
1274 |
+
<td>
|
1275 |
+
0.1
|
1276 |
+
</td>
|
1277 |
+
</tr>
|
1278 |
+
</table>
|
1279 |
+
</aside>
|
1280 |
+
</div>
|
1281 |
+
|
1282 |
+
<div class="row-fluid">
|
1283 |
+
<div class="span8 content class">
|
1284 |
+
<a id="method_mla_inline_edit_ajax_action" name="method_mla_inline_edit_ajax_action" class="anchor"></a>
|
1285 |
+
<article class="method">
|
1286 |
+
<h3 class="public ">mla_inline_edit_ajax_action()</h3>
|
1287 |
+
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
1288 |
+
<pre class="signature" style="margin-right: 54px;">mla_inline_edit_ajax_action() : void</pre>
|
1289 |
+
<p><em>Ajax handler for inline editing</em></p>
|
1290 |
+
<p>Adapted for Quick Edit from wp_ajax_inline_save in /wp-admin/includes/ajax-actions.php</p>
|
1291 |
+
|
1292 |
+
|
1293 |
+
|
1294 |
+
|
1295 |
+
</article>
|
1296 |
+
</div>
|
1297 |
+
<aside class="span4 detailsbar">
|
1298 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1299 |
+
<span class="label label-info">static</span>
|
1300 |
+
<dl>
|
1301 |
+
</dl>
|
1302 |
+
<h2>Tags</h2>
|
1303 |
+
<table class="table table-condensed">
|
1304 |
+
<tr>
|
1305 |
+
<th>
|
1306 |
+
since
|
1307 |
+
</th>
|
1308 |
+
<td>
|
1309 |
+
0.20
|
1310 |
+
</td>
|
1311 |
+
</tr>
|
1312 |
+
</table>
|
1313 |
+
</aside>
|
1314 |
+
</div>
|
1315 |
+
|
1316 |
+
<div class="row-fluid">
|
1317 |
+
<div class="span8 content class">
|
1318 |
+
<a id="method_mla_set_parent_form" name="method_mla_set_parent_form" class="anchor"></a>
|
1319 |
+
<article class="method">
|
1320 |
+
<h3 class="public ">mla_set_parent_form()</h3>
|
1321 |
+
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
1322 |
+
<pre class="signature" style="margin-right: 54px;">mla_set_parent_form( <span class="argument">$return_form = true</span>) : string</pre>
|
1323 |
+
<p><em>Build the hidden form for the "Set Parent" popup modal window</em></p>
|
1324 |
+
|
1325 |
+
|
1326 |
+
<h4>Parameters</h4>
|
1327 |
+
<table class="table table-condensed table-hover">
|
1328 |
+
<tr>
|
1329 |
+
<td></td>
|
1330 |
+
<td>$return_form </td>
|
1331 |
+
<td></td>
|
1332 |
+
</tr>
|
1333 |
+
</table>
|
1334 |
+
|
1335 |
+
|
1336 |
+
<h4>Returns</h4>
|
1337 |
+
string
|
1338 |
+
— <p>HTML <form> markup for hidden form</p>
|
1339 |
+
|
1340 |
+
</article>
|
1341 |
+
</div>
|
1342 |
+
<aside class="span4 detailsbar">
|
1343 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1344 |
+
<span class="label label-info">static</span>
|
1345 |
+
<dl>
|
1346 |
+
</dl>
|
1347 |
+
<h2>Tags</h2>
|
1348 |
+
<table class="table table-condensed">
|
1349 |
+
<tr>
|
1350 |
+
<th>
|
1351 |
+
since
|
1352 |
+
</th>
|
1353 |
+
<td>
|
1354 |
+
1.90
|
1355 |
+
</td>
|
1356 |
+
</tr>
|
1357 |
+
</table>
|
1358 |
+
</aside>
|
1359 |
+
</div>
|
1360 |
+
|
1361 |
+
<div class="row-fluid">
|
1362 |
+
<div class="span8 content class">
|
1363 |
+
<a id="method_mla_authors_dropdown" name="method_mla_authors_dropdown" class="anchor"></a>
|
1364 |
+
<article class="method">
|
1365 |
+
<h3 class="public ">mla_authors_dropdown()</h3>
|
1366 |
+
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
1367 |
+
<pre class="signature" style="margin-right: 54px;">mla_authors_dropdown( <span class="argument">$author</span>, <span class="argument">$name = 'post_author'</span>, <span class="argument">$class = 'authors'</span>) : string|false</pre>
|
1368 |
+
<p><em>Get the edit Authors dropdown box, if user has suitable permissions</em></p>
|
1369 |
+
|
1370 |
+
|
1371 |
+
<h4>Parameters</h4>
|
1372 |
+
<table class="table table-condensed table-hover">
|
1373 |
+
<tr>
|
1374 |
+
<td></td>
|
1375 |
+
<td>$author </td>
|
1376 |
+
<td></td>
|
1377 |
+
</tr>
|
1378 |
+
<tr>
|
1379 |
+
<td></td>
|
1380 |
+
<td>$name </td>
|
1381 |
+
<td></td>
|
1382 |
+
</tr>
|
1383 |
+
<tr>
|
1384 |
+
<td></td>
|
1385 |
+
<td>$class </td>
|
1386 |
+
<td></td>
|
1387 |
+
</tr>
|
1388 |
+
</table>
|
1389 |
+
|
1390 |
+
|
1391 |
+
<h4>Returns</h4>
|
1392 |
+
string|false
|
1393 |
+
— <p>HTML markup for the dropdown field or False</p>
|
1394 |
+
|
1395 |
+
</article>
|
1396 |
+
</div>
|
1397 |
+
<aside class="span4 detailsbar">
|
1398 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1399 |
+
<span class="label label-info">static</span>
|
1400 |
+
<dl>
|
1401 |
+
</dl>
|
1402 |
+
<h2>Tags</h2>
|
1403 |
+
<table class="table table-condensed">
|
1404 |
+
<tr>
|
1405 |
+
<th>
|
1406 |
+
since
|
1407 |
+
</th>
|
1408 |
+
<td>
|
1409 |
+
0.20
|
1410 |
+
</td>
|
1411 |
+
</tr>
|
1412 |
+
</table>
|
1413 |
+
</aside>
|
1414 |
+
</div>
|
1415 |
+
|
1416 |
+
<div class="row-fluid">
|
1417 |
+
<div class="span8 content class">
|
1418 |
+
<a id="method__process_mla_download_file" name="method__process_mla_download_file" class="anchor"></a>
|
1419 |
+
<article class="method">
|
1420 |
+
<h3 class="private ">_process_mla_download_file()</h3>
|
1421 |
+
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
1422 |
+
<pre class="signature" style="margin-right: 54px;">_process_mla_download_file() : void</pre>
|
1423 |
+
<p><em>Process secure file download</em></p>
|
1424 |
+
<p>Requires _wpnonce, mla_download_file and mla_download_type in $_REQUEST; mla_download_disposition is optional.</p>
|
1425 |
+
|
1426 |
+
|
1427 |
+
|
1428 |
+
|
1429 |
+
</article>
|
1430 |
+
</div>
|
1431 |
+
<aside class="span4 detailsbar">
|
1432 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1433 |
+
<span class="label label-info">static</span>
|
1434 |
+
<dl>
|
1435 |
+
</dl>
|
1436 |
+
<h2>Tags</h2>
|
1437 |
+
<table class="table table-condensed">
|
1438 |
+
<tr>
|
1439 |
+
<th>
|
1440 |
+
since
|
1441 |
+
</th>
|
1442 |
+
<td>
|
1443 |
+
2.00
|
1444 |
+
</td>
|
1445 |
+
</tr>
|
1446 |
+
</table>
|
1447 |
+
</aside>
|
1448 |
+
</div>
|
1449 |
+
|
1450 |
+
<div class="row-fluid">
|
1451 |
+
<div class="span8 content class">
|
1452 |
+
<a id="method__process_bulk_value" name="method__process_bulk_value" class="anchor"></a>
|
1453 |
+
<article class="method">
|
1454 |
+
<h3 class="private ">_process_bulk_value()</h3>
|
1455 |
+
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
1456 |
+
<pre class="signature" style="margin-right: 54px;">_process_bulk_value( <span class="argument">$post_id</span>, <span class="argument">$bulk_value</span>) : string</pre>
|
1457 |
+
<p><em>Process bulk edit area fields, which may contain a Content Template</em></p>
|
1458 |
+
|
1459 |
+
|
1460 |
+
<h4>Parameters</h4>
|
1461 |
+
<table class="table table-condensed table-hover">
|
1462 |
+
<tr>
|
1463 |
+
<td></td>
|
1464 |
+
<td>$post_id </td>
|
1465 |
+
<td></td>
|
1466 |
+
</tr>
|
1467 |
+
<tr>
|
1468 |
+
<td></td>
|
1469 |
+
<td>$bulk_value </td>
|
1470 |
+
<td></td>
|
1471 |
+
</tr>
|
1472 |
+
</table>
|
1473 |
+
|
1474 |
+
|
1475 |
+
<h4>Returns</h4>
|
1476 |
+
string
|
1477 |
+
— <p>Empty, or new value for the field</p>
|
1478 |
+
|
1479 |
+
</article>
|
1480 |
+
</div>
|
1481 |
+
<aside class="span4 detailsbar">
|
1482 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1483 |
+
<span class="label label-info">static</span>
|
1484 |
+
<dl>
|
1485 |
+
</dl>
|
1486 |
+
<h2>Tags</h2>
|
1487 |
+
<table class="table table-condensed">
|
1488 |
+
<tr>
|
1489 |
+
<th>
|
1490 |
+
since
|
1491 |
+
</th>
|
1492 |
+
<td>
|
1493 |
+
1.80
|
1494 |
+
</td>
|
1495 |
+
</tr>
|
1496 |
+
</table>
|
1497 |
+
</aside>
|
1498 |
+
</div>
|
1499 |
+
|
1500 |
+
<div class="row-fluid">
|
1501 |
+
<div class="span8 content class">
|
1502 |
+
<a id="method__bulk_edit_ajax_handler" name="method__bulk_edit_ajax_handler" class="anchor"></a>
|
1503 |
+
<article class="method">
|
1504 |
+
<h3 class="private ">_bulk_edit_ajax_handler()</h3>
|
1505 |
+
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
1506 |
+
<pre class="signature" style="margin-right: 54px;">_bulk_edit_ajax_handler() : void</pre>
|
1507 |
+
<p><em>Ajax handler for bulk editing and mapping</em></p>
|
1508 |
+
|
1509 |
+
|
1510 |
+
|
1511 |
+
|
1512 |
+
|
1513 |
+
</article>
|
1514 |
+
</div>
|
1515 |
+
<aside class="span4 detailsbar">
|
1516 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1517 |
+
<span class="label label-info">static</span>
|
1518 |
+
<dl>
|
1519 |
+
</dl>
|
1520 |
+
<h2>Tags</h2>
|
1521 |
+
<table class="table table-condensed">
|
1522 |
+
<tr>
|
1523 |
+
<th>
|
1524 |
+
since
|
1525 |
+
</th>
|
1526 |
+
<td>
|
1527 |
+
2.00
|
1528 |
+
</td>
|
1529 |
+
</tr>
|
1530 |
+
</table>
|
1531 |
+
</aside>
|
1532 |
+
</div>
|
1533 |
+
|
1534 |
+
<div class="row-fluid">
|
1535 |
+
<div class="span8 content class">
|
1536 |
+
<a id="method__compose_post_type_select" name="method__compose_post_type_select" class="anchor"></a>
|
1537 |
+
<article class="method">
|
1538 |
+
<h3 class="private ">_compose_post_type_select()</h3>
|
1539 |
+
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
1540 |
+
<pre class="signature" style="margin-right: 54px;">_compose_post_type_select( <span class="argument">$templates</span>, <span class="argument">$selection = 'all'</span>) : string</pre>
|
1541 |
+
<p><em>Compose a Post Type Options list with current selection</em></p>
|
1542 |
+
|
1543 |
+
|
1544 |
+
<h4>Parameters</h4>
|
1545 |
+
<table class="table table-condensed table-hover">
|
1546 |
+
<tr>
|
1547 |
+
<td></td>
|
1548 |
+
<td>$templates </td>
|
1549 |
+
<td></td>
|
1550 |
+
</tr>
|
1551 |
+
<tr>
|
1552 |
+
<td></td>
|
1553 |
+
<td>$selection </td>
|
1554 |
+
<td></td>
|
1555 |
+
</tr>
|
1556 |
+
</table>
|
1557 |
+
|
1558 |
+
|
1559 |
+
<h4>Returns</h4>
|
1560 |
+
string
|
1561 |
+
— <p>HTML markup with select field options</p>
|
1562 |
+
|
1563 |
+
</article>
|
1564 |
+
</div>
|
1565 |
+
<aside class="span4 detailsbar">
|
1566 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1567 |
+
<span class="label label-info">static</span>
|
1568 |
+
<dl>
|
1569 |
+
</dl>
|
1570 |
+
<h2>Tags</h2>
|
1571 |
+
<table class="table table-condensed">
|
1572 |
+
<tr>
|
1573 |
+
<th>
|
1574 |
+
since
|
1575 |
+
</th>
|
1576 |
+
<td>
|
1577 |
+
1.90
|
1578 |
+
</td>
|
1579 |
+
</tr>
|
1580 |
+
</table>
|
1581 |
+
</aside>
|
1582 |
+
</div>
|
1583 |
+
|
1584 |
+
<div class="row-fluid">
|
1585 |
+
<div class="span8 content class">
|
1586 |
+
<a id="method__build_inline_edit_form" name="method__build_inline_edit_form" class="anchor"></a>
|
1587 |
+
<article class="method">
|
1588 |
+
<h3 class="private ">_build_inline_edit_form()</h3>
|
1589 |
+
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
1590 |
+
<pre class="signature" style="margin-right: 54px;">_build_inline_edit_form( <span class="argument">$MLAListTable</span>) : string</pre>
|
1591 |
+
<p><em>Build the hidden row templates for inline editing (quick and bulk edit)</em></p>
|
1592 |
+
<p>inspired by inline_edit() in wp-admin\includes\class-wp-posts-list-table.php.</p>
|
1593 |
+
|
1594 |
+
<h4>Parameters</h4>
|
1595 |
+
<table class="table table-condensed table-hover">
|
1596 |
+
<tr>
|
1597 |
+
<td></td>
|
1598 |
+
<td>$MLAListTable </td>
|
1599 |
+
<td></td>
|
1600 |
+
</tr>
|
1601 |
+
</table>
|
1602 |
+
|
1603 |
+
|
1604 |
+
<h4>Returns</h4>
|
1605 |
+
string
|
1606 |
+
— <p>HTML <form> markup for hidden rows</p>
|
1607 |
+
|
1608 |
+
</article>
|
1609 |
+
</div>
|
1610 |
+
<aside class="span4 detailsbar">
|
1611 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1612 |
+
<span class="label label-info">static</span>
|
1613 |
+
<dl>
|
1614 |
+
</dl>
|
1615 |
+
<h2>Tags</h2>
|
1616 |
+
<table class="table table-condensed">
|
1617 |
+
<tr>
|
1618 |
+
<th>
|
1619 |
+
since
|
1620 |
+
</th>
|
1621 |
+
<td>
|
1622 |
+
0.20
|
1623 |
+
</td>
|
1624 |
+
</tr>
|
1625 |
+
</table>
|
1626 |
+
</aside>
|
1627 |
+
</div>
|
1628 |
+
|
1629 |
+
<div class="row-fluid">
|
1630 |
+
<div class="span8 content class">
|
1631 |
+
<a id="method__current_bulk_action" name="method__current_bulk_action" class="anchor"></a>
|
1632 |
+
<article class="method">
|
1633 |
+
<h3 class="private ">_current_bulk_action()</h3>
|
1634 |
+
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
1635 |
+
<pre class="signature" style="margin-right: 54px;">_current_bulk_action() : string|false</pre>
|
1636 |
+
<p><em>Get the current action selected from the bulk actions dropdown</em></p>
|
1637 |
+
|
1638 |
+
|
1639 |
+
|
1640 |
+
|
1641 |
+
<h4>Returns</h4>
|
1642 |
+
string|false
|
1643 |
+
— <p>The action name or False if no action was selected</p>
|
1644 |
+
|
1645 |
+
</article>
|
1646 |
+
</div>
|
1647 |
+
<aside class="span4 detailsbar">
|
1648 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1649 |
+
<span class="label label-info">static</span>
|
1650 |
+
<dl>
|
1651 |
+
</dl>
|
1652 |
+
<h2>Tags</h2>
|
1653 |
+
<table class="table table-condensed">
|
1654 |
+
<tr>
|
1655 |
+
<th>
|
1656 |
+
since
|
1657 |
+
</th>
|
1658 |
+
<td>
|
1659 |
+
0.1
|
1660 |
+
</td>
|
1661 |
+
</tr>
|
1662 |
+
</table>
|
1663 |
+
</aside>
|
1664 |
+
</div>
|
1665 |
+
|
1666 |
+
<div class="row-fluid">
|
1667 |
+
<div class="span8 content class">
|
1668 |
+
<a id="method__delete_single_item" name="method__delete_single_item" class="anchor"></a>
|
1669 |
+
<article class="method">
|
1670 |
+
<h3 class="private ">_delete_single_item()</h3>
|
1671 |
+
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
1672 |
+
<pre class="signature" style="margin-right: 54px;">_delete_single_item( <span class="argument">$post_id</span>) : array</pre>
|
1673 |
+
<p><em>Delete a single item permanently</em></p>
|
1674 |
+
|
1675 |
+
|
1676 |
+
<h4>Parameters</h4>
|
1677 |
+
<table class="table table-condensed table-hover">
|
1678 |
+
<tr>
|
1679 |
+
<td></td>
|
1680 |
+
<td>$post_id </td>
|
1681 |
+
<td></td>
|
1682 |
+
</tr>
|
1683 |
+
</table>
|
1684 |
+
|
1685 |
+
|
1686 |
+
<h4>Returns</h4>
|
1687 |
+
array
|
1688 |
+
— <p>success/failure message and NULL content</p>
|
1689 |
+
|
1690 |
+
</article>
|
1691 |
+
</div>
|
1692 |
+
<aside class="span4 detailsbar">
|
1693 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1694 |
+
<span class="label label-info">static</span>
|
1695 |
+
<dl>
|
1696 |
+
</dl>
|
1697 |
+
<h2>Tags</h2>
|
1698 |
+
<table class="table table-condensed">
|
1699 |
+
<tr>
|
1700 |
+
<th>
|
1701 |
+
since
|
1702 |
+
</th>
|
1703 |
+
<td>
|
1704 |
+
0.1
|
1705 |
+
</td>
|
1706 |
+
</tr>
|
1707 |
+
</table>
|
1708 |
+
</aside>
|
1709 |
+
</div>
|
1710 |
+
|
1711 |
+
<div class="row-fluid">
|
1712 |
+
<div class="span8 content class">
|
1713 |
+
<a id="method__restore_single_item" name="method__restore_single_item" class="anchor"></a>
|
1714 |
+
<article class="method">
|
1715 |
+
<h3 class="private ">_restore_single_item()</h3>
|
1716 |
+
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
1717 |
+
<pre class="signature" style="margin-right: 54px;">_restore_single_item( <span class="argument">$post_id</span>) : array</pre>
|
1718 |
+
<p><em>Restore a single item from the Trash</em></p>
|
1719 |
+
|
1720 |
+
|
1721 |
+
<h4>Parameters</h4>
|
1722 |
+
<table class="table table-condensed table-hover">
|
1723 |
+
<tr>
|
1724 |
+
<td></td>
|
1725 |
+
<td>$post_id </td>
|
1726 |
+
<td></td>
|
1727 |
+
</tr>
|
1728 |
+
</table>
|
1729 |
+
|
1730 |
+
|
1731 |
+
<h4>Returns</h4>
|
1732 |
+
array
|
1733 |
+
— <p>success/failure message and NULL content</p>
|
1734 |
+
|
1735 |
+
</article>
|
1736 |
+
</div>
|
1737 |
+
<aside class="span4 detailsbar">
|
1738 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1739 |
+
<span class="label label-info">static</span>
|
1740 |
+
<dl>
|
1741 |
+
</dl>
|
1742 |
+
<h2>Tags</h2>
|
1743 |
+
<table class="table table-condensed">
|
1744 |
+
<tr>
|
1745 |
+
<th>
|
1746 |
+
since
|
1747 |
+
</th>
|
1748 |
+
<td>
|
1749 |
+
0.1
|
1750 |
+
</td>
|
1751 |
+
</tr>
|
1752 |
+
</table>
|
1753 |
+
</aside>
|
1754 |
+
</div>
|
1755 |
+
|
1756 |
+
<div class="row-fluid">
|
1757 |
+
<div class="span8 content class">
|
1758 |
+
<a id="method__trash_single_item" name="method__trash_single_item" class="anchor"></a>
|
1759 |
+
<article class="method">
|
1760 |
+
<h3 class="private ">_trash_single_item()</h3>
|
1761 |
+
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
1762 |
+
<pre class="signature" style="margin-right: 54px;">_trash_single_item( <span class="argument">$post_id</span>) : array</pre>
|
1763 |
+
<p><em>Move a single item to Trash</em></p>
|
1764 |
+
|
1765 |
+
|
1766 |
+
<h4>Parameters</h4>
|
1767 |
+
<table class="table table-condensed table-hover">
|
1768 |
+
<tr>
|
1769 |
+
<td></td>
|
1770 |
+
<td>$post_id </td>
|
1771 |
+
<td></td>
|
1772 |
+
</tr>
|
1773 |
+
</table>
|
1774 |
+
|
1775 |
+
|
1776 |
+
<h4>Returns</h4>
|
1777 |
+
array
|
1778 |
+
— <p>success/failure message and NULL content</p>
|
1779 |
+
|
1780 |
+
</article>
|
1781 |
+
</div>
|
1782 |
+
<aside class="span4 detailsbar">
|
1783 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1784 |
+
<span class="label label-info">static</span>
|
1785 |
+
<dl>
|
1786 |
+
</dl>
|
1787 |
+
<h2>Tags</h2>
|
1788 |
+
<table class="table table-condensed">
|
1789 |
+
<tr>
|
1790 |
+
<th>
|
1791 |
+
since
|
1792 |
+
</th>
|
1793 |
+
<td>
|
1794 |
+
0.1
|
1795 |
+
</td>
|
1796 |
+
</tr>
|
1797 |
+
</table>
|
1798 |
+
</aside>
|
1799 |
+
</div>
|
1800 |
+
|
1801 |
+
</div>
|
1802 |
+
</section>
|
1803 |
+
|
1804 |
+
<div id="source-view" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="source-view-label" aria-hidden="true">
|
1805 |
+
<div class="modal-header">
|
1806 |
+
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
1807 |
+
<h3 id="source-view-label">class-mla-main.php</h3>
|
1808 |
+
</div>
|
1809 |
+
<div class="modal-body">
|
1810 |
+
<pre data-src="../files/includes\class-mla-main.php.txt" class="language-php line-numbers"></pre>
|
1811 |
+
</div>
|
1812 |
+
</div>
|
1813 |
+
|
1814 |
+
<footer class="row-fluid">
|
1815 |
+
<section class="span10 offset2">
|
1816 |
+
<section class="row-fluid">
|
1817 |
+
<section class="span10 offset1">
|
1818 |
+
<section class="row-fluid footer-sections">
|
1819 |
+
<section class="span4">
|
1820 |
+
<h1><i class="icon-code"></i></h1>
|
1821 |
+
<div>
|
1822 |
+
<ul>
|
1823 |
+
</ul>
|
1824 |
+
</div>
|
1825 |
+
</section>
|
1826 |
+
<section class="span4">
|
1827 |
+
<h1><i class="icon-bar-chart"></i></h1>
|
1828 |
+
<div>
|
1829 |
+
<ul>
|
1830 |
+
<li><a href="../graphs/class.html">Class Hierarchy Diagram</a></li>
|
1831 |
+
</ul>
|
1832 |
+
</div>
|
1833 |
+
</section>
|
1834 |
+
<section class="span4">
|
1835 |
+
<h1><i class="icon-pushpin"></i></h1>
|
1836 |
+
<div>
|
1837 |
+
<ul>
|
1838 |
+
<li><a href="../reports/errors.html">Errors</a></li>
|
1839 |
+
<li><a href="../reports/markers.html">Markers</a></li>
|
1840 |
+
</ul>
|
1841 |
+
</div>
|
1842 |
+
</section>
|
1843 |
+
</section>
|
1844 |
+
</section>
|
1845 |
+
</section>
|
1846 |
+
<section class="row-fluid">
|
1847 |
+
<section class="span10 offset1">
|
1848 |
+
<hr />
|
1849 |
+
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
1850 |
+
on August 12th, 2016 at 21:22.
|
1851 |
+
</section>
|
1852 |
+
</section>
|
1853 |
+
</section>
|
1854 |
+
</footer>
|
1855 |
</div>
|
1856 |
+
|
1857 |
</body>
|
1858 |
</html>
|
phpDocs/classes/MLACore.html
CHANGED
@@ -1,951 +1,2351 @@
|
|
1 |
-
<!DOCTYPE html
|
|
|
2 |
<head>
|
3 |
-
<meta
|
4 |
-
<meta
|
5 |
-
<
|
6 |
-
<
|
7 |
-
<meta name="
|
8 |
-
|
9 |
-
<link href="../css/
|
10 |
-
<
|
11 |
-
<link rel="
|
12 |
-
<link
|
13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
</head>
|
15 |
<body>
|
|
|
16 |
<div class="navbar navbar-fixed-top">
|
17 |
-
<div class="navbar-inner"
|
18 |
-
<
|
19 |
-
<
|
20 |
-
<
|
21 |
-
|
22 |
-
<
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
<li class="dropdown" id="charts-menu">
|
27 |
-
<a href="#
|
28 |
-
|
29 |
-
</
|
30 |
-
<
|
31 |
-
<
|
32 |
-
|
33 |
-
<
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
<
|
40 |
-
|
41 |
-
</
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
<
|
46 |
-
</
|
47 |
-
|
48 |
-
<
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
<
|
54 |
-
<
|
55 |
-
<
|
56 |
-
</
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
<li class="method public "><a href="#mla_debug_flush" title="mla_debug_flush :: Flush debug information and clear buffer"><span class="description">Flush debug information and clear buffer</span><pre>mla_debug_flush()</pre></a></li>
|
68 |
-
<li class="method public "><a href="#mla_debug_mode" title="mla_debug_mode :: Get/Set debug information collection mode"><span class="description">Get/Set debug information collection mode</span><pre>mla_debug_mode()</pre></a></li>
|
69 |
-
<li class="method public "><a href="#mla_delete_option" title="mla_delete_option :: Delete the stored value of a defined MLA option"><span class="description">Delete the stored value of a defined MLA option</span><pre>mla_delete_option()</pre></a></li>
|
70 |
-
<li class="method public "><a href="#mla_get_option" title="mla_get_option :: Return the stored value or default value of a defined MLA option"><span class="description">Return the stored value or default value of a defined MLA option</span><pre>mla_get_option()</pre></a></li>
|
71 |
-
<li class="method public "><a href="#mla_initialize_tax_checked_on_top" title='mla_initialize_tax_checked_on_top :: Initialize "tax_checked_on_top" => "checked" default for all supported taxonomies'><span class="description">Initialize "tax_checked_on_top" => "checked" default for all supported taxonomies</span><pre>mla_initialize_tax_checked_on_top()</pre></a></li>
|
72 |
-
<li class="method public "><a href="#mla_load_template" title="mla_load_template :: Load an HTML template from a file"><span class="description">Load an HTML template from a file</span><pre>mla_load_template()</pre></a></li>
|
73 |
-
<li class="method public "><a href="#mla_media_view_settings_filter" title="mla_media_view_settings_filter :: Ensures that MLA media manager enhancements are present when required."><span class="description">Ensures that MLA media manager enhancements are present when required.</span><pre>mla_media_view_settings_filter()</pre></a></li>
|
74 |
-
<li class="method public "><a href="#mla_parse_view_specification" title="mla_parse_view_specification :: Analyze a Library View/Post MIME Type specification, returning an array of the placeholders it contains"><span class="description">Analyze a Library View/Post MIME Type specification, returning an array of the placeholders it contains</span><pre>mla_parse_view_specification()</pre></a></li>
|
75 |
-
<li class="method public "><a href="#mla_plugins_loaded_action" title="mla_plugins_loaded_action :: Load a plugin text domain and alternate debug file"><span class="description">Load a plugin text domain and alternate debug file</span><pre>mla_plugins_loaded_action()</pre></a></li>
|
76 |
-
<li class="method public "><a href="#mla_prepare_view_query" title="mla_prepare_view_query :: Convert a Library View/Post MIME Type specification to WP_Query parameters"><span class="description">Convert a Library View/Post MIME Type specification to WP_Query parameters</span><pre>mla_prepare_view_query()</pre></a></li>
|
77 |
-
<li class="method public "><a href="#mla_supported_taxonomies" title="mla_supported_taxonomies :: Returns an array of taxonomy names assigned to $support_type"><span class="description">Returns an array of taxonomy names assigned to $support_type</span><pre>mla_supported_taxonomies()</pre></a></li>
|
78 |
-
<li class="method public "><a href="#mla_taxonomy_support" title="mla_taxonomy_support :: Determine MLA support for a taxonomy, handling the special case where the
|
79 |
-
settings are being updated or reset."><span class="description">Determine MLA support for a taxonomy, handling the special case where the
|
80 |
-
settings are being updated or reset.</span><pre>mla_taxonomy_support()</pre></a></li>
|
81 |
-
<li class="method public "><a href="#mla_update_option" title="mla_update_option :: Add or update the stored value of a defined MLA option"><span class="description">Add or update the stored value of a defined MLA option</span><pre>mla_update_option()</pre></a></li>
|
82 |
-
<li class="method public "><a href="#mla_wp_enqueue_media_action" title="mla_wp_enqueue_media_action :: Registers and enqueues the mla-beaver-builder-style.css file, when needed."><span class="description">Registers and enqueues the mla-beaver-builder-style.css file, when needed.</span><pre>mla_wp_enqueue_media_action()</pre></a></li>
|
83 |
-
<li class="method public "><a href="#mla_wp_redirect_filter" title="mla_wp_redirect_filter :: Filter the redirect location."><span class="description">Filter the redirect location.</span><pre>mla_wp_redirect_filter()</pre></a></li>
|
84 |
-
<li class="nav-header private">» Private</li>
|
85 |
-
<li class="method private "><a href="#_debug_log" title="_debug_log :: Write a debug message to the appropriate log file"><span class="description">Write a debug message to the appropriate log file</span><pre>_debug_log()</pre></a></li>
|
86 |
-
<li class="nav-header">
|
87 |
-
<i class="icon-custom icon-property"></i> Properties</li>
|
88 |
-
<li class="property public "><a href="#%24admin_columns_storage_model" title="$admin_columns_storage_model :: Admin Columns support storage model object for the Media/Assistant submenu"><span class="description">Admin Columns support storage model object for the Media/Assistant submenu</span><pre>$admin_columns_storage_model</pre></a></li>
|
89 |
-
<li class="property public "><a href="#%24mla_debug_level" title="$mla_debug_level :: Effective MLA Debug Level, from MLA_DEBUG_LEVEL or override option"><span class="description">Effective MLA Debug Level, from MLA_DEBUG_LEVEL or override option</span><pre>$mla_debug_level</pre></a></li>
|
90 |
-
<li class="property public "><a href="#%24original_php_log" title="$original_php_log :: Original PHP error_log path and file"><span class="description">Original PHP error_log path and file</span><pre>$original_php_log</pre></a></li>
|
91 |
-
<li class="property public "><a href="#%24original_php_reporting" title="$original_php_reporting :: Original PHP error_reporting value"><span class="description">Original PHP error_reporting value</span><pre>$original_php_reporting</pre></a></li>
|
92 |
-
<li class="property public "><a href="#%24process_featured_in" title='$process_featured_in :: Option setting for "Featured in" reporting'><span class="description">Option setting for "Featured in" reporting</span><pre>$process_featured_in</pre></a></li>
|
93 |
-
<li class="property public "><a href="#%24process_gallery_in" title='$process_gallery_in :: Option setting for "Gallery in" reporting'><span class="description">Option setting for "Gallery in" reporting</span><pre>$process_gallery_in</pre></a></li>
|
94 |
-
<li class="property public "><a href="#%24process_inserted_in" title='$process_inserted_in :: Option setting for "Inserted in" reporting'><span class="description">Option setting for "Inserted in" reporting</span><pre>$process_inserted_in</pre></a></li>
|
95 |
-
<li class="property public "><a href="#%24process_mla_gallery_in" title='$process_mla_gallery_in :: Option setting for "MLA Gallery in" reporting'><span class="description">Option setting for "MLA Gallery in" reporting</span><pre>$process_mla_gallery_in</pre></a></li>
|
96 |
-
<li class="nav-header private">» Private</li>
|
97 |
-
<li class="property private "><a href="#%24mla_debug_file" title="$mla_debug_file :: Debug information output file for mode = 'log'"><span class="description">Debug information output file for mode = 'log'</span><pre>$mla_debug_file</pre></a></li>
|
98 |
-
<li class="property private "><a href="#%24mla_debug_messages" title="$mla_debug_messages :: Accumulates debug messages"><span class="description">Accumulates debug messages</span><pre>$mla_debug_messages</pre></a></li>
|
99 |
-
<li class="property private "><a href="#%24mla_debug_mode" title="$mla_debug_mode :: Debug information collection mode"><span class="description">Debug information collection mode</span><pre>$mla_debug_mode</pre></a></li>
|
100 |
-
<li class="nav-header">
|
101 |
-
<i class="icon-custom icon-constant"></i> Constants</li>
|
102 |
-
<li class="constant "><a href="#ADMIN_PAGE_SLUG" title="ADMIN_PAGE_SLUG :: Slug for adding plugin submenu"><span class="description">Slug for adding plugin submenu</span><pre>ADMIN_PAGE_SLUG</pre></a></li>
|
103 |
-
<li class="constant "><a href="#CURRENT_MLA_VERSION" title="CURRENT_MLA_VERSION :: Current version number (moved from class-mla-main.php)"><span class="description">Current version number (moved from class-mla-main.php)</span><pre>CURRENT_MLA_VERSION</pre></a></li>
|
104 |
-
<li class="constant "><a href="#JAVASCRIPT_FILL_COMPAT_ACTION" title='JAVASCRIPT_FILL_COMPAT_ACTION :: Slug for the "fill compat-attachment-fields" action - Add Media and related dialogs'><span class="description">Slug for the "fill compat-attachment-fields" action - Add Media and related dialogs</span><pre>JAVASCRIPT_FILL_COMPAT_ACTION</pre></a></li>
|
105 |
-
<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>
|
106 |
-
<li class="constant "><a href="#JAVASCRIPT_QUERY_ATTACHMENTS_ACTION" title='JAVASCRIPT_QUERY_ATTACHMENTS_ACTION :: Slug for the "query attachments" action - Add Media and related dialogs'><span class="description">Slug for the "query attachments" action - Add Media and related dialogs</span><pre>JAVASCRIPT_QUERY_ATTACHMENTS_ACTION</pre></a></li>
|
107 |
-
<li class="constant "><a href="#JAVASCRIPT_UPDATE_COMPAT_ACTION" title='JAVASCRIPT_UPDATE_COMPAT_ACTION :: Slug for the "update compat-attachment-fields" action - Add Media and related dialogs'><span class="description">Slug for the "update compat-attachment-fields" action - Add Media and related dialogs</span><pre>JAVASCRIPT_UPDATE_COMPAT_ACTION</pre></a></li>
|
108 |
-
<li class="constant "><a href="#MLA_ADMIN_NONCE_ACTION" title="MLA_ADMIN_NONCE_ACTION :: Action name; gives a context for the nonce"><span class="description">Action name; gives a context for the nonce</span><pre>MLA_ADMIN_NONCE_ACTION</pre></a></li>
|
109 |
-
<li class="constant "><a href="#MLA_ADMIN_NONCE_NAME" title="MLA_ADMIN_NONCE_NAME :: Nonce name; uniquely identifies the nonce"><span class="description">Nonce name; uniquely identifies the nonce</span><pre>MLA_ADMIN_NONCE_NAME</pre></a></li>
|
110 |
-
<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>
|
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>
|
112 |
-
<li class="constant "><a href="#MLA_ADMIN_SINGLE_TRASH" title="MLA_ADMIN_SINGLE_TRASH :: mla_admin_action value for moving a single item to the trash"><span class="description">mla_admin_action value for moving a single item to the trash</span><pre>MLA_ADMIN_SINGLE_TRASH</pre></a></li>
|
113 |
-
<li class="constant "><a href="#MLA_DEBUG_CATEGORY_AJAX" title="MLA_DEBUG_CATEGORY_AJAX :: Constant to log Ajax debug activity"><span class="description">Constant to log Ajax debug activity</span><pre>MLA_DEBUG_CATEGORY_AJAX</pre></a></li>
|
114 |
-
<li class="constant "><a href="#MLA_DEBUG_CATEGORY_ANY" title='MLA_DEBUG_CATEGORY_ANY :: Constant to log "any" debug activity'><span class="description">Constant to log "any" debug activity</span><pre>MLA_DEBUG_CATEGORY_ANY</pre></a></li>
|
115 |
-
<li class="constant "><a href="#MLA_DEBUG_CATEGORY_LANGUAGE" title="MLA_DEBUG_CATEGORY_LANGUAGE :: Constant to log WPML/Polylang action/filter activity"><span class="description">Constant to log WPML/Polylang action/filter activity</span><pre>MLA_DEBUG_CATEGORY_LANGUAGE</pre></a></li>
|
116 |
-
<li class="constant "><a href="#MLA_DEBUG_CATEGORY_THUMBNAIL" title="MLA_DEBUG_CATEGORY_THUMBNAIL :: Constant to log Ghostscript/Imagick activity"><span class="description">Constant to log Ghostscript/Imagick activity</span><pre>MLA_DEBUG_CATEGORY_THUMBNAIL</pre></a></li>
|
117 |
-
<li class="constant "><a href="#STYLESHEET_SLUG" title="STYLESHEET_SLUG :: Slug for registering and enqueueing plugin style sheets (moved from class-mla-main.php)"><span class="description">Slug for registering and enqueueing plugin style sheets (moved from class-mla-main.php)</span><pre>STYLESHEET_SLUG</pre></a></li>
|
118 |
-
</ul>
|
119 |
-
</div>
|
120 |
-
<div class="span8">
|
121 |
-
<a name="%5CMLACore" id="\MLACore"></a><ul class="breadcrumb">
|
122 |
-
<li>
|
123 |
-
<a href="../index.html"><i class="icon-custom icon-class"></i></a><span class="divider">\</span>
|
124 |
-
</li>
|
125 |
-
<li><a href="../namespaces/global.html">global</a></li>
|
126 |
-
<li class="active">
|
127 |
-
<span class="divider">\</span><a href="../classes/MLACore.html">MLACore</a>
|
128 |
-
</li>
|
129 |
-
</ul>
|
130 |
-
<div href="../classes/MLACore.html" class="element class">
|
131 |
-
<p class="short_description">Class MLA (Media Library Assistant) Core is the minimum support required for all other MLA features</p>
|
132 |
-
<div class="details">
|
133 |
-
<p class="long_description"></p>
|
134 |
-
<table class="table table-bordered">
|
135 |
-
<tr>
|
136 |
-
<th>package</th>
|
137 |
-
<td><a href="../packages/Media%20Library%20Assistant.html">Media Library Assistant</a></td>
|
138 |
-
</tr>
|
139 |
-
<tr>
|
140 |
-
<th>since</th>
|
141 |
-
<td>2.20</td>
|
142 |
-
</tr>
|
143 |
-
</table>
|
144 |
-
<h3>
|
145 |
-
<i class="icon-custom icon-method"></i> Methods</h3>
|
146 |
-
<a name="admin_columns_support" id="admin_columns_support"></a><div class="element clickable method public admin_columns_support" data-toggle="collapse" data-target=".admin_columns_support .collapse">
|
147 |
-
<h2>Define the Media/Assistant submenu screen to the Admin Columns plugin</h2>
|
148 |
-
<pre>admin_columns_support(array $storage_models, object $cpac) </pre>
|
149 |
-
<div class="labels"></div>
|
150 |
-
<div class="row collapse"><div class="detail-description">
|
151 |
-
<p class="long_description"></p>
|
152 |
-
<table class="table table-bordered"><tr>
|
153 |
-
<th>since</th>
|
154 |
-
<td>2.22</td>
|
155 |
-
</tr></table>
|
156 |
-
<h3>Parameters</h3>
|
157 |
-
<div class="subelement argument">
|
158 |
-
<h4>$storage_models</h4>
|
159 |
-
<code>array</code><p>List of storage model class instances ( [key] => [CPAC_Storage_Model object] )</p>
|
160 |
-
</div>
|
161 |
-
<div class="subelement argument">
|
162 |
-
<h4>$cpac</h4>
|
163 |
-
<code>object</code><p>CPAC, the root CodePress Admin Columns object</p></div>
|
164 |
-
</div></div>
|
165 |
-
</div>
|
166 |
-
<a name="initialize" id="initialize"></a><div class="element clickable method public initialize" data-toggle="collapse" data-target=".initialize .collapse">
|
167 |
-
<h2>Initialization function, similar to __construct()</h2>
|
168 |
-
<pre>initialize() : void</pre>
|
169 |
-
<div class="labels"></div>
|
170 |
-
<div class="row collapse"><div class="detail-description">
|
171 |
-
<p class="long_description"></p>
|
172 |
-
<table class="table table-bordered"><tr>
|
173 |
-
<th>since</th>
|
174 |
-
<td>1.00</td>
|
175 |
-
</tr></table>
|
176 |
-
</div></div>
|
177 |
-
</div>
|
178 |
-
<a name="mla_checklist_meta_box" id="mla_checklist_meta_box"></a><div class="element clickable method public mla_checklist_meta_box" data-toggle="collapse" data-target=".mla_checklist_meta_box .collapse">
|
179 |
-
<h2>Display taxonomy "checklist" form fields</h2>
|
180 |
-
<pre>mla_checklist_meta_box(object $target_post, array $box) : void</pre>
|
181 |
-
<div class="labels"></div>
|
182 |
-
<div class="row collapse"><div class="detail-description">
|
183 |
-
<p class="long_description"><p>Adapted from /wp-admin/includes/ajax-actions.php function _wp_ajax_add_hierarchical_term().
|
184 |
-
Includes the "? Search" area to filter the term checklist by entering part
|
185 |
-
or all of a word/phrase in the term label.
|
186 |
-
Output to the Media/Edit Media screen and to the Media Manager Modal Window.</p></p>
|
187 |
-
<table class="table table-bordered"><tr>
|
188 |
-
<th>since</th>
|
189 |
-
<td>1.71</td>
|
190 |
-
</tr></table>
|
191 |
-
<h3>Parameters</h3>
|
192 |
-
<div class="subelement argument">
|
193 |
-
<h4>$target_post</h4>
|
194 |
-
<code>object</code><p>The current post</p></div>
|
195 |
-
<div class="subelement argument">
|
196 |
-
<h4>$box</h4>
|
197 |
-
<code>array</code><p>The meta box parameters</p></div>
|
198 |
-
</div></div>
|
199 |
-
</div>
|
200 |
-
<a name="mla_custom_field_support" id="mla_custom_field_support"></a><div class="element clickable method public mla_custom_field_support" data-toggle="collapse" data-target=".mla_custom_field_support .collapse">
|
201 |
-
<h2>Evaluate support information for custom field mapping</h2>
|
202 |
-
<pre>mla_custom_field_support(string $support_type) : array</pre>
|
203 |
-
<div class="labels"></div>
|
204 |
-
<div class="row collapse"><div class="detail-description">
|
205 |
-
<p class="long_description"></p>
|
206 |
-
<table class="table table-bordered"><tr>
|
207 |
-
<th>since</th>
|
208 |
-
<td>1.10</td>
|
209 |
-
</tr></table>
|
210 |
-
<h3>Parameters</h3>
|
211 |
-
<div class="subelement argument">
|
212 |
-
<h4>$support_type</h4>
|
213 |
-
<code>string</code><p>array format; 'default_columns' (default), 'default_hidden_columns', 'default_sortable_columns', 'quick_edit' or 'bulk_edit'</p>
|
214 |
-
</div>
|
215 |
-
<h3>Returns</h3>
|
216 |
-
<div class="subelement response">
|
217 |
-
<code>array</code>default, hidden, sortable quick_edit or bulk_edit colums in appropriate format</div>
|
218 |
-
</div></div>
|
219 |
-
</div>
|
220 |
-
<a name="mla_debug_add" id="mla_debug_add"></a><div class="element clickable method public mla_debug_add" data-toggle="collapse" data-target=".mla_debug_add .collapse">
|
221 |
-
<h2>Add a debug message to the collection</h2>
|
222 |
-
<pre>mla_debug_add(string $message, integer $debug_level) </pre>
|
223 |
-
<div class="labels"></div>
|
224 |
-
<div class="row collapse"><div class="detail-description">
|
225 |
-
<p class="long_description"></p>
|
226 |
-
<table class="table table-bordered"><tr>
|
227 |
-
<th>since</th>
|
228 |
-
<td>2.12</td>
|
229 |
-
</tr></table>
|
230 |
-
<h3>Parameters</h3>
|
231 |
-
<div class="subelement argument">
|
232 |
-
<h4>$message</h4>
|
233 |
-
<code>string</code><p>Message text</p></div>
|
234 |
-
<div class="subelement argument">
|
235 |
-
<h4>$debug_level</h4>
|
236 |
-
<code>integer</code><p>Optional. Debug category.</p></div>
|
237 |
-
</div></div>
|
238 |
-
</div>
|
239 |
-
<a name="mla_debug_content" id="mla_debug_content"></a><div class="element clickable method public mla_debug_content" data-toggle="collapse" data-target=".mla_debug_content .collapse">
|
240 |
-
<h2>Get debug information without clearing the buffer</h2>
|
241 |
-
<pre>mla_debug_content(string $format, string $glue) : boolean</pre>
|
242 |
-
<div class="labels"></div>
|
243 |
-
<div class="row collapse"><div class="detail-description">
|
244 |
-
<p class="long_description"></p>
|
245 |
-
<table class="table table-bordered"><tr>
|
246 |
-
<th>since</th>
|
247 |
-
<td>2.12</td>
|
248 |
-
</tr></table>
|
249 |
-
<h3>Parameters</h3>
|
250 |
-
<div class="subelement argument">
|
251 |
-
<h4>$format</h4>
|
252 |
-
<code>string</code><p>Return data type: 'string' (default) or 'array'</p>
|
253 |
</div>
|
254 |
-
<div class="subelement argument">
|
255 |
-
<h4>$glue</h4>
|
256 |
-
<code>string</code><p>Join array elements with '\n' or '</p>
|
257 |
|
258 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
259 |
|
260 |
-
|
261 |
-
|
262 |
-
<
|
263 |
-
<
|
264 |
-
<
|
265 |
-
</
|
266 |
-
</
|
267 |
-
<
|
268 |
-
<
|
269 |
-
<
|
270 |
-
<
|
271 |
-
<
|
272 |
-
<
|
273 |
-
|
274 |
-
<
|
275 |
-
<
|
276 |
-
<
|
277 |
-
</
|
278 |
-
<
|
279 |
-
<
|
280 |
-
<
|
281 |
-
<
|
282 |
-
</
|
283 |
-
<
|
284 |
-
<
|
285 |
-
<
|
286 |
-
</
|
287 |
-
</
|
288 |
-
<
|
289 |
-
<
|
290 |
-
<
|
291 |
-
<
|
292 |
-
<
|
293 |
-
<
|
294 |
-
<
|
295 |
-
<
|
296 |
-
<
|
297 |
-
</
|
298 |
-
<
|
299 |
-
<
|
300 |
-
|
301 |
-
|
302 |
-
</div>
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
</div>
|
307 |
-
|
308 |
-
<
|
309 |
-
<
|
310 |
-
|
311 |
-
|
312 |
-
<
|
313 |
-
<
|
314 |
-
|
315 |
-
<
|
316 |
-
|
317 |
-
<
|
318 |
-
<
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
<
|
323 |
-
<
|
324 |
-
<
|
325 |
-
<
|
326 |
-
</
|
327 |
-
|
328 |
-
<
|
329 |
-
<
|
330 |
-
</
|
331 |
-
|
332 |
-
<a
|
333 |
-
|
334 |
-
|
335 |
-
<
|
336 |
-
<
|
337 |
-
<
|
338 |
-
<
|
339 |
-
<
|
340 |
-
<
|
341 |
-
</
|
342 |
-
<
|
343 |
-
<
|
344 |
-
<
|
345 |
-
<
|
346 |
-
<
|
347 |
-
<
|
348 |
-
<
|
349 |
-
<
|
350 |
-
<
|
351 |
-
<
|
352 |
-
</
|
353 |
-
</
|
354 |
-
<a
|
355 |
-
<
|
356 |
-
<
|
357 |
-
<
|
358 |
-
<
|
359 |
-
<
|
360 |
-
<
|
361 |
-
|
362 |
-
<
|
363 |
-
</
|
364 |
-
<
|
365 |
-
<
|
366 |
-
<
|
367 |
-
<
|
368 |
-
<
|
369 |
-
<
|
370 |
-
<
|
371 |
-
|
372 |
-
<
|
373 |
-
<
|
374 |
-
<
|
375 |
-
<
|
376 |
-
<
|
377 |
-
<
|
378 |
-
<
|
379 |
-
<
|
380 |
-
</
|
381 |
-
</
|
382 |
-
<a
|
383 |
-
<
|
384 |
-
<
|
385 |
-
<
|
386 |
-
<
|
387 |
-
<
|
388 |
-
<
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
</
|
394 |
-
|
395 |
-
<
|
396 |
-
<
|
397 |
-
|
398 |
-
<
|
399 |
-
<
|
400 |
-
|
401 |
-
|
402 |
-
<
|
403 |
-
<
|
404 |
-
<
|
405 |
-
</
|
406 |
-
<
|
407 |
-
<
|
408 |
-
<
|
409 |
-
<
|
410 |
-
</
|
411 |
-
<
|
412 |
-
<
|
413 |
-
|
414 |
-
</
|
415 |
-
|
416 |
-
|
417 |
-
<
|
418 |
-
|
419 |
-
|
420 |
-
<
|
421 |
-
<
|
422 |
-
<
|
423 |
-
<
|
424 |
-
<
|
425 |
-
<
|
426 |
-
<
|
427 |
-
<
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
</
|
435 |
-
<
|
436 |
-
<
|
437 |
-
<
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
<
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
<
|
451 |
-
<div class="
|
452 |
-
<
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
<
|
458 |
-
|
459 |
-
|
460 |
-
<
|
461 |
-
<
|
462 |
-
<pre>
|
463 |
-
<
|
464 |
-
|
465 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
466 |
function above doesn't run in time.
|
467 |
-
Defined as public because it's an action.</p
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
</
|
473 |
-
</div>
|
474 |
-
<
|
475 |
-
<
|
476 |
-
<
|
477 |
-
<
|
478 |
-
|
479 |
-
<
|
480 |
-
<table class="table table-
|
481 |
-
<
|
482 |
-
<
|
483 |
-
|
484 |
-
|
485 |
-
<
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
</div>
|
492 |
-
|
493 |
-
<div class="
|
494 |
-
<
|
495 |
-
|
496 |
-
|
497 |
-
<
|
498 |
-
<
|
499 |
-
<pre>
|
500 |
-
<
|
501 |
-
|
502 |
-
|
503 |
-
<
|
504 |
-
<
|
505 |
-
<
|
506 |
-
|
507 |
-
<
|
508 |
-
<
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
</div
|
516 |
-
|
517 |
-
<
|
518 |
-
<
|
519 |
-
|
520 |
-
|
521 |
-
<
|
522 |
-
<
|
523 |
-
<
|
524 |
-
<
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
<
|
537 |
-
<
|
538 |
-
<
|
539 |
-
</
|
540 |
-
|
541 |
-
<
|
542 |
-
<
|
543 |
-
<
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
</
|
551 |
-
|
552 |
-
<
|
553 |
-
<
|
554 |
-
<
|
555 |
-
<
|
556 |
-
|
557 |
-
<
|
558 |
-
<
|
559 |
-
<
|
560 |
-
<
|
561 |
-
|
562 |
-
|
563 |
-
<
|
564 |
-
|
565 |
-
</
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
<
|
572 |
-
<
|
573 |
-
<
|
574 |
-
<
|
575 |
-
</
|
576 |
-
|
577 |
-
</
|
578 |
-
<
|
579 |
-
|
580 |
-
|
581 |
-
<
|
582 |
-
<
|
583 |
-
<
|
584 |
-
<
|
585 |
-
<
|
586 |
-
<td>
|
587 |
-
</tr
|
588 |
-
<
|
589 |
-
<
|
590 |
-
<
|
591 |
-
<
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
<
|
600 |
-
<
|
601 |
-
<
|
602 |
-
<
|
603 |
-
|
604 |
-
<
|
605 |
-
<
|
606 |
-
|
607 |
-
<
|
608 |
-
|
609 |
-
|
610 |
-
<
|
611 |
-
|
612 |
-
</
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
<div class="
|
619 |
-
<div class="
|
620 |
-
<
|
621 |
-
<
|
622 |
-
<
|
623 |
-
<
|
624 |
-
</
|
625 |
-
</
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
<
|
634 |
-
<
|
635 |
-
<
|
636 |
-
|
637 |
-
</
|
638 |
-
</
|
639 |
-
<
|
640 |
-
<
|
641 |
-
<
|
642 |
-
|
643 |
-
|
644 |
-
<
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
</
|
649 |
-
</
|
650 |
-
</div>
|
651 |
-
|
652 |
-
<
|
653 |
-
<
|
654 |
-
<
|
655 |
-
<
|
656 |
-
<
|
657 |
-
<
|
658 |
-
<
|
659 |
-
<
|
660 |
-
|
661 |
-
|
662 |
-
</
|
663 |
-
<
|
664 |
-
<
|
665 |
-
<
|
666 |
-
<
|
667 |
-
<
|
668 |
-
|
669 |
-
<
|
670 |
-
<
|
671 |
-
<td
|
672 |
-
|
673 |
-
</
|
674 |
-
|
675 |
-
<
|
676 |
-
<
|
677 |
-
<
|
678 |
-
|
679 |
-
<
|
680 |
-
<
|
681 |
-
<
|
682 |
-
<
|
683 |
-
|
684 |
-
</
|
685 |
-
|
686 |
-
|
687 |
-
<
|
688 |
-
|
689 |
-
<
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
<
|
694 |
-
<
|
695 |
-
<
|
696 |
-
|
697 |
-
</
|
698 |
-
</
|
699 |
-
<
|
700 |
-
<
|
701 |
-
<
|
702 |
-
|
703 |
-
|
704 |
-
<
|
705 |
-
|
706 |
-
|
707 |
-
|
708 |
-
</
|
709 |
-
</
|
710 |
-
</div>
|
711 |
-
|
712 |
-
<
|
713 |
-
<
|
714 |
-
<
|
715 |
-
<
|
716 |
-
<
|
717 |
-
<
|
718 |
-
<
|
719 |
-
<
|
720 |
-
|
721 |
-
|
722 |
-
</
|
723 |
-
<
|
724 |
-
<
|
725 |
-
<
|
726 |
-
<
|
727 |
-
<
|
728 |
-
|
729 |
-
<
|
730 |
-
<
|
731 |
-
<td
|
732 |
-
|
733 |
-
</
|
734 |
-
|
735 |
-
<
|
736 |
-
<
|
737 |
-
<
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
|
742 |
-
<
|
743 |
-
|
744 |
-
</
|
745 |
-
|
746 |
-
</
|
747 |
-
|
748 |
-
<
|
749 |
-
<
|
750 |
-
<
|
751 |
-
<
|
752 |
-
|
753 |
-
<
|
754 |
-
<
|
755 |
-
<
|
756 |
-
<th>
|
757 |
-
|
758 |
-
</
|
759 |
-
|
760 |
-
|
761 |
-
|
762 |
-
|
763 |
-
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
<
|
768 |
-
<
|
769 |
-
<
|
770 |
-
|
771 |
-
</
|
772 |
-
|
773 |
-
<
|
774 |
-
<
|
775 |
-
|
776 |
-
|
777 |
-
<
|
778 |
-
<
|
779 |
-
<
|
780 |
-
<
|
781 |
-
<td
|
782 |
-
|
783 |
-
</
|
784 |
-
|
785 |
-
<
|
786 |
-
<
|
787 |
-
<
|
788 |
-
|
789 |
-
|
790 |
-
|
791 |
-
|
792 |
-
<
|
793 |
-
|
794 |
-
</
|
795 |
-
|
796 |
-
</
|
797 |
-
|
798 |
-
<
|
799 |
-
<
|
800 |
-
<
|
801 |
-
<
|
802 |
-
|
803 |
-
<
|
804 |
-
<
|
805 |
-
<
|
806 |
-
|
807 |
-
|
808 |
-
</
|
809 |
-
<
|
810 |
-
|
811 |
-
|
812 |
-
|
813 |
-
|
814 |
-
|
815 |
-
|
816 |
-
|
817 |
-
<
|
818 |
-
|
819 |
-
|
820 |
-
|
821 |
-
<
|
822 |
-
<
|
823 |
-
<pre>
|
824 |
-
<
|
825 |
-
<
|
826 |
-
|
827 |
-
|
828 |
-
|
829 |
-
<
|
830 |
-
|
831 |
-
|
832 |
-
|
833 |
-
<
|
834 |
-
<
|
835 |
-
|
836 |
-
<
|
837 |
-
<
|
838 |
-
<
|
839 |
-
<
|
840 |
-
|
841 |
-
|
842 |
-
|
843 |
-
|
844 |
-
</
|
845 |
-
|
846 |
-
<
|
847 |
-
|
848 |
-
|
849 |
-
|
850 |
-
|
851 |
-
|
852 |
-
|
853 |
-
<
|
854 |
-
|
855 |
-
</
|
856 |
-
|
857 |
-
|
858 |
-
<h2>
|
859 |
-
<
|
860 |
-
<
|
861 |
-
<
|
862 |
-
|
863 |
-
|
864 |
-
<
|
865 |
-
|
866 |
-
</
|
867 |
-
</
|
868 |
-
</
|
869 |
-
|
870 |
-
|
871 |
-
|
872 |
-
<div class="
|
873 |
-
<div class="
|
874 |
-
<
|
875 |
-
<
|
876 |
-
<
|
877 |
-
<
|
878 |
-
</
|
879 |
-
|
880 |
-
|
881 |
-
|
882 |
-
|
883 |
-
<
|
884 |
-
<
|
885 |
-
<
|
886 |
-
<
|
887 |
-
<
|
888 |
-
<
|
889 |
-
|
890 |
-
|
891 |
-
|
892 |
-
</
|
893 |
-
<
|
894 |
-
|
895 |
-
|
896 |
-
|
897 |
-
|
898 |
-
<
|
899 |
-
|
900 |
-
<
|
901 |
-
|
902 |
-
|
903 |
-
|
904 |
-
</
|
905 |
-
|
906 |
-
<
|
907 |
-
<
|
908 |
-
<
|
909 |
-
<
|
910 |
-
|
911 |
-
<
|
912 |
-
<
|
913 |
-
<
|
914 |
-
|
915 |
-
|
916 |
-
</
|
917 |
-
<
|
918 |
-
|
919 |
-
|
920 |
-
|
921 |
-
|
922 |
-
|
923 |
-
|
924 |
-
|
925 |
-
<
|
926 |
-
|
927 |
-
|
928 |
-
|
929 |
-
<
|
930 |
-
<
|
931 |
-
<pre>
|
932 |
-
<
|
933 |
-
|
934 |
-
|
935 |
-
<
|
936 |
-
<
|
937 |
-
<
|
938 |
-
|
939 |
-
</
|
940 |
-
|
941 |
-
</
|
942 |
-
</
|
943 |
-
|
944 |
-
|
945 |
-
<
|
946 |
-
|
947 |
-
|
948 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
949 |
</div>
|
|
|
950 |
</body>
|
951 |
</html>
|
1 |
+
<!DOCTYPE html>
|
2 |
+
<html lang="en">
|
3 |
<head>
|
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</title>
|
7 |
+
<meta name="author" content=""/>
|
8 |
+
<meta name="description" content=""/>
|
9 |
+
|
10 |
+
<link href="../css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
|
11 |
+
<link href="../css/font-awesome.min.css" rel="stylesheet">
|
12 |
+
<link href="../css/prism.css" rel="stylesheet" media="all"/>
|
13 |
+
<link href="../css/template.css" rel="stylesheet" media="all"/>
|
14 |
+
|
15 |
+
<!--[if lt IE 9]>
|
16 |
+
<script src="../js/html5.js"></script>
|
17 |
+
<![endif]-->
|
18 |
+
<script src="../js/jquery-1.11.0.min.js"></script>
|
19 |
+
<script src="../js/ui/1.10.4/jquery-ui.min.js"></script>
|
20 |
+
<script src="../js/bootstrap.min.js"></script>
|
21 |
+
<script src="../js/jquery.smooth-scroll.js"></script>
|
22 |
+
<script src="../js/prism.min.js"></script>
|
23 |
+
<!-- TODO: Add http://jscrollpane.kelvinluck.com/ to style the scrollbars for browsers not using webkit-->
|
24 |
+
<script type="text/javascript">
|
25 |
+
function loadExternalCodeSnippets() {
|
26 |
+
Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach(function (pre) {
|
27 |
+
var src = pre.getAttribute('data-src');
|
28 |
+
var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
|
29 |
+
var language = 'php';
|
30 |
+
|
31 |
+
var code = document.createElement('code');
|
32 |
+
code.className = 'language-' + language;
|
33 |
+
|
34 |
+
pre.textContent = '';
|
35 |
+
|
36 |
+
code.textContent = 'Loading…';
|
37 |
+
|
38 |
+
pre.appendChild(code);
|
39 |
+
|
40 |
+
var xhr = new XMLHttpRequest();
|
41 |
+
|
42 |
+
xhr.open('GET', src, true);
|
43 |
+
|
44 |
+
xhr.onreadystatechange = function () {
|
45 |
+
if (xhr.readyState == 4) {
|
46 |
+
|
47 |
+
if (xhr.status < 400 && xhr.responseText) {
|
48 |
+
code.textContent = xhr.responseText;
|
49 |
+
|
50 |
+
Prism.highlightElement(code);
|
51 |
+
}
|
52 |
+
else if (xhr.status >= 400) {
|
53 |
+
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
|
54 |
+
}
|
55 |
+
else {
|
56 |
+
code.textContent = '✖ Error: File does not exist or is empty';
|
57 |
+
}
|
58 |
+
}
|
59 |
+
};
|
60 |
+
|
61 |
+
xhr.send(null);
|
62 |
+
});
|
63 |
+
}
|
64 |
+
|
65 |
+
$(document).ready(function(){
|
66 |
+
loadExternalCodeSnippets();
|
67 |
+
});
|
68 |
+
$('#source-view').on('shown', function () {
|
69 |
+
loadExternalCodeSnippets();
|
70 |
+
})
|
71 |
+
</script>
|
72 |
+
|
73 |
+
<link rel="shortcut icon" href="../images/favicon.ico"/>
|
74 |
+
<link rel="apple-touch-icon" href="../images/apple-touch-icon.png"/>
|
75 |
+
<link rel="apple-touch-icon" sizes="72x72" href="../images/apple-touch-icon-72x72.png"/>
|
76 |
+
<link rel="apple-touch-icon" sizes="114x114" href="../images/apple-touch-icon-114x114.png"/>
|
77 |
</head>
|
78 |
<body>
|
79 |
+
|
80 |
<div class="navbar navbar-fixed-top">
|
81 |
+
<div class="navbar-inner">
|
82 |
+
<div class="container">
|
83 |
+
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
|
84 |
+
<i class="icon-ellipsis-vertical"></i>
|
85 |
+
</a>
|
86 |
+
<a class="brand" href="../index.html">Media Library Assistant</a>
|
87 |
+
|
88 |
+
<div class="nav-collapse">
|
89 |
+
<ul class="nav pull-right">
|
90 |
+
<li class="dropdown" id="charts-menu">
|
91 |
+
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
92 |
+
Charts <b class="caret"></b>
|
93 |
+
</a>
|
94 |
+
<ul class="dropdown-menu">
|
95 |
+
<li>
|
96 |
+
<a href="../graphs/class.html">
|
97 |
+
<i class="icon-list-alt"></i> Class hierarchy diagram
|
98 |
+
</a>
|
99 |
+
</li>
|
100 |
+
</ul>
|
101 |
+
</li>
|
102 |
+
<li class="dropdown" id="reports-menu">
|
103 |
+
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
104 |
+
Reports <b class="caret"></b>
|
105 |
+
</a>
|
106 |
+
<ul class="dropdown-menu">
|
107 |
+
<li>
|
108 |
+
<a href="../reports/errors.html">
|
109 |
+
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">0</span>
|
110 |
+
</a>
|
111 |
+
</li>
|
112 |
+
<li>
|
113 |
+
<a href="../reports/markers.html">
|
114 |
+
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">3</span>
|
115 |
+
</a>
|
116 |
+
</li>
|
117 |
+
<li>
|
118 |
+
<a href="../reports/deprecated.html">
|
119 |
+
<i class="icon-list-alt"></i> Deprecated <span class="label label-info pull-right">0</span>
|
120 |
+
</a>
|
121 |
+
</li>
|
122 |
+
</ul>
|
123 |
+
</li>
|
124 |
+
</ul>
|
125 |
+
</div>
|
126 |
+
</div>
|
127 |
+
</div>
|
128 |
+
<!--<div class="go_to_top">-->
|
129 |
+
<!--<a href="#___" style="color: inherit">Back to top  <i class="icon-upload icon-white"></i></a>-->
|
130 |
+
<!--</div>-->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
131 |
</div>
|
|
|
|
|
|
|
132 |
|
133 |
+
<div id="___" class="container-fluid">
|
134 |
+
<section class="row-fluid">
|
135 |
+
<div class="span2 sidebar">
|
136 |
+
<div class="accordion" style="margin-bottom: 0">
|
137 |
+
<div class="accordion-group">
|
138 |
+
<div class="accordion-heading">
|
139 |
+
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-61091065"></a>
|
140 |
+
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
141 |
+
</div>
|
142 |
+
<div id="namespace-61091065" class="accordion-body collapse in">
|
143 |
+
<div class="accordion-inner">
|
144 |
|
145 |
+
|
146 |
+
<ul>
|
147 |
+
<li class="class"><a href="../classes/CPAC_Storage_Model_MLA.html">CPAC_Storage_Model_MLA</a></li>
|
148 |
+
<li class="class"><a href="../classes/MLA.html">MLA</a></li>
|
149 |
+
<li class="class"><a href="../classes/MLA_Ajax.html">MLA_Ajax</a></li>
|
150 |
+
<li class="class"><a href="../classes/MLA_Checklist_Walker.html">MLA_Checklist_Walker</a></li>
|
151 |
+
<li class="class"><a href="../classes/MLA_Example_List_Table.html">MLA_Example_List_Table</a></li>
|
152 |
+
<li class="class"><a href="../classes/MLA_List_Table.html">MLA_List_Table</a></li>
|
153 |
+
<li class="class"><a href="../classes/MLA_Polylang.html">MLA_Polylang</a></li>
|
154 |
+
<li class="class"><a href="../classes/MLA_Thumbnail.html">MLA_Thumbnail</a></li>
|
155 |
+
<li class="class"><a href="../classes/MLA_Upgrader_Skin.html">MLA_Upgrader_Skin</a></li>
|
156 |
+
<li class="class"><a href="../classes/MLA_Upload_List_Table.html">MLA_Upload_List_Table</a></li>
|
157 |
+
<li class="class"><a href="../classes/MLA_Upload_Optional_List_Table.html">MLA_Upload_Optional_List_Table</a></li>
|
158 |
+
<li class="class"><a href="../classes/MLA_View_List_Table.html">MLA_View_List_Table</a></li>
|
159 |
+
<li class="class"><a href="../classes/MLA_WPML.html">MLA_WPML</a></li>
|
160 |
+
<li class="class"><a href="../classes/MLA_WPML_List_Table.html">MLA_WPML_List_Table</a></li>
|
161 |
+
<li class="class"><a href="../classes/MLA_WPML_Table.html">MLA_WPML_Table</a></li>
|
162 |
+
<li class="class"><a href="../classes/MLACore.html">MLACore</a></li>
|
163 |
+
<li class="class"><a href="../classes/MLACoreOptions.html">MLACoreOptions</a></li>
|
164 |
+
<li class="class"><a href="../classes/MLAData.html">MLAData</a></li>
|
165 |
+
<li class="class"><a href="../classes/MLAData_Source.html">MLAData_Source</a></li>
|
166 |
+
<li class="class"><a href="../classes/MLAEdit.html">MLAEdit</a></li>
|
167 |
+
<li class="class"><a href="../classes/MLAFileDownloader.html">MLAFileDownloader</a></li>
|
168 |
+
<li class="class"><a href="../classes/MLAImageProcessor.html">MLAImageProcessor</a></li>
|
169 |
+
<li class="class"><a href="../classes/MLAMime.html">MLAMime</a></li>
|
170 |
+
<li class="class"><a href="../classes/MLAModal.html">MLAModal</a></li>
|
171 |
+
<li class="class"><a href="../classes/MLAModal_Ajax.html">MLAModal_Ajax</a></li>
|
172 |
+
<li class="class"><a href="../classes/MLAMutex.html">MLAMutex</a></li>
|
173 |
+
<li class="class"><a href="../classes/MLAObjects.html">MLAObjects</a></li>
|
174 |
+
<li class="class"><a href="../classes/MLAOptions.html">MLAOptions</a></li>
|
175 |
+
<li class="class"><a href="../classes/MLAPDF.html">MLAPDF</a></li>
|
176 |
+
<li class="class"><a href="../classes/MLAQuery.html">MLAQuery</a></li>
|
177 |
+
<li class="class"><a href="../classes/MLAReferences.html">MLAReferences</a></li>
|
178 |
+
<li class="class"><a href="../classes/MLASettings.html">MLASettings</a></li>
|
179 |
+
<li class="class"><a href="../classes/MLAShortcode_Support.html">MLAShortcode_Support</a></li>
|
180 |
+
<li class="class"><a href="../classes/MLAShortcodes.html">MLAShortcodes</a></li>
|
181 |
+
<li class="class"><a href="../classes/MLATemplate_Support.html">MLATemplate_Support</a></li>
|
182 |
+
<li class="class"><a href="../classes/MLATest.html">MLATest</a></li>
|
183 |
+
<li class="class"><a href="../classes/MLATextWidget.html">MLATextWidget</a></li>
|
184 |
+
<li class="class"><a href="../classes/MLAUninstall.html">MLAUninstall</a></li>
|
185 |
+
</ul>
|
186 |
+
</div>
|
187 |
+
</div>
|
188 |
+
</div>
|
189 |
+
</div>
|
190 |
+
|
191 |
+
</div>
|
192 |
+
</section>
|
193 |
+
<section class="row-fluid">
|
194 |
+
<div class="span10 offset2">
|
195 |
+
<div class="row-fluid">
|
196 |
+
<div class="span8 content class">
|
197 |
+
<nav>
|
198 |
+
<a href="../namespaces/default.html">\</a> <i class="icon-level-up"></i>
|
199 |
+
</nav>
|
200 |
+
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal"><i class="icon-code"></i></a>
|
201 |
+
|
202 |
+
<h1><small>\</small>MLACore</h1>
|
203 |
+
<p><em>Class MLA (Media Library Assistant) Core is the minimum support required for all other MLA features</em></p>
|
204 |
+
|
205 |
+
|
206 |
+
|
207 |
+
<section id="summary">
|
208 |
+
<h2>Summary</h2>
|
209 |
+
<section class="row-fluid heading">
|
210 |
+
<section class="span4">
|
211 |
+
<a href="#methods">Methods</a>
|
212 |
+
</section>
|
213 |
+
<section class="span4">
|
214 |
+
<a href="#properties">Properties</a>
|
215 |
+
</section>
|
216 |
+
<section class="span4">
|
217 |
+
<a href="#constants">Constants</a>
|
218 |
+
</section>
|
219 |
+
</section>
|
220 |
+
<section class="row-fluid public">
|
221 |
+
<section class="span4">
|
222 |
+
<a href="../classes/MLACore.html#method_initialize" class="">initialize()</a><br />
|
223 |
+
<a href="../classes/MLACore.html#method_mla_media_view_settings_filter" class="">mla_media_view_settings_filter()</a><br />
|
224 |
+
<a href="../classes/MLACore.html#method_mla_wp_enqueue_media_action" class="">mla_wp_enqueue_media_action()</a><br />
|
225 |
+
<a href="../classes/MLACore.html#method_mla_plugins_loaded_action_wpml" class="">mla_plugins_loaded_action_wpml()</a><br />
|
226 |
+
<a href="../classes/MLACore.html#method_wpml_unset_lang_admin_bar" class="">wpml_unset_lang_admin_bar()</a><br />
|
227 |
+
<a href="../classes/MLACore.html#method_mla_plugins_loaded_action" class="">mla_plugins_loaded_action()</a><br />
|
228 |
+
<a href="../classes/MLACore.html#method_mla_wp_redirect_filter" class="">mla_wp_redirect_filter()</a><br />
|
229 |
+
<a href="../classes/MLACore.html#method_mla_initialize_tax_checked_on_top" class="">mla_initialize_tax_checked_on_top()</a><br />
|
230 |
+
<a href="../classes/MLACore.html#method_mla_get_option" class="">mla_get_option()</a><br />
|
231 |
+
<a href="../classes/MLACore.html#method_mla_update_option" class="">mla_update_option()</a><br />
|
232 |
+
<a href="../classes/MLACore.html#method_mla_delete_option" class="">mla_delete_option()</a><br />
|
233 |
+
<a href="../classes/MLACore.html#method_mla_load_template" class="">mla_load_template()</a><br />
|
234 |
+
<a href="../classes/MLACore.html#method_mla_taxonomy_support" class="">mla_taxonomy_support()</a><br />
|
235 |
+
<a href="../classes/MLACore.html#method_mla_supported_taxonomies" class="">mla_supported_taxonomies()</a><br />
|
236 |
+
<a href="../classes/MLACore.html#method_mla_custom_field_support" class="">mla_custom_field_support()</a><br />
|
237 |
+
<a href="../classes/MLACore.html#method_mla_prepare_view_query" class="">mla_prepare_view_query()</a><br />
|
238 |
+
<a href="../classes/MLACore.html#method_mla_parse_view_specification" class="">mla_parse_view_specification()</a><br />
|
239 |
+
<a href="../classes/MLACore.html#method_mla_checklist_meta_box" class="">mla_checklist_meta_box()</a><br />
|
240 |
+
<a href="../classes/MLACore.html#method_mla_debug_mode" class="">mla_debug_mode()</a><br />
|
241 |
+
<a href="../classes/MLACore.html#method_mla_debug_file" class="">mla_debug_file()</a><br />
|
242 |
+
<a href="../classes/MLACore.html#method_mla_debug_content" class="">mla_debug_content()</a><br />
|
243 |
+
<a href="../classes/MLACore.html#method_mla_debug_flush" class="">mla_debug_flush()</a><br />
|
244 |
+
<a href="../classes/MLACore.html#method_mla_debug_add" class="">mla_debug_add()</a><br />
|
245 |
+
<a href="../classes/MLACore.html#method_admin_columns_support" class="">admin_columns_support()</a><br />
|
246 |
+
</section>
|
247 |
+
<section class="span4">
|
248 |
+
<a href="../classes/MLACore.html#property_original_php_log" class="">$original_php_log</a><br />
|
249 |
+
<a href="../classes/MLACore.html#property_original_php_reporting" class="">$original_php_reporting</a><br />
|
250 |
+
<a href="../classes/MLACore.html#property_process_featured_in" class="">$process_featured_in</a><br />
|
251 |
+
<a href="../classes/MLACore.html#property_process_inserted_in" class="">$process_inserted_in</a><br />
|
252 |
+
<a href="../classes/MLACore.html#property_process_gallery_in" class="">$process_gallery_in</a><br />
|
253 |
+
<a href="../classes/MLACore.html#property_process_mla_gallery_in" class="">$process_mla_gallery_in</a><br />
|
254 |
+
<a href="../classes/MLACore.html#property_mla_debug_level" class="">$mla_debug_level</a><br />
|
255 |
+
<a href="../classes/MLACore.html#property_admin_columns_storage_model" class="">$admin_columns_storage_model</a><br />
|
256 |
+
</section>
|
257 |
+
<section class="span4">
|
258 |
+
<a href="../classes/MLACore.html#constant_CURRENT_MLA_VERSION" class="">CURRENT_MLA_VERSION</a><br />
|
259 |
+
<a href="../classes/MLACore.html#constant_STYLESHEET_SLUG" class="">STYLESHEET_SLUG</a><br />
|
260 |
+
<a href="../classes/MLACore.html#constant_MLA_DEBUG_CATEGORY_ANY" class="">MLA_DEBUG_CATEGORY_ANY</a><br />
|
261 |
+
<a href="../classes/MLACore.html#constant_MLA_DEBUG_CATEGORY_AJAX" class="">MLA_DEBUG_CATEGORY_AJAX</a><br />
|
262 |
+
<a href="../classes/MLACore.html#constant_MLA_DEBUG_CATEGORY_LANGUAGE" class="">MLA_DEBUG_CATEGORY_LANGUAGE</a><br />
|
263 |
+
<a href="../classes/MLACore.html#constant_MLA_DEBUG_CATEGORY_THUMBNAIL" class="">MLA_DEBUG_CATEGORY_THUMBNAIL</a><br />
|
264 |
+
<a href="../classes/MLACore.html#constant_ADMIN_PAGE_SLUG" class="">ADMIN_PAGE_SLUG</a><br />
|
265 |
+
<a href="../classes/MLACore.html#constant_MLA_ADMIN_SINGLE_DELETE" class="">MLA_ADMIN_SINGLE_DELETE</a><br />
|
266 |
+
<a href="../classes/MLACore.html#constant_MLA_ADMIN_SINGLE_TRASH" class="">MLA_ADMIN_SINGLE_TRASH</a><br />
|
267 |
+
<a href="../classes/MLACore.html#constant_MLA_ADMIN_SINGLE_RESTORE" class="">MLA_ADMIN_SINGLE_RESTORE</a><br />
|
268 |
+
<a href="../classes/MLACore.html#constant_MLA_ADMIN_NONCE_ACTION" class="">MLA_ADMIN_NONCE_ACTION</a><br />
|
269 |
+
<a href="../classes/MLACore.html#constant_MLA_ADMIN_NONCE_NAME" class="">MLA_ADMIN_NONCE_NAME</a><br />
|
270 |
+
<a href="../classes/MLACore.html#constant_JAVASCRIPT_INLINE_EDIT_SLUG" class="">JAVASCRIPT_INLINE_EDIT_SLUG</a><br />
|
271 |
+
<a href="../classes/MLACore.html#constant_JAVASCRIPT_QUERY_ATTACHMENTS_ACTION" class="">JAVASCRIPT_QUERY_ATTACHMENTS_ACTION</a><br />
|
272 |
+
<a href="../classes/MLACore.html#constant_JAVASCRIPT_FILL_COMPAT_ACTION" class="">JAVASCRIPT_FILL_COMPAT_ACTION</a><br />
|
273 |
+
<a href="../classes/MLACore.html#constant_JAVASCRIPT_UPDATE_COMPAT_ACTION" class="">JAVASCRIPT_UPDATE_COMPAT_ACTION</a><br />
|
274 |
+
</section>
|
275 |
+
</section>
|
276 |
+
<section class="row-fluid protected">
|
277 |
+
<section class="span4">
|
278 |
+
<em>No protected methods found</em>
|
279 |
+
</section>
|
280 |
+
<section class="span4">
|
281 |
+
<em>No protected properties found</em>
|
282 |
+
</section>
|
283 |
+
<section class="span4">
|
284 |
+
<em>N/A</em>
|
285 |
+
</section>
|
286 |
+
</section>
|
287 |
+
<section class="row-fluid private">
|
288 |
+
<section class="span4">
|
289 |
+
<a href="../classes/MLACore.html#method__debug_log" class="">_debug_log()</a><br />
|
290 |
+
</section>
|
291 |
+
<section class="span4">
|
292 |
+
<a href="../classes/MLACore.html#property_mla_debug_messages" class="">$mla_debug_messages</a><br />
|
293 |
+
<a href="../classes/MLACore.html#property_mla_debug_mode" class="">$mla_debug_mode</a><br />
|
294 |
+
<a href="../classes/MLACore.html#property_mla_debug_file" class="">$mla_debug_file</a><br />
|
295 |
+
</section>
|
296 |
+
<section class="span4">
|
297 |
+
<em>N/A</em>
|
298 |
+
</section>
|
299 |
+
</section>
|
300 |
+
</section>
|
301 |
+
</div>
|
302 |
+
<aside class="span4 detailsbar">
|
303 |
+
|
304 |
+
|
305 |
+
<dl>
|
306 |
+
<dt>File</dt>
|
307 |
+
<dd><a href="../files/includes.class-mla-core.html"><div class="path-wrapper">includes\class-mla-core.php</div></a></dd>
|
308 |
+
<dt>Package</dt>
|
309 |
+
<dd><div class="namespace-wrapper">Media Library Assistant</div></dd>
|
310 |
+
<dt>Class hierarchy</dt>
|
311 |
+
<dd class="hierarchy">
|
312 |
+
<div class="namespace-wrapper">\MLACore</div>
|
313 |
+
</dd>
|
314 |
+
|
315 |
+
|
316 |
+
|
317 |
+
|
318 |
+
|
319 |
+
</dl>
|
320 |
+
<h2>Tags</h2>
|
321 |
+
<table class="table table-condensed">
|
322 |
+
<tr>
|
323 |
+
<th>
|
324 |
+
since
|
325 |
+
</th>
|
326 |
+
<td>
|
327 |
+
|
328 |
+
</td>
|
329 |
+
</tr>
|
330 |
+
</table>
|
331 |
+
</aside>
|
332 |
+
</div>
|
333 |
+
|
334 |
+
<a id="constants" name="constants"></a>
|
335 |
+
<div class="row-fluid">
|
336 |
+
<div class="span8 content class">
|
337 |
+
<h2>Constants</h2>
|
338 |
+
</div>
|
339 |
+
<aside class="span4 detailsbar"></aside>
|
340 |
+
</div>
|
341 |
+
|
342 |
+
<div class="row-fluid">
|
343 |
+
<div class="span8 content class">
|
344 |
+
<a id="constant_CURRENT_MLA_VERSION" name="constant_CURRENT_MLA_VERSION" class="anchor"></a>
|
345 |
+
<article id="constant_CURRENT_MLA_VERSION" class="constant">
|
346 |
+
<h3 class="">CURRENT_MLA_VERSION</h3>
|
347 |
+
<pre class="signature">CURRENT_MLA_VERSION</pre>
|
348 |
+
<p><em>Current version number (moved from class-mla-main.php)</em></p>
|
349 |
+
|
350 |
+
</article>
|
351 |
+
</div>
|
352 |
+
<aside class="span4 detailsbar">
|
353 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
354 |
+
<dl>
|
355 |
+
</dl>
|
356 |
+
<h2>Tags</h2>
|
357 |
+
<table class="table table-condensed">
|
358 |
+
<tr>
|
359 |
+
<th>
|
360 |
+
since
|
361 |
+
</th>
|
362 |
+
<td>
|
363 |
+
|
364 |
+
</td>
|
365 |
+
</tr>
|
366 |
+
</table>
|
367 |
+
</aside>
|
368 |
+
</div>
|
369 |
+
|
370 |
+
<div class="row-fluid">
|
371 |
+
<div class="span8 content class">
|
372 |
+
<a id="constant_STYLESHEET_SLUG" name="constant_STYLESHEET_SLUG" class="anchor"></a>
|
373 |
+
<article id="constant_STYLESHEET_SLUG" class="constant">
|
374 |
+
<h3 class="">STYLESHEET_SLUG</h3>
|
375 |
+
<pre class="signature">STYLESHEET_SLUG</pre>
|
376 |
+
<p><em>Slug for registering and enqueueing plugin style sheets (moved from class-mla-main.php)</em></p>
|
377 |
+
|
378 |
+
</article>
|
379 |
+
</div>
|
380 |
+
<aside class="span4 detailsbar">
|
381 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
382 |
+
<dl>
|
383 |
+
</dl>
|
384 |
+
<h2>Tags</h2>
|
385 |
+
<table class="table table-condensed">
|
386 |
+
<tr>
|
387 |
+
<th>
|
388 |
+
since
|
389 |
+
</th>
|
390 |
+
<td>
|
391 |
+
|
392 |
+
</td>
|
393 |
+
</tr>
|
394 |
+
</table>
|
395 |
+
</aside>
|
396 |
+
</div>
|
397 |
+
|
398 |
+
<div class="row-fluid">
|
399 |
+
<div class="span8 content class">
|
400 |
+
<a id="constant_MLA_DEBUG_CATEGORY_ANY" name="constant_MLA_DEBUG_CATEGORY_ANY" class="anchor"></a>
|
401 |
+
<article id="constant_MLA_DEBUG_CATEGORY_ANY" class="constant">
|
402 |
+
<h3 class="">MLA_DEBUG_CATEGORY_ANY</h3>
|
403 |
+
<pre class="signature">MLA_DEBUG_CATEGORY_ANY</pre>
|
404 |
+
<p><em>Constant to log "any" debug activity</em></p>
|
405 |
+
|
406 |
+
</article>
|
407 |
+
</div>
|
408 |
+
<aside class="span4 detailsbar">
|
409 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
410 |
+
<dl>
|
411 |
+
</dl>
|
412 |
+
<h2>Tags</h2>
|
413 |
+
<table class="table table-condensed">
|
414 |
+
<tr>
|
415 |
+
<th>
|
416 |
+
since
|
417 |
+
</th>
|
418 |
+
<td>
|
419 |
+
|
420 |
+
</td>
|
421 |
+
</tr>
|
422 |
+
</table>
|
423 |
+
</aside>
|
424 |
+
</div>
|
425 |
+
|
426 |
+
<div class="row-fluid">
|
427 |
+
<div class="span8 content class">
|
428 |
+
<a id="constant_MLA_DEBUG_CATEGORY_AJAX" name="constant_MLA_DEBUG_CATEGORY_AJAX" class="anchor"></a>
|
429 |
+
<article id="constant_MLA_DEBUG_CATEGORY_AJAX" class="constant">
|
430 |
+
<h3 class="">MLA_DEBUG_CATEGORY_AJAX</h3>
|
431 |
+
<pre class="signature">MLA_DEBUG_CATEGORY_AJAX</pre>
|
432 |
+
<p><em>Constant to log Ajax debug activity</em></p>
|
433 |
+
|
434 |
+
</article>
|
435 |
+
</div>
|
436 |
+
<aside class="span4 detailsbar">
|
437 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
438 |
+
<dl>
|
439 |
+
</dl>
|
440 |
+
<h2>Tags</h2>
|
441 |
+
<table class="table table-condensed">
|
442 |
+
<tr>
|
443 |
+
<th>
|
444 |
+
since
|
445 |
+
</th>
|
446 |
+
<td>
|
447 |
+
|
448 |
+
</td>
|
449 |
+
</tr>
|
450 |
+
</table>
|
451 |
+
</aside>
|
452 |
+
</div>
|
453 |
+
|
454 |
+
<div class="row-fluid">
|
455 |
+
<div class="span8 content class">
|
456 |
+
<a id="constant_MLA_DEBUG_CATEGORY_LANGUAGE" name="constant_MLA_DEBUG_CATEGORY_LANGUAGE" class="anchor"></a>
|
457 |
+
<article id="constant_MLA_DEBUG_CATEGORY_LANGUAGE" class="constant">
|
458 |
+
<h3 class="">MLA_DEBUG_CATEGORY_LANGUAGE</h3>
|
459 |
+
<pre class="signature">MLA_DEBUG_CATEGORY_LANGUAGE</pre>
|
460 |
+
<p><em>Constant to log WPML/Polylang action/filter activity</em></p>
|
461 |
+
|
462 |
+
</article>
|
463 |
+
</div>
|
464 |
+
<aside class="span4 detailsbar">
|
465 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
466 |
+
<dl>
|
467 |
+
</dl>
|
468 |
+
<h2>Tags</h2>
|
469 |
+
<table class="table table-condensed">
|
470 |
+
<tr>
|
471 |
+
<th>
|
472 |
+
since
|
473 |
+
</th>
|
474 |
+
<td>
|
475 |
+
|
476 |
+
</td>
|
477 |
+
</tr>
|
478 |
+
</table>
|
479 |
+
</aside>
|
480 |
+
</div>
|
481 |
+
|
482 |
+
<div class="row-fluid">
|
483 |
+
<div class="span8 content class">
|
484 |
+
<a id="constant_MLA_DEBUG_CATEGORY_THUMBNAIL" name="constant_MLA_DEBUG_CATEGORY_THUMBNAIL" class="anchor"></a>
|
485 |
+
<article id="constant_MLA_DEBUG_CATEGORY_THUMBNAIL" class="constant">
|
486 |
+
<h3 class="">MLA_DEBUG_CATEGORY_THUMBNAIL</h3>
|
487 |
+
<pre class="signature">MLA_DEBUG_CATEGORY_THUMBNAIL</pre>
|
488 |
+
<p><em>Constant to log Ghostscript/Imagick activity</em></p>
|
489 |
+
|
490 |
+
</article>
|
491 |
+
</div>
|
492 |
+
<aside class="span4 detailsbar">
|
493 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
494 |
+
<dl>
|
495 |
+
</dl>
|
496 |
+
<h2>Tags</h2>
|
497 |
+
<table class="table table-condensed">
|
498 |
+
<tr>
|
499 |
+
<th>
|
500 |
+
since
|
501 |
+
</th>
|
502 |
+
<td>
|
503 |
+
|
504 |
+
</td>
|
505 |
+
</tr>
|
506 |
+
</table>
|
507 |
+
</aside>
|
508 |
+
</div>
|
509 |
+
|
510 |
+
<div class="row-fluid">
|
511 |
+
<div class="span8 content class">
|
512 |
+
<a id="constant_ADMIN_PAGE_SLUG" name="constant_ADMIN_PAGE_SLUG" class="anchor"></a>
|
513 |
+
<article id="constant_ADMIN_PAGE_SLUG" class="constant">
|
514 |
+
<h3 class="">ADMIN_PAGE_SLUG</h3>
|
515 |
+
<pre class="signature">ADMIN_PAGE_SLUG</pre>
|
516 |
+
<p><em>Slug for adding plugin submenu</em></p>
|
517 |
+
|
518 |
+
</article>
|
519 |
+
</div>
|
520 |
+
<aside class="span4 detailsbar">
|
521 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
522 |
+
<dl>
|
523 |
+
</dl>
|
524 |
+
<h2>Tags</h2>
|
525 |
+
<table class="table table-condensed">
|
526 |
+
<tr>
|
527 |
+
<th>
|
528 |
+
since
|
529 |
+
</th>
|
530 |
+
<td>
|
531 |
+
|
532 |
+
</td>
|
533 |
+
</tr>
|
534 |
+
</table>
|
535 |
+
</aside>
|
536 |
+
</div>
|
537 |
+
|
538 |
+
<div class="row-fluid">
|
539 |
+
<div class="span8 content class">
|
540 |
+
<a id="constant_MLA_ADMIN_SINGLE_DELETE" name="constant_MLA_ADMIN_SINGLE_DELETE" class="anchor"></a>
|
541 |
+
<article id="constant_MLA_ADMIN_SINGLE_DELETE" class="constant">
|
542 |
+
<h3 class="">MLA_ADMIN_SINGLE_DELETE</h3>
|
543 |
+
<pre class="signature">MLA_ADMIN_SINGLE_DELETE</pre>
|
544 |
+
<p><em>mla_admin_action value for permanently deleting a single item</em></p>
|
545 |
+
|
546 |
+
</article>
|
547 |
+
</div>
|
548 |
+
<aside class="span4 detailsbar">
|
549 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
550 |
+
<dl>
|
551 |
+
</dl>
|
552 |
+
<h2>Tags</h2>
|
553 |
+
<table class="table table-condensed">
|
554 |
+
<tr>
|
555 |
+
<th>
|
556 |
+
since
|
557 |
+
</th>
|
558 |
+
<td>
|
559 |
+
|
560 |
+
</td>
|
561 |
+
</tr>
|
562 |
+
</table>
|
563 |
+
</aside>
|
564 |
+
</div>
|
565 |
+
|
566 |
+
<div class="row-fluid">
|
567 |
+
<div class="span8 content class">
|
568 |
+
<a id="constant_MLA_ADMIN_SINGLE_TRASH" name="constant_MLA_ADMIN_SINGLE_TRASH" class="anchor"></a>
|
569 |
+
<article id="constant_MLA_ADMIN_SINGLE_TRASH" class="constant">
|
570 |
+
<h3 class="">MLA_ADMIN_SINGLE_TRASH</h3>
|
571 |
+
<pre class="signature">MLA_ADMIN_SINGLE_TRASH</pre>
|
572 |
+
<p><em>mla_admin_action value for moving a single item to the trash</em></p>
|
573 |
+
|
574 |
+
</article>
|
575 |
+
</div>
|
576 |
+
<aside class="span4 detailsbar">
|
577 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
578 |
+
<dl>
|
579 |
+
</dl>
|
580 |
+
<h2>Tags</h2>
|
581 |
+
<table class="table table-condensed">
|
582 |
+
<tr>
|
583 |
+
<th>
|
584 |
+
since
|
585 |
+
</th>
|
586 |
+
<td>
|
587 |
+
|
588 |
+
</td>
|
589 |
+
</tr>
|
590 |
+
</table>
|
591 |
+
</aside>
|
592 |
+
</div>
|
593 |
+
|
594 |
+
<div class="row-fluid">
|
595 |
+
<div class="span8 content class">
|
596 |
+
<a id="constant_MLA_ADMIN_SINGLE_RESTORE" name="constant_MLA_ADMIN_SINGLE_RESTORE" class="anchor"></a>
|
597 |
+
<article id="constant_MLA_ADMIN_SINGLE_RESTORE" class="constant">
|
598 |
+
<h3 class="">MLA_ADMIN_SINGLE_RESTORE</h3>
|
599 |
+
<pre class="signature">MLA_ADMIN_SINGLE_RESTORE</pre>
|
600 |
+
<p><em>mla_admin_action value for restoring a single item from the trash</em></p>
|
601 |
+
|
602 |
+
</article>
|
603 |
+
</div>
|
604 |
+
<aside class="span4 detailsbar">
|
605 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
606 |
+
<dl>
|
607 |
+
</dl>
|
608 |
+
<h2>Tags</h2>
|
609 |
+
<table class="table table-condensed">
|
610 |
+
<tr>
|
611 |
+
<th>
|
612 |
+
since
|
613 |
+
</th>
|
614 |
+
<td>
|
615 |
+
|
616 |
+
</td>
|
617 |
+
</tr>
|
618 |
+
</table>
|
619 |
+
</aside>
|
620 |
+
</div>
|
621 |
+
|
622 |
+
<div class="row-fluid">
|
623 |
+
<div class="span8 content class">
|
624 |
+
<a id="constant_MLA_ADMIN_NONCE_ACTION" name="constant_MLA_ADMIN_NONCE_ACTION" class="anchor"></a>
|
625 |
+
<article id="constant_MLA_ADMIN_NONCE_ACTION" class="constant">
|
626 |
+
<h3 class="">MLA_ADMIN_NONCE_ACTION</h3>
|
627 |
+
<pre class="signature">MLA_ADMIN_NONCE_ACTION</pre>
|
628 |
+
<p><em>Action name; gives a context for the nonce</em></p>
|
629 |
+
|
630 |
+
</article>
|
631 |
+
</div>
|
632 |
+
<aside class="span4 detailsbar">
|
633 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
634 |
+
<dl>
|
635 |
+
</dl>
|
636 |
+
<h2>Tags</h2>
|
637 |
+
<table class="table table-condensed">
|
638 |
+
<tr>
|
639 |
+
<th>
|
640 |
+
since
|
641 |
+
</th>
|
642 |
+
<td>
|
643 |
+
|
644 |
+
</td>
|
645 |
+
</tr>
|
646 |
+
</table>
|
647 |
+
</aside>
|
648 |
+
</div>
|
649 |
+
|
650 |
+
<div class="row-fluid">
|
651 |
+
<div class="span8 content class">
|
652 |
+
<a id="constant_MLA_ADMIN_NONCE_NAME" name="constant_MLA_ADMIN_NONCE_NAME" class="anchor"></a>
|
653 |
+
<article id="constant_MLA_ADMIN_NONCE_NAME" class="constant">
|
654 |
+
<h3 class="">MLA_ADMIN_NONCE_NAME</h3>
|
655 |
+
<pre class="signature">MLA_ADMIN_NONCE_NAME</pre>
|
656 |
+
<p><em>Nonce name; uniquely identifies the nonce</em></p>
|
657 |
+
|
658 |
+
</article>
|
659 |
+
</div>
|
660 |
+
<aside class="span4 detailsbar">
|
661 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
662 |
+
<dl>
|
663 |
+
</dl>
|
664 |
+
<h2>Tags</h2>
|
665 |
+
<table class="table table-condensed">
|
666 |
+
<tr>
|
667 |
+
<th>
|
668 |
+
since
|
669 |
+
</th>
|
670 |
+
<td>
|
671 |
+
|
672 |
+
</td>
|
673 |
+
</tr>
|
674 |
+
</table>
|
675 |
+
</aside>
|
676 |
+
</div>
|
677 |
+
|
678 |
+
<div class="row-fluid">
|
679 |
+
<div class="span8 content class">
|
680 |
+
<a id="constant_JAVASCRIPT_INLINE_EDIT_SLUG" name="constant_JAVASCRIPT_INLINE_EDIT_SLUG" class="anchor"></a>
|
681 |
+
<article id="constant_JAVASCRIPT_INLINE_EDIT_SLUG" class="constant">
|
682 |
+
<h3 class="">JAVASCRIPT_INLINE_EDIT_SLUG</h3>
|
683 |
+
<pre class="signature">JAVASCRIPT_INLINE_EDIT_SLUG</pre>
|
684 |
+
<p><em>Slug for localizing and enqueueing JavaScript - MLA List Table</em></p>
|
685 |
+
|
686 |
+
</article>
|
687 |
+
</div>
|
688 |
+
<aside class="span4 detailsbar">
|
689 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
690 |
+
<dl>
|
691 |
+
</dl>
|
692 |
+
<h2>Tags</h2>
|
693 |
+
<table class="table table-condensed">
|
694 |
+
<tr>
|
695 |
+
<th>
|
696 |
+
since
|
697 |
+
</th>
|
698 |
+
<td>
|
699 |
+
|
700 |
+
</td>
|
701 |
+
</tr>
|
702 |
+
</table>
|
703 |
+
</aside>
|
704 |
+
</div>
|
705 |
+
|
706 |
+
<div class="row-fluid">
|
707 |
+
<div class="span8 content class">
|
708 |
+
<a id="constant_JAVASCRIPT_QUERY_ATTACHMENTS_ACTION" name="constant_JAVASCRIPT_QUERY_ATTACHMENTS_ACTION" class="anchor"></a>
|
709 |
+
<article id="constant_JAVASCRIPT_QUERY_ATTACHMENTS_ACTION" class="constant">
|
710 |
+
<h3 class="">JAVASCRIPT_QUERY_ATTACHMENTS_ACTION</h3>
|
711 |
+
<pre class="signature">JAVASCRIPT_QUERY_ATTACHMENTS_ACTION</pre>
|
712 |
+
<p><em>Slug for the "query attachments" action - Add Media and related dialogs</em></p>
|
713 |
+
|
714 |
+
</article>
|
715 |
+
</div>
|
716 |
+
<aside class="span4 detailsbar">
|
717 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
718 |
+
<dl>
|
719 |
+
</dl>
|
720 |
+
<h2>Tags</h2>
|
721 |
+
<table class="table table-condensed">
|
722 |
+
<tr>
|
723 |
+
<th>
|
724 |
+
since
|
725 |
+
</th>
|
726 |
+
<td>
|
727 |
+
|
728 |
+
</td>
|
729 |
+
</tr>
|
730 |
+
</table>
|
731 |
+
</aside>
|
732 |
+
</div>
|
733 |
+
|
734 |
+
<div class="row-fluid">
|
735 |
+
<div class="span8 content class">
|
736 |
+
<a id="constant_JAVASCRIPT_FILL_COMPAT_ACTION" name="constant_JAVASCRIPT_FILL_COMPAT_ACTION" class="anchor"></a>
|
737 |
+
<article id="constant_JAVASCRIPT_FILL_COMPAT_ACTION" class="constant">
|
738 |
+
<h3 class="">JAVASCRIPT_FILL_COMPAT_ACTION</h3>
|
739 |
+
<pre class="signature">JAVASCRIPT_FILL_COMPAT_ACTION</pre>
|
740 |
+
<p><em>Slug for the "fill compat-attachment-fields" action - Add Media and related dialogs</em></p>
|
741 |
+
|
742 |
+
</article>
|
743 |
+
</div>
|
744 |
+
<aside class="span4 detailsbar">
|
745 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
746 |
+
<dl>
|
747 |
+
</dl>
|
748 |
+
<h2>Tags</h2>
|
749 |
+
<table class="table table-condensed">
|
750 |
+
<tr>
|
751 |
+
<th>
|
752 |
+
since
|
753 |
+
</th>
|
754 |
+
<td>
|
755 |
+
|
756 |
+
</td>
|
757 |
+
</tr>
|
758 |
+
</table>
|
759 |
+
</aside>
|
760 |
+
</div>
|
761 |
+
|
762 |
+
<div class="row-fluid">
|
763 |
+
<div class="span8 content class">
|
764 |
+
<a id="constant_JAVASCRIPT_UPDATE_COMPAT_ACTION" name="constant_JAVASCRIPT_UPDATE_COMPAT_ACTION" class="anchor"></a>
|
765 |
+
<article id="constant_JAVASCRIPT_UPDATE_COMPAT_ACTION" class="constant">
|
766 |
+
<h3 class="">JAVASCRIPT_UPDATE_COMPAT_ACTION</h3>
|
767 |
+
<pre class="signature">JAVASCRIPT_UPDATE_COMPAT_ACTION</pre>
|
768 |
+
<p><em>Slug for the "update compat-attachment-fields" action - Add Media and related dialogs</em></p>
|
769 |
+
|
770 |
+
</article>
|
771 |
+
</div>
|
772 |
+
<aside class="span4 detailsbar">
|
773 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
774 |
+
<dl>
|
775 |
+
</dl>
|
776 |
+
<h2>Tags</h2>
|
777 |
+
<table class="table table-condensed">
|
778 |
+
<tr>
|
779 |
+
<th>
|
780 |
+
since
|
781 |
+
</th>
|
782 |
+
<td>
|
783 |
+
|
784 |
+
</td>
|
785 |
+
</tr>
|
786 |
+
</table>
|
787 |
+
</aside>
|
788 |
+
</div>
|
789 |
+
|
790 |
+
|
791 |
+
<a id="properties" name="properties"></a>
|
792 |
+
<div class="row-fluid">
|
793 |
+
<div class="span8 content class">
|
794 |
+
<h2>Properties</h2>
|
795 |
+
</div>
|
796 |
+
<aside class="span4 detailsbar"></aside>
|
797 |
+
</div>
|
798 |
+
|
799 |
+
<div class="row-fluid">
|
800 |
+
<div class="span8 content class">
|
801 |
+
<a id="property_original_php_log" name="property_original_php_log" class="anchor"></a>
|
802 |
+
<article class="property">
|
803 |
+
<h3 class="public ">$original_php_log</h3>
|
804 |
+
<pre class="signature">$original_php_log : string</pre>
|
805 |
+
<p><em>Original PHP error_log path and file</em></p>
|
806 |
+
|
807 |
+
|
808 |
+
<h4>Type</h4>
|
809 |
+
string
|
810 |
+
</article>
|
811 |
+
</div>
|
812 |
+
<aside class="span4 detailsbar">
|
813 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
814 |
+
<dl>
|
815 |
+
</dl>
|
816 |
+
<h2>Tags</h2>
|
817 |
+
<table class="table table-condensed">
|
818 |
+
<tr>
|
819 |
+
<th>
|
820 |
+
since
|
821 |
+
</th>
|
822 |
+
<td>
|
823 |
+
|
824 |
+
</td>
|
825 |
+
</tr>
|
826 |
+
</table>
|
827 |
+
</aside>
|
828 |
+
</div>
|
829 |
+
|
830 |
+
<div class="row-fluid">
|
831 |
+
<div class="span8 content class">
|
832 |
+
<a id="property_original_php_reporting" name="property_original_php_reporting" class="anchor"></a>
|
833 |
+
<article class="property">
|
834 |
+
<h3 class="public ">$original_php_reporting</h3>
|
835 |
+
<pre class="signature">$original_php_reporting : string</pre>
|
836 |
+
<p><em>Original PHP error_reporting value</em></p>
|
837 |
+
|
838 |
+
|
839 |
+
<h4>Type</h4>
|
840 |
+
string
|
841 |
+
</article>
|
842 |
+
</div>
|
843 |
+
<aside class="span4 detailsbar">
|
844 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
845 |
+
<dl>
|
846 |
+
</dl>
|
847 |
+
<h2>Tags</h2>
|
848 |
+
<table class="table table-condensed">
|
849 |
+
<tr>
|
850 |
+
<th>
|
851 |
+
since
|
852 |
+
</th>
|
853 |
+
<td>
|
854 |
+
|
855 |
+
</td>
|
856 |
+
</tr>
|
857 |
+
</table>
|
858 |
+
</aside>
|
859 |
+
</div>
|
860 |
+
|
861 |
+
<div class="row-fluid">
|
862 |
+
<div class="span8 content class">
|
863 |
+
<a id="property_process_featured_in" name="property_process_featured_in" class="anchor"></a>
|
864 |
+
<article class="property">
|
865 |
+
<h3 class="public ">$process_featured_in</h3>
|
866 |
+
<pre class="signature">$process_featured_in : boolean</pre>
|
867 |
+
<p><em>Option setting for "Featured in" reporting</em></p>
|
868 |
+
<p>This setting is false if the "Featured in" database access setting is "disabled", else true.</p>
|
869 |
+
|
870 |
+
<h4>Type</h4>
|
871 |
+
boolean
|
872 |
+
</article>
|
873 |
+
</div>
|
874 |
+
<aside class="span4 detailsbar">
|
875 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
876 |
+
<dl>
|
877 |
+
</dl>
|
878 |
+
<h2>Tags</h2>
|
879 |
+
<table class="table table-condensed">
|
880 |
+
<tr>
|
881 |
+
<th>
|
882 |
+
since
|
883 |
+
</th>
|
884 |
+
<td>
|
885 |
+
|
886 |
+
</td>
|
887 |
+
</tr>
|
888 |
+
</table>
|
889 |
+
</aside>
|
890 |
+
</div>
|
891 |
+
|
892 |
+
<div class="row-fluid">
|
893 |
+
<div class="span8 content class">
|
894 |
+
<a id="property_process_inserted_in" name="property_process_inserted_in" class="anchor"></a>
|
895 |
+
<article class="property">
|
896 |
+
<h3 class="public ">$process_inserted_in</h3>
|
897 |
+
<pre class="signature">$process_inserted_in : boolean</pre>
|
898 |
+
<p><em>Option setting for "Inserted in" reporting</em></p>
|
899 |
+
<p>This setting is false if the "Inserted in" database access setting is "disabled", else true.</p>
|
900 |
+
|
901 |
+
<h4>Type</h4>
|
902 |
+
boolean
|
903 |
+
</article>
|
904 |
+
</div>
|
905 |
+
<aside class="span4 detailsbar">
|
906 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
907 |
+
<dl>
|
908 |
+
</dl>
|
909 |
+
<h2>Tags</h2>
|
910 |
+
<table class="table table-condensed">
|
911 |
+
<tr>
|
912 |
+
<th>
|
913 |
+
since
|
914 |
+
</th>
|
915 |
+
<td>
|
916 |
+
|
917 |
+
</td>
|
918 |
+
</tr>
|
919 |
+
</table>
|
920 |
+
</aside>
|
921 |
+
</div>
|
922 |
+
|
923 |
+
<div class="row-fluid">
|
924 |
+
<div class="span8 content class">
|
925 |
+
<a id="property_process_gallery_in" name="property_process_gallery_in" class="anchor"></a>
|
926 |
+
<article class="property">
|
927 |
+
<h3 class="public ">$process_gallery_in</h3>
|
928 |
+
<pre class="signature">$process_gallery_in : boolean</pre>
|
929 |
+
<p><em>Option setting for "Gallery in" reporting</em></p>
|
930 |
+
<p>This setting is false if the "Gallery in" database access setting is "disabled", else true.</p>
|
931 |
+
|
932 |
+
<h4>Type</h4>
|
933 |
+
boolean
|
934 |
+
</article>
|
935 |
+
</div>
|
936 |
+
<aside class="span4 detailsbar">
|
937 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
938 |
+
<dl>
|
939 |
+
</dl>
|
940 |
+
<h2>Tags</h2>
|
941 |
+
<table class="table table-condensed">
|
942 |
+
<tr>
|
943 |
+
<th>
|
944 |
+
since
|
945 |
+
</th>
|
946 |
+
<td>
|
947 |
+
|
948 |
+
</td>
|
949 |
+
</tr>
|
950 |
+
</table>
|
951 |
+
</aside>
|
952 |
+
</div>
|
953 |
+
|
954 |
+
<div class="row-fluid">
|
955 |
+
<div class="span8 content class">
|
956 |
+
<a id="property_process_mla_gallery_in" name="property_process_mla_gallery_in" class="anchor"></a>
|
957 |
+
<article class="property">
|
958 |
+
<h3 class="public ">$process_mla_gallery_in</h3>
|
959 |
+
<pre class="signature">$process_mla_gallery_in : boolean</pre>
|
960 |
+
<p><em>Option setting for "MLA Gallery in" reporting</em></p>
|
961 |
+
<p>This setting is false if the "MLA Gallery in" database access setting is "disabled", else true.</p>
|
962 |
+
|
963 |
+
<h4>Type</h4>
|
964 |
+
boolean
|
965 |
+
</article>
|
966 |
+
</div>
|
967 |
+
<aside class="span4 detailsbar">
|
968 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
969 |
+
<dl>
|
970 |
+
</dl>
|
971 |
+
<h2>Tags</h2>
|
972 |
+
<table class="table table-condensed">
|
973 |
+
<tr>
|
974 |
+
<th>
|
975 |
+
since
|
976 |
+
</th>
|
977 |
+
<td>
|
978 |
+
|
979 |
+
</td>
|
980 |
+
</tr>
|
981 |
+
</table>
|
982 |
+
</aside>
|
983 |
+
</div>
|
984 |
+
|
985 |
+
<div class="row-fluid">
|
986 |
+
<div class="span8 content class">
|
987 |
+
<a id="property_mla_debug_level" name="property_mla_debug_level" class="anchor"></a>
|
988 |
+
<article class="property">
|
989 |
+
<h3 class="public ">$mla_debug_level</h3>
|
990 |
+
<pre class="signature">$mla_debug_level : integer</pre>
|
991 |
+
<p><em>Effective MLA Debug Level, from MLA_DEBUG_LEVEL or override option</em></p>
|
992 |
+
|
993 |
+
|
994 |
+
<h4>Type</h4>
|
995 |
+
integer
|
996 |
+
</article>
|
997 |
+
</div>
|
998 |
+
<aside class="span4 detailsbar">
|
999 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1000 |
+
<dl>
|
1001 |
+
</dl>
|
1002 |
+
<h2>Tags</h2>
|
1003 |
+
<table class="table table-condensed">
|
1004 |
+
<tr>
|
1005 |
+
<th>
|
1006 |
+
since
|
1007 |
+
</th>
|
1008 |
+
<td>
|
1009 |
+
|
1010 |
+
</td>
|
1011 |
+
</tr>
|
1012 |
+
</table>
|
1013 |
+
</aside>
|
1014 |
+
</div>
|
1015 |
+
|
1016 |
+
<div class="row-fluid">
|
1017 |
+
<div class="span8 content class">
|
1018 |
+
<a id="property_admin_columns_storage_model" name="property_admin_columns_storage_model" class="anchor"></a>
|
1019 |
+
<article class="property">
|
1020 |
+
<h3 class="public ">$admin_columns_storage_model</h3>
|
1021 |
+
<pre class="signature">$admin_columns_storage_model : object</pre>
|
1022 |
+
<p><em>Admin Columns support storage model object for the Media/Assistant submenu</em></p>
|
1023 |
+
|
1024 |
+
|
1025 |
+
<h4>Type</h4>
|
1026 |
+
object
|
1027 |
+
</article>
|
1028 |
+
</div>
|
1029 |
+
<aside class="span4 detailsbar">
|
1030 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1031 |
+
<dl>
|
1032 |
+
</dl>
|
1033 |
+
<h2>Tags</h2>
|
1034 |
+
<table class="table table-condensed">
|
1035 |
+
<tr>
|
1036 |
+
<th>
|
1037 |
+
since
|
1038 |
+
</th>
|
1039 |
+
<td>
|
1040 |
+
|
1041 |
+
</td>
|
1042 |
+
</tr>
|
1043 |
+
</table>
|
1044 |
+
</aside>
|
1045 |
+
</div>
|
1046 |
+
|
1047 |
+
<div class="row-fluid">
|
1048 |
+
<div class="span8 content class">
|
1049 |
+
<a id="property_mla_debug_messages" name="property_mla_debug_messages" class="anchor"></a>
|
1050 |
+
<article class="property">
|
1051 |
+
<h3 class="private ">$mla_debug_messages</h3>
|
1052 |
+
<pre class="signature">$mla_debug_messages : string</pre>
|
1053 |
+
<p><em>Accumulates debug messages</em></p>
|
1054 |
+
|
1055 |
+
|
1056 |
+
<h4>Type</h4>
|
1057 |
+
string
|
1058 |
+
</article>
|
1059 |
+
</div>
|
1060 |
+
<aside class="span4 detailsbar">
|
1061 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1062 |
+
<dl>
|
1063 |
+
</dl>
|
1064 |
+
<h2>Tags</h2>
|
1065 |
+
<table class="table table-condensed">
|
1066 |
+
<tr>
|
1067 |
+
<th>
|
1068 |
+
since
|
1069 |
+
</th>
|
1070 |
+
<td>
|
1071 |
+
|
1072 |
+
</td>
|
1073 |
+
</tr>
|
1074 |
+
</table>
|
1075 |
+
</aside>
|
1076 |
+
</div>
|
1077 |
+
|
1078 |
+
<div class="row-fluid">
|
1079 |
+
<div class="span8 content class">
|
1080 |
+
<a id="property_mla_debug_mode" name="property_mla_debug_mode" class="anchor"></a>
|
1081 |
+
<article class="property">
|
1082 |
+
<h3 class="private ">$mla_debug_mode</h3>
|
1083 |
+
<pre class="signature">$mla_debug_mode : string</pre>
|
1084 |
+
<p><em>Debug information collection mode</em></p>
|
1085 |
+
<p>Collection mode: 'buffer', 'console', 'log' or 'none' (default).</p>
|
1086 |
+
|
1087 |
+
<h4>Type</h4>
|
1088 |
+
string
|
1089 |
+
</article>
|
1090 |
+
</div>
|
1091 |
+
<aside class="span4 detailsbar">
|
1092 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1093 |
+
<dl>
|
1094 |
+
</dl>
|
1095 |
+
<h2>Tags</h2>
|
1096 |
+
<table class="table table-condensed">
|
1097 |
+
<tr>
|
1098 |
+
<th>
|
1099 |
+
since
|
1100 |
+
</th>
|
1101 |
+
<td>
|
1102 |
+
|
1103 |
+
</td>
|
1104 |
+
</tr>
|
1105 |
+
</table>
|
1106 |
+
</aside>
|
1107 |
+
</div>
|
1108 |
+
|
1109 |
+
<div class="row-fluid">
|
1110 |
+
<div class="span8 content class">
|
1111 |
+
<a id="property_mla_debug_file" name="property_mla_debug_file" class="anchor"></a>
|
1112 |
+
<article class="property">
|
1113 |
+
<h3 class="private ">$mla_debug_file</h3>
|
1114 |
+
<pre class="signature">$mla_debug_file : string</pre>
|
1115 |
+
<p><em>Debug information output file for mode = 'log'</em></p>
|
1116 |
+
|
1117 |
+
|
1118 |
+
<h4>Type</h4>
|
1119 |
+
string
|
1120 |
+
</article>
|
1121 |
+
</div>
|
1122 |
+
<aside class="span4 detailsbar">
|
1123 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1124 |
+
<dl>
|
1125 |
+
</dl>
|
1126 |
+
<h2>Tags</h2>
|
1127 |
+
<table class="table table-condensed">
|
1128 |
+
<tr>
|
1129 |
+
<th>
|
1130 |
+
since
|
1131 |
+
</th>
|
1132 |
+
<td>
|
1133 |
+
|
1134 |
+
</td>
|
1135 |
+
</tr>
|
1136 |
+
</table>
|
1137 |
+
</aside>
|
1138 |
+
</div>
|
1139 |
+
|
1140 |
+
|
1141 |
+
<a id="methods" name="methods"></a>
|
1142 |
+
<div class="row-fluid">
|
1143 |
+
<div class="span8 content class"><h2>Methods</h2></div>
|
1144 |
+
<aside class="span4 detailsbar"></aside>
|
1145 |
+
</div>
|
1146 |
+
|
1147 |
+
<div class="row-fluid">
|
1148 |
+
<div class="span8 content class">
|
1149 |
+
<a id="method_initialize" name="method_initialize" class="anchor"></a>
|
1150 |
+
<article class="method">
|
1151 |
+
<h3 class="public ">initialize()</h3>
|
1152 |
+
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
1153 |
+
<pre class="signature" style="margin-right: 54px;">initialize() : void</pre>
|
1154 |
+
<p><em>Initialization function, similar to __construct()</em></p>
|
1155 |
+
|
1156 |
+
|
1157 |
+
|
1158 |
+
|
1159 |
+
|
1160 |
+
</article>
|
1161 |
+
</div>
|
1162 |
+
<aside class="span4 detailsbar">
|
1163 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1164 |
+
<span class="label label-info">static</span>
|
1165 |
+
<dl>
|
1166 |
+
</dl>
|
1167 |
+
<h2>Tags</h2>
|
1168 |
+
<table class="table table-condensed">
|
1169 |
+
<tr>
|
1170 |
+
<th>
|
1171 |
+
since
|
1172 |
+
</th>
|
1173 |
+
<td>
|
1174 |
+
1.00
|
1175 |
+
</td>
|
1176 |
+
</tr>
|
1177 |
+
</table>
|
1178 |
+
</aside>
|
1179 |
+
</div>
|
1180 |
+
|
1181 |
+
<div class="row-fluid">
|
1182 |
+
<div class="span8 content class">
|
1183 |
+
<a id="method_mla_media_view_settings_filter" name="method_mla_media_view_settings_filter" class="anchor"></a>
|
1184 |
+
<article class="method">
|
1185 |
+
<h3 class="public ">mla_media_view_settings_filter()</h3>
|
1186 |
+
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
1187 |
+
<pre class="signature" style="margin-right: 54px;">mla_media_view_settings_filter( <span class="argument">$settings</span>, <span class="argument">$post</span>) </pre>
|
1188 |
+
<p><em>Ensures that MLA media manager enhancements are present when required.</em></p>
|
1189 |
+
<p>Declared public because it is a filter.</p>
|
1190 |
+
|
1191 |
+
<h4>Parameters</h4>
|
1192 |
+
<table class="table table-condensed table-hover">
|
1193 |
+
<tr>
|
1194 |
+
<td></td>
|
1195 |
+
<td>$settings </td>
|
1196 |
+
<td></td>
|
1197 |
+
</tr>
|
1198 |
+
<tr>
|
1199 |
+
<td></td>
|
1200 |
+
<td>$post </td>
|
1201 |
+
<td></td>
|
1202 |
+
</tr>
|
1203 |
+
</table>
|
1204 |
+
|
1205 |
+
|
1206 |
+
|
1207 |
+
</article>
|
1208 |
+
</div>
|
1209 |
+
<aside class="span4 detailsbar">
|
1210 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1211 |
+
<span class="label label-info">static</span>
|
1212 |
+
<dl>
|
1213 |
+
</dl>
|
1214 |
+
<h2>Tags</h2>
|
1215 |
+
<table class="table table-condensed">
|
1216 |
+
<tr>
|
1217 |
+
<th>
|
1218 |
+
since
|
1219 |
+
</th>
|
1220 |
+
<td>
|
1221 |
+
2.30
|
1222 |
+
</td>
|
1223 |
+
</tr>
|
1224 |
+
</table>
|
1225 |
+
</aside>
|
1226 |
+
</div>
|
1227 |
+
|
1228 |
+
<div class="row-fluid">
|
1229 |
+
<div class="span8 content class">
|
1230 |
+
<a id="method_mla_wp_enqueue_media_action" name="method_mla_wp_enqueue_media_action" class="anchor"></a>
|
1231 |
+
<article class="method">
|
1232 |
+
<h3 class="public ">mla_wp_enqueue_media_action()</h3>
|
1233 |
+
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
1234 |
+
<pre class="signature" style="margin-right: 54px;">mla_wp_enqueue_media_action() </pre>
|
1235 |
+
<p><em>Registers and enqueues the mla-beaver-builder-style.css file, when needed.</em></p>
|
1236 |
+
<p>Declared public because it is an action.</p>
|
1237 |
+
|
1238 |
+
|
1239 |
+
|
1240 |
+
|
1241 |
+
</article>
|
1242 |
+
</div>
|
1243 |
+
<aside class="span4 detailsbar">
|
1244 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1245 |
+
<span class="label label-info">static</span>
|
1246 |
+
<dl>
|
1247 |
+
</dl>
|
1248 |
+
<h2>Tags</h2>
|
1249 |
+
<table class="table table-condensed">
|
1250 |
+
<tr>
|
1251 |
+
<th>
|
1252 |
+
since
|
1253 |
+
</th>
|
1254 |
+
<td>
|
1255 |
+
2.30
|
1256 |
+
</td>
|
1257 |
+
</tr>
|
1258 |
+
</table>
|
1259 |
+
</aside>
|
1260 |
+
</div>
|
1261 |
+
|
1262 |
+
<div class="row-fluid">
|
1263 |
+
<div class="span8 content class">
|
1264 |
+
<a id="method_mla_plugins_loaded_action_wpml" name="method_mla_plugins_loaded_action_wpml" class="anchor"></a>
|
1265 |
+
<article class="method">
|
1266 |
+
<h3 class="public ">mla_plugins_loaded_action_wpml()</h3>
|
1267 |
+
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
1268 |
+
<pre class="signature" style="margin-right: 54px;">mla_plugins_loaded_action_wpml() : void</pre>
|
1269 |
+
<p><em>Add the WPML suppress All languages filter</em></p>
|
1270 |
+
<p>The "add_action" for this function is in mla-plugin-loader.php, because the "initialize"
|
1271 |
function above doesn't run in time.
|
1272 |
+
Defined as public because it's an action.</p>
|
1273 |
+
|
1274 |
+
|
1275 |
+
|
1276 |
+
|
1277 |
+
</article>
|
1278 |
+
</div>
|
1279 |
+
<aside class="span4 detailsbar">
|
1280 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1281 |
+
<span class="label label-info">static</span>
|
1282 |
+
<dl>
|
1283 |
+
</dl>
|
1284 |
+
<h2>Tags</h2>
|
1285 |
+
<table class="table table-condensed">
|
1286 |
+
<tr>
|
1287 |
+
<th>
|
1288 |
+
since
|
1289 |
+
</th>
|
1290 |
+
<td>
|
1291 |
+
2.32
|
1292 |
+
</td>
|
1293 |
+
</tr>
|
1294 |
+
</table>
|
1295 |
+
</aside>
|
1296 |
+
</div>
|
1297 |
+
|
1298 |
+
<div class="row-fluid">
|
1299 |
+
<div class="span8 content class">
|
1300 |
+
<a id="method_wpml_unset_lang_admin_bar" name="method_wpml_unset_lang_admin_bar" class="anchor"></a>
|
1301 |
+
<article class="method">
|
1302 |
+
<h3 class="public ">wpml_unset_lang_admin_bar()</h3>
|
1303 |
+
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
1304 |
+
<pre class="signature" style="margin-right: 54px;">wpml_unset_lang_admin_bar( <span class="argument">$suppress_all_languages</span>) </pre>
|
1305 |
+
<p><em>Restores All languages view to Media/Assistant submenu screen</em></p>
|
1306 |
+
|
1307 |
+
|
1308 |
+
<h4>Parameters</h4>
|
1309 |
+
<table class="table table-condensed table-hover">
|
1310 |
+
<tr>
|
1311 |
+
<td></td>
|
1312 |
+
<td>$suppress_all_languages </td>
|
1313 |
+
<td></td>
|
1314 |
+
</tr>
|
1315 |
+
</table>
|
1316 |
+
|
1317 |
+
|
1318 |
+
|
1319 |
+
</article>
|
1320 |
+
</div>
|
1321 |
+
<aside class="span4 detailsbar">
|
1322 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1323 |
+
<span class="label label-info">static</span>
|
1324 |
+
<dl>
|
1325 |
+
</dl>
|
1326 |
+
<h2>Tags</h2>
|
1327 |
+
<table class="table table-condensed">
|
1328 |
+
<tr>
|
1329 |
+
<th>
|
1330 |
+
since
|
1331 |
+
</th>
|
1332 |
+
<td>
|
1333 |
+
2.32
|
1334 |
+
</td>
|
1335 |
+
</tr>
|
1336 |
+
</table>
|
1337 |
+
</aside>
|
1338 |
+
</div>
|
1339 |
+
|
1340 |
+
<div class="row-fluid">
|
1341 |
+
<div class="span8 content class">
|
1342 |
+
<a id="method_mla_plugins_loaded_action" name="method_mla_plugins_loaded_action" class="anchor"></a>
|
1343 |
+
<article class="method">
|
1344 |
+
<h3 class="public ">mla_plugins_loaded_action()</h3>
|
1345 |
+
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
1346 |
+
<pre class="signature" style="margin-right: 54px;">mla_plugins_loaded_action() : void</pre>
|
1347 |
+
<p><em>Load a plugin text domain and alternate debug file</em></p>
|
1348 |
+
<p>The "add_action" for this function is in mla-plugin-loader.php, because the "initialize"
|
1349 |
+
function above doesn't run in time.
|
1350 |
+
Defined as public because it's an action.</p>
|
1351 |
+
|
1352 |
+
|
1353 |
+
|
1354 |
+
|
1355 |
+
</article>
|
1356 |
+
</div>
|
1357 |
+
<aside class="span4 detailsbar">
|
1358 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1359 |
+
<span class="label label-info">static</span>
|
1360 |
+
<dl>
|
1361 |
+
</dl>
|
1362 |
+
<h2>Tags</h2>
|
1363 |
+
<table class="table table-condensed">
|
1364 |
+
<tr>
|
1365 |
+
<th>
|
1366 |
+
since
|
1367 |
+
</th>
|
1368 |
+
<td>
|
1369 |
+
1.60
|
1370 |
+
</td>
|
1371 |
+
</tr>
|
1372 |
+
</table>
|
1373 |
+
</aside>
|
1374 |
+
</div>
|
1375 |
+
|
1376 |
+
<div class="row-fluid">
|
1377 |
+
<div class="span8 content class">
|
1378 |
+
<a id="method_mla_wp_redirect_filter" name="method_mla_wp_redirect_filter" class="anchor"></a>
|
1379 |
+
<article class="method">
|
1380 |
+
<h3 class="public ">mla_wp_redirect_filter()</h3>
|
1381 |
+
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
1382 |
+
<pre class="signature" style="margin-right: 54px;">mla_wp_redirect_filter(string <span class="argument">$location</span>, integer <span class="argument">$status</span>) </pre>
|
1383 |
+
<p><em>Filter the redirect location.</em></p>
|
1384 |
+
|
1385 |
+
|
1386 |
+
<h4>Parameters</h4>
|
1387 |
+
<table class="table table-condensed table-hover">
|
1388 |
+
<tr>
|
1389 |
+
<td>string</td>
|
1390 |
+
<td>$location </td>
|
1391 |
+
<td><p>The path to redirect to.</p></td>
|
1392 |
+
</tr>
|
1393 |
+
<tr>
|
1394 |
+
<td>integer</td>
|
1395 |
+
<td>$status </td>
|
1396 |
+
<td><p>Status code to use.</p></td>
|
1397 |
+
</tr>
|
1398 |
+
</table>
|
1399 |
+
|
1400 |
+
|
1401 |
+
|
1402 |
+
</article>
|
1403 |
+
</div>
|
1404 |
+
<aside class="span4 detailsbar">
|
1405 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1406 |
+
<span class="label label-info">static</span>
|
1407 |
+
<dl>
|
1408 |
+
</dl>
|
1409 |
+
<h2>Tags</h2>
|
1410 |
+
<table class="table table-condensed">
|
1411 |
+
<tr>
|
1412 |
+
<th>
|
1413 |
+
since
|
1414 |
+
</th>
|
1415 |
+
<td>
|
1416 |
+
2.25
|
1417 |
+
</td>
|
1418 |
+
</tr>
|
1419 |
+
</table>
|
1420 |
+
</aside>
|
1421 |
+
</div>
|
1422 |
+
|
1423 |
+
<div class="row-fluid">
|
1424 |
+
<div class="span8 content class">
|
1425 |
+
<a id="method_mla_initialize_tax_checked_on_top" name="method_mla_initialize_tax_checked_on_top" class="anchor"></a>
|
1426 |
+
<article class="method">
|
1427 |
+
<h3 class="public ">mla_initialize_tax_checked_on_top()</h3>
|
1428 |
+
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
1429 |
+
<pre class="signature" style="margin-right: 54px;">mla_initialize_tax_checked_on_top() : void</pre>
|
1430 |
+
<p><em>Initialize "tax_checked_on_top" => "checked" default for all supported taxonomies</em></p>
|
1431 |
+
<p>Called after all taxonomies are registered, e.g., in MLAObjects::_build_taxonomies.</p>
|
1432 |
+
|
1433 |
+
|
1434 |
+
|
1435 |
+
|
1436 |
+
</article>
|
1437 |
+
</div>
|
1438 |
+
<aside class="span4 detailsbar">
|
1439 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1440 |
+
<span class="label label-info">static</span>
|
1441 |
+
<dl>
|
1442 |
+
</dl>
|
1443 |
+
<h2>Tags</h2>
|
1444 |
+
<table class="table table-condensed">
|
1445 |
+
<tr>
|
1446 |
+
<th>
|
1447 |
+
since
|
1448 |
+
</th>
|
1449 |
+
<td>
|
1450 |
+
2.02
|
1451 |
+
</td>
|
1452 |
+
</tr>
|
1453 |
+
</table>
|
1454 |
+
</aside>
|
1455 |
+
</div>
|
1456 |
+
|
1457 |
+
<div class="row-fluid">
|
1458 |
+
<div class="span8 content class">
|
1459 |
+
<a id="method_mla_get_option" name="method_mla_get_option" class="anchor"></a>
|
1460 |
+
<article class="method">
|
1461 |
+
<h3 class="public ">mla_get_option()</h3>
|
1462 |
+
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
1463 |
+
<pre class="signature" style="margin-right: 54px;">mla_get_option( <span class="argument">$option</span>, <span class="argument">$get_default = false</span>, <span class="argument">$get_stored = false</span>, <span class="argument">$option_table = NULL</span>) : mixed</pre>
|
1464 |
+
<p><em>Return the stored value or default value of a defined MLA option</em></p>
|
1465 |
+
|
1466 |
+
|
1467 |
+
<h4>Parameters</h4>
|
1468 |
+
<table class="table table-condensed table-hover">
|
1469 |
+
<tr>
|
1470 |
+
<td></td>
|
1471 |
+
<td>$option </td>
|
1472 |
+
<td></td>
|
1473 |
+
</tr>
|
1474 |
+
<tr>
|
1475 |
+
<td></td>
|
1476 |
+
<td>$get_default </td>
|
1477 |
+
<td></td>
|
1478 |
+
</tr>
|
1479 |
+
<tr>
|
1480 |
+
<td></td>
|
1481 |
+
<td>$get_stored </td>
|
1482 |
+
<td></td>
|
1483 |
+
</tr>
|
1484 |
+
<tr>
|
1485 |
+
<td></td>
|
1486 |
+
<td>$option_table </td>
|
1487 |
+
<td></td>
|
1488 |
+
</tr>
|
1489 |
+
</table>
|
1490 |
+
|
1491 |
+
|
1492 |
+
<h4>Returns</h4>
|
1493 |
+
mixed
|
1494 |
+
— <p>Value(s) for the option or false if the option is not a defined MLA option</p>
|
1495 |
+
|
1496 |
+
</article>
|
1497 |
+
</div>
|
1498 |
+
<aside class="span4 detailsbar">
|
1499 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1500 |
+
<span class="label label-info">static</span>
|
1501 |
+
<dl>
|
1502 |
+
</dl>
|
1503 |
+
<h2>Tags</h2>
|
1504 |
+
<table class="table table-condensed">
|
1505 |
+
<tr>
|
1506 |
+
<th>
|
1507 |
+
since
|
1508 |
+
</th>
|
1509 |
+
<td>
|
1510 |
+
2.20
|
1511 |
+
</td>
|
1512 |
+
</tr>
|
1513 |
+
</table>
|
1514 |
+
</aside>
|
1515 |
+
</div>
|
1516 |
+
|
1517 |
+
<div class="row-fluid">
|
1518 |
+
<div class="span8 content class">
|
1519 |
+
<a id="method_mla_update_option" name="method_mla_update_option" class="anchor"></a>
|
1520 |
+
<article class="method">
|
1521 |
+
<h3 class="public ">mla_update_option()</h3>
|
1522 |
+
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
1523 |
+
<pre class="signature" style="margin-right: 54px;">mla_update_option( <span class="argument">$option</span>, <span class="argument">$newvalue</span>, <span class="argument">$option_table = NULL</span>) : boolean</pre>
|
1524 |
+
<p><em>Add or update the stored value of a defined MLA option</em></p>
|
1525 |
+
|
1526 |
+
|
1527 |
+
<h4>Parameters</h4>
|
1528 |
+
<table class="table table-condensed table-hover">
|
1529 |
+
<tr>
|
1530 |
+
<td></td>
|
1531 |
+
<td>$option </td>
|
1532 |
+
<td></td>
|
1533 |
+
</tr>
|
1534 |
+
<tr>
|
1535 |
+
<td></td>
|
1536 |
+
<td>$newvalue </td>
|
1537 |
+
<td></td>
|
1538 |
+
</tr>
|
1539 |
+
<tr>
|
1540 |
+
<td></td>
|
1541 |
+
<td>$option_table </td>
|
1542 |
+
<td></td>
|
1543 |
+
</tr>
|
1544 |
+
</table>
|
1545 |
+
|
1546 |
+
|
1547 |
+
<h4>Returns</h4>
|
1548 |
+
boolean
|
1549 |
+
— <p>True if the value was changed or false if the update failed</p>
|
1550 |
+
|
1551 |
+
</article>
|
1552 |
+
</div>
|
1553 |
+
<aside class="span4 detailsbar">
|
1554 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1555 |
+
<span class="label label-info">static</span>
|
1556 |
+
<dl>
|
1557 |
+
</dl>
|
1558 |
+
<h2>Tags</h2>
|
1559 |
+
<table class="table table-condensed">
|
1560 |
+
<tr>
|
1561 |
+
<th>
|
1562 |
+
since
|
1563 |
+
</th>
|
1564 |
+
<td>
|
1565 |
+
2.20
|
1566 |
+
</td>
|
1567 |
+
</tr>
|
1568 |
+
</table>
|
1569 |
+
</aside>
|
1570 |
+
</div>
|
1571 |
+
|
1572 |
+
<div class="row-fluid">
|
1573 |
+
<div class="span8 content class">
|
1574 |
+
<a id="method_mla_delete_option" name="method_mla_delete_option" class="anchor"></a>
|
1575 |
+
<article class="method">
|
1576 |
+
<h3 class="public ">mla_delete_option()</h3>
|
1577 |
+
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
1578 |
+
<pre class="signature" style="margin-right: 54px;">mla_delete_option( <span class="argument">$option</span>, <span class="argument">$option_table = NULL</span>) : boolean</pre>
|
1579 |
+
<p><em>Delete the stored value of a defined MLA option</em></p>
|
1580 |
+
|
1581 |
+
|
1582 |
+
<h4>Parameters</h4>
|
1583 |
+
<table class="table table-condensed table-hover">
|
1584 |
+
<tr>
|
1585 |
+
<td></td>
|
1586 |
+
<td>$option </td>
|
1587 |
+
<td></td>
|
1588 |
+
</tr>
|
1589 |
+
<tr>
|
1590 |
+
<td></td>
|
1591 |
+
<td>$option_table </td>
|
1592 |
+
<td></td>
|
1593 |
+
</tr>
|
1594 |
+
</table>
|
1595 |
+
|
1596 |
+
|
1597 |
+
<h4>Returns</h4>
|
1598 |
+
boolean
|
1599 |
+
— <p>True if the option was deleted, otherwise false</p>
|
1600 |
+
|
1601 |
+
</article>
|
1602 |
+
</div>
|
1603 |
+
<aside class="span4 detailsbar">
|
1604 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1605 |
+
<span class="label label-info">static</span>
|
1606 |
+
<dl>
|
1607 |
+
</dl>
|
1608 |
+
<h2>Tags</h2>
|
1609 |
+
<table class="table table-condensed">
|
1610 |
+
<tr>
|
1611 |
+
<th>
|
1612 |
+
since
|
1613 |
+
</th>
|
1614 |
+
<td>
|
1615 |
+
2.20
|
1616 |
+
</td>
|
1617 |
+
</tr>
|
1618 |
+
</table>
|
1619 |
+
</aside>
|
1620 |
+
</div>
|
1621 |
+
|
1622 |
+
<div class="row-fluid">
|
1623 |
+
<div class="span8 content class">
|
1624 |
+
<a id="method_mla_load_template" name="method_mla_load_template" class="anchor"></a>
|
1625 |
+
<article class="method">
|
1626 |
+
<h3 class="public ">mla_load_template()</h3>
|
1627 |
+
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
1628 |
+
<pre class="signature" style="margin-right: 54px;">mla_load_template( <span class="argument">$source</span>, <span class="argument">$type = 'file'</span>) : string|array|false|NULL</pre>
|
1629 |
+
<p><em>Load an HTML template from a file</em></p>
|
1630 |
+
<p>Loads a template to a string or a multi-part template to an array.
|
1631 |
+
Multi-part templates are divided by comments of the form <!-- template="key" -->,
|
1632 |
+
where "key" becomes the key part of the array.</p>
|
1633 |
+
|
1634 |
+
<h4>Parameters</h4>
|
1635 |
+
<table class="table table-condensed table-hover">
|
1636 |
+
<tr>
|
1637 |
+
<td></td>
|
1638 |
+
<td>$source </td>
|
1639 |
+
<td></td>
|
1640 |
+
</tr>
|
1641 |
+
<tr>
|
1642 |
+
<td></td>
|
1643 |
+
<td>$type </td>
|
1644 |
+
<td></td>
|
1645 |
+
</tr>
|
1646 |
+
</table>
|
1647 |
+
|
1648 |
+
|
1649 |
+
<h4>Returns</h4>
|
1650 |
+
string|array|false|NULL
|
1651 |
+
— <p>string for files that do not contain template divider comments,
|
1652 |
+
array for files containing template divider comments,
|
1653 |
+
false if file or option does not exist,
|
1654 |
+
NULL if file could not be loaded.</p>
|
1655 |
+
|
1656 |
+
</article>
|
1657 |
+
</div>
|
1658 |
+
<aside class="span4 detailsbar">
|
1659 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1660 |
+
<span class="label label-info">static</span>
|
1661 |
+
<dl>
|
1662 |
+
</dl>
|
1663 |
+
<h2>Tags</h2>
|
1664 |
+
<table class="table table-condensed">
|
1665 |
+
<tr>
|
1666 |
+
<th>
|
1667 |
+
since
|
1668 |
+
</th>
|
1669 |
+
<td>
|
1670 |
+
0.1
|
1671 |
+
</td>
|
1672 |
+
</tr>
|
1673 |
+
</table>
|
1674 |
+
</aside>
|
1675 |
+
</div>
|
1676 |
+
|
1677 |
+
<div class="row-fluid">
|
1678 |
+
<div class="span8 content class">
|
1679 |
+
<a id="method_mla_taxonomy_support" name="method_mla_taxonomy_support" class="anchor"></a>
|
1680 |
+
<article class="method">
|
1681 |
+
<h3 class="public ">mla_taxonomy_support()</h3>
|
1682 |
+
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
1683 |
+
<pre class="signature" style="margin-right: 54px;">mla_taxonomy_support( <span class="argument">$tax_name</span>, <span class="argument">$support_type = 'support'</span>) : boolean|string</pre>
|
1684 |
+
<p><em>Determine MLA support for a taxonomy, handling the special case where the
|
1685 |
+
settings are being updated or reset.</em></p>
|
1686 |
+
|
1687 |
+
|
1688 |
+
<h4>Parameters</h4>
|
1689 |
+
<table class="table table-condensed table-hover">
|
1690 |
+
<tr>
|
1691 |
+
<td></td>
|
1692 |
+
<td>$tax_name </td>
|
1693 |
+
<td></td>
|
1694 |
+
</tr>
|
1695 |
+
<tr>
|
1696 |
+
<td></td>
|
1697 |
+
<td>$support_type </td>
|
1698 |
+
<td></td>
|
1699 |
+
</tr>
|
1700 |
+
</table>
|
1701 |
+
|
1702 |
+
|
1703 |
+
<h4>Returns</h4>
|
1704 |
+
boolean|string
|
1705 |
+
— <p>true if the taxonomy is supported in this way else false.
|
1706 |
+
string if $tax_name is '' and $support_type is 'filter', returns the taxonomy to filter by.
|
1707 |
+
string if $support_type is 'metakey', returns the custom field to filter by.</p>
|
1708 |
+
|
1709 |
+
</article>
|
1710 |
+
</div>
|
1711 |
+
<aside class="span4 detailsbar">
|
1712 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1713 |
+
<span class="label label-info">static</span>
|
1714 |
+
<dl>
|
1715 |
+
</dl>
|
1716 |
+
<h2>Tags</h2>
|
1717 |
+
<table class="table table-condensed">
|
1718 |
+
<tr>
|
1719 |
+
<th>
|
1720 |
+
since
|
1721 |
+
</th>
|
1722 |
+
<td>
|
1723 |
+
2.20
|
1724 |
+
</td>
|
1725 |
+
</tr>
|
1726 |
+
</table>
|
1727 |
+
</aside>
|
1728 |
+
</div>
|
1729 |
+
|
1730 |
+
<div class="row-fluid">
|
1731 |
+
<div class="span8 content class">
|
1732 |
+
<a id="method_mla_supported_taxonomies" name="method_mla_supported_taxonomies" class="anchor"></a>
|
1733 |
+
<article class="method">
|
1734 |
+
<h3 class="public ">mla_supported_taxonomies()</h3>
|
1735 |
+
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
1736 |
+
<pre class="signature" style="margin-right: 54px;">mla_supported_taxonomies( <span class="argument">$support_type = 'support'</span>) : array|string</pre>
|
1737 |
+
<p><em>Returns an array of taxonomy names assigned to $support_type</em></p>
|
1738 |
+
|
1739 |
+
|
1740 |
+
<h4>Parameters</h4>
|
1741 |
+
<table class="table table-condensed table-hover">
|
1742 |
+
<tr>
|
1743 |
+
<td></td>
|
1744 |
+
<td>$support_type </td>
|
1745 |
+
<td></td>
|
1746 |
+
</tr>
|
1747 |
+
</table>
|
1748 |
+
|
1749 |
+
|
1750 |
+
<h4>Returns</h4>
|
1751 |
+
array|string
|
1752 |
+
— <p>array taxonomies assigned to $support_type; can be empty.
|
1753 |
+
string if $support_type is 'metakey', returns the custom field to filter by.</p>
|
1754 |
+
|
1755 |
+
</article>
|
1756 |
+
</div>
|
1757 |
+
<aside class="span4 detailsbar">
|
1758 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1759 |
+
<span class="label label-info">static</span>
|
1760 |
+
<dl>
|
1761 |
+
</dl>
|
1762 |
+
<h2>Tags</h2>
|
1763 |
+
<table class="table table-condensed">
|
1764 |
+
<tr>
|
1765 |
+
<th>
|
1766 |
+
since
|
1767 |
+
</th>
|
1768 |
+
<td>
|
1769 |
+
2.20
|
1770 |
+
</td>
|
1771 |
+
</tr>
|
1772 |
+
</table>
|
1773 |
+
</aside>
|
1774 |
+
</div>
|
1775 |
+
|
1776 |
+
<div class="row-fluid">
|
1777 |
+
<div class="span8 content class">
|
1778 |
+
<a id="method_mla_custom_field_support" name="method_mla_custom_field_support" class="anchor"></a>
|
1779 |
+
<article class="method">
|
1780 |
+
<h3 class="public ">mla_custom_field_support()</h3>
|
1781 |
+
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
1782 |
+
<pre class="signature" style="margin-right: 54px;">mla_custom_field_support( <span class="argument">$support_type = 'default_columns'</span>) : array</pre>
|
1783 |
+
<p><em>Evaluate support information for custom field mapping</em></p>
|
1784 |
+
|
1785 |
+
|
1786 |
+
<h4>Parameters</h4>
|
1787 |
+
<table class="table table-condensed table-hover">
|
1788 |
+
<tr>
|
1789 |
+
<td></td>
|
1790 |
+
<td>$support_type </td>
|
1791 |
+
<td></td>
|
1792 |
+
</tr>
|
1793 |
+
</table>
|
1794 |
+
|
1795 |
+
|
1796 |
+
<h4>Returns</h4>
|
1797 |
+
array
|
1798 |
+
— <p>default, hidden, sortable quick_edit or bulk_edit colums in appropriate format</p>
|
1799 |
+
|
1800 |
+
</article>
|
1801 |
+
</div>
|
1802 |
+
<aside class="span4 detailsbar">
|
1803 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1804 |
+
<span class="label label-info">static</span>
|
1805 |
+
<dl>
|
1806 |
+
</dl>
|
1807 |
+
<h2>Tags</h2>
|
1808 |
+
<table class="table table-condensed">
|
1809 |
+
<tr>
|
1810 |
+
<th>
|
1811 |
+
since
|
1812 |
+
</th>
|
1813 |
+
<td>
|
1814 |
+
1.10
|
1815 |
+
</td>
|
1816 |
+
</tr>
|
1817 |
+
</table>
|
1818 |
+
</aside>
|
1819 |
+
</div>
|
1820 |
+
|
1821 |
+
<div class="row-fluid">
|
1822 |
+
<div class="span8 content class">
|
1823 |
+
<a id="method_mla_prepare_view_query" name="method_mla_prepare_view_query" class="anchor"></a>
|
1824 |
+
<article class="method">
|
1825 |
+
<h3 class="public ">mla_prepare_view_query()</h3>
|
1826 |
+
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
1827 |
+
<pre class="signature" style="margin-right: 54px;">mla_prepare_view_query( <span class="argument">$slug</span>, <span class="argument">$specification</span>) : array</pre>
|
1828 |
+
<p><em>Convert a Library View/Post MIME Type specification to WP_Query parameters</em></p>
|
1829 |
+
|
1830 |
+
|
1831 |
+
<h4>Parameters</h4>
|
1832 |
+
<table class="table table-condensed table-hover">
|
1833 |
+
<tr>
|
1834 |
+
<td></td>
|
1835 |
+
<td>$slug </td>
|
1836 |
+
<td></td>
|
1837 |
+
</tr>
|
1838 |
+
<tr>
|
1839 |
+
<td></td>
|
1840 |
+
<td>$specification </td>
|
1841 |
+
<td></td>
|
1842 |
+
</tr>
|
1843 |
+
</table>
|
1844 |
+
|
1845 |
+
|
1846 |
+
<h4>Returns</h4>
|
1847 |
+
array
|
1848 |
+
— <p>post_mime_type specification or custom field query</p>
|
1849 |
+
|
1850 |
+
</article>
|
1851 |
+
</div>
|
1852 |
+
<aside class="span4 detailsbar">
|
1853 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1854 |
+
<span class="label label-info">static</span>
|
1855 |
+
<dl>
|
1856 |
+
</dl>
|
1857 |
+
<h2>Tags</h2>
|
1858 |
+
<table class="table table-condensed">
|
1859 |
+
<tr>
|
1860 |
+
<th>
|
1861 |
+
since
|
1862 |
+
</th>
|
1863 |
+
<td>
|
1864 |
+
1.40
|
1865 |
+
</td>
|
1866 |
+
</tr>
|
1867 |
+
</table>
|
1868 |
+
</aside>
|
1869 |
+
</div>
|
1870 |
+
|
1871 |
+
<div class="row-fluid">
|
1872 |
+
<div class="span8 content class">
|
1873 |
+
<a id="method_mla_parse_view_specification" name="method_mla_parse_view_specification" class="anchor"></a>
|
1874 |
+
<article class="method">
|
1875 |
+
<h3 class="public ">mla_parse_view_specification()</h3>
|
1876 |
+
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
1877 |
+
<pre class="signature" style="margin-right: 54px;">mla_parse_view_specification( <span class="argument">$specification</span>) : array</pre>
|
1878 |
+
<p><em>Analyze a Library View/Post MIME Type specification, returning an array of the placeholders it contains</em></p>
|
1879 |
+
|
1880 |
+
|
1881 |
+
<h4>Parameters</h4>
|
1882 |
+
<table class="table table-condensed table-hover">
|
1883 |
+
<tr>
|
1884 |
+
<td></td>
|
1885 |
+
<td>$specification </td>
|
1886 |
+
<td></td>
|
1887 |
+
</tr>
|
1888 |
+
</table>
|
1889 |
+
|
1890 |
+
|
1891 |
+
<h4>Returns</h4>
|
1892 |
+
array
|
1893 |
+
— <p>( ['prefix'] => string, ['name'] => string, ['value'] => string, ['option'] => string, optional ['error'] => string )</p>
|
1894 |
+
|
1895 |
+
</article>
|
1896 |
+
</div>
|
1897 |
+
<aside class="span4 detailsbar">
|
1898 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1899 |
+
<span class="label label-info">static</span>
|
1900 |
+
<dl>
|
1901 |
+
</dl>
|
1902 |
+
<h2>Tags</h2>
|
1903 |
+
<table class="table table-condensed">
|
1904 |
+
<tr>
|
1905 |
+
<th>
|
1906 |
+
since
|
1907 |
+
</th>
|
1908 |
+
<td>
|
1909 |
+
1.40
|
1910 |
+
</td>
|
1911 |
+
</tr>
|
1912 |
+
</table>
|
1913 |
+
</aside>
|
1914 |
+
</div>
|
1915 |
+
|
1916 |
+
<div class="row-fluid">
|
1917 |
+
<div class="span8 content class">
|
1918 |
+
<a id="method_mla_checklist_meta_box" name="method_mla_checklist_meta_box" class="anchor"></a>
|
1919 |
+
<article class="method">
|
1920 |
+
<h3 class="public ">mla_checklist_meta_box()</h3>
|
1921 |
+
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
1922 |
+
<pre class="signature" style="margin-right: 54px;">mla_checklist_meta_box( <span class="argument">$target_post</span>, <span class="argument">$box</span>) : void</pre>
|
1923 |
+
<p><em>Display taxonomy "checklist" form fields</em></p>
|
1924 |
+
<p>Adapted from /wp-admin/includes/ajax-actions.php function _wp_ajax_add_hierarchical_term().
|
1925 |
+
Includes the "? Search" area to filter the term checklist by entering part
|
1926 |
+
or all of a word/phrase in the term label.
|
1927 |
+
Output to the Media/Edit Media screen and to the Media Manager Modal Window.</p>
|
1928 |
+
|
1929 |
+
<h4>Parameters</h4>
|
1930 |
+
<table class="table table-condensed table-hover">
|
1931 |
+
<tr>
|
1932 |
+
<td></td>
|
1933 |
+
<td>$target_post </td>
|
1934 |
+
<td></td>
|
1935 |
+
</tr>
|
1936 |
+
<tr>
|
1937 |
+
<td></td>
|
1938 |
+
<td>$box </td>
|
1939 |
+
<td></td>
|
1940 |
+
</tr>
|
1941 |
+
</table>
|
1942 |
+
|
1943 |
+
|
1944 |
+
|
1945 |
+
</article>
|
1946 |
+
</div>
|
1947 |
+
<aside class="span4 detailsbar">
|
1948 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1949 |
+
<span class="label label-info">static</span>
|
1950 |
+
<dl>
|
1951 |
+
</dl>
|
1952 |
+
<h2>Tags</h2>
|
1953 |
+
<table class="table table-condensed">
|
1954 |
+
<tr>
|
1955 |
+
<th>
|
1956 |
+
since
|
1957 |
+
</th>
|
1958 |
+
<td>
|
1959 |
+
1.71
|
1960 |
+
</td>
|
1961 |
+
</tr>
|
1962 |
+
</table>
|
1963 |
+
</aside>
|
1964 |
+
</div>
|
1965 |
+
|
1966 |
+
<div class="row-fluid">
|
1967 |
+
<div class="span8 content class">
|
1968 |
+
<a id="method_mla_debug_mode" name="method_mla_debug_mode" class="anchor"></a>
|
1969 |
+
<article class="method">
|
1970 |
+
<h3 class="public ">mla_debug_mode()</h3>
|
1971 |
+
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
1972 |
+
<pre class="signature" style="margin-right: 54px;">mla_debug_mode(string <span class="argument">$mode = false</span>) : string</pre>
|
1973 |
+
<p><em>Get/Set debug information collection mode</em></p>
|
1974 |
+
|
1975 |
+
|
1976 |
+
<h4>Parameters</h4>
|
1977 |
+
<table class="table table-condensed table-hover">
|
1978 |
+
<tr>
|
1979 |
+
<td>string</td>
|
1980 |
+
<td>$mode </td>
|
1981 |
+
<td><p>Optional. New collection mode: 'none' (default), 'buffer', 'console' or 'log'</p></td>
|
1982 |
+
</tr>
|
1983 |
+
</table>
|
1984 |
+
|
1985 |
+
|
1986 |
+
<h4>Returns</h4>
|
1987 |
+
string
|
1988 |
+
— <p>The previous mode value, i.e., before the update</p>
|
1989 |
+
|
1990 |
+
</article>
|
1991 |
+
</div>
|
1992 |
+
<aside class="span4 detailsbar">
|
1993 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1994 |
+
<span class="label label-info">static</span>
|
1995 |
+
<dl>
|
1996 |
+
</dl>
|
1997 |
+
<h2>Tags</h2>
|
1998 |
+
<table class="table table-condensed">
|
1999 |
+
<tr>
|
2000 |
+
<th>
|
2001 |
+
since
|
2002 |
+
</th>
|
2003 |
+
<td>
|
2004 |
+
2.12
|
2005 |
+
</td>
|
2006 |
+
</tr>
|
2007 |
+
</table>
|
2008 |
+
</aside>
|
2009 |
+
</div>
|
2010 |
+
|
2011 |
+
<div class="row-fluid">
|
2012 |
+
<div class="span8 content class">
|
2013 |
+
<a id="method_mla_debug_file" name="method_mla_debug_file" class="anchor"></a>
|
2014 |
+
<article class="method">
|
2015 |
+
<h3 class="public ">mla_debug_file()</h3>
|
2016 |
+
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
2017 |
+
<pre class="signature" style="margin-right: 54px;">mla_debug_file(string <span class="argument">$file = NULL</span>) : string</pre>
|
2018 |
+
<p><em>Get/Set debug information collection output file for mode = 'log'</em></p>
|
2019 |
+
<p>Note that WP_CONTENT_DIR will be pre-pended to the value, and a slash
|
2020 |
+
will be added to the front of the value if necessary.</p>
|
2021 |
+
|
2022 |
+
<h4>Parameters</h4>
|
2023 |
+
<table class="table table-condensed table-hover">
|
2024 |
+
<tr>
|
2025 |
+
<td>string</td>
|
2026 |
+
<td>$file </td>
|
2027 |
+
<td><p>Optional. The (optional path and) file name, relative to WP_CONTENT_DIR,
|
2028 |
+
or false/empty string to clear the value.</p></td>
|
2029 |
+
</tr>
|
2030 |
+
</table>
|
2031 |
+
|
2032 |
+
|
2033 |
+
<h4>Returns</h4>
|
2034 |
+
string
|
2035 |
+
— <p>The previous file value, i.e., before the update, relative to WP_CONTENT_DIR</p>
|
2036 |
+
|
2037 |
+
</article>
|
2038 |
+
</div>
|
2039 |
+
<aside class="span4 detailsbar">
|
2040 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
2041 |
+
<span class="label label-info">static</span>
|
2042 |
+
<dl>
|
2043 |
+
</dl>
|
2044 |
+
<h2>Tags</h2>
|
2045 |
+
<table class="table table-condensed">
|
2046 |
+
<tr>
|
2047 |
+
<th>
|
2048 |
+
since
|
2049 |
+
</th>
|
2050 |
+
<td>
|
2051 |
+
2.14
|
2052 |
+
</td>
|
2053 |
+
</tr>
|
2054 |
+
</table>
|
2055 |
+
</aside>
|
2056 |
+
</div>
|
2057 |
+
|
2058 |
+
<div class="row-fluid">
|
2059 |
+
<div class="span8 content class">
|
2060 |
+
<a id="method_mla_debug_content" name="method_mla_debug_content" class="anchor"></a>
|
2061 |
+
<article class="method">
|
2062 |
+
<h3 class="public ">mla_debug_content()</h3>
|
2063 |
+
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
2064 |
+
<pre class="signature" style="margin-right: 54px;">mla_debug_content(string <span class="argument">$format = 'string'</span>, string <span class="argument">$glue = '<p>'</span>) : boolean</pre>
|
2065 |
+
<p><em>Get debug information without clearing the buffer</em></p>
|
2066 |
+
|
2067 |
+
|
2068 |
+
<h4>Parameters</h4>
|
2069 |
+
<table class="table table-condensed table-hover">
|
2070 |
+
<tr>
|
2071 |
+
<td>string</td>
|
2072 |
+
<td>$format </td>
|
2073 |
+
<td><p>Return data type: 'string' (default) or 'array'</p></td>
|
2074 |
+
</tr>
|
2075 |
+
<tr>
|
2076 |
+
<td>string</td>
|
2077 |
+
<td>$glue </td>
|
2078 |
+
<td><p>Join array elements with '\n' or '<p>' (default)</p></td>
|
2079 |
+
</tr>
|
2080 |
+
</table>
|
2081 |
+
|
2082 |
+
|
2083 |
+
<h4>Returns</h4>
|
2084 |
+
boolean
|
2085 |
+
— <p>true if success else false</p>
|
2086 |
+
|
2087 |
+
</article>
|
2088 |
+
</div>
|
2089 |
+
<aside class="span4 detailsbar">
|
2090 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
2091 |
+
<span class="label label-info">static</span>
|
2092 |
+
<dl>
|
2093 |
+
</dl>
|
2094 |
+
<h2>Tags</h2>
|
2095 |
+
<table class="table table-condensed">
|
2096 |
+
<tr>
|
2097 |
+
<th>
|
2098 |
+
since
|
2099 |
+
</th>
|
2100 |
+
<td>
|
2101 |
+
2.12
|
2102 |
+
</td>
|
2103 |
+
</tr>
|
2104 |
+
</table>
|
2105 |
+
</aside>
|
2106 |
+
</div>
|
2107 |
+
|
2108 |
+
<div class="row-fluid">
|
2109 |
+
<div class="span8 content class">
|
2110 |
+
<a id="method_mla_debug_flush" name="method_mla_debug_flush" class="anchor"></a>
|
2111 |
+
<article class="method">
|
2112 |
+
<h3 class="public ">mla_debug_flush()</h3>
|
2113 |
+
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
2114 |
+
<pre class="signature" style="margin-right: 54px;">mla_debug_flush(string <span class="argument">$destination = 'buffer'</span>, boolean <span class="argument">$stop_collecting = true</span>) : string</pre>
|
2115 |
+
<p><em>Flush debug information and clear buffer</em></p>
|
2116 |
+
|
2117 |
+
|
2118 |
+
<h4>Parameters</h4>
|
2119 |
+
<table class="table table-condensed table-hover">
|
2120 |
+
<tr>
|
2121 |
+
<td>string</td>
|
2122 |
+
<td>$destination </td>
|
2123 |
+
<td><p>Destination: 'buffer' (default), 'console', 'log' or 'none'</p></td>
|
2124 |
+
</tr>
|
2125 |
+
<tr>
|
2126 |
+
<td>boolean</td>
|
2127 |
+
<td>$stop_collecting </td>
|
2128 |
+
<td><p>true (default) to stop, false to continue collection</p></td>
|
2129 |
+
</tr>
|
2130 |
+
</table>
|
2131 |
+
|
2132 |
+
|
2133 |
+
<h4>Returns</h4>
|
2134 |
+
string
|
2135 |
+
— <p>debug content if $destination == 'buffer' else empty string</p>
|
2136 |
+
|
2137 |
+
</article>
|
2138 |
+
</div>
|
2139 |
+
<aside class="span4 detailsbar">
|
2140 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
2141 |
+
<span class="label label-info">static</span>
|
2142 |
+
<dl>
|
2143 |
+
</dl>
|
2144 |
+
<h2>Tags</h2>
|
2145 |
+
<table class="table table-condensed">
|
2146 |
+
<tr>
|
2147 |
+
<th>
|
2148 |
+
since
|
2149 |
+
</th>
|
2150 |
+
<td>
|
2151 |
+
2.12
|
2152 |
+
</td>
|
2153 |
+
</tr>
|
2154 |
+
</table>
|
2155 |
+
</aside>
|
2156 |
+
</div>
|
2157 |
+
|
2158 |
+
<div class="row-fluid">
|
2159 |
+
<div class="span8 content class">
|
2160 |
+
<a id="method_mla_debug_add" name="method_mla_debug_add" class="anchor"></a>
|
2161 |
+
<article class="method">
|
2162 |
+
<h3 class="public ">mla_debug_add()</h3>
|
2163 |
+
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
2164 |
+
<pre class="signature" style="margin-right: 54px;">mla_debug_add(string <span class="argument">$message</span>, integer <span class="argument">$debug_level = NULL</span>) </pre>
|
2165 |
+
<p><em>Add a debug message to the collection</em></p>
|
2166 |
+
|
2167 |
+
|
2168 |
+
<h4>Parameters</h4>
|
2169 |
+
<table class="table table-condensed table-hover">
|
2170 |
+
<tr>
|
2171 |
+
<td>string</td>
|
2172 |
+
<td>$message </td>
|
2173 |
+
<td><p>Message text</p></td>
|
2174 |
+
</tr>
|
2175 |
+
<tr>
|
2176 |
+
<td>integer</td>
|
2177 |
+
<td>$debug_level </td>
|
2178 |
+
<td><p>Optional. Debug category.</p></td>
|
2179 |
+
</tr>
|
2180 |
+
</table>
|
2181 |
+
|
2182 |
+
|
2183 |
+
|
2184 |
+
</article>
|
2185 |
+
</div>
|
2186 |
+
<aside class="span4 detailsbar">
|
2187 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
2188 |
+
<span class="label label-info">static</span>
|
2189 |
+
<dl>
|
2190 |
+
</dl>
|
2191 |
+
<h2>Tags</h2>
|
2192 |
+
<table class="table table-condensed">
|
2193 |
+
<tr>
|
2194 |
+
<th>
|
2195 |
+
since
|
2196 |
+
</th>
|
2197 |
+
<td>
|
2198 |
+
2.12
|
2199 |
+
</td>
|
2200 |
+
</tr>
|
2201 |
+
</table>
|
2202 |
+
</aside>
|
2203 |
+
</div>
|
2204 |
+
|
2205 |
+
<div class="row-fluid">
|
2206 |
+
<div class="span8 content class">
|
2207 |
+
<a id="method_admin_columns_support" name="method_admin_columns_support" class="anchor"></a>
|
2208 |
+
<article class="method">
|
2209 |
+
<h3 class="public ">admin_columns_support()</h3>
|
2210 |
+
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
2211 |
+
<pre class="signature" style="margin-right: 54px;">admin_columns_support(array <span class="argument">$storage_models</span>, object <span class="argument">$cpac</span>) </pre>
|
2212 |
+
<p><em>Define the Media/Assistant submenu screen to the Admin Columns plugin</em></p>
|
2213 |
+
|
2214 |
+
|
2215 |
+
<h4>Parameters</h4>
|
2216 |
+
<table class="table table-condensed table-hover">
|
2217 |
+
<tr>
|
2218 |
+
<td>array</td>
|
2219 |
+
<td>$storage_models </td>
|
2220 |
+
<td><p>List of storage model class instances ( [key] => [CPAC_Storage_Model object] )</p></td>
|
2221 |
+
</tr>
|
2222 |
+
<tr>
|
2223 |
+
<td>object</td>
|
2224 |
+
<td>$cpac </td>
|
2225 |
+
<td><p>CPAC, the root CodePress Admin Columns object</p></td>
|
2226 |
+
</tr>
|
2227 |
+
</table>
|
2228 |
+
|
2229 |
+
|
2230 |
+
|
2231 |
+
</article>
|
2232 |
+
</div>
|
2233 |
+
<aside class="span4 detailsbar">
|
2234 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
2235 |
+
<span class="label label-info">static</span>
|
2236 |
+
<dl>
|
2237 |
+
</dl>
|
2238 |
+
<h2>Tags</h2>
|
2239 |
+
<table class="table table-condensed">
|
2240 |
+
<tr>
|
2241 |
+
<th>
|
2242 |
+
since
|
2243 |
+
</th>
|
2244 |
+
<td>
|
2245 |
+
2.22
|
2246 |
+
</td>
|
2247 |
+
</tr>
|
2248 |
+
</table>
|
2249 |
+
</aside>
|
2250 |
+
</div>
|
2251 |
+
|
2252 |
+
<div class="row-fluid">
|
2253 |
+
<div class="span8 content class">
|
2254 |
+
<a id="method__debug_log" name="method__debug_log" class="anchor"></a>
|
2255 |
+
<article class="method">
|
2256 |
+
<h3 class="private ">_debug_log()</h3>
|
2257 |
+
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
2258 |
+
<pre class="signature" style="margin-right: 54px;">_debug_log(string <span class="argument">$message</span>) </pre>
|
2259 |
+
<p><em>Write a debug message to the appropriate log file</em></p>
|
2260 |
+
|
2261 |
+
|
2262 |
+
<h4>Parameters</h4>
|
2263 |
+
<table class="table table-condensed table-hover">
|
2264 |
+
<tr>
|
2265 |
+
<td>string</td>
|
2266 |
+
<td>$message </td>
|
2267 |
+
<td><p>Message text</p></td>
|
2268 |
+
</tr>
|
2269 |
+
</table>
|
2270 |
+
|
2271 |
+
|
2272 |
+
|
2273 |
+
</article>
|
2274 |
+
</div>
|
2275 |
+
<aside class="span4 detailsbar">
|
2276 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
2277 |
+
<span class="label label-info">static</span>
|
2278 |
+
<dl>
|
2279 |
+
</dl>
|
2280 |
+
<h2>Tags</h2>
|
2281 |
+
<table class="table table-condensed">
|
2282 |
+
<tr>
|
2283 |
+
<th>
|
2284 |
+
since
|
2285 |
+
</th>
|
2286 |
+
<td>
|
2287 |
+
2.14
|
2288 |
+
</td>
|
2289 |
+
</tr>
|
2290 |
+
</table>
|
2291 |
+
</aside>
|
2292 |
+
</div>
|
2293 |
+
|
2294 |
+
</div>
|
2295 |
+
</section>
|
2296 |
+
|
2297 |
+
<div id="source-view" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="source-view-label" aria-hidden="true">
|
2298 |
+
<div class="modal-header">
|
2299 |
+
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
2300 |
+
<h3 id="source-view-label">class-mla-core.php</h3>
|
2301 |
+
</div>
|
2302 |
+
<div class="modal-body">
|
2303 |
+
<pre data-src="../files/includes\class-mla-core.php.txt" class="language-php line-numbers"></pre>
|
2304 |
+
</div>
|
2305 |
+
</div>
|
2306 |
+
|
2307 |
+
<footer class="row-fluid">
|
2308 |
+
<section class="span10 offset2">
|
2309 |
+
<section class="row-fluid">
|
2310 |
+
<section class="span10 offset1">
|
2311 |
+
<section class="row-fluid footer-sections">
|
2312 |
+
<section class="span4">
|
2313 |
+
<h1><i class="icon-code"></i></h1>
|
2314 |
+
<div>
|
2315 |
+
<ul>
|
2316 |
+
</ul>
|
2317 |
+
</div>
|
2318 |
+
</section>
|
2319 |
+
<section class="span4">
|
2320 |
+
<h1><i class="icon-bar-chart"></i></h1>
|
2321 |
+
<div>
|
2322 |
+
<ul>
|
2323 |
+
<li><a href="../graphs/class.html">Class Hierarchy Diagram</a></li>
|
2324 |
+
</ul>
|
2325 |
+
</div>
|
2326 |
+
</section>
|
2327 |
+
<section class="span4">
|
2328 |
+
<h1><i class="icon-pushpin"></i></h1>
|
2329 |
+
<div>
|
2330 |
+
<ul>
|
2331 |
+
<li><a href="../reports/errors.html">Errors</a></li>
|
2332 |
+
<li><a href="../reports/markers.html">Markers</a></li>
|
2333 |
+
</ul>
|
2334 |
+
</div>
|
2335 |
+
</section>
|
2336 |
+
</section>
|
2337 |
+
</section>
|
2338 |
+
</section>
|
2339 |
+
<section class="row-fluid">
|
2340 |
+
<section class="span10 offset1">
|
2341 |
+
<hr />
|
2342 |
+
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
2343 |
+
on August 12th, 2016 at 21:22.
|
2344 |
+
</section>
|
2345 |
+
</section>
|
2346 |
+
</section>
|
2347 |
+
</footer>
|
2348 |
</div>
|
2349 |
+
|
2350 |
</body>
|
2351 |
</html>
|
phpDocs/classes/MLACoreOptions.html
CHANGED
@@ -1,568 +1,1778 @@
|
|
1 |
-
<!DOCTYPE html
|
|
|
2 |
<head>
|
3 |
-
<meta
|
4 |
-
<meta
|
5 |
-
<
|
6 |
-
<
|
7 |
-
<meta name="
|
8 |
-
|
9 |
-
<link href="../css/
|
10 |
-
<
|
11 |
-
<link rel="
|
12 |
-
<link
|
13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
</head>
|
15 |
<body>
|
|
|
16 |
<div class="navbar navbar-fixed-top">
|
17 |
-
<div class="navbar-inner"
|
18 |
-
<
|
19 |
-
<
|
20 |
-
<
|
21 |
-
|
22 |
-
<
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
<li class="dropdown" id="charts-menu">
|
27 |
-
<a href="#
|
28 |
-
|
29 |
-
</
|
30 |
-
<
|
31 |
-
<
|
32 |
-
|
33 |
-
<
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
<
|
40 |
-
|
41 |
-
</
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
<
|
46 |
-
</
|
47 |
-
|
48 |
-
<
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
<
|
54 |
-
<
|
55 |
-
<
|
56 |
-
</
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
<li class="constant "><a href="#MLA_ADD_NEW_BULK_EDIT_AUTO_OPEN" title='MLA_ADD_NEW_BULK_EDIT_AUTO_OPEN :: Provides a unique name for the Media/Add New bulk edit "Open Automatically" option'><span class="description">Provides a unique name for the Media/Add New bulk edit "Open Automatically" option</span><pre>MLA_ADD_NEW_BULK_EDIT_AUTO_OPEN</pre></a></li>
|
68 |
-
<li class="constant "><a href="#MLA_ADD_NEW_BULK_EDIT_ON_TOP" title='MLA_ADD_NEW_BULK_EDIT_ON_TOP :: Provides a unique name for the Media/Add New bulk edit "on top" option'><span class="description">Provides a unique name for the Media/Add New bulk edit "on top" option</span><pre>MLA_ADD_NEW_BULK_EDIT_ON_TOP</pre></a></li>
|
69 |
-
<li class="constant "><a href="#MLA_BULK_CHUNK_SIZE" title="MLA_BULK_CHUNK_SIZE :: Provides a unique name for the Bulk Update and Map All chunk size option"><span class="description">Provides a unique name for the Bulk Update and Map All chunk size option</span><pre>MLA_BULK_CHUNK_SIZE</pre></a></li>
|
70 |
-
<li class="constant "><a href="#MLA_COUNT_TERM_ATTACHMENTS" title="MLA_COUNT_TERM_ATTACHMENTS :: Provides a unique name for the taxonomy count Attachments option"><span class="description">Provides a unique name for the taxonomy count Attachments option</span><pre>MLA_COUNT_TERM_ATTACHMENTS</pre></a></li>
|
71 |
-
<li class="constant "><a href="#MLA_DEBUG_DISPLAY_LIMIT" title="MLA_DEBUG_DISPLAY_LIMIT :: Provides a unique name for the Debug display limit option"><span class="description">Provides a unique name for the Debug display limit option</span><pre>MLA_DEBUG_DISPLAY_LIMIT</pre></a></li>
|
72 |
-
<li class="constant "><a href="#MLA_DEBUG_FILE" title="MLA_DEBUG_FILE :: Provides a unique name for the Debug alternate log file option"><span class="description">Provides a unique name for the Debug alternate log file option</span><pre>MLA_DEBUG_FILE</pre></a></li>
|
73 |
-
<li class="constant "><a href="#MLA_DEBUG_REPLACE_LEVEL" title="MLA_DEBUG_REPLACE_LEVEL :: Provides a unique name for the Debug replace MLA_DEBUG_LEVEL option"><span class="description">Provides a unique name for the Debug replace MLA_DEBUG_LEVEL option</span><pre>MLA_DEBUG_REPLACE_LEVEL</pre></a></li>
|
74 |
-
<li class="constant "><a href="#MLA_DEBUG_REPLACE_PHP_LOG" title="MLA_DEBUG_REPLACE_PHP_LOG :: Provides a unique name for the Debug replace PHP log file option"><span class="description">Provides a unique name for the Debug replace PHP log file option</span><pre>MLA_DEBUG_REPLACE_PHP_LOG</pre></a></li>
|
75 |
-
<li class="constant "><a href="#MLA_DEBUG_REPLACE_PHP_REPORTING" title="MLA_DEBUG_REPLACE_PHP_REPORTING :: Provides a unique name for the Debug replace PHP error_reporting option"><span class="description">Provides a unique name for the Debug replace PHP error_reporting option</span><pre>MLA_DEBUG_REPLACE_PHP_REPORTING</pre></a></li>
|
76 |
-
<li class="constant "><a href="#MLA_DEFAULT_ORDER" title="MLA_DEFAULT_ORDER :: Provides a unique name for the default order option"><span class="description">Provides a unique name for the default order option</span><pre>MLA_DEFAULT_ORDER</pre></a></li>
|
77 |
-
<li class="constant "><a href="#MLA_DEFAULT_ORDERBY" title="MLA_DEFAULT_ORDERBY :: Provides a unique name for the default orderby option"><span class="description">Provides a unique name for the default orderby option</span><pre>MLA_DEFAULT_ORDERBY</pre></a></li>
|
78 |
-
<li class="constant "><a href="#MLA_DELETE_OPTION_BACKUPS" title="MLA_DELETE_OPTION_BACKUPS :: Provides a unique name for the Media Manager Force Image Default Setings option"><span class="description">Provides a unique name for the Media Manager Force Image Default Setings option</span><pre>MLA_DELETE_OPTION_BACKUPS</pre></a></li>
|
79 |
-
<li class="constant "><a href="#MLA_DELETE_OPTION_SETTINGS" title="MLA_DELETE_OPTION_SETTINGS :: Provides a unique name for the Media Manager Force Image Default Setings option"><span class="description">Provides a unique name for the Media Manager Force Image Default Setings option</span><pre>MLA_DELETE_OPTION_SETTINGS</pre></a></li>
|
80 |
-
<li class="constant "><a href="#MLA_EDIT_MEDIA_META_BOXES" title="MLA_EDIT_MEDIA_META_BOXES :: Provides a unique name for the Edit Media additional meta boxes option"><span class="description">Provides a unique name for the Edit Media additional meta boxes option</span><pre>MLA_EDIT_MEDIA_META_BOXES</pre></a></li>
|
81 |
-
<li class="constant "><a href="#MLA_EDIT_MEDIA_SEARCH_TAXONOMY" title='MLA_EDIT_MEDIA_SEARCH_TAXONOMY :: Provides a unique name for the "searchable taxonomies" option'><span class="description">Provides a unique name for the "searchable taxonomies" option</span><pre>MLA_EDIT_MEDIA_SEARCH_TAXONOMY</pre></a></li>
|
82 |
-
<li class="constant "><a href="#MLA_ENABLE_MLA_ICONS" title="MLA_ENABLE_MLA_ICONS :: Provides a unique name for the Enable MLA Icons option"><span class="description">Provides a unique name for the Enable MLA Icons option</span><pre>MLA_ENABLE_MLA_ICONS</pre></a></li>
|
83 |
-
<li class="constant "><a href="#MLA_ENABLE_POST_MIME_TYPES" title="MLA_ENABLE_POST_MIME_TYPES :: Provides a unique name for the Enable Post MIME Types option"><span class="description">Provides a unique name for the Enable Post MIME Types option</span><pre>MLA_ENABLE_POST_MIME_TYPES</pre></a></li>
|
84 |
-
<li class="constant "><a href="#MLA_ENABLE_UPLOAD_MIMES" title="MLA_ENABLE_UPLOAD_MIMES :: Provides a unique name for the Enable Upload MIME Types option"><span class="description">Provides a unique name for the Enable Upload MIME Types option</span><pre>MLA_ENABLE_UPLOAD_MIMES</pre></a></li>
|
85 |
-
<li class="constant "><a href="#MLA_EXCLUDE_REVISIONS" title="MLA_EXCLUDE_REVISIONS :: Provides a unique name for the exclude revisions option"><span class="description">Provides a unique name for the exclude revisions option</span><pre>MLA_EXCLUDE_REVISIONS</pre></a></li>
|
86 |
-
<li class="constant "><a href="#MLA_EXIF_SIZE" title='MLA_EXIF_SIZE :: Provides a "size" attribute value for the EXIF/Template Value field'><span class="description">Provides a "size" attribute value for the EXIF/Template Value field</span><pre>MLA_EXIF_SIZE</pre></a></li>
|
87 |
-
<li class="constant "><a href="#MLA_FEATURED_IN_TUNING" title="MLA_FEATURED_IN_TUNING :: Provides a unique name for a database tuning option"><span class="description">Provides a unique name for a database tuning option</span><pre>MLA_FEATURED_IN_TUNING</pre></a></li>
|
88 |
-
<li class="constant "><a href="#MLA_GALLERY_IN_TUNING" title="MLA_GALLERY_IN_TUNING :: Provides a unique name for a database tuning option"><span class="description">Provides a unique name for a database tuning option</span><pre>MLA_GALLERY_IN_TUNING</pre></a></li>
|
89 |
-
<li class="constant "><a href="#MLA_INSERTED_IN_TUNING" title="MLA_INSERTED_IN_TUNING :: Provides a unique name for a database tuning option"><span class="description">Provides a unique name for a database tuning option</span><pre>MLA_INSERTED_IN_TUNING</pre></a></li>
|
90 |
-
<li class="constant "><a href="#MLA_MEDIA_GRID_TOOLBAR" title="MLA_MEDIA_GRID_TOOLBAR :: Provides a unique name for the Media Grid toolbar option, which
|
91 |
-
also controls the ATTACHMENT DETAILS enhancements"><span class="description">Provides a unique name for the Media Grid toolbar option, which
|
92 |
-
also controls the ATTACHMENT DETAILS enhancements</span><pre>MLA_MEDIA_GRID_TOOLBAR</pre></a></li>
|
93 |
-
<li class="constant "><a href="#MLA_MEDIA_MODAL_APPLY_DISPLAY_SETTINGS" title="MLA_MEDIA_MODAL_APPLY_DISPLAY_SETTINGS :: Provides a unique name for the Media Manager Force Image Default Setings option"><span class="description">Provides a unique name for the Media Manager Force Image Default Setings option</span><pre>MLA_MEDIA_MODAL_APPLY_DISPLAY_SETTINGS</pre></a></li>
|
94 |
-
<li class="constant "><a href="#MLA_MEDIA_MODAL_DETAILS_AUTOFILL" title="MLA_MEDIA_MODAL_DETAILS_AUTOFILL :: Provides a unique name for the Media Manager Attachment Details auto-fill option"><span class="description">Provides a unique name for the Media Manager Attachment Details auto-fill option</span><pre>MLA_MEDIA_MODAL_DETAILS_AUTOFILL</pre></a></li>
|
95 |
-
<li class="constant "><a href="#MLA_MEDIA_MODAL_DETAILS_CATEGORY_METABOX" title='MLA_MEDIA_MODAL_DETAILS_CATEGORY_METABOX :: Provides a unique name for the Media Manager Attachment Details searchable taxonomy option
|
96 |
-
This option is for hierarchical taxonomies, e.g., "Att.'><span class="description">Provides a unique name for the Media Manager Attachment Details searchable taxonomy option
|
97 |
-
This option is for hierarchical taxonomies, e.g., "Att.</span><pre>MLA_MEDIA_MODAL_DETAILS_CATEGORY_METABOX</pre></a></li>
|
98 |
-
<li class="constant "><a href="#MLA_MEDIA_MODAL_DETAILS_TAG_METABOX" title='MLA_MEDIA_MODAL_DETAILS_TAG_METABOX :: Provides a unique name for the Media Manager Attachment Details searchable taxonomy option
|
99 |
-
This option is for flat taxonomies, e.g., "Att.'><span class="description">Provides a unique name for the Media Manager Attachment Details searchable taxonomy option
|
100 |
-
This option is for flat taxonomies, e.g., "Att.</span><pre>MLA_MEDIA_MODAL_DETAILS_TAG_METABOX</pre></a></li>
|
101 |
-
<li class="constant "><a href="#MLA_MEDIA_MODAL_MIMETYPES" title="MLA_MEDIA_MODAL_MIMETYPES :: Provides a unique name for the Media Manager toolbar MIME Types option"><span class="description">Provides a unique name for the Media Manager toolbar MIME Types option</span><pre>MLA_MEDIA_MODAL_MIMETYPES</pre></a></li>
|
102 |
-
<li class="constant "><a href="#MLA_MEDIA_MODAL_MONTHS" title="MLA_MEDIA_MODAL_MONTHS :: Provides a unique name for the Media Manager toolbar Month and Year option"><span class="description">Provides a unique name for the Media Manager toolbar Month and Year option</span><pre>MLA_MEDIA_MODAL_MONTHS</pre></a></li>
|
103 |
-
<li class="constant "><a href="#MLA_MEDIA_MODAL_ORDER" title="MLA_MEDIA_MODAL_ORDER :: Provides a unique name for the Media Manager order option"><span class="description">Provides a unique name for the Media Manager order option</span><pre>MLA_MEDIA_MODAL_ORDER</pre></a></li>
|
104 |
-
<li class="constant "><a href="#MLA_MEDIA_MODAL_ORDERBY" title="MLA_MEDIA_MODAL_ORDERBY :: Provides a unique name for the Media Manager orderby option"><span class="description">Provides a unique name for the Media Manager orderby option</span><pre>MLA_MEDIA_MODAL_ORDERBY</pre></a></li>
|
105 |
-
<li class="constant "><a href="#MLA_MEDIA_MODAL_SEARCHBOX" title="MLA_MEDIA_MODAL_SEARCHBOX :: Provides a unique name for the Media Manager toolbar Search Box option"><span class="description">Provides a unique name for the Media Manager toolbar Search Box option</span><pre>MLA_MEDIA_MODAL_SEARCHBOX</pre></a></li>
|
106 |
-
<li class="constant "><a href="#MLA_MEDIA_MODAL_SEARCHBOX_CONTROLS" title="MLA_MEDIA_MODAL_SEARCHBOX_CONTROLS :: Provides a unique name for the Media Manager toolbar Search Box Controls option"><span class="description">Provides a unique name for the Media Manager toolbar Search Box Controls option</span><pre>MLA_MEDIA_MODAL_SEARCHBOX_CONTROLS</pre></a></li>
|
107 |
-
<li class="constant "><a href="#MLA_MEDIA_MODAL_TERMS" title="MLA_MEDIA_MODAL_TERMS :: Provides a unique name for the Media Manager toolbar Taxonomy Terms option"><span class="description">Provides a unique name for the Media Manager toolbar Taxonomy Terms option</span><pre>MLA_MEDIA_MODAL_TERMS</pre></a></li>
|
108 |
-
<li class="constant "><a href="#MLA_MEDIA_MODAL_TERMS_SEARCH" title='MLA_MEDIA_MODAL_TERMS_SEARCH :: Provides a unique name for the Media Manager toolbar Taxonomy "Terms Search" option'><span class="description">Provides a unique name for the Media Manager toolbar Taxonomy "Terms Search" option</span><pre>MLA_MEDIA_MODAL_TERMS_SEARCH</pre></a></li>
|
109 |
-
<li class="constant "><a href="#MLA_MEDIA_MODAL_TOOLBAR" title="MLA_MEDIA_MODAL_TOOLBAR :: Provides a unique name for the Media Manager toolbar option, which
|
110 |
-
also controls the ATTACHMENT DETAILS enhancements"><span class="description">Provides a unique name for the Media Manager toolbar option, which
|
111 |
-
also controls the ATTACHMENT DETAILS enhancements</span><pre>MLA_MEDIA_MODAL_TOOLBAR</pre></a></li>
|
112 |
-
<li class="constant "><a href="#MLA_MLA_GALLERY_IN_TUNING" title="MLA_MLA_GALLERY_IN_TUNING :: Provides a unique name for a database tuning option"><span class="description">Provides a unique name for a database tuning option</span><pre>MLA_MLA_GALLERY_IN_TUNING</pre></a></li>
|
113 |
-
<li class="constant "><a href="#MLA_NEW_CUSTOM_FIELD" title='MLA_NEW_CUSTOM_FIELD :: Provides a unique name for the Custom Field "new field" key'><span class="description">Provides a unique name for the Custom Field "new field" key</span><pre>MLA_NEW_CUSTOM_FIELD</pre></a></li>
|
114 |
-
<li class="constant "><a href="#MLA_NEW_CUSTOM_RULE" title='MLA_NEW_CUSTOM_RULE :: Provides a unique name for the Custom Field "new rule" key'><span class="description">Provides a unique name for the Custom Field "new rule" key</span><pre>MLA_NEW_CUSTOM_RULE</pre></a></li>
|
115 |
-
<li class="constant "><a href="#MLA_POST_MIME_TYPES" title="MLA_POST_MIME_TYPES :: Provides a unique name for the Post MIME Types option"><span class="description">Provides a unique name for the Post MIME Types option</span><pre>MLA_POST_MIME_TYPES</pre></a></li>
|
116 |
-
<li class="constant "><a href="#MLA_SCREEN_DISPLAY_LIBRARY" title="MLA_SCREEN_DISPLAY_LIBRARY :: Provides a unique name for the admin screen remove Media/Library option"><span class="description">Provides a unique name for the admin screen remove Media/Library option</span><pre>MLA_SCREEN_DISPLAY_LIBRARY</pre></a></li>
|
117 |
-
<li class="constant "><a href="#MLA_SCREEN_DISPLAY_SWITCHER" title="MLA_SCREEN_DISPLAY_SWITCHER :: Provides a unique name for the Media/Assistant list/grid switcher option"><span class="description">Provides a unique name for the Media/Assistant list/grid switcher option</span><pre>MLA_SCREEN_DISPLAY_SWITCHER</pre></a></li>
|
118 |
-
<li class="constant "><a href="#MLA_SCREEN_MENU_TITLE" title="MLA_SCREEN_MENU_TITLE :: Provides a unique name for the admin screen menu title option"><span class="description">Provides a unique name for the admin screen menu title option</span><pre>MLA_SCREEN_MENU_TITLE</pre></a></li>
|
119 |
-
<li class="constant "><a href="#MLA_SCREEN_ORDER" title="MLA_SCREEN_ORDER :: Provides a unique name for the admin screen menu order option"><span class="description">Provides a unique name for the admin screen menu order option</span><pre>MLA_SCREEN_ORDER</pre></a></li>
|
120 |
-
<li class="constant "><a href="#MLA_SCREEN_PAGE_TITLE" title="MLA_SCREEN_PAGE_TITLE :: Provides a unique name for the admin screen page title option"><span class="description">Provides a unique name for the admin screen page title option</span><pre>MLA_SCREEN_PAGE_TITLE</pre></a></li>
|
121 |
-
<li class="constant "><a href="#MLA_SEARCH_MEDIA_FILTER_DEFAULTS" title="MLA_SEARCH_MEDIA_FILTER_DEFAULTS :: Provides a unique name for the display Search Media controls option"><span class="description">Provides a unique name for the display Search Media controls option</span><pre>MLA_SEARCH_MEDIA_FILTER_DEFAULTS</pre></a></li>
|
122 |
-
<li class="constant "><a href="#MLA_SEARCH_MEDIA_FILTER_SHOW_CONTROLS" title="MLA_SEARCH_MEDIA_FILTER_SHOW_CONTROLS :: Provides a unique name for the display Search Media controls option"><span class="description">Provides a unique name for the display Search Media controls option</span><pre>MLA_SEARCH_MEDIA_FILTER_SHOW_CONTROLS</pre></a></li>
|
123 |
-
<li class="constant "><a href="#MLA_SETTINGS_SLUG" title="MLA_SETTINGS_SLUG :: Provides a unique name for the settings page"><span class="description">Provides a unique name for the settings page</span><pre>MLA_SETTINGS_SLUG</pre></a></li>
|
124 |
-
<li class="constant "><a href="#MLA_TABLE_ICON_SIZE" title="MLA_TABLE_ICON_SIZE :: Provides a unique name for the Media/Assistant submenu table thumbnail/icon size option"><span class="description">Provides a unique name for the Media/Assistant submenu table thumbnail/icon size option</span><pre>MLA_TABLE_ICON_SIZE</pre></a></li>
|
125 |
-
<li class="constant "><a href="#MLA_TABLE_VIEWS_WIDTH" title="MLA_TABLE_VIEWS_WIDTH :: Provides a unique name for the Media/Assistant submenu table views width option"><span class="description">Provides a unique name for the Media/Assistant submenu table views width option</span><pre>MLA_TABLE_VIEWS_WIDTH</pre></a></li>
|
126 |
-
<li class="constant "><a href="#MLA_TAXONOMY_FILTER_DEPTH" title="MLA_TAXONOMY_FILTER_DEPTH :: Provides a unique name for the taxonomy filter maximum depth option"><span class="description">Provides a unique name for the taxonomy filter maximum depth option</span><pre>MLA_TAXONOMY_FILTER_DEPTH</pre></a></li>
|
127 |
-
<li class="constant "><a href="#MLA_TAXONOMY_FILTER_INCLUDE_CHILDREN" title="MLA_TAXONOMY_FILTER_INCLUDE_CHILDREN :: Provides a unique name for the taxonomy filter maximum depth option"><span class="description">Provides a unique name for the taxonomy filter maximum depth option</span><pre>MLA_TAXONOMY_FILTER_INCLUDE_CHILDREN</pre></a></li>
|
128 |
-
<li class="constant "><a href="#MLA_TAXONOMY_SUPPORT" title="MLA_TAXONOMY_SUPPORT :: Provides a unique name for the taxonomy support option"><span class="description">Provides a unique name for the taxonomy support option</span><pre>MLA_TAXONOMY_SUPPORT</pre></a></li>
|
129 |
-
<li class="constant "><a href="#MLA_UPLOAD_MIMES" title="MLA_UPLOAD_MIMES :: Provides a unique name for the Upload MIME Types option"><span class="description">Provides a unique name for the Upload MIME Types option</span><pre>MLA_UPLOAD_MIMES</pre></a></li>
|
130 |
-
<li class="constant "><a href="#MLA_VERSION_OPTION" title="MLA_VERSION_OPTION :: Provides a unique name for the current version option"><span class="description">Provides a unique name for the current version option</span><pre>MLA_VERSION_OPTION</pre></a></li>
|
131 |
-
</ul>
|
132 |
-
</div>
|
133 |
-
<div class="span8">
|
134 |
-
<a name="%5CMLACoreOptions" id="\MLACoreOptions"></a><ul class="breadcrumb">
|
135 |
-
<li>
|
136 |
-
<a href="../index.html"><i class="icon-custom icon-class"></i></a><span class="divider">\</span>
|
137 |
-
</li>
|
138 |
-
<li><a href="../namespaces/global.html">global</a></li>
|
139 |
-
<li class="active">
|
140 |
-
<span class="divider">\</span><a href="../classes/MLACoreOptions.html">MLACoreOptions</a>
|
141 |
-
</li>
|
142 |
-
</ul>
|
143 |
-
<div href="../classes/MLACoreOptions.html" class="element class">
|
144 |
-
<p class="short_description">Class MLA (Media Library Assistant) Core Options defines MLA option settings and defaults</p>
|
145 |
-
<div class="details">
|
146 |
-
<p class="long_description"></p>
|
147 |
-
<table class="table table-bordered">
|
148 |
-
<tr>
|
149 |
-
<th>package</th>
|
150 |
-
<td><a href="../packages/Media%20Library%20Assistant.html">Media Library Assistant</a></td>
|
151 |
-
</tr>
|
152 |
-
<tr>
|
153 |
-
<th>since</th>
|
154 |
-
<td>2.25</td>
|
155 |
-
</tr>
|
156 |
-
</table>
|
157 |
-
<h3>
|
158 |
-
<i class="icon-custom icon-method"></i> Methods</h3>
|
159 |
-
<a name="mla_localize_option_definitions_array" id="mla_localize_option_definitions_array"></a><div class="element clickable method public mla_localize_option_definitions_array" data-toggle="collapse" data-target=".mla_localize_option_definitions_array .collapse">
|
160 |
-
<h2>Localize $mla_option_definitions array</h2>
|
161 |
-
<pre>mla_localize_option_definitions_array() : void</pre>
|
162 |
-
<div class="labels"></div>
|
163 |
-
<div class="row collapse"><div class="detail-description">
|
164 |
-
<p class="long_description"><p>Localization must be done at runtime; these calls cannot be placed in the
|
165 |
-
"public static" array definition itself. Called from MLATest::initialize.</p></p>
|
166 |
-
<table class="table table-bordered"><tr>
|
167 |
-
<th>since</th>
|
168 |
-
<td>2.20</td>
|
169 |
-
</tr></table>
|
170 |
-
</div></div>
|
171 |
</div>
|
172 |
-
<h3>
|
173 |
-
<i class="icon-custom icon-property"></i> Properties</h3>
|
174 |
-
<a name="%24mla_option_definitions" id="$mla_option_definitions"> </a><div class="element clickable property public $mla_option_definitions" data-toggle="collapse" data-target=".$mla_option_definitions .collapse">
|
175 |
-
<h2>$mla_option_definitions defines the database options and admin page areas for setting/updating them</h2>
|
176 |
-
<pre>$mla_option_definitions </pre>
|
177 |
-
<div class="labels"></div>
|
178 |
-
<div class="row collapse"><div class="detail-description"><p class="long_description"><p>The array must be populated at runtime in MLACoreOptions::mla_localize_option_definitions_array();
|
179 |
-
localization calls cannot be placed in the "public static" array definition itself.</p>
|
180 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
181 |
<p>Each option is defined by an array with the following elements:</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
182 |
|
183 |
-
<
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
</div>
|
204 |
-
|
205 |
-
<
|
206 |
-
<
|
207 |
-
<
|
208 |
-
<
|
209 |
-
<
|
210 |
-
<
|
211 |
-
</
|
212 |
-
<
|
213 |
-
<
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
<
|
222 |
-
<
|
223 |
-
</
|
224 |
-
<
|
225 |
-
|
226 |
-
<
|
227 |
-
<
|
228 |
-
<
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
<
|
233 |
-
|
234 |
-
|
235 |
-
</
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
</
|
242 |
-
|
243 |
-
<
|
244 |
-
<
|
245 |
-
<
|
246 |
-
<
|
247 |
-
</div>
|
248 |
-
<
|
249 |
-
<
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
<
|
255 |
-
<
|
256 |
-
<
|
257 |
-
<
|
258 |
-
<
|
259 |
-
|
260 |
-
<
|
261 |
-
<
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
<
|
267 |
-
<
|
268 |
-
<
|
269 |
-
<
|
270 |
-
|
271 |
-
</div>
|
272 |
-
|
273 |
-
<
|
274 |
-
<
|
275 |
-
<div
|
276 |
-
<
|
277 |
-
</
|
278 |
-
<a
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
</
|
284 |
-
|
285 |
-
<
|
286 |
-
<
|
287 |
-
<
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
<div class="row collapse"><div class="detail-description"><p class="long_description"></p></div></div>
|
295 |
-
</div>
|
296 |
-
<a name="MLA_EDIT_MEDIA_SEARCH_TAXONOMY" id="MLA_EDIT_MEDIA_SEARCH_TAXONOMY"> </a><div class="element clickable constant MLA_EDIT_MEDIA_SEARCH_TAXONOMY" data-toggle="collapse" data-target=".MLA_EDIT_MEDIA_SEARCH_TAXONOMY .collapse">
|
297 |
-
<h2>Provides a unique name for the "searchable taxonomies" option</h2>
|
298 |
-
<pre>MLA_EDIT_MEDIA_SEARCH_TAXONOMY </pre>
|
299 |
-
<div class="labels"></div>
|
300 |
-
<div class="row collapse"><div class="detail-description"><p class="long_description"></p></div></div>
|
301 |
-
</div>
|
302 |
-
<a name="MLA_ENABLE_MLA_ICONS" id="MLA_ENABLE_MLA_ICONS"> </a><div class="element clickable constant MLA_ENABLE_MLA_ICONS" data-toggle="collapse" data-target=".MLA_ENABLE_MLA_ICONS .collapse">
|
303 |
-
<h2>Provides a unique name for the Enable MLA Icons option</h2>
|
304 |
-
<pre>MLA_ENABLE_MLA_ICONS </pre>
|
305 |
-
<div class="labels"></div>
|
306 |
-
<div class="row collapse"><div class="detail-description"><p class="long_description"></p></div></div>
|
307 |
-
</div>
|
308 |
-
<a name="MLA_ENABLE_POST_MIME_TYPES" id="MLA_ENABLE_POST_MIME_TYPES"> </a><div class="element clickable constant MLA_ENABLE_POST_MIME_TYPES" data-toggle="collapse" data-target=".MLA_ENABLE_POST_MIME_TYPES .collapse">
|
309 |
-
<h2>Provides a unique name for the Enable Post MIME Types option</h2>
|
310 |
-
<pre>MLA_ENABLE_POST_MIME_TYPES </pre>
|
311 |
-
<div class="labels"></div>
|
312 |
-
<div class="row collapse"><div class="detail-description"><p class="long_description"></p></div></div>
|
313 |
-
</div>
|
314 |
-
<a name="MLA_ENABLE_UPLOAD_MIMES" id="MLA_ENABLE_UPLOAD_MIMES"> </a><div class="element clickable constant MLA_ENABLE_UPLOAD_MIMES" data-toggle="collapse" data-target=".MLA_ENABLE_UPLOAD_MIMES .collapse">
|
315 |
-
<h2>Provides a unique name for the Enable Upload MIME Types option</h2>
|
316 |
-
<pre>MLA_ENABLE_UPLOAD_MIMES </pre>
|
317 |
-
<div class="labels"></div>
|
318 |
-
<div class="row collapse"><div class="detail-description"><p class="long_description"></p></div></div>
|
319 |
-
</div>
|
320 |
-
<a name="MLA_EXCLUDE_REVISIONS" id="MLA_EXCLUDE_REVISIONS"> </a><div class="element clickable constant MLA_EXCLUDE_REVISIONS" data-toggle="collapse" data-target=".MLA_EXCLUDE_REVISIONS .collapse">
|
321 |
-
<h2>Provides a unique name for the exclude revisions option</h2>
|
322 |
-
<pre>MLA_EXCLUDE_REVISIONS </pre>
|
323 |
-
<div class="labels"></div>
|
324 |
-
<div class="row collapse"><div class="detail-description"><p class="long_description"></p></div></div>
|
325 |
-
</div>
|
326 |
-
<a name="MLA_EXIF_SIZE" id="MLA_EXIF_SIZE"> </a><div class="element clickable constant MLA_EXIF_SIZE" data-toggle="collapse" data-target=".MLA_EXIF_SIZE .collapse">
|
327 |
-
<h2>Provides a "size" attribute value for the EXIF/Template Value field</h2>
|
328 |
-
<pre>MLA_EXIF_SIZE </pre>
|
329 |
-
<div class="labels"></div>
|
330 |
-
<div class="row collapse"><div class="detail-description"><p class="long_description"></p></div></div>
|
331 |
-
</div>
|
332 |
-
<a name="MLA_FEATURED_IN_TUNING" id="MLA_FEATURED_IN_TUNING"> </a><div class="element clickable constant MLA_FEATURED_IN_TUNING" data-toggle="collapse" data-target=".MLA_FEATURED_IN_TUNING .collapse">
|
333 |
-
<h2>Provides a unique name for a database tuning option</h2>
|
334 |
-
<pre>MLA_FEATURED_IN_TUNING </pre>
|
335 |
-
<div class="labels"></div>
|
336 |
-
<div class="row collapse"><div class="detail-description"><p class="long_description"></p></div></div>
|
337 |
-
</div>
|
338 |
-
<a name="MLA_GALLERY_IN_TUNING" id="MLA_GALLERY_IN_TUNING"> </a><div class="element clickable constant MLA_GALLERY_IN_TUNING" data-toggle="collapse" data-target=".MLA_GALLERY_IN_TUNING .collapse">
|
339 |
-
<h2>Provides a unique name for a database tuning option</h2>
|
340 |
-
<pre>MLA_GALLERY_IN_TUNING </pre>
|
341 |
-
<div class="labels"></div>
|
342 |
-
<div class="row collapse"><div class="detail-description"><p class="long_description"></p></div></div>
|
343 |
-
</div>
|
344 |
-
<a name="MLA_INSERTED_IN_TUNING" id="MLA_INSERTED_IN_TUNING"> </a><div class="element clickable constant MLA_INSERTED_IN_TUNING" data-toggle="collapse" data-target=".MLA_INSERTED_IN_TUNING .collapse">
|
345 |
-
<h2>Provides a unique name for a database tuning option</h2>
|
346 |
-
<pre>MLA_INSERTED_IN_TUNING </pre>
|
347 |
-
<div class="labels"></div>
|
348 |
-
<div class="row collapse"><div class="detail-description"><p class="long_description"></p></div></div>
|
349 |
-
</div>
|
350 |
-
<a name="MLA_MEDIA_GRID_TOOLBAR" id="MLA_MEDIA_GRID_TOOLBAR"> </a><div class="element clickable constant MLA_MEDIA_GRID_TOOLBAR" data-toggle="collapse" data-target=".MLA_MEDIA_GRID_TOOLBAR .collapse">
|
351 |
-
<h2>Provides a unique name for the Media Grid toolbar option, which
|
352 |
-
also controls the ATTACHMENT DETAILS enhancements</h2>
|
353 |
-
<pre>MLA_MEDIA_GRID_TOOLBAR </pre>
|
354 |
-
<div class="labels"></div>
|
355 |
-
<div class="row collapse"><div class="detail-description"><p class="long_description"></p></div></div>
|
356 |
-
</div>
|
357 |
-
<a name="MLA_MEDIA_MODAL_APPLY_DISPLAY_SETTINGS" id="MLA_MEDIA_MODAL_APPLY_DISPLAY_SETTINGS"> </a><div class="element clickable constant MLA_MEDIA_MODAL_APPLY_DISPLAY_SETTINGS" data-toggle="collapse" data-target=".MLA_MEDIA_MODAL_APPLY_DISPLAY_SETTINGS .collapse">
|
358 |
-
<h2>Provides a unique name for the Media Manager Force Image Default Setings option</h2>
|
359 |
-
<pre>MLA_MEDIA_MODAL_APPLY_DISPLAY_SETTINGS </pre>
|
360 |
-
<div class="labels"></div>
|
361 |
-
<div class="row collapse"><div class="detail-description"><p class="long_description"></p></div></div>
|
362 |
-
</div>
|
363 |
-
<a name="MLA_MEDIA_MODAL_DETAILS_AUTOFILL" id="MLA_MEDIA_MODAL_DETAILS_AUTOFILL"> </a><div class="element clickable constant MLA_MEDIA_MODAL_DETAILS_AUTOFILL" data-toggle="collapse" data-target=".MLA_MEDIA_MODAL_DETAILS_AUTOFILL .collapse">
|
364 |
-
<h2>Provides a unique name for the Media Manager Attachment Details auto-fill option</h2>
|
365 |
-
<pre>MLA_MEDIA_MODAL_DETAILS_AUTOFILL </pre>
|
366 |
-
<div class="labels"></div>
|
367 |
-
<div class="row collapse"><div class="detail-description"><p class="long_description"></p></div></div>
|
368 |
-
</div>
|
369 |
-
<a name="MLA_MEDIA_MODAL_DETAILS_CATEGORY_METABOX" id="MLA_MEDIA_MODAL_DETAILS_CATEGORY_METABOX"> </a><div class="element clickable constant MLA_MEDIA_MODAL_DETAILS_CATEGORY_METABOX" data-toggle="collapse" data-target=".MLA_MEDIA_MODAL_DETAILS_CATEGORY_METABOX .collapse">
|
370 |
-
<h2>Provides a unique name for the Media Manager Attachment Details searchable taxonomy option
|
371 |
-
This option is for hierarchical taxonomies, e.g., "Att.</h2>
|
372 |
-
<pre>MLA_MEDIA_MODAL_DETAILS_CATEGORY_METABOX </pre>
|
373 |
-
<div class="labels"></div>
|
374 |
-
<div class="row collapse"><div class="detail-description"><p class="long_description"><p>Categories".</p></p></div></div>
|
375 |
-
</div>
|
376 |
-
<a name="MLA_MEDIA_MODAL_DETAILS_TAG_METABOX" id="MLA_MEDIA_MODAL_DETAILS_TAG_METABOX"> </a><div class="element clickable constant MLA_MEDIA_MODAL_DETAILS_TAG_METABOX" data-toggle="collapse" data-target=".MLA_MEDIA_MODAL_DETAILS_TAG_METABOX .collapse">
|
377 |
-
<h2>Provides a unique name for the Media Manager Attachment Details searchable taxonomy option
|
378 |
-
This option is for flat taxonomies, e.g., "Att.</h2>
|
379 |
-
<pre>MLA_MEDIA_MODAL_DETAILS_TAG_METABOX </pre>
|
380 |
-
<div class="labels"></div>
|
381 |
-
<div class="row collapse"><div class="detail-description"><p class="long_description"><p>Tags".</p></p></div></div>
|
382 |
-
</div>
|
383 |
-
<a name="MLA_MEDIA_MODAL_MIMETYPES" id="MLA_MEDIA_MODAL_MIMETYPES"> </a><div class="element clickable constant MLA_MEDIA_MODAL_MIMETYPES" data-toggle="collapse" data-target=".MLA_MEDIA_MODAL_MIMETYPES .collapse">
|
384 |
-
<h2>Provides a unique name for the Media Manager toolbar MIME Types option</h2>
|
385 |
-
<pre>MLA_MEDIA_MODAL_MIMETYPES </pre>
|
386 |
-
<div class="labels"></div>
|
387 |
-
<div class="row collapse"><div class="detail-description"><p class="long_description"></p></div></div>
|
388 |
-
</div>
|
389 |
-
<a name="MLA_MEDIA_MODAL_MONTHS" id="MLA_MEDIA_MODAL_MONTHS"> </a><div class="element clickable constant MLA_MEDIA_MODAL_MONTHS" data-toggle="collapse" data-target=".MLA_MEDIA_MODAL_MONTHS .collapse">
|
390 |
-
<h2>Provides a unique name for the Media Manager toolbar Month and Year option</h2>
|
391 |
-
<pre>MLA_MEDIA_MODAL_MONTHS </pre>
|
392 |
-
<div class="labels"></div>
|
393 |
-
<div class="row collapse"><div class="detail-description"><p class="long_description"></p></div></div>
|
394 |
-
</div>
|
395 |
-
<a name="MLA_MEDIA_MODAL_ORDER" id="MLA_MEDIA_MODAL_ORDER"> </a><div class="element clickable constant MLA_MEDIA_MODAL_ORDER" data-toggle="collapse" data-target=".MLA_MEDIA_MODAL_ORDER .collapse">
|
396 |
-
<h2>Provides a unique name for the Media Manager order option</h2>
|
397 |
-
<pre>MLA_MEDIA_MODAL_ORDER </pre>
|
398 |
-
<div class="labels"></div>
|
399 |
-
<div class="row collapse"><div class="detail-description"><p class="long_description"></p></div></div>
|
400 |
-
</div>
|
401 |
-
<a name="MLA_MEDIA_MODAL_ORDERBY" id="MLA_MEDIA_MODAL_ORDERBY"> </a><div class="element clickable constant MLA_MEDIA_MODAL_ORDERBY" data-toggle="collapse" data-target=".MLA_MEDIA_MODAL_ORDERBY .collapse">
|
402 |
-
<h2>Provides a unique name for the Media Manager orderby option</h2>
|
403 |
-
<pre>MLA_MEDIA_MODAL_ORDERBY </pre>
|
404 |
-
<div class="labels"></div>
|
405 |
-
<div class="row collapse"><div class="detail-description"><p class="long_description"></p></div></div>
|
406 |
-
</div>
|
407 |
-
<a name="MLA_MEDIA_MODAL_SEARCHBOX" id="MLA_MEDIA_MODAL_SEARCHBOX"> </a><div class="element clickable constant MLA_MEDIA_MODAL_SEARCHBOX" data-toggle="collapse" data-target=".MLA_MEDIA_MODAL_SEARCHBOX .collapse">
|
408 |
-
<h2>Provides a unique name for the Media Manager toolbar Search Box option</h2>
|
409 |
-
<pre>MLA_MEDIA_MODAL_SEARCHBOX </pre>
|
410 |
-
<div class="labels"></div>
|
411 |
-
<div class="row collapse"><div class="detail-description"><p class="long_description"></p></div></div>
|
412 |
-
</div>
|
413 |
-
<a name="MLA_MEDIA_MODAL_SEARCHBOX_CONTROLS" id="MLA_MEDIA_MODAL_SEARCHBOX_CONTROLS"> </a><div class="element clickable constant MLA_MEDIA_MODAL_SEARCHBOX_CONTROLS" data-toggle="collapse" data-target=".MLA_MEDIA_MODAL_SEARCHBOX_CONTROLS .collapse">
|
414 |
-
<h2>Provides a unique name for the Media Manager toolbar Search Box Controls option</h2>
|
415 |
-
<pre>MLA_MEDIA_MODAL_SEARCHBOX_CONTROLS </pre>
|
416 |
-
<div class="labels"></div>
|
417 |
-
<div class="row collapse"><div class="detail-description"><p class="long_description"></p></div></div>
|
418 |
-
</div>
|
419 |
-
<a name="MLA_MEDIA_MODAL_TERMS" id="MLA_MEDIA_MODAL_TERMS"> </a><div class="element clickable constant MLA_MEDIA_MODAL_TERMS" data-toggle="collapse" data-target=".MLA_MEDIA_MODAL_TERMS .collapse">
|
420 |
-
<h2>Provides a unique name for the Media Manager toolbar Taxonomy Terms option</h2>
|
421 |
-
<pre>MLA_MEDIA_MODAL_TERMS </pre>
|
422 |
-
<div class="labels"></div>
|
423 |
-
<div class="row collapse"><div class="detail-description"><p class="long_description"></p></div></div>
|
424 |
-
</div>
|
425 |
-
<a name="MLA_MEDIA_MODAL_TERMS_SEARCH" id="MLA_MEDIA_MODAL_TERMS_SEARCH"> </a><div class="element clickable constant MLA_MEDIA_MODAL_TERMS_SEARCH" data-toggle="collapse" data-target=".MLA_MEDIA_MODAL_TERMS_SEARCH .collapse">
|
426 |
-
<h2>Provides a unique name for the Media Manager toolbar Taxonomy "Terms Search" option</h2>
|
427 |
-
<pre>MLA_MEDIA_MODAL_TERMS_SEARCH </pre>
|
428 |
-
<div class="labels"></div>
|
429 |
-
<div class="row collapse"><div class="detail-description"><p class="long_description"></p></div></div>
|
430 |
-
</div>
|
431 |
-
<a name="MLA_MEDIA_MODAL_TOOLBAR" id="MLA_MEDIA_MODAL_TOOLBAR"> </a><div class="element clickable constant MLA_MEDIA_MODAL_TOOLBAR" data-toggle="collapse" data-target=".MLA_MEDIA_MODAL_TOOLBAR .collapse">
|
432 |
-
<h2>Provides a unique name for the Media Manager toolbar option, which
|
433 |
-
also controls the ATTACHMENT DETAILS enhancements</h2>
|
434 |
-
<pre>MLA_MEDIA_MODAL_TOOLBAR </pre>
|
435 |
-
<div class="labels"></div>
|
436 |
-
<div class="row collapse"><div class="detail-description"><p class="long_description"></p></div></div>
|
437 |
-
</div>
|
438 |
-
<a name="MLA_MLA_GALLERY_IN_TUNING" id="MLA_MLA_GALLERY_IN_TUNING"> </a><div class="element clickable constant MLA_MLA_GALLERY_IN_TUNING" data-toggle="collapse" data-target=".MLA_MLA_GALLERY_IN_TUNING .collapse">
|
439 |
-
<h2>Provides a unique name for a database tuning option</h2>
|
440 |
-
<pre>MLA_MLA_GALLERY_IN_TUNING </pre>
|
441 |
-
<div class="labels"></div>
|
442 |
-
<div class="row collapse"><div class="detail-description"><p class="long_description"></p></div></div>
|
443 |
-
</div>
|
444 |
-
<a name="MLA_NEW_CUSTOM_FIELD" id="MLA_NEW_CUSTOM_FIELD"> </a><div class="element clickable constant MLA_NEW_CUSTOM_FIELD" data-toggle="collapse" data-target=".MLA_NEW_CUSTOM_FIELD .collapse">
|
445 |
-
<h2>Provides a unique name for the Custom Field "new field" key</h2>
|
446 |
-
<pre>MLA_NEW_CUSTOM_FIELD </pre>
|
447 |
-
<div class="labels"></div>
|
448 |
-
<div class="row collapse"><div class="detail-description"><p class="long_description"></p></div></div>
|
449 |
-
</div>
|
450 |
-
<a name="MLA_NEW_CUSTOM_RULE" id="MLA_NEW_CUSTOM_RULE"> </a><div class="element clickable constant MLA_NEW_CUSTOM_RULE" data-toggle="collapse" data-target=".MLA_NEW_CUSTOM_RULE .collapse">
|
451 |
-
<h2>Provides a unique name for the Custom Field "new rule" key</h2>
|
452 |
-
<pre>MLA_NEW_CUSTOM_RULE </pre>
|
453 |
-
<div class="labels"></div>
|
454 |
-
<div class="row collapse"><div class="detail-description"><p class="long_description"></p></div></div>
|
455 |
-
</div>
|
456 |
-
<a name="MLA_POST_MIME_TYPES" id="MLA_POST_MIME_TYPES"> </a><div class="element clickable constant MLA_POST_MIME_TYPES" data-toggle="collapse" data-target=".MLA_POST_MIME_TYPES .collapse">
|
457 |
-
<h2>Provides a unique name for the Post MIME Types option</h2>
|
458 |
-
<pre>MLA_POST_MIME_TYPES </pre>
|
459 |
-
<div class="labels"></div>
|
460 |
-
<div class="row collapse"><div class="detail-description"><p class="long_description"></p></div></div>
|
461 |
-
</div>
|
462 |
-
<a name="MLA_SCREEN_DISPLAY_LIBRARY" id="MLA_SCREEN_DISPLAY_LIBRARY"> </a><div class="element clickable constant MLA_SCREEN_DISPLAY_LIBRARY" data-toggle="collapse" data-target=".MLA_SCREEN_DISPLAY_LIBRARY .collapse">
|
463 |
-
<h2>Provides a unique name for the admin screen remove Media/Library option</h2>
|
464 |
-
<pre>MLA_SCREEN_DISPLAY_LIBRARY </pre>
|
465 |
-
<div class="labels"></div>
|
466 |
-
<div class="row collapse"><div class="detail-description"><p class="long_description"></p></div></div>
|
467 |
-
</div>
|
468 |
-
<a name="MLA_SCREEN_DISPLAY_SWITCHER" id="MLA_SCREEN_DISPLAY_SWITCHER"> </a><div class="element clickable constant MLA_SCREEN_DISPLAY_SWITCHER" data-toggle="collapse" data-target=".MLA_SCREEN_DISPLAY_SWITCHER .collapse">
|
469 |
-
<h2>Provides a unique name for the Media/Assistant list/grid switcher option</h2>
|
470 |
-
<pre>MLA_SCREEN_DISPLAY_SWITCHER </pre>
|
471 |
-
<div class="labels"></div>
|
472 |
-
<div class="row collapse"><div class="detail-description"><p class="long_description"></p></div></div>
|
473 |
-
</div>
|
474 |
-
<a name="MLA_SCREEN_MENU_TITLE" id="MLA_SCREEN_MENU_TITLE"> </a><div class="element clickable constant MLA_SCREEN_MENU_TITLE" data-toggle="collapse" data-target=".MLA_SCREEN_MENU_TITLE .collapse">
|
475 |
-
<h2>Provides a unique name for the admin screen menu title option</h2>
|
476 |
-
<pre>MLA_SCREEN_MENU_TITLE </pre>
|
477 |
-
<div class="labels"></div>
|
478 |
-
<div class="row collapse"><div class="detail-description"><p class="long_description"></p></div></div>
|
479 |
-
</div>
|
480 |
-
<a name="MLA_SCREEN_ORDER" id="MLA_SCREEN_ORDER"> </a><div class="element clickable constant MLA_SCREEN_ORDER" data-toggle="collapse" data-target=".MLA_SCREEN_ORDER .collapse">
|
481 |
-
<h2>Provides a unique name for the admin screen menu order option</h2>
|
482 |
-
<pre>MLA_SCREEN_ORDER </pre>
|
483 |
-
<div class="labels"></div>
|
484 |
-
<div class="row collapse"><div class="detail-description"><p class="long_description"></p></div></div>
|
485 |
-
</div>
|
486 |
-
<a name="MLA_SCREEN_PAGE_TITLE" id="MLA_SCREEN_PAGE_TITLE"> </a><div class="element clickable constant MLA_SCREEN_PAGE_TITLE" data-toggle="collapse" data-target=".MLA_SCREEN_PAGE_TITLE .collapse">
|
487 |
-
<h2>Provides a unique name for the admin screen page title option</h2>
|
488 |
-
<pre>MLA_SCREEN_PAGE_TITLE </pre>
|
489 |
-
<div class="labels"></div>
|
490 |
-
<div class="row collapse"><div class="detail-description"><p class="long_description"></p></div></div>
|
491 |
-
</div>
|
492 |
-
<a name="MLA_SEARCH_MEDIA_FILTER_DEFAULTS" id="MLA_SEARCH_MEDIA_FILTER_DEFAULTS"> </a><div class="element clickable constant MLA_SEARCH_MEDIA_FILTER_DEFAULTS" data-toggle="collapse" data-target=".MLA_SEARCH_MEDIA_FILTER_DEFAULTS .collapse">
|
493 |
-
<h2>Provides a unique name for the display Search Media controls option</h2>
|
494 |
-
<pre>MLA_SEARCH_MEDIA_FILTER_DEFAULTS </pre>
|
495 |
-
<div class="labels"></div>
|
496 |
-
<div class="row collapse"><div class="detail-description"><p class="long_description"></p></div></div>
|
497 |
-
</div>
|
498 |
-
<a name="MLA_SEARCH_MEDIA_FILTER_SHOW_CONTROLS" id="MLA_SEARCH_MEDIA_FILTER_SHOW_CONTROLS"> </a><div class="element clickable constant MLA_SEARCH_MEDIA_FILTER_SHOW_CONTROLS" data-toggle="collapse" data-target=".MLA_SEARCH_MEDIA_FILTER_SHOW_CONTROLS .collapse">
|
499 |
-
<h2>Provides a unique name for the display Search Media controls option</h2>
|
500 |
-
<pre>MLA_SEARCH_MEDIA_FILTER_SHOW_CONTROLS </pre>
|
501 |
-
<div class="labels"></div>
|
502 |
-
<div class="row collapse"><div class="detail-description"><p class="long_description"></p></div></div>
|
503 |
-
</div>
|
504 |
-
<a name="MLA_SETTINGS_SLUG" id="MLA_SETTINGS_SLUG"> </a><div class="element clickable constant MLA_SETTINGS_SLUG" data-toggle="collapse" data-target=".MLA_SETTINGS_SLUG .collapse">
|
505 |
-
<h2>Provides a unique name for the settings page</h2>
|
506 |
-
<pre>MLA_SETTINGS_SLUG : string</pre>
|
507 |
-
<div class="labels"></div>
|
508 |
-
<div class="row collapse"><div class="detail-description">
|
509 |
-
<p class="long_description"></p>
|
510 |
-
<table class="table table-bordered"><tr>
|
511 |
-
<th>since</th>
|
512 |
-
<td>2.20</td>
|
513 |
-
</tr></table>
|
514 |
-
</div></div>
|
515 |
-
</div>
|
516 |
-
<a name="MLA_TABLE_ICON_SIZE" id="MLA_TABLE_ICON_SIZE"> </a><div class="element clickable constant MLA_TABLE_ICON_SIZE" data-toggle="collapse" data-target=".MLA_TABLE_ICON_SIZE .collapse">
|
517 |
-
<h2>Provides a unique name for the Media/Assistant submenu table thumbnail/icon size option</h2>
|
518 |
-
<pre>MLA_TABLE_ICON_SIZE </pre>
|
519 |
-
<div class="labels"></div>
|
520 |
-
<div class="row collapse"><div class="detail-description"><p class="long_description"></p></div></div>
|
521 |
-
</div>
|
522 |
-
<a name="MLA_TABLE_VIEWS_WIDTH" id="MLA_TABLE_VIEWS_WIDTH"> </a><div class="element clickable constant MLA_TABLE_VIEWS_WIDTH" data-toggle="collapse" data-target=".MLA_TABLE_VIEWS_WIDTH .collapse">
|
523 |
-
<h2>Provides a unique name for the Media/Assistant submenu table views width option</h2>
|
524 |
-
<pre>MLA_TABLE_VIEWS_WIDTH </pre>
|
525 |
-
<div class="labels"></div>
|
526 |
-
<div class="row collapse"><div class="detail-description"><p class="long_description"></p></div></div>
|
527 |
-
</div>
|
528 |
-
<a name="MLA_TAXONOMY_FILTER_DEPTH" id="MLA_TAXONOMY_FILTER_DEPTH"> </a><div class="element clickable constant MLA_TAXONOMY_FILTER_DEPTH" data-toggle="collapse" data-target=".MLA_TAXONOMY_FILTER_DEPTH .collapse">
|
529 |
-
<h2>Provides a unique name for the taxonomy filter maximum depth option</h2>
|
530 |
-
<pre>MLA_TAXONOMY_FILTER_DEPTH </pre>
|
531 |
-
<div class="labels"></div>
|
532 |
-
<div class="row collapse"><div class="detail-description"><p class="long_description"></p></div></div>
|
533 |
-
</div>
|
534 |
-
<a name="MLA_TAXONOMY_FILTER_INCLUDE_CHILDREN" id="MLA_TAXONOMY_FILTER_INCLUDE_CHILDREN"> </a><div class="element clickable constant MLA_TAXONOMY_FILTER_INCLUDE_CHILDREN" data-toggle="collapse" data-target=".MLA_TAXONOMY_FILTER_INCLUDE_CHILDREN .collapse">
|
535 |
-
<h2>Provides a unique name for the taxonomy filter maximum depth option</h2>
|
536 |
-
<pre>MLA_TAXONOMY_FILTER_INCLUDE_CHILDREN </pre>
|
537 |
-
<div class="labels"></div>
|
538 |
-
<div class="row collapse"><div class="detail-description"><p class="long_description"></p></div></div>
|
539 |
-
</div>
|
540 |
-
<a name="MLA_TAXONOMY_SUPPORT" id="MLA_TAXONOMY_SUPPORT"> </a><div class="element clickable constant MLA_TAXONOMY_SUPPORT" data-toggle="collapse" data-target=".MLA_TAXONOMY_SUPPORT .collapse">
|
541 |
-
<h2>Provides a unique name for the taxonomy support option</h2>
|
542 |
-
<pre>MLA_TAXONOMY_SUPPORT </pre>
|
543 |
-
<div class="labels"></div>
|
544 |
-
<div class="row collapse"><div class="detail-description"><p class="long_description"></p></div></div>
|
545 |
-
</div>
|
546 |
-
<a name="MLA_UPLOAD_MIMES" id="MLA_UPLOAD_MIMES"> </a><div class="element clickable constant MLA_UPLOAD_MIMES" data-toggle="collapse" data-target=".MLA_UPLOAD_MIMES .collapse">
|
547 |
-
<h2>Provides a unique name for the Upload MIME Types option</h2>
|
548 |
-
<pre>MLA_UPLOAD_MIMES </pre>
|
549 |
-
<div class="labels"></div>
|
550 |
-
<div class="row collapse"><div class="detail-description"><p class="long_description"></p></div></div>
|
551 |
-
</div>
|
552 |
-
<a name="MLA_VERSION_OPTION" id="MLA_VERSION_OPTION"> </a><div class="element clickable constant MLA_VERSION_OPTION" data-toggle="collapse" data-target=".MLA_VERSION_OPTION .collapse">
|
553 |
-
<h2>Provides a unique name for the current version option</h2>
|
554 |
-
<pre>MLA_VERSION_OPTION </pre>
|
555 |
-
<div class="labels"></div>
|
556 |
-
<div class="row collapse"><div class="detail-description"><p class="long_description"></p></div></div>
|
557 |
-
</div>
|
558 |
-
</div>
|
559 |
-
</div>
|
560 |
-
</div>
|
561 |
-
</div>
|
562 |
-
<div class="row"><footer class="span12">
|
563 |
-
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>
|
564 |
-
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
|
565 |
-
generated on 2016-06-05T17:27:59-07:00.<br></footer></div>
|
566 |
</div>
|
|
|
567 |
</body>
|
568 |
</html>
|
1 |
+
<!DOCTYPE html>
|
2 |
+
<html lang="en">
|
3 |
<head>
|
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</title>
|
7 |
+
<meta name="author" content=""/>
|
8 |
+
<meta name="description" content=""/>
|
9 |
+
|
10 |
+
<link href="../css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
|
11 |
+
<link href="../css/font-awesome.min.css" rel="stylesheet">
|
12 |
+
<link href="../css/prism.css" rel="stylesheet" media="all"/>
|
13 |
+
<link href="../css/template.css" rel="stylesheet" media="all"/>
|
14 |
+
|
15 |
+
<!--[if lt IE 9]>
|
16 |
+
<script src="../js/html5.js"></script>
|
17 |
+
<![endif]-->
|
18 |
+
<script src="../js/jquery-1.11.0.min.js"></script>
|
19 |
+
<script src="../js/ui/1.10.4/jquery-ui.min.js"></script>
|
20 |
+
<script src="../js/bootstrap.min.js"></script>
|
21 |
+
<script src="../js/jquery.smooth-scroll.js"></script>
|
22 |
+
<script src="../js/prism.min.js"></script>
|
23 |
+
<!-- TODO: Add http://jscrollpane.kelvinluck.com/ to style the scrollbars for browsers not using webkit-->
|
24 |
+
<script type="text/javascript">
|
25 |
+
function loadExternalCodeSnippets() {
|
26 |
+
Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach(function (pre) {
|
27 |
+
var src = pre.getAttribute('data-src');
|
28 |
+
var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
|
29 |
+
var language = 'php';
|
30 |
+
|
31 |
+
var code = document.createElement('code');
|
32 |
+
code.className = 'language-' + language;
|
33 |
+
|
34 |
+
pre.textContent = '';
|
35 |
+
|
36 |
+
code.textContent = 'Loading…';
|
37 |
+
|
38 |
+
pre.appendChild(code);
|
39 |
+
|
40 |
+
var xhr = new XMLHttpRequest();
|
41 |
+
|
42 |
+
xhr.open('GET', src, true);
|
43 |
+
|
44 |
+
xhr.onreadystatechange = function () {
|
45 |
+
if (xhr.readyState == 4) {
|
46 |
+
|
47 |
+
if (xhr.status < 400 && xhr.responseText) {
|
48 |
+
code.textContent = xhr.responseText;
|
49 |
+
|
50 |
+
Prism.highlightElement(code);
|
51 |
+
}
|
52 |
+
else if (xhr.status >= 400) {
|
53 |
+
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
|
54 |
+
}
|
55 |
+
else {
|
56 |
+
code.textContent = '✖ Error: File does not exist or is empty';
|
57 |
+
}
|
58 |
+
}
|
59 |
+
};
|
60 |
+
|
61 |
+
xhr.send(null);
|
62 |
+
});
|
63 |
+
}
|
64 |
+
|
65 |
+
$(document).ready(function(){
|
66 |
+
loadExternalCodeSnippets();
|
67 |
+
});
|
68 |
+
$('#source-view').on('shown', function () {
|
69 |
+
loadExternalCodeSnippets();
|
70 |
+
})
|
71 |
+
</script>
|
72 |
+
|
73 |
+
<link rel="shortcut icon" href="../images/favicon.ico"/>
|
74 |
+
<link rel="apple-touch-icon" href="../images/apple-touch-icon.png"/>
|
75 |
+
<link rel="apple-touch-icon" sizes="72x72" href="../images/apple-touch-icon-72x72.png"/>
|
76 |
+
<link rel="apple-touch-icon" sizes="114x114" href="../images/apple-touch-icon-114x114.png"/>
|
77 |
</head>
|
78 |
<body>
|
79 |
+
|
80 |
<div class="navbar navbar-fixed-top">
|
81 |
+
<div class="navbar-inner">
|
82 |
+
<div class="container">
|
83 |
+
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
|
84 |
+
<i class="icon-ellipsis-vertical"></i>
|
85 |
+
</a>
|
86 |
+
<a class="brand" href="../index.html">Media Library Assistant</a>
|
87 |
+
|
88 |
+
<div class="nav-collapse">
|
89 |
+
<ul class="nav pull-right">
|
90 |
+
<li class="dropdown" id="charts-menu">
|
91 |
+
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
92 |
+
Charts <b class="caret"></b>
|
93 |
+
</a>
|
94 |
+
<ul class="dropdown-menu">
|
95 |
+
<li>
|
96 |
+
<a href="../graphs/class.html">
|
97 |
+
<i class="icon-list-alt"></i> Class hierarchy diagram
|
98 |
+
</a>
|
99 |
+
</li>
|
100 |
+
</ul>
|
101 |
+
</li>
|
102 |
+
<li class="dropdown" id="reports-menu">
|
103 |
+
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
104 |
+
Reports <b class="caret"></b>
|
105 |
+
</a>
|
106 |
+
<ul class="dropdown-menu">
|
107 |
+
<li>
|
108 |
+
<a href="../reports/errors.html">
|
109 |
+
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">0</span>
|
110 |
+
</a>
|
111 |
+
</li>
|
112 |
+
<li>
|
113 |
+
<a href="../reports/markers.html">
|
114 |
+
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">3</span>
|
115 |
+
</a>
|
116 |
+
</li>
|
117 |
+
<li>
|
118 |
+
<a href="../reports/deprecated.html">
|
119 |
+
<i class="icon-list-alt"></i> Deprecated <span class="label label-info pull-right">0</span>
|
120 |
+
</a>
|
121 |
+
</li>
|
122 |
+
</ul>
|
123 |
+
</li>
|
124 |
+
</ul>
|
125 |
+
</div>
|
126 |
+
</div>
|
127 |
+
</div>
|
128 |
+
<!--<div class="go_to_top">-->
|
129 |
+
<!--<a href="#___" style="color: inherit">Back to top  <i class="icon-upload icon-white"></i></a>-->
|
130 |
+
<!--</div>-->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
131 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
132 |
|
133 |
+
<div id="___" class="container-fluid">
|
134 |
+
<section class="row-fluid">
|
135 |
+
<div class="span2 sidebar">
|
136 |
+
<div class="accordion" style="margin-bottom: 0">
|
137 |
+
<div class="accordion-group">
|
138 |
+
<div class="accordion-heading">
|
139 |
+
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1303022871"></a>
|
140 |
+
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
141 |
+
</div>
|
142 |
+
<div id="namespace-1303022871" class="accordion-body collapse in">
|
143 |
+
<div class="accordion-inner">
|
144 |
+
|
145 |
+
|
146 |
+
<ul>
|
147 |
+
<li class="class"><a href="../classes/CPAC_Storage_Model_MLA.html">CPAC_Storage_Model_MLA</a></li>
|
148 |
+
<li class="class"><a href="../classes/MLA.html">MLA</a></li>
|
149 |
+
<li class="class"><a href="../classes/MLA_Ajax.html">MLA_Ajax</a></li>
|
150 |
+
<li class="class"><a href="../classes/MLA_Checklist_Walker.html">MLA_Checklist_Walker</a></li>
|
151 |
+
<li class="class"><a href="../classes/MLA_Example_List_Table.html">MLA_Example_List_Table</a></li>
|
152 |
+
<li class="class"><a href="../classes/MLA_List_Table.html">MLA_List_Table</a></li>
|
153 |
+
<li class="class"><a href="../classes/MLA_Polylang.html">MLA_Polylang</a></li>
|
154 |
+
<li class="class"><a href="../classes/MLA_Thumbnail.html">MLA_Thumbnail</a></li>
|
155 |
+
<li class="class"><a href="../classes/MLA_Upgrader_Skin.html">MLA_Upgrader_Skin</a></li>
|
156 |
+
<li class="class"><a href="../classes/MLA_Upload_List_Table.html">MLA_Upload_List_Table</a></li>
|
157 |
+
<li class="class"><a href="../classes/MLA_Upload_Optional_List_Table.html">MLA_Upload_Optional_List_Table</a></li>
|
158 |
+
<li class="class"><a href="../classes/MLA_View_List_Table.html">MLA_View_List_Table</a></li>
|
159 |
+
<li class="class"><a href="../classes/MLA_WPML.html">MLA_WPML</a></li>
|
160 |
+
<li class="class"><a href="../classes/MLA_WPML_List_Table.html">MLA_WPML_List_Table</a></li>
|
161 |
+
<li class="class"><a href="../classes/MLA_WPML_Table.html">MLA_WPML_Table</a></li>
|
162 |
+
<li class="class"><a href="../classes/MLACore.html">MLACore</a></li>
|
163 |
+
<li class="class"><a href="../classes/MLACoreOptions.html">MLACoreOptions</a></li>
|
164 |
+
<li class="class"><a href="../classes/MLAData.html">MLAData</a></li>
|
165 |
+
<li class="class"><a href="../classes/MLAData_Source.html">MLAData_Source</a></li>
|
166 |
+
<li class="class"><a href="../classes/MLAEdit.html">MLAEdit</a></li>
|
167 |
+
<li class="class"><a href="../classes/MLAFileDownloader.html">MLAFileDownloader</a></li>
|
168 |
+
<li class="class"><a href="../classes/MLAImageProcessor.html">MLAImageProcessor</a></li>
|
169 |
+
<li class="class"><a href="../classes/MLAMime.html">MLAMime</a></li>
|
170 |
+
<li class="class"><a href="../classes/MLAModal.html">MLAModal</a></li>
|
171 |
+
<li class="class"><a href="../classes/MLAModal_Ajax.html">MLAModal_Ajax</a></li>
|
172 |
+
<li class="class"><a href="../classes/MLAMutex.html">MLAMutex</a></li>
|
173 |
+
<li class="class"><a href="../classes/MLAObjects.html">MLAObjects</a></li>
|
174 |
+
<li class="class"><a href="../classes/MLAOptions.html">MLAOptions</a></li>
|
175 |
+
<li class="class"><a href="../classes/MLAPDF.html">MLAPDF</a></li>
|
176 |
+
<li class="class"><a href="../classes/MLAQuery.html">MLAQuery</a></li>
|
177 |
+
<li class="class"><a href="../classes/MLAReferences.html">MLAReferences</a></li>
|
178 |
+
<li class="class"><a href="../classes/MLASettings.html">MLASettings</a></li>
|
179 |
+
<li class="class"><a href="../classes/MLAShortcode_Support.html">MLAShortcode_Support</a></li>
|
180 |
+
<li class="class"><a href="../classes/MLAShortcodes.html">MLAShortcodes</a></li>
|
181 |
+
<li class="class"><a href="../classes/MLATemplate_Support.html">MLATemplate_Support</a></li>
|
182 |
+
<li class="class"><a href="../classes/MLATest.html">MLATest</a></li>
|
183 |
+
<li class="class"><a href="../classes/MLATextWidget.html">MLATextWidget</a></li>
|
184 |
+
<li class="class"><a href="../classes/MLAUninstall.html">MLAUninstall</a></li>
|
185 |
+
</ul>
|
186 |
+
</div>
|
187 |
+
</div>
|
188 |
+
</div>
|
189 |
+
</div>
|
190 |
+
|
191 |
+
</div>
|
192 |
+
</section>
|
193 |
+
<section class="row-fluid">
|
194 |
+
<div class="span10 offset2">
|
195 |
+
<div class="row-fluid">
|
196 |
+
<div class="span8 content class">
|
197 |
+
<nav>
|
198 |
+
<a href="../namespaces/default.html">\</a> <i class="icon-level-up"></i>
|
199 |
+
</nav>
|
200 |
+
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal"><i class="icon-code"></i></a>
|
201 |
+
|
202 |
+
<h1><small>\</small>MLACoreOptions</h1>
|
203 |
+
<p><em>Class MLA (Media Library Assistant) Core Options defines MLA option settings and defaults</em></p>
|
204 |
+
|
205 |
+
|
206 |
+
|
207 |
+
<section id="summary">
|
208 |
+
<h2>Summary</h2>
|
209 |
+
<section class="row-fluid heading">
|
210 |
+
<section class="span4">
|
211 |
+
<a href="#methods">Methods</a>
|
212 |
+
</section>
|
213 |
+
<section class="span4">
|
214 |
+
<a href="#properties">Properties</a>
|
215 |
+
</section>
|
216 |
+
<section class="span4">
|
217 |
+
<a href="#constants">Constants</a>
|
218 |
+
</section>
|
219 |
+
</section>
|
220 |
+
<section class="row-fluid public">
|
221 |
+
<section class="span4">
|
222 |
+
<a href="../classes/MLACoreOptions.html#method_mla_localize_option_definitions_array" class="">mla_localize_option_definitions_array()</a><br />
|
223 |
+
</section>
|
224 |
+
<section class="span4">
|
225 |
+
<a href="../classes/MLACoreOptions.html#property_mla_option_definitions" class="">$mla_option_definitions</a><br />
|
226 |
+
</section>
|
227 |
+
<section class="span4">
|
228 |
+
<a href="../classes/MLACoreOptions.html#constant_MLA_SETTINGS_SLUG" class="">MLA_SETTINGS_SLUG</a><br />
|
229 |
+
<a href="../classes/MLACoreOptions.html#constant_MLA_VERSION_OPTION" class="">MLA_VERSION_OPTION</a><br />
|
230 |
+
<a href="../classes/MLACoreOptions.html#constant_MLA_EXCLUDE_REVISIONS" class="">MLA_EXCLUDE_REVISIONS</a><br />
|
231 |
+
<a href="../classes/MLACoreOptions.html#constant_MLA_FEATURED_IN_TUNING" class="">MLA_FEATURED_IN_TUNING</a><br />
|
232 |
+
<a href="../classes/MLACoreOptions.html#constant_MLA_INSERTED_IN_TUNING" class="">MLA_INSERTED_IN_TUNING</a><br />
|
233 |
+
<a href="../classes/MLACoreOptions.html#constant_MLA_GALLERY_IN_TUNING" class="">MLA_GALLERY_IN_TUNING</a><br />
|
234 |
+
<a href="../classes/MLACoreOptions.html#constant_MLA_MLA_GALLERY_IN_TUNING" class="">MLA_MLA_GALLERY_IN_TUNING</a><br />
|
235 |
+
<a href="../classes/MLACoreOptions.html#constant_MLA_COUNT_TERM_ATTACHMENTS" class="">MLA_COUNT_TERM_ATTACHMENTS</a><br />
|
236 |
+
<a href="../classes/MLACoreOptions.html#constant_MLA_TAXONOMY_SUPPORT" class="">MLA_TAXONOMY_SUPPORT</a><br />
|
237 |
+
<a href="../classes/MLACoreOptions.html#constant_MLA_FILTER_METAKEY" class="">MLA_FILTER_METAKEY</a><br />
|
238 |
+
<a href="../classes/MLACoreOptions.html#constant_ALL_MLA_FILTER_METAKEY" class="">ALL_MLA_FILTER_METAKEY</a><br />
|
239 |
+
<a href="../classes/MLACoreOptions.html#constant_NO_MLA_FILTER_METAKEY" class="">NO_MLA_FILTER_METAKEY</a><br />
|
240 |
+
<a href="../classes/MLACoreOptions.html#constant_MLA_SCREEN_PAGE_TITLE" class="">MLA_SCREEN_PAGE_TITLE</a><br />
|
241 |
+
<a href="../classes/MLACoreOptions.html#constant_MLA_SCREEN_MENU_TITLE" class="">MLA_SCREEN_MENU_TITLE</a><br />
|
242 |
+
<a href="../classes/MLACoreOptions.html#constant_MLA_SCREEN_ORDER" class="">MLA_SCREEN_ORDER</a><br />
|
243 |
+
<a href="../classes/MLACoreOptions.html#constant_MLA_SCREEN_DISPLAY_LIBRARY" class="">MLA_SCREEN_DISPLAY_LIBRARY</a><br />
|
244 |
+
<a href="../classes/MLACoreOptions.html#constant_MLA_SCREEN_DISPLAY_SWITCHER" class="">MLA_SCREEN_DISPLAY_SWITCHER</a><br />
|
245 |
+
<a href="../classes/MLACoreOptions.html#constant_MLA_DEFAULT_ORDERBY" class="">MLA_DEFAULT_ORDERBY</a><br />
|
246 |
+
<a href="../classes/MLACoreOptions.html#constant_MLA_DEFAULT_ORDER" class="">MLA_DEFAULT_ORDER</a><br />
|
247 |
+
<a href="../classes/MLACoreOptions.html#constant_MLA_TABLE_VIEWS_WIDTH" class="">MLA_TABLE_VIEWS_WIDTH</a><br />
|
248 |
+
<a href="../classes/MLACoreOptions.html#constant_MLA_TABLE_ICON_SIZE" class="">MLA_TABLE_ICON_SIZE</a><br />
|
249 |
+
<a href="../classes/MLACoreOptions.html#constant_MLA_BULK_CHUNK_SIZE" class="">MLA_BULK_CHUNK_SIZE</a><br />
|
250 |
+
<a href="../classes/MLACoreOptions.html#constant_MLA_TAXONOMY_FILTER_DEPTH" class="">MLA_TAXONOMY_FILTER_DEPTH</a><br />
|
251 |
+
<a href="../classes/MLACoreOptions.html#constant_MLA_TAXONOMY_FILTER_INCLUDE_CHILDREN" class="">MLA_TAXONOMY_FILTER_INCLUDE_CHILDREN</a><br />
|
252 |
+
<a href="../classes/MLACoreOptions.html#constant_MLA_SEARCH_MEDIA_FILTER_SHOW_CONTROLS" class="">MLA_SEARCH_MEDIA_FILTER_SHOW_CONTROLS</a><br />
|
253 |
+
<a href="../classes/MLACoreOptions.html#constant_MLA_SEARCH_MEDIA_FILTER_DEFAULTS" class="">MLA_SEARCH_MEDIA_FILTER_DEFAULTS</a><br />
|
254 |
+
<a href="../classes/MLACoreOptions.html#constant_MLA_EXIF_SIZE" class="">MLA_EXIF_SIZE</a><br />
|
255 |
+
<a href="../classes/MLACoreOptions.html#constant_MLA_NEW_CUSTOM_RULE" class="">MLA_NEW_CUSTOM_RULE</a><br />
|
256 |
+
<a href="../classes/MLACoreOptions.html#constant_MLA_NEW_CUSTOM_FIELD" class="">MLA_NEW_CUSTOM_FIELD</a><br />
|
257 |
+
<a href="../classes/MLACoreOptions.html#constant_MLA_EDIT_MEDIA_SEARCH_TAXONOMY" class="">MLA_EDIT_MEDIA_SEARCH_TAXONOMY</a><br />
|
258 |
+
<a href="../classes/MLACoreOptions.html#constant_MLA_EDIT_MEDIA_META_BOXES" class="">MLA_EDIT_MEDIA_META_BOXES</a><br />
|
259 |
+
<a href="../classes/MLACoreOptions.html#constant_MLA_ADD_NEW_BULK_EDIT" class="">MLA_ADD_NEW_BULK_EDIT</a><br />
|
260 |
+
<a href="../classes/MLACoreOptions.html#constant_MLA_ADD_NEW_BULK_EDIT_ON_TOP" class="">MLA_ADD_NEW_BULK_EDIT_ON_TOP</a><br />
|
261 |
+
<a href="../classes/MLACoreOptions.html#constant_MLA_ADD_NEW_BULK_EDIT_AUTO_OPEN" class="">MLA_ADD_NEW_BULK_EDIT_AUTO_OPEN</a><br />
|
262 |
+
<a href="../classes/MLACoreOptions.html#constant_MLA_MEDIA_GRID_TOOLBAR" class="">MLA_MEDIA_GRID_TOOLBAR</a><br />
|
263 |
+
<a href="../classes/MLACoreOptions.html#constant_MLA_MEDIA_MODAL_TOOLBAR" class="">MLA_MEDIA_MODAL_TOOLBAR</a><br />
|
264 |
+
<a href="../classes/MLACoreOptions.html#constant_MLA_MEDIA_MODAL_MIMETYPES" class="">MLA_MEDIA_MODAL_MIMETYPES</a><br />
|
265 |
+
<a href="../classes/MLACoreOptions.html#constant_MLA_MEDIA_MODAL_MONTHS" class="">MLA_MEDIA_MODAL_MONTHS</a><br />
|
266 |
+
<a href="../classes/MLACoreOptions.html#constant_MLA_MEDIA_MODAL_TERMS" class="">MLA_MEDIA_MODAL_TERMS</a><br />
|
267 |
+
<a href="../classes/MLACoreOptions.html#constant_MLA_MEDIA_MODAL_TERMS_SEARCH" class="">MLA_MEDIA_MODAL_TERMS_SEARCH</a><br />
|
268 |
+
<a href="../classes/MLACoreOptions.html#constant_MLA_MEDIA_MODAL_SEARCHBOX" class="">MLA_MEDIA_MODAL_SEARCHBOX</a><br />
|
269 |
+
<a href="../classes/MLACoreOptions.html#constant_MLA_MEDIA_MODAL_SEARCHBOX_CONTROLS" class="">MLA_MEDIA_MODAL_SEARCHBOX_CONTROLS</a><br />
|
270 |
+
<a href="../classes/MLACoreOptions.html#constant_MLA_MEDIA_MODAL_DETAILS_CATEGORY_METABOX" class="">MLA_MEDIA_MODAL_DETAILS_CATEGORY_METABOX</a><br />
|
271 |
+
<a href="../classes/MLACoreOptions.html#constant_MLA_MEDIA_MODAL_DETAILS_TAG_METABOX" class="">MLA_MEDIA_MODAL_DETAILS_TAG_METABOX</a><br />
|
272 |
+
<a href="../classes/MLACoreOptions.html#constant_MLA_MEDIA_MODAL_DETAILS_AUTOFILL" class="">MLA_MEDIA_MODAL_DETAILS_AUTOFILL</a><br />
|
273 |
+
<a href="../classes/MLACoreOptions.html#constant_MLA_MEDIA_MODAL_ORDERBY" class="">MLA_MEDIA_MODAL_ORDERBY</a><br />
|
274 |
+
<a href="../classes/MLACoreOptions.html#constant_MLA_MEDIA_MODAL_ORDER" class="">MLA_MEDIA_MODAL_ORDER</a><br />
|
275 |
+
<a href="../classes/MLACoreOptions.html#constant_MLA_DELETE_OPTION_SETTINGS" class="">MLA_DELETE_OPTION_SETTINGS</a><br />
|
276 |
+
<a href="../classes/MLACoreOptions.html#constant_MLA_DELETE_OPTION_BACKUPS" class="">MLA_DELETE_OPTION_BACKUPS</a><br />
|
277 |
+
<a href="../classes/MLACoreOptions.html#constant_MLA_MEDIA_MODAL_APPLY_DISPLAY_SETTINGS" class="">MLA_MEDIA_MODAL_APPLY_DISPLAY_SETTINGS</a><br />
|
278 |
+
<a href="../classes/MLACoreOptions.html#constant_MLA_POST_MIME_TYPES" class="">MLA_POST_MIME_TYPES</a><br />
|
279 |
+
<a href="../classes/MLACoreOptions.html#constant_MLA_ENABLE_POST_MIME_TYPES" class="">MLA_ENABLE_POST_MIME_TYPES</a><br />
|
280 |
+
<a href="../classes/MLACoreOptions.html#constant_MLA_UPLOAD_MIMES" class="">MLA_UPLOAD_MIMES</a><br />
|
281 |
+
<a href="../classes/MLACoreOptions.html#constant_MLA_ENABLE_UPLOAD_MIMES" class="">MLA_ENABLE_UPLOAD_MIMES</a><br />
|
282 |
+
<a href="../classes/MLACoreOptions.html#constant_MLA_ENABLE_MLA_ICONS" class="">MLA_ENABLE_MLA_ICONS</a><br />
|
283 |
+
<a href="../classes/MLACoreOptions.html#constant_MLA_DEBUG_DISPLAY_LIMIT" class="">MLA_DEBUG_DISPLAY_LIMIT</a><br />
|
284 |
+
<a href="../classes/MLACoreOptions.html#constant_MLA_DEBUG_FILE" class="">MLA_DEBUG_FILE</a><br />
|
285 |
+
<a href="../classes/MLACoreOptions.html#constant_MLA_DEBUG_REPLACE_PHP_LOG" class="">MLA_DEBUG_REPLACE_PHP_LOG</a><br />
|
286 |
+
<a href="../classes/MLACoreOptions.html#constant_MLA_DEBUG_REPLACE_PHP_REPORTING" class="">MLA_DEBUG_REPLACE_PHP_REPORTING</a><br />
|
287 |
+
<a href="../classes/MLACoreOptions.html#constant_MLA_DEBUG_REPLACE_LEVEL" class="">MLA_DEBUG_REPLACE_LEVEL</a><br />
|
288 |
+
</section>
|
289 |
+
</section>
|
290 |
+
<section class="row-fluid protected">
|
291 |
+
<section class="span4">
|
292 |
+
<em>No protected methods found</em>
|
293 |
+
</section>
|
294 |
+
<section class="span4">
|
295 |
+
<em>No protected properties found</em>
|
296 |
+
</section>
|
297 |
+
<section class="span4">
|
298 |
+
<em>N/A</em>
|
299 |
+
</section>
|
300 |
+
</section>
|
301 |
+
<section class="row-fluid private">
|
302 |
+
<section class="span4">
|
303 |
+
<em>No private methods found</em>
|
304 |
+
</section>
|
305 |
+
<section class="span4">
|
306 |
+
<em>No private properties found</em>
|
307 |
+
</section>
|
308 |
+
<section class="span4">
|
309 |
+
<em>N/A</em>
|
310 |
+
</section>
|
311 |
+
</section>
|
312 |
+
</section>
|
313 |
+
</div>
|
314 |
+
<aside class="span4 detailsbar">
|
315 |
+
|
316 |
+
|
317 |
+
<dl>
|
318 |
+
<dt>File</dt>
|
319 |
+
<dd><a href="../files/includes.class-mla-core-options.html"><div class="path-wrapper">includes\class-mla-core-options.php</div></a></dd>
|
320 |
+
<dt>Package</dt>
|
321 |
+
<dd><div class="namespace-wrapper">Media Library Assistant</div></dd>
|
322 |
+
<dt>Class hierarchy</dt>
|
323 |
+
<dd class="hierarchy">
|
324 |
+
<div class="namespace-wrapper">\MLACoreOptions</div>
|
325 |
+
</dd>
|
326 |
+
|
327 |
+
|
328 |
+
|
329 |
+
|
330 |
+
|
331 |
+
</dl>
|
332 |
+
<h2>Tags</h2>
|
333 |
+
<table class="table table-condensed">
|
334 |
+
<tr>
|
335 |
+
<th>
|
336 |
+
since
|
337 |
+
</th>
|
338 |
+
<td>
|
339 |
+
|
340 |
+
</td>
|
341 |
+
</tr>
|
342 |
+
</table>
|
343 |
+
</aside>
|
344 |
+
</div>
|
345 |
+
|
346 |
+
<a id="constants" name="constants"></a>
|
347 |
+
<div class="row-fluid">
|
348 |
+
<div class="span8 content class">
|
349 |
+
<h2>Constants</h2>
|
350 |
+
</div>
|
351 |
+
<aside class="span4 detailsbar"></aside>
|
352 |
+
</div>
|
353 |
+
|
354 |
+
<div class="row-fluid">
|
355 |
+
<div class="span8 content class">
|
356 |
+
<a id="constant_MLA_SETTINGS_SLUG" name="constant_MLA_SETTINGS_SLUG" class="anchor"></a>
|
357 |
+
<article id="constant_MLA_SETTINGS_SLUG" class="constant">
|
358 |
+
<h3 class="">MLA_SETTINGS_SLUG</h3>
|
359 |
+
<pre class="signature">MLA_SETTINGS_SLUG</pre>
|
360 |
+
<p><em>Provides a unique name for the settings page</em></p>
|
361 |
+
|
362 |
+
</article>
|
363 |
+
</div>
|
364 |
+
<aside class="span4 detailsbar">
|
365 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
366 |
+
<dl>
|
367 |
+
</dl>
|
368 |
+
<h2>Tags</h2>
|
369 |
+
<table class="table table-condensed">
|
370 |
+
<tr>
|
371 |
+
<th>
|
372 |
+
since
|
373 |
+
</th>
|
374 |
+
<td>
|
375 |
+
|
376 |
+
</td>
|
377 |
+
</tr>
|
378 |
+
</table>
|
379 |
+
</aside>
|
380 |
+
</div>
|
381 |
+
|
382 |
+
<div class="row-fluid">
|
383 |
+
<div class="span8 content class">
|
384 |
+
<a id="constant_MLA_VERSION_OPTION" name="constant_MLA_VERSION_OPTION" class="anchor"></a>
|
385 |
+
<article id="constant_MLA_VERSION_OPTION" class="constant">
|
386 |
+
<h3 class="">MLA_VERSION_OPTION</h3>
|
387 |
+
<pre class="signature">MLA_VERSION_OPTION</pre>
|
388 |
+
<p><em>Provides a unique name for the current version option</em></p>
|
389 |
+
|
390 |
+
</article>
|
391 |
+
</div>
|
392 |
+
<aside class="span4 detailsbar">
|
393 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
394 |
+
<dl>
|
395 |
+
</dl>
|
396 |
+
<h2>Tags</h2>
|
397 |
+
<table class="table table-condensed">
|
398 |
+
<tr><td colspan="2"><em>None found</em></td></tr>
|
399 |
+
</table>
|
400 |
+
</aside>
|
401 |
+
</div>
|
402 |
+
|
403 |
+
<div class="row-fluid">
|
404 |
+
<div class="span8 content class">
|
405 |
+
<a id="constant_MLA_EXCLUDE_REVISIONS" name="constant_MLA_EXCLUDE_REVISIONS" class="anchor"></a>
|
406 |
+
<article id="constant_MLA_EXCLUDE_REVISIONS" class="constant">
|
407 |
+
<h3 class="">MLA_EXCLUDE_REVISIONS</h3>
|
408 |
+
<pre class="signature">MLA_EXCLUDE_REVISIONS</pre>
|
409 |
+
<p><em>Provides a unique name for the exclude revisions option</em></p>
|
410 |
+
|
411 |
+
</article>
|
412 |
+
</div>
|
413 |
+
<aside class="span4 detailsbar">
|
414 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
415 |
+
<dl>
|
416 |
+
</dl>
|
417 |
+
<h2>Tags</h2>
|
418 |
+
<table class="table table-condensed">
|
419 |
+
<tr><td colspan="2"><em>None found</em></td></tr>
|
420 |
+
</table>
|
421 |
+
</aside>
|
422 |
+
</div>
|
423 |
+
|
424 |
+
<div class="row-fluid">
|
425 |
+
<div class="span8 content class">
|
426 |
+
<a id="constant_MLA_FEATURED_IN_TUNING" name="constant_MLA_FEATURED_IN_TUNING" class="anchor"></a>
|
427 |
+
<article id="constant_MLA_FEATURED_IN_TUNING" class="constant">
|
428 |
+
<h3 class="">MLA_FEATURED_IN_TUNING</h3>
|
429 |
+
<pre class="signature">MLA_FEATURED_IN_TUNING</pre>
|
430 |
+
<p><em>Provides a unique name for a database tuning option</em></p>
|
431 |
+
|
432 |
+
</article>
|
433 |
+
</div>
|
434 |
+
<aside class="span4 detailsbar">
|
435 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
436 |
+
<dl>
|
437 |
+
</dl>
|
438 |
+
<h2>Tags</h2>
|
439 |
+
<table class="table table-condensed">
|
440 |
+
<tr><td colspan="2"><em>None found</em></td></tr>
|
441 |
+
</table>
|
442 |
+
</aside>
|
443 |
+
</div>
|
444 |
+
|
445 |
+
<div class="row-fluid">
|
446 |
+
<div class="span8 content class">
|
447 |
+
<a id="constant_MLA_INSERTED_IN_TUNING" name="constant_MLA_INSERTED_IN_TUNING" class="anchor"></a>
|
448 |
+
<article id="constant_MLA_INSERTED_IN_TUNING" class="constant">
|
449 |
+
<h3 class="">MLA_INSERTED_IN_TUNING</h3>
|
450 |
+
<pre class="signature">MLA_INSERTED_IN_TUNING</pre>
|
451 |
+
<p><em>Provides a unique name for a database tuning option</em></p>
|
452 |
+
|
453 |
+
</article>
|
454 |
+
</div>
|
455 |
+
<aside class="span4 detailsbar">
|
456 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
457 |
+
<dl>
|
458 |
+
</dl>
|
459 |
+
<h2>Tags</h2>
|
460 |
+
<table class="table table-condensed">
|
461 |
+
<tr><td colspan="2"><em>None found</em></td></tr>
|
462 |
+
</table>
|
463 |
+
</aside>
|
464 |
+
</div>
|
465 |
+
|
466 |
+
<div class="row-fluid">
|
467 |
+
<div class="span8 content class">
|
468 |
+
<a id="constant_MLA_GALLERY_IN_TUNING" name="constant_MLA_GALLERY_IN_TUNING" class="anchor"></a>
|
469 |
+
<article id="constant_MLA_GALLERY_IN_TUNING" class="constant">
|
470 |
+
<h3 class="">MLA_GALLERY_IN_TUNING</h3>
|
471 |
+
<pre class="signature">MLA_GALLERY_IN_TUNING</pre>
|
472 |
+
<p><em>Provides a unique name for a database tuning option</em></p>
|
473 |
+
|
474 |
+
</article>
|
475 |
+
</div>
|
476 |
+
<aside class="span4 detailsbar">
|
477 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
478 |
+
<dl>
|
479 |
+
</dl>
|
480 |
+
<h2>Tags</h2>
|
481 |
+
<table class="table table-condensed">
|
482 |
+
<tr><td colspan="2"><em>None found</em></td></tr>
|
483 |
+
</table>
|
484 |
+
</aside>
|
485 |
+
</div>
|
486 |
+
|
487 |
+
<div class="row-fluid">
|
488 |
+
<div class="span8 content class">
|
489 |
+
<a id="constant_MLA_MLA_GALLERY_IN_TUNING" name="constant_MLA_MLA_GALLERY_IN_TUNING" class="anchor"></a>
|
490 |
+
<article id="constant_MLA_MLA_GALLERY_IN_TUNING" class="constant">
|
491 |
+
<h3 class="">MLA_MLA_GALLERY_IN_TUNING</h3>
|
492 |
+
<pre class="signature">MLA_MLA_GALLERY_IN_TUNING</pre>
|
493 |
+
<p><em>Provides a unique name for a database tuning option</em></p>
|
494 |
+
|
495 |
+
</article>
|
496 |
+
</div>
|
497 |
+
<aside class="span4 detailsbar">
|
498 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
499 |
+
<dl>
|
500 |
+
</dl>
|
501 |
+
<h2>Tags</h2>
|
502 |
+
<table class="table table-condensed">
|
503 |
+
<tr><td colspan="2"><em>None found</em></td></tr>
|
504 |
+
</table>
|
505 |
+
</aside>
|
506 |
+
</div>
|
507 |
+
|
508 |
+
<div class="row-fluid">
|
509 |
+
<div class="span8 content class">
|
510 |
+
<a id="constant_MLA_COUNT_TERM_ATTACHMENTS" name="constant_MLA_COUNT_TERM_ATTACHMENTS" class="anchor"></a>
|
511 |
+
<article id="constant_MLA_COUNT_TERM_ATTACHMENTS" class="constant">
|
512 |
+
<h3 class="">MLA_COUNT_TERM_ATTACHMENTS</h3>
|
513 |
+
<pre class="signature">MLA_COUNT_TERM_ATTACHMENTS</pre>
|
514 |
+
<p><em>Provides a unique name for the taxonomy count Attachments option</em></p>
|
515 |
+
|
516 |
+
</article>
|
517 |
+
</div>
|
518 |
+
<aside class="span4 detailsbar">
|
519 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
520 |
+
<dl>
|
521 |
+
</dl>
|
522 |
+
<h2>Tags</h2>
|
523 |
+
<table class="table table-condensed">
|
524 |
+
<tr><td colspan="2"><em>None found</em></td></tr>
|
525 |
+
</table>
|
526 |
+
</aside>
|
527 |
+
</div>
|
528 |
+
|
529 |
+
<div class="row-fluid">
|
530 |
+
<div class="span8 content class">
|
531 |
+
<a id="constant_MLA_TAXONOMY_SUPPORT" name="constant_MLA_TAXONOMY_SUPPORT" class="anchor"></a>
|
532 |
+
<article id="constant_MLA_TAXONOMY_SUPPORT" class="constant">
|
533 |
+
<h3 class="">MLA_TAXONOMY_SUPPORT</h3>
|
534 |
+
<pre class="signature">MLA_TAXONOMY_SUPPORT</pre>
|
535 |
+
<p><em>Provides a unique name for the taxonomy support option</em></p>
|
536 |
+
|
537 |
+
</article>
|
538 |
+
</div>
|
539 |
+
<aside class="span4 detailsbar">
|
540 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
541 |
+
<dl>
|
542 |
+
</dl>
|
543 |
+
<h2>Tags</h2>
|
544 |
+
<table class="table table-condensed">
|
545 |
+
<tr><td colspan="2"><em>None found</em></td></tr>
|
546 |
+
</table>
|
547 |
+
</aside>
|
548 |
+
</div>
|
549 |
+
|
550 |
+
<div class="row-fluid">
|
551 |
+
<div class="span8 content class">
|
552 |
+
<a id="constant_MLA_FILTER_METAKEY" name="constant_MLA_FILTER_METAKEY" class="anchor"></a>
|
553 |
+
<article id="constant_MLA_FILTER_METAKEY" class="constant">
|
554 |
+
<h3 class="">MLA_FILTER_METAKEY</h3>
|
555 |
+
<pre class="signature">MLA_FILTER_METAKEY</pre>
|
556 |
+
<p><em>Provides a unique name for the "filter on custom field" key</em></p>
|
557 |
+
|
558 |
+
</article>
|
559 |
+
</div>
|
560 |
+
<aside class="span4 detailsbar">
|
561 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
562 |
+
<dl>
|
563 |
+
</dl>
|
564 |
+
<h2>Tags</h2>
|
565 |
+
<table class="table table-condensed">
|
566 |
+
<tr><td colspan="2"><em>None found</em></td></tr>
|
567 |
+
</table>
|
568 |
+
</aside>
|
569 |
+
</div>
|
570 |
+
|
571 |
+
<div class="row-fluid">
|
572 |
+
<div class="span8 content class">
|
573 |
+
<a id="constant_ALL_MLA_FILTER_METAKEY" name="constant_ALL_MLA_FILTER_METAKEY" class="anchor"></a>
|
574 |
+
<article id="constant_ALL_MLA_FILTER_METAKEY" class="constant">
|
575 |
+
<h3 class="">ALL_MLA_FILTER_METAKEY</h3>
|
576 |
+
<pre class="signature">ALL_MLA_FILTER_METAKEY</pre>
|
577 |
+
<p><em>Provides a unique name for the "all custom field values" key</em></p>
|
578 |
+
|
579 |
+
</article>
|
580 |
+
</div>
|
581 |
+
<aside class="span4 detailsbar">
|
582 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
583 |
+
<dl>
|
584 |
+
</dl>
|
585 |
+
<h2>Tags</h2>
|
586 |
+
<table class="table table-condensed">
|
587 |
+
<tr><td colspan="2"><em>None found</em></td></tr>
|
588 |
+
</table>
|
589 |
+
</aside>
|
590 |
+
</div>
|
591 |
+
|
592 |
+
<div class="row-fluid">
|
593 |
+
<div class="span8 content class">
|
594 |
+
<a id="constant_NO_MLA_FILTER_METAKEY" name="constant_NO_MLA_FILTER_METAKEY" class="anchor"></a>
|
595 |
+
<article id="constant_NO_MLA_FILTER_METAKEY" class="constant">
|
596 |
+
<h3 class="">NO_MLA_FILTER_METAKEY</h3>
|
597 |
+
<pre class="signature">NO_MLA_FILTER_METAKEY</pre>
|
598 |
+
<p><em>Provides a unique name for the "no custom field values" key</em></p>
|
599 |
+
|
600 |
+
</article>
|
601 |
+
</div>
|
602 |
+
<aside class="span4 detailsbar">
|
603 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
604 |
+
<dl>
|
605 |
+
</dl>
|
606 |
+
<h2>Tags</h2>
|
607 |
+
<table class="table table-condensed">
|
608 |
+
<tr><td colspan="2"><em>None found</em></td></tr>
|
609 |
+
</table>
|
610 |
+
</aside>
|
611 |
+
</div>
|
612 |
+
|
613 |
+
<div class="row-fluid">
|
614 |
+
<div class="span8 content class">
|
615 |
+
<a id="constant_MLA_SCREEN_PAGE_TITLE" name="constant_MLA_SCREEN_PAGE_TITLE" class="anchor"></a>
|
616 |
+
<article id="constant_MLA_SCREEN_PAGE_TITLE" class="constant">
|
617 |
+
<h3 class="">MLA_SCREEN_PAGE_TITLE</h3>
|
618 |
+
<pre class="signature">MLA_SCREEN_PAGE_TITLE</pre>
|
619 |
+
<p><em>Provides a unique name for the admin screen page title option</em></p>
|
620 |
+
|
621 |
+
</article>
|
622 |
+
</div>
|
623 |
+
<aside class="span4 detailsbar">
|
624 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
625 |
+
<dl>
|
626 |
+
</dl>
|
627 |
+
<h2>Tags</h2>
|
628 |
+
<table class="table table-condensed">
|
629 |
+
<tr><td colspan="2"><em>None found</em></td></tr>
|
630 |
+
</table>
|
631 |
+
</aside>
|
632 |
+
</div>
|
633 |
+
|
634 |
+
<div class="row-fluid">
|
635 |
+
<div class="span8 content class">
|
636 |
+
<a id="constant_MLA_SCREEN_MENU_TITLE" name="constant_MLA_SCREEN_MENU_TITLE" class="anchor"></a>
|
637 |
+
<article id="constant_MLA_SCREEN_MENU_TITLE" class="constant">
|
638 |
+
<h3 class="">MLA_SCREEN_MENU_TITLE</h3>
|
639 |
+
<pre class="signature">MLA_SCREEN_MENU_TITLE</pre>
|
640 |
+
<p><em>Provides a unique name for the admin screen menu title option</em></p>
|
641 |
+
|
642 |
+
</article>
|
643 |
+
</div>
|
644 |
+
<aside class="span4 detailsbar">
|
645 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
646 |
+
<dl>
|
647 |
+
</dl>
|
648 |
+
<h2>Tags</h2>
|
649 |
+
<table class="table table-condensed">
|
650 |
+
<tr><td colspan="2"><em>None found</em></td></tr>
|
651 |
+
</table>
|
652 |
+
</aside>
|
653 |
+
</div>
|
654 |
+
|
655 |
+
<div class="row-fluid">
|
656 |
+
<div class="span8 content class">
|
657 |
+
<a id="constant_MLA_SCREEN_ORDER" name="constant_MLA_SCREEN_ORDER" class="anchor"></a>
|
658 |
+
<article id="constant_MLA_SCREEN_ORDER" class="constant">
|
659 |
+
<h3 class="">MLA_SCREEN_ORDER</h3>
|
660 |
+
<pre class="signature">MLA_SCREEN_ORDER</pre>
|
661 |
+
<p><em>Provides a unique name for the admin screen menu order option</em></p>
|
662 |
+
|
663 |
+
</article>
|
664 |
+
</div>
|
665 |
+
<aside class="span4 detailsbar">
|
666 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
667 |
+
<dl>
|
668 |
+
</dl>
|
669 |
+
<h2>Tags</h2>
|
670 |
+
<table class="table table-condensed">
|
671 |
+
<tr><td colspan="2"><em>None found</em></td></tr>
|
672 |
+
</table>
|
673 |
+
</aside>
|
674 |
+
</div>
|
675 |
+
|
676 |
+
<div class="row-fluid">
|
677 |
+
<div class="span8 content class">
|
678 |
+
<a id="constant_MLA_SCREEN_DISPLAY_LIBRARY" name="constant_MLA_SCREEN_DISPLAY_LIBRARY" class="anchor"></a>
|
679 |
+
<article id="constant_MLA_SCREEN_DISPLAY_LIBRARY" class="constant">
|
680 |
+
<h3 class="">MLA_SCREEN_DISPLAY_LIBRARY</h3>
|
681 |
+
<pre class="signature">MLA_SCREEN_DISPLAY_LIBRARY</pre>
|
682 |
+
<p><em>Provides a unique name for the admin screen remove Media/Library option</em></p>
|
683 |
+
|
684 |
+
</article>
|
685 |
+
</div>
|
686 |
+
<aside class="span4 detailsbar">
|
687 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
688 |
+
<dl>
|
689 |
+
</dl>
|
690 |
+
<h2>Tags</h2>
|
691 |
+
<table class="table table-condensed">
|
692 |
+
<tr><td colspan="2"><em>None found</em></td></tr>
|
693 |
+
</table>
|
694 |
+
</aside>
|
695 |
+
</div>
|
696 |
+
|
697 |
+
<div class="row-fluid">
|
698 |
+
<div class="span8 content class">
|
699 |
+
<a id="constant_MLA_SCREEN_DISPLAY_SWITCHER" name="constant_MLA_SCREEN_DISPLAY_SWITCHER" class="anchor"></a>
|
700 |
+
<article id="constant_MLA_SCREEN_DISPLAY_SWITCHER" class="constant">
|
701 |
+
<h3 class="">MLA_SCREEN_DISPLAY_SWITCHER</h3>
|
702 |
+
<pre class="signature">MLA_SCREEN_DISPLAY_SWITCHER</pre>
|
703 |
+
<p><em>Provides a unique name for the Media/Assistant list/grid switcher option</em></p>
|
704 |
+
|
705 |
+
</article>
|
706 |
+
</div>
|
707 |
+
<aside class="span4 detailsbar">
|
708 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
709 |
+
<dl>
|
710 |
+
</dl>
|
711 |
+
<h2>Tags</h2>
|
712 |
+
<table class="table table-condensed">
|
713 |
+
<tr><td colspan="2"><em>None found</em></td></tr>
|
714 |
+
</table>
|
715 |
+
</aside>
|
716 |
+
</div>
|
717 |
+
|
718 |
+
<div class="row-fluid">
|
719 |
+
<div class="span8 content class">
|
720 |
+
<a id="constant_MLA_DEFAULT_ORDERBY" name="constant_MLA_DEFAULT_ORDERBY" class="anchor"></a>
|
721 |
+
<article id="constant_MLA_DEFAULT_ORDERBY" class="constant">
|
722 |
+
<h3 class="">MLA_DEFAULT_ORDERBY</h3>
|
723 |
+
<pre class="signature">MLA_DEFAULT_ORDERBY</pre>
|
724 |
+
<p><em>Provides a unique name for the default orderby option</em></p>
|
725 |
+
|
726 |
+
</article>
|
727 |
+
</div>
|
728 |
+
<aside class="span4 detailsbar">
|
729 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
730 |
+
<dl>
|
731 |
+
</dl>
|
732 |
+
<h2>Tags</h2>
|
733 |
+
<table class="table table-condensed">
|
734 |
+
<tr><td colspan="2"><em>None found</em></td></tr>
|
735 |
+
</table>
|
736 |
+
</aside>
|
737 |
+
</div>
|
738 |
+
|
739 |
+
<div class="row-fluid">
|
740 |
+
<div class="span8 content class">
|
741 |
+
<a id="constant_MLA_DEFAULT_ORDER" name="constant_MLA_DEFAULT_ORDER" class="anchor"></a>
|
742 |
+
<article id="constant_MLA_DEFAULT_ORDER" class="constant">
|
743 |
+
<h3 class="">MLA_DEFAULT_ORDER</h3>
|
744 |
+
<pre class="signature">MLA_DEFAULT_ORDER</pre>
|
745 |
+
<p><em>Provides a unique name for the default order option</em></p>
|
746 |
+
|
747 |
+
</article>
|
748 |
+
</div>
|
749 |
+
<aside class="span4 detailsbar">
|
750 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
751 |
+
<dl>
|
752 |
+
</dl>
|
753 |
+
<h2>Tags</h2>
|
754 |
+
<table class="table table-condensed">
|
755 |
+
<tr><td colspan="2"><em>None found</em></td></tr>
|
756 |
+
</table>
|
757 |
+
</aside>
|
758 |
+
</div>
|
759 |
+
|
760 |
+
<div class="row-fluid">
|
761 |
+
<div class="span8 content class">
|
762 |
+
<a id="constant_MLA_TABLE_VIEWS_WIDTH" name="constant_MLA_TABLE_VIEWS_WIDTH" class="anchor"></a>
|
763 |
+
<article id="constant_MLA_TABLE_VIEWS_WIDTH" class="constant">
|
764 |
+
<h3 class="">MLA_TABLE_VIEWS_WIDTH</h3>
|
765 |
+
<pre class="signature">MLA_TABLE_VIEWS_WIDTH</pre>
|
766 |
+
<p><em>Provides a unique name for the Media/Assistant submenu table views width option</em></p>
|
767 |
+
|
768 |
+
</article>
|
769 |
+
</div>
|
770 |
+
<aside class="span4 detailsbar">
|
771 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
772 |
+
<dl>
|
773 |
+
</dl>
|
774 |
+
<h2>Tags</h2>
|
775 |
+
<table class="table table-condensed">
|
776 |
+
<tr><td colspan="2"><em>None found</em></td></tr>
|
777 |
+
</table>
|
778 |
+
</aside>
|
779 |
+
</div>
|
780 |
+
|
781 |
+
<div class="row-fluid">
|
782 |
+
<div class="span8 content class">
|
783 |
+
<a id="constant_MLA_TABLE_ICON_SIZE" name="constant_MLA_TABLE_ICON_SIZE" class="anchor"></a>
|
784 |
+
<article id="constant_MLA_TABLE_ICON_SIZE" class="constant">
|
785 |
+
<h3 class="">MLA_TABLE_ICON_SIZE</h3>
|
786 |
+
<pre class="signature">MLA_TABLE_ICON_SIZE</pre>
|
787 |
+
<p><em>Provides a unique name for the Media/Assistant submenu table thumbnail/icon size option</em></p>
|
788 |
+
|
789 |
+
</article>
|
790 |
+
</div>
|
791 |
+
<aside class="span4 detailsbar">
|
792 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
793 |
+
<dl>
|
794 |
+
</dl>
|
795 |
+
<h2>Tags</h2>
|
796 |
+
<table class="table table-condensed">
|
797 |
+
<tr><td colspan="2"><em>None found</em></td></tr>
|
798 |
+
</table>
|
799 |
+
</aside>
|
800 |
+
</div>
|
801 |
+
|
802 |
+
<div class="row-fluid">
|
803 |
+
<div class="span8 content class">
|
804 |
+
<a id="constant_MLA_BULK_CHUNK_SIZE" name="constant_MLA_BULK_CHUNK_SIZE" class="anchor"></a>
|
805 |
+
<article id="constant_MLA_BULK_CHUNK_SIZE" class="constant">
|
806 |
+
<h3 class="">MLA_BULK_CHUNK_SIZE</h3>
|
807 |
+
<pre class="signature">MLA_BULK_CHUNK_SIZE</pre>
|
808 |
+
<p><em>Provides a unique name for the Bulk Update and Map All chunk size option</em></p>
|
809 |
+
|
810 |
+
</article>
|
811 |
+
</div>
|
812 |
+
<aside class="span4 detailsbar">
|
813 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
814 |
+
<dl>
|
815 |
+
</dl>
|
816 |
+
<h2>Tags</h2>
|
817 |
+
<table class="table table-condensed">
|
818 |
+
<tr><td colspan="2"><em>None found</em></td></tr>
|
819 |
+
</table>
|
820 |
+
</aside>
|
821 |
+
</div>
|
822 |
+
|
823 |
+
<div class="row-fluid">
|
824 |
+
<div class="span8 content class">
|
825 |
+
<a id="constant_MLA_TAXONOMY_FILTER_DEPTH" name="constant_MLA_TAXONOMY_FILTER_DEPTH" class="anchor"></a>
|
826 |
+
<article id="constant_MLA_TAXONOMY_FILTER_DEPTH" class="constant">
|
827 |
+
<h3 class="">MLA_TAXONOMY_FILTER_DEPTH</h3>
|
828 |
+
<pre class="signature">MLA_TAXONOMY_FILTER_DEPTH</pre>
|
829 |
+
<p><em>Provides a unique name for the taxonomy filter maximum depth option</em></p>
|
830 |
+
|
831 |
+
</article>
|
832 |
+
</div>
|
833 |
+
<aside class="span4 detailsbar">
|
834 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
835 |
+
<dl>
|
836 |
+
</dl>
|
837 |
+
<h2>Tags</h2>
|
838 |
+
<table class="table table-condensed">
|
839 |
+
<tr><td colspan="2"><em>None found</em></td></tr>
|
840 |
+
</table>
|
841 |
+
</aside>
|
842 |
+
</div>
|
843 |
+
|
844 |
+
<div class="row-fluid">
|
845 |
+
<div class="span8 content class">
|
846 |
+
<a id="constant_MLA_TAXONOMY_FILTER_INCLUDE_CHILDREN" name="constant_MLA_TAXONOMY_FILTER_INCLUDE_CHILDREN" class="anchor"></a>
|
847 |
+
<article id="constant_MLA_TAXONOMY_FILTER_INCLUDE_CHILDREN" class="constant">
|
848 |
+
<h3 class="">MLA_TAXONOMY_FILTER_INCLUDE_CHILDREN</h3>
|
849 |
+
<pre class="signature">MLA_TAXONOMY_FILTER_INCLUDE_CHILDREN</pre>
|
850 |
+
<p><em>Provides a unique name for the taxonomy filter maximum depth option</em></p>
|
851 |
+
|
852 |
+
</article>
|
853 |
+
</div>
|
854 |
+
<aside class="span4 detailsbar">
|
855 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
856 |
+
<dl>
|
857 |
+
</dl>
|
858 |
+
<h2>Tags</h2>
|
859 |
+
<table class="table table-condensed">
|
860 |
+
<tr><td colspan="2"><em>None found</em></td></tr>
|
861 |
+
</table>
|
862 |
+
</aside>
|
863 |
+
</div>
|
864 |
+
|
865 |
+
<div class="row-fluid">
|
866 |
+
<div class="span8 content class">
|
867 |
+
<a id="constant_MLA_SEARCH_MEDIA_FILTER_SHOW_CONTROLS" name="constant_MLA_SEARCH_MEDIA_FILTER_SHOW_CONTROLS" class="anchor"></a>
|
868 |
+
<article id="constant_MLA_SEARCH_MEDIA_FILTER_SHOW_CONTROLS" class="constant">
|
869 |
+
<h3 class="">MLA_SEARCH_MEDIA_FILTER_SHOW_CONTROLS</h3>
|
870 |
+
<pre class="signature">MLA_SEARCH_MEDIA_FILTER_SHOW_CONTROLS</pre>
|
871 |
+
<p><em>Provides a unique name for the display Search Media controls option</em></p>
|
872 |
+
|
873 |
+
</article>
|
874 |
+
</div>
|
875 |
+
<aside class="span4 detailsbar">
|
876 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
877 |
+
<dl>
|
878 |
+
</dl>
|
879 |
+
<h2>Tags</h2>
|
880 |
+
<table class="table table-condensed">
|
881 |
+
<tr><td colspan="2"><em>None found</em></td></tr>
|
882 |
+
</table>
|
883 |
+
</aside>
|
884 |
+
</div>
|
885 |
+
|
886 |
+
<div class="row-fluid">
|
887 |
+
<div class="span8 content class">
|
888 |
+
<a id="constant_MLA_SEARCH_MEDIA_FILTER_DEFAULTS" name="constant_MLA_SEARCH_MEDIA_FILTER_DEFAULTS" class="anchor"></a>
|
889 |
+
<article id="constant_MLA_SEARCH_MEDIA_FILTER_DEFAULTS" class="constant">
|
890 |
+
<h3 class="">MLA_SEARCH_MEDIA_FILTER_DEFAULTS</h3>
|
891 |
+
<pre class="signature">MLA_SEARCH_MEDIA_FILTER_DEFAULTS</pre>
|
892 |
+
<p><em>Provides a unique name for the display Search Media controls option</em></p>
|
893 |
+
|
894 |
+
</article>
|
895 |
+
</div>
|
896 |
+
<aside class="span4 detailsbar">
|
897 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
898 |
+
<dl>
|
899 |
+
</dl>
|
900 |
+
<h2>Tags</h2>
|
901 |
+
<table class="table table-condensed">
|
902 |
+
<tr><td colspan="2"><em>None found</em></td></tr>
|
903 |
+
</table>
|
904 |
+
</aside>
|
905 |
+
</div>
|
906 |
+
|
907 |
+
<div class="row-fluid">
|
908 |
+
<div class="span8 content class">
|
909 |
+
<a id="constant_MLA_EXIF_SIZE" name="constant_MLA_EXIF_SIZE" class="anchor"></a>
|
910 |
+
<article id="constant_MLA_EXIF_SIZE" class="constant">
|
911 |
+
<h3 class="">MLA_EXIF_SIZE</h3>
|
912 |
+
<pre class="signature">MLA_EXIF_SIZE</pre>
|
913 |
+
<p><em>Provides a "size" attribute value for the EXIF/Template Value field</em></p>
|
914 |
+
|
915 |
+
</article>
|
916 |
+
</div>
|
917 |
+
<aside class="span4 detailsbar">
|
918 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
919 |
+
<dl>
|
920 |
+
</dl>
|
921 |
+
<h2>Tags</h2>
|
922 |
+
<table class="table table-condensed">
|
923 |
+
<tr><td colspan="2"><em>None found</em></td></tr>
|
924 |
+
</table>
|
925 |
+
</aside>
|
926 |
+
</div>
|
927 |
+
|
928 |
+
<div class="row-fluid">
|
929 |
+
<div class="span8 content class">
|
930 |
+
<a id="constant_MLA_NEW_CUSTOM_RULE" name="constant_MLA_NEW_CUSTOM_RULE" class="anchor"></a>
|
931 |
+
<article id="constant_MLA_NEW_CUSTOM_RULE" class="constant">
|
932 |
+
<h3 class="">MLA_NEW_CUSTOM_RULE</h3>
|
933 |
+
<pre class="signature">MLA_NEW_CUSTOM_RULE</pre>
|
934 |
+
<p><em>Provides a unique name for the Custom Field "new rule" key</em></p>
|
935 |
+
|
936 |
+
</article>
|
937 |
+
</div>
|
938 |
+
<aside class="span4 detailsbar">
|
939 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
940 |
+
<dl>
|
941 |
+
</dl>
|
942 |
+
<h2>Tags</h2>
|
943 |
+
<table class="table table-condensed">
|
944 |
+
<tr><td colspan="2"><em>None found</em></td></tr>
|
945 |
+
</table>
|
946 |
+
</aside>
|
947 |
+
</div>
|
948 |
+
|
949 |
+
<div class="row-fluid">
|
950 |
+
<div class="span8 content class">
|
951 |
+
<a id="constant_MLA_NEW_CUSTOM_FIELD" name="constant_MLA_NEW_CUSTOM_FIELD" class="anchor"></a>
|
952 |
+
<article id="constant_MLA_NEW_CUSTOM_FIELD" class="constant">
|
953 |
+
<h3 class="">MLA_NEW_CUSTOM_FIELD</h3>
|
954 |
+
<pre class="signature">MLA_NEW_CUSTOM_FIELD</pre>
|
955 |
+
<p><em>Provides a unique name for the Custom Field "new field" key</em></p>
|
956 |
+
|
957 |
+
</article>
|
958 |
+
</div>
|
959 |
+
<aside class="span4 detailsbar">
|
960 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
961 |
+
<dl>
|
962 |
+
</dl>
|
963 |
+
<h2>Tags</h2>
|
964 |
+
<table class="table table-condensed">
|
965 |
+
<tr><td colspan="2"><em>None found</em></td></tr>
|
966 |
+
</table>
|
967 |
+
</aside>
|
968 |
+
</div>
|
969 |
+
|
970 |
+
<div class="row-fluid">
|
971 |
+
<div class="span8 content class">
|
972 |
+
<a id="constant_MLA_EDIT_MEDIA_SEARCH_TAXONOMY" name="constant_MLA_EDIT_MEDIA_SEARCH_TAXONOMY" class="anchor"></a>
|
973 |
+
<article id="constant_MLA_EDIT_MEDIA_SEARCH_TAXONOMY" class="constant">
|
974 |
+
<h3 class="">MLA_EDIT_MEDIA_SEARCH_TAXONOMY</h3>
|
975 |
+
<pre class="signature">MLA_EDIT_MEDIA_SEARCH_TAXONOMY</pre>
|
976 |
+
<p><em>Provides a unique name for the "searchable taxonomies" option</em></p>
|
977 |
+
|
978 |
+
</article>
|
979 |
+
</div>
|
980 |
+
<aside class="span4 detailsbar">
|
981 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
982 |
+
<dl>
|
983 |
+
</dl>
|
984 |
+
<h2>Tags</h2>
|
985 |
+
<table class="table table-condensed">
|
986 |
+
<tr><td colspan="2"><em>None found</em></td></tr>
|
987 |
+
</table>
|
988 |
+
</aside>
|
989 |
+
</div>
|
990 |
+
|
991 |
+
<div class="row-fluid">
|
992 |
+
<div class="span8 content class">
|
993 |
+
<a id="constant_MLA_EDIT_MEDIA_META_BOXES" name="constant_MLA_EDIT_MEDIA_META_BOXES" class="anchor"></a>
|
994 |
+
<article id="constant_MLA_EDIT_MEDIA_META_BOXES" class="constant">
|
995 |
+
<h3 class="">MLA_EDIT_MEDIA_META_BOXES</h3>
|
996 |
+
<pre class="signature">MLA_EDIT_MEDIA_META_BOXES</pre>
|
997 |
+
<p><em>Provides a unique name for the Edit Media additional meta boxes option</em></p>
|
998 |
+
|
999 |
+
</article>
|
1000 |
+
</div>
|
1001 |
+
<aside class="span4 detailsbar">
|
1002 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1003 |
+
<dl>
|
1004 |
+
</dl>
|
1005 |
+
<h2>Tags</h2>
|
1006 |
+
<table class="table table-condensed">
|
1007 |
+
<tr><td colspan="2"><em>None found</em></td></tr>
|
1008 |
+
</table>
|
1009 |
+
</aside>
|
1010 |
+
</div>
|
1011 |
+
|
1012 |
+
<div class="row-fluid">
|
1013 |
+
<div class="span8 content class">
|
1014 |
+
<a id="constant_MLA_ADD_NEW_BULK_EDIT" name="constant_MLA_ADD_NEW_BULK_EDIT" class="anchor"></a>
|
1015 |
+
<article id="constant_MLA_ADD_NEW_BULK_EDIT" class="constant">
|
1016 |
+
<h3 class="">MLA_ADD_NEW_BULK_EDIT</h3>
|
1017 |
+
<pre class="signature">MLA_ADD_NEW_BULK_EDIT</pre>
|
1018 |
+
<p><em>Provides a unique name for the Media/Add New bulk edit option</em></p>
|
1019 |
+
|
1020 |
+
</article>
|
1021 |
+
</div>
|
1022 |
+
<aside class="span4 detailsbar">
|
1023 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1024 |
+
<dl>
|
1025 |
+
</dl>
|
1026 |
+
<h2>Tags</h2>
|
1027 |
+
<table class="table table-condensed">
|
1028 |
+
<tr><td colspan="2"><em>None found</em></td></tr>
|
1029 |
+
</table>
|
1030 |
+
</aside>
|
1031 |
+
</div>
|
1032 |
+
|
1033 |
+
<div class="row-fluid">
|
1034 |
+
<div class="span8 content class">
|
1035 |
+
<a id="constant_MLA_ADD_NEW_BULK_EDIT_ON_TOP" name="constant_MLA_ADD_NEW_BULK_EDIT_ON_TOP" class="anchor"></a>
|
1036 |
+
<article id="constant_MLA_ADD_NEW_BULK_EDIT_ON_TOP" class="constant">
|
1037 |
+
<h3 class="">MLA_ADD_NEW_BULK_EDIT_ON_TOP</h3>
|
1038 |
+
<pre class="signature">MLA_ADD_NEW_BULK_EDIT_ON_TOP</pre>
|
1039 |
+
<p><em>Provides a unique name for the Media/Add New bulk edit "on top" option</em></p>
|
1040 |
+
|
1041 |
+
</article>
|
1042 |
+
</div>
|
1043 |
+
<aside class="span4 detailsbar">
|
1044 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1045 |
+
<dl>
|
1046 |
+
</dl>
|
1047 |
+
<h2>Tags</h2>
|
1048 |
+
<table class="table table-condensed">
|
1049 |
+
<tr><td colspan="2"><em>None found</em></td></tr>
|
1050 |
+
</table>
|
1051 |
+
</aside>
|
1052 |
+
</div>
|
1053 |
+
|
1054 |
+
<div class="row-fluid">
|
1055 |
+
<div class="span8 content class">
|
1056 |
+
<a id="constant_MLA_ADD_NEW_BULK_EDIT_AUTO_OPEN" name="constant_MLA_ADD_NEW_BULK_EDIT_AUTO_OPEN" class="anchor"></a>
|
1057 |
+
<article id="constant_MLA_ADD_NEW_BULK_EDIT_AUTO_OPEN" class="constant">
|
1058 |
+
<h3 class="">MLA_ADD_NEW_BULK_EDIT_AUTO_OPEN</h3>
|
1059 |
+
<pre class="signature">MLA_ADD_NEW_BULK_EDIT_AUTO_OPEN</pre>
|
1060 |
+
<p><em>Provides a unique name for the Media/Add New bulk edit "Open Automatically" option</em></p>
|
1061 |
+
|
1062 |
+
</article>
|
1063 |
+
</div>
|
1064 |
+
<aside class="span4 detailsbar">
|
1065 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1066 |
+
<dl>
|
1067 |
+
</dl>
|
1068 |
+
<h2>Tags</h2>
|
1069 |
+
<table class="table table-condensed">
|
1070 |
+
<tr><td colspan="2"><em>None found</em></td></tr>
|
1071 |
+
</table>
|
1072 |
+
</aside>
|
1073 |
+
</div>
|
1074 |
+
|
1075 |
+
<div class="row-fluid">
|
1076 |
+
<div class="span8 content class">
|
1077 |
+
<a id="constant_MLA_MEDIA_GRID_TOOLBAR" name="constant_MLA_MEDIA_GRID_TOOLBAR" class="anchor"></a>
|
1078 |
+
<article id="constant_MLA_MEDIA_GRID_TOOLBAR" class="constant">
|
1079 |
+
<h3 class="">MLA_MEDIA_GRID_TOOLBAR</h3>
|
1080 |
+
<pre class="signature">MLA_MEDIA_GRID_TOOLBAR</pre>
|
1081 |
+
<p><em>Provides a unique name for the Media Grid toolbar option, which
|
1082 |
+
also controls the ATTACHMENT DETAILS enhancements</em></p>
|
1083 |
+
|
1084 |
+
</article>
|
1085 |
+
</div>
|
1086 |
+
<aside class="span4 detailsbar">
|
1087 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1088 |
+
<dl>
|
1089 |
+
</dl>
|
1090 |
+
<h2>Tags</h2>
|
1091 |
+
<table class="table table-condensed">
|
1092 |
+
<tr><td colspan="2"><em>None found</em></td></tr>
|
1093 |
+
</table>
|
1094 |
+
</aside>
|
1095 |
+
</div>
|
1096 |
+
|
1097 |
+
<div class="row-fluid">
|
1098 |
+
<div class="span8 content class">
|
1099 |
+
<a id="constant_MLA_MEDIA_MODAL_TOOLBAR" name="constant_MLA_MEDIA_MODAL_TOOLBAR" class="anchor"></a>
|
1100 |
+
<article id="constant_MLA_MEDIA_MODAL_TOOLBAR" class="constant">
|
1101 |
+
<h3 class="">MLA_MEDIA_MODAL_TOOLBAR</h3>
|
1102 |
+
<pre class="signature">MLA_MEDIA_MODAL_TOOLBAR</pre>
|
1103 |
+
<p><em>Provides a unique name for the Media Manager toolbar option, which
|
1104 |
+
also controls the ATTACHMENT DETAILS enhancements</em></p>
|
1105 |
+
|
1106 |
+
</article>
|
1107 |
+
</div>
|
1108 |
+
<aside class="span4 detailsbar">
|
1109 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1110 |
+
<dl>
|
1111 |
+
</dl>
|
1112 |
+
<h2>Tags</h2>
|
1113 |
+
<table class="table table-condensed">
|
1114 |
+
<tr><td colspan="2"><em>None found</em></td></tr>
|
1115 |
+
</table>
|
1116 |
+
</aside>
|
1117 |
+
</div>
|
1118 |
+
|
1119 |
+
<div class="row-fluid">
|
1120 |
+
<div class="span8 content class">
|
1121 |
+
<a id="constant_MLA_MEDIA_MODAL_MIMETYPES" name="constant_MLA_MEDIA_MODAL_MIMETYPES" class="anchor"></a>
|
1122 |
+
<article id="constant_MLA_MEDIA_MODAL_MIMETYPES" class="constant">
|
1123 |
+
<h3 class="">MLA_MEDIA_MODAL_MIMETYPES</h3>
|
1124 |
+
<pre class="signature">MLA_MEDIA_MODAL_MIMETYPES</pre>
|
1125 |
+
<p><em>Provides a unique name for the Media Manager toolbar MIME Types option</em></p>
|
1126 |
+
|
1127 |
+
</article>
|
1128 |
+
</div>
|
1129 |
+
<aside class="span4 detailsbar">
|
1130 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1131 |
+
<dl>
|
1132 |
+
</dl>
|
1133 |
+
<h2>Tags</h2>
|
1134 |
+
<table class="table table-condensed">
|
1135 |
+
<tr><td colspan="2"><em>None found</em></td></tr>
|
1136 |
+
</table>
|
1137 |
+
</aside>
|
1138 |
+
</div>
|
1139 |
+
|
1140 |
+
<div class="row-fluid">
|
1141 |
+
<div class="span8 content class">
|
1142 |
+
<a id="constant_MLA_MEDIA_MODAL_MONTHS" name="constant_MLA_MEDIA_MODAL_MONTHS" class="anchor"></a>
|
1143 |
+
<article id="constant_MLA_MEDIA_MODAL_MONTHS" class="constant">
|
1144 |
+
<h3 class="">MLA_MEDIA_MODAL_MONTHS</h3>
|
1145 |
+
<pre class="signature">MLA_MEDIA_MODAL_MONTHS</pre>
|
1146 |
+
<p><em>Provides a unique name for the Media Manager toolbar Month and Year option</em></p>
|
1147 |
+
|
1148 |
+
</article>
|
1149 |
+
</div>
|
1150 |
+
<aside class="span4 detailsbar">
|
1151 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1152 |
+
<dl>
|
1153 |
+
</dl>
|
1154 |
+
<h2>Tags</h2>
|
1155 |
+
<table class="table table-condensed">
|
1156 |
+
<tr><td colspan="2"><em>None found</em></td></tr>
|
1157 |
+
</table>
|
1158 |
+
</aside>
|
1159 |
+
</div>
|
1160 |
+
|
1161 |
+
<div class="row-fluid">
|
1162 |
+
<div class="span8 content class">
|
1163 |
+
<a id="constant_MLA_MEDIA_MODAL_TERMS" name="constant_MLA_MEDIA_MODAL_TERMS" class="anchor"></a>
|
1164 |
+
<article id="constant_MLA_MEDIA_MODAL_TERMS" class="constant">
|
1165 |
+
<h3 class="">MLA_MEDIA_MODAL_TERMS</h3>
|
1166 |
+
<pre class="signature">MLA_MEDIA_MODAL_TERMS</pre>
|
1167 |
+
<p><em>Provides a unique name for the Media Manager toolbar Taxonomy Terms option</em></p>
|
1168 |
+
|
1169 |
+
</article>
|
1170 |
+
</div>
|
1171 |
+
<aside class="span4 detailsbar">
|
1172 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1173 |
+
<dl>
|
1174 |
+
</dl>
|
1175 |
+
<h2>Tags</h2>
|
1176 |
+
<table class="table table-condensed">
|
1177 |
+
<tr><td colspan="2"><em>None found</em></td></tr>
|
1178 |
+
</table>
|
1179 |
+
</aside>
|
1180 |
+
</div>
|
1181 |
+
|
1182 |
+
<div class="row-fluid">
|
1183 |
+
<div class="span8 content class">
|
1184 |
+
<a id="constant_MLA_MEDIA_MODAL_TERMS_SEARCH" name="constant_MLA_MEDIA_MODAL_TERMS_SEARCH" class="anchor"></a>
|
1185 |
+
<article id="constant_MLA_MEDIA_MODAL_TERMS_SEARCH" class="constant">
|
1186 |
+
<h3 class="">MLA_MEDIA_MODAL_TERMS_SEARCH</h3>
|
1187 |
+
<pre class="signature">MLA_MEDIA_MODAL_TERMS_SEARCH</pre>
|
1188 |
+
<p><em>Provides a unique name for the Media Manager toolbar Taxonomy "Terms Search" option</em></p>
|
1189 |
+
|
1190 |
+
</article>
|
1191 |
+
</div>
|
1192 |
+
<aside class="span4 detailsbar">
|
1193 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1194 |
+
<dl>
|
1195 |
+
</dl>
|
1196 |
+
<h2>Tags</h2>
|
1197 |
+
<table class="table table-condensed">
|
1198 |
+
<tr><td colspan="2"><em>None found</em></td></tr>
|
1199 |
+
</table>
|
1200 |
+
</aside>
|
1201 |
+
</div>
|
1202 |
+
|
1203 |
+
<div class="row-fluid">
|
1204 |
+
<div class="span8 content class">
|
1205 |
+
<a id="constant_MLA_MEDIA_MODAL_SEARCHBOX" name="constant_MLA_MEDIA_MODAL_SEARCHBOX" class="anchor"></a>
|
1206 |
+
<article id="constant_MLA_MEDIA_MODAL_SEARCHBOX" class="constant">
|
1207 |
+
<h3 class="">MLA_MEDIA_MODAL_SEARCHBOX</h3>
|
1208 |
+
<pre class="signature">MLA_MEDIA_MODAL_SEARCHBOX</pre>
|
1209 |
+
<p><em>Provides a unique name for the Media Manager toolbar Search Box option</em></p>
|
1210 |
+
|
1211 |
+
</article>
|
1212 |
+
</div>
|
1213 |
+
<aside class="span4 detailsbar">
|
1214 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1215 |
+
<dl>
|
1216 |
+
</dl>
|
1217 |
+
<h2>Tags</h2>
|
1218 |
+
<table class="table table-condensed">
|
1219 |
+
<tr><td colspan="2"><em>None found</em></td></tr>
|
1220 |
+
</table>
|
1221 |
+
</aside>
|
1222 |
+
</div>
|
1223 |
+
|
1224 |
+
<div class="row-fluid">
|
1225 |
+
<div class="span8 content class">
|
1226 |
+
<a id="constant_MLA_MEDIA_MODAL_SEARCHBOX_CONTROLS" name="constant_MLA_MEDIA_MODAL_SEARCHBOX_CONTROLS" class="anchor"></a>
|
1227 |
+
<article id="constant_MLA_MEDIA_MODAL_SEARCHBOX_CONTROLS" class="constant">
|
1228 |
+
<h3 class="">MLA_MEDIA_MODAL_SEARCHBOX_CONTROLS</h3>
|
1229 |
+
<pre class="signature">MLA_MEDIA_MODAL_SEARCHBOX_CONTROLS</pre>
|
1230 |
+
<p><em>Provides a unique name for the Media Manager toolbar Search Box Controls option</em></p>
|
1231 |
+
|
1232 |
+
</article>
|
1233 |
+
</div>
|
1234 |
+
<aside class="span4 detailsbar">
|
1235 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1236 |
+
<dl>
|
1237 |
+
</dl>
|
1238 |
+
<h2>Tags</h2>
|
1239 |
+
<table class="table table-condensed">
|
1240 |
+
<tr><td colspan="2"><em>None found</em></td></tr>
|
1241 |
+
</table>
|
1242 |
+
</aside>
|
1243 |
+
</div>
|
1244 |
+
|
1245 |
+
<div class="row-fluid">
|
1246 |
+
<div class="span8 content class">
|
1247 |
+
<a id="constant_MLA_MEDIA_MODAL_DETAILS_CATEGORY_METABOX" name="constant_MLA_MEDIA_MODAL_DETAILS_CATEGORY_METABOX" class="anchor"></a>
|
1248 |
+
<article id="constant_MLA_MEDIA_MODAL_DETAILS_CATEGORY_METABOX" class="constant">
|
1249 |
+
<h3 class="">MLA_MEDIA_MODAL_DETAILS_CATEGORY_METABOX</h3>
|
1250 |
+
<pre class="signature">MLA_MEDIA_MODAL_DETAILS_CATEGORY_METABOX</pre>
|
1251 |
+
<p><em>Provides a unique name for the Media Manager Attachment Details searchable taxonomy option
|
1252 |
+
This option is for hierarchical taxonomies, e.g., "Att. Categories".</em></p>
|
1253 |
+
|
1254 |
+
</article>
|
1255 |
+
</div>
|
1256 |
+
<aside class="span4 detailsbar">
|
1257 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1258 |
+
<dl>
|
1259 |
+
</dl>
|
1260 |
+
<h2>Tags</h2>
|
1261 |
+
<table class="table table-condensed">
|
1262 |
+
<tr><td colspan="2"><em>None found</em></td></tr>
|
1263 |
+
</table>
|
1264 |
+
</aside>
|
1265 |
+
</div>
|
1266 |
+
|
1267 |
+
<div class="row-fluid">
|
1268 |
+
<div class="span8 content class">
|
1269 |
+
<a id="constant_MLA_MEDIA_MODAL_DETAILS_TAG_METABOX" name="constant_MLA_MEDIA_MODAL_DETAILS_TAG_METABOX" class="anchor"></a>
|
1270 |
+
<article id="constant_MLA_MEDIA_MODAL_DETAILS_TAG_METABOX" class="constant">
|
1271 |
+
<h3 class="">MLA_MEDIA_MODAL_DETAILS_TAG_METABOX</h3>
|
1272 |
+
<pre class="signature">MLA_MEDIA_MODAL_DETAILS_TAG_METABOX</pre>
|
1273 |
+
<p><em>Provides a unique name for the Media Manager Attachment Details searchable taxonomy option
|
1274 |
+
This option is for flat taxonomies, e.g., "Att. Tags".</em></p>
|
1275 |
+
|
1276 |
+
</article>
|
1277 |
+
</div>
|
1278 |
+
<aside class="span4 detailsbar">
|
1279 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1280 |
+
<dl>
|
1281 |
+
</dl>
|
1282 |
+
<h2>Tags</h2>
|
1283 |
+
<table class="table table-condensed">
|
1284 |
+
<tr><td colspan="2"><em>None found</em></td></tr>
|
1285 |
+
</table>
|
1286 |
+
</aside>
|
1287 |
+
</div>
|
1288 |
+
|
1289 |
+
<div class="row-fluid">
|
1290 |
+
<div class="span8 content class">
|
1291 |
+
<a id="constant_MLA_MEDIA_MODAL_DETAILS_AUTOFILL" name="constant_MLA_MEDIA_MODAL_DETAILS_AUTOFILL" class="anchor"></a>
|
1292 |
+
<article id="constant_MLA_MEDIA_MODAL_DETAILS_AUTOFILL" class="constant">
|
1293 |
+
<h3 class="">MLA_MEDIA_MODAL_DETAILS_AUTOFILL</h3>
|
1294 |
+
<pre class="signature">MLA_MEDIA_MODAL_DETAILS_AUTOFILL</pre>
|
1295 |
+
<p><em>Provides a unique name for the Media Manager Attachment Details auto-fill option</em></p>
|
1296 |
+
|
1297 |
+
</article>
|
1298 |
+
</div>
|
1299 |
+
<aside class="span4 detailsbar">
|
1300 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1301 |
+
<dl>
|
1302 |
+
</dl>
|
1303 |
+
<h2>Tags</h2>
|
1304 |
+
<table class="table table-condensed">
|
1305 |
+
<tr><td colspan="2"><em>None found</em></td></tr>
|
1306 |
+
</table>
|
1307 |
+
</aside>
|
1308 |
+
</div>
|
1309 |
+
|
1310 |
+
<div class="row-fluid">
|
1311 |
+
<div class="span8 content class">
|
1312 |
+
<a id="constant_MLA_MEDIA_MODAL_ORDERBY" name="constant_MLA_MEDIA_MODAL_ORDERBY" class="anchor"></a>
|
1313 |
+
<article id="constant_MLA_MEDIA_MODAL_ORDERBY" class="constant">
|
1314 |
+
<h3 class="">MLA_MEDIA_MODAL_ORDERBY</h3>
|
1315 |
+
<pre class="signature">MLA_MEDIA_MODAL_ORDERBY</pre>
|
1316 |
+
<p><em>Provides a unique name for the Media Manager orderby option</em></p>
|
1317 |
+
|
1318 |
+
</article>
|
1319 |
+
</div>
|
1320 |
+
<aside class="span4 detailsbar">
|
1321 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1322 |
+
<dl>
|
1323 |
+
</dl>
|
1324 |
+
<h2>Tags</h2>
|
1325 |
+
<table class="table table-condensed">
|
1326 |
+
<tr><td colspan="2"><em>None found</em></td></tr>
|
1327 |
+
</table>
|
1328 |
+
</aside>
|
1329 |
+
</div>
|
1330 |
+
|
1331 |
+
<div class="row-fluid">
|
1332 |
+
<div class="span8 content class">
|
1333 |
+
<a id="constant_MLA_MEDIA_MODAL_ORDER" name="constant_MLA_MEDIA_MODAL_ORDER" class="anchor"></a>
|
1334 |
+
<article id="constant_MLA_MEDIA_MODAL_ORDER" class="constant">
|
1335 |
+
<h3 class="">MLA_MEDIA_MODAL_ORDER</h3>
|
1336 |
+
<pre class="signature">MLA_MEDIA_MODAL_ORDER</pre>
|
1337 |
+
<p><em>Provides a unique name for the Media Manager order option</em></p>
|
1338 |
+
|
1339 |
+
</article>
|
1340 |
+
</div>
|
1341 |
+
<aside class="span4 detailsbar">
|
1342 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1343 |
+
<dl>
|
1344 |
+
</dl>
|
1345 |
+
<h2>Tags</h2>
|
1346 |
+
<table class="table table-condensed">
|
1347 |
+
<tr><td colspan="2"><em>None found</em></td></tr>
|
1348 |
+
</table>
|
1349 |
+
</aside>
|
1350 |
+
</div>
|
1351 |
+
|
1352 |
+
<div class="row-fluid">
|
1353 |
+
<div class="span8 content class">
|
1354 |
+
<a id="constant_MLA_DELETE_OPTION_SETTINGS" name="constant_MLA_DELETE_OPTION_SETTINGS" class="anchor"></a>
|
1355 |
+
<article id="constant_MLA_DELETE_OPTION_SETTINGS" class="constant">
|
1356 |
+
<h3 class="">MLA_DELETE_OPTION_SETTINGS</h3>
|
1357 |
+
<pre class="signature">MLA_DELETE_OPTION_SETTINGS</pre>
|
1358 |
+
<p><em>Provides a unique name for the Media Manager Force Image Default Setings option</em></p>
|
1359 |
+
|
1360 |
+
</article>
|
1361 |
+
</div>
|
1362 |
+
<aside class="span4 detailsbar">
|
1363 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1364 |
+
<dl>
|
1365 |
+
</dl>
|
1366 |
+
<h2>Tags</h2>
|
1367 |
+
<table class="table table-condensed">
|
1368 |
+
<tr><td colspan="2"><em>None found</em></td></tr>
|
1369 |
+
</table>
|
1370 |
+
</aside>
|
1371 |
+
</div>
|
1372 |
+
|
1373 |
+
<div class="row-fluid">
|
1374 |
+
<div class="span8 content class">
|
1375 |
+
<a id="constant_MLA_DELETE_OPTION_BACKUPS" name="constant_MLA_DELETE_OPTION_BACKUPS" class="anchor"></a>
|
1376 |
+
<article id="constant_MLA_DELETE_OPTION_BACKUPS" class="constant">
|
1377 |
+
<h3 class="">MLA_DELETE_OPTION_BACKUPS</h3>
|
1378 |
+
<pre class="signature">MLA_DELETE_OPTION_BACKUPS</pre>
|
1379 |
+
<p><em>Provides a unique name for the Media Manager Force Image Default Setings option</em></p>
|
1380 |
+
|
1381 |
+
</article>
|
1382 |
+
</div>
|
1383 |
+
<aside class="span4 detailsbar">
|
1384 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1385 |
+
<dl>
|
1386 |
+
</dl>
|
1387 |
+
<h2>Tags</h2>
|
1388 |
+
<table class="table table-condensed">
|
1389 |
+
<tr><td colspan="2"><em>None found</em></td></tr>
|
1390 |
+
</table>
|
1391 |
+
</aside>
|
1392 |
+
</div>
|
1393 |
+
|
1394 |
+
<div class="row-fluid">
|
1395 |
+
<div class="span8 content class">
|
1396 |
+
<a id="constant_MLA_MEDIA_MODAL_APPLY_DISPLAY_SETTINGS" name="constant_MLA_MEDIA_MODAL_APPLY_DISPLAY_SETTINGS" class="anchor"></a>
|
1397 |
+
<article id="constant_MLA_MEDIA_MODAL_APPLY_DISPLAY_SETTINGS" class="constant">
|
1398 |
+
<h3 class="">MLA_MEDIA_MODAL_APPLY_DISPLAY_SETTINGS</h3>
|
1399 |
+
<pre class="signature">MLA_MEDIA_MODAL_APPLY_DISPLAY_SETTINGS</pre>
|
1400 |
+
<p><em>Provides a unique name for the Media Manager Force Image Default Setings option</em></p>
|
1401 |
+
|
1402 |
+
</article>
|
1403 |
+
</div>
|
1404 |
+
<aside class="span4 detailsbar">
|
1405 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1406 |
+
<dl>
|
1407 |
+
</dl>
|
1408 |
+
<h2>Tags</h2>
|
1409 |
+
<table class="table table-condensed">
|
1410 |
+
<tr><td colspan="2"><em>None found</em></td></tr>
|
1411 |
+
</table>
|
1412 |
+
</aside>
|
1413 |
+
</div>
|
1414 |
+
|
1415 |
+
<div class="row-fluid">
|
1416 |
+
<div class="span8 content class">
|
1417 |
+
<a id="constant_MLA_POST_MIME_TYPES" name="constant_MLA_POST_MIME_TYPES" class="anchor"></a>
|
1418 |
+
<article id="constant_MLA_POST_MIME_TYPES" class="constant">
|
1419 |
+
<h3 class="">MLA_POST_MIME_TYPES</h3>
|
1420 |
+
<pre class="signature">MLA_POST_MIME_TYPES</pre>
|
1421 |
+
<p><em>Provides a unique name for the Post MIME Types option</em></p>
|
1422 |
+
|
1423 |
+
</article>
|
1424 |
+
</div>
|
1425 |
+
<aside class="span4 detailsbar">
|
1426 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1427 |
+
<dl>
|
1428 |
+
</dl>
|
1429 |
+
<h2>Tags</h2>
|
1430 |
+
<table class="table table-condensed">
|
1431 |
+
<tr><td colspan="2"><em>None found</em></td></tr>
|
1432 |
+
</table>
|
1433 |
+
</aside>
|
1434 |
+
</div>
|
1435 |
+
|
1436 |
+
<div class="row-fluid">
|
1437 |
+
<div class="span8 content class">
|
1438 |
+
<a id="constant_MLA_ENABLE_POST_MIME_TYPES" name="constant_MLA_ENABLE_POST_MIME_TYPES" class="anchor"></a>
|
1439 |
+
<article id="constant_MLA_ENABLE_POST_MIME_TYPES" class="constant">
|
1440 |
+
<h3 class="">MLA_ENABLE_POST_MIME_TYPES</h3>
|
1441 |
+
<pre class="signature">MLA_ENABLE_POST_MIME_TYPES</pre>
|
1442 |
+
<p><em>Provides a unique name for the Enable Post MIME Types option</em></p>
|
1443 |
+
|
1444 |
+
</article>
|
1445 |
+
</div>
|
1446 |
+
<aside class="span4 detailsbar">
|
1447 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1448 |
+
<dl>
|
1449 |
+
</dl>
|
1450 |
+
<h2>Tags</h2>
|
1451 |
+
<table class="table table-condensed">
|
1452 |
+
<tr><td colspan="2"><em>None found</em></td></tr>
|
1453 |
+
</table>
|
1454 |
+
</aside>
|
1455 |
+
</div>
|
1456 |
+
|
1457 |
+
<div class="row-fluid">
|
1458 |
+
<div class="span8 content class">
|
1459 |
+
<a id="constant_MLA_UPLOAD_MIMES" name="constant_MLA_UPLOAD_MIMES" class="anchor"></a>
|
1460 |
+
<article id="constant_MLA_UPLOAD_MIMES" class="constant">
|
1461 |
+
<h3 class="">MLA_UPLOAD_MIMES</h3>
|
1462 |
+
<pre class="signature">MLA_UPLOAD_MIMES</pre>
|
1463 |
+
<p><em>Provides a unique name for the Upload MIME Types option</em></p>
|
1464 |
+
|
1465 |
+
</article>
|
1466 |
+
</div>
|
1467 |
+
<aside class="span4 detailsbar">
|
1468 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1469 |
+
<dl>
|
1470 |
+
</dl>
|
1471 |
+
<h2>Tags</h2>
|
1472 |
+
<table class="table table-condensed">
|
1473 |
+
<tr><td colspan="2"><em>None found</em></td></tr>
|
1474 |
+
</table>
|
1475 |
+
</aside>
|
1476 |
+
</div>
|
1477 |
+
|
1478 |
+
<div class="row-fluid">
|
1479 |
+
<div class="span8 content class">
|
1480 |
+
<a id="constant_MLA_ENABLE_UPLOAD_MIMES" name="constant_MLA_ENABLE_UPLOAD_MIMES" class="anchor"></a>
|
1481 |
+
<article id="constant_MLA_ENABLE_UPLOAD_MIMES" class="constant">
|
1482 |
+
<h3 class="">MLA_ENABLE_UPLOAD_MIMES</h3>
|
1483 |
+
<pre class="signature">MLA_ENABLE_UPLOAD_MIMES</pre>
|
1484 |
+
<p><em>Provides a unique name for the Enable Upload MIME Types option</em></p>
|
1485 |
+
|
1486 |
+
</article>
|
1487 |
+
</div>
|
1488 |
+
<aside class="span4 detailsbar">
|
1489 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1490 |
+
<dl>
|
1491 |
+
</dl>
|
1492 |
+
<h2>Tags</h2>
|
1493 |
+
<table class="table table-condensed">
|
1494 |
+
<tr><td colspan="2"><em>None found</em></td></tr>
|
1495 |
+
</table>
|
1496 |
+
</aside>
|
1497 |
+
</div>
|
1498 |
+
|
1499 |
+
<div class="row-fluid">
|
1500 |
+
<div class="span8 content class">
|
1501 |
+
<a id="constant_MLA_ENABLE_MLA_ICONS" name="constant_MLA_ENABLE_MLA_ICONS" class="anchor"></a>
|
1502 |
+
<article id="constant_MLA_ENABLE_MLA_ICONS" class="constant">
|
1503 |
+
<h3 class="">MLA_ENABLE_MLA_ICONS</h3>
|
1504 |
+
<pre class="signature">MLA_ENABLE_MLA_ICONS</pre>
|
1505 |
+
<p><em>Provides a unique name for the Enable MLA Icons option</em></p>
|
1506 |
+
|
1507 |
+
</article>
|
1508 |
+
</div>
|
1509 |
+
<aside class="span4 detailsbar">
|
1510 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1511 |
+
<dl>
|
1512 |
+
</dl>
|
1513 |
+
<h2>Tags</h2>
|
1514 |
+
<table class="table table-condensed">
|
1515 |
+
<tr><td colspan="2"><em>None found</em></td></tr>
|
1516 |
+
</table>
|
1517 |
+
</aside>
|
1518 |
+
</div>
|
1519 |
+
|
1520 |
+
<div class="row-fluid">
|
1521 |
+
<div class="span8 content class">
|
1522 |
+
<a id="constant_MLA_DEBUG_DISPLAY_LIMIT" name="constant_MLA_DEBUG_DISPLAY_LIMIT" class="anchor"></a>
|
1523 |
+
<article id="constant_MLA_DEBUG_DISPLAY_LIMIT" class="constant">
|
1524 |
+
<h3 class="">MLA_DEBUG_DISPLAY_LIMIT</h3>
|
1525 |
+
<pre class="signature">MLA_DEBUG_DISPLAY_LIMIT</pre>
|
1526 |
+
<p><em>Provides a unique name for the Debug display limit option</em></p>
|
1527 |
+
|
1528 |
+
</article>
|
1529 |
+
</div>
|
1530 |
+
<aside class="span4 detailsbar">
|
1531 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1532 |
+
<dl>
|
1533 |
+
</dl>
|
1534 |
+
<h2>Tags</h2>
|
1535 |
+
<table class="table table-condensed">
|
1536 |
+
<tr><td colspan="2"><em>None found</em></td></tr>
|
1537 |
+
</table>
|
1538 |
+
</aside>
|
1539 |
+
</div>
|
1540 |
+
|
1541 |
+
<div class="row-fluid">
|
1542 |
+
<div class="span8 content class">
|
1543 |
+
<a id="constant_MLA_DEBUG_FILE" name="constant_MLA_DEBUG_FILE" class="anchor"></a>
|
1544 |
+
<article id="constant_MLA_DEBUG_FILE" class="constant">
|
1545 |
+
<h3 class="">MLA_DEBUG_FILE</h3>
|
1546 |
+
<pre class="signature">MLA_DEBUG_FILE</pre>
|
1547 |
+
<p><em>Provides a unique name for the Debug alternate log file option</em></p>
|
1548 |
+
|
1549 |
+
</article>
|
1550 |
+
</div>
|
1551 |
+
<aside class="span4 detailsbar">
|
1552 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1553 |
+
<dl>
|
1554 |
+
</dl>
|
1555 |
+
<h2>Tags</h2>
|
1556 |
+
<table class="table table-condensed">
|
1557 |
+
<tr><td colspan="2"><em>None found</em></td></tr>
|
1558 |
+
</table>
|
1559 |
+
</aside>
|
1560 |
+
</div>
|
1561 |
+
|
1562 |
+
<div class="row-fluid">
|
1563 |
+
<div class="span8 content class">
|
1564 |
+
<a id="constant_MLA_DEBUG_REPLACE_PHP_LOG" name="constant_MLA_DEBUG_REPLACE_PHP_LOG" class="anchor"></a>
|
1565 |
+
<article id="constant_MLA_DEBUG_REPLACE_PHP_LOG" class="constant">
|
1566 |
+
<h3 class="">MLA_DEBUG_REPLACE_PHP_LOG</h3>
|
1567 |
+
<pre class="signature">MLA_DEBUG_REPLACE_PHP_LOG</pre>
|
1568 |
+
<p><em>Provides a unique name for the Debug replace PHP log file option</em></p>
|
1569 |
+
|
1570 |
+
</article>
|
1571 |
+
</div>
|
1572 |
+
<aside class="span4 detailsbar">
|
1573 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1574 |
+
<dl>
|
1575 |
+
</dl>
|
1576 |
+
<h2>Tags</h2>
|
1577 |
+
<table class="table table-condensed">
|
1578 |
+
<tr><td colspan="2"><em>None found</em></td></tr>
|
1579 |
+
</table>
|
1580 |
+
</aside>
|
1581 |
+
</div>
|
1582 |
+
|
1583 |
+
<div class="row-fluid">
|
1584 |
+
<div class="span8 content class">
|
1585 |
+
<a id="constant_MLA_DEBUG_REPLACE_PHP_REPORTING" name="constant_MLA_DEBUG_REPLACE_PHP_REPORTING" class="anchor"></a>
|
1586 |
+
<article id="constant_MLA_DEBUG_REPLACE_PHP_REPORTING" class="constant">
|
1587 |
+
<h3 class="">MLA_DEBUG_REPLACE_PHP_REPORTING</h3>
|
1588 |
+
<pre class="signature">MLA_DEBUG_REPLACE_PHP_REPORTING</pre>
|
1589 |
+
<p><em>Provides a unique name for the Debug replace PHP error_reporting option</em></p>
|
1590 |
+
|
1591 |
+
</article>
|
1592 |
+
</div>
|
1593 |
+
<aside class="span4 detailsbar">
|
1594 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1595 |
+
<dl>
|
1596 |
+
</dl>
|
1597 |
+
<h2>Tags</h2>
|
1598 |
+
<table class="table table-condensed">
|
1599 |
+
<tr><td colspan="2"><em>None found</em></td></tr>
|
1600 |
+
</table>
|
1601 |
+
</aside>
|
1602 |
+
</div>
|
1603 |
+
|
1604 |
+
<div class="row-fluid">
|
1605 |
+
<div class="span8 content class">
|
1606 |
+
<a id="constant_MLA_DEBUG_REPLACE_LEVEL" name="constant_MLA_DEBUG_REPLACE_LEVEL" class="anchor"></a>
|
1607 |
+
<article id="constant_MLA_DEBUG_REPLACE_LEVEL" class="constant">
|
1608 |
+
<h3 class="">MLA_DEBUG_REPLACE_LEVEL</h3>
|
1609 |
+
<pre class="signature">MLA_DEBUG_REPLACE_LEVEL</pre>
|
1610 |
+
<p><em>Provides a unique name for the Debug replace MLA_DEBUG_LEVEL option</em></p>
|
1611 |
+
|
1612 |
+
</article>
|
1613 |
+
</div>
|
1614 |
+
<aside class="span4 detailsbar">
|
1615 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1616 |
+
<dl>
|
1617 |
+
</dl>
|
1618 |
+
<h2>Tags</h2>
|
1619 |
+
<table class="table table-condensed">
|
1620 |
+
<tr><td colspan="2"><em>None found</em></td></tr>
|
1621 |
+
</table>
|
1622 |
+
</aside>
|
1623 |
+
</div>
|
1624 |
+
|
1625 |
+
|
1626 |
+
<a id="properties" name="properties"></a>
|
1627 |
+
<div class="row-fluid">
|
1628 |
+
<div class="span8 content class">
|
1629 |
+
<h2>Properties</h2>
|
1630 |
+
</div>
|
1631 |
+
<aside class="span4 detailsbar"></aside>
|
1632 |
+
</div>
|
1633 |
+
|
1634 |
+
<div class="row-fluid">
|
1635 |
+
<div class="span8 content class">
|
1636 |
+
<a id="property_mla_option_definitions" name="property_mla_option_definitions" class="anchor"></a>
|
1637 |
+
<article class="property">
|
1638 |
+
<h3 class="public ">$mla_option_definitions</h3>
|
1639 |
+
<pre class="signature">$mla_option_definitions : </pre>
|
1640 |
+
<p><em>$mla_option_definitions defines the database options and admin page areas for setting/updating them</em></p>
|
1641 |
+
<p>The array must be populated at runtime in MLACoreOptions::mla_localize_option_definitions_array();
|
1642 |
+
localization calls cannot be placed in the "public static" array definition itself.</p>
|
1643 |
<p>Each option is defined by an array with the following elements:</p>
|
1644 |
+
<p>array key => HTML id/name attribute and option database key (OMIT MLA_OPTION_PREFIX)</p>
|
1645 |
+
<p>tab => Settings page tab id for the option
|
1646 |
+
name => admin page label or heading text
|
1647 |
+
type => 'checkbox', 'header', 'radio', 'select', 'text', 'textarea', 'custom', 'hidden'
|
1648 |
+
std => default value
|
1649 |
+
help => help text
|
1650 |
+
size => text size, default 40
|
1651 |
+
cols => textbox columns, default 90
|
1652 |
+
rows => textbox rows, default 5
|
1653 |
+
options => array of radio or select option values
|
1654 |
+
texts => array of radio or select option display texts
|
1655 |
+
render => rendering function for 'custom' options. Usage:
|
1656 |
+
$options_list .= ['render']( 'render', $key, $value );
|
1657 |
+
update => update function for 'custom' options; returns nothing. Usage:
|
1658 |
+
$message = ['update']( 'update', $key, $value, $_REQUEST );
|
1659 |
+
delete => delete function for 'custom' options; returns nothing. Usage:
|
1660 |
+
$message = ['delete']( 'delete', $key, $value, $_REQUEST );
|
1661 |
+
reset => reset function for 'custom' options; returns nothing. Usage:
|
1662 |
+
$message = ['reset']( 'reset', $key, $value, $_REQUEST );</p>
|
1663 |
|
1664 |
+
<h4>Type</h4>
|
1665 |
+
|
1666 |
+
</article>
|
1667 |
+
</div>
|
1668 |
+
<aside class="span4 detailsbar">
|
1669 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1670 |
+
<dl>
|
1671 |
+
</dl>
|
1672 |
+
<h2>Tags</h2>
|
1673 |
+
<table class="table table-condensed">
|
1674 |
+
<tr><td colspan="2"><em>None found</em></td></tr>
|
1675 |
+
</table>
|
1676 |
+
</aside>
|
1677 |
+
</div>
|
1678 |
+
|
1679 |
+
|
1680 |
+
<a id="methods" name="methods"></a>
|
1681 |
+
<div class="row-fluid">
|
1682 |
+
<div class="span8 content class"><h2>Methods</h2></div>
|
1683 |
+
<aside class="span4 detailsbar"></aside>
|
1684 |
+
</div>
|
1685 |
+
|
1686 |
+
<div class="row-fluid">
|
1687 |
+
<div class="span8 content class">
|
1688 |
+
<a id="method_mla_localize_option_definitions_array" name="method_mla_localize_option_definitions_array" class="anchor"></a>
|
1689 |
+
<article class="method">
|
1690 |
+
<h3 class="public ">mla_localize_option_definitions_array()</h3>
|
1691 |
+
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
|
1692 |
+
<pre class="signature" style="margin-right: 54px;">mla_localize_option_definitions_array() : void</pre>
|
1693 |
+
<p><em>Localize $mla_option_definitions array</em></p>
|
1694 |
+
<p>Localization must be done at runtime; these calls cannot be placed in the
|
1695 |
+
"public static" array definition itself. Called from MLATest::initialize.</p>
|
1696 |
+
|
1697 |
+
|
1698 |
+
|
1699 |
+
|
1700 |
+
</article>
|
1701 |
+
</div>
|
1702 |
+
<aside class="span4 detailsbar">
|
1703 |
+
<h1><i class="icon-arrow-down"></i></h1>
|
1704 |
+
<span class="label label-info">static</span>
|
1705 |
+
<dl>
|
1706 |
+
</dl>
|
1707 |
+
<h2>Tags</h2>
|
1708 |
+
<table class="table table-condensed">
|
1709 |
+
<tr>
|
1710 |
+
<th>
|
1711 |
+
since
|
1712 |
+
</th>
|
1713 |
+
<td>
|
1714 |
+
2.20
|
1715 |
+
</td>
|
1716 |
+
</tr>
|
1717 |
+
</table>
|
1718 |
+
</aside>
|
1719 |
+
</div>
|
1720 |
+
|
1721 |
+
</div>
|
1722 |
+
</section>
|
1723 |
+
|
1724 |
+
<div id="source-view" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="source-view-label" aria-hidden="true">
|
1725 |
+
<div class="modal-header">
|
1726 |
+
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
1727 |
+
<h3 id="source-view-label">class-mla-core-options.php</h3>
|
1728 |
+
</div>
|
1729 |
+
<div class="modal-body">
|
1730 |
+
<pre data-src="../files/includes\class-mla-core-options.php.txt" class="language-php line-numbers"></pre>
|
1731 |
+
</div>
|
1732 |
+
</div>
|
1733 |
+
|
1734 |
+
<footer class="row-fluid">
|
1735 |
+
<section class="span10 offset2">
|
1736 |
+
<section class="row-fluid">
|
1737 |
+
<section class="span10 offset1">
|
1738 |
+
<section class="row-fluid footer-sections">
|
1739 |
+
<section class="span4">
|
1740 |
+
<h1><i class="icon-code"></i></h1>
|
1741 |
+
<div>
|
1742 |
+
<ul>
|
1743 |
+
</ul>
|
1744 |
+
</div>
|
1745 |
+
</section>
|
1746 |
+
<section class="span4">
|
1747 |
+
<h1><i class="icon-bar-chart"></i></h1>
|
1748 |
+
<div>
|
1749 |
+
<ul>
|
1750 |
+
<li><a href="../graphs/class.html">Class Hierarchy Diagram</a></li>
|
1751 |
+
</ul>
|
1752 |
+
</div>
|
1753 |
+
</section>
|
1754 |
+
<section class="span4">
|
1755 |
+
<h1><i class="icon-pushpin"></i></h1>
|
1756 |
+
<div>
|
1757 |
+
<ul>
|
1758 |
+
<li><a href="../reports/errors.html">Errors</a></li>
|
1759 |
+
<li><a href="../reports/markers.html">Markers</a></li>
|
1760 |
+
</ul>
|
1761 |
+
</div>
|
1762 |
+
</section>
|
1763 |
+
</section>
|
1764 |
+
</section>
|
1765 |
+
</section>
|
1766 |
+
<section class="row-fluid">
|
1767 |
+
<section class="span10 offset1">
|
1768 |
+
<hr />
|
1769 |
+
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
|
1770 |
+
on August 12th, 2016 at 21:22.
|
1771 |
+
</section>
|
1772 |
+
</section>
|
1773 |
+
</section>
|
1774 |
+
</footer>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1775 |
</div>
|
1776 |
+
|
1777 |
</body>
|
1778 |
</html>
|
phpDocs/classes/MLAData.html
CHANGED
@@ -1,1326 +1,2905 @@
|
|
1 |
-
<!DOCTYPE html
|
|
|
2 |
<head>
|
3 |
-
<meta
|
4 |
-
<meta
|
5 |
-
<
|
6 |
-
<
|
7 |
-
<meta name="
|
8 |
-
|
9 |
-
<link href="../css/
|
10 |
-
<
|
11 |
-
<link rel="
|
12 |
-
<link
|
13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
</head>
|
15 |
<body>
|
|
|
16 |
<div class="navbar navbar-fixed-top">
|
17 |
-
<div class="navbar-inner"
|
18 |
-
<
|
19 |
-
<
|
20 |
-
<
|
21 |
-
|
22 |
-
<
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
<li class="dropdown" id="charts-menu">
|
27 |
-
<a href="#
|
28 |
-
|
29 |
-
</
|
30 |
-
<
|
31 |
-
<
|
32 |
-
|
33 |
-
<
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
<
|
40 |
-
|
41 |
-
</
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
<
|
46 |
-
</
|
47 |
-
|
48 |
-
<
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
<
|
54 |
-
<
|
55 |
-
<
|
56 |
-
</
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
<li class="method public "><a href="#mla_fetch_attachment_image_metadata" title="mla_fetch_attachment_image_metadata :: Fetch and filter IPTC and EXIF, XMP or PDF metadata for an image attachment"><span class="description">Fetch and filter IPTC and EXIF, XMP or PDF metadata for an image attachment</span><pre>mla_fetch_attachment_image_metadata()</pre></a></li>
|
68 |
-
<li class="method public "><a href="#mla_find_array_element" title="mla_find_array_element :: Finds the value of a key in a possibly nested array structure"><span class="description">Finds the value of a key in a possibly nested array structure</span><pre>mla_find_array_element()</pre></a></li>
|
69 |
-
<li class="method public "><a href="#mla_get_attachment_by_id" title="mla_get_attachment_by_id :: Retrieve an Attachment array given a $post_id"><span class="description">Retrieve an Attachment array given a $post_id</span><pre>mla_get_attachment_by_id()</pre></a></li>
|
70 |
-
<li class="method public "><a href="#mla_get_template_placeholders" title="mla_get_template_placeholders :: Analyze a template, returning an array of the placeholders it contains"><span class="description">Analyze a template, returning an array of the placeholders it contains</span><pre>mla_get_template_placeholders()</pre></a></li>
|
71 |
-
<li class="method public "><a href="#mla_hex_dump" title="mla_hex_dump :: Format printable version of binary data"><span class="description">Format printable version of binary data</span><pre>mla_hex_dump()</pre></a></li>
|
72 |
-
<li class="method public "><a href="#mla_id3_metadata_value" title="mla_id3_metadata_value :: Parse one ID3 (audio/visual) metadata field"><span class="description">Parse one ID3 (audio/visual) metadata field</span><pre>mla_id3_metadata_value()</pre></a></li>
|
73 |
-
<li class="method public "><a href="#mla_iptc_metadata_value" title="mla_iptc_metadata_value :: Parse one IPTC metadata field"><span class="description">Parse one IPTC metadata field</span><pre>mla_iptc_metadata_value()</pre></a></li>
|
74 |
-
<li class="method public "><a href="#mla_parse_array_template" title="mla_parse_array_template :: Expand a template, replacing placeholders with their values"><span class="description">Expand a template, replacing placeholders with their values</span><pre>mla_parse_array_template()</pre></a></li>
|
75 |
-
<li class="method public "><a href="#mla_parse_pdf_date" title="mla_parse_pdf_date :: Parse a PDF date string"><span class="description">Parse a PDF date string</span><pre>mla_parse_pdf_date()</pre></a></li>
|
76 |
-
<li class="method public "><a href="#mla_parse_template" title="mla_parse_template :: Expand a template, replacing placeholders with their values"><span class="description">Expand a template, replacing placeholders with their values</span><pre>mla_parse_template()</pre></a></li>
|
77 |
-
<li class="method public "><a href="#mla_parse_xmp_metadata" title="mla_parse_xmp_metadata :: Extract XMP meta data from a file"><span class="description">Extract XMP meta data from a file</span><pre>mla_parse_xmp_metadata()</pre></a></li>
|
78 |
-
<li class="method public "><a href="#mla_pdf_metadata_value" title="mla_pdf_metadata_value :: Parse one PDF metadata field"><span class="description">Parse one PDF metadata field</span><pre>mla_pdf_metadata_value()</pre></a></li>
|
79 |
-
<li class="method public "><a href="#mla_query_list_table_items" title="mla_query_list_table_items :: Retrieve attachment objects for list table display"><span class="description">Retrieve attachment objects for list table display</span><pre>mla_query_list_table_items()</pre></a></li>
|
80 |
-
<li class="method public "><a href="#mla_save_post_action" title="mla_save_post_action :: Invalidates $mla_galleries and $galleries arrays and cached values after post, page or attachment updates"><span class="description">Invalidates $mla_galleries and $galleries arrays and cached values after post, page or attachment updates</span><pre>mla_save_post_action()</pre></a></li>
|
81 |
-
<li class="method public "><a href="#mla_update_item_postmeta" title='mla_update_item_postmeta :: Update custom field and "meta:" data for a single attachment'><span class="description">Update custom field and "meta:" data for a single attachment</span><pre>mla_update_item_postmeta()</pre></a></li>
|
82 |
-
<li class="method public "><a href="#mla_update_single_item" title='mla_update_single_item :: Update a single item; change the "post" data, taxonomy terms
|
83 |
-
and meta data for a single attachment'><span class="description">Update a single item; change the "post" data, taxonomy terms
|
84 |
-
and meta data for a single attachment</span><pre>mla_update_single_item()</pre></a></li>
|
85 |
-
<li class="method public "><a href="#mla_update_wp_attachment_metadata" title='mla_update_wp_attachment_metadata :: Update "meta:" data for a single attachment'><span class="description">Update "meta:" data for a single attachment</span><pre>mla_update_wp_attachment_metadata()</pre></a></li>
|
86 |
-
<li class="method public "><a href="#mla_xmp_metadata_value" title="mla_xmp_metadata_value :: Parse one XMP metadata field"><span class="description">Parse one XMP metadata field</span><pre>mla_xmp_metadata_value()</pre></a></li>
|
87 |
-
<li class="nav-header private">» Private</li>
|
88 |
-
<li class="method private "><a href="#_bin_to_utf8" title="_bin_to_utf8 :: Replace SQL incorrect characters (0x80 - 0xFF) with their UTF-8 equivalents"><span class="description">Replace SQL incorrect characters (0x80 - 0xFF) with their UTF-8 equivalents</span><pre>_bin_to_utf8()</pre></a></li>
|
89 |
-
<li class="method private "><a href="#_evaluate_template_array_node" title='_evaluate_template_array_node :: Analyze a field-level "template:" element, expanding Field-level Markup Substitution Parameters'><span class="description">Analyze a field-level "template:" element, expanding Field-level Markup Substitution Parameters</span><pre>_evaluate_template_array_node()</pre></a></li>
|
90 |
-
<li class="method private "><a href="#_evaluate_template_node" title='_evaluate_template_node :: Analyze a field-level "template:" element, expanding Field-level Markup Substitution Parameters'><span class="description">Analyze a field-level "template:" element, expanding Field-level Markup Substitution Parameters</span><pre>_evaluate_template_node()</pre></a></li>
|
91 |
-
<li class="method private "><a href="#_expand_field_level_template" title='_expand_field_level_template :: Analyze a field-level "template:" element, expanding Field-level Markup Substitution Parameters'><span class="description">Analyze a field-level "template:" element, expanding Field-level Markup Substitution Parameters</span><pre>_expand_field_level_template()</pre></a></li>
|
92 |
-
<li class="method private "><a href="#_find_template_substring" title="_find_template_substring :: Find a complete template, balancing opening and closing delimiters"><span class="description">Find a complete template, balancing opening and closing delimiters</span><pre>_find_template_substring()</pre></a></li>
|
93 |
-
<li class="method private "><a href="#_find_test_substring" title="_find_test_substring :: Find a complete (test) element, balancing opening and closing delimiters"><span class="description">Find a complete (test) element, balancing opening and closing delimiters</span><pre>_find_test_substring()</pre></a></li>
|
94 |
-
<li class="method private "><a href="#_nonempty_value" title="_nonempty_value :: Search the namespace array for a non-empty value"><span class="description">Search the namespace array for a non-empty value</span><pre>_nonempty_value()</pre></a></li>
|
95 |
-
<li class="method private "><a href="#_parse_arguments" title="_parse_arguments :: Process an argument list within a field-level parameter format specification"><span class="description">Process an argument list within a field-level parameter format specification</span><pre>_parse_arguments()</pre></a></li>
|
96 |
-
<li class="method private "><a href="#_parse_field_level_template" title='_parse_field_level_template :: Convert field-level "template:" string into its component parts'><span class="description">Convert field-level "template:" string into its component parts</span><pre>_parse_field_level_template()</pre></a></li>
|
97 |
-
<li class="method private "><a href="#_parse_iso8601_date" title="_parse_iso8601_date :: Parse a ISO 8601 Timestamp"><span class="description">Parse a ISO 8601 Timestamp</span><pre>_parse_iso8601_date()</pre></a></li>
|
98 |
-
<li class="method private "><a href="#_parse_xmp_array" title="_parse_xmp_array :: Parse an XMP array value, stripping namespace prefixes and Seq/Alt/Bag arrays"><span class="description">Parse an XMP array value, stripping namespace prefixes and Seq/Alt/Bag arrays</span><pre>_parse_xmp_array()</pre></a></li>
|
99 |
-
<li class="method private "><a href="#_process_field_level_array" title="_process_field_level_array :: Process an markup field array value according to the supplied data-format option"><span class="description">Process an markup field array value according to the supplied data-format option</span><pre>_process_field_level_array()</pre></a></li>
|
100 |
-
<li class="method private "><a href="#_rational_to_decimal" title="_rational_to_decimal :: Convert an EXIF GPS rational value to a PHP float value"><span class="description">Convert an EXIF GPS rational value to a PHP float value</span><pre>_rational_to_decimal()</pre></a></li>
|
101 |
-
<li class="method private "><a href="#_rational_to_string" title="_rational_to_string :: Convert an EXIF rational value to a formatted string"><span class="description">Convert an EXIF rational value to a formatted string</span><pre>_rational_to_string()</pre></a></li>
|
102 |
-
<li class="method private "><a href="#_remove_terms" title="_remove_terms :: Remove terms from an attachment's assignments"><span class="description">Remove terms from an attachment's assignments</span><pre>_remove_terms()</pre></a></li>
|
103 |
-
<li class="method private "><a href="#_set_array_element" title="_set_array_element :: Adds or replaces the value of a key in a possibly nested array structure"><span class="description">Adds or replaces the value of a key in a possibly nested array structure</span><pre>_set_array_element()</pre></a></li>
|
104 |
-
<li class="method private "><a href="#_unset_array_element" title="_unset_array_element :: Deletes the value of a key in a possibly nested array structure"><span class="description">Deletes the value of a key in a possibly nested array structure</span><pre>_unset_array_element()</pre></a></li>
|
105 |
-
<li class="nav-header">
|
106 |
-
<i class="icon-custom icon-property"></i> Properties</li>
|
107 |
-
<li class="property public "><a href="#%24mla_iptc_keys" title="$mla_iptc_keys :: IPTC Dataset friendly name/slug and identifiers"><span class="description">IPTC Dataset friendly name/slug and identifiers</span><pre>$mla_iptc_keys</pre></a></li>
|
108 |
-
<li class="property public "><a href="#%24query_parameters" title='$query_parameters :: WP_Query filter "parameters"'><span class="description">WP_Query filter "parameters"</span><pre>$query_parameters</pre></a></li>
|
109 |
-
<li class="property public "><a href="#%24search_parameters" title="$search_parameters :: WP_Query 'posts_search' filter "parameters""><span class="description">WP_Query 'posts_search' filter "parameters"</span><pre>$search_parameters</pre></a></li>
|
110 |
-
<li class="property public "><a href="#%24utf8_chars" title="$utf8_chars :: UTF-8 replacements for invalid SQL characters"><span class="description">UTF-8 replacements for invalid SQL characters</span><pre>$utf8_chars</pre></a></li>
|
111 |
-
<li class="nav-header private">» Private</li>
|
112 |
-
<li class="property private "><a href="#%24mla_IPTC_EXIF_errors" title="$mla_IPTC_EXIF_errors :: Passes IPTC/EXIF parse errors between mla_IPTC_EXIF_error_handler
|
113 |
-
and mla_fetch_attachment_image_metadata"><span class="description">Passes IPTC/EXIF parse errors between mla_IPTC_EXIF_error_handler
|
114 |
-
and mla_fetch_attachment_image_metadata</span><pre>$mla_IPTC_EXIF_errors</pre></a></li>
|
115 |
-
<li class="property private "><a href="#%24mla_iptc_descriptions" title="$mla_iptc_descriptions :: IPTC Dataset descriptions"><span class="description">IPTC Dataset descriptions</span><pre>$mla_iptc_descriptions</pre></a></li>
|
116 |
-
<li class="property private "><a href="#%24mla_iptc_formats" title="$mla_iptc_formats :: IPTC file format identifiers and descriptions"><span class="description">IPTC file format identifiers and descriptions</span><pre>$mla_iptc_formats</pre></a></li>
|
117 |
-
<li class="property private "><a href="#%24mla_iptc_image_types" title="$mla_iptc_image_types :: IPTC image type identifiers and descriptions"><span class="description">IPTC image type identifiers and descriptions</span><pre>$mla_iptc_image_types</pre></a></li>
|
118 |
-
<li class="property private "><a href="#%24mla_iptc_records" title="$mla_iptc_records :: IPTC Dataset identifiers and names"><span class="description">IPTC Dataset identifiers and names</span><pre>$mla_iptc_records</pre></a></li>
|
119 |
-
</ul>
|
120 |
-
</div>
|
121 |
-
<div class="span8">
|
122 |
-
<a name="%5CMLAData" id="\MLAData"></a><ul class="breadcrumb">
|
123 |
-
<li>
|
124 |
-
<a href="../index.html"><i class="icon-custom icon-class"></i></a><span class="divider">\</span>
|
125 |
-
</li>
|
126 |
-
<li><a href="../namespaces/global.html">global</a></li>
|
127 |
-
<li class="active">
|
128 |
-
<span class="divider">\</span><a href="../classes/MLAData.html">MLAData</a>
|
129 |
-
</li>
|
130 |
-
</ul>
|
131 |
-
<div href="../classes/MLAData.html" class="element class">
|
132 |
-
<p class="short_description">Class MLA (Media Library Assistant) Data provides database and template file access for MLA needs</p>
|
133 |
-
<div class="details">
|
134 |
-
<p class="long_description"><p>The _template functions are inspired by the book "WordPress 3 Plugin Development Essentials."
|
135 |
-
Templates separate HTML markup from PHP code for easier maintenance and localization.</p></p>
|
136 |
-
<table class="table table-bordered">
|
137 |
-
<tr>
|
138 |
-
<th>package</th>
|
139 |
-
<td><a href="../packages/Media%20Library%20Assistant.html">Media Library Assistant</a></td>
|
140 |
-
</tr>
|
141 |
-
<tr>
|
142 |
-
<th>since</th>
|
143 |
-
<td>0.1</td>
|
144 |
-
</tr>
|
145 |
-
</table>
|
146 |
-
<h3>
|
147 |
-
<i class="icon-custom icon-method"></i> Methods</h3>
|
148 |
-
<a name="initialize" id="initialize"></a><div class="element clickable method public initialize" data-toggle="collapse" data-target=".initialize .collapse">
|
149 |
-
<h2>Initialization function, similar to __construct()</h2>
|
150 |
-
<pre>initialize() </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>0.1</td>
|
157 |
-
</tr></table>
|
158 |
-
</div></div>
|
159 |
-
</div>
|
160 |
-
<a name="mla_IPTC_EXIF_error_handler" id="mla_IPTC_EXIF_error_handler"></a><div class="element clickable method public mla_IPTC_EXIF_error_handler" data-toggle="collapse" data-target=".mla_IPTC_EXIF_error_handler .collapse">
|
161 |
-
<h2>Intercept IPTC and EXIF parse errors</h2>
|
162 |
-
<pre>mla_IPTC_EXIF_error_handler(int $type, string $string, string $file, int $line) : boolean</pre>
|
163 |
-
<div class="labels"></div>
|
164 |
-
<div class="row collapse"><div class="detail-description">
|
165 |
-
<p class="long_description"></p>
|
166 |
-
<table class="table table-bordered"><tr>
|
167 |
-
<th>since</th>
|
168 |
-
<td>1.81</td>
|
169 |
-
</tr></table>
|
170 |
-
<h3>Parameters</h3>
|
171 |
-
<div class="subelement argument">
|
172 |
-
<h4>$type</h4>
|
173 |
-
<code>int</code><p>the level of the error raised</p></div>
|
174 |
-
<div class="subelement argument">
|
175 |
-
<h4>$string</h4>
|
176 |
-
<code>string</code><p>the error message</p></div>
|
177 |
-
<div class="subelement argument">
|
178 |
-
<h4>$file</h4>
|
179 |
-
<code>string</code><p>the filename that the error was raised in</p></div>
|
180 |
-
<div class="subelement argument">
|
181 |
-
<h4>$line</h4>
|
182 |
-
<code>int</code><p>the line number the error was raised at</p></div>
|
183 |
-
<h3>Returns</h3>
|
184 |
-
<div class="subelement response">
|
185 |
-
<code>boolean</code>true, to bypass PHP error handler</div>
|
186 |
-
</div></div>
|
187 |
-
</div>
|
188 |
-
<a name="mla_apply_field_level_format" id="mla_apply_field_level_format"></a><div class="element clickable method public mla_apply_field_level_format" data-toggle="collapse" data-target=".mla_apply_field_level_format .collapse">
|
189 |
-
<h2>Apply field-level format options to field-level content</h2>
|
190 |
-
<pre>mla_apply_field_level_format(string $value, array $args) : string</pre>
|
191 |
-
<div class="labels"></div>
|
192 |
-
<div class="row collapse"><div class="detail-description">
|
193 |
-
<p class="long_description"></p>
|
194 |
-
<table class="table table-bordered"><tr>
|
195 |
-
<th>since</th>
|
196 |
-
<td>2.10</td>
|
197 |
-
</tr></table>
|
198 |
-
<h3>Parameters</h3>
|
199 |
-
<div class="subelement argument">
|
200 |
-
<h4>$value</h4>
|
201 |
-
<code>string</code><p>field-level content</p>
|
202 |
-
</div>
|
203 |
-
<div class="subelement argument">
|
204 |
-
<h4>$args</h4>
|
205 |
-
<code>array</code><p>format code and aguments</p></div>
|
206 |
-
<h3>Returns</h3>
|
207 |
-
<div class="subelement response">
|
208 |
-
<code>string</code>formatted field-level content</div>
|
209 |
-
</div></div>
|
210 |
-
</div>
|
211 |
-
<a name="mla_count_list_table_items" id="mla_count_list_table_items"></a><div class="element clickable method public mla_count_list_table_items" data-toggle="collapse" data-target=".mla_count_list_table_items .collapse">
|
212 |
-
<h2>Get the total number of attachment posts</h2>
|
213 |
-
<pre>mla_count_list_table_items(array $request, int $offset, int $count) : integer</pre>
|
214 |
-
<div class="labels"></div>
|
215 |
-
<div class="row collapse"><div class="detail-description">
|
216 |
-
<p class="long_description"><p>Compatibility shim for MLAQuery::mla_count_list_table_items</p></p>
|
217 |
-
<table class="table table-bordered"><tr>
|
218 |
-
<th>since</th>
|
219 |
-
<td>0.30</td>
|
220 |
-
</tr></table>
|
221 |
-
<h3>Parameters</h3>
|
222 |
-
<div class="subelement argument">
|
223 |
-
<h4>$request</h4>
|
224 |
-
<code>array</code><p>Query variables, e.g., from $_REQUEST</p>
|
225 |
-
</div>
|
226 |
-
<div class="subelement argument">
|
227 |
-
<h4>$offset</h4>
|
228 |
-
<code>int</code><p>(optional) number of rows to skip over to reach desired page</p>
|
229 |
-
</div>
|
230 |
-
<div class="subelement argument">
|
231 |
-
<h4>$count</h4>
|
232 |
-
<code>int</code><p>(optional) number of rows on each page</p>
|
233 |
-
</div>
|
234 |
-
<h3>Returns</h3>
|
235 |
-
<div class="subelement response">
|
236 |
-
<code>integer</code>Number of attachment posts</div>
|
237 |
-
</div></div>
|
238 |
-
</div>
|
239 |
-
<a name="mla_exif_metadata_value" id="mla_exif_metadata_value"></a><div class="element clickable method public mla_exif_metadata_value" data-toggle="collapse" data-target=".mla_exif_metadata_value .collapse">
|
240 |
-
<h2>Parse one EXIF metadata field</h2>
|
241 |
-
<pre>mla_exif_metadata_value(string $exif_key, array $item_metadata, string $option, boolean $keep_existing) : mixed</pre>
|
242 |
-
<div class="labels"></div>
|
243 |
-
<div class="row collapse"><div class="detail-description">
|
244 |
-
<p class="long_description"><p>Also handles the special pseudo-values 'ALL_EXIF' and 'ALL_IPTC'.</p></p>
|
245 |
-
<table class="table table-bordered"><tr>
|
246 |
-
<th>since</th>
|
247 |
-
<td>1.13</td>
|
248 |
-
</tr></table>
|
249 |
-
<h3>Parameters</h3>
|
250 |
-
<div class="subelement argument">
|
251 |
-
<h4>$exif_key</h4>
|
252 |
-
<code>string</code><p>field name</p></div>
|
253 |
-
<div class="subelement argument">
|
254 |
-
<h4>$item_metadata</h4>
|
255 |
-
<code>array</code><p>metadata array containing iptc, exif, xmp and pdf metadata arrays</p></div>
|
256 |
-
<div class="subelement argument">
|
257 |
-
<h4>$option</h4>
|
258 |
-
<code>string</code><p>data option; 'text'|'single'|'export'|'array'|'multi'</p>
|
259 |
-
</div>
|
260 |
-
<div class="subelement argument">
|
261 |
-
<h4>$keep_existing</h4>
|
262 |
-
<code>boolean</code><p>Optional: for option 'multi', retain existing values</p>
|
263 |
-
</div>
|
264 |
-
<h3>Returns</h3>
|
265 |
-
<div class="subelement response">
|
266 |
-
<code>mixed</code>string/array representation of metadata value or an empty string</div>
|
267 |
-
</div></div>
|
268 |
-
</div>
|
269 |
-
<a name="mla_expand_field_level_parameters" id="mla_expand_field_level_parameters"></a><div class="element clickable method public mla_expand_field_level_parameters" data-toggle="collapse" data-target=".mla_expand_field_level_parameters .collapse">
|
270 |
-
<h2>Analyze a template, expanding Field-level Markup Substitution Parameters</h2>
|
271 |
-
<pre>mla_expand_field_level_parameters(string $tpl, array $query, array $markup_values, integer $post_id, boolean $keep_existing, string $default_option) : array</pre>
|
272 |
-
<div class="labels"></div>
|
273 |
-
<div class="row collapse"><div class="detail-description">
|
274 |
-
<p class="long_description"><p>Field-level parameters must have one of the following prefix values:
|
275 |
-
template, request, query, custom, terms, meta, iptc, exif, xmp, pdf.
|
276 |
-
All but request and query require an attachment ID.</p></p>
|
277 |
-
<table class="table table-bordered"><tr>
|
278 |
-
<th>since</th>
|
279 |
-
<td>1.50</td>
|
280 |
-
</tr></table>
|
281 |
-
<h3>Parameters</h3>
|
282 |
-
<div class="subelement argument">
|
283 |
-
<h4>$tpl</h4>
|
284 |
-
<code>string</code><p>A formatting string containing [+placeholders+]</p>
|
285 |
-
</div>
|
286 |
-
<div class="subelement argument">
|
287 |
-
<h4>$query</h4>
|
288 |
-
<code>array</code><p>Optional: an array of values from the query, if any, e.g. shortcode parameters</p></div>
|
289 |
-
<div class="subelement argument">
|
290 |
-
<h4>$markup_values</h4>
|
291 |
-
<code>array</code><p>Optional: an array of values to add to the returned array</p></div>
|
292 |
-
<div class="subelement argument">
|
293 |
-
<h4>$post_id</h4>
|
294 |
-
<code>integer</code><p>Optional: attachment ID for attachment-specific placeholders</p>
|
295 |
-
</div>
|
296 |
-
<div class="subelement argument">
|
297 |
-
<h4>$keep_existing</h4>
|
298 |
-
<code>boolean</code><p>Optional: for option 'multi', retain existing values</p>
|
299 |
-
</div>
|
300 |
-
<div class="subelement argument">
|
301 |
-
<h4>$default_option</h4>
|
302 |
-
<code>string</code><p>Optional: default option value</p></div>
|
303 |
-
<h3>Returns</h3>
|
304 |
-
<div class="subelement response">
|
305 |
-
<code>array</code>( parameter => value ) for all field-level parameters and anything in $markup_values</div>
|
306 |
-
</div></div>
|
307 |
-
</div>
|
308 |
-
<a name="mla_fetch_attachment_id3_metadata" id="mla_fetch_attachment_id3_metadata"></a><div class="element clickable method public mla_fetch_attachment_id3_metadata" data-toggle="collapse" data-target=".mla_fetch_attachment_id3_metadata .collapse">
|
309 |
-
<h2>Fetch and filter ID3 metadata for an audio or video attachment</h2>
|
310 |
-
<pre>mla_fetch_attachment_id3_metadata(int $post_id, string $path) : array</pre>
|
311 |
-
<div class="labels"></div>
|
312 |
-
<div class="row collapse"><div class="detail-description">
|
313 |
-
<p class="long_description"><p>Adapted from /wp-admin/includes/media.php functions wp_add_id3_tag_data,
|
314 |
-
wp_read_video_metadata and wp_read_audio_metadata</p></p>
|
315 |
-
<table class="table table-bordered"><tr>
|
316 |
-
<th>since</th>
|
317 |
-
<td>2.13</td>
|
318 |
-
</tr></table>
|
319 |
-
<h3>Parameters</h3>
|
320 |
-
<div class="subelement argument">
|
321 |
-
<h4>$post_id</h4>
|
322 |
-
<code>int</code><p>post ID of attachment</p></div>
|
323 |
-
<div class="subelement argument">
|
324 |
-
<h4>$path</h4>
|
325 |
-
<code>string</code><p>optional; if $post_id is zero, path to the image file.</p>
|
326 |
-
</div>
|
327 |
-
<h3>Returns</h3>
|
328 |
-
<div class="subelement response">
|
329 |
-
<code>array</code>Meta data variables, including 'audio' and 'video'</div>
|
330 |
-
</div></div>
|
331 |
-
</div>
|
332 |
-
<a name="mla_fetch_attachment_image_metadata" id="mla_fetch_attachment_image_metadata"></a><div class="element clickable method public mla_fetch_attachment_image_metadata" data-toggle="collapse" data-target=".mla_fetch_attachment_image_metadata .collapse">
|
333 |
-
<h2>Fetch and filter IPTC and EXIF, XMP or PDF metadata for an image attachment</h2>
|
334 |
-
<pre>mla_fetch_attachment_image_metadata(int $post_id, string $path) : 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>0.90</td>
|
341 |
-
</tr></table>
|
342 |
-
<h3>Parameters</h3>
|
343 |
-
<div class="subelement argument">
|
344 |
-
<h4>$post_id</h4>
|
345 |
-
<code>int</code><p>post ID of attachment</p></div>
|
346 |
-
<div class="subelement argument">
|
347 |
-
<h4>$path</h4>
|
348 |
-
<code>string</code><p>optional; if $post_id is zero, path to the image file.</p>
|
349 |
-
</div>
|
350 |
-
<h3>Returns</h3>
|
351 |
-
<div class="subelement response">
|
352 |
-
<code>array</code>Meta data variables, IPTC and EXIF or PDF</div>
|
353 |
-
</div></div>
|
354 |
-
</div>
|
355 |
-
<a name="mla_find_array_element" id="mla_find_array_element"></a><div class="element clickable method public mla_find_array_element" data-toggle="collapse" data-target=".mla_find_array_element .collapse">
|
356 |
-
<h2>Finds the value of a key in a possibly nested array structure</h2>
|
357 |
-
<pre>mla_find_array_element(string $needle, array $haystack, string $option, boolean $keep_existing) : mixed</pre>
|
358 |
-
<div class="labels"></div>
|
359 |
-
<div class="row collapse"><div class="detail-description">
|
360 |
-
<p class="long_description"><p>Used primarily to extract fields from the _wp_attachment_metadata custom field.
|
361 |
-
Also used with the audio/video ID3 metadata exposed in WordPress 3.6 and later.</p></p>
|
362 |
-
<table class="table table-bordered"><tr>
|
363 |
-
<th>since</th>
|
364 |
-
<td>1.30</td>
|
365 |
-
</tr></table>
|
366 |
-
<h3>Parameters</h3>
|
367 |
-
<div class="subelement argument">
|
368 |
-
<h4>$needle</h4>
|
369 |
-
<code>string</code><p>key value, e.g. array1.array2.element</p></div>
|
370 |
-
<div class="subelement argument">
|
371 |
-
<h4>$haystack</h4>
|
372 |
-
<code>array</code><p>PHP nested arrays</p></div>
|
373 |
-
<div class="subelement argument">
|
374 |
-
<h4>$option</h4>
|
375 |
-
<code>string</code><p>data option; 'text'|'single'|'export'|'array'|'multi'</p>
|
376 |
-
</div>
|
377 |
-
<div class="subelement argument">
|
378 |
-
<h4>$keep_existing</h4>
|
379 |
-
<code>boolean</code><p>keep existing values - for 'multi' option</p>
|
380 |
-
</div>
|
381 |
-
<h3>Returns</h3>
|
382 |
-
<div class="subelement response">
|
383 |
-
<code>mixed</code>string or array value matching key(.key ...) or ''</div>
|
384 |
-
</div></div>
|
385 |
-
</div>
|
386 |
-
<a name="mla_get_attachment_by_id" id="mla_get_attachment_by_id"></a><div class="element clickable method public mla_get_attachment_by_id" data-toggle="collapse" data-target=".mla_get_attachment_by_id .collapse">
|
387 |
-
<h2>Retrieve an Attachment array given a $post_id</h2>
|
388 |
-
<pre>mla_get_attachment_by_id(integer $post_id, boolean $add_references) : NULL | array</pre>
|
389 |
-
<div class="labels"></div>
|
390 |
-
<div class="row collapse"><div class="detail-description">
|
391 |
-
<p class="long_description"><p>The (associative) array will contain every field that can be found in
|
392 |
-
the posts and postmeta tables, and all references to the attachment.</p></p>
|
393 |
-
<table class="table table-bordered">
|
394 |
-
<tr>
|
395 |
-
<th>since</th>
|
396 |
-
<td>0.1</td>
|
397 |
-
</tr>
|
398 |
-
<tr>
|
399 |
-
<th>uses</th>
|
400 |
-
<td>\global\$post</td>
|
401 |
-
</tr>
|
402 |
-
</table>
|
403 |
-
<h3>Parameters</h3>
|
404 |
-
<div class="subelement argument">
|
405 |
-
<h4>$post_id</h4>
|
406 |
-
<code>integer</code><p>The ID of the attachment post</p></div>
|
407 |
-
<div class="subelement argument">
|
408 |
-
<h4>$add_references</h4>
|
409 |
-
<code>boolean</code><p>True to add references, false to skip references</p></div>
|
410 |
-
<h3>Returns</h3>
|
411 |
-
<div class="subelement response">
|
412 |
-
<code>NULL</code><code>array</code>NULL on failure else associative array</div>
|
413 |
-
</div></div>
|
414 |
-
</div>
|
415 |
-
<a name="mla_get_template_placeholders" id="mla_get_template_placeholders"></a><div class="element clickable method public mla_get_template_placeholders" data-toggle="collapse" data-target=".mla_get_template_placeholders .collapse">
|
416 |
-
<h2>Analyze a template, returning an array of the placeholders it contains</h2>
|
417 |
-
<pre>mla_get_template_placeholders(string $tpl, string $default_option) : array</pre>
|
418 |
-
<div class="labels"></div>
|
419 |
-
<div class="row collapse"><div class="detail-description">
|
420 |
-
<p class="long_description"></p>
|
421 |
-
<table class="table table-bordered"><tr>
|
422 |
-
<th>since</th>
|
423 |
-
<td>0.90</td>
|
424 |
-
</tr></table>
|
425 |
-
<h3>Parameters</h3>
|
426 |
-
<div class="subelement argument">
|
427 |
-
<h4>$tpl</h4>
|
428 |
-
<code>string</code><p>A formatting string containing [+placeholders+]</p>
|
429 |
-
</div>
|
430 |
-
<div class="subelement argument">
|
431 |
-
<h4>$default_option</h4>
|
432 |
-
<code>string</code><p>Optional: default option value</p></div>
|
433 |
-
<h3>Returns</h3>
|
434 |
-
<div class="subelement response">
|
435 |
-
<code>array</code>Placeholder information: each entry is an array with ['prefix'] => string, ['value'] => string, ['option'] => string 'text'|single'|'export'|'array'|'multi'</div>
|
436 |
-
</div></div>
|
437 |
-
</div>
|
438 |
-
<a name="mla_hex_dump" id="mla_hex_dump"></a><div class="element clickable method public mla_hex_dump" data-toggle="collapse" data-target=".mla_hex_dump .collapse">
|
439 |
-
<h2>Format printable version of binary data</h2>
|
440 |
-
<pre>mla_hex_dump(string $data, integer $limit, \intger $bytes_per_row, integer $offset) : string</pre>
|
441 |
-
<div class="labels"></div>
|
442 |
-
<div class="row collapse"><div class="detail-description">
|
443 |
-
<p class="long_description"></p>
|
444 |
-
<table class="table table-bordered"><tr>
|
445 |
-
<th>since</th>
|
446 |
-
<td>0.90</td>
|
447 |
-
</tr></table>
|
448 |
-
<h3>Parameters</h3>
|
449 |
-
<div class="subelement argument">
|
450 |
-
<h4>$data</h4>
|
451 |
-
<code>string</code><p>Binary data</p></div>
|
452 |
-
<div class="subelement argument">
|
453 |
-
<h4>$limit</h4>
|
454 |
-
<code>integer</code><p>Bytes to format, default = 0 (all bytes)</p>
|
455 |
-
</div>
|
456 |
-
<div class="subelement argument">
|
457 |
-
<h4>$bytes_per_row</h4>
|
458 |
-
<code>\intger</code><p>Bytes to format on each line</p></div>
|
459 |
-
<div class="subelement argument">
|
460 |
-
<h4>$offset</h4>
|
461 |
-
<code>integer</code><p>offset of initial byte, or -1 to suppress printing offset information</p>
|
462 |
-
</div>
|
463 |
-
<h3>Returns</h3>
|
464 |
-
<div class="subelement response">
|
465 |
-
<code>string</code>Printable representation of $data</div>
|
466 |
-
</div></div>
|
467 |
-
</div>
|
468 |
-
<a name="mla_id3_metadata_value" id="mla_id3_metadata_value"></a><div class="element clickable method public mla_id3_metadata_value" data-toggle="collapse" data-target=".mla_id3_metadata_value .collapse">
|
469 |
-
<h2>Parse one ID3 (audio/visual) metadata field</h2>
|
470 |
-
<pre>mla_id3_metadata_value(string $id3_key, array $id3_metadata, string $option, boolean $keep_existing) : mixed</pre>
|
471 |
-
<div class="labels"></div>
|
472 |
-
<div class="row collapse"><div class="detail-description">
|
473 |
-
<p class="long_description"><p>Also handles the special pseudo-value 'ALL_ID3'.</p></p>
|
474 |
-
<table class="table table-bordered"><tr>
|
475 |
-
<th>since</th>
|
476 |
-
<td>2.13</td>
|
477 |
-
</tr></table>
|
478 |
-
<h3>Parameters</h3>
|
479 |
-
<div class="subelement argument">
|
480 |
-
<h4>$id3_key</h4>
|
481 |
-
<code>string</code><p>field name</p></div>
|
482 |
-
<div class="subelement argument">
|
483 |
-
<h4>$id3_metadata</h4>
|
484 |
-
<code>array</code><p>ID3 metadata array</p></div>
|
485 |
-
<div class="subelement argument">
|
486 |
-
<h4>$option</h4>
|
487 |
-
<code>string</code><p>data option; 'text'|'single'|'export'|'array'|'multi'</p>
|
488 |
-
</div>
|
489 |
-
<div class="subelement argument">
|
490 |
-
<h4>$keep_existing</h4>
|
491 |
-
<code>boolean</code><p>Optional: for option 'multi', retain existing values</p>
|
492 |
-
</div>
|
493 |
-
<h3>Returns</h3>
|
494 |
-
<div class="subelement response">
|
495 |
-
<code>mixed</code>string/array representation of metadata value or an empty string</div>
|
496 |
-
</div></div>
|
497 |
-
</div>
|
498 |
-
<a name="mla_iptc_metadata_value" id="mla_iptc_metadata_value"></a><div class="element clickable method public mla_iptc_metadata_value" data-toggle="collapse" data-target=".mla_iptc_metadata_value .collapse">
|
499 |
-
<h2>Parse one IPTC metadata field</h2>
|
500 |
-
<pre>mla_iptc_metadata_value(string $iptc_key, array $item_metadata, string $option, boolean $keep_existing) : mixed</pre>
|
501 |
-
<div class="labels"></div>
|
502 |
-
<div class="row collapse"><div class="detail-description">
|
503 |
-
<p class="long_description"></p>
|
504 |
-
<table class="table table-bordered"><tr>
|
505 |
-
<th>since</th>
|
506 |
-
<td>1.41</td>
|
507 |
-
</tr></table>
|
508 |
-
<h3>Parameters</h3>
|
509 |
-
<div class="subelement argument">
|
510 |
-
<h4>$iptc_key</h4>
|
511 |
-
<code>string</code><p>field name - IPTC Identifier or friendly name/slug</p>
|
512 |
-
</div>
|
513 |
-
<div class="subelement argument">
|
514 |
-
<h4>$item_metadata</h4>
|
515 |
-
<code>array</code><p>metadata array containing iptc, exif, xmp and pdf metadata arrays</p></div>
|
516 |
-
<div class="subelement argument">
|
517 |
-
<h4>$option</h4>
|
518 |
-
<code>string</code><p>data option; 'text'|'single'|'export'|'array'|'multi'</p>
|
519 |
-
</div>
|
520 |
-
<div class="subelement argument">
|
521 |
-
<h4>$keep_existing</h4>
|
522 |
-
<code>boolean</code><p>Optional: for option 'multi', retain existing values</p>
|
523 |
-
</div>
|
524 |
-
<h3>Returns</h3>
|
525 |
-
<div class="subelement response">
|
526 |
-
<code>mixed</code>string/array representation of metadata value or an empty string</div>
|
527 |
-
</div></div>
|
528 |
-
</div>
|
529 |
-
<a name="mla_parse_array_template" id="mla_parse_array_template"></a><div class="element clickable method public mla_parse_array_template" data-toggle="collapse" data-target=".mla_parse_array_template .collapse">
|
530 |
-
<h2>Expand a template, replacing placeholders with their values</h2>
|
531 |
-
<pre>mla_parse_array_template(string $tpl, array $markup_values) : mixed</pre>
|
532 |
-
<div class="labels"></div>
|
533 |
-
<div class="row collapse"><div class="detail-description">
|
534 |
-
<p class="long_description"><p>Will return an array of values if one or more of the placeholders returns an array.</p></p>
|
535 |
-
<table class="table table-bordered"><tr>
|
536 |
-
<th>since</th>
|
537 |
-
<td>1.50</td>
|
538 |
-
</tr></table>
|
539 |
-
<h3>Parameters</h3>
|
540 |
-
<div class="subelement argument">
|
541 |
-
<h4>$tpl</h4>
|
542 |
-
<code>string</code><p>A formatting string containing [+placeholders+]</p>
|
543 |
-
</div>
|
544 |
-
<div class="subelement argument">
|
545 |
-
<h4>$markup_values</h4>
|
546 |
-
<code>array</code><p>An associative array containing keys and values e.g. array('key' => 'value')</p>
|
547 |
-
</div>
|
548 |
-
<h3>Returns</h3>
|
549 |
-
<div class="subelement response">
|
550 |
-
<code>mixed</code>string or array, depending on placeholder values. Placeholders corresponding to the keys of the markup_values will be replaced with their values.</div>
|
551 |
-
</div></div>
|
552 |
-
</div>
|
553 |
-
<a name="mla_parse_pdf_date" id="mla_parse_pdf_date"></a><div class="element clickable method public mla_parse_pdf_date" data-toggle="collapse" data-target=".mla_parse_pdf_date .collapse">
|
554 |
-
<h2>Parse a PDF date string</h2>
|
555 |
-
<pre>mla_parse_pdf_date(string $source_string) : string</pre>
|
556 |
-
<div class="labels"></div>
|
557 |
-
<div class="row collapse"><div class="detail-description">
|
558 |
-
<p class="long_description"></p>
|
559 |
-
<table class="table table-bordered"><tr>
|
560 |
-
<th>since</th>
|
561 |
-
<td>1.50</td>
|
562 |
-
</tr></table>
|
563 |
-
<h3>Parameters</h3>
|
564 |
-
<div class="subelement argument">
|
565 |
-
<h4>$source_string</h4>
|
566 |
-
<code>string</code><p>PDF date string of the form D:YYYYMMDDHHmmSSOHH'mm</p>
|
567 |
-
</div>
|
568 |
-
<h3>Returns</h3>
|
569 |
-
<div class="subelement response">
|
570 |
-
<code>string</code>formatted date string YYYY-MM-DD HH:mm:SS</div>
|
571 |
-
</div></div>
|
572 |
-
</div>
|
573 |
-
<a name="mla_parse_template" id="mla_parse_template"></a><div class="element clickable method public mla_parse_template" data-toggle="collapse" data-target=".mla_parse_template .collapse">
|
574 |
-
<h2>Expand a template, replacing placeholders with their values</h2>
|
575 |
-
<pre>mla_parse_template(string $tpl, array $markup_values) : \strng</pre>
|
576 |
-
<div class="labels"></div>
|
577 |
-
<div class="row collapse"><div class="detail-description">
|
578 |
-
<p class="long_description"><p>A simple parsing function for basic templating.</p></p>
|
579 |
-
<table class="table table-bordered"><tr>
|
580 |
-
<th>since</th>
|
581 |
-
<td>0.1</td>
|
582 |
-
</tr></table>
|
583 |
-
<h3>Parameters</h3>
|
584 |
-
<div class="subelement argument">
|
585 |
-
<h4>$tpl</h4>
|
586 |
-
<code>string</code><p>A formatting string containing [+placeholders+]</p>
|
587 |
-
</div>
|
588 |
-
<div class="subelement argument">
|
589 |
-
<h4>$markup_values</h4>
|
590 |
-
<code>array</code><p>An associative array containing keys and values e.g. array('key' => 'value')</p>
|
591 |
-
</div>
|
592 |
-
<h3>Returns</h3>
|
593 |
-
<div class="subelement response">
|
594 |
-
<code>\strng</code>Placeholders corresponding to the keys of the markup_values will be replaced with their values.</div>
|
595 |
-
</div></div>
|
596 |
-
</div>
|
597 |
-
<a name="mla_parse_xmp_metadata" id="mla_parse_xmp_metadata"></a><div class="element clickable method public mla_parse_xmp_metadata" data-toggle="collapse" data-target=".mla_parse_xmp_metadata .collapse">
|
598 |
-
<h2>Extract XMP meta data from a file</h2>
|
599 |
-
<pre>mla_parse_xmp_metadata(string $file_name, integer $file_offset) : mixed</pre>
|
600 |
-
<div class="labels"></div>
|
601 |
-
<div class="row collapse"><div class="detail-description">
|
602 |
-
<p class="long_description"></p>
|
603 |
-
<table class="table table-bordered"><tr>
|
604 |
-
<th>since</th>
|
605 |
-
<td>2.10</td>
|
606 |
-
</tr></table>
|
607 |
-
<h3>Parameters</h3>
|
608 |
-
<div class="subelement argument">
|
609 |
-
<h4>$file_name</h4>
|
610 |
-
<code>string</code><p>full path and file name</p></div>
|
611 |
-
<div class="subelement argument">
|
612 |
-
<h4>$file_offset</h4>
|
613 |
-
<code>integer</code><p>offset within the file of the search start point</p></div>
|
614 |
-
<h3>Returns</h3>
|
615 |
-
<div class="subelement response">
|
616 |
-
<code>mixed</code>array of metadata values or NULL on failure</div>
|
617 |
-
</div></div>
|
618 |
-
</div>
|
619 |
-
<a name="mla_pdf_metadata_value" id="mla_pdf_metadata_value"></a><div class="element clickable method public mla_pdf_metadata_value" data-toggle="collapse" data-target=".mla_pdf_metadata_value .collapse">
|
620 |
-
<h2>Parse one PDF metadata field</h2>
|
621 |
-
<pre>mla_pdf_metadata_value(string $pdf_key, string $item_metadata) : mixed</pre>
|
622 |
-
<div class="labels"></div>
|
623 |
-
<div class="row collapse"><div class="detail-description">
|
624 |
-
<p class="long_description"><p>Also handles the special pseudo-value 'ALL_PDF'.</p></p>
|
625 |
-
<table class="table table-bordered"><tr>
|
626 |
-
<th>since</th>
|
627 |
-
<td>1.50</td>
|
628 |
-
</tr></table>
|
629 |
-
<h3>Parameters</h3>
|
630 |
-
<div class="subelement argument">
|
631 |
-
<h4>$pdf_key</h4>
|
632 |
-
<code>string</code><p>field name</p></div>
|
633 |
-
<div class="subelement argument">
|
634 |
-
<h4>$item_metadata</h4>
|
635 |
-
<code>string</code><p>metadata array containing iptc, exif, xmp and pdf metadata arrays</p></div>
|
636 |
-
<h3>Returns</h3>
|
637 |
-
<div class="subelement response">
|
638 |
-
<code>mixed</code>string/array representation of metadata value or an empty string</div>
|
639 |
-
</div></div>
|
640 |
-
</div>
|
641 |
-
<a name="mla_query_list_table_items" id="mla_query_list_table_items"></a><div class="element clickable method public mla_query_list_table_items" data-toggle="collapse" data-target=".mla_query_list_table_items .collapse">
|
642 |
-
<h2>Retrieve attachment objects for list table display</h2>
|
643 |
-
<pre>mla_query_list_table_items(array $request, int $offset, int $count) : array</pre>
|
644 |
-
<div class="labels"></div>
|
645 |
-
<div class="row collapse"><div class="detail-description">
|
646 |
-
<p class="long_description"><p>Compatibility shim for MLAQuery::mla_query_list_table_items</p></p>
|
647 |
-
<table class="table table-bordered"><tr>
|
648 |
-
<th>since</th>
|
649 |
-
<td>0.1</td>
|
650 |
-
</tr></table>
|
651 |
-
<h3>Parameters</h3>
|
652 |
-
<div class="subelement argument">
|
653 |
-
<h4>$request</h4>
|
654 |
-
<code>array</code><p>query parameters from web page, usually found in $_REQUEST</p>
|
655 |
-
</div>
|
656 |
-
<div class="subelement argument">
|
657 |
-
<h4>$offset</h4>
|
658 |
-
<code>int</code><p>number of rows to skip over to reach desired page</p></div>
|
659 |
-
<div class="subelement argument">
|
660 |
-
<h4>$count</h4>
|
661 |
-
<code>int</code><p>number of rows on each page</p></div>
|
662 |
-
<h3>Returns</h3>
|
663 |
-
<div class="subelement response">
|
664 |
-
<code>array</code>attachment objects (posts) including parent data, meta data and references</div>
|
665 |
-
</div></div>
|
666 |
-
</div>
|
667 |
-
<a name="mla_save_post_action" id="mla_save_post_action"></a><div class="element clickable method public mla_save_post_action" data-toggle="collapse" data-target=".mla_save_post_action .collapse">
|
668 |
-
<h2>Invalidates $mla_galleries and $galleries arrays and cached values after post, page or attachment updates</h2>
|
669 |
-
<pre>mla_save_post_action(integer $post_id) : void</pre>
|
670 |
-
<div class="labels"></div>
|
671 |
-
<div class="row collapse"><div class="detail-description">
|
672 |
-
<p class="long_description"></p>
|
673 |
-
<table class="table table-bordered"><tr>
|
674 |
-
<th>since</th>
|
675 |
-
<td>1.00</td>
|
676 |
-
</tr></table>
|
677 |
-
<h3>Parameters</h3>
|
678 |
-
<div class="subelement argument">
|
679 |
-
<h4>$post_id</h4>
|
680 |
-
<code>integer</code><p>ID of post/page/attachment; not used at this time</p>
|
681 |
-
</div>
|
682 |
-
</div></div>
|
683 |
-
</div>
|
684 |
-
<a name="mla_update_item_postmeta" id="mla_update_item_postmeta"></a><div class="element clickable method public mla_update_item_postmeta" data-toggle="collapse" data-target=".mla_update_item_postmeta .collapse">
|
685 |
-
<h2>Update custom field and "meta:" data for a single attachment</h2>
|
686 |
-
<pre>mla_update_item_postmeta(int $post_id, array $new_meta) : string</pre>
|
687 |
-
<div class="labels"></div>
|
688 |
-
<div class="row collapse"><div class="detail-description">
|
689 |
-
<p class="long_description"></p>
|
690 |
-
<table class="table table-bordered"><tr>
|
691 |
-
<th>since</th>
|
692 |
-
<td>1.40</td>
|
693 |
-
</tr></table>
|
694 |
-
<h3>Parameters</h3>
|
695 |
-
<div class="subelement argument">
|
696 |
-
<h4>$post_id</h4>
|
697 |
-
<code>int</code><p>The ID of the attachment to be updated</p></div>
|
698 |
-
<div class="subelement argument">
|
699 |
-
<h4>$new_meta</h4>
|
700 |
-
<code>array</code><p>Field name => value pairs</p>
|
701 |
-
</div>
|
702 |
-
<h3>Returns</h3>
|
703 |
-
<div class="subelement response">
|
704 |
-
<code>string</code>success/failure message(s)</div>
|
705 |
-
</div></div>
|
706 |
-
</div>
|
707 |
-
<a name="mla_update_single_item" id="mla_update_single_item"></a><div class="element clickable method public mla_update_single_item" data-toggle="collapse" data-target=".mla_update_single_item .collapse">
|
708 |
-
<h2>Update a single item; change the "post" data, taxonomy terms
|
709 |
-
and meta data for a single attachment</h2>
|
710 |
-
<pre>mla_update_single_item(int $post_id, array $new_data, array $tax_input, array $tax_actions) : array</pre>
|
711 |
-
<div class="labels"></div>
|
712 |
-
<div class="row collapse"><div class="detail-description">
|
713 |
-
<p class="long_description"></p>
|
714 |
-
<table class="table table-bordered"><tr>
|
715 |
-
<th>since</th>
|
716 |
-
<td>0.1</td>
|
717 |
-
</tr></table>
|
718 |
-
<h3>Parameters</h3>
|
719 |
-
<div class="subelement argument">
|
720 |
-
<h4>$post_id</h4>
|
721 |
-
<code>int</code><p>The ID of the attachment to be updated</p></div>
|
722 |
-
<div class="subelement argument">
|
723 |
-
<h4>$new_data</h4>
|
724 |
-
<code>array</code><p>Field name => value pairs</p>
|
725 |
-
</div>
|
726 |
-
<div class="subelement argument">
|
727 |
-
<h4>$tax_input</h4>
|
728 |
-
<code>array</code><p>Optional taxonomy term values, default null</p></div>
|
729 |
-
<div class="subelement argument">
|
730 |
-
<h4>$tax_actions</h4>
|
731 |
-
<code>array</code><p>Optional taxonomy actions (add, remove, replace), default null</p>
|
732 |
-
</div>
|
733 |
-
<h3>Returns</h3>
|
734 |
-
<div class="subelement response">
|
735 |
-
<code>array</code>success/failure message and NULL content</div>
|
736 |
-
</div></div>
|
737 |
-
</div>
|
738 |
-
<a name="mla_update_wp_attachment_metadata" id="mla_update_wp_attachment_metadata"></a><div class="element clickable method public mla_update_wp_attachment_metadata" data-toggle="collapse" data-target=".mla_update_wp_attachment_metadata .collapse">
|
739 |
-
<h2>Update "meta:" data for a single attachment</h2>
|
740 |
-
<pre>mla_update_wp_attachment_metadata(array $current_values, array $new_meta) : string</pre>
|
741 |
-
<div class="labels"></div>
|
742 |
-
<div class="row collapse"><div class="detail-description">
|
743 |
-
<p class="long_description"></p>
|
744 |
-
<table class="table table-bordered"><tr>
|
745 |
-
<th>since</th>
|
746 |
-
<td>1.51</td>
|
747 |
-
</tr></table>
|
748 |
-
<h3>Parameters</h3>
|
749 |
-
<div class="subelement argument">
|
750 |
-
<h4>$current_values</h4>
|
751 |
-
<code>array</code><p>The current wp_attachment_metadata value</p></div>
|
752 |
-
<div class="subelement argument">
|
753 |
-
<h4>$new_meta</h4>
|
754 |
-
<code>array</code><p>Field name => value pairs</p>
|
755 |
-
</div>
|
756 |
-
<h3>Returns</h3>
|
757 |
-
<div class="subelement response">
|
758 |
-
<code>string</code>success/failure message(s); empty string if no changes.</div>
|
759 |
-
</div></div>
|
760 |
-
</div>
|
761 |
-
<a name="mla_xmp_metadata_value" id="mla_xmp_metadata_value"></a><div class="element clickable method public mla_xmp_metadata_value" data-toggle="collapse" data-target=".mla_xmp_metadata_value .collapse">
|
762 |
-
<h2>Parse one XMP metadata field</h2>
|
763 |
-
<pre>mla_xmp_metadata_value(string $xmp_key, array $xmp_metadata, string $option, boolean $keep_existing) : mixed</pre>
|
764 |
-
<div class="labels"></div>
|
765 |
-
<div class="row collapse"><div class="detail-description">
|
766 |
-
<p class="long_description"><p>Also handles the special pseudo-value 'ALL_XMP'.</p></p>
|
767 |
-
<table class="table table-bordered"><tr>
|
768 |
-
<th>since</th>
|
769 |
-
<td>2.10</td>
|
770 |
-
</tr></table>
|
771 |
-
<h3>Parameters</h3>
|
772 |
-
<div class="subelement argument">
|
773 |
-
<h4>$xmp_key</h4>
|
774 |
-
<code>string</code><p>field name</p></div>
|
775 |
-
<div class="subelement argument">
|
776 |
-
<h4>$xmp_metadata</h4>
|
777 |
-
<code>array</code><p>XMP metadata array</p></div>
|
778 |
-
<div class="subelement argument">
|
779 |
-
<h4>$option</h4>
|
780 |
-
<code>string</code><p>data option; 'text'|'single'|'export'|'array'|'multi'</p>
|
781 |
-
</div>
|
782 |
-
<div class="subelement argument">
|
783 |
-
<h4>$keep_existing</h4>
|
784 |
-
<code>boolean</code><p>Optional: for option 'multi', retain existing values</p>
|
785 |
-
</div>
|
786 |
-
<h3>Returns</h3>
|
787 |
-
<div class="subelement response">
|
788 |
-
<code>mixed</code>string/array representation of metadata value or an empty string</div>
|
789 |
-
</div></div>
|
790 |
-
</div>
|
791 |
-
<a name="_bin_to_utf8" id="_bin_to_utf8"></a><div class="element clickable method private _bin_to_utf8" data-toggle="collapse" data-target="._bin_to_utf8 .collapse">
|
792 |
-
<h2>Replace SQL incorrect characters (0x80 - 0xFF) with their UTF-8 equivalents</h2>
|
793 |
-
<pre>_bin_to_utf8(string $string) : string</pre>
|
794 |
-
<div class="labels"></div>
|
795 |
-
<div class="row collapse"><div class="detail-description">
|
796 |
-
<p class="long_description"></p>
|
797 |
-
<table class="table table-bordered"><tr>
|
798 |
-
<th>since</th>
|
799 |
-
<td>1.41</td>
|
800 |
-
</tr></table>
|
801 |
-
<h3>Parameters</h3>
|
802 |
-
<div class="subelement argument">
|
803 |
-
<h4>$string</h4>
|
804 |
-
<code>string</code><p>unencoded string</p></div>
|
805 |
-
<h3>Returns</h3>
|
806 |
-
<div class="subelement response">
|
807 |
-
<code>string</code>UTF-8 encoded string</div>
|
808 |
-
</div></div>
|
809 |
-
</div>
|
810 |
-
<a name="_evaluate_template_array_node" id="_evaluate_template_array_node"></a><div class="element clickable method private _evaluate_template_array_node" data-toggle="collapse" data-target="._evaluate_template_array_node .collapse">
|
811 |
-
<h2>Analyze a field-level "template:" element, expanding Field-level Markup Substitution Parameters</h2>
|
812 |
-
<pre>_evaluate_template_array_node(array $node, array $markup_values) : mixed</pre>
|
813 |
-
<div class="labels"></div>
|
814 |
-
<div class="row collapse"><div class="detail-description">
|
815 |
-
<p class="long_description"><p>Will return an array of values if one or more of the placeholders returns an array.</p></p>
|
816 |
-
<table class="table table-bordered"><tr>
|
817 |
-
<th>since</th>
|
818 |
-
<td>1.50</td>
|
819 |
-
</tr></table>
|
820 |
-
<h3>Parameters</h3>
|
821 |
-
<div class="subelement argument">
|
822 |
-
<h4>$node</h4>
|
823 |
-
<code>array</code><p>A field-level template element node</p>
|
824 |
-
</div>
|
825 |
-
<div class="subelement argument">
|
826 |
-
<h4>$markup_values</h4>
|
827 |
-
<code>array</code><p>An array of markup substitution values</p></div>
|
828 |
-
<h3>Returns</h3>
|
829 |
-
<div class="subelement response">
|
830 |
-
<code>mixed</code>string or array, depending on placeholder values. Placeholders corresponding to the keys of the markup_values will be replaced with their values.</div>
|
831 |
-
</div></div>
|
832 |
-
</div>
|
833 |
-
<a name="_evaluate_template_node" id="_evaluate_template_node"></a><div class="element clickable method private _evaluate_template_node" data-toggle="collapse" data-target="._evaluate_template_node .collapse">
|
834 |
-
<h2>Analyze a field-level "template:" element, expanding Field-level Markup Substitution Parameters</h2>
|
835 |
-
<pre>_evaluate_template_node(array $node, array $markup_values) : string</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>1.50</td>
|
842 |
-
</tr></table>
|
843 |
-
<h3>Parameters</h3>
|
844 |
-
<div class="subelement argument">
|
845 |
-
<h4>$node</h4>
|
846 |
-
<code>array</code><p>A field-level template element node</p>
|
847 |
-
</div>
|
848 |
-
<div class="subelement argument">
|
849 |
-
<h4>$markup_values</h4>
|
850 |
-
<code>array</code><p>An array of markup substitution values</p></div>
|
851 |
-
<h3>Returns</h3>
|
852 |
-
<div class="subelement response">
|
853 |
-
<code>string</code>String with expanded values, if any</div>
|
854 |
-
</div></div>
|
855 |
-
</div>
|
856 |
-
<a name="_expand_field_level_template" id="_expand_field_level_template"></a><div class="element clickable method private _expand_field_level_template" data-toggle="collapse" data-target="._expand_field_level_template .collapse">
|
857 |
-
<h2>Analyze a field-level "template:" element, expanding Field-level Markup Substitution Parameters</h2>
|
858 |
-
<pre>_expand_field_level_template(string $tpl, array $markup_values, boolean $return_arrays) : mixed</pre>
|
859 |
-
<div class="labels"></div>
|
860 |
-
<div class="row collapse"><div class="detail-description">
|
861 |
-
<p class="long_description"></p>
|
862 |
-
<table class="table table-bordered"><tr>
|
863 |
-
<th>since</th>
|
864 |
-
<td>1.50</td>
|
865 |
-
</tr></table>
|
866 |
-
<h3>Parameters</h3>
|
867 |
-
<div class="subelement argument">
|
868 |
-
<h4>$tpl</h4>
|
869 |
-
<code>string</code><p>A formatting string containing [+placeholders+]</p>
|
870 |
-
</div>
|
871 |
-
<div class="subelement argument">
|
872 |
-
<h4>$markup_values</h4>
|
873 |
-
<code>array</code><p>An array of markup substitution values</p></div>
|
874 |
-
<div class="subelement argument">
|
875 |
-
<h4>$return_arrays</h4>
|
876 |
-
<code>boolean</code><p>True to return array value(s), false to return a string</p>
|
877 |
-
</div>
|
878 |
-
<h3>Returns</h3>
|
879 |
-
<div class="subelement response">
|
880 |
-
<code>mixed</code>Element with expanded string/array values, if any</div>
|
881 |
-
</div></div>
|
882 |
-
</div>
|
883 |
-
<a name="_find_template_substring" id="_find_template_substring"></a><div class="element clickable method private _find_template_substring" data-toggle="collapse" data-target="._find_template_substring .collapse">
|
884 |
-
<h2>Find a complete template, balancing opening and closing delimiters</h2>
|
885 |
-
<pre>_find_template_substring(string $tpl) : string</pre>
|
886 |
-
<div class="labels"></div>
|
887 |
-
<div class="row collapse"><div class="detail-description">
|
888 |
-
<p class="long_description"></p>
|
889 |
-
<table class="table table-bordered"><tr>
|
890 |
-
<th>since</th>
|
891 |
-
<td>1.50</td>
|
892 |
-
</tr></table>
|
893 |
-
<h3>Parameters</h3>
|
894 |
-
<div class="subelement argument">
|
895 |
-
<h4>$tpl</h4>
|
896 |
-
<code>string</code><p>A string possibly starting with '[+template:'</p>
|
897 |
-
</div>
|
898 |
-
<h3>Returns</h3>
|
899 |
-
<div class="subelement response">
|
900 |
-
<code>string</code>'' or template string starting with '[+template:' and ending with the matching '+]'</div>
|
901 |
-
</div></div>
|
902 |
-
</div>
|
903 |
-
<a name="_find_test_substring" id="_find_test_substring"></a><div class="element clickable method private _find_test_substring" data-toggle="collapse" data-target="._find_test_substring .collapse">
|
904 |
-
<h2>Find a complete (test) element, balancing opening and closing delimiters</h2>
|
905 |
-
<pre>_find_test_substring(string $tpl) : string</pre>
|
906 |
-
<div class="labels"></div>
|
907 |
-
<div class="row collapse"><div class="detail-description">
|
908 |
-
<p class="long_description"></p>
|
909 |
-
<table class="table table-bordered"><tr>
|
910 |
-
<th>since</th>
|
911 |
-
<td>1.50</td>
|
912 |
-
</tr></table>
|
913 |
-
<h3>Parameters</h3>
|
914 |
-
<div class="subelement argument">
|
915 |
-
<h4>$tpl</h4>
|
916 |
-
<code>string</code><p>A string possibly starting with '('</p>
|
917 |
-
</div>
|
918 |
-
<h3>Returns</h3>
|
919 |
-
<div class="subelement response">
|
920 |
-
<code>string</code>'' or template string starting with '(' and ending with the matching ')'</div>
|
921 |
-
</div></div>
|
922 |
-
</div>
|
923 |
-
<a name="_nonempty_value" id="_nonempty_value"></a><div class="element clickable method private _nonempty_value" data-toggle="collapse" data-target="._nonempty_value .collapse">
|
924 |
-
<h2>Search the namespace array for a non-empty value</h2>
|
925 |
-
<pre>_nonempty_value(array $namespace_array, string $namespace, string $key) : string</pre>
|
926 |
-
<div class="labels"></div>
|
927 |
-
<div class="row collapse"><div class="detail-description">
|
928 |
-
<p class="long_description"></p>
|
929 |
-
<table class="table table-bordered"><tr>
|
930 |
-
<th>since</th>
|
931 |
-
<td>2.10</td>
|
932 |
-
</tr></table>
|
933 |
-
<h3>Parameters</h3>
|
934 |
-
<div class="subelement argument">
|
935 |
-
<h4>$namespace_array</h4>
|
936 |
-
<code>array</code><p>namespace array</p></div>
|
937 |
-
<div class="subelement argument">
|
938 |
-
<h4>$namespace</h4>
|
939 |
-
<code>string</code><p>namespace</p></div>
|
940 |
-
<div class="subelement argument">
|
941 |
-
<h4>$key</h4>
|
942 |
-
<code>string</code><p>key</p></div>
|
943 |
-
<h3>Returns</h3>
|
944 |
-
<div class="subelement response">
|
945 |
-
<code>string</code>trimmed value of the key within the namespace</div>
|
946 |
-
</div></div>
|
947 |
-
</div>
|
948 |
-
<a name="_parse_arguments" id="_parse_arguments"></a><div class="element clickable method private _parse_arguments" data-toggle="collapse" data-target="._parse_arguments .collapse">
|
949 |
-
<h2>Process an argument list within a field-level parameter format specification</h2>
|
950 |
-
<pre>_parse_arguments(string $argument_string) : array</pre>
|
951 |
-
<div class="labels"></div>
|
952 |
-
<div class="row collapse"><div class="detail-description">
|
953 |
-
<p class="long_description"></p>
|
954 |
-
<table class="table table-bordered"><tr>
|
955 |
-
<th>since</th>
|
956 |
-
<td>2.02</td>
|
957 |
-
</tr></table>
|
958 |
-
<h3>Parameters</h3>
|
959 |
-
<div class="subelement argument">
|
960 |
-
<h4>$argument_string</h4>
|
961 |
-
<code>string</code><p>arguments, e.g., ('d/m/Y H:i:s' , "arg, \" two" ) without parens</p>
|
962 |
-
</div>
|
963 |
-
<h3>Returns</h3>
|
964 |
-
<div class="subelement response">
|
965 |
-
<code>array</code>individual arguments, e.g. array( 0 => 'd/m/Y H:i:s', 1 => 'arg, \" two' )</div>
|
966 |
-
</div></div>
|
967 |
-
</div>
|
968 |
-
<a name="_parse_field_level_template" id="_parse_field_level_template"></a><div class="element clickable method private _parse_field_level_template" data-toggle="collapse" data-target="._parse_field_level_template .collapse">
|
969 |
-
<h2>Convert field-level "template:" string into its component parts</h2>
|
970 |
-
<pre>_parse_field_level_template(string $tpl) : array</pre>
|
971 |
-
<div class="labels"></div>
|
972 |
-
<div class="row collapse"><div class="detail-description">
|
973 |
-
<p class="long_description"></p>
|
974 |
-
<table class="table table-bordered"><tr>
|
975 |
-
<th>since</th>
|
976 |
-
<td>1.50</td>
|
977 |
-
</tr></table>
|
978 |
-
<h3>Parameters</h3>
|
979 |
-
<div class="subelement argument">
|
980 |
-
<h4>$tpl</h4>
|
981 |
-
<code>string</code><p>Template content with string, test and choice elements</p></div>
|
982 |
-
<h3>Returns</h3>
|
983 |
-
<div class="subelement response">
|
984 |
-
<code>array</code>( node => array( type => "string | test | choice | template", length => bytes, value => string | node(s) ) )</div>
|
985 |
-
</div></div>
|
986 |
-
</div>
|
987 |
-
<a name="_parse_iso8601_date" id="_parse_iso8601_date"></a><div class="element clickable method private _parse_iso8601_date" data-toggle="collapse" data-target="._parse_iso8601_date .collapse">
|
988 |
-
<h2>Parse a ISO 8601 Timestamp</h2>
|
989 |
-
<pre>_parse_iso8601_date(string $source_string) : string</pre>
|
990 |
-
<div class="labels"></div>
|
991 |
-
<div class="row collapse"><div class="detail-description">
|
992 |
-
<p class="long_description"></p>
|
993 |
-
<table class="table table-bordered"><tr>
|
994 |
-
<th>since</th>
|
995 |
-
<td>1.50</td>
|
996 |
-
</tr></table>
|
997 |
-
<h3>Parameters</h3>
|
998 |
-
<div class="subelement argument">
|
999 |
-
<h4>$source_string</h4>
|
1000 |
-
<code>string</code><p>ISO string of the form YYYY-MM-DDTHH:MM:SS-HH:MM (inc time zone)</p>
|
1001 |
-
</div>
|
1002 |
-
<h3>Returns</h3>
|
1003 |
-
<div class="subelement response">
|
1004 |
-
<code>string</code>formatted date string YYYY-MM-DD HH:mm:SS</div>
|
1005 |
-
</div></div>
|
1006 |
-
</div>
|
1007 |
-
<a name="_parse_xmp_array" id="_parse_xmp_array"></a><div class="element clickable method private _parse_xmp_array" data-toggle="collapse" data-target="._parse_xmp_array .collapse">
|
1008 |
-
<h2>Parse an XMP array value, stripping namespace prefixes and Seq/Alt/Bag arrays</h2>
|
1009 |
-
<pre>_parse_xmp_array(array $values) : mixed</pre>
|
1010 |
-
<div class="labels"></div>
|
1011 |
-
<div class="row collapse"><div class="detail-description">
|
1012 |
-
<p class="long_description"></p>
|
1013 |
-
<table class="table table-bordered"><tr>
|
1014 |
-
<th>since</th>
|
1015 |
-
<td>2.10</td>
|
1016 |
-
</tr></table>
|
1017 |
-
<h3>Parameters</h3>
|
1018 |
-
<div class="subelement argument">
|
1019 |
-
<h4>$values</h4>
|
1020 |
-
<code>array</code><p>XMP multi-valued element</p>
|
1021 |
-
</div>
|
1022 |
-
<h3>Returns</h3>
|
1023 |
-
<div class="subelement response">
|
1024 |
-
<code>mixed</code>Simplified array or string value</div>
|
1025 |
-
</div></div>
|
1026 |
-
</div>
|
1027 |
-
<a name="_process_field_level_array" id="_process_field_level_array"></a><div class="element clickable method private _process_field_level_array" data-toggle="collapse" data-target="._process_field_level_array .collapse">
|
1028 |
-
<h2>Process an markup field array value according to the supplied data-format option</h2>
|
1029 |
-
<pre>_process_field_level_array(array $record, string $option, boolean $keep_existing) : array</pre>
|
1030 |
-
<div class="labels"></div>
|
1031 |
-
<div class="row collapse"><div class="detail-description">
|
1032 |
-
<p class="long_description"></p>
|
1033 |
-
<table class="table table-bordered"><tr>
|
1034 |
-
<th>since</th>
|
1035 |
-
<td>1.50</td>
|
1036 |
-
</tr></table>
|
1037 |
-
<h3>Parameters</h3>
|
1038 |
-
<div class="subelement argument">
|
1039 |
-
<h4>$record</h4>
|
1040 |
-
<code>array</code><p>an array of scalar values</p></div>
|
1041 |
-
<div class="subelement argument">
|
1042 |
-
<h4>$option</h4>
|
1043 |
-
<code>string</code><p>data option; 'text'|'single'|'export'|'array'|'multi'</p>
|
1044 |
-
</div>
|
1045 |
-
<div class="subelement argument">
|
1046 |
-
<h4>$keep_existing</h4>
|
1047 |
-
<code>boolean</code><p>Optional: for option 'multi', retain existing values</p>
|
1048 |
-
</div>
|
1049 |
-
<h3>Returns</h3>
|
1050 |
-
<div class="subelement response">
|
1051 |
-
<code>array</code>( parameter => value ) for all field-level parameters and anything in $markup_values</div>
|
1052 |
-
</div></div>
|
1053 |
-
</div>
|
1054 |
-
<a name="_rational_to_decimal" id="_rational_to_decimal"></a><div class="element clickable method private _rational_to_decimal" data-toggle="collapse" data-target="._rational_to_decimal .collapse">
|
1055 |
-
<h2>Convert an EXIF GPS rational value to a PHP float value</h2>
|
1056 |
-
<pre>_rational_to_decimal(array $rational) : float</pre>
|
1057 |
-
<div class="labels"></div>
|
1058 |
-
<div class="row collapse"><div class="detail-description">
|
1059 |
-
<p class="long_description"></p>
|
1060 |
-
<table class="table table-bordered"><tr>
|
1061 |
-
<th>since</th>
|
1062 |
-
<td>1.50</td>
|
1063 |
-
</tr></table>
|
1064 |
-
<h3>Parameters</h3>
|
1065 |
-
<div class="subelement argument">
|
1066 |
-
<h4>$rational</h4>
|
1067 |
-
<code>array</code><p>array( 0 => numerator, 1 => denominator )</p>
|
1068 |
-
</div>
|
1069 |
-
<h3>Returns</h3>
|
1070 |
-
<div class="subelement response">
|
1071 |
-
<code>float</code>numerator/denominator</div>
|
1072 |
-
</div></div>
|
1073 |
-
</div>
|
1074 |
-
<a name="_rational_to_string" id="_rational_to_string"></a><div class="element clickable method private _rational_to_string" data-toggle="collapse" data-target="._rational_to_string .collapse">
|
1075 |
-
<h2>Convert an EXIF rational value to a formatted string</h2>
|
1076 |
-
<pre>_rational_to_string(string $rational, string $integer_format, string $fraction_format, string $mixed_format) : mixed</pre>
|
1077 |
-
<div class="labels"></div>
|
1078 |
-
<div class="row collapse"><div class="detail-description">
|
1079 |
-
<p class="long_description"></p>
|
1080 |
-
<table class="table table-bordered"><tr>
|
1081 |
-
<th>since</th>
|
1082 |
-
<td>2.02</td>
|
1083 |
-
</tr></table>
|
1084 |
-
<h3>Parameters</h3>
|
1085 |
-
<div class="subelement argument">
|
1086 |
-
<h4>$rational</h4>
|
1087 |
-
<code>string</code><p>numerator/denominator</p>
|
1088 |
-
</div>
|
1089 |
-
<div class="subelement argument">
|
1090 |
-
<h4>$integer_format</h4>
|
1091 |
-
<code>string</code><p>format for integer values</p></div>
|
1092 |
-
<div class="subelement argument">
|
1093 |
-
<h4>$fraction_format</h4>
|
1094 |
-
<code>string</code><p>format for fractional values from -1 to +1</p>
|
1095 |
-
</div>
|
1096 |
-
<div class="subelement argument">
|
1097 |
-
<h4>$mixed_format</h4>
|
1098 |
-
<code>string</code><p>format for integer.fraction values</p></div>
|
1099 |
-
<h3>Returns</h3>
|
1100 |
-
<div class="subelement response">
|
1101 |
-
<code>mixed</code>formatted value or boolean false if no value available</div>
|
1102 |
-
</div></div>
|
1103 |
-
</div>
|
1104 |
-
<a name="_remove_terms" id="_remove_terms"></a><div class="element clickable method private _remove_terms" data-toggle="collapse" data-target="._remove_terms .collapse">
|
1105 |
-
<h2>Remove terms from an attachment's assignments</h2>
|
1106 |
-
<pre>_remove_terms(integer $post_id, array $terms, object $taxonomy_obj) : array</pre>
|
1107 |
-
<div class="labels"></div>
|
1108 |
-
<div class="row collapse"><div class="detail-description">
|
1109 |
-
<p class="long_description"></p>
|
1110 |
-
<table class="table table-bordered"><tr>
|
1111 |
-
<th>since</th>
|
1112 |
-
<td>0.40</td>
|
1113 |
-
</tr></table>
|
1114 |
-
<h3>Parameters</h3>
|
1115 |
-
<div class="subelement argument">
|
1116 |
-
<h4>$post_id</h4>
|
1117 |
-
<code>integer</code><p>The ID of the attachment to be updated</p></div>
|
1118 |
-
<div class="subelement argument">
|
1119 |
-
<h4>$terms</h4>
|
1120 |
-
<code>array</code><p>The term ids (integer array) or names (string array) to remove</p>
|
1121 |
-
</div>
|
1122 |
-
<div class="subelement argument">
|
1123 |
-
<h4>$taxonomy_obj</h4>
|
1124 |
-
<code>object</code><p>The taxonomy object</p></div>
|
1125 |
-
<h3>Returns</h3>
|
1126 |
-
<div class="subelement response">
|
1127 |
-
<code>array</code>Term ids/names of the surviving terms</div>
|
1128 |
-
</div></div>
|
1129 |
-
</div>
|
1130 |
-
<a name="_set_array_element" id="_set_array_element"></a><div class="element clickable method private _set_array_element" data-toggle="collapse" data-target="._set_array_element .collapse">
|
1131 |
-
<h2>Adds or replaces the value of a key in a possibly nested array structure</h2>
|
1132 |
-
<pre>_set_array_element(string $needle, mixed $value, array $haystack) : boolean</pre>
|
1133 |
-
<div class="labels"></div>
|
1134 |
-
<div class="row collapse"><div class="detail-description">
|
1135 |
-
<p class="long_description"></p>
|
1136 |
-
<table class="table table-bordered"><tr>
|
1137 |
-
<th>since</th>
|
1138 |
-
<td>1.51</td>
|
1139 |
-
</tr></table>
|
1140 |
-
<h3>Parameters</h3>
|
1141 |
-
<div class="subelement argument">
|
1142 |
-
<h4>$needle</h4>
|
1143 |
-
<code>string</code><p>key value, e.g. array1.array2.element</p></div>
|
1144 |
-
<div class="subelement argument">
|
1145 |
-
<h4>$value</h4>
|
1146 |
-
<code>mixed</code><p>replacement value, string or array, by reference</p></div>
|
1147 |
-
<div class="subelement argument">
|
1148 |
-
<h4>$haystack</h4>
|
1149 |
-
<code>array</code><p>PHP nested arrays, by reference</p></div>
|
1150 |
-
<h3>Returns</h3>
|
1151 |
-
<div class="subelement response">
|
1152 |
-
<code>boolean</code>true if $needle element set, false if not</div>
|
1153 |
-
</div></div>
|
1154 |
-
</div>
|
1155 |
-
<a name="_unset_array_element" id="_unset_array_element"></a><div class="element clickable method private _unset_array_element" data-toggle="collapse" data-target="._unset_array_element .collapse">
|
1156 |
-
<h2>Deletes the value of a key in a possibly nested array structure</h2>
|
1157 |
-
<pre>_unset_array_element(string $needle, array $haystack) : boolean</pre>
|
1158 |
-
<div class="labels"></div>
|
1159 |
-
<div class="row collapse"><div class="detail-description">
|
1160 |
-
<p class="long_description"></p>
|
1161 |
-
<table class="table table-bordered"><tr>
|
1162 |
-
<th>since</th>
|
1163 |
-
<td>1.51</td>
|
1164 |
-
</tr></table>
|
1165 |
-
<h3>Parameters</h3>
|
1166 |
-
<div class="subelement argument">
|
1167 |
-
<h4>$needle</h4>
|
1168 |
-
<code>string</code><p>key value, e.g. array1.array2.element</p></div>
|
1169 |
-
<div class="subelement argument">
|
1170 |
-
<h4>$haystack</h4>
|
1171 |
-
<code>array</code><p>PHP nested arrays, by reference</p></div>
|
1172 |
-
<h3>Returns</h3>
|
1173 |
-
<div class="subelement response">
|
1174 |
-
<code>boolean</code>true if $needle element found, false if not</div>
|
1175 |
-
</div></div>
|
1176 |
-
</div>
|
1177 |
-
<h3>
|
1178 |
-
<i class="icon-custom icon-property"></i> Properties</h3>
|
1179 |
-
<a name="%24mla_iptc_keys" id="$mla_iptc_keys"> </a><div class="element clickable property public $mla_iptc_keys" data-toggle="collapse" data-target=".$mla_iptc_keys .collapse">
|
1180 |
-
<h2>IPTC Dataset friendly name/slug and identifiers</h2>
|
1181 |
-
<pre>$mla_iptc_keys : array</pre>
|
1182 |
-
<div class="labels"></div>
|
1183 |
-
<div class="row collapse"><div class="detail-description">
|
1184 |
-
<p class="long_description"><p>This array contains the sanitized names and identifiers of Datasets defined in
|
1185 |
-
the "IPTC-NAA Information Interchange Model Version No. 4.1".</p></p>
|
1186 |
-
<table class="table table-bordered"><tr>
|
1187 |
-
<th>since</th>
|
1188 |
-
<td>0.90</td>
|
1189 |
-
</tr></table>
|
1190 |
-
</div></div>
|
1191 |
</div>
|
1192 |
-
|
1193 |
-
<
|
1194 |
-
<
|
1195 |
-
<div class="
|
1196 |
-
<div class="
|
1197 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html>
|
2 |
+
<html lang="en">
|
3 |
<head>
|
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</title>
|
7 |
+
<meta name="author" content=""/>
|
8 |
+
<meta name="description" content=""/>
|
9 |
+
|
10 |
+
<link href="../css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
|
11 |
+
<link href="../css/font-awesome.min.css" rel="stylesheet">
|
12 |
+
<link href="../css/prism.css" rel="stylesheet" media="all"/>
|
13 |
+
<link href="../css/template.css" rel="stylesheet" media="all"/>
|
14 |
+
|
15 |
+
<!--[if lt IE 9]>
|
16 |
+
<script src="../js/html5.js"></script>
|
17 |
+
<![endif]-->
|
18 |
+
<script src="../js/jquery-1.11.0.min.js"></script>
|
19 |
+
<script src="../js/ui/1.10.4/jquery-ui.min.js"></script>
|
20 |
+
<script src="../js/bootstrap.min.js"></script>
|
21 |
+
<script src="../js/jquery.smooth-scroll.js"></script>
|
22 |
+
<script src="../js/prism.min.js"></script>
|
23 |
+
<!-- TODO: Add http://jscrollpane.kelvinluck.com/ to style the scrollbars for browsers not using webkit-->
|
24 |
+
<script type="text/javascript">
|
25 |
+
function loadExternalCodeSnippets() {
|
26 |
+
Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach(function (pre) {
|
27 |
+
var src = pre.getAttribute('data-src');
|
28 |
+
var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
|
29 |
+
var language = 'php';
|
30 |
+
|
31 |
+
var code = document.createElement('code');
|
32 |
+
code.className = 'language-' + language;
|
33 |
+
|
34 |
+
pre.textContent = '';
|
35 |
+
|
36 |
+
code.textContent = 'Loading…';
|
37 |
+
|
38 |
+
pre.appendChild(code);
|
39 |
+
|
40 |
+
var xhr = new XMLHttpRequest();
|
41 |
+
|
42 |
+
xhr.open('GET', src, true);
|
43 |
+
|
44 |
+
xhr.onreadystatechange = function () {
|
45 |
+
if (xhr.readyState == 4) {
|
46 |
+
|
47 |
+
if (xhr.status < 400 && xhr.responseText) {
|
48 |
+
code.textContent = xhr.responseText;
|
49 |
+
|
50 |
+
Prism.highlightElement(code);
|
51 |
+
}
|
52 |
+
else if (xhr.status >= 400) {
|
53 |
+
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
|
54 |
+
}
|
55 |
+
else {
|
56 |
+
code.textContent = '✖ Error: File does not exist or is empty';
|
57 |
+
}
|
58 |
+
}
|
59 |
+
};
|
60 |
+
|
61 |
+
xhr.send(null);
|
62 |
+
});
|
63 |
+
}
|
64 |
+
|
65 |
+
$(document).ready(function(){
|
66 |
+
loadExternalCodeSnippets();
|
67 |
+
});
|
68 |
+
$('#source-view').on('shown', function () {
|
69 |
+
loadExternalCodeSnippets();
|
70 |
+
})
|
71 |
+
</script>
|
72 |
+
|
73 |
+
<link rel="shortcut icon" href="../images/favicon.ico"/>
|
74 |
+
<link rel="apple-touch-icon" href="../images/apple-touch-icon.png"/>
|
75 |
+
<link rel="apple-touch-icon" sizes="72x72" href="../images/apple-touch-icon-72x72.png"/>
|
76 |
+
<link rel="apple-touch-icon" sizes="114x114" href="../images/apple-touch-icon-114x114.png"/>
|
77 |
</head>
|
78 |
<body>
|
79 |
+
|
80 |
<div class="navbar navbar-fixed-top">
|
81 |
+
<div class="navbar-inner">
|
82 |
+
<div class="container">
|
83 |
+
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
|
84 |
+
<i class="icon-ellipsis-vertical"></i>
|
85 |
+
</a>
|
86 |
+
<a class="brand" href="../index.html">Media Library Assistant</a>
|
87 |
+
|
88 |
+
<div class="nav-collapse">
|
89 |
+
<ul class="nav pull-right">
|
90 |
+
<li class="dropdown" id="charts-menu">
|
91 |
+
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
92 |
+
Charts <b class="caret"></b>
|
93 |
+
</a>
|
94 |
+
<ul class="dropdown-menu">
|
95 |
+
<li>
|
96 |
+
<a href="../graphs/class.html">
|
97 |
+
<i class="icon-list-alt"></i> Class hierarchy diagram
|
98 |
+
</a>
|
99 |
+
</li>
|
100 |
+
</ul>
|
101 |
+
</li>
|
102 |
+
<li class="dropdown" id="reports-menu">
|
103 |
+
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
104 |
+
Reports <b class="caret"></b>
|
105 |
+
</a>
|
106 |
+
<ul class="dropdown-menu">
|
107 |
+
<li>
|
108 |
+
<a href="../reports/errors.html">
|
109 |
+
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">0</span>
|
110 |
+
</a>
|
111 |
+
</li>
|
112 |
+
<li>
|
113 |
+
<a href="../reports/markers.html">
|
114 |
+
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">3</span>
|
115 |
+
</a>
|
116 |
+
</li>
|
117 |
+
<li>
|
118 |
+
<a href="../reports/deprecated.html">
|
119 |
+
<i class="icon-list-alt"></i> Deprecated <span class="label label-info pull-right">0</span>
|
120 |
+
</a>
|
121 |
+
</li>
|
122 |
+
</ul>
|
123 |
+
</li>
|
124 |
+
</ul>
|
125 |
+
</div>
|
126 |
+
</div>
|
127 |
+
</div>
|
128 |
+
<!--<div class="go_to_top">-->
|
129 |
+
<!--<a href="#___" style="color: inherit">Back to top  <i class="icon-upload icon-white"></i></a>-->
|
130 |
+
<!--</div>-->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
131 |
</div>
|
132 |
+
|
133 |
+
<div id="___" class="container-fluid">
|
134 |
+
<section class="row-fluid">
|
135 |
+
<div class="span2 sidebar">
|
136 |
+
<div class="accordion" style="margin-bottom: 0">
|
137 |
+
<div class="accordion-group">
|
138 |
+
<div class="accordion-heading">
|
139 |
+
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1578219847"></a>
|
140 |
+
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
|
141 |
+
</div>
|
142 |
+
<div id="namespace-1578219847" class="accordion-body collapse in">
|
143 |
+
<div class="accordion-inner">
|
144 |
+
|
145 |
+
|
146 |
+
<ul>
|
147 |
+
<li class="class"><a href="../classes/CPAC_Storage_Model_MLA.html">CPAC_Storage_Model_MLA</a></li>
|
148 |
+
<li class="class"><a href="../classes/MLA.html">MLA</a></li>
|
149 |
+
<li class="class"><a href="../classes/MLA_Ajax.html">MLA_Ajax</a></li>
|
150 |
+
<li class="class"><a href="../classes/MLA_Checklist_Walker.html">MLA_Checklist_Walker</a></li>
|
151 |
+
<li class="class"><a href="../classes/MLA_Example_List_Table.html">MLA_Example_List_Table</a></li>
|
152 |
+
<li class="class"><a href="../classes/MLA_List_Table.html">MLA_List_Table</a></li>
|
153 |
+
<li class="class"><a href="../classes/MLA_Polylang.html">MLA_Polylang</a></li>
|
154 |
+
<li class="class"><a href="../classes/MLA_Thumbnail.html">MLA_Thumbnail</a></li>
|
155 |
+
<li class="class"><a href="../classes/MLA_Upgrader_Skin.html">MLA_Upgrader_Skin</a></li>
|
156 |
+
<li class="class"><a href="../classes/MLA_Upload_List_Table.html">MLA_Upload_List_Table</a></li>
|
157 |
+
<li class="class"><a href="../classes/MLA_Upload_Optional_List_Table.html">MLA_Upload_Optional_List_Table</a></li>
|
158 |
+
<li class="class"><a href="../classes/MLA_View_List_Table.html">MLA_View_List_Table</a></li>
|
159 |
+
<li class="class"><a href="../classes/MLA_WPML.html">MLA_WPML</a></li>
|
160 |
+
<li class="class"><a href="../classes/MLA_WPML_List_Table.html">MLA_WPML_List_Table</a></li>
|
161 |
+
<li class="class"><a href="../classes/MLA_WPML_Table.html">MLA_WPML_Table</a></li>
|
162 |
+
<li class="class"><a href="../classes/MLACore.html">MLACore</a></li>
|
163 |
+
<li class="class"><a href="../classes/MLACoreOptions.html">MLACoreOptions</a></li>
|
164 |
+
<li class="class"><a href="../classes/MLAData.html">MLAData</a></li>
|
165 |
+
<li class="class"><a href="../classes/MLAData_Source.html">MLAData_Source</a></li>
|
166 |
+
<li class="class"><a href="../classes/MLAEdit.html">MLAEdit</a></li>
|
167 |
+
<li class="class"><a href="../classes/MLAFileDownloader.html">MLAFileDownloader</a></li>
|
168 |
+
<li class="class"><a href="../classes/MLAImageProcessor.html">MLAImageProcessor</a></li>
|
169 |
+
<li class="class"><a href="../classes/MLAMime.html">MLAMime</a></li>
|
170 |
+
<li class="class"><a href="../classes/MLAModal.html">MLAModal</a></li>
|
171 |
+
<li class="class"><a href="../classes/MLAModal_Ajax.html">MLAModal_Ajax</a></li>
|
172 |
+
<li class="class"><a href="../classes/MLAMutex.html">MLAMutex</a></li>
|
173 |
+
<li class="class"><a href="../classes/MLAObjects.html">MLAObjects</a></li>
|
174 |
+
<li class="class"><a href="../classes/MLAOptions.html">MLAOptions</a></li>
|
175 |
+
<li class="class"><a href="../classes/MLAPDF.html">MLAPDF</a></li>
|
176 |
+
<li class="class"><a href="../classes/MLAQuery.html">MLAQuery</a></li>
|
177 |
+
<li class="class"><a href="../classes/MLAReferences.html">MLAReferences</a></li>
|
178 |
+
<li class="class"><a href="../classes/MLASettings.html">MLASettings</a></li>
|
179 |
+
<li class="class"><a href="../classes/MLAShortcode_Support.html">MLAShortcode_Support</a></li>
|
180 |
+
<li class="class"><a href="../classes/MLAShortcodes.html">MLAShortcodes</a></li>
|
181 |
+
<li class="class"><a href="../classes/MLATemplate_Support.html">MLATemplate_Support</a></li>
|
182 |
+
<li class="class"><a href="../classes/MLATest.html">MLATest</a></li>
|
183 |
+
<li class="class"><a href="../classes/MLATextWidget.html">MLATextWidget</a></li>
|
184 |
+
<li class="class"><a href="../classes/MLAUninstall.html">MLAUninstall</a></li>
|
185 |
+
</ul>
|
186 |
+
</div>
|
187 |
+
</div>
|
188 |
+
</div>
|
189 |
+
</div>
|
190 |
+
|
191 |
+
</div>
|
192 |
+
</section>
|
193 |
+
<section class="row-fluid">
|
194 |
+
<div class="span10 offset2">
|
195 |
+
<div class="row-fluid">
|
196 |
+
<div class="span8 content class">
|
197 |
+
<nav>
|
198 |
+
<a href="../namespaces/default.html">\</a> <i class="icon-level-up"></i>
|
199 |
+
</nav>
|
200 |
+
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal"><i class="icon-code"></i></a>
|
201 |
+
|
202 |
+
<h1><small>\</small>MLAData</h1>
|
203 |
+
<p><em>Class MLA (Media Library Assistant) Data provides database and template file access for MLA needs</em></p>
|
204 |
+
<p>The _template functions are inspired by the book "WordPress 3 Plugin Development Essentials."
|
205 |
+
Templates separate HTML markup from PHP code for easier maintenance and localization.</p>
|
206 |
+
|
207 |
+
|
208 |
+
<section id="summary">
|
209 |
+
<h2>Summary</h2>
|
210 |
+
<section class="row-fluid heading">
|
211 |
+
<section class="span4">
|
212 |
+
<a href="#methods">Methods</a>
|
213 |
+
</section>
|
214 |
+
<section class="span4">
|
215 |
+
<a href="#properties">Properties</a>
|
216 |
+
</section>
|
217 |
+
<section class="span4">
|
218 |
+
<a href="#constants">Constants</a>
|
219 |
+
</section>
|
220 |
+
</section>
|
221 |
+
<section class="row-fluid public">
|
222 |
+
<section class="span4">
|
223 |
+
<a href="../classes/MLAData.html#method_initialize" class="">initialize()</a><br />
|
224 |
+
<a href="../classes/MLAData.html#method_mla_parse_array_template" class="">mla_parse_array_template()</a><br />
|
225 |
+
<a href="../classes/MLAData.html#method_mla_parse_template" class="">mla_parse_template()</a><br />
|
226 |
+
<a href="../classes/MLAData.html#method_mla_apply_field_level_format" class="">mla_apply_field_level_format()</a><br />
|
227 |
+
<a href="../classes/MLAData.html#method_mla_expand_field_level_parameters" class="">mla_expand_field_level_parameters()</a><br />
|
228 |
+
<a href="../classes/MLAData.html#method_mla_get_template_placeholders" class="">mla_get_template_placeholders()</a><br />
|
229 |
+
<a href="../classes/MLAData.html#method_mla_count_list_table_items" class="">mla_count_list_table_items()</a><br />
|
230 |
+
<a href="../classes/MLAData.html#method_mla_query_list_table_items" class="">mla_query_list_table_items()</a><br />
|
231 |
+
<a href="../classes/MLAData.html#method_mla_get_attachment_by_id" class="">mla_get_attachment_by_id()</a><br />
|
232 |
+
<a href="../classes/MLAData.html#method_mla_find_array_element" class="">mla_find_array_element()</a><br />
|
233 |
+
<a href="../classes/MLAData.html#method_mla_save_post_action" class="">mla_save_post_action()</a><br />
|
234 |
+
<a href="../classes/MLAData.html#method_mla_parse_pdf_date" class="">mla_parse_pdf_date()</a><br />
|
235 |
+
<a href="../classes/MLAData.html#method_mla_parse_xmp_metadata" class="">mla_parse_xmp_metadata()</a><br />
|
236 |
+
<a href="../classes/MLAData.html#method_mla_iptc_metadata_value" class="">mla_iptc_metadata_value()</a><br />
|
237 |
+
<a href="../classes/MLAData.html#method_mla_exif_metadata_value" class="">mla_exif_metadata_value()</a><br />
|
238 |
+
<a href="../classes/MLAData.html#method_mla_xmp_metadata_value" class="">mla_xmp_metadata_value()</a><br />
|
239 |
+
<a href="../classes/MLAData.html#method_mla_id3_metadata_value" class="">mla_id3_metadata_value()</a><br />
|
240 |
+
<a href="../classes/MLAData.html#method_mla_pdf_metadata_value" class="">mla_pdf_metadata_value()</a><br />
|
241 |
+
<a href="../classes/MLAData.html#method_mla_IPTC_EXIF_error_handler" class="">mla_IPTC_EXIF_error_handler()</a><br />
|
242 |
+
<a href="../classes/MLAData.html#method_mla_fetch_attachment_id3_metadata" class="">mla_fetch_attachment_id3_metadata()</a><br />
|
243 |
+
<a href="../classes/MLAData.html#method_mla_fetch_attachment_image_metadata" class="">mla_fetch_attachment_image_metadata()</a><br />
|
244 |
+
<a href="../classes/MLAData.html#method_mla_update_wp_attachment_metadata" class="">mla_update_wp_attachment_metadata()</a><br />
|
245 |
+
<a href="../classes/MLAData.html#method_mla_update_item_postmeta" class="">mla_update_item_postmeta()</a><br />
|
246 |
+
<a href="../classes/MLAData.html#method_mla_update_single_item" class="">mla_update_single_item()</a><br />
|
247 |
+
<a href="../classes/MLAData.html#method_mla_hex_dump" class="">mla_hex_dump()</a><br />
|
248 |
+
</section>
|
249 |
+
<section class="span4">
|
250 |
+
<a href="../classes/MLAData.html#property_query_parameters" class="">$query_parameters</a><br />
|
251 |
+
<a href="../classes/MLAData.html#property_search_parameters" class="">$search_parameters</a><br />
|
252 |
+
<a href="../classes/MLAData.html#property_utf8_chars" class="">$utf8_chars</a><br />
|
253 |
+
|