Version Description
- New: For the Media/Assistant submenu table, the QuickTags editor can be added to the Description field of the Bulk Edit area. Check the "QuickTags editor for bulk description" box in the "Table Defaults" section on the Settings/Media Library Assistant General tab to activate this feature.
- New: A new "MLA Custom Feed Example" plugin has been added. It allows you to configure and process custom RSS feeds for Media Library items.
- New: A new "MLA Subscriber Media Access Example" plugin has been added. It allows "owner only" access to the Media Library for the Subscriber role.
- New: A new "Smart Media Categories" example plugin has been added. It allows you to automatically assign taxonomy terms to Media Library items based on the terms of their parent post/page or custom post type.
- New: A new "MLA Multisite Extensions" example plugin has been added. It provides an [mla_gallery] parameter to query multiple blogs/sites in a multisite installation.
- New: For
[mla_gallery]
, a newno.terms.assigned
taxonomy query option lets you find items that have no terms assigned in one or more taxonomies. Details are in the "Simple Taxonomy Parameters" and "Taxonomy Queries, the tax_query" sections of the Documentation tab. - New: For
[mla_term_list]
, a newactive_item_class
parameter and item-specific substitution parameter have been added. An item is "active" if it or any of its child items are the current item. - New: For the MLA Text Widget a new option, "Add .textwidget div tags", has been provided to control the addition of
<div class="textwidget"></div>
tags to the body of the widget. The default value is true/checked, to preserve compatibility with existing widgets. - New: Six new hooks have been added to the "MLA Taxonomy Filters and Actions (Hooks)". Details have been added to
/examples/plugins/mla-taxonomy-hooks-example.php
. The hooks let you modify the registration details for the Att. Categories and/or Att. Tags custom taxonomies. - New: New hooks,
mla_gallery_initial_item_values
andmla_gallery_pagination_values
, have been added to the "MLA Gallery Filters and Actions (Hooks)". Details have been added to/examples/plugins/mla-hooks-example.php
. - New: A new hook,
mla_taxonomy_column_final
, has been added to the "Media/Assistant Submenu Actions and Filters (Hooks)". Details have been added to/examples/plugins/mla-list-table-hooks-example.php
. - New: The pdpDocs API documentation has been removed from the plugin files and moved to the plugin's web site. This reduces the plugin's space requirements while preserving access to the documentation.
- New: A statement about custom templates and option settings being preserved over version upgrades has been added to the FAQ section.
- Fix: For Visual Composer, a PHP Fatal Error that occurred when "Template Preview" was invoked has been eliminated.
- Fix: For
[mla_tag_cloud]
, theorder=none
parameter is now handled correctly. - Fix: For
[mla_tag_cloud]
, the "no_count=true" parameter no longer generates WordPress deprecation messages. - Fix: Registration of the Att. Categories and Att. Tags taxonomies is now done earlier ("init" action, priority 5) so they are available for use in other theme/plugin code during the "init" action.
- Fix: When the Media/Assistant submenu screen is displayed, the menu label is bolded when it appears in the default location, e.g., as the last submenu entry.
- Fix: When WPML is active, new flat taxonomy (e.g. Att, Tags) values can be created in the Quick Edit and Bulk Edit areas as well as the ATTACHMENT DETAILS pane of the Media Manager Modal (popup) Window.
- Fix: When WPML 3.8 or later is active, "All Languages" display is restored to the Media/Assistant admin submenu.
- Fix: When WPML or Polylang is active, Media/Assistant submenu table columns are properly populated after a "Set Parent" table row refresh.
- Fix: When WPML or Polylang is active, a PHP 7.X Notice regarding indirect variable evaluation has been eliminated.
- Fix: When WPML is active, the term-specific language code has been added to the links in the "Attachments" column.
- Fix: For the Media/Taxonomy Edit screens, the "Attachments" column gives accurate results when the WPML or Polylang current language is changed.
- Fix: For Media/Assistant custom field table views, JSON encoding has replaced PHP serialization to avoid a security vulnerability.
- Fix: On the Settings/Media Library Assistant Debug tab, the "OLD PHP error_log" value has been corrected.
Download this release
Release Info
Developer | dglingren |
Plugin | Media Library Assistant |
Version | 2.61 |
Comparing to | |
See all releases |
Code changes from version 2.60 to 2.61
- css/mla-style-rtl.css +4 -0
- css/mla-style.css +4 -0
- examples/plugins/mla-custom-feed-example/admin-settings-page.tpl +707 -0
- examples/plugins/mla-custom-feed-example/mla-custom-feed-example.php +2541 -0
- examples/plugins/mla-custom-feed-example/mla-custom-feed-template.php +137 -0
- examples/plugins/mla-hooks-example.php +39 -4
- examples/plugins/mla-list-table-hooks-example.php +27 -4
- examples/plugins/mla-login-filtered-gallery-example.php +54 -15
- examples/plugins/mla-multisite-extensions.php +541 -0
- examples/plugins/mla-subscriber-media-access-example.php +194 -0
- examples/plugins/mla-taxonomy-hooks-example.php +165 -0
- phpDocs/js/jqplot/gpl-2.0.txt → examples/plugins/smart-media-categories/LICENSE.txt +67 -8
- examples/plugins/smart-media-categories/admin/assets/css/index.php +1 -0
- examples/plugins/smart-media-categories/admin/assets/css/smc-admin.css +3 -0
- examples/plugins/smart-media-categories/admin/assets/css/smc-posts-pages.css +564 -0
- examples/plugins/smart-media-categories/admin/assets/js/index.php +1 -0
- examples/plugins/smart-media-categories/admin/assets/js/smc-admin.js +10 -0
- examples/plugins/smart-media-categories/admin/assets/js/smc-admin.min.js +10 -0
- examples/plugins/smart-media-categories/admin/assets/js/smc-find-posts.js +209 -0
- examples/plugins/smart-media-categories/admin/assets/js/smc-find-posts.min.js +209 -0
- examples/plugins/smart-media-categories/admin/assets/js/smc-sync-posts.js +214 -0
- examples/plugins/smart-media-categories/admin/assets/js/smc-sync-posts.min.js +214 -0
- examples/plugins/smart-media-categories/admin/class-smart-media-categories-admin.php +1315 -0
- examples/plugins/smart-media-categories/admin/includes/class-smc-automatic-support.php +999 -0
- examples/plugins/smart-media-categories/admin/includes/class-smc-settings-support.php +455 -0
- examples/plugins/smart-media-categories/admin/includes/class-smc-sync-support.php +631 -0
- examples/plugins/smart-media-categories/admin/includes/index.php +1 -0
- examples/plugins/smart-media-categories/admin/views/index.php +1 -0
- examples/plugins/smart-media-categories/admin/views/smc-admin.php +25 -0
- examples/plugins/smart-media-categories/admin/views/smc-posts-modal-form.php +77 -0
- examples/plugins/smart-media-categories/admin/views/smc-sync-category-block.php +21 -0
- examples/plugins/smart-media-categories/admin/views/smc-sync-category-fieldset.php +12 -0
- examples/plugins/smart-media-categories/admin/views/smc-sync-div.php +39 -0
- examples/plugins/smart-media-categories/admin/views/smc-sync-tag-block.php +16 -0
- examples/plugins/smart-media-categories/admin/views/smc-sync-tag-fieldset.php +12 -0
- examples/plugins/smart-media-categories/admin/views/smc-sync-tax-options.php +11 -0
- examples/plugins/smart-media-categories/assets/index.php +1 -0
- examples/plugins/smart-media-categories/includes/index.php +1 -0
- examples/plugins/smart-media-categories/index.php +1 -0
- examples/plugins/smart-media-categories/languages/index.php +1 -0
- examples/plugins/smart-media-categories/languages/smart-media-categories.pot +31 -0
- examples/plugins/smart-media-categories/public/assets/css/index.php +1 -0
- examples/plugins/smart-media-categories/public/assets/css/public.css +1 -0
- examples/plugins/smart-media-categories/public/assets/index.php +1 -0
- examples/plugins/smart-media-categories/public/assets/js/index.php +1 -0
- examples/plugins/smart-media-categories/public/assets/js/public.js +10 -0
- examples/plugins/smart-media-categories/public/class-smart-media-categories.php +385 -0
- examples/plugins/smart-media-categories/public/includes/index.php +1 -0
- examples/plugins/smart-media-categories/public/views/index.php +1 -0
- examples/plugins/smart-media-categories/public/views/public.php +16 -0
- examples/plugins/smart-media-categories/smart-media-categories.php +89 -0
- examples/plugins/smart-media-categories/uninstall.php +17 -0
- includes/class-mla-ajax.php +16 -2
- includes/class-mla-core-options.php +14 -1
- includes/class-mla-core.php +16 -10
- includes/class-mla-data-query.php +161 -199
- includes/class-mla-list-table.php +11 -11
- includes/class-mla-main.php +28 -9
- includes/class-mla-mime-types.php +24 -42
- includes/class-mla-objects.php +74 -34
- includes/class-mla-polylang-support.php +26 -44
- includes/class-mla-settings-custom-fields-tab.php +10 -48
- includes/class-mla-settings-documentation-tab.php +10 -47
- includes/class-mla-settings-iptc-exif-tab.php +9 -69
- includes/class-mla-settings-shortcodes-tab.php +8 -33
- includes/class-mla-settings-upload-tab.php +4 -30
- includes/class-mla-settings-view-tab.php +2 -15
- includes/class-mla-shortcode-support.php +181 -200
- includes/class-mla-thumbnail-generation.php +4 -1
- includes/class-mla-wpml-support.php +155 -106
- index.php +1 -1
- js/mla-inline-edit-scripts.js +20 -0
- js/mla-inline-edit-scripts.min.js +1 -1
- languages/media-library-assistant-en_US - References.pot +911 -897
- languages/media-library-assistant-en_US.po +13 -2
- languages/media-library-assistant-en_US.pot +12 -1
- phpDocs/classes.svg +0 -586
- phpDocs/classes/ACP_Addon_MLA_Column_AltText.html +0 -239
- phpDocs/classes/ACP_Addon_MLA_Column_Author.html +0 -274
- phpDocs/classes/ACP_Addon_MLA_Column_Caption.html +0 -239
- phpDocs/classes/ACP_Addon_MLA_Column_Date.html +0 -238
- phpDocs/classes/ACP_Addon_MLA_Column_Description.html +0 -274
- phpDocs/classes/ACP_Addon_MLA_Column_MenuOrder.html +0 -274
- phpDocs/classes/ACP_Addon_MLA_Column_MimeType.html +0 -274
- phpDocs/classes/ACP_Addon_MLA_Column_Parent.html +0 -238
- phpDocs/classes/ACP_Addon_MLA_Column_Title.html +0 -274
- phpDocs/classes/ACP_Addon_MLA_Editing_Model_Media_Title.html +0 -238
- phpDocs/classes/ACP_Addon_MLA_Editing_Strategy.html +0 -242
- phpDocs/classes/AC_Addon_MLA_ListScreen.html +0 -648
- phpDocs/classes/CPAC_Deprecated_Storage_Model_MLA.html +0 -697
- phpDocs/classes/MLA.html +0 -898
css/mla-style-rtl.css
CHANGED
@@ -106,6 +106,10 @@ div.mla_errors {
|
|
106 |
margin-right: 6em
|
107 |
}
|
108 |
|
|
|
|
|
|
|
|
|
109 |
.quick-edit-row-attachment fieldset.inline-edit-col-left label.inline-edit-post-parent span.input-text-wrap,
|
110 |
.bulk-edit-row-attachment fieldset.inline-edit-col-right label.inline-edit-post-parent span.input-text-wrap {
|
111 |
width: 5em
|
106 |
margin-right: 6em
|
107 |
}
|
108 |
|
109 |
+
.bulk-edit-row-attachment fieldset.inline-edit-col-right label.inline-edit-post-content textarea.wp-editor-area {
|
110 |
+
height: auto
|
111 |
+
}
|
112 |
+
|
113 |
.quick-edit-row-attachment fieldset.inline-edit-col-left label.inline-edit-post-parent span.input-text-wrap,
|
114 |
.bulk-edit-row-attachment fieldset.inline-edit-col-right label.inline-edit-post-parent span.input-text-wrap {
|
115 |
width: 5em
|
css/mla-style.css
CHANGED
@@ -106,6 +106,10 @@ div.mla_errors {
|
|
106 |
margin-left: 6em
|
107 |
}
|
108 |
|
|
|
|
|
|
|
|
|
109 |
.quick-edit-row-attachment fieldset.inline-edit-col-left label.inline-edit-post-parent span.input-text-wrap,
|
110 |
.bulk-edit-row-attachment fieldset.inline-edit-col-right label.inline-edit-post-parent span.input-text-wrap {
|
111 |
width: 5em
|
106 |
margin-left: 6em
|
107 |
}
|
108 |
|
109 |
+
.bulk-edit-row-attachment fieldset.inline-edit-col-right label.inline-edit-post-content textarea.wp-editor-area {
|
110 |
+
height: auto
|
111 |
+
}
|
112 |
+
|
113 |
.quick-edit-row-attachment fieldset.inline-edit-col-left label.inline-edit-post-parent span.input-text-wrap,
|
114 |
.bulk-edit-row-attachment fieldset.inline-edit-col-right label.inline-edit-post-parent span.input-text-wrap {
|
115 |
width: 5em
|
examples/plugins/mla-custom-feed-example/admin-settings-page.tpl
ADDED
@@ -0,0 +1,707 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!-- template="page" -->
|
2 |
+
<a name="backtotop"></a>
|
3 |
+
|
4 |
+
<div class="wrap">
|
5 |
+
<h1 class="wp-heading-inline">MLA Custom Feed Example [+version+] Settings</h1>
|
6 |
+
[+messages+]
|
7 |
+
[+tablist+]
|
8 |
+
[+tab_content+]
|
9 |
+
</div><!-- wrap -->
|
10 |
+
|
11 |
+
<!-- template="tablist" -->
|
12 |
+
<h2 class="nav-tab-wrapper">
|
13 |
+
[+tablist+]
|
14 |
+
</h2>
|
15 |
+
<!-- template="tablist-item" -->
|
16 |
+
<a data-tab-id="[+data-tab-id+]" class="nav-tab [+nav-tab-active+]" href="?page=[+settings-page+]&mla_tab=[+data-tab-id+]">[+title+]</a>
|
17 |
+
|
18 |
+
<!-- template="messages" -->
|
19 |
+
<div class="[+mla_messages_class+]">
|
20 |
+
<p>
|
21 |
+
[+messages+]
|
22 |
+
</p>
|
23 |
+
[+dismiss_button+]
|
24 |
+
</div>
|
25 |
+
|
26 |
+
<!-- template="page-level-options" -->
|
27 |
+
<tr valign="top"><td class="textright">
|
28 |
+
<input name="mla_enable_custom_feeds" id="mla_enable_custom_feeds" type="checkbox" [+enable_custom_feeds_checked+] value="1">
|
29 |
+
</td><td>
|
30 |
+
<strong>Enable custom feed processing</strong>
|
31 |
+
<div class="mla-settings-help"> Check this option to add the (active) custom feeds to the WordPress feeds list.</div>
|
32 |
+
</td></tr>
|
33 |
+
|
34 |
+
|
35 |
+
<!-- template="parent-select" -->
|
36 |
+
<select name="mla_add_custom_feed[parent]" id="mla-custom-feed-parent">
|
37 |
+
[+options+]
|
38 |
+
</select>
|
39 |
+
|
40 |
+
<!-- template="single-item-edit" -->
|
41 |
+
<h2>Edit Feed</h2>
|
42 |
+
<form action="[+form_url+]" method="post" class="validate" id="mla-edit-custom-feed">
|
43 |
+
<input name="mla_edit_custom_feed[post_ID]" id="mla-custom-feed-post-ID" type="hidden" value="[+post_ID+]" />
|
44 |
+
<input name="mla_edit_custom_feed[old_slug]" id="mla-custom-feed-old-slug" type="hidden" value="[+old_slug+]" />
|
45 |
+
[+_wpnonce+]
|
46 |
+
<table class="form-table" id="mla-edit-custom-feed-table">
|
47 |
+
<tbody>
|
48 |
+
<tr class="form-field custom-feed-slug-wrap">
|
49 |
+
<th scope="row"> <label for="mla-custom-feed-slug">Slug</label>
|
50 |
+
</th>
|
51 |
+
<td><input name="mla_edit_custom_feed[slug]" id="mla-custom-feed-slug" type="text" value="[+slug+]" /></td>
|
52 |
+
</tr>
|
53 |
+
<tr class="form-field custom-feed-type-wrap">
|
54 |
+
<th scope="row"> <label for="mla-custom-feed-type">Feed Type</label>
|
55 |
+
</th>
|
56 |
+
<td><select name="mla_edit_custom_feed[type]" id="mla-custom-feed-type">
|
57 |
+
<option [+rss_selected+] value="rss">RSS</option>
|
58 |
+
<option [+rss2_selected+] value="rss2">RSS2</option>
|
59 |
+
<option [+rss_http_selected+] value="rss-http">RSS-HTTP</option>
|
60 |
+
</select></td>
|
61 |
+
</tr>
|
62 |
+
<tr class="form-field custom-feed-title-wrap">
|
63 |
+
<th scope="row"> <label for="mla-custom-feed-title">Title</label>
|
64 |
+
</th>
|
65 |
+
<td><input name="mla_edit_custom_feed[title]" id="mla-custom-feed-title" type="text" value="" /></td>
|
66 |
+
</tr>
|
67 |
+
<tr class="form-field custom-feed-link-wrap">
|
68 |
+
<th scope="row"> <label for="mla-custom-link-slug">Link</label>
|
69 |
+
</th>
|
70 |
+
<td><input name="mla_edit_custom_feed[link]" id="mla-custom-feed-link" type="text" value="" /></td>
|
71 |
+
</tr>
|
72 |
+
<tr class="form-field custom-feed-description-wrap">
|
73 |
+
<th scope="row"> <label for="mla-custom-feed-description">Description</label>
|
74 |
+
</th>
|
75 |
+
<td><input name="mla_edit_custom_feed[description]" id="mla-custom-feed-description" type="text" value="" /></td>
|
76 |
+
</tr>
|
77 |
+
<tr class="form-field custom-feed-last_build_date-wrap">
|
78 |
+
<th scope="row"> <label for="mla-custom-feed-last_build_date">Last Built</label>
|
79 |
+
</th>
|
80 |
+
<td><select name="mla_edit_custom_feed[last_build_date]" id="mla-custom-feed-last_build_date">
|
81 |
+
<option [+current_selected+] value="current">Current</option>
|
82 |
+
<option [+modified_selected+] value="modified">Modified</option>
|
83 |
+
</select></td>
|
84 |
+
</tr>
|
85 |
+
<tr class="form-field custom-feed-ttl-wrap">
|
86 |
+
<th scope="row"> <label for="mla-custom-feed-ttl">TTL</label>
|
87 |
+
</th>
|
88 |
+
<td><input name="mla_edit_custom_feed[ttl]" id="mla-custom-feed-ttl" type="text" value="[+ttl+]" />
|
89 |
+
<p class="description"> Leave empty to omit this tag and use update period.</p></td>
|
90 |
+
</tr>
|
91 |
+
<tr class="form-field custom-feed-update-period-wrap">
|
92 |
+
<th scope="row"> <label for="mla-custom-feed-update-period">Upd. Period</label>
|
93 |
+
</th>
|
94 |
+
<td><select name="mla_edit_custom_feed[update_period]" id="mla-custom-feed-update-period">
|
95 |
+
<option [+none_selected+] value="none">None</option>
|
96 |
+
<option [+hourly_selected+] value="hourly">Hourly</option>
|
97 |
+
<option [+daily_selected+] value="daily">Daily</option>
|
98 |
+
<option [+weekly_selected+] value="weekly">Weekly</option>
|
99 |
+
<option [+monthly_selected+] value="monthly">Monthly</option>
|
100 |
+
<option [+yearly_selected+] value="yearly">Yearly</option>
|
101 |
+
</select></td>
|
102 |
+
</tr>
|
103 |
+
<tr class="form-field custom-feed-update-frequency-wrap">
|
104 |
+
<th scope="row"> <label for="mla-custom-feed-update-frequency">Upd. Frequency</label>
|
105 |
+
</th>
|
106 |
+
<td><input name="mla_edit_custom_feed[update_frequency]" id="mla-custom-feed-update-frequency" type="text" value="[+update_frequency+]" /></td>
|
107 |
+
</tr>
|
108 |
+
<tr class="form-field custom-feed-update-base-wrap">
|
109 |
+
<th scope="row"> <label for="mla-custom-feed-update-base">Upd. Base</label>
|
110 |
+
</th>
|
111 |
+
<td><input name="mla_edit_custom_feed[update_base]" id="mla-custom-feed-update-base" type="text" value="[+update_base+]" />
|
112 |
+
<p class="description"> Base date/time for Update schedule.</p></td>
|
113 |
+
</tr>
|
114 |
+
<tr class="form-field custom-feed-taxonomies-wrap">
|
115 |
+
<th scope="row"> <label for="mla-custom-feed-taxonomies">Taxonomies</label>
|
116 |
+
</th>
|
117 |
+
<td><input name="mla_edit_custom_feed[taxonomies]" id="mla-custom-feed-taxonomies" type="text" value="[+taxonomies+]" /></td>
|
118 |
+
</tr>
|
119 |
+
<tr class="form-field custom-feed-parameters-wrap">
|
120 |
+
<th scope="row"> <label for="mla-custom-feed-parameters">Parameters</label>
|
121 |
+
</th>
|
122 |
+
<td><input name="mla_edit_custom_feed[parameters]" id="mla-custom-feed-parameters" type="text" value="[+parameters+]" /></td>
|
123 |
+
</tr>
|
124 |
+
<tr class="form-field custom-feed-template-slug-wrap">
|
125 |
+
<th scope="row"> <label for="mla-custom-feed-template-slug">Tpl. Slug</label>
|
126 |
+
</th>
|
127 |
+
<td><input name="mla_edit_custom_feed[template_slug]" id="mla-custom-feed-template-slug" type="text" value="[+template_slug+]" /></td>
|
128 |
+
</tr>
|
129 |
+
<tr class="form-field custom-feed-template-name-wrap">
|
130 |
+
<th scope="row"> <label for="mla-custom-feed-template-name">Tpl. Name</label>
|
131 |
+
</th>
|
132 |
+
<td><input name="mla_edit_custom_feed[template_name]" id="mla-custom-feed-template-name" type="text" value="[+template_name+]" /></td>
|
133 |
+
</tr>
|
134 |
+
<tr class="form-field custom-feed-status-wrap">
|
135 |
+
<th scope="row"> <label for="mla-custom-feed-status">Status</label>
|
136 |
+
</th>
|
137 |
+
<td><select name="mla_edit_custom_feed[status]" id="mla-custom-feed-status">
|
138 |
+
<option [+active_selected+] value="1">Active</option>
|
139 |
+
<option [+inactive_selected+] value="">Inactive</option>
|
140 |
+
</select></td>
|
141 |
+
</tr>
|
142 |
+
</tbody>
|
143 |
+
</table>
|
144 |
+
<p class="submit mla-settings-submit">
|
145 |
+
<input name="mla-edit-custom-feed-cancel" class="button-secondary" id="mla-edit-custom-feed-cancel" type="submit" value="Cancel" />
|
146 |
+
|
147 |
+
<input name="mla-edit-custom-feed-submit" class="button-primary" name="mla-edit-custom-feed-submit" type="submit" value="Update" />
|
148 |
+
</p>
|
149 |
+
</form>
|
150 |
+
|
151 |
+
<!-- template="before-table" -->
|
152 |
+
<h2>Custom Feed Processing Options</h2>
|
153 |
+
<p>In this tab you can define custom RSS feeds to be added to the WordPress feed list.</p>
|
154 |
+
<p>You can find more information about using the features of this tab in the Documentation tab on this screen.</p>
|
155 |
+
<div id="ajax-response"></div>
|
156 |
+
<form action="[+form_url+]" method="get" id="mla-search-custom-feed-form">
|
157 |
+
<input type="hidden" name="page" value="mlafeed-settings-general" />
|
158 |
+
<input type="hidden" name="mla_tab" value="general" />
|
159 |
+
[+view_args+]
|
160 |
+
[+_wpnonce+] <span style="margin-top: 1em">
|
161 |
+
<input name="mla-search-custom-feed-submit" class="button alignright" id="mla-search-custom-feed-submit" type="submit" value="Search Feeds" />
|
162 |
+
<label class="screen-reader-text" for="mla-search-custom-feed-input">Search Feeds Text:</label>
|
163 |
+
<input name="s" class="alignright" id="mla-search-custom-feed-input" type="search" value="[+s+]" />
|
164 |
+
[+results+] </span>
|
165 |
+
</form>
|
166 |
+
<br class="clear" />
|
167 |
+
<div id="col-container">
|
168 |
+
<div id="col-right">
|
169 |
+
<div class="col-wrap">
|
170 |
+
<form action="[+form_url+]" method="post" id="mla-search-custom-feed-filter">
|
171 |
+
<input type="hidden" name="page" value="mlafeed-settings-general" />
|
172 |
+
<input type="hidden" name="mla_tab" value="general" />
|
173 |
+
[+view_args+]
|
174 |
+
[+_wpnonce+]
|
175 |
+
|
176 |
+
<!-- template="after-table" -->
|
177 |
+
</form>
|
178 |
+
<!-- /id=mla-search-custom-feed-filter -->
|
179 |
+
</div>
|
180 |
+
<!-- /col-wrap -->
|
181 |
+
</div>
|
182 |
+
<!-- /col-right -->
|
183 |
+
<style type='text/css'>
|
184 |
+
.mla-settings-help {
|
185 |
+
font-size: 8pt;
|
186 |
+
padding-bottom: 5px
|
187 |
+
}
|
188 |
+
|
189 |
+
.mla-settings-enable-form {
|
190 |
+
margin-left: 0px;
|
191 |
+
margin-top: 10px;
|
192 |
+
padding-bottom: 10px;
|
193 |
+
border-bottom:thin solid #888888;
|
194 |
+
}
|
195 |
+
|
196 |
+
span.submit.mla-settings-submit,
|
197 |
+
p.submit.mla-settings-submit {
|
198 |
+
padding-bottom: 0px
|
199 |
+
}
|
200 |
+
.
|
201 |
+
mla-settings-enable-form {
|
202 |
+
margin-left: 0px;
|
203 |
+
margin-top: 10px;
|
204 |
+
padding-bottom: 10px;
|
205 |
+
border-bottom:thin solid #888888;
|
206 |
+
}
|
207 |
+
|
208 |
+
#mla-add-custom-feed-table {
|
209 |
+
margin-bottom: 15px;
|
210 |
+
}
|
211 |
+
|
212 |
+
#mla-add-custom-feed-table th {
|
213 |
+
padding: 5px 5px 5px 0px;
|
214 |
+
width: 10px;
|
215 |
+
}
|
216 |
+
|
217 |
+
#mla-add-custom-feed-table td {
|
218 |
+
padding: 5px 0px 5px 0px;
|
219 |
+
}
|
220 |
+
|
221 |
+
#mla-add-custom-feed-table input[type="text"],
|
222 |
+
#mla-add-custom-feed-table select {
|
223 |
+
width: 100%;
|
224 |
+
}
|
225 |
+
</style>
|
226 |
+
<div id="col-left">
|
227 |
+
<div class="col-wrap">
|
228 |
+
<div class="mla-settings-enable-form">
|
229 |
+
<form action="[+form_url+]" method="post" class="mla-display-settings-page" id="mla-display-settings-custom-feed-tab">
|
230 |
+
<table class="optiontable">
|
231 |
+
<tbody>
|
232 |
+
[+options_list+]
|
233 |
+
</tbody>
|
234 |
+
</table>
|
235 |
+
<span class="submit mla-settings-submit">
|
236 |
+
<input name="mla-custom-feed-options-save" class="button-primary" id="mla-custom-feed-options-save" type="submit" value="Save Changes" />
|
237 |
+
</span>
|
238 |
+
[+_wpnonce+]
|
239 |
+
</form>
|
240 |
+
</div>
|
241 |
+
<div class="form-wrap">
|
242 |
+
<h2>Add New Feed</h2>
|
243 |
+
<p>Field definitions and rules are in the Documentation tab.</p>
|
244 |
+
<form action="[+form_url+]" method="post" class="validate" id="mla-add-custom-feed">
|
245 |
+
<input type="hidden" name="page" value="mlafeed-settings-general" />
|
246 |
+
<input type="hidden" name="mla_tab" value="general" />
|
247 |
+
[+_wpnonce+]
|
248 |
+
<table class="form-table" id="mla-add-custom-feed-table">
|
249 |
+
<tbody>
|
250 |
+
<tr class="form-field custom-feed-slug-wrap">
|
251 |
+
<th scope="row"> <label for="mla-custom-feed-slug">Slug</label>
|
252 |
+
</th>
|
253 |
+
<td><input name="mla_add_custom_feed[slug]" id="mla-custom-feed-slug" type="text" value="" /></td>
|
254 |
+
</tr>
|
255 |
+
<tr class="form-field custom-feed-type-wrap">
|
256 |
+
<th scope="row"> <label for="mla-custom-feed-type">Feed Type</label>
|
257 |
+
</th>
|
258 |
+
<td><select name="mla_add_custom_feed[type]" id="mla-custom-feed-type">
|
259 |
+
<option value="rss">RSS</option>
|
260 |
+
<option selected="selected" value="rss2">RSS2</option>
|
261 |
+
<option value="rss-http">RSS-HTTP</option>
|
262 |
+
</select></td>
|
263 |
+
</tr>
|
264 |
+
<tr class="form-field custom-feed-title-wrap">
|
265 |
+
<th scope="row"> <label for="mla-custom-feed-title">Title</label>
|
266 |
+
</th>
|
267 |
+
<td><input name="mla_add_custom_feed[title]" id="mla-custom-feed-title" type="text" value="" /></td>
|
268 |
+
</tr>
|
269 |
+
<tr class="form-field custom-feed-link-wrap">
|
270 |
+
<th scope="row"> <label for="mla-custom-link-slug">Link</label>
|
271 |
+
</th>
|
272 |
+
<td><input name="mla_add_custom_feed[link]" id="mla-custom-feed-link" type="text" value="" /></td>
|
273 |
+
</tr>
|
274 |
+
<tr class="form-field custom-feed-description-wrap">
|
275 |
+
<th scope="row"> <label for="mla-custom-feed-description">Description</label>
|
276 |
+
</th>
|
277 |
+
<td><input name="mla_add_custom_feed[description]" id="mla-custom-feed-description" type="text" value="" /></td>
|
278 |
+
</tr>
|
279 |
+
<tr class="form-field custom-feed-last_build_date-wrap">
|
280 |
+
<th scope="row"> <label for="mla-custom-feed-last_build_date">Last Built</label>
|
281 |
+
</th>
|
282 |
+
<td><select name="mla_add_custom_feed[last_build_date]" id="mla-custom-feed-last_build_date">
|
283 |
+
<option selected="selected" value="current">Current</option>
|
284 |
+
<option value="modified">Modified</option>
|
285 |
+
</select></td>
|
286 |
+
</tr>
|
287 |
+
<tr class="form-field custom-feed-ttl-wrap">
|
288 |
+
<th scope="row"> <label for="mla-custom-feed-ttl">TTL</label>
|
289 |
+
</th>
|
290 |
+
<td><input name="mla_add_custom_feed[ttl]" id="mla-custom-feed-ttl" type="text" value="" />
|
291 |
+
<p class="description"> Leave empty to omit this tag and use update period.</p></td>
|
292 |
+
</tr>
|
293 |
+
<tr class="form-field custom-feed-update-period-wrap">
|
294 |
+
<th scope="row"> <label for="mla-custom-feed-update-period">Upd. Period</label>
|
295 |
+
</th>
|
296 |
+
<td><select name="mla_add_custom_feed[update_period]" id="mla-custom-feed-update-period">
|
297 |
+
<option value="none">None</option>
|
298 |
+
<option selected="selected" value="hourly">Hourly</option>
|
299 |
+
<option value="daily">Daily</option>
|
300 |
+
<option value="weekly">Weekly</option>
|
301 |
+
<option value="monthly">Monthly</option>
|
302 |
+
<option value="yearly">Yearly</option>
|
303 |
+
</select></td>
|
304 |
+
</tr>
|
305 |
+
<tr class="form-field custom-feed-update-frequency-wrap">
|
306 |
+
<th scope="row"> <label for="mla-custom-feed-update-frequency">Upd. Frequency</label>
|
307 |
+
</th>
|
308 |
+
<td><input name="mla_add_custom_feed[update_frequency]" id="mla-custom-feed-update-frequency" type="text" value="1" /></td>
|
309 |
+
</tr>
|
310 |
+
<tr class="form-field custom-feed-update-base-wrap">
|
311 |
+
<th scope="row"> <label for="mla-custom-feed-update-base">Upd. Base</label>
|
312 |
+
</th>
|
313 |
+
<td><input name="mla_add_custom_feed[update_base]" id="mla-custom-feed-update-base" type="text" value="2000-01-01T12:00+00:00" />
|
314 |
+
<p class="description"> Base date/time for Update schedule.</p></td>
|
315 |
+
</tr>
|
316 |
+
<tr class="form-field custom-feed-taxonomies-wrap">
|
317 |
+
<th scope="row"> <label for="mla-custom-feed-taxonomies">Taxonomies</label>
|
318 |
+
</th>
|
319 |
+
<td><input name="mla_add_custom_feed[taxonomies]" id="mla-custom-feed-taxonomies" type="text" value="" /></td>
|
320 |
+
</tr>
|
321 |
+
<tr class="form-field custom-feed-parameters-wrap">
|
322 |
+
<th scope="row"> <label for="mla-custom-feed-parameters">Parameters</label>
|
323 |
+
</th>
|
324 |
+
<td><input name="mla_add_custom_feed[parameters]" id="mla-custom-feed-parameters" type="text" value="post_parent=all posts_per_page=6" /></td>
|
325 |
+
</tr>
|
326 |
+
<tr class="form-field custom-feed-template-slug-wrap">
|
327 |
+
<th scope="row"> <label for="mla-custom-feed-template-slug">Tpl. Slug</label>
|
328 |
+
</th>
|
329 |
+
<td><input name="mla_add_custom_feed[template_slug]" id="mla-custom-feed-template-slug" type="text" value="" /></td>
|
330 |
+
</tr>
|
331 |
+
<tr class="form-field custom-feed-template-name-wrap">
|
332 |
+
<th scope="row"> <label for="mla-custom-feed-template-name">Tpl. Name</label>
|
333 |
+
</th>
|
334 |
+
<td><input name="mla_add_custom_feed[template_name]" id="mla-custom-feed-template-name" type="text" value="" /></td>
|
335 |
+
</tr>
|
336 |
+
<tr class="form-field custom-feed-status-wrap">
|
337 |
+
<th scope="row"> <label for="mla-custom-feed-status">Status</label>
|
338 |
+
</th>
|
339 |
+
<td><select name="mla_add_custom_feed[status]" id="mla-custom-feed-status">
|
340 |
+
<option selected="selected" value="1">Active</option>
|
341 |
+
<option value="">Inactive</option>
|
342 |
+
</select></td>
|
343 |
+
</tr>
|
344 |
+
</tbody>
|
345 |
+
</table>
|
346 |
+
<p class="submit mla-settings-submit">
|
347 |
+
<input name="mla-add-custom-feed-submit" class="button button-primary" id="mla-add-custom-feed-submit" type="submit" value="Add Feed" />
|
348 |
+
</p>
|
349 |
+
</form>
|
350 |
+
<!-- /id=mla-add-custom-feed -->
|
351 |
+
</div>
|
352 |
+
<!-- /form-wrap -->
|
353 |
+
</div>
|
354 |
+
<!-- /col-wrap -->
|
355 |
+
</div>
|
356 |
+
<!-- /col-left -->
|
357 |
+
</div>
|
358 |
+
<!-- /col-container -->
|
359 |
+
|
360 |
+
<!-- template="debug-tab" -->
|
361 |
+
<h2>[+Debug Options+]</h2>
|
362 |
+
<form action="[+form_url+]" method="post" class="mla-display-settings-page" id="mla-display-settings-debug-tab">
|
363 |
+
<br />
|
364 |
+
<table class="optiontable">
|
365 |
+
[+options_list+]
|
366 |
+
</table>
|
367 |
+
<h3>[+Debug Settings+]</h3>
|
368 |
+
<table class="optiontable">
|
369 |
+
[+settings_list+]
|
370 |
+
</table>
|
371 |
+
<h3>[+Error Log+]</h3>
|
372 |
+
[+Error Log Name+] ( [+Error Log Size+] )
|
373 |
+
<table>
|
374 |
+
<tr>
|
375 |
+
<td>
|
376 |
+
<textarea name="" id="mla-error-log-display" rows="24" cols="100" readonly="readonly">[+error_log_text+]</textarea>
|
377 |
+
</td>
|
378 |
+
</tr>
|
379 |
+
<tr>
|
380 |
+
<td>
|
381 |
+
[+download_link+] [+reset_link+]
|
382 |
+
</td>
|
383 |
+
</tr>
|
384 |
+
</table>
|
385 |
+
<p class="submit mla-settings-submit">
|
386 |
+
<input name="mla-debug-options-save" class="button-primary" id="mla-debug-options-save" type="submit" value="[+Save Changes+]" />
|
387 |
+
</p>
|
388 |
+
<div class="mla-settings-help">[+Click Save Changes+]</div>
|
389 |
+
[+_wpnonce+]
|
390 |
+
[+_wp_http_referer+]
|
391 |
+
</form>
|
392 |
+
|
393 |
+
<!-- template="documentation-tab" -->
|
394 |
+
<h2>Plugin Documentation. In this tab, jump to:</h2>
|
395 |
+
<style type='text/css'>
|
396 |
+
.mla-doc-toc-list {
|
397 |
+
list-style-position:inside;
|
398 |
+
list-style:disc;
|
399 |
+
line-height: 15px;
|
400 |
+
padding-left: 20px
|
401 |
+
}
|
402 |
+
|
403 |
+
.mla-doc-hook-label {
|
404 |
+
text-align: right;
|
405 |
+
padding: 0 1em 2em 0;
|
406 |
+
vertical-align: top;
|
407 |
+
font-weight:bold
|
408 |
+
}
|
409 |
+
|
410 |
+
.mla-doc-hook-definition {
|
411 |
+
vertical-align: top;
|
412 |
+
}
|
413 |
+
|
414 |
+
.mla-doc-table-label {
|
415 |
+
text-align: right;
|
416 |
+
padding-right: 10px;
|
417 |
+
vertical-align: top;
|
418 |
+
font-weight:bold
|
419 |
+
}
|
420 |
+
|
421 |
+
.mla-doc-table-sublabel {
|
422 |
+
padding-right: 10px;
|
423 |
+
vertical-align: top
|
424 |
+
}
|
425 |
+
|
426 |
+
.mla-doc-table-reverse {
|
427 |
+
text-align: right;
|
428 |
+
padding-right: 10px;
|
429 |
+
vertical-align:top
|
430 |
+
}
|
431 |
+
|
432 |
+
.mla-doc-table-definition {
|
433 |
+
vertical-align: top;
|
434 |
+
}
|
435 |
+
|
436 |
+
.mla-doc-bold-link {
|
437 |
+
font-size:14px;
|
438 |
+
font-weight:bold
|
439 |
+
}
|
440 |
+
</style>
|
441 |
+
<div class="mla-display-settings-page" id="mla-display-settings-documentation-tab" style="width:700px">
|
442 |
+
<ul class="mla-doc-toc-list">
|
443 |
+
<li><a href="#introduction"><strong>Introduction</strong></a></li>
|
444 |
+
<li><a href="#defining"><strong>Defining Your Feeds</strong></a></li>
|
445 |
+
<ul class="mla-doc-toc-list">
|
446 |
+
<li><a href="#elements">Feed Elements</a></li>
|
447 |
+
<li><a href="#taxonomies">Taxonomies</a></li>
|
448 |
+
<li><a href="#parameters">Data Selection Parameters</a></li>
|
449 |
+
</ul>
|
450 |
+
<li><a href="#managing"><strong>Managing Your Feeds</strong></a></li>
|
451 |
+
<li><a href="#feed-templates"><strong>Feed Templates</strong></a></li>
|
452 |
+
<ul class="mla-doc-toc-list">
|
453 |
+
<li><a href="#default-template">Default Template</a></li>
|
454 |
+
<li><a href="#theme-template">Theme-based Templates</a></li>
|
455 |
+
</ul>
|
456 |
+
<li><a href="#accessing"><strong>Accessing Your Feeds</strong></a></li>
|
457 |
+
<ul class="mla-doc-toc-list">
|
458 |
+
<li><a href="#url-slug">URL-based slugs</a></li>
|
459 |
+
<li><a href="#query-slug">HTML Query Parameter slugs</a></li>
|
460 |
+
<li><a href="#tax-arguments">Taxonomy Arguments</a></li>
|
461 |
+
<li><a href="#query-parms">Other HTML Query Arguments</a></li>
|
462 |
+
</ul>
|
463 |
+
</ul>
|
464 |
+
<a name="introduction"></a>
|
465 |
+
<p>
|
466 |
+
<a href="#backtotop">Go to Top</a>
|
467 |
+
</p>
|
468 |
+
<h3>Introduction</h3>
|
469 |
+
<p>
|
470 |
+
This example plugin lets you define one or more WordPress RSS feeds that return Media Library items filtered by the data selection parameters supported in the <code>[mla_gallery]</code> shortcode. You can define as many feeds as you like, each with different parameters and other settings.
|
471 |
+
</p>
|
472 |
+
<p>
|
473 |
+
You can find more general information in the <a href="https://codex.wordpress.org/WordPress_Feeds" title="WordPress Feeds codex article" target="_blank">WordPress Feeds</a> and <a href="https://codex.wordpress.org/Customizing_Feeds" title="WordPress Feeds codex article" target="_blank">Customizing Feeds</a> codex articles. Other resources include:
|
474 |
+
</p>
|
475 |
+
<ul class="mla-doc-toc-list">
|
476 |
+
<li><a href="http://www.rssboard.org/rss-specification" target="_blank">RSS 2.0 Specification</a></li>
|
477 |
+
<li><a href="http://www.rssboard.org/rss-profile" target="_blank">Really Simple Syndication Best Practices Profile</a></li>
|
478 |
+
<li><a href="http://www.feedforall.com/syndication.htm" target="_blank">FeedForAll Syndication Extension</a></li>
|
479 |
+
<li><a href="http://web.resource.org/rss/1.0/modules/syndication/" target="_blank">RDF Site Summary 1.0 Modules: Syndication</a></li>
|
480 |
+
<li><a href="https://codex.wordpress.org/WordPress_Feeds#More_Information_and_Resources" target="_blank">More WordPress Information</a></li>
|
481 |
+
</ul>
|
482 |
+
<p>
|
483 |
+
The basic idea is quite simple. You define a feed and give it a name, or "feed slug", such as "mlafeed". You specify MLA data selection parameters that define which Media Library items are part of the feed. When a feed reader accesses the feed, the data selection parameters are executed and the items are returned in a format that the feed reader can process.
|
484 |
+
<a name="#defining"></a>
|
485 |
+
</p>
|
486 |
+
<p>
|
487 |
+
<a href="#backtotop">Go to Top</a>
|
488 |
+
</p>
|
489 |
+
<h3><strong>Defining Your Feeds</strong></h3>
|
490 |
+
<p>
|
491 |
+
You can define a new feed, also known as an RSS "channel" using the "Add New Feed" area at the left of the Settings/MLA Feed admin screen. Simply fill in the field values you want and click "Add Feed" at the bottom of the area. The new feed will be added to the submenu table in the right-hand side of the screen. If you set the "Active" status the feed will be added to the WordPress feed list.
|
492 |
+
<a name="#elements"></a>
|
493 |
+
</p>
|
494 |
+
<p>
|
495 |
+
<a href="#backtotop">Go to Top</a>
|
496 |
+
</p>
|
497 |
+
<h4>Feed Elements</h4>
|
498 |
+
<p>
|
499 |
+
Each RSS feed, or channel, is defined by an XML-based document that contains a number of data elements for the channel and each of the items it contains. The MLA Custom Feed Example Plugin contains a PHP file that generates the document when the channel is accessed. You can modify or replace the PHP file to customize any aspect of the feed, but the Feed Elements described here give you an easy way to adjust the most common elements without any coding.
|
500 |
+
</p>
|
501 |
+
<table>
|
502 |
+
<tr>
|
503 |
+
<td class="mla-doc-table-label">Slug</td>
|
504 |
+
<td>is the feed/channel "name", the identifier for the feed. It will become part of the URL that is used to access the feed, so it is sanitized by translating all letters to lowercase and spaces to dashes; punctuation is removed. The slug must be unique.</td>
|
505 |
+
</tr>
|
506 |
+
<tr>
|
507 |
+
<td class="mla-doc-table-label">Feed Type</td>
|
508 |
+
<td>selects a mime-type for the "Content-Type:" HTML header. Acceptable values are "RSS", "RSS2" or "RSS-HTTP"; the default value is "RSS". The "RSS-HTTP" type can be helpful for testing; it will usually make the browser display the feed content in the browser window.</td>
|
509 |
+
</tr>
|
510 |
+
<tr>
|
511 |
+
<td class="mla-doc-table-label">Title</td>
|
512 |
+
<td>The name of the channel. It's how people refer to your service. If you have an HTML website that contains the same information as your RSS file, the title of your channel should be the same as the title of your website.</td>
|
513 |
+
</tr>
|
514 |
+
<tr>
|
515 |
+
<td class="mla-doc-table-label">Link</td>
|
516 |
+
<td>The URL to the HTML website corresponding to the channel.</td>
|
517 |
+
</tr>
|
518 |
+
<tr>
|
519 |
+
<td class="mla-doc-table-label">Description</td>
|
520 |
+
<td>Phrase or sentence describing the channel.</td>
|
521 |
+
</tr>
|
522 |
+
<tr>
|
523 |
+
<td class="mla-doc-table-label">Last Built</td>
|
524 |
+
<td>The last time the content of the channel changed. You can select the current date and time, i.e., the time when the channel is accessed, or the most recent "modified" date for items in the channel.</td>
|
525 |
+
</tr>
|
526 |
+
<tr>
|
527 |
+
<td class="mla-doc-table-label">TTL</td>
|
528 |
+
<td>TTL stands for time to live. It's a number of minutes that indicates how long a channel can be cached before refreshing from the source. If you leave this field blank the TTL field will not be added to the channel and the Update Period, Frequency and Base fields will be used instead.</td>
|
529 |
+
</tr>
|
530 |
+
<tr>
|
531 |
+
<td class="mla-doc-table-label">Upd. Period</td>
|
532 |
+
<td>The interval or units used by the "Update Frequency" element and is explained in more detail in it's description. Possible values: 'hourly', 'daily', 'weekly', 'monthly', or 'yearly'.</td>
|
533 |
+
</tr>
|
534 |
+
<tr>
|
535 |
+
<td class="mla-doc-table-label">Upd. Frequency</td>
|
536 |
+
<td>How often the feed is typically updated. This helps some automated systems that access RSS feeds to know when it should check back for updates. The "Update Frequency" and the "Update Period" are used together. For example if your RSS feed is typically updated every other week, you would set the "Update Period" to 'weekly' and the "Update Frequency" to '2'.</td>
|
537 |
+
</tr>
|
538 |
+
<tr>
|
539 |
+
<td class="mla-doc-table-label">Upd. Base</td>
|
540 |
+
<td>The date and time that the update interval should be calculated from. For example if a feed's "Update Period" is 'yearly' and its "Update Frequency" is '1' , the reading application won't know from what date it should use to calculate a year from, to then look for an update. The date/time format is in W3CDTF format (ie. 2006-01-25+14:00+02:00)</td>
|
541 |
+
</tr>
|
542 |
+
<tr>
|
543 |
+
<td class="mla-doc-table-label">Taxonomies</td>
|
544 |
+
<td>Each item can have one or more "Category" elements. More information is in the <a href="#taxonomies">Taxonomies</a> section below.</td>
|
545 |
+
</tr>
|
546 |
+
<tr>
|
547 |
+
<td class="mla-doc-table-label">Parameters</td>
|
548 |
+
<td>The data selection parameters used to select items for the channel. More information is in the <a href="#parameters">Data Selection Parameters</a> section below.</td>
|
549 |
+
</tr>
|
550 |
+
<tr>
|
551 |
+
<td class="mla-doc-table-label">Tpl. Slug</td>
|
552 |
+
<td>The "slug" portion of a custom WordPress template in your theme files. More information is in the <a href="#theme-template">Theme-based Templates</a> section below.</td>
|
553 |
+
</tr>
|
554 |
+
<tr>
|
555 |
+
<td class="mla-doc-table-label">Tpl. Name</td>
|
556 |
+
<td>The "name" portion of a custom WordPress template in your theme files. More information is in the <a href="#theme-template">Theme-based Templates</a> section below.</td>
|
557 |
+
</tr>
|
558 |
+
<tr>
|
559 |
+
<td class="mla-doc-table-label">Status</td>
|
560 |
+
<td>You can select "Active" to include the channel in the WordPress feed list or "Inactive" to leave it out of the list. This is an easy way to keep a channel from being accessed but leave its definition in place for future use.</td>
|
561 |
+
</tr>
|
562 |
+
</table>
|
563 |
+
<p>
|
564 |
+
|
565 |
+
<a name="#taxonomies"></a>
|
566 |
+
</p>
|
567 |
+
<p>
|
568 |
+
<a href="#backtotop">Go to Top</a>
|
569 |
+
</p>
|
570 |
+
<h4>Taxonomies</h4>
|
571 |
+
<p>
|
572 |
+
Each item can be classified by one or more "Category" elements. You can name the taxonomies that these elements will be taken from, e.g., <code>attachment_category</code>. Multiple taxonomies can be named, separated by commas. When the item is added to a feed the plugin will retrieve all the terms assigned to the item, de-duplicate them and add them to the item in the feed.
|
573 |
+
<a name="#parameters"></a>
|
574 |
+
</p>
|
575 |
+
<p>
|
576 |
+
<a href="#backtotop">Go to Top</a>
|
577 |
+
</p>
|
578 |
+
<h4>Data Selection Parameters</h4>
|
579 |
+
<p>
|
580 |
+
The Data selection Parameters are the most important element of each feed. The example plugin uses the same MLA code that composes galleries for <code>[mla_gallery]</code>. For example, you can use <code>post_mime_type=application/pdf</code> to get a feed of your PDF documents. Author, taxonomy, date/time, custom field and keyword/term search parameters are all accepted.
|
581 |
+
</p>
|
582 |
+
<p>
|
583 |
+
A common use of selection parameters is to select items from one or more terms assigned to a taxonomy. WordPress includes code to extract taxonomy and term values from the feed url. The example plugin will copy these values into the data selection parameters for your feed. Let's say you want to select the items assigned to the "abc" term in the Att. Categories taxonomy. You can use a content template to add these values to your Data Selection Parameters for a feed you have named "mlafeed":
|
584 |
+
</p>
|
585 |
+
<code>[+template:((attachment_category=[+request:attachment_category+])|(attachment_category=[+query:attachment_category+])|post_parent=all)+] posts_per_page=6</code>
|
586 |
+
<p>
|
587 |
+
With the above template you can access the feed in different ways:
|
588 |
+
</p>
|
589 |
+
<ul>
|
590 |
+
<li><code>http://www.example.com/?attachment_category=abc&feed=mlafeed</code></li>
|
591 |
+
<li><code>http://www.example.com/attachment_category/abc/mlafeed</code></li>
|
592 |
+
<li><code>http://www.example.com/mlafeed/?attachment_category=abc</code></li>
|
593 |
+
</ul>
|
594 |
+
<p>
|
595 |
+
Of course, you could also code the taxonomy and term values explicitly in the Data Selection parameters, e.g.,<br /> <br />
|
596 |
+
<code>attachment_category=abc posts_per_page=6</code><br /> <br />
|
597 |
+
and then just use the feed name to access it.
|
598 |
+
<a name="#managing"></a>
|
599 |
+
</p>
|
600 |
+
<p>
|
601 |
+
<a href="#backtotop">Go to Top</a>
|
602 |
+
</p>
|
603 |
+
<h3><strong>Managing Your Feeds</strong></h3>
|
604 |
+
<p>
|
605 |
+
Managing your feeds is just like managing posts, pages and Media Library items:
|
606 |
+
</p>
|
607 |
+
<ul class="mla-doc-toc-list">
|
608 |
+
<li>You can select the fields you want to display by clicking the "Screen Options" drop down and checking the boxes next to the field name(s)</li>
|
609 |
+
<li>You can change the number of feeds per page by clicking the "Screen Options" drop down, entering a new value for "Feeds per page:" and clicking "Apply"</li>
|
610 |
+
<li>You can filter the list of feed by entering a key word and clicking the "Search Feeds" button</li>
|
611 |
+
<li>You can show just Active or Inactive feeds by selecting a Status value and clicking "Filter"</li>
|
612 |
+
<li>You can delete several feeds at once by checking the box to the left of the slug, selecting the "Delete" Bulk Action and clicking "Apply"</li>
|
613 |
+
<li>You can edit a feed or delete it by hovering over the feed Slug and clicking the rollover action that appears under the slug value</li>
|
614 |
+
</ul>
|
615 |
+
<a name="#feed-templates"></a>
|
616 |
+
</p>
|
617 |
+
<p>
|
618 |
+
<a href="#backtotop">Go to Top</a>
|
619 |
+
</p>
|
620 |
+
<h3><strong>Feed Templates</strong></h3>
|
621 |
+
<p>
|
622 |
+
The example plugin uses a PHP feed template file to display its feeds, in much the same way as WordPress uses theme templates to display your content. The feed template is located in the plugin's root directory. It is possible to use custom feed templates to achieve a theme-based solution (see further information and links below) or change which template is used on a feed-by-feed basis.
|
623 |
+
<a name="#default-template"></a>
|
624 |
+
</p>
|
625 |
+
<p>
|
626 |
+
<a href="#backtotop">Go to Top</a>
|
627 |
+
</p>
|
628 |
+
<h4>Default Template</h4>
|
629 |
+
<p>
|
630 |
+
The example plugin includes a default template file modeled on the WordPress <code>feed-rss2.php</code> file. This file, <code>/plugins//mla-custom-feed-example/mla-custom-feed-template.php</code>, is in the root directory of the example plugin. You can use this file as a model for your own theme-based custom templates.
|
631 |
+
<p>
|
632 |
+
The default file uses a number of fields defined in the Feed Elements section above. In the code you can see these as elements of the "active feed" array, such as <code>MLACustomFeedExample::$active_feed['title']</code>. The file also has a traditional WordPress "loop" to process the items selected by the data selection parameters:<br /> <br />
|
633 |
+
<code>while ( MLACustomFeedExample::$wp_query_object->have_posts() ) : MLACustomFeedExample::$wp_query_object->the_post();</code><br /> <br />
|
634 |
+
You can use all of the WordPress template tags to access item values within the "loop".
|
635 |
+
<a name="#theme-template"></a>
|
636 |
+
</p>
|
637 |
+
<p>
|
638 |
+
<a href="#backtotop">Go to Top</a>
|
639 |
+
</p>
|
640 |
+
<h4>Theme-based Templates</h4>
|
641 |
+
<p>
|
642 |
+
You can create your own template file and add it to your theme or child theme. Defining your own template file goves you complete control over the feed content.
|
643 |
+
</p>
|
644 |
+
<p>
|
645 |
+
If you define your own template file you can substitute it for the default file by filling in the "Tpl. Slug" and optionally the "Tpl. Name" fields in the Add New Theme area. For example, let's say you have created a template file:<br /> <br />
|
646 |
+
<code>/wp-content/themes/my-theme/mlafeed-authors.php</code><br /> <br />
|
647 |
+
You can access the template by entering:<br /> <br />
|
648 |
+
Tpl. Slug: mlafeed<br />
|
649 |
+
Tpl. Name: authors<br /> <br />
|
650 |
+
in the Add New Feed area.
|
651 |
+
<a name="#accessing"></a>
|
652 |
+
</p>
|
653 |
+
<p>
|
654 |
+
<a href="#backtotop">Go to Top</a>
|
655 |
+
</p>
|
656 |
+
<h3><strong>Accessing Your Feeds</strong></h3>
|
657 |
+
<p>
|
658 |
+
Accessing your custom feeds follows several rules defined by WordPress. The "Slug" that you use to name your feed(s) is the most important element, but WordPress has some additional rules for formatting URLs that contain taxonomy arguments as well.
|
659 |
+
<a name="#url-slug"></a>
|
660 |
+
</p>
|
661 |
+
<p>
|
662 |
+
<a href="#backtotop">Go to Top</a>
|
663 |
+
</p>
|
664 |
+
<h4>URL-based slugs</h4>
|
665 |
+
<p>
|
666 |
+
If your site uses Custom/Pretty Permalinks you can use the feed slug as part of the URL. For example, the "mlafeed" feed can be accessed as:<br /> <br />
|
667 |
+
<code>http://www.example.com/mlafeed/</code><br />
|
668 |
+
|
669 |
+
<a name="#query-slug"></a>
|
670 |
+
</p>
|
671 |
+
<p>
|
672 |
+
<a href="#backtotop">Go to Top</a>
|
673 |
+
</p>
|
674 |
+
<h4>HTML Query Argument slugs</h4>
|
675 |
+
<p>
|
676 |
+
No matter what permalink structure you use you can always specify a feed using a query argument, e.g.,<br /> <br />
|
677 |
+
<code>http://www.example.com/?feed=mlafeed</code><br />
|
678 |
+
|
679 |
+
<a name="#tax-arguments"></a>
|
680 |
+
</p>
|
681 |
+
<p>
|
682 |
+
<a href="#backtotop">Go to Top</a>
|
683 |
+
</p>
|
684 |
+
<h4>Taxonomy Arguments</h4>
|
685 |
+
<p>
|
686 |
+
You can provide feeds for specific taxonomy terms as part of the URL or as an HTML query argument:<br /> <br />
|
687 |
+
<code>http://l.mladev/attachment_tag/abc,def/mlafeed/</code><br />
|
688 |
+
<code>http://l.mladev/mlafeed/?attachment_tag=abc,def</code><br />
|
689 |
+
</p>
|
690 |
+
<p>
|
691 |
+
Passing the parameter values into your data selection parameters is different for each case. For the URL case WordPress parses the URL components into the database query parameters and you can access the value as <code>[+query:attachment_tag+]</code>. If you choose the HTML query argument format the value will be available in the "request:" area, i.e., <code>[+request:attachment_tag+]</code>. I regret the confusing prefix values but that's how it works.
|
692 |
+
</p>
|
693 |
+
<p>
|
694 |
+
<a name="#query-parms"></a>
|
695 |
+
</p>
|
696 |
+
<p>
|
697 |
+
<a href="#backtotop">Go to Top</a>
|
698 |
+
</p>
|
699 |
+
<h4>Other HTML Query Arguments</h4>
|
700 |
+
<p>
|
701 |
+
You can pass any other parameters you need as query arguments following the basic URL components, e.g.<br /> <br />
|
702 |
+
<code>http://l.mladev/attachment_tag/abc,def/mlafeed/?author=johnsmith</code><br />
|
703 |
+
<br />
|
704 |
+
The above example would select all items "owned" by John Smith and assigned to the "abc" or "def" terms in the Att. Tags taxonomy. The corresponding data selection parameters in the "mlafeed" would be:<br /> <br />
|
705 |
+
<code>attachment_tag=[+query:attachment_tag+] author=[+request:author+]</code><br />
|
706 |
+
<br />
|
707 |
+
</div>
|
examples/plugins/mla-custom-feed-example/mla-custom-feed-example.php
ADDED
@@ -0,0 +1,2541 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Configures and processes custom RSS2 feeds for Media Library items
|
4 |
+
*
|
5 |
+
* In this example custom RSS feeds returning Media Library items can be defined by options
|
6 |
+
* on a Settings/MLA Feed submenu page. For example:
|
7 |
+
*
|
8 |
+
* Parameters: post_parent=all posts_per_page=6 attachment_category="[+template:([+request:mla-term+])+]"
|
9 |
+
* Taxonomies: attachment_category,attachment_tag
|
10 |
+
*
|
11 |
+
* With the above parameters, a category-specific feed would be:
|
12 |
+
* http://l.mladev/mlafeed/?mla-term=abc
|
13 |
+
* or
|
14 |
+
* http://l.mladev/?feed=mlafeed&mla-term=abc
|
15 |
+
*
|
16 |
+
* Created for support topic "Create a feed out of the media library"
|
17 |
+
* opened on 8/21/2017 by "lwcorp".
|
18 |
+
* https://wordpress.org/support/topic/create-a-feed-out-of-the-media-library/
|
19 |
+
*
|
20 |
+
* @package MLA Custom Feed Example
|
21 |
+
* @version 1.10
|
22 |
+
*/
|
23 |
+
|
24 |
+
/*
|
25 |
+
Plugin Name: MLA Custom Feed Example
|
26 |
+
Plugin URI: http://fairtradejudaica.org/media-library-assistant-a-wordpress-plugin/
|
27 |
+
Description: Configures and processes custom RSS2 feeds for Media Library items
|
28 |
+
Author: David Lingren
|
29 |
+
Version: 1.10
|
30 |
+
Author URI: http://fairtradejudaica.org/our-story/staff/
|
31 |
+
|
32 |
+
Copyright 2017 David Lingren
|
33 |
+
|
34 |
+
This program is free software; you can redistribute it and/or modify
|
35 |
+
it under the terms of the GNU General Public License as published by
|
36 |
+
the Free Software Foundation; either version 2 of the License, or
|
37 |
+
(at your option) any later version.
|
38 |
+
|
39 |
+
This program is distributed in the hope that it will be useful,
|
40 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
41 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
42 |
+
GNU General Public License for more details.
|
43 |
+
|
44 |
+
You can get a copy of the GNU General Public License by writing to the
|
45 |
+
Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
|
46 |
+
*/
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Class MLA Custom Feed Example adjusts the [mla_gallery] posts_per_page value based on
|
50 |
+
* WordPress conditional functions
|
51 |
+
*
|
52 |
+
* @package MLA Custom Feed Example
|
53 |
+
* @since 1.00
|
54 |
+
*/
|
55 |
+
class MLACustomFeedExample {
|
56 |
+
/**
|
57 |
+
* Current version number
|
58 |
+
*
|
59 |
+
* @since 1.00
|
60 |
+
*
|
61 |
+
* @var string
|
62 |
+
*/
|
63 |
+
const CURRENT_VERSION = '1.10';
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Slug prefix for registering and enqueueing submenu pages, style sheets, scripts and settings
|
67 |
+
*
|
68 |
+
* @since 1.00
|
69 |
+
*
|
70 |
+
* @var string
|
71 |
+
*/
|
72 |
+
const SLUG_PREFIX = 'mlafeed';
|
73 |
+
|
74 |
+
/**
|
75 |
+
* Initialization function, similar to __construct()
|
76 |
+
*
|
77 |
+
* @since 1.00
|
78 |
+
*
|
79 |
+
* @return void
|
80 |
+
*/
|
81 |
+
public static function initialize() {
|
82 |
+
//error_log( __LINE__ . ' MLACustomFeedExample::initialize $_REQUEST = ' . var_export( $_REQUEST, true ), 0 );
|
83 |
+
|
84 |
+
// Set the appropriate hooks depending on admin or front-end mode
|
85 |
+
if ( is_admin() ) {
|
86 |
+
add_action( 'admin_menu', 'MLACustomFeedExample::admin_menu' );
|
87 |
+
add_filter( 'set-screen-option', 'MLACustomFeedExample::mla_set_screen_option', 10, 3 );
|
88 |
+
add_filter( 'screen_options_show_screen', 'MLACustomFeedExample::mla_screen_options_show_screen', 10, 2 );
|
89 |
+
} else {
|
90 |
+
if ( MLA_Custom_Feed_Query::get_option('add_mlafeeds') ) {
|
91 |
+
$slugs = MLA_Custom_Feed_Query::mla_custom_feed_slugs('active');
|
92 |
+
foreach ( $slugs as $ID => $slug ) {
|
93 |
+
//error_log( __LINE__ . ' MLACustomFeedExample::initialize adding feed ' . $slug, 0 );
|
94 |
+
add_feed( $slug, 'MLACustomFeedExample::mla_custom_feed' );
|
95 |
+
}
|
96 |
+
}
|
97 |
+
}
|
98 |
+
}
|
99 |
+
|
100 |
+
/**
|
101 |
+
* Add submenu page in the "Settings" section
|
102 |
+
*
|
103 |
+
* @since 1.00
|
104 |
+
*/
|
105 |
+
public static function admin_menu( ) {
|
106 |
+
/*
|
107 |
+
* We need a tab-specific page ID to manage the screen options on the General tab.
|
108 |
+
* Use the URL suffix, if present. If the URL doesn't have a tab suffix, use '-general'.
|
109 |
+
* This hack is required to pass the WordPress "referer" validation.
|
110 |
+
*/
|
111 |
+
if ( isset( $_REQUEST['page'] ) && is_string( $_REQUEST['page'] ) && ( MLACustomFeedExample::SLUG_PREFIX . '-settings-' == substr( $_REQUEST['page'], 0, strlen( MLACustomFeedExample::SLUG_PREFIX . '-settings-' ) ) ) ) {
|
112 |
+
$tab = substr( $_REQUEST['page'], strlen( MLACustomFeedExample::SLUG_PREFIX . '-settings-' ) );
|
113 |
+
} else {
|
114 |
+
$tab = 'general';
|
115 |
+
}
|
116 |
+
|
117 |
+
$tab = self::_get_options_tablist( $tab ) ? '-' . $tab : '-general';
|
118 |
+
$current_page_hook = add_submenu_page( 'options-general.php', 'MLA Custom Feed Example', 'MLA Feed', 'manage_options', MLACustomFeedExample::SLUG_PREFIX . '-settings' . $tab, 'MLACustomFeedExample::add_submenu_page' );
|
119 |
+
add_action( 'load-' . $current_page_hook, 'MLACustomFeedExample::mla_add_menu_options' );
|
120 |
+
add_filter( 'plugin_action_links', 'MLACustomFeedExample::plugin_action_links', 10, 2 );
|
121 |
+
}
|
122 |
+
|
123 |
+
/**
|
124 |
+
* Only show screen options on the General tab
|
125 |
+
*
|
126 |
+
* @since 1.10
|
127 |
+
*
|
128 |
+
* @param boolean $show_screen True to display "Screen Options", false to suppress them
|
129 |
+
* @param WP_Screen $this_screen Current WP_Screen instance.
|
130 |
+
*
|
131 |
+
* @return boolean True to display "Screen Options", false to suppress them
|
132 |
+
*/
|
133 |
+
public static function mla_screen_options_show_screen( $show_screen, $this_screen ) {
|
134 |
+
// Make sure this is the Settings/MLA Feed screen
|
135 |
+
if ( false === strpos( $this_screen->base, MLACustomFeedExample::SLUG_PREFIX . '-settings' ) ) {
|
136 |
+
return $show_screen;
|
137 |
+
}
|
138 |
+
|
139 |
+
return false !== strpos( $this_screen->base, MLACustomFeedExample::SLUG_PREFIX . '-settings-general' );
|
140 |
+
}
|
141 |
+
|
142 |
+
/**
|
143 |
+
* Add the "XX Entries per page" filter to the Screen Options tab
|
144 |
+
*
|
145 |
+
* @since 1.10
|
146 |
+
*/
|
147 |
+
public static function mla_add_menu_options( ) {
|
148 |
+
$option = 'per_page';
|
149 |
+
|
150 |
+
$args = array(
|
151 |
+
'label' => 'Feeds per page',
|
152 |
+
'default' => 10,
|
153 |
+
'option' => MLACustomFeedExample::SLUG_PREFIX . '_feeds_per_page'
|
154 |
+
);
|
155 |
+
|
156 |
+
add_screen_option( $option, $args );
|
157 |
+
}
|
158 |
+
|
159 |
+
/**
|
160 |
+
* Save the "Entries per page" option set by this user
|
161 |
+
*
|
162 |
+
* @since 1.10
|
163 |
+
*
|
164 |
+
* @param mixed false or value returned by previous filter
|
165 |
+
* @param string Name of the option being changed
|
166 |
+
* @param string New value of the option
|
167 |
+
*
|
168 |
+
* @return mixed New value if this is our option, otherwise original status
|
169 |
+
*/
|
170 |
+
public static function mla_set_screen_option( $status, $option, $value ) {
|
171 |
+
if ( MLACustomFeedExample::SLUG_PREFIX . '_feeds_per_page' == $option ) {
|
172 |
+
return $value;
|
173 |
+
}
|
174 |
+
|
175 |
+
return $status;
|
176 |
+
}
|
177 |
+
|
178 |
+
/**
|
179 |
+
* Add the "Settings" link to the Plugins section entry
|
180 |
+
*
|
181 |
+
* @since 1.00
|
182 |
+
*
|
183 |
+
* @param array array of links for the Plugin, e.g., "Activate"
|
184 |
+
* @param string Directory and name of the plugin Index file
|
185 |
+
*
|
186 |
+
* @return array Updated array of links for the Plugin
|
187 |
+
*/
|
188 |
+
public static function plugin_action_links( $links, $file ) {
|
189 |
+
if ( $file == 'mla-custom-feed-example/mla-custom-feed-example.php' ) {
|
190 |
+
$settings_link = sprintf( '<a href="%s">%s</a>', admin_url( 'options-general.php?page=' . MLACustomFeedExample::SLUG_PREFIX . '-settings-general' ), 'Settings' );
|
191 |
+
array_unshift( $links, $settings_link );
|
192 |
+
}
|
193 |
+
|
194 |
+
return $links;
|
195 |
+
}
|
196 |
+
|
197 |
+
/**
|
198 |
+
* Render (echo) the "MLA Feed" submenu in the Settings section
|
199 |
+
*
|
200 |
+
* @since 1.00
|
201 |
+
*
|
202 |
+
* @return void Echoes HTML markup for the submenu page
|
203 |
+
*/
|
204 |
+
public static function add_submenu_page() {
|
205 |
+
//error_log( __LINE__ . " MLACustomFeedExample:add_submenu_page _REQUEST = " . var_export( $_REQUEST, true ), 0 );
|
206 |
+
|
207 |
+
if ( !current_user_can( 'manage_options' ) ) {
|
208 |
+
echo "MLA Custom Feed Example - Error</h2>\n";
|
209 |
+
wp_die( 'You do not have permission to manage plugin settings.' );
|
210 |
+
}
|
211 |
+
|
212 |
+
// Load template array and initialize page-level values.
|
213 |
+
self::$page_template_array = MLACore::mla_load_template( dirname( __FILE__ ) . '/admin-settings-page.tpl', 'path' );
|
214 |
+
$current_tab_slug = isset( $_REQUEST['mla_tab'] ) ? $_REQUEST['mla_tab']: 'general';
|
215 |
+
$current_tab = self::_get_options_tablist( $current_tab_slug );
|
216 |
+
$page_values = array(
|
217 |
+
'version' => 'v' . self::CURRENT_VERSION,
|
218 |
+
'messages' => '',
|
219 |
+
'tablist' => self::_compose_settings_tabs( $current_tab_slug ),
|
220 |
+
'tab_content' => '',
|
221 |
+
);
|
222 |
+
|
223 |
+
// Compose tab content
|
224 |
+
if ( $current_tab ) {
|
225 |
+
if ( isset( $current_tab['render'] ) ) {
|
226 |
+
$handler = $current_tab['render'];
|
227 |
+
$page_content = call_user_func( $handler );
|
228 |
+
} else {
|
229 |
+
$page_content = array( 'message' => 'ERROR: Cannot render content tab', 'body' => '' );
|
230 |
+
}
|
231 |
+
} else {
|
232 |
+
$page_content = array( 'message' => 'ERROR: Unknown content tab', 'body' => '' );
|
233 |
+
}
|
234 |
+
|
235 |
+
if ( ! empty( $page_content['message'] ) ) {
|
236 |
+
if ( false !== strpos( $page_content['message'], 'ERROR' ) ) {
|
237 |
+
$messages_class = 'updated error';
|
238 |
+
$dismiss_button = '';
|
239 |
+
} else {
|
240 |
+
$messages_class = 'updated notice is-dismissible';
|
241 |
+
$dismiss_button = " <button class=\"notice-dismiss\" type=\"button\"><span class=\"screen-reader-text\">[+dismiss_text+].</span></button>\n";
|
242 |
+
}
|
243 |
+
|
244 |
+
$page_values['messages'] = MLAData::mla_parse_template( self::$page_template_array['messages'], array(
|
245 |
+
'mla_messages_class' => $messages_class ,
|
246 |
+
'messages' => $page_content['message'],
|
247 |
+
'dismiss_button' => $dismiss_button,
|
248 |
+
'dismiss_text' => 'Dismiss this notice',
|
249 |
+
) );
|
250 |
+
}
|
251 |
+
|
252 |
+
$page_values['tab_content'] = $page_content['body'];
|
253 |
+
echo MLAData::mla_parse_template( self::$page_template_array['page'], $page_values );
|
254 |
+
}
|
255 |
+
|
256 |
+
/**
|
257 |
+
* Template file for the Settings page(s) and parts
|
258 |
+
*
|
259 |
+
* This array contains all of the template parts for the Settings page(s). The array is built once
|
260 |
+
* each page load and cached for subsequent use.
|
261 |
+
*
|
262 |
+
* @since 1.10
|
263 |
+
*
|
264 |
+
* @var array
|
265 |
+
*/
|
266 |
+
public static $page_template_array = NULL;
|
267 |
+
|
268 |
+
/**
|
269 |
+
* Definitions for Settings page tab ids, titles and handlers
|
270 |
+
* Each tab is defined by an array with the following elements:
|
271 |
+
*
|
272 |
+
* array key => HTML id/name attribute and option database key (OMIT MLA_OPTION_PREFIX)
|
273 |
+
*
|
274 |
+
* title => tab label / heading text
|
275 |
+
* render => rendering function for tab messages and content. Usage:
|
276 |
+
* $tab_content = ['render']( );
|
277 |
+
*
|
278 |
+
* @since 1.10
|
279 |
+
*
|
280 |
+
* @var array
|
281 |
+
*/
|
282 |
+
private static $mla_tablist = array(
|
283 |
+
'general' => array( 'title' => 'General', 'render' => array( 'MLACustomFeedExample', '_compose_general_tab' ) ),
|
284 |
+
'documentation' => array( 'title' => 'Documentation', 'render' => array( 'MLACustomFeedExample', '_compose_documentation_tab' ) ),
|
285 |
+
);
|
286 |
+
|
287 |
+
/**
|
288 |
+
* Retrieve the list of options tabs or a specific tab value
|
289 |
+
*
|
290 |
+
* @since 1.10
|
291 |
+
*
|
292 |
+
* @param string Tab slug, to retrieve a single entry
|
293 |
+
*
|
294 |
+
* @return array|false The entire tablist ( $tab = NULL ), a single tab entry or false if not found/not allowed
|
295 |
+
*/
|
296 |
+
private static function _get_options_tablist( $tab = NULL ) {
|
297 |
+
if ( is_string( $tab ) ) {
|
298 |
+
if ( isset( self::$mla_tablist[ $tab ] ) ) {
|
299 |
+
$results = self::$mla_tablist[ $tab ];
|
300 |
+
} else {
|
301 |
+
$results = false;
|
302 |
+
}
|
303 |
+
} else {
|
304 |
+
$results = self::$mla_tablist;
|
305 |
+
}
|
306 |
+
|
307 |
+
return $results;
|
308 |
+
}
|
309 |
+
|
310 |
+
/**
|
311 |
+
* Compose the navigation tabs for the Settings subpage
|
312 |
+
*
|
313 |
+
* @since 1.10
|
314 |
+
* @uses $page_template_array contains tablist and tablist-item templates
|
315 |
+
*
|
316 |
+
* @param string Optional data-tab-id value for the active tab, default 'general'
|
317 |
+
*
|
318 |
+
* @return string HTML markup for the Settings subpage navigation tabs
|
319 |
+
*/
|
320 |
+
private static function _compose_settings_tabs( $active_tab = 'general' ) {
|
321 |
+
$tablist_item = self::$page_template_array['tablist-item'];
|
322 |
+
$tabs = '';
|
323 |
+
foreach ( self::_get_options_tablist() as $key => $item ) {
|
324 |
+
$item_values = array(
|
325 |
+
'data-tab-id' => $key,
|
326 |
+
'nav-tab-active' => ( $active_tab == $key ) ? 'nav-tab-active' : '',
|
327 |
+
'settings-page' => MLACustomFeedExample::SLUG_PREFIX . '-settings-' . $key,
|
328 |
+
'title' => $item['title']
|
329 |
+
);
|
330 |
+
|
331 |
+
$tabs .= MLAData::mla_parse_template( $tablist_item, $item_values );
|
332 |
+
} // foreach $item
|
333 |
+
|
334 |
+
$tablist_values = array( 'tablist' => $tabs );
|
335 |
+
return MLAData::mla_parse_template( self::$page_template_array['tablist'], $tablist_values );
|
336 |
+
}
|
337 |
+
|
338 |
+
/**
|
339 |
+
* Compose the Edit Custom Feed tab content
|
340 |
+
*
|
341 |
+
* @since 1.10
|
342 |
+
*
|
343 |
+
* @param array $item Data values for the item.
|
344 |
+
* @param array &$template Display templates.
|
345 |
+
* @return array 'message' => status/error messages, 'body' => tab content
|
346 |
+
*/
|
347 |
+
private static function _compose_edit_custom_feed_tab( $item, &$template ) {
|
348 |
+
$page_values = array(
|
349 |
+
'form_url' => admin_url( 'options-general.php' ) . '?page=mlafeed-settings-general&mla_tab=general',
|
350 |
+
'post_ID' => $item['post_ID'],
|
351 |
+
'old_slug' => $item['slug'],
|
352 |
+
'_wpnonce' => wp_nonce_field( MLACore::MLA_ADMIN_NONCE_ACTION, MLACore::MLA_ADMIN_NONCE_NAME, true, false ),
|
353 |
+
|
354 |
+
'slug' => $item['slug'],
|
355 |
+
'rss_selected' => '', // Set below
|
356 |
+
'rss2_selected' => '',
|
357 |
+
'rss_http_selected' => '',
|
358 |
+
'title' => $item['title'],
|
359 |
+
'link' => $item['link'],
|
360 |
+
'description' => $item['description'],
|
361 |
+
'current_selected' => 'current' === $item['last_build_date'] ? 'selected=selected' : '',
|
362 |
+
'modified_selected' => 'modified' === $item['last_build_date'] ? 'selected=selected' : '',
|
363 |
+
'ttl' => !empty( $item['ttl'] ) ? $item['ttl'] : '',
|
364 |
+
'none_selected' => '', // Set below
|
365 |
+
'hourly_selected' => '',
|
366 |
+
'daily_selected' => '',
|
367 |
+
'weekly_selected' => '',
|
368 |
+
'monthly_selected' => '',
|
369 |
+
'yearly_selected' => '',
|
370 |
+
'update_frequency' => !empty( $item['update_frequency'] ) ? $item['update_frequency'] : '',
|
371 |
+
'update_base' => $item['update_base'],
|
372 |
+
'taxonomies' => $item['taxonomies'],
|
373 |
+
'parameters' => $item['parameters'],
|
374 |
+
'template_slug' => $item['template_slug'],
|
375 |
+
'template_name' => $item['template_name'],
|
376 |
+
|
377 |
+
'active_selected' => $item['active'] ? 'selected=selected' : '',
|
378 |
+
'inactive_selected' => $item['active'] ? '' : 'selected=selected',
|
379 |
+
);
|
380 |
+
|
381 |
+
switch( $item['type'] ) {
|
382 |
+
case 'rss':
|
383 |
+
$page_values['rss_selected'] = 'selected="selected"';
|
384 |
+
break;
|
385 |
+
case 'rss-http':
|
386 |
+
$page_values['rss_http_selected'] = 'selected="selected"';
|
387 |
+
break;
|
388 |
+
default:
|
389 |
+
$page_values['rss2_selected'] = 'selected="selected"';
|
390 |
+
} // type
|
391 |
+
|
392 |
+
switch( $item['update_period'] ) {
|
393 |
+
case 'none':
|
394 |
+
$page_values['none_selected'] = 'selected="selected"';
|
395 |
+
break;
|
396 |
+
case 'daily':
|
397 |
+
$page_values['daily_selected'] = 'selected="selected"';
|
398 |
+
break;
|
399 |
+
case 'weekly':
|
400 |
+
$page_values['weekly_selected'] = 'selected="selected"';
|
401 |
+
break;
|
402 |
+
case 'monthly':
|
403 |
+
$page_values['monthly_selected'] = 'selected="selected"';
|
404 |
+
break;
|
405 |
+
case 'yearly':
|
406 |
+
$page_values['yearly_selected'] = 'selected="selected"';
|
407 |
+
break;
|
408 |
+
default:
|
409 |
+
$page_values['hourly_selected'] = 'selected="selected"';
|
410 |
+
} // update_period
|
411 |
+
|
412 |
+
return array(
|
413 |
+
'message' => '',
|
414 |
+
'body' => MLAData::mla_parse_template( $template['single-item-edit'], $page_values )
|
415 |
+
);
|
416 |
+
}
|
417 |
+
|
418 |
+
/**
|
419 |
+
* Compose the General tab content for the Settings subpage
|
420 |
+
*
|
421 |
+
* @since 1.10
|
422 |
+
* @uses $page_template_array contains tab content template(s)
|
423 |
+
*
|
424 |
+
* @return array 'message' => status/error messages, 'body' => tab content
|
425 |
+
*/
|
426 |
+
private static function _compose_general_tab( ) {
|
427 |
+
$page_content = array( 'message' => '', 'body' => '' );
|
428 |
+
|
429 |
+
// Initialize page messages and content, check for page-level Save Changes, Add/Update/Cancel Feed
|
430 |
+
if ( !empty( $_REQUEST['mla-custom-feed-options-save'] ) ) {
|
431 |
+
check_admin_referer( MLACore::MLA_ADMIN_NONCE_ACTION, MLACore::MLA_ADMIN_NONCE_NAME );
|
432 |
+
$page_content = self::_save_setting_changes( );
|
433 |
+
} elseif ( !empty( $_REQUEST['mla-add-custom-feed-submit'] ) ) {
|
434 |
+
check_admin_referer( MLACore::MLA_ADMIN_NONCE_ACTION, MLACore::MLA_ADMIN_NONCE_NAME );
|
435 |
+
$page_content['message'] = MLACustomFeedExample::_add_custom_feed();
|
436 |
+
MLA_Custom_Feed_Query::mla_put_custom_feed_settings();
|
437 |
+
} elseif ( !empty( $_REQUEST['mla-edit-custom-feed-submit'] ) ) {
|
438 |
+
check_admin_referer( MLACore::MLA_ADMIN_NONCE_ACTION, MLACore::MLA_ADMIN_NONCE_NAME );
|
439 |
+
$page_content = MLACustomFeedExample::_update_custom_feed( $_REQUEST['mla_edit_custom_feed']['post_ID'], self::$page_template_array );
|
440 |
+
MLA_Custom_Feed_Query::mla_put_custom_feed_settings();
|
441 |
+
} elseif ( !empty( $_REQUEST['mla-edit-custom-feed-cancel'] ) ) {
|
442 |
+
check_admin_referer( MLACore::MLA_ADMIN_NONCE_ACTION, MLACore::MLA_ADMIN_NONCE_NAME );
|
443 |
+
$page_content['message'] = 'Edit Custom Feed cancelled.';
|
444 |
+
}
|
445 |
+
|
446 |
+
if ( !empty( $page_content['body'] ) ) {
|
447 |
+
return $page_content;
|
448 |
+
}
|
449 |
+
|
450 |
+
// Process bulk actions that affect an array of items
|
451 |
+
$bulk_action = MLA_Custom_Feed_List_Table::mla_current_bulk_action();
|
452 |
+
if ( $bulk_action && ( $bulk_action != 'none' ) ) {
|
453 |
+
if ( array_key_exists( $bulk_action, MLA_Custom_Feed_List_Table::mla_get_bulk_actions() ) ) {
|
454 |
+
if ( isset( $_REQUEST['cb_mla_item_ID'] ) ) {
|
455 |
+
foreach ( $_REQUEST['cb_mla_item_ID'] as $post_ID ) {
|
456 |
+
switch ( $bulk_action ) {
|
457 |
+
case 'delete':
|
458 |
+
$item_content = MLACustomFeedExample::_delete_custom_feed( $post_ID );
|
459 |
+
break;
|
460 |
+
default:
|
461 |
+
$item_content = 'Bad action'; // UNREACHABLE
|
462 |
+
} // switch $bulk_action
|
463 |
+
|
464 |
+
$page_content['message'] .= $item_content . '<br>';
|
465 |
+
} // foreach cb_attachment
|
466 |
+
|
467 |
+
MLA_Custom_Feed_Query::mla_put_custom_feed_settings();
|
468 |
+
} // isset cb_attachment
|
469 |
+
else {
|
470 |
+
/* translators: 1: action name, e.g., edit */
|
471 |
+
$page_content['message'] = sprintf( 'Bulk Action %1$s - no items selected.', $bulk_action );
|
472 |
+
}
|
473 |
+
} else {
|
474 |
+
/* translators: 1: bulk_action, e.g., delete, edit, execute, purge */
|
475 |
+
$page_content['message'] = sprintf( 'Unknown bulk action %1$s', $bulk_action );
|
476 |
+
}
|
477 |
+
} // $bulk_action
|
478 |
+
|
479 |
+
// Process row-level actions that affect a single item
|
480 |
+
if ( !empty( $_REQUEST['mla_admin_action'] ) ) {
|
481 |
+
check_admin_referer( MLACore::MLA_ADMIN_NONCE_ACTION, MLACore::MLA_ADMIN_NONCE_NAME );
|
482 |
+
|
483 |
+
$page_content = array( 'message' => '', 'body' => '' );
|
484 |
+
|
485 |
+
switch ( $_REQUEST['mla_admin_action'] ) {
|
486 |
+
case MLACore::MLA_ADMIN_SINGLE_EDIT_DISPLAY:
|
487 |
+
$item = MLA_Custom_Feed_Query::mla_find_custom_feed( $_REQUEST['mla_item_ID'] );
|
488 |
+
$page_content = self::_compose_edit_custom_feed_tab( $item, self::$page_template_array );
|
489 |
+
break;
|
490 |
+
case MLACore::MLA_ADMIN_SINGLE_DELETE:
|
491 |
+
$page_content['message'] = MLACustomFeedExample::_delete_custom_feed( $_REQUEST['mla_item_ID'] );
|
492 |
+
MLA_Custom_Feed_Query::mla_put_custom_feed_settings();
|
493 |
+
break;
|
494 |
+
default:
|
495 |
+
$page_content['message'] = sprintf( 'Unknown mla_admin_action - "%1$s"', $_REQUEST['mla_admin_action'] );
|
496 |
+
break;
|
497 |
+
} // switch ($_REQUEST['mla_admin_action'])
|
498 |
+
} // (!empty($_REQUEST['mla_admin_action'])
|
499 |
+
|
500 |
+
if ( !empty( $page_content['body'] ) ) {
|
501 |
+
return $page_content;
|
502 |
+
}
|
503 |
+
|
504 |
+
// Display the General tab and the Custom Feed table
|
505 |
+
$_SERVER['REQUEST_URI'] = remove_query_arg( array(
|
506 |
+
'mla_admin_action',
|
507 |
+
'mla_custom_feed_item',
|
508 |
+
'mla_item_ID',
|
509 |
+
'_wpnonce',
|
510 |
+
'_wp_http_referer',
|
511 |
+
'action',
|
512 |
+
'action2',
|
513 |
+
'cb_mla_item_ID',
|
514 |
+
'mla-edit-custom-feed-cancel',
|
515 |
+
'mla-edit-custom-feed-submit',
|
516 |
+
'mla-custom-feed-options-save',
|
517 |
+
), $_SERVER['REQUEST_URI'] );
|
518 |
+
|
519 |
+
// Create an instance of our package class
|
520 |
+
$MLA_Custom_Feed_List_Table = new MLA_Custom_Feed_List_Table();
|
521 |
+
|
522 |
+
// Fetch, prepare, sort, and filter our data
|
523 |
+
$MLA_Custom_Feed_List_Table->prepare_items();
|
524 |
+
|
525 |
+
// Start with page-level option row(s)
|
526 |
+
$page_values = array(
|
527 |
+
'enable_custom_feeds_checked' => MLA_Custom_Feed_Query::get_option('add_mlafeeds') ? 'checked="checked" ' : '',
|
528 |
+
);
|
529 |
+
$options_list = MLAData::mla_parse_template( self::$page_template_array['page-level-options'], $page_values );
|
530 |
+
|
531 |
+
// WPML requires that lang be the first argument after page
|
532 |
+
$view_arguments = MLA_Custom_Feed_List_Table::mla_submenu_arguments();
|
533 |
+
$form_language = isset( $view_arguments['lang'] ) ? '&lang=' . $view_arguments['lang'] : '';
|
534 |
+
$form_arguments = '?page=' . MLACustomFeedExample::SLUG_PREFIX . '-settings-general' . $form_language . '&mla_tab=general';
|
535 |
+
|
536 |
+
// We need to remember all the view arguments
|
537 |
+
$view_args = '';
|
538 |
+
foreach ( $view_arguments as $key => $value ) {
|
539 |
+
// 'lang' has already been added to the form action attribute
|
540 |
+
if ( in_array( $key, array( 'lang' ) ) ) {
|
541 |
+
continue;
|
542 |
+
}
|
543 |
+
|
544 |
+
if ( is_array( $value ) ) {
|
545 |
+
foreach ( $value as $element_key => $element_value )
|
546 |
+
$view_args .= "\t" . sprintf( '<input type="hidden" name="%1$s[%2$s]" value="%3$s" />', $key, $element_key, esc_attr( $element_value ) ) . "\n";
|
547 |
+
} else {
|
548 |
+
$view_args .= "\t" . sprintf( '<input type="hidden" name="%1$s" value="%2$s" />', $key, esc_attr( $value ) ) . "\n";
|
549 |
+
}
|
550 |
+
}
|
551 |
+
|
552 |
+
$page_values = array(
|
553 |
+
'form_url' => admin_url( 'options-general.php' ) . $form_arguments,
|
554 |
+
'view_args' => $view_args,
|
555 |
+
'_wpnonce' => wp_nonce_field( MLACore::MLA_ADMIN_NONCE_ACTION, MLACore::MLA_ADMIN_NONCE_NAME, true, false ),
|
556 |
+
'results' => ! empty( $_REQUEST['s'] ) ? '<span class="alignright" style="margin-top: .5em; font-weight: bold">Search results for: </span>' : '',
|
557 |
+
's' => isset( $_REQUEST['s'] ) ? $_REQUEST['s'] : '',
|
558 |
+
'options_list' => $options_list,
|
559 |
+
);
|
560 |
+
|
561 |
+
$page_content['body'] = MLAData::mla_parse_template( self::$page_template_array['before-table'], $page_values );
|
562 |
+
|
563 |
+
// Now we can render the completed list table
|
564 |
+
ob_start();
|
565 |
+
$MLA_Custom_Feed_List_Table->views();
|
566 |
+
$MLA_Custom_Feed_List_Table->display();
|
567 |
+
$page_content['body'] .= ob_get_contents();
|
568 |
+
ob_end_clean();
|
569 |
+
|
570 |
+
$page_content['body'] .= MLAData::mla_parse_template( self::$page_template_array['after-table'], $page_values );
|
571 |
+
|
572 |
+
return $page_content;
|
573 |
+
}
|
574 |
+
|
575 |
+
/**
|
576 |
+
* Compose the General tab content for the Settings subpage
|
577 |
+
*
|
578 |
+
* @since 1.10
|
579 |
+
* @uses $page_template_array contains tab content template(s)
|
580 |
+
*
|
581 |
+
* @return array 'message' => status/error messages, 'body' => tab content
|
582 |
+
*/
|
583 |
+
private static function _compose_documentation_tab( ) {
|
584 |
+
$page_content = array( 'message' => '', 'body' => '' );
|
585 |
+
$page_values = array(
|
586 |
+
);
|
587 |
+
|
588 |
+
$page_content['body'] = MLAData::mla_parse_template( self::$page_template_array['documentation-tab'], $page_values );
|
589 |
+
return $page_content;
|
590 |
+
}
|
591 |
+
|
592 |
+
/**
|
593 |
+
* Save settings as a WordPress wp_options entry
|
594 |
+
*
|
595 |
+
* @since 1.10
|
596 |
+
*
|
597 |
+
* @return array 'message' => status/error messages, 'body' => tab content
|
598 |
+
*/
|
599 |
+
private static function _save_setting_changes() {
|
600 |
+
$page_content = array( 'message' => 'Settings unchanged.', 'body' => '' );
|
601 |
+
$changed = MLA_Custom_Feed_Query::update_option( 'add_mlafeeds', isset( $_REQUEST[ 'mla_enable_custom_feeds' ] ) );
|
602 |
+
|
603 |
+
if ( $changed ) {
|
604 |
+
$changed = MLA_Custom_Feed_Query::mla_put_custom_feed_settings();
|
605 |
+
|
606 |
+
if ( false === $changed ) {
|
607 |
+
$page_content['message'] = "Settings updated failed.";
|
608 |
+
} elseif ( $changed ) {
|
609 |
+
$page_content['message'] = "Settings have been updated.";
|
610 |
+
}
|
611 |
+
}
|
612 |
+
|
613 |
+
return $page_content;
|
614 |
+
} // _save_setting_changes
|
615 |
+
|
616 |
+
/**
|
617 |
+
* Add a custom feed from values in $_REQUEST
|
618 |
+
*
|
619 |
+
* @since 1.10
|
620 |
+
* @uses $_REQUEST for field-level values
|
621 |
+
*
|
622 |
+
* @return string Message(s) reflecting the results of the operation
|
623 |
+
*/
|
624 |
+
private static function _add_custom_feed() {
|
625 |
+
$mla_custom_feed = isset( $_REQUEST['mla_add_custom_feed'] ) ? stripslashes_deep( $_REQUEST['mla_add_custom_feed'] ) : array();
|
626 |
+
|
627 |
+
// Validate new feed name
|
628 |
+
if ( !empty( $mla_custom_feed['slug'] ) ) {
|
629 |
+
$new_name = sanitize_title( $mla_custom_feed['slug'] );
|
630 |
+
} else {
|
631 |
+
return 'ERROR: No feed slug entered';
|
632 |
+
}
|
633 |
+
|
634 |
+
$message_list = '';
|
635 |
+
|
636 |
+
if ( MLA_Custom_Feed_Query::mla_find_custom_feed_ID( $new_name ) ) {
|
637 |
+
// Generate a unique name
|
638 |
+
$index = 1;
|
639 |
+
while( MLA_Custom_Feed_Query::mla_find_custom_feed_ID( $new_name . '-' . $index ) ) {
|
640 |
+
$index++;
|
641 |
+
}
|
642 |
+
|
643 |
+
$default_name = $new_name . '-' . $index;
|
644 |
+
|
645 |
+
$message_list .= sprintf( 'Warning: Duplicate new slug "%1$s", changed to "%2$s".<br>', $new_name, $default_name );
|
646 |
+
$new_name = $default_name;
|
647 |
+
} // duplicate name
|
648 |
+
|
649 |
+
// Convert checkbox/dropdown controls to booleans
|
650 |
+
$mla_custom_feed['active'] = '1' === $mla_custom_feed['status'];
|
651 |
+
|
652 |
+
$new_rule = array(
|
653 |
+
'post_ID' => 0,
|
654 |
+
'slug' => $new_name,
|
655 |
+
'type' => $mla_custom_feed['type'],
|
656 |
+
'title' => $mla_custom_feed['title'],
|
657 |
+
'link' => $mla_custom_feed['link'],
|
658 |
+
'description' => $mla_custom_feed['description'],
|
659 |
+
'last_build_date' => $mla_custom_feed['last_build_date'],
|
660 |
+
'ttl' => $mla_custom_feed['ttl'],
|
661 |
+
'update_period' => $mla_custom_feed['update_period'],
|
662 |
+
'update_frequency' => $mla_custom_feed['update_frequency'],
|
663 |
+
'update_base' => $mla_custom_feed['update_base'],
|
664 |
+
'taxonomies' => $mla_custom_feed['taxonomies'],
|
665 |
+
'parameters' => $mla_custom_feed['parameters'],
|
666 |
+
'template_slug' => $mla_custom_feed['template_slug'],
|
667 |
+
'template_name' => $mla_custom_feed['template_name'],
|
668 |
+
'active' => $mla_custom_feed['active'],
|
669 |
+
'changed' => true,
|
670 |
+
'deleted' => false,
|
671 |
+
);
|
672 |
+
|
673 |
+
if ( MLA_Custom_Feed_Query::mla_add_custom_feed( $new_rule ) ) {
|
674 |
+
return $message_list . 'Feed added';
|
675 |
+
}
|
676 |
+
|
677 |
+
return $message_list . 'ERROR: Feed addition failed';
|
678 |
+
} // _add_custom_feed
|
679 |
+
|
680 |
+
/**
|
681 |
+
* Update a custom feed from full-screen Edit Feed values in $_REQUEST
|
682 |
+
*
|
683 |
+
* @since 1.10
|
684 |
+
* @uses $_REQUEST for field-level values
|
685 |
+
*
|
686 |
+
* @param integer $post_id ID value of rule to update
|
687 |
+
* @param array &$template Display templates.
|
688 |
+
* @return array 'message' => status/error messages, 'body' => tab content
|
689 |
+
*/
|
690 |
+
private static function _update_custom_feed( $post_id, &$template ) {
|
691 |
+
$error_message = '';
|
692 |
+
$mla_custom_feed = isset( $_REQUEST['mla_edit_custom_feed'] ) ? stripslashes_deep( $_REQUEST['mla_edit_custom_feed'] ) : array();
|
693 |
+
|
694 |
+
// Validate new feed name
|
695 |
+
if ( !empty( $mla_custom_feed['slug'] ) ) {
|
696 |
+
$mla_custom_feed['slug'] = sanitize_title( $mla_custom_feed['slug'] );
|
697 |
+
if ( $mla_custom_feed['slug'] !== $mla_custom_feed['old_slug'] ) {
|
698 |
+
if ( MLA_Custom_Feed_Query::mla_find_custom_feed_ID( $mla_custom_feed['slug'] ) ) {
|
699 |
+
$error_message = 'ERROR: Feed already exists for the new name';
|
700 |
+
$mla_custom_feed['slug'] = $mla_custom_feed['old_slug'];
|
701 |
+
}
|
702 |
+
}
|
703 |
+
} else {
|
704 |
+
$error_message = 'ERROR: New feed name is empty';
|
705 |
+
$mla_custom_feed['slug'] = $mla_custom_feed['old_slug'];
|
706 |
+
}
|
707 |
+
|
708 |
+
// Convert form values to internal format
|
709 |
+
unset( $mla_custom_feed['old_slug'] );
|
710 |
+
$mla_custom_feed['active'] = '1' === $mla_custom_feed['status'];
|
711 |
+
unset( $mla_custom_feed['status'] );
|
712 |
+
$mla_custom_feed['ttl'] = absint( $mla_custom_feed['ttl'] );
|
713 |
+
$mla_custom_feed['update_frequency'] = absint( $mla_custom_feed['update_frequency'] );
|
714 |
+
|
715 |
+
if ( 'none' !== $mla_custom_feed['update_period'] && empty( $mla_custom_feed['update_frequency'] ) ) {
|
716 |
+
$mla_custom_feed['update_frequency'] = 1;
|
717 |
+
}
|
718 |
+
|
719 |
+
if ( !empty( $mla_custom_feed['update_base'] ) ) {
|
720 |
+
$mla_custom_feed['update_base'] = date( DATE_W3C, strtotime( $mla_custom_feed['update_base'] ) );
|
721 |
+
}
|
722 |
+
|
723 |
+
$new_feed = array_merge( $mla_custom_feed, array(
|
724 |
+
'changed' => true,
|
725 |
+
'deleted' => false,
|
726 |
+
|
727 |
+
) );
|
728 |
+
//error_log( __LINE__ . ' _update_custom_feed new_feed = ' . var_export( $new_feed, true ), 0 );
|
729 |
+
|
730 |
+
if ( empty( $error_message ) ) {
|
731 |
+
if ( false === MLA_Custom_Feed_Query::mla_replace_custom_feed( $new_feed ) ) {
|
732 |
+
$error_message = 'ERROR: Feed update failed';
|
733 |
+
}
|
734 |
+
}
|
735 |
+
|
736 |
+
if ( empty( $error_message ) ) {
|
737 |
+
return array( 'message' => 'Feed updated', 'body' => '' );
|
738 |
+
}
|
739 |
+
|
740 |
+
$page_content = self::_compose_edit_custom_feed_tab( $new_feed, $template );
|
741 |
+
$page_content['message'] = $error_message;
|
742 |
+
return $page_content;
|
743 |
+
} // _update_custom_feed
|
744 |
+
|
745 |
+
/**
|
746 |
+
* Delete a custom feed
|
747 |
+
*
|
748 |
+
* @since 1.10
|
749 |
+
*
|
750 |
+
* @param integer $post_id ID value of rule to delete
|
751 |
+
*
|
752 |
+
* @return array Message(s) reflecting the results of the operation
|
753 |
+
*/
|
754 |
+
private static function _delete_custom_feed( $post_id ) {
|
755 |
+
$feed = MLA_Custom_Feed_Query::mla_find_custom_feed( $post_id );
|
756 |
+
if ( false === $feed ) {
|
757 |
+
return "ERROR: _delete_custom_feed( {$post_id} ) feed not found.";
|
758 |
+
}
|
759 |
+
|
760 |
+
MLA_Custom_Feed_Query::mla_update_custom_feed( $post_id, 'deleted', true );
|
761 |
+
return sprintf( 'Feed "%1$s" deleted.', $feed['slug'] );
|
762 |
+
} // _delete_custom_feed
|
763 |
+
|
764 |
+
/**
|
765 |
+
* Retrieve item assigned terms, formatted for use in feeds.
|
766 |
+
*
|
767 |
+
* All of the categories for the current post in the feed loop, will be
|
768 |
+
* retrieved and have feed markup added, so that they can easily be added to the
|
769 |
+
* RSS2, Atom, or RSS1 and RSS0.91 RDF feeds.
|
770 |
+
*
|
771 |
+
* @since 1.00
|
772 |
+
*
|
773 |
+
* @param string $taxonomies Taxonomy or comma-delimited taxonomies to process.
|
774 |
+
* @param string $type Optional, default is the type returned by get_default_feed().
|
775 |
+
*
|
776 |
+
* @return string All of the post categories for displaying in the feed.
|
777 |
+
*/
|
778 |
+
public static function mla_get_the_terms_rss( $taxonomies, $type = NULL ) {
|
779 |
+
global $post;
|
780 |
+
|
781 |
+
if ( empty( $type ) ) {
|
782 |
+
$type = get_default_feed();
|
783 |
+
}
|
784 |
+
|
785 |
+
$filter = 'rss';
|
786 |
+
if ( 'atom' == $type ) {
|
787 |
+
$filter = 'raw';
|
788 |
+
}
|
789 |
+
|
790 |
+
$taxonomies = array_map( 'strtolower', array_map( 'trim', explode( ',', $taxonomies ) ) );
|
791 |
+
//error_log( __LINE__ . " MLACustomFeedExample::mla_get_the_terms_rss( {$post->ID} ) \$taxonomies = " . var_export( $taxonomies, true ), 0 );
|
792 |
+
|
793 |
+
$term_names = array();
|
794 |
+
foreach ( $taxonomies as $taxonomy ) {
|
795 |
+
$terms = wp_get_object_terms( $post->ID, $taxonomy );
|
796 |
+
//error_log( __LINE__ . " MLACustomFeedExample::mla_get_the_terms_rss( {$post->ID}, {$taxonomy} ) \$terms = " . var_export( $terms, true ), 0 );
|
797 |
+
foreach ( $terms as $term ) {
|
798 |
+
$term_names[] = sanitize_term_field( 'name', $term->name, $term->term_id, $taxonomy, $filter);
|
799 |
+
}
|
800 |
+
}
|
801 |
+
|
802 |
+
$term_names = array_unique( $term_names );
|
803 |
+
//error_log( __LINE__ . " MLACustomFeedExample::mla_get_the_terms_rss( {$post->ID} ) \$term_names = " . var_export( $term_names, true ), 0 );
|
804 |
+
|
805 |
+
$the_list = '';
|
806 |
+
foreach ( $term_names as $term_name ) {
|
807 |
+
if ( 'rdf' == $type )
|
808 |
+
$the_list .= "\t\t<dc:subject><![CDATA[$term_name]]></dc:subject>\n";
|
809 |
+
elseif ( 'atom' == $type )
|
810 |
+
$the_list .= sprintf( '<category scheme="%1$s" term="%2$s" />', esc_attr( get_bloginfo_rss( 'url' ) ), esc_attr( $term_name ) );
|
811 |
+
else
|
812 |
+
$the_list .= "\t\t<category><![CDATA[" . @html_entity_decode( $term_name, ENT_COMPAT, get_option('blog_charset') ) . "]]></category>\n";
|
813 |
+
}
|
814 |
+
|
815 |
+
return $the_list;
|
816 |
+
} // mla_get_the_terms_rss
|
817 |
+
|
818 |
+
/**
|
819 |
+
* Active feed settings, shared with the feed template file
|
820 |
+
*
|
821 |
+
* @since 1.10
|
822 |
+
*
|
823 |
+
* @var array
|
824 |
+
*/
|
825 |
+
public static $active_feed = NULL;
|
826 |
+
|
827 |
+
/**
|
828 |
+
* Process the MLA Custom Feed
|
829 |
+
*
|
830 |
+
* @since 1.00
|
831 |
+
*
|
832 |
+
* @param bool $is_comment_feed Whether the feed is a comment feed.
|
833 |
+
* @param string $feed The feed name.
|
834 |
+
*/
|
835 |
+
public static function mla_custom_feed( $is_comment_feed, $feed ) {
|
836 |
+
global $wp_query;
|
837 |
+
//error_log( __LINE__ . ' MLACustomFeedExample::mla_custom_feed $_REQUEST = ' . var_export( $_REQUEST, true ), 0 );
|
838 |
+
//error_log( __LINE__ . ' MLACustomFeedExample::mla_custom_feed $wp_query->request = ' . var_export( $wp_query->request, true ), 0 );
|
839 |
+
//error_log( __LINE__ . ' MLACustomFeedExample::mla_custom_feed $wp_query->query = ' . var_export( $wp_query->query , true ), 0 );
|
840 |
+
//error_log( __LINE__ . ' MLACustomFeedExample::mla_custom_feed $wp_query->queried_object = ' . var_export( $wp_query->queried_object , true ), 0 );
|
841 |
+
//error_log( __LINE__ . ' MLACustomFeedExample::mla_custom_feed $wp_query->queried_object_id = ' . var_export( $wp_query->queried_object_id , true ), 0 );
|
842 |
+
|
843 |
+
if ( !class_exists( 'MLAShortcode_Support' ) ) {
|
844 |
+
require_once( MLA_PLUGIN_PATH . 'includes/class-mla-shortcode-support.php' );
|
845 |
+
}
|
846 |
+
|
847 |
+
// Find the requested feed and verify active status
|
848 |
+
MLACustomFeedExample::$active_feed = NULL;
|
849 |
+
if ( $ID = MLA_Custom_Feed_Query::mla_find_custom_feed_ID( $feed ) ) {
|
850 |
+
MLACustomFeedExample::$active_feed = MLA_Custom_Feed_Query::mla_find_custom_feed( $ID );
|
851 |
+
}
|
852 |
+
|
853 |
+
if ( empty( MLACustomFeedExample::$active_feed ) || ( false === MLACustomFeedExample::$active_feed['active'] ) ) {
|
854 |
+
wp_die( "Feed \"{$feed}\" is not active." );
|
855 |
+
}
|
856 |
+
|
857 |
+
// Supply default values
|
858 |
+
if ( empty( MLACustomFeedExample::$active_feed['title'] ) ) {
|
859 |
+
MLACustomFeedExample::$active_feed['title'] = get_wp_title_rss();
|
860 |
+
}
|
861 |
+
|
862 |
+
if ( empty( MLACustomFeedExample::$active_feed['link'] ) ) {
|
863 |
+
MLACustomFeedExample::$active_feed['link'] = get_bloginfo_rss('url');
|
864 |
+
}
|
865 |
+
|
866 |
+
if ( empty( MLACustomFeedExample::$active_feed['description'] ) ) {
|
867 |
+
MLACustomFeedExample::$active_feed['description'] = get_bloginfo_rss('description');
|
868 |
+
}
|
869 |
+
|
870 |
+
// Build the data selection parameters
|
871 |
+
$attr = MLACustomFeedExample::$active_feed['parameters'];
|
872 |
+
if ( empty( $attr ) ) {
|
873 |
+
$query = array();
|
874 |
+
} elseif ( is_string( $attr ) ) {
|
875 |
+
$attr = str_replace( '{+', '[+', str_replace( '+}', '+]', $attr ) );
|
876 |
+
$query = shortcode_parse_atts( $attr );
|
877 |
+
}
|
878 |
+
|
879 |
+
// Taxonomy parameters can be passed in the URL, e.g., http://www.example.com/category/cat1,cat2/feed
|
880 |
+
if ( is_object( $wp_query ) && is_array( $wp_query->query )) {
|
881 |
+
$query = array_merge( $query, $wp_query->query );
|
882 |
+
}
|
883 |
+
|
884 |
+
// The mlafeed_parameters can contain {+request: ... +} parameters
|
885 |
+
$replacement_values = MLAData::mla_expand_field_level_parameters( $attr, $query, array() );
|
886 |
+
$attr = MLAData::mla_parse_template( $attr, $replacement_values );
|
887 |
+
|
888 |
+
//error_log( __LINE__ . ' MLACustomFeedExample::mla_custom_feed attr = ' . var_export( $attr, true ), 0 );
|
889 |
+
// Find the feed items
|
890 |
+
add_action( 'mla_gallery_wp_query_object', 'MLACustomFeedExample::mla_gallery_wp_query_object', 10, 1 );
|
891 |
+
MLAShortcodes::mla_get_shortcode_attachments( 0, $attr, false );
|
892 |
+
remove_action( 'mla_gallery_wp_query_object', 'MLACustomFeedExample::mla_gallery_wp_query_object', 10 );
|
893 |
+
//error_log( __LINE__ . ' MLACustomFeedExample::mla_custom_feed posts = ' . var_export( self::$wp_query_object->posts, true ), 0 );
|
894 |
+
|
895 |
+
// Find the lastBuildDate
|
896 |
+
if ( 'modified' === MLACustomFeedExample::$active_feed['last_build_date'] ) {
|
897 |
+
$highest_date = '0000-00-00 00:00:00';
|
898 |
+
foreach (self::$wp_query_object->posts as $post ) {
|
899 |
+
if ( $highest_date < $post->post_modified_gmt ) {
|
900 |
+
$highest_date = $post->post_modified_gmt;
|
901 |
+
}
|
902 |
+
}
|
903 |
+
|
904 |
+
MLACustomFeedExample::$active_feed['last_build_date'] = mysql2date( 'r', $highest_date, false );
|
905 |
+
} else {
|
906 |
+
MLACustomFeedExample::$active_feed['last_build_date'] = date( 'r' );
|
907 |
+
}
|
908 |
+
|
909 |
+
if ( !empty( MLACustomFeedExample::$active_feed['template_slug'] ) ) {
|
910 |
+
if ( !empty( MLACustomFeedExample::$active_feed['template_name'] ) ) {
|
911 |
+
get_template_part( MLACustomFeedExample::$active_feed['template_slug'], MLACustomFeedExample::$active_feed['template_name'] );
|
912 |
+
} else {
|
913 |
+
get_template_part( MLACustomFeedExample::$active_feed['template_slug'] );
|
914 |
+
}
|
915 |
+
} else {
|
916 |
+
require( dirname( __FILE__ ) . '/mla-custom-feed-template.php' );
|
917 |
+
}
|
918 |
+
} // mla_custom_feed
|
919 |
+
|
920 |
+
/**
|
921 |
+
* Save the WP_Query object for use in the Loop
|
922 |
+
*
|
923 |
+
* @since 1.00
|
924 |
+
*
|
925 |
+
* @var array
|
926 |
+
*/
|
927 |
+
public static $wp_query_object = NULL;
|
928 |
+
|
929 |
+
/**
|
930 |
+
* MLA Gallery WP Query Object
|
931 |
+
*
|
932 |
+
* This action gives you an opportunity (read-only) to record anything you need from the WP_Query object used
|
933 |
+
* to select the attachments for gallery display. This is the ONLY point at which the WP_Query object is defined.
|
934 |
+
*
|
935 |
+
* @since 1.00
|
936 |
+
* @uses MLAShortcodes::$mla_gallery_wp_query_object
|
937 |
+
*
|
938 |
+
* @param array query arguments passed to WP_Query->query
|
939 |
+
*/
|
940 |
+
public static function mla_gallery_wp_query_object( $query_arguments ) {
|
941 |
+
//error_log( __LINE__ . ' MLACustomFeedExample::mla_gallery_wp_query_object $query_arguments = ' . var_export( $query_arguments, true ), 0 );
|
942 |
+
|
943 |
+
self::$wp_query_object = MLAShortcodes::$mla_gallery_wp_query_object;
|
944 |
+
} // mla_gallery_wp_query_object
|
945 |
+
} // Class MLACustomFeedExample
|
946 |
+
|
947 |
+
/*
|
948 |
+
* The WP_List_Table class isn't automatically available to plugins
|
949 |
+
*/
|
950 |
+
if ( !class_exists( 'WP_List_Table' ) ) {
|
951 |
+
require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' );
|
952 |
+
}
|
953 |
+
|
954 |
+
/**
|
955 |
+
* Class MLA (Media Library Assistant) Custom Feed List Table implements the Custom Feed
|
956 |
+
* admin settings submenu table
|
957 |
+
*
|
958 |
+
* Extends the core WP_List_Table class.
|
959 |
+
*
|
960 |
+
* @package MLA Custom Feed Example
|
961 |
+
* @since 1.10
|
962 |
+
*/
|
963 |
+
class MLA_Custom_Feed_List_Table extends WP_List_Table {
|
964 |
+
/**
|
965 |
+
* Initializes some properties from $_REQUEST variables, then
|
966 |
+
* calls the parent constructor to set some default configs.
|
967 |
+
*
|
968 |
+
* @since 1.10
|
969 |
+
*
|
970 |
+
* @return void
|
971 |
+
*/
|
972 |
+
function __construct( ) {
|
973 |
+
// MLA does not use this
|
974 |
+
$this->modes = array(
|
975 |
+
'list' => __( 'List View' ),
|
976 |
+
);
|
977 |
+
|
978 |
+
//Set parent defaults
|
979 |
+
parent::__construct( array(
|
980 |
+
'singular' => 'custom_feed', //singular name of the listed records
|
981 |
+
'plural' => 'custom_feed', //plural name of the listed records
|
982 |
+
'ajax' => true, //does this table support ajax?
|
983 |
+
'screen' => 'settings_page_' . MLACustomFeedExample::SLUG_PREFIX . '-settings-general'
|
984 |
+
) );
|
985 |
+
|
986 |
+
// NOTE: There is one add_action call at the end of this source file.
|
987 |
+
}
|
988 |
+
|
989 |
+
/**
|
990 |
+
* Table column definitions
|
991 |
+
*
|
992 |
+
* This array defines table columns and titles where the key is the column slug (and class)
|
993 |
+
* and the value is the column's title text.
|
994 |
+
*
|
995 |
+
* All of the columns are added to this array by MLA_Custom_Feed_List_Table::_localize_default_columns_array.
|
996 |
+
*
|
997 |
+
* @since 1.10
|
998 |
+
*
|
999 |
+
* @var array
|
1000 |
+
*/
|
1001 |
+
private static $default_columns = array();
|
1002 |
+
|
1003 |
+
/**
|
1004 |
+
* Default values for hidden columns
|
1005 |
+
*
|
1006 |
+
* This array is used when the user-level option is not set, i.e.,
|
1007 |
+
* the user has not altered the selection of hidden columns.
|
1008 |
+
*
|
1009 |
+
* The value on the right-hand side must match the column slug, e.g.,
|
1010 |
+
* array(0 => 'ID_parent, 1 => 'title_name').
|
1011 |
+
*
|
1012 |
+
* @since 1.10
|
1013 |
+
*
|
1014 |
+
* @var array
|
1015 |
+
*/
|
1016 |
+
private static $default_hidden_columns = array(
|
1017 |
+
// 'slug',
|
1018 |
+
'type',
|
1019 |
+
// 'title',
|
1020 |
+
'link',
|
1021 |
+
'description',
|
1022 |
+
'last_build_date',
|
1023 |
+
'ttl',
|
1024 |
+
'update_period',
|
1025 |
+
'update_frequency',
|
1026 |
+
'update_base',
|
1027 |
+
// 'taxonomies',
|
1028 |
+
// 'parameters',
|
1029 |
+
'template_slug',
|
1030 |
+
'template_name',
|
1031 |
+
// 'status',
|
1032 |
+
);
|
1033 |
+
|
1034 |
+
/**
|
1035 |
+
* Sortable column definitions
|
1036 |
+
*
|
1037 |
+
* This array defines the table columns that can be sorted. The array key
|
1038 |
+
* is the column slug that needs to be sortable, and the value is database column
|
1039 |
+
* to sort by. Often, the key and value will be the same, but this is not always
|
1040 |
+
* the case (as the value is a column name from the database, not the list table).
|
1041 |
+
*
|
1042 |
+
* The array value also contains a boolean which is 'true' if the initial sort order
|
1043 |
+
* for the column is DESC/Descending.
|
1044 |
+
*
|
1045 |
+
* @since 1.10
|
1046 |
+
* @access private
|
1047 |
+
* @var array $default_sortable_columns {
|
1048 |
+
* @type array $$column_slug {
|
1049 |
+
* @type string $orderby_name Database column or other sorting slug.
|
1050 |
+
* @type boolean $descending Optional. True to make the initial orderby DESC.
|
1051 |
+
* }
|
1052 |
+
* }
|
1053 |
+
*/
|
1054 |
+
private static $default_sortable_columns = array(
|
1055 |
+
'slug' => array('slug',false),
|
1056 |
+
'type' => array('type',false),
|
1057 |
+
'title' => array('title',false),
|
1058 |
+
'link' => array('link',false),
|
1059 |
+
'description' => array('description',true),
|
1060 |
+
'last_build_date' => array('last_build_date',true),
|
1061 |
+
'ttl' => array('ttl',false),
|
1062 |
+
'update_period' => array('update_period',false),
|
1063 |
+
'update_frequency' => array('update_frequency',false),
|
1064 |
+
'update_base' => array('update_base',false),
|
1065 |
+
'taxonomies' => array('taxonomies',false),
|
1066 |
+
'parameters' => array('parameters',false),
|
1067 |
+
'template_slug' => array('template_slug',false),
|
1068 |
+
'template_name' => array('template_name',false),
|
1069 |
+
'status' => array('status',false),
|
1070 |
+
);
|
1071 |
+
|
1072 |
+
/**
|
1073 |
+
* Access the default list of hidden columns
|
1074 |
+
*
|
1075 |
+
* @since 1.10
|
1076 |
+
*
|
1077 |
+
* @return array default list of hidden columns
|
1078 |
+
*/
|
1079 |
+
private static function _default_hidden_columns( ) {
|
1080 |
+
return self::$default_hidden_columns;
|
1081 |
+
}
|
1082 |
+
|
1083 |
+
/**
|
1084 |
+
* Return the names and display values of the sortable columns
|
1085 |
+
*
|
1086 |
+
* @since 1.10
|
1087 |
+
*
|
1088 |
+
* @return array name => array( orderby value, heading ) for sortable columns
|
1089 |
+
*/
|
1090 |
+
public static function mla_get_sortable_columns( ) {
|
1091 |
+
return self::$default_sortable_columns;
|
1092 |
+
}
|
1093 |
+
|
1094 |
+
/**
|
1095 |
+
* Process $_REQUEST, building $submenu_arguments
|
1096 |
+
*
|
1097 |
+
* @since 1.10
|
1098 |
+
*
|
1099 |
+
* @param boolean $include_filters Optional. Include the "click filter" values in the results. Default true.
|
1100 |
+
* @return array non-empty view, search, filter and sort arguments
|
1101 |
+
*/
|
1102 |
+
public static function mla_submenu_arguments( $include_filters = true ) {
|
1103 |
+
static $submenu_arguments = NULL, $has_filters = NULL;
|
1104 |
+
|
1105 |
+
if ( is_array( $submenu_arguments ) && ( $has_filters == $include_filters ) ) {
|
1106 |
+
return $submenu_arguments;
|
1107 |
+
}
|
1108 |
+
|
1109 |
+
$submenu_arguments = array();
|
1110 |
+
$has_filters = $include_filters;
|
1111 |
+
|
1112 |
+
// View arguments
|
1113 |
+
if ( isset( $_REQUEST['mla_custom_feed_view'] ) ) {
|
1114 |
+
$submenu_arguments['mla_custom_feed_view'] = $_REQUEST['mla_custom_feed_view'];
|
1115 |
+
}
|
1116 |
+
|
1117 |
+
// Search box arguments
|
1118 |
+
if ( !empty( $_REQUEST['s'] ) ) {
|
1119 |
+
$submenu_arguments['s'] = urlencode( stripslashes( $_REQUEST['s'] ) );
|
1120 |
+
}
|
1121 |
+
|
1122 |
+
// Filter arguments (from table header)
|
1123 |
+
if ( isset( $_REQUEST['mla_custom_feed_status'] ) && ( 'any' != $_REQUEST['mla_custom_feed_status'] ) ) {
|
1124 |
+
$submenu_arguments['mla_custom_feed_status'] = $_REQUEST['mla_custom_feed_status'];
|
1125 |
+
}
|
1126 |
+
|
1127 |
+
// Sort arguments (from column header)
|
1128 |
+
if ( isset( $_REQUEST['order'] ) ) {
|
1129 |
+
$submenu_arguments['order'] = $_REQUEST['order'];
|
1130 |
+
}
|
1131 |
+
|
1132 |
+
if ( isset( $_REQUEST['orderby'] ) ) {
|
1133 |
+
$submenu_arguments['orderby'] = $_REQUEST['orderby'];
|
1134 |
+
}
|
1135 |
+
|
1136 |
+
return $submenu_arguments;
|
1137 |
+
}
|
1138 |
+
|
1139 |
+
/**
|
1140 |
+
* Called in the admin_init action because the list_table object isn't
|
1141 |
+
* created in time to affect the "screen options" setup.
|
1142 |
+
*
|
1143 |
+
* @since 1.10
|
1144 |
+
*
|
1145 |
+
* @return void
|
1146 |
+
*/
|
1147 |
+
public static function mla_admin_init( ) {
|
1148 |
+
if ( isset( $_REQUEST['page'] ) && $_REQUEST['page'] == MLACustomFeedExample::SLUG_PREFIX . '-settings-general' ) {
|
1149 |
+
add_filter( 'get_user_option_managesettings_page_' . MLACustomFeedExample::SLUG_PREFIX . '-settings-generalcolumnshidden', 'MLA_Custom_Feed_List_Table::mla_manage_hidden_columns_filter', 10, 3 );
|
1150 |
+
add_filter( 'manage_settings_page_' . MLACustomFeedExample::SLUG_PREFIX . '-settings-general_columns', 'MLA_Custom_Feed_List_Table::mla_manage_columns_filter', 10, 0 );
|
1151 |
+
}
|
1152 |
+
}
|
1153 |
+
|
1154 |
+
/**
|
1155 |
+
* Handler for filter 'get_user_option_managesettings_page_mlafeed-settings-settings-generalcolumnshidden'
|
1156 |
+
*
|
1157 |
+
* Required because the screen.php get_hidden_columns function only uses
|
1158 |
+
* the get_user_option result. Set when the file is loaded because the object
|
1159 |
+
* is not created in time for the call from screen.php.
|
1160 |
+
*
|
1161 |
+
* @since 1.10
|
1162 |
+
*
|
1163 |
+
* @param mixed false or array with current list of hidden columns, if any
|
1164 |
+
* @param string 'managesettings_page_mlafeed-settings-settings-generalcolumnshidden'
|
1165 |
+
* @param object WP_User object, if logged in
|
1166 |
+
*
|
1167 |
+
* @return array updated list of hidden columns
|
1168 |
+
*/
|
1169 |
+
public static function mla_manage_hidden_columns_filter( $result, $option, $user_data ) {
|
1170 |
+
//error_log( __LINE__ . " MLACustomFeedExample::mla_manage_hidden_columns_filter ( {$option} ) result = " . var_export( $result, true ), 0 );
|
1171 |
+
|
1172 |
+
if ( false !== $result ) {
|
1173 |
+
return $result;
|
1174 |
+
}
|
1175 |
+
|
1176 |
+
return self::_default_hidden_columns();
|
1177 |
+
}
|
1178 |
+
|
1179 |
+
/**
|
1180 |
+
* Handler for filter 'manage_settings_page_mlafeed-settings_columns'
|
1181 |
+
*
|
1182 |
+
* This required filter dictates the table's columns and titles. Set when the
|
1183 |
+
* file is loaded because the list_table object isn't created in time
|
1184 |
+
* to affect the "screen options" setup.
|
1185 |
+
*
|
1186 |
+
* @since 1.10
|
1187 |
+
*
|
1188 |
+
* @return array list of table columns
|
1189 |
+
*/
|
1190 |
+
public static function mla_manage_columns_filter( ) {
|
1191 |
+
self::_localize_default_columns_array();
|
1192 |
+
return self::$default_columns;
|
1193 |
+
}
|
1194 |
+
|
1195 |
+
/**
|
1196 |
+
* Builds the $default_columns array with translated source texts.
|
1197 |
+
*
|
1198 |
+
* @since 1.10
|
1199 |
+
*
|
1200 |
+
* @return void
|
1201 |
+
*/
|
1202 |
+
private static function _localize_default_columns_array( ) {
|
1203 |
+
if ( empty( self::$default_columns ) ) {
|
1204 |
+
// Build the default columns array at runtime to accomodate future calls to localization functions
|
1205 |
+
self::$default_columns = array(
|
1206 |
+
'cb' => '<input type="checkbox" />', //Render a checkbox instead of text
|
1207 |
+
'slug' => 'Slug',
|
1208 |
+
'type' => 'Type',
|
1209 |
+
'title' => 'Title',
|
1210 |
+
'link' => 'Link',
|
1211 |
+
'description' => 'Description',
|
1212 |
+
'last_build_date' => 'Last Built',
|
1213 |
+
'ttl' => 'TTL',
|
1214 |
+
'update_period' => 'Update Period',
|
1215 |
+
'update_frequency' => 'Update Frequency',
|
1216 |
+
'update_base' => 'Update Base',
|
1217 |
+
'taxonomies' => 'Taxonomies',
|
1218 |
+
'parameters' => 'Parameters',
|
1219 |
+
'template_slug' => 'Template Slug',
|
1220 |
+
'template_name' => 'Template Name',
|
1221 |
+
'status' => 'Status',
|
1222 |
+
);
|
1223 |
+
}
|
1224 |
+
}
|
1225 |
+
|
1226 |
+
/**
|
1227 |
+
* Checks the current user's permissions
|
1228 |
+
*
|
1229 |
+
* @since 1.10
|
1230 |
+
*
|
1231 |
+
* @return bool
|
1232 |
+
*/
|
1233 |
+
public function ajax_user_can() {
|
1234 |
+
return current_user_can('manage_options');
|
1235 |
+
}
|
1236 |
+
|
1237 |
+
/**
|
1238 |
+
* Get the name of the default primary column.
|
1239 |
+
*
|
1240 |
+
* @since 1.10
|
1241 |
+
* @access protected
|
1242 |
+
*
|
1243 |
+
* @return string Name of the default primary column
|
1244 |
+
*/
|
1245 |
+
protected function get_default_primary_column_name() {
|
1246 |
+
return 'slug';
|
1247 |
+
}
|
1248 |
+
|
1249 |
+
/**
|
1250 |
+
* Generate and display row actions links.
|
1251 |
+
*
|
1252 |
+
* @since 1.10
|
1253 |
+
* @access protected
|
1254 |
+
*
|
1255 |
+
* @param object $item Attachment being acted upon.
|
1256 |
+
* @param string $column_name Current column name.
|
1257 |
+
* @param string $primary Primary column name.
|
1258 |
+
* @return string Row actions output for media attachments.
|
1259 |
+
*/
|
1260 |
+
protected function handle_row_actions( $item, $column_name, $primary ) {
|
1261 |
+
if ( $primary === $column_name ) {
|
1262 |
+
$actions = $this->row_actions( $this->_build_rollover_actions( $item, $column_name ) );
|
1263 |
+
return $actions;
|
1264 |
+
}
|
1265 |
+
|
1266 |
+
return '';
|
1267 |
+
}
|
1268 |
+
|
1269 |
+
/**
|
1270 |
+
* Add rollover actions to a table column
|
1271 |
+
*
|
1272 |
+
* @since 1.10
|
1273 |
+
*
|
1274 |
+
* @param object An MLA custom_feed_rule object
|
1275 |
+
* @param string Current column name
|
1276 |
+
*
|
1277 |
+
* @return array Names and URLs of row-level actions
|
1278 |
+
*/
|
1279 |
+
private function _build_rollover_actions( $item, $column ) {
|
1280 |
+
$actions = array();
|
1281 |
+
|
1282 |
+
// Compose view arguments
|
1283 |
+
$view_args = array_merge( array(
|
1284 |
+
'page' => MLACustomFeedExample::SLUG_PREFIX . '-settings-general',
|
1285 |
+
'mla_tab' => 'general',
|
1286 |
+
'mla_item_ID' => urlencode( $item->post_ID )
|
1287 |
+
), MLA_Custom_Feed_List_Table::mla_submenu_arguments() );
|
1288 |
+
|
1289 |
+
if ( isset( $_REQUEST['paged'] ) ) {
|
1290 |
+
$view_args['paged'] = $_REQUEST['paged'];
|
1291 |
+
}
|
1292 |
+
|
1293 |
+
if ( isset( $_REQUEST['order'] ) ) {
|
1294 |
+
$view_args['order'] = $_REQUEST['order'];
|
1295 |
+
}
|
1296 |
+
|
1297 |
+
if ( isset( $_REQUEST['orderby'] ) ) {
|
1298 |
+
$view_args['orderby'] = $_REQUEST['orderby'];
|
1299 |
+
}
|
1300 |
+
|
1301 |
+
$actions['edit'] = '<a href="' . add_query_arg( $view_args, wp_nonce_url( '?mla_admin_action=' . MLACore::MLA_ADMIN_SINGLE_EDIT_DISPLAY, MLACore::MLA_ADMIN_NONCE_ACTION, MLACore::MLA_ADMIN_NONCE_NAME ) ) . '" title="Edit this item">Edit</a>';
|
1302 |
+
|
1303 |
+
$actions['delete'] = '<a class="delete-tag"' . ' href="' . add_query_arg( $view_args, wp_nonce_url( '?mla_admin_action=' . MLACore::MLA_ADMIN_SINGLE_DELETE, MLACore::MLA_ADMIN_NONCE_ACTION, MLACore::MLA_ADMIN_NONCE_NAME ) ) . '" title="Delete this item Permanently">Delete Permanently</a>';
|
1304 |
+
|
1305 |
+
return $actions;
|
1306 |
+
}
|
1307 |
+
|
1308 |
+
/**
|
1309 |
+
* Supply a column value if no column-specific function has been defined
|
1310 |
+
*
|
1311 |
+
* Called when the parent class can't find a method specifically built for a
|
1312 |
+
* given column. All columns should have a specific method, so this function
|
1313 |
+
* returns a troubleshooting message.
|
1314 |
+
*
|
1315 |
+
* @since 1.10
|
1316 |
+
*
|
1317 |
+
* @param array A singular item (one full row's worth of data)
|
1318 |
+
* @param array The name/slug of the column to be processed
|
1319 |
+
* @return string Text or HTML to be placed inside the column
|
1320 |
+
*/
|
1321 |
+
function column_default( $item, $column_name ) {
|
1322 |
+
//Show the whole array for troubleshooting purposes
|
1323 |
+
return sprintf( 'column_default: %1$s, %2$s', $column_name, print_r( $item, true ) );
|
1324 |
+
}
|
1325 |
+
|
1326 |
+
/**
|
1327 |
+
* Displays checkboxes for using bulk actions. The 'cb' column
|
1328 |
+
* is given special treatment when columns are processed.
|
1329 |
+
*
|
1330 |
+
* @since 1.10
|
1331 |
+
*
|
1332 |
+
* @param object An MLA custom_feed_rule object
|
1333 |
+
* @return string HTML markup to be placed inside the column
|
1334 |
+
*/
|
1335 |
+
function column_cb( $item ) {
|
1336 |
+
return sprintf( '<input type="checkbox" name="cb_mla_item_ID[]" value="%1$s" />',
|
1337 |
+
/*%1$s*/ $item->post_ID
|
1338 |
+
);
|
1339 |
+
}
|
1340 |
+
|
1341 |
+
/**
|
1342 |
+
* Populate the Slug column
|
1343 |
+
*
|
1344 |
+
* @since 1.10
|
1345 |
+
*
|
1346 |
+
* @param object An MLA custom_feed_rule object
|
1347 |
+
* @return string HTML markup to be placed inside the column
|
1348 |
+
*/
|
1349 |
+
function column_slug( $item ) {
|
1350 |
+
return esc_html( $item->slug );
|
1351 |
+
}
|
1352 |
+
|
1353 |
+
/**
|
1354 |
+
* Populate the Type column
|
1355 |
+
*
|
1356 |
+
* @since 1.10
|
1357 |
+
*
|
1358 |
+
* @param object An MLA custom_feed_rule object
|
1359 |
+
* @return string HTML markup to be placed inside the column
|
1360 |
+
*/
|
1361 |
+
function column_type( $item ) {
|
1362 |
+
return esc_html( $item->type );
|
1363 |
+
}
|
1364 |
+
|
1365 |
+
/**
|
1366 |
+
* Populate the Title column
|
1367 |
+
*
|
1368 |
+
* @since 1.10
|
1369 |
+
*
|
1370 |
+
* @param object An MLA custom_feed_rule object
|
1371 |
+
* @return string HTML markup to be placed inside the column
|
1372 |
+
*/
|
1373 |
+
function column_title( $item ) {
|
1374 |
+
return esc_html( $item->title );
|
1375 |
+
}
|
1376 |
+
|
1377 |
+
/**
|
1378 |
+
* Populate the Link Value column
|
1379 |
+
*
|
1380 |
+
* @since 1.10
|
1381 |
+
*
|
1382 |
+
* @param object An MLA custom_feed_rule object
|
1383 |
+
* @return string HTML markup to be placed inside the column
|
1384 |
+
*/
|
1385 |
+
function column_link( $item ) {
|
1386 |
+
return esc_html( $item->link );
|
1387 |
+
}
|
1388 |
+
|
1389 |
+
/**
|
1390 |
+
* Populate the Description column
|
1391 |
+
*
|
1392 |
+
* @since 1.10
|
1393 |
+
*
|
1394 |
+
* @param object An MLA custom_feed_rule object
|
1395 |
+
* @return string HTML markup to be placed inside the column
|
1396 |
+
*/
|
1397 |
+
function column_description( $item ) {
|
1398 |
+
return esc_html( $item->description );
|
1399 |
+
}
|
1400 |
+
|
1401 |
+
/**
|
1402 |
+
* Populate the Last Built column
|
1403 |
+
*
|
1404 |
+
* @since 1.10
|
1405 |
+
*
|
1406 |
+
* @param object An MLA custom_feed_rule object
|
1407 |
+
* @return string HTML markup to be placed inside the column
|
1408 |
+
*/
|
1409 |
+
function column_last_build_date( $item ) {
|
1410 |
+
return esc_html( $item->last_build_date );
|
1411 |
+
}
|
1412 |
+
|
1413 |
+
/**
|
1414 |
+
* Populate the Time-to-live column
|
1415 |
+
*
|
1416 |
+
* @since 1.10
|
1417 |
+
*
|
1418 |
+
* @param object An MLA custom_feed_rule object
|
1419 |
+
* @return string HTML markup to be placed inside the column
|
1420 |
+
*/
|
1421 |
+
function column_ttl( $item ) {
|
1422 |
+
return esc_html( $item->ttl );
|
1423 |
+
}
|
1424 |
+
|
1425 |
+
/**
|
1426 |
+
* Populate the Update Period column
|
1427 |
+
*
|
1428 |
+
* @since 1.10
|
1429 |
+
*
|
1430 |
+
* @param object An MLA custom_feed_rule object
|
1431 |
+
* @return string HTML markup to be placed inside the column
|
1432 |
+
*/
|
1433 |
+
function column_update_period( $item ) {
|
1434 |
+
return esc_html( $item->update_period );
|
1435 |
+
}
|
1436 |
+
|
1437 |
+
/**
|
1438 |
+
* Populate the Update Frequency column
|
1439 |
+
*
|
1440 |
+
* @since 1.10
|
1441 |
+
*
|
1442 |
+
* @param object An MLA custom_feed_rule object
|
1443 |
+
* @return string HTML markup to be placed inside the column
|
1444 |
+
*/
|
1445 |
+
function column_update_frequency( $item ) {
|
1446 |
+
return esc_html( $item->update_frequency );
|
1447 |
+
}
|
1448 |
+
|
1449 |
+
/**
|
1450 |
+
* Populate the Update Base column
|
1451 |
+
*
|
1452 |
+
* @since 1.10
|
1453 |
+
*
|
1454 |
+
* @param object An MLA custom_feed_rule object
|
1455 |
+
* @return string HTML markup to be placed inside the column
|
1456 |
+
*/
|
1457 |
+
function column_update_base( $item ) {
|
1458 |
+
return esc_html( $item->update_base );
|
1459 |
+
}
|
1460 |
+
|
1461 |
+
/**
|
1462 |
+
* Populate the Taxonomies column
|
1463 |
+
*
|
1464 |
+
* @since 1.10
|
1465 |
+
*
|
1466 |
+
* @param object An MLA custom_feed_rule object
|
1467 |
+
* @return string HTML markup to be placed inside the column
|
1468 |
+
*/
|
1469 |
+
function column_taxonomies( $item ) {
|
1470 |
+
return esc_html( $item->taxonomies );
|
1471 |
+
}
|
1472 |
+
|
1473 |
+
/**
|
1474 |
+
* Populate the Parameters column
|
1475 |
+
*
|
1476 |
+
* @since 1.10
|
1477 |
+
*
|
1478 |
+
* @param object An MLA custom_feed_rule object
|
1479 |
+
* @return string HTML markup to be placed inside the column
|
1480 |
+
*/
|
1481 |
+
function column_parameters( $item ) {
|
1482 |
+
return esc_html( $item->parameters );
|
1483 |
+
}
|
1484 |
+
|
1485 |
+
/**
|
1486 |
+
* Populate the Template Slug column
|
1487 |
+
*
|
1488 |
+
* @since 1.10
|
1489 |
+
*
|
1490 |
+
* @param object An MLA custom_feed_rule object
|
1491 |
+
* @return string HTML markup to be placed inside the column
|
1492 |
+
*/
|
1493 |
+
function column_template_slug( $item ) {
|
1494 |
+
return esc_html( $item->template_slug );
|
1495 |
+
}
|
1496 |
+
|
1497 |
+
/**
|
1498 |
+
* Populate the Tmplate Name column
|
1499 |
+
*
|
1500 |
+
* @since 1.10
|
1501 |
+
*
|
1502 |
+
* @param object An MLA custom_feed_rule object
|
1503 |
+
* @return string HTML markup to be placed inside the column
|
1504 |
+
*/
|
1505 |
+
function column_template_name( $item ) {
|
1506 |
+
return esc_html( $item->template_name );
|
1507 |
+
}
|
1508 |
+
|
1509 |
+
/**
|
1510 |
+
* Populate the Status column
|
1511 |
+
*
|
1512 |
+
* @since 1.10
|
1513 |
+
*
|
1514 |
+
* @param object An MLA custom_feed_rule object
|
1515 |
+
* @return string HTML markup to be placed inside the column
|
1516 |
+
*/
|
1517 |
+
function column_status( $item ) {
|
1518 |
+
if ( $item->active ) {
|
1519 |
+
return 'Active';
|
1520 |
+
} else {
|
1521 |
+
return 'Inactive';
|
1522 |
+
}
|
1523 |
+
}
|
1524 |
+
|
1525 |
+
/**
|
1526 |
+
* Display the pagination, adding view, search and filter arguments
|
1527 |
+
*
|
1528 |
+
* @since 1.10
|
1529 |
+
*
|
1530 |
+
* @param string 'top' | 'bottom'
|
1531 |
+
*/
|
1532 |
+
function pagination( $which ) {
|
1533 |
+
$save_uri = $_SERVER['REQUEST_URI'];
|
1534 |
+
$_SERVER['REQUEST_URI'] = add_query_arg( MLA_Custom_Feed_List_Table::mla_submenu_arguments(), $save_uri );
|
1535 |
+
parent::pagination( $which );
|
1536 |
+
$_SERVER['REQUEST_URI'] = $save_uri;
|
1537 |
+
}
|
1538 |
+
|
1539 |
+
/**
|
1540 |
+
* This method dictates the table's columns and titles
|
1541 |
+
*
|
1542 |
+
* @since 1.10
|
1543 |
+
*
|
1544 |
+
* @return array Column information: 'slugs'=>'Visible Titles'
|
1545 |
+
*/
|
1546 |
+
function get_columns( ) {
|
1547 |
+
return $columns = MLA_Custom_Feed_List_Table::mla_manage_columns_filter();
|
1548 |
+
}
|
1549 |
+
|
1550 |
+
/**
|
1551 |
+
* Returns the list of currently hidden columns from a user option or
|
1552 |
+
* from default values if the option is not set
|
1553 |
+
*
|
1554 |
+
* @since 1.10
|
1555 |
+
*
|
1556 |
+
* @return array Column information,e.g., array(0 => 'ID_parent, 1 => 'title_name')
|
1557 |
+
*/
|
1558 |
+
function get_hidden_columns( ) {
|
1559 |
+
$columns = get_user_option( 'managesettings_page_' . MLACustomFeedExample::SLUG_PREFIX . '-settings-generalcolumnshidden' );
|
1560 |
+
|
1561 |
+
if ( is_array( $columns ) ) {
|
1562 |
+
return $columns;
|
1563 |
+
}
|
1564 |
+
|
1565 |
+
return self::_default_hidden_columns();
|
1566 |
+
}
|
1567 |
+
|
1568 |
+
/**
|
1569 |
+
* Returns an array where the key is the column that needs to be sortable
|
1570 |
+
* and the value is db column to sort by.
|
1571 |
+
*
|
1572 |
+
* @since 1.10
|
1573 |
+
*
|
1574 |
+
* @return array Sortable column information,e.g.,
|
1575 |
+
* 'slugs'=>array('data_values',boolean)
|
1576 |
+
*/
|
1577 |
+
function get_sortable_columns( ) {
|
1578 |
+
return self::$default_sortable_columns;
|
1579 |
+
}
|
1580 |
+
|
1581 |
+
/**
|
1582 |
+
* Returns HTML markup for one view that can be used with this table
|
1583 |
+
*
|
1584 |
+
* @since 1.10
|
1585 |
+
*
|
1586 |
+
* @param string $view_slug View slug
|
1587 |
+
* @param array $custom_field_item count and labels for the View
|
1588 |
+
* @param string $current_view Slug for current view
|
1589 |
+
*
|
1590 |
+
* @return string | false HTML for link to display the view, false if count = zero
|
1591 |
+
*/
|
1592 |
+
function _get_view( $view_slug, $custom_field_item, $current_view ) {
|
1593 |
+
static $base_url = NULL;
|
1594 |
+
|
1595 |
+
$class = ( $view_slug == $current_view ) ? ' class="current"' : '';
|
1596 |
+
|
1597 |
+
// Calculate the common values once per page load
|
1598 |
+
if ( is_null( $base_url ) ) {
|
1599 |
+
// Remember the view filters
|
1600 |
+
$base_url = 'options-general.php?page=' . MLACustomFeedExample::SLUG_PREFIX . '-settings-general&mla_tab=general';
|
1601 |
+
|
1602 |
+
if ( isset( $_REQUEST['s'] ) ) {
|
1603 |
+
//$base_url = add_query_arg( array( 's' => $_REQUEST['s'] ), $base_url );
|
1604 |
+
}
|
1605 |
+
}
|
1606 |
+
|
1607 |
+
$singular = sprintf('%s <span class="count">(%%s)</span>', $custom_field_item['singular'] );
|
1608 |
+
$plural = sprintf('%s <span class="count">(%%s)</span>', $custom_field_item['plural'] );
|
1609 |
+
$nooped_plural = _n_noop( $singular, $plural, 'media-library-assistant' );
|
1610 |
+
return "<a href='" . add_query_arg( array( 'mla_custom_feed_view' => $view_slug ), $base_url )
|
1611 |
+
. "'$class>" . sprintf( translate_nooped_plural( $nooped_plural, $custom_field_item['count'], 'media-library-assistant' ), number_format_i18n( $custom_field_item['count'] ) ) . '</a>';
|
1612 |
+
} // _get_view
|
1613 |
+
|
1614 |
+
/**
|
1615 |
+
* Returns an associative array listing all the views that can be used with this table.
|
1616 |
+
* These are listed across the top of the page and managed by WordPress.
|
1617 |
+
*
|
1618 |
+
* @since 1.10
|
1619 |
+
*
|
1620 |
+
* @return array View information,e.g., array ( id => link )
|
1621 |
+
*/
|
1622 |
+
function get_views( ) {
|
1623 |
+
// Find current view
|
1624 |
+
$current_view = isset( $_REQUEST['mla_custom_feed_view'] ) ? $_REQUEST['mla_custom_feed_view'] : 'all';
|
1625 |
+
|
1626 |
+
// Generate the list of views, retaining keyword search criterion
|
1627 |
+
$s = isset( $_REQUEST['s'] ) ? $_REQUEST['s'] : '';
|
1628 |
+
$custom_feed_items = MLA_Custom_Feed_Query::mla_tabulate_custom_feed_items( $s );
|
1629 |
+
$view_links = array();
|
1630 |
+
foreach ( $custom_feed_items as $slug => $item )
|
1631 |
+
$view_links[ $slug ] = self::_get_view( $slug, $item, $current_view );
|
1632 |
+
|
1633 |
+
return $view_links;
|
1634 |
+
}
|
1635 |
+
|
1636 |
+
/**
|
1637 |
+
* Get an associative array ( option_name => option_title ) with the list
|
1638 |
+
* of bulk actions available on this table.
|
1639 |
+
*
|
1640 |
+
* @since 1.10
|
1641 |
+
*
|
1642 |
+
* @return array Contains all the bulk actions: 'slugs'=>'Visible Titles'
|
1643 |
+
*/
|
1644 |
+
function get_bulk_actions( ) {
|
1645 |
+
return self::mla_get_bulk_actions();
|
1646 |
+
}
|
1647 |
+
|
1648 |
+
/**
|
1649 |
+
* Get an associative array ( option_name => option_title ) with the list
|
1650 |
+
* of bulk actions available on this table.
|
1651 |
+
*
|
1652 |
+
* @since 1.10
|
1653 |
+
*
|
1654 |
+
* @return array Contains all the bulk actions: 'slugs'=>'Visible Titles'
|
1655 |
+
*/
|
1656 |
+
public static function mla_get_bulk_actions( ) {
|
1657 |
+
$actions = array();
|
1658 |
+
|
1659 |
+
$actions['delete'] = 'Delete Permanently';
|
1660 |
+
|
1661 |
+
return $actions;
|
1662 |
+
}
|
1663 |
+
|
1664 |
+
/**
|
1665 |
+
* Get the current action selected from the bulk actions dropdown
|
1666 |
+
*
|
1667 |
+
* @since 1.10
|
1668 |
+
*
|
1669 |
+
* @return string|false The action name or False if no action was selected
|
1670 |
+
*/
|
1671 |
+
public static function mla_current_bulk_action( ) {
|
1672 |
+
$action = false;
|
1673 |
+
|
1674 |
+
if ( isset( $_REQUEST['action'] ) ) {
|
1675 |
+
if ( -1 != $_REQUEST['action'] ) {
|
1676 |
+
return $_REQUEST['action'];
|
1677 |
+
}
|
1678 |
+
|
1679 |
+
$action = 'none';
|
1680 |
+
} // isset action
|
1681 |
+
|
1682 |
+
if ( isset( $_REQUEST['action2'] ) ) {
|
1683 |
+
if ( -1 != $_REQUEST['action2'] ) {
|
1684 |
+
return $_REQUEST['action2'];
|
1685 |
+
}
|
1686 |
+
|
1687 |
+
$action = 'none';
|
1688 |
+
} // isset action2
|
1689 |
+
|
1690 |
+
return $action;
|
1691 |
+
}
|
1692 |
+
|
1693 |
+
/**
|
1694 |
+
* Get dropdown box of rule status values, i.e., Active/Inactive.
|
1695 |
+
*
|
1696 |
+
* @since 1.10
|
1697 |
+
*
|
1698 |
+
* @param string $selected Optional. Currently selected status. Default 'any'.
|
1699 |
+
* @return string HTML markup for dropdown box.
|
1700 |
+
*/
|
1701 |
+
public static function mla_get_custom_field_status_dropdown( $selected = 'any' ) {
|
1702 |
+
$dropdown = '<select name="mla_custom_feed_status" class="postform" id="name">' . "\n";
|
1703 |
+
|
1704 |
+
$selected_attribute = ( $selected == 'any' ) ? ' selected="selected"' : '';
|
1705 |
+
$dropdown .= "\t" . sprintf( '<option value="any"%1$s>%2$s</option>', $selected_attribute, _wp_specialchars( 'Any Status' ) ) . "\n";
|
1706 |
+
|
1707 |
+
$selected_attribute = ( $selected == 'active' ) ? ' selected="selected"' : '';
|
1708 |
+
$dropdown .= "\t" . sprintf( '<option value="active"%1$s>%2$s</option>', $selected_attribute, _wp_specialchars( 'Active' ) ) . "\n";
|
1709 |
+
|
1710 |
+
$selected_attribute = ( $selected == 'inactive' ) ? ' selected="selected"' : '';
|
1711 |
+
$dropdown .= "\t" . sprintf( '<option value="inactive"%1$s>%2$s</option>', $selected_attribute, _wp_specialchars( 'Inactive' ) ) . "\n";
|
1712 |
+
|
1713 |
+
$dropdown .= '</select>';
|
1714 |
+
|
1715 |
+
return $dropdown;
|
1716 |
+
}
|
1717 |
+
|
1718 |
+
/**
|
1719 |
+
* Extra controls to be displayed between bulk actions and pagination
|
1720 |
+
*
|
1721 |
+
* Modeled after class-wp-posts-list-table.php in wp-admin/includes.
|
1722 |
+
*
|
1723 |
+
* @since 1.10
|
1724 |
+
*
|
1725 |
+
* @param string 'top' or 'bottom', i.e., above or below the table rows
|
1726 |
+
*
|
1727 |
+
* @return void
|
1728 |
+
*/
|
1729 |
+
function extra_tablenav( $which ) {
|
1730 |
+
// Decide which actions to show
|
1731 |
+
if ( 'top' == $which ) {
|
1732 |
+
$actions = array( 'mla_custom_feed_status', 'mla_filter' );
|
1733 |
+
} else {
|
1734 |
+
$actions = array();
|
1735 |
+
}
|
1736 |
+
|
1737 |
+
if ( empty( $actions ) ) {
|
1738 |
+
return;
|
1739 |
+
}
|
1740 |
+
|
1741 |
+
echo ( '<div class="alignleft actions">' );
|
1742 |
+
|
1743 |
+
foreach ( $actions as $action ) {
|
1744 |
+
switch ( $action ) {
|
1745 |
+
case 'mla_custom_feed_status':
|
1746 |
+
echo self::mla_get_custom_field_status_dropdown( isset( $_REQUEST['mla_custom_feed_status'] ) ? $_REQUEST['mla_custom_feed_status'] : 'any' );
|
1747 |
+
break;
|
1748 |
+
case 'mla_filter':
|
1749 |
+
submit_button( 'Filter', 'secondary', 'mla_filter', false, array( 'id' => 'template-query-submit' ) );
|
1750 |
+
break;
|
1751 |
+
default:
|
1752 |
+
// ignore anything else
|
1753 |
+
}
|
1754 |
+
}
|
1755 |
+
|
1756 |
+
echo ( '</div>' );
|
1757 |
+
}
|
1758 |
+
|
1759 |
+
/**
|
1760 |
+
* Prepares the list of items for displaying
|
1761 |
+
*
|
1762 |
+
* This is where you prepare your data for display. This method will usually
|
1763 |
+
* be used to query the database, sort and filter the data, and generally
|
1764 |
+
* get it ready to be displayed. At a minimum, we should set $this->items and
|
1765 |
+
* $this->set_pagination_args().
|
1766 |
+
*
|
1767 |
+
* @since 1.10
|
1768 |
+
*
|
1769 |
+
* @return void
|
1770 |
+
*/
|
1771 |
+
function prepare_items( ) {
|
1772 |
+
$this->_column_headers = array(
|
1773 |
+
$this->get_columns(),
|
1774 |
+
$this->get_hidden_columns(),
|
1775 |
+
$this->get_sortable_columns()
|
1776 |
+
);
|
1777 |
+
|
1778 |
+
// REQUIRED for pagination.
|
1779 |
+
$total_items = MLA_Custom_Feed_Query::mla_count_custom_feed_settings( $_REQUEST );
|
1780 |
+
$user = get_current_user_id();
|
1781 |
+
$screen = get_current_screen();
|
1782 |
+
$option = $screen->get_option( 'per_page', 'option' );
|
1783 |
+
if ( is_string( $option ) ) {
|
1784 |
+
$per_page = get_user_meta( $user, $option, true );
|
1785 |
+
} else {
|
1786 |
+
$per_page = 10;
|
1787 |
+
}
|
1788 |
+
|
1789 |
+
if ( empty( $per_page ) || $per_page < 1 ) {
|
1790 |
+
$per_page = $screen->get_option( 'per_page', 'default' );
|
1791 |
+
}
|
1792 |
+
|
1793 |
+
// REQUIRED. We also have to register our pagination options & calculations.
|
1794 |
+
$this->set_pagination_args( array(
|
1795 |
+
'total_items' => $total_items,
|
1796 |
+
'per_page' => $per_page,
|
1797 |
+
'total_pages' => ceil( $total_items / $per_page )
|
1798 |
+
) );
|
1799 |
+
|
1800 |
+
$current_page = $this->get_pagenum();
|
1801 |
+
|
1802 |
+
/*
|
1803 |
+
* REQUIRED. Assign sorted and paginated data to the items property, where
|
1804 |
+
* it can be used by the rest of the class.
|
1805 |
+
*/
|
1806 |
+
$this->items = MLA_Custom_Feed_Query::mla_query_custom_feed_settings( $_REQUEST, ( ( $current_page - 1 ) * $per_page ), $per_page );
|
1807 |
+
}
|
1808 |
+
|
1809 |
+
/**
|
1810 |
+
* Generates (echoes) content for a single row of the table
|
1811 |
+
*
|
1812 |
+
* @since 1.10
|
1813 |
+
*
|
1814 |
+
* @param object the current item
|
1815 |
+
*
|
1816 |
+
* @return void Echoes the row HTML
|
1817 |
+
*/
|
1818 |
+
function single_row( $item ) {
|
1819 |
+
static $row_class = '';
|
1820 |
+
$row_class = ( $row_class == '' ? ' class="alternate"' : '' );
|
1821 |
+
|
1822 |
+
echo '<tr id="custom_feed-' . $item->post_ID . '"' . $row_class . '>';
|
1823 |
+
echo parent::single_row_columns( $item );
|
1824 |
+
echo '</tr>';
|
1825 |
+
}
|
1826 |
+
} // class MLA_Custom_Feed_List_Table
|
1827 |
+
|
1828 |
+
/**
|
1829 |
+
* Class MLA (Media Library Assistant) Custom Feed Query implements the
|
1830 |
+
* searchable database of custom RSS feed settings.
|
1831 |
+
*
|
1832 |
+
* @package MLA Custom Feed Example
|
1833 |
+
* @since 1.10
|
1834 |
+
*/
|
1835 |
+
class MLA_Custom_Feed_Query {
|
1836 |
+
|
1837 |
+
/**
|
1838 |
+
* Callback to sort array by a 'name' key.
|
1839 |
+
*
|
1840 |
+
* @since 1.10
|
1841 |
+
*
|
1842 |
+
* @param array $a The first array.
|
1843 |
+
* @param array $b The second array.
|
1844 |
+
* @return integer The comparison result.
|
1845 |
+
*/
|
1846 |
+
private static function _sort_uname_callback( $a, $b ) {
|
1847 |
+
return strnatcasecmp( $a['name'], $b['name'] );
|
1848 |
+
}
|
1849 |
+
|
1850 |
+
/**
|
1851 |
+
* In-memory representation of the option settings, except "feeds"
|
1852 |
+
*
|
1853 |
+
* @since 1.10
|
1854 |
+
*
|
1855 |
+
* @var array $_settings {
|
1856 |
+
* @type boolean $add_mlafeeds Add active feeds to WordPress
|
1857 |
+
* }
|
1858 |
+
*/
|
1859 |
+
private static $_settings = NULL;
|
1860 |
+
|
1861 |
+
/**
|
1862 |
+
* One or more options have been changed since loading
|
1863 |
+
*
|
1864 |
+
* @since 1.10
|
1865 |
+
*
|
1866 |
+
* @var boolean
|
1867 |
+
*/
|
1868 |
+
private static $_settings_changed = false;
|
1869 |
+
|
1870 |
+
/**
|
1871 |
+
* In-memory representation of the custom feed properties
|
1872 |
+
*
|
1873 |
+
* @since 1.10
|
1874 |
+
*
|
1875 |
+
* @var array $_custom_feed_settings {
|
1876 |
+
* Items by ID. Key $$ID is an index number starting with 1.
|
1877 |
+
*
|
1878 |
+
* @type array $$ID {
|
1879 |
+
* Rule elements.
|
1880 |
+
*
|
1881 |
+
* @type integer $post_ID Feed ID; equal to $$ID.
|
1882 |
+
* @type string $slug Feed slug.
|
1883 |
+
* @type string $type Feed type; 'rss', 'rss2', or 'rss-http'.
|
1884 |
+
* @type string $title Feed Title, default; get_wp_title_rss().
|
1885 |
+
* @type string $link The URL to the HTML website corresponding to the channel, default; get_bloginfo_rss('url').
|
1886 |
+
* @type string $description Feed Description, default; get_bloginfo_rss('description').
|
1887 |
+
* @type string $last_build_date Feed last update; 'current' or 'modified'.
|
1888 |
+
* @type integer $ttl Time-to-live (minutes) how long can the feed be cached, default; not added to feed.
|
1889 |
+
* @type string $update_period Period over which feed is updated; ( 'none', 'hourly' | 'daily' | 'weekly' | 'monthly' | 'yearly' ).
|
1890 |
+
* @type integer $update_frequency How often feed is updated within each period.
|
1891 |
+
* @type string $update_base Base date for the publishing schedule, e.g., 2000-01-01T12:00+00:00.
|
1892 |
+
* @type string $taxonomies Taxonomies from which to take "Category" values; default none.
|
1893 |
+
* @type string $parameters Data selection parameters for mla_get_shortcode_attachments, default; post_parent=all posts_per_page=6.
|
1894 |
+
* @type string $template_slug Theme "slug" argument for get_template_part().
|
1895 |
+
* @type string $template_name Theme "name" argument for get_template_part().
|
1896 |
+
* @type boolean $active True if feed should be added and processed.
|
1897 |
+
* @type boolean $changed True if the rule has changed since loading.
|
1898 |
+
* @type boolean $deleted True if the rule has been deleted since loading.
|
1899 |
+
* }
|
1900 |
+
*/
|
1901 |
+
private static $_custom_feed_settings = NULL;
|
1902 |
+
|
1903 |
+
/**
|
1904 |
+
* Highest existing custom feed setting ID value
|
1905 |
+
*
|
1906 |
+
* @since 1.10
|
1907 |
+
*
|
1908 |
+
* @var integer
|
1909 |
+
*/
|
1910 |
+
private static $_custom_feed_highest_ID = 0;
|
1911 |
+
|
1912 |
+
/**
|
1913 |
+
* Default processing options
|
1914 |
+
*
|
1915 |
+
* @since 1.00
|
1916 |
+
*
|
1917 |
+
* @var array
|
1918 |
+
*/
|
1919 |
+
private static $_default_settings = array (
|
1920 |
+
'add_mlafeeds' => true,
|
1921 |
+
'feeds' => array(
|
1922 |
+
1 => array(
|
1923 |
+
'slug' => 'mlafeed',
|
1924 |
+
'type' => 'rss-http',
|
1925 |
+
'title' => '',
|
1926 |
+
'link' => '',
|
1927 |
+
'description' => '',
|
1928 |
+
'last_build_date' => 'current',
|
1929 |
+
'ttl' => 0,
|
1930 |
+
'update_period' => 'hourly',
|
1931 |
+
'update_frequency' => 1,
|
1932 |
+
'update_base' => '2000-01-01T12:00+00:00',
|
1933 |
+
'taxonomies' => 'attachment_category,attachment_tag',
|
1934 |
+
'parameters' => 'post_parent=all posts_per_page=6',
|
1935 |
+
'template_slug' => '', // 'rss',
|
1936 |
+
'template_name' => '', // 'custom-feed-template',
|
1937 |
+
'active' => true,
|
1938 |
+
), // mlafeed
|
1939 |
+
), // feeds
|
1940 |
+
);
|
1941 |
+
|
1942 |
+
/**
|
1943 |
+
* Assemble the in-memory representation of the custom feed settings
|
1944 |
+
*
|
1945 |
+
* @since 1.10
|
1946 |
+
*
|
1947 |
+
* @param boolean $force_refresh Optional. Force a reload of rules. Default false.
|
1948 |
+
* @return boolean Success (true) or failure (false) of the operation
|
1949 |
+
*/
|
1950 |
+
private static function _get_custom_feed_settings( $force_refresh = false ) {
|
1951 |
+
if ( false == $force_refresh && NULL != self::$_custom_feed_settings ) {
|
1952 |
+
return true;
|
1953 |
+
}
|
1954 |
+
|
1955 |
+
self::$_settings = array();
|
1956 |
+
self::$_settings_changed = false;
|
1957 |
+
self::$_custom_feed_settings = array();
|
1958 |
+
self::$_custom_feed_highest_ID = 0;
|
1959 |
+
$feed_slugs = array();
|
1960 |
+
$force_flush = false;
|
1961 |
+
// Update the plugin options from the wp_options table or set defaults
|
1962 |
+
$current_values = get_option( MLACustomFeedExample::SLUG_PREFIX . '-settings' );
|
1963 |
+
//error_log( __LINE__ . ' MLA_Custom_Feed_Query::_get_custom_feed_settings get_option = ' . var_export( $current_values, true ), 0 );
|
1964 |
+
if ( !( is_array( $current_values ) && !empty( $current_values['feeds'] ) ) ) {
|
1965 |
+
$current_values = self::$_default_settings;
|
1966 |
+
// Rewrite rules must be reset to default feed names
|
1967 |
+
$force_flush = true;
|
1968 |
+
//error_log( __LINE__ . ' MLA_Custom_Feed_Query::_get_custom_feed_settings defaults = ' . var_export( $current_values, true ), 0 );
|
1969 |
+
}
|
1970 |
+
|
1971 |
+
foreach( $current_values['feeds'] as $current_value ) {
|
1972 |
+
$feed_slugs[ $current_value['slug'] ] = $current_value['slug'];
|
1973 |
+
$current_value['post_ID'] = ++self::$_custom_feed_highest_ID;
|
1974 |
+
$current_value['changed'] = false;
|
1975 |
+
$current_value['deleted'] = false;
|
1976 |
+
self::$_custom_feed_settings[ self::$_custom_feed_highest_ID ] = $current_value;
|
1977 |
+
}
|
1978 |
+
//error_log( __LINE__ . ' MLA_Custom_Feed_Query::_get_custom_feed_settings _custom_feed_settings = ' . var_export( self::$_custom_feed_settings, true ), 0 );
|
1979 |
+
|
1980 |
+
unset( $current_values['feeds'] );
|
1981 |
+
self::$_settings = $current_values;
|
1982 |
+
self::$_settings['feed_slugs'] = $feed_slugs;
|
1983 |
+
//error_log( __LINE__ . ' MLA_Custom_Feed_Query::_get_custom_feed_settings _settings = ' . var_export( self::$_settings, true ), 0 );
|
1984 |
+
|
1985 |
+
if ( $force_flush ) {
|
1986 |
+
self::flush_custom_feeds( $feed_slugs );
|
1987 |
+
}
|
1988 |
+
|
1989 |
+
return true;
|
1990 |
+
}
|
1991 |
+
|
1992 |
+
/**
|
1993 |
+
* Flush the in-memory representation of the custom feed settings to the option value
|
1994 |
+
*
|
1995 |
+
* @since 1.10
|
1996 |
+
*
|
1997 |
+
* @return mixed Number of changes (integer) or failure (false) of the operation
|
1998 |
+
*/
|
1999 |
+
public static function mla_put_custom_feed_settings() {
|
2000 |
+
if ( NULL === self::$_custom_feed_settings ) {
|
2001 |
+
return false;
|
2002 |
+
}
|
2003 |
+
|
2004 |
+
$new_settings = self::$_settings;
|
2005 |
+
unset( $new_settings['feed_slugs'] );
|
2006 |
+
$new_settings['feeds'] = array();
|
2007 |
+
$settings_changed = self::$_settings_changed ? 1 : 0;
|
2008 |
+
$feed_slugs = array();
|
2009 |
+
|
2010 |
+
foreach( self::$_custom_feed_settings as $ID => $current_value ) {
|
2011 |
+
if ( $current_value['deleted'] ) {
|
2012 |
+
$settings_changed++;
|
2013 |
+
continue;
|
2014 |
+
}
|
2015 |
+
|
2016 |
+
if ( $current_value['changed'] ) {
|
2017 |
+
$settings_changed++;
|
2018 |
+
}
|
2019 |
+
|
2020 |
+
$new_value = $current_value;
|
2021 |
+
unset( $new_value['post_ID'] );
|
2022 |
+
unset( $new_value['changed'] );
|
2023 |
+
unset( $new_value['deleted'] );
|
2024 |
+
$new_settings['feeds'][] = $new_value;
|
2025 |
+
$feed_slugs[ $current_value['slug'] ] = $current_value['slug'];
|
2026 |
+
}
|
2027 |
+
|
2028 |
+
if ( 0 < $settings_changed ) {
|
2029 |
+
//error_log( __LINE__ . ' MLA_Custom_Feed_Query::mla_put_custom_feed_settings new_settings = ' . var_export( $new_settings, true ), 0 );
|
2030 |
+
if ( self::$_settings['feed_slugs'] !== $feed_slugs ) {
|
2031 |
+
self::flush_custom_feeds( $feed_slugs );
|
2032 |
+
}
|
2033 |
+
|
2034 |
+
$update_result = update_option( MLACustomFeedExample::SLUG_PREFIX . '-settings', $new_settings, false );
|
2035 |
+
self::_get_custom_feed_settings( true );
|
2036 |
+
|
2037 |
+
if ( $update_result ) {
|
2038 |
+
return $settings_changed;
|
2039 |
+
}
|
2040 |
+
|
2041 |
+
return false;
|
2042 |
+
}
|
2043 |
+
|
2044 |
+
return 0;
|
2045 |
+
}
|
2046 |
+
|
2047 |
+
/**
|
2048 |
+
* Add the custom feeds and then flush the rewrite rules
|
2049 |
+
*
|
2050 |
+
* @since 1.10
|
2051 |
+
*
|
2052 |
+
* @param array $slugs Custom feed slugs
|
2053 |
+
*/
|
2054 |
+
public static function flush_custom_feeds( $slugs ) {
|
2055 |
+
global $wp_rewrite;
|
2056 |
+
//error_log( __LINE__ . ' MLA_Custom_Feed_Query::flush_custom_feeds slugs = ' . var_export( $slugs, true ), 0 );
|
2057 |
+
|
2058 |
+
foreach ( $slugs as $slug ) {
|
2059 |
+
add_feed( $slug, 'MLACustomFeedExample::mla_custom_feed' );
|
2060 |
+
}
|
2061 |
+
|
2062 |
+
$wp_rewrite->flush_rules( false );
|
2063 |
+
}
|
2064 |
+
|
2065 |
+
/**
|
2066 |
+
* Get a custom feed option setting
|
2067 |
+
*
|
2068 |
+
* @since 1.10
|
2069 |
+
*
|
2070 |
+
* @param string $name Option name
|
2071 |
+
*
|
2072 |
+
* @return mixed Option value, if it exists else NULL
|
2073 |
+
*/
|
2074 |
+
public static function get_option( $name ) {
|
2075 |
+
if ( !self::_get_custom_feed_settings() ) {
|
2076 |
+
return NULL;
|
2077 |
+
}
|
2078 |
+
|
2079 |
+
if ( !isset( self::$_settings[ $name ] ) ) {
|
2080 |
+
return NULL;
|
2081 |
+
}
|
2082 |
+
|
2083 |
+
return self::$_settings[ $name ];
|
2084 |
+
}
|
2085 |
+
|
2086 |
+
/**
|
2087 |
+
* Update a custom feed option setting
|
2088 |
+
*
|
2089 |
+
* @since 1.10
|
2090 |
+
*
|
2091 |
+
* @param string $name Option name
|
2092 |
+
* @param mixed $new_value Option value
|
2093 |
+
*
|
2094 |
+
* @return mixed True if option value changed, false if value unchanged, NULL if failure
|
2095 |
+
*/
|
2096 |
+
public static function update_option( $name, $new_value ) {
|
2097 |
+
if ( !self::_get_custom_feed_settings() ) {
|
2098 |
+
return NULL;
|
2099 |
+
}
|
2100 |
+
|
2101 |
+
$old_value = isset( self::$_settings[ $name ] ) ? self::$_settings[ $name ] : NULL;
|
2102 |
+
|
2103 |
+
if ( $new_value === $old_value ) {
|
2104 |
+
return false;
|
2105 |
+
}
|
2106 |
+
|
2107 |
+
self::$_settings[ $name ] = $new_value;
|
2108 |
+
self::$_settings_changed = true;
|
2109 |
+
|
2110 |
+
return true;
|
2111 |
+
}
|
2112 |
+
|
2113 |
+
/**
|
2114 |
+
* Delete WordPress wp_options entry
|
2115 |
+
*
|
2116 |
+
* @since 1.10
|
2117 |
+
*
|
2118 |
+
* @return boolean True if reset worked else false
|
2119 |
+
*/
|
2120 |
+
public static function delete_settings() {
|
2121 |
+
delete_option( MLACustomFeedExample::SLUG_PREFIX . '-settings' );
|
2122 |
+
return self::_get_custom_feed_settings( true );
|
2123 |
+
}
|
2124 |
+
|
2125 |
+
/**
|
2126 |
+
* Sanitize and expand query arguments from request variables
|
2127 |
+
*
|
2128 |
+
* @since 1.10
|
2129 |
+
*
|
2130 |
+
* @param array query parameters from web page, usually found in $_REQUEST
|
2131 |
+
* @param int Optional number of rows (default 0) to skip over to reach desired page
|
2132 |
+
* @param int Optional number of rows on each page (0 = all rows, default)
|
2133 |
+
*
|
2134 |
+
* @return array revised arguments suitable for query
|
2135 |
+
*/
|
2136 |
+
private static function _prepare_custom_feed_settings_query( $raw_request, $offset = 0, $count = 0 ) {
|
2137 |
+
/*
|
2138 |
+
* Go through the $raw_request, take only the arguments that are used in the query and
|
2139 |
+
* sanitize or validate them.
|
2140 |
+
*/
|
2141 |
+
if ( !is_array( $raw_request ) ) {
|
2142 |
+
error_log( __LINE__ . ' ERROR: MLA_Custom_Feed_Query::_prepare_custom_feed_settings_query non-array raw_request = ' . var_export( $raw_request, true ), 0 );
|
2143 |
+
return NULL;
|
2144 |
+
}
|
2145 |
+
|
2146 |
+
$clean_request = array (
|
2147 |
+
'mla_custom_feed_view' => 'all',
|
2148 |
+
'mla_custom_feed_status' => 'any',
|
2149 |
+
'orderby' => 'none',
|
2150 |
+
'order' => 'ASC',
|
2151 |
+
's' => ''
|
2152 |
+
);
|
2153 |
+
|
2154 |
+
foreach ( $raw_request as $key => $value ) {
|
2155 |
+
switch ( $key ) {
|
2156 |
+
case 'mla_custom_feed_view':
|
2157 |
+
case 'mla_custom_feed_status':
|
2158 |
+
$clean_request[ $key ] = $value;
|
2159 |
+
break;
|
2160 |
+
case 'orderby':
|
2161 |
+
if ( 'none' == $value ) {
|
2162 |
+
$clean_request[ $key ] = $value;
|
2163 |
+
} else {
|
2164 |
+
if ( array_key_exists( $value, MLA_Custom_Feed_List_Table::mla_get_sortable_columns() ) ) {
|
2165 |
+
$clean_request[ $key ] = $value;
|
2166 |
+
}
|
2167 |
+
}
|
2168 |
+
break;
|
2169 |
+
case 'order':
|
2170 |
+
switch ( $value = strtoupper ($value ) ) {
|
2171 |
+
case 'ASC':
|
2172 |
+
case 'DESC':
|
2173 |
+
$clean_request[ $key ] = $value;
|
2174 |
+
break;
|
2175 |
+
default:
|
2176 |
+
$clean_request[ $key ] = 'ASC';
|
2177 |
+
}
|
2178 |
+
break;
|
2179 |
+
// ['s'] - Search items by one or more keywords
|
2180 |
+
case 's':
|
2181 |
+
$clean_request[ $key ] = stripslashes( trim( $value ) );
|
2182 |
+
break;
|
2183 |
+
default:
|
2184 |
+
// ignore anything else in $_REQUEST
|
2185 |
+
} // switch $key
|
2186 |
+
} // foreach $raw_request
|
2187 |
+
|
2188 |
+
// Ignore incoming paged value; use offset and count instead
|
2189 |
+
if ( ( (int) $count ) > 0 ) {
|
2190 |
+
$clean_request['offset'] = $offset;
|
2191 |
+
$clean_request['posts_per_page'] = $count;
|
2192 |
+
}
|
2193 |
+
|
2194 |
+
return $clean_request;
|
2195 |
+
}
|
2196 |
+
|
2197 |
+
/**
|
2198 |
+
* Query the plugin_examples items
|
2199 |
+
*
|
2200 |
+
* @since 1.10
|
2201 |
+
*
|
2202 |
+
* @param array query parameters from web page, usually found in $_REQUEST
|
2203 |
+
*
|
2204 |
+
* @return array query results; array of MLA post_mime_type objects
|
2205 |
+
*/
|
2206 |
+
private static function _execute_custom_feed_settings_query( $request ) {
|
2207 |
+
if ( !self::_get_custom_feed_settings() ) {
|
2208 |
+
return array ();
|
2209 |
+
}
|
2210 |
+
|
2211 |
+
// Sort and filter the list
|
2212 |
+
$keywords = isset( $request['s'] ) ? $request['s'] : '';
|
2213 |
+
preg_match_all('/".*?("|$)|((?<=[\t ",+])|^)[^\t ",+]+/', $keywords, $matches);
|
2214 |
+
$keywords = array_map( 'MLAQuery::mla_search_terms_tidy', $matches[0]);
|
2215 |
+
$view = isset( $request['mla_custom_feed_view'] ) ? $request['mla_custom_feed_view'] : 'all';
|
2216 |
+
$status = isset( $request['mla_custom_feed_status'] ) ? $request['mla_custom_feed_status'] : 'any';
|
2217 |
+
$index = 0;
|
2218 |
+
$sortable_items = array();
|
2219 |
+
|
2220 |
+
foreach ( self::$_custom_feed_settings as $ID => $value ) {
|
2221 |
+
if ( !empty( $keywords ) ) {
|
2222 |
+
$found = false;
|
2223 |
+
foreach ( $keywords as $keyword ) {
|
2224 |
+
$found |= false !== stripos( $value['slug'], $keyword );
|
2225 |
+
$found |= false !== stripos( $value['title'], $keyword );
|
2226 |
+
$found |= false !== stripos( $value['description'], $keyword );
|
2227 |
+
$found |= false !== stripos( $value['taxonomies'], $keyword );
|
2228 |
+
$found |= false !== stripos( $value['parameters'], $keyword );
|
2229 |
+
$found |= false !== stripos( $value['template_slug'], $keyword );
|
2230 |
+
$found |= false !== stripos( $value['template_name'], $keyword );
|
2231 |
+
}
|
2232 |
+
|
2233 |
+
if ( !$found ) {
|
2234 |
+
continue;
|
2235 |
+
}
|
2236 |
+
}
|
2237 |
+
|
2238 |
+
switch( $view ) {
|
2239 |
+
case 'all':
|
2240 |
+
default:
|
2241 |
+
$found = true;
|
2242 |
+
}// $view
|
2243 |
+
|
2244 |
+
if ( !$found ) {
|
2245 |
+
continue;
|
2246 |
+
}
|
2247 |
+
|
2248 |
+
switch( $status ) {
|
2249 |
+
case 'active':
|
2250 |
+
$found = $value['active'];
|
2251 |
+
break;
|
2252 |
+
case 'inactive':
|
2253 |
+
$found = !$value['active'];
|
2254 |
+
break;
|
2255 |
+
default:
|
2256 |
+
$found = true;
|
2257 |
+
}// $view
|
2258 |
+
|
2259 |
+
if ( !$found ) {
|
2260 |
+
continue;
|
2261 |
+
}
|
2262 |
+
|
2263 |
+
switch ( $request['orderby'] ) {
|
2264 |
+
case 'slug':
|
2265 |
+
case 'type':
|
2266 |
+
case 'title':
|
2267 |
+
case 'link':
|
2268 |
+
case 'description':
|
2269 |
+
case 'last_build_date':
|
2270 |
+
case 'update_period':
|
2271 |
+
case 'update_base':
|
2272 |
+
case 'taxonomies':
|
2273 |
+
case 'parameters':
|
2274 |
+
case 'template_slug':
|
2275 |
+
case 'template_name':
|
2276 |
+
$sortable_items[ ( empty( $value[ $request['orderby'] ] ) ? chr(1) : $value[ $request['orderby'] ] ) . $ID ] = (object) $value;
|
2277 |
+
break;
|
2278 |
+
case 'ttl':
|
2279 |
+
case 'update_frequency':
|
2280 |
+
$sortable_items[ ( empty( $value[ $request['orderby'] ] ) ? 0 : absint( $value[ $request['orderby'] ] ) * 100 ) + absint( $ID ) ] = (object) $value;
|
2281 |
+
break;
|
2282 |
+
case 'status':
|
2283 |
+
$sortable_items[ ( $value['active'] ? 'Active' : 'Inactive' ) . $ID ] = (object) $value;
|
2284 |
+
break;
|
2285 |
+
default:
|
2286 |
+
$sortable_items[ absint( $ID ) ] = (object) $value;
|
2287 |
+
break;
|
2288 |
+
} //orderby
|
2289 |
+
}
|
2290 |
+
|
2291 |
+
$sorted_items = array();
|
2292 |
+
$sorted_keys = array_keys( $sortable_items );
|
2293 |
+
natcasesort( $sorted_keys );
|
2294 |
+
foreach ( $sorted_keys as $key ) {
|
2295 |
+
$sorted_items[] = $sortable_items[ $key ];
|
2296 |
+
}
|
2297 |
+
|
2298 |
+
if ( 'DESC' == $request['order'] ) {
|
2299 |
+
$sorted_items = array_reverse( $sorted_items, true );
|
2300 |
+
}
|
2301 |
+
|
2302 |
+
// Paginate the sorted list
|
2303 |
+
$results = array();
|
2304 |
+
$offset = isset( $request['offset'] ) ? $request['offset'] : 0;
|
2305 |
+
$count = isset( $request['posts_per_page'] ) ? $request['posts_per_page'] : -1;
|
2306 |
+
foreach ( $sorted_items as $value ) {
|
2307 |
+
if ( $offset ) {
|
2308 |
+
$offset--;
|
2309 |
+
} elseif ( $count-- ) {
|
2310 |
+
$results[] = $value;
|
2311 |
+
} else {
|
2312 |
+
break;
|
2313 |
+
}
|
2314 |
+
}
|
2315 |
+
|
2316 |
+
return $results;
|
2317 |
+
}
|
2318 |
+
|
2319 |
+
/**
|
2320 |
+
* Get the total number of MLA custom_feed objects
|
2321 |
+
*
|
2322 |
+
* @since 1.10
|
2323 |
+
*
|
2324 |
+
* @param array Query variables, e.g., from $_REQUEST
|
2325 |
+
*
|
2326 |
+
* @return integer Number of MLA custom_feed objects
|
2327 |
+
*/
|
2328 |
+
public static function mla_count_custom_feed_settings( $request ) {
|
2329 |
+
$request = self::_prepare_custom_feed_settings_query( $request );
|
2330 |
+
$results = self::_execute_custom_feed_settings_query( $request );
|
2331 |
+
return count( $results );
|
2332 |
+
}
|
2333 |
+
|
2334 |
+
/**
|
2335 |
+
* Retrieve MLA custom_feed objects for list table display
|
2336 |
+
*
|
2337 |
+
* @since 1.10
|
2338 |
+
*
|
2339 |
+
* @param array query parameters from web page, usually found in $_REQUEST
|
2340 |
+
* @param int number of rows to skip over to reach desired page
|
2341 |
+
* @param int number of rows on each page
|
2342 |
+
*
|
2343 |
+
* @return array MLA custom_feed objects
|
2344 |
+
*/
|
2345 |
+
public static function mla_query_custom_feed_settings( $request, $offset, $count ) {
|
2346 |
+
$request = self::_prepare_custom_feed_settings_query( $request, $offset, $count );
|
2347 |
+
$results = self::_execute_custom_feed_settings_query( $request );
|
2348 |
+
return $results;
|
2349 |
+
}
|
2350 |
+
|
2351 |
+
/**
|
2352 |
+
* Find a custom feed ID given its slug
|
2353 |
+
*
|
2354 |
+
* @since 1.10
|
2355 |
+
*
|
2356 |
+
* @param string $slug MLA custom feed slug.
|
2357 |
+
* @return integer Feed ID if the feed exists else zero (0).
|
2358 |
+
*/
|
2359 |
+
public static function mla_find_custom_feed_ID( $slug ) {
|
2360 |
+
if ( !self::_get_custom_feed_settings() ) {
|
2361 |
+
return false;
|
2362 |
+
}
|
2363 |
+
|
2364 |
+
foreach( self::$_custom_feed_settings as $ID => $feed ) {
|
2365 |
+
if ( $slug === $feed['slug'] ) {
|
2366 |
+
return $ID;
|
2367 |
+
}
|
2368 |
+
}
|
2369 |
+
|
2370 |
+
return 0;
|
2371 |
+
}
|
2372 |
+
|
2373 |
+
/**
|
2374 |
+
* Return the custom field slugs
|
2375 |
+
*
|
2376 |
+
* @since 1.10
|
2377 |
+
*
|
2378 |
+
* @param string $status Optional. 'active', 'inactive' or 'any' (default).
|
2379 |
+
* @return array MLA custom_feed ID => slug
|
2380 |
+
*/
|
2381 |
+
public static function mla_custom_feed_slugs( $status = 'any' ) {
|
2382 |
+
$slugs = array();
|
2383 |
+
|
2384 |
+
if ( !self::_get_custom_feed_settings() ) {
|
2385 |
+
return $slugs;
|
2386 |
+
}
|
2387 |
+
|
2388 |
+
foreach( self::$_custom_feed_settings as $ID => $feed ) {
|
2389 |
+
if ( $feed['deleted'] ) {
|
2390 |
+
continue;
|
2391 |
+
}
|
2392 |
+
|
2393 |
+
if ( $feed['active'] ) {
|
2394 |
+
if ( 'inactive' === $status ) {
|
2395 |
+
continue;
|
2396 |
+
}
|
2397 |
+
} else {
|
2398 |
+
if ( 'active' === $status ) {
|
2399 |
+
continue;
|
2400 |
+
}
|
2401 |
+
}
|
2402 |
+
|
2403 |
+
$slugs[ $ID ] = $feed['slug'];
|
2404 |
+
}
|
2405 |
+
|
2406 |
+
return $slugs;
|
2407 |
+
}
|
2408 |
+
|
2409 |
+
/**
|
2410 |
+
* Find a custom feed given its ID
|
2411 |
+
*
|
2412 |
+
* @since 1.10
|
2413 |
+
*
|
2414 |
+
* @param integer $ID MLA custom feed ID
|
2415 |
+
*
|
2416 |
+
* @return array MLA custom_feed array
|
2417 |
+
* @return boolean false; MLA custom_feed does not exist
|
2418 |
+
*/
|
2419 |
+
public static function mla_find_custom_feed( $ID ) {
|
2420 |
+
if ( !self::_get_custom_feed_settings() ) {
|
2421 |
+
return false;
|
2422 |
+
}
|
2423 |
+
|
2424 |
+
if ( isset( self::$_custom_feed_settings[ $ID ] ) ) {
|
2425 |
+
return self::$_custom_feed_settings[ $ID ];
|
2426 |
+
}
|
2427 |
+
|
2428 |
+
return false;
|
2429 |
+
}
|
2430 |
+
|
2431 |
+
/**
|
2432 |
+
* Update a custom feed property given its ID and key.
|
2433 |
+
*
|
2434 |
+
* @since 1.10
|
2435 |
+
*
|
2436 |
+
* @param integer $ID MLA custom feed ID.
|
2437 |
+
* @param string $key MLA custom feed property.
|
2438 |
+
* @param string $value MLA custom feed new value.
|
2439 |
+
* @return mixed true if property changed, false if not or NULL if feed or property not found.
|
2440 |
+
*/
|
2441 |
+
public static function mla_update_custom_feed( $ID, $key, $value ) {
|
2442 |
+
if ( !self::_get_custom_feed_settings() ) {
|
2443 |
+
return NULL;
|
2444 |
+
}
|
2445 |
+
|
2446 |
+
if ( !isset( self::$_custom_feed_settings[ $ID ] ) || !isset( self::$_custom_feed_settings[ $ID ][ $key ] ) ) {
|
2447 |
+
return NULL;
|
2448 |
+
}
|
2449 |
+
|
2450 |
+
if ( self::$_custom_feed_settings[ $ID ][ $key ] === $value ) {
|
2451 |
+
return false;
|
2452 |
+
}
|
2453 |
+
|
2454 |
+
self::$_custom_feed_settings[ $ID ][ $key ] = $value;
|
2455 |
+
self::$_custom_feed_settings[ $ID ]['changed'] = true;
|
2456 |
+
return true;
|
2457 |
+
}
|
2458 |
+
|
2459 |
+
/**
|
2460 |
+
* Replace a custom feed given its value array.
|
2461 |
+
*
|
2462 |
+
* @since 1.10
|
2463 |
+
*
|
2464 |
+
* @param array $value MLA custom feed new value.
|
2465 |
+
* @return boolean true if object exists else false.
|
2466 |
+
*/
|
2467 |
+
public static function mla_replace_custom_feed( $value ) {
|
2468 |
+
if ( !self::_get_custom_feed_settings() ) {
|
2469 |
+
return false;
|
2470 |
+
}
|
2471 |
+
|
2472 |
+
if ( isset( self::$_custom_feed_settings[ $value['post_ID'] ] ) ) {
|
2473 |
+
self::$_custom_feed_settings[ $value['post_ID'] ] = $value;
|
2474 |
+
return true;
|
2475 |
+
}
|
2476 |
+
|
2477 |
+
return false;
|
2478 |
+
}
|
2479 |
+
|
2480 |
+
/**
|
2481 |
+
* Insert a custom feed given its value array.
|
2482 |
+
*
|
2483 |
+
* @since 1.10
|
2484 |
+
*
|
2485 |
+
* @param array $value MLA custom feed new value.
|
2486 |
+
* @return boolean true if addition succeeds else false.
|
2487 |
+
*/
|
2488 |
+
public static function mla_add_custom_feed( $value ) {
|
2489 |
+
if ( !self::_get_custom_feed_settings() ) {
|
2490 |
+
return false;
|
2491 |
+
}
|
2492 |
+
|
2493 |
+
$value['post_ID'] = ++self::$_custom_feed_highest_ID;
|
2494 |
+
$value['changed'] = true;
|
2495 |
+
$value['deleted'] = false;
|
2496 |
+
|
2497 |
+
self::$_custom_feed_settings[ $value['post_ID'] ] = $value;
|
2498 |
+
return true;
|
2499 |
+
}
|
2500 |
+
|
2501 |
+
/**
|
2502 |
+
* Tabulate MLA custom_feed objects by view for list table display
|
2503 |
+
*
|
2504 |
+
* @since 1.10
|
2505 |
+
*
|
2506 |
+
* @param string keyword search criterion, optional
|
2507 |
+
*
|
2508 |
+
* @return array ( 'singular' label, 'plural' label, 'count' of items )
|
2509 |
+
*/
|
2510 |
+
public static function mla_tabulate_custom_feed_items( $s = '' ) {
|
2511 |
+
if ( empty( $s ) ) {
|
2512 |
+
$request = array( 'mla_custom_feed_view' => 'all' );
|
2513 |
+
} else {
|
2514 |
+
$request = array( 's' => $s );
|
2515 |
+
}
|
2516 |
+
|
2517 |
+
$items = self::mla_query_custom_feed_settings( $request, 0, 0 );
|
2518 |
+
|
2519 |
+
$template_items = array(
|
2520 |
+
'all' => array(
|
2521 |
+
'singular' => 'All',
|
2522 |
+
'plural' => 'All',
|
2523 |
+
'count' => 0 ),
|
2524 |
+
);
|
2525 |
+
|
2526 |
+
foreach ( $items as $value ) {
|
2527 |
+
$template_items['all']['count']++;
|
2528 |
+
}
|
2529 |
+
|
2530 |
+
return $template_items;
|
2531 |
+
}
|
2532 |
+
} // class MLA_Custom_Feed_Query
|
2533 |
+
|
2534 |
+
// Install the filters at an early opportunity
|
2535 |
+
add_action('init', 'MLACustomFeedExample::initialize');
|
2536 |
+
/*
|
2537 |
+
* Actions are added here, when the source file is loaded, because the mla_compose_general_tab
|
2538 |
+
* function is called too late to be useful.
|
2539 |
+
*/
|
2540 |
+
add_action( 'admin_init', 'MLA_Custom_Feed_List_Table::mla_admin_init' );
|
2541 |
+
?>
|
examples/plugins/mla-custom-feed-example/mla-custom-feed-template.php
ADDED
@@ -0,0 +1,137 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* RSS2 Feed Template for displaying MLA Gallery feed.
|
4 |
+
*
|
5 |
+
* @package MLA Custom Feed Example
|
6 |
+
*/
|
7 |
+
header('Content-Type: ' . feed_content_type( MLACustomFeedExample::$active_feed['type'] ) . '; charset=' . get_option('blog_charset'), true);
|
8 |
+
echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>';
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Fires between the xml and rss tags in a feed.
|
12 |
+
*
|
13 |
+
* @since 4.0.0
|
14 |
+
*
|
15 |
+
* @param string $context Type of feed. Possible values include 'rss2', 'rss2-comments',
|
16 |
+
* 'rdf', 'atom', and 'atom-comments'.
|
17 |
+
*/
|
18 |
+
do_action( 'rss_tag_pre', MLACustomFeedExample::$active_feed['type'] );
|
19 |
+
?>
|
20 |
+
<rss version="2.0"
|
21 |
+
xmlns:content="http://purl.org/rss/1.0/modules/content/"
|
22 |
+
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
|
23 |
+
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
24 |
+
xmlns:atom="http://www.w3.org/2005/Atom"
|
25 |
+
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
|
26 |
+
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
|
27 |
+
<?php
|
28 |
+
/**
|
29 |
+
* Fires at the end of the RSS root to add namespaces.
|
30 |
+
*
|
31 |
+
* @since 2.0.0
|
32 |
+
*/
|
33 |
+
do_action( 'rss2_ns' );
|
34 |
+
?>
|
35 |
+
>
|
36 |
+
|
37 |
+
<channel>
|
38 |
+
<title><?php echo MLACustomFeedExample::$active_feed['title']; ?></title>
|
39 |
+
<atom:link href="<?php self_link(); ?>" rel="self" type="application/rss+xml" />
|
40 |
+
<link><?php echo MLACustomFeedExample::$active_feed['link']; ?></link>
|
41 |
+
<description><?php echo MLACustomFeedExample::$active_feed['description']; ?></description>
|
42 |
+
<lastBuildDate><?php
|
43 |
+
echo MLACustomFeedExample::$active_feed['last_build_date'];
|
44 |
+
?></lastBuildDate>
|
45 |
+
<language><?php bloginfo_rss( 'language' ); ?></language>
|
46 |
+
<?php
|
47 |
+
if ( !empty( MLACustomFeedExample::$active_feed['ttl'] ) ) {
|
48 |
+
echo '<ttl>' . absint( MLACustomFeedExample::$active_feed['ttl'] ) . "</ttl>\n";
|
49 |
+
}
|
50 |
+
|
51 |
+
if ( 'none' !== MLACustomFeedExample::$active_feed['update_period'] ) :
|
52 |
+
?> <sy:updatePeriod><?php
|
53 |
+
|
54 |
+
/**
|
55 |
+
* Filters how often to update the RSS feed.
|
56 |
+
*
|
57 |
+
* @since 2.1.0
|
58 |
+
*
|
59 |
+
* @param string $update_period The update period. Accepts 'hourly', 'daily', 'weekly', 'monthly',
|
60 |
+
* 'yearly'. Default 'hourly'.
|
61 |
+
*/
|
62 |
+
echo apply_filters( 'rss_update_period', MLACustomFeedExample::$active_feed['update_period'] );
|
63 |
+
?></sy:updatePeriod>
|
64 |
+
<sy:updateFrequency><?php
|
65 |
+
|
66 |
+
/**
|
67 |
+
* Filters the RSS update frequency.
|
68 |
+
*
|
69 |
+
* @since 2.1.0
|
70 |
+
*
|
71 |
+
* @param string $update_frequency An integer passed as a string representing the frequency
|
72 |
+
* of RSS updates within the update period. Default '1'.
|
73 |
+
*/
|
74 |
+
echo apply_filters( 'rss_update_frequency', MLACustomFeedExample::$active_feed['update_frequency'] );
|
75 |
+
?></sy:updateFrequency>
|
76 |
+
<sy:updateBase><?php
|
77 |
+
|
78 |
+
/**
|
79 |
+
* Filters the RSS update frequency.
|
80 |
+
*
|
81 |
+
* @since 2.1.0
|
82 |
+
*
|
83 |
+
* @param string $update_base An integer passed as a string representing the frequency
|
84 |
+
* of RSS updates within the update period. Default '1'.
|
85 |
+
*/
|
86 |
+
echo apply_filters( 'rss_update_base', MLACustomFeedExample::$active_feed['update_base'] );
|
87 |
+
?></sy:updateBase>
|
88 |
+
<?php
|
89 |
+
endif;
|
90 |
+
/**
|
91 |
+
* Fires at the end of the RSS2 Feed Header.
|
92 |
+
*
|
93 |
+
* @since 2.0.0
|
94 |
+
*/
|
95 |
+
do_action( 'rss2_head');
|
96 |
+
|
97 |
+
while ( MLACustomFeedExample::$wp_query_object->have_posts() ) : MLACustomFeedExample::$wp_query_object->the_post();
|
98 |
+
?>
|
99 |
+
<item>
|
100 |
+
<title><?php the_title_rss() ?></title>
|
101 |
+
<link><?php the_permalink_rss() ?></link>
|
102 |
+
<?php if ( get_comments_number() || comments_open() ) : ?>
|
103 |
+
<comments><?php comments_link_feed(); ?></comments>
|
104 |
+
<?php endif; ?>
|
105 |
+
<pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_post_time('Y-m-d H:i:s', true), false); ?></pubDate>
|
106 |
+
<dc:creator><![CDATA[<?php the_author() ?>]]></dc:creator>
|
107 |
+
<?php echo MLACustomFeedExample::mla_get_the_terms_rss( MLACustomFeedExample::$active_feed['taxonomies'], MLACustomFeedExample::$active_feed['type'] ); ?>
|
108 |
+
|
109 |
+
<guid isPermaLink="false"><?php the_guid(); ?></guid>
|
110 |
+
<?php if (get_option('rss_use_excerpt')) : ?>
|
111 |
+
<description><![CDATA[<?php the_excerpt_rss(); ?>]]></description>
|
112 |
+
<?php else : ?>
|
113 |
+
<description><![CDATA[<?php the_excerpt_rss(); ?>]]></description>
|
114 |
+
<?php $content = get_the_content_feed('rss2'); ?>
|
115 |
+
<?php if ( strlen( $content ) > 0 ) : ?>
|
116 |
+
<content:encoded><![CDATA[<?php echo $content; ?>]]></content:encoded>
|
117 |
+
<?php else : ?>
|
118 |
+
<content:encoded><![CDATA[<?php the_excerpt_rss(); ?>]]></content:encoded>
|
119 |
+
<?php endif; ?>
|
120 |
+
<?php endif; ?>
|
121 |
+
<?php if ( get_comments_number() || comments_open() ) : ?>
|
122 |
+
<wfw:commentRss><?php echo esc_url( get_post_comments_feed_link(null, 'rss2') ); ?></wfw:commentRss>
|
123 |
+
<slash:comments><?php echo get_comments_number(); ?></slash:comments>
|
124 |
+
<?php endif; ?>
|
125 |
+
<?php rss_enclosure(); ?>
|
126 |
+
<?php
|
127 |
+
/**
|
128 |
+
* Fires at the end of each RSS2 feed item.
|
129 |
+
*
|
130 |
+
* @since 2.0.0
|
131 |
+
*/
|
132 |
+
do_action( 'rss2_item' );
|
133 |
+
?>
|
134 |
+
</item>
|
135 |
+
<?php endwhile; ?>
|
136 |
+
</channel>
|
137 |
+
</rss>
|
examples/plugins/mla-hooks-example.php
CHANGED
@@ -16,7 +16,7 @@
|
|
16 |
* and illustrates some of the techniques you can use to customize the gallery display.
|
17 |
*
|
18 |
* @package MLA Gallery Hooks Example
|
19 |
-
* @version 1.
|
20 |
*/
|
21 |
|
22 |
/*
|
@@ -24,10 +24,10 @@ Plugin Name: MLA Gallery Hooks Example
|
|
24 |
Plugin URI: http://fairtradejudaica.org/media-library-assistant-a-wordpress-plugin/
|
25 |
Description: Provides examples of hooking the filters provided by the [mla_gallery] shortcode
|
26 |
Author: David Lingren
|
27 |
-
Version: 1.
|
28 |
Author URI: http://fairtradejudaica.org/our-story/staff/
|
29 |
|
30 |
-
Copyright 2013 -
|
31 |
|
32 |
This program is free software; you can redistribute it and/or modify
|
33 |
it under the terms of the GNU General Public License as published by
|
@@ -96,6 +96,7 @@ class MLAGalleryHooksExample {
|
|
96 |
add_filter( 'mla_gallery_style_template', 'MLAGalleryHooksExample::mla_gallery_style_template', 10, 1 );
|
97 |
add_filter( 'mla_gallery_style_parse', 'MLAGalleryHooksExample::mla_gallery_style_parse', 10, 3 );
|
98 |
|
|
|
99 |
add_filter( 'mla_gallery_open_values', 'MLAGalleryHooksExample::mla_gallery_open_values', 10, 1 );
|
100 |
add_filter( 'mla_gallery_open_template', 'MLAGalleryHooksExample::mla_gallery_open_template', 10, 1 );
|
101 |
add_filter( 'mla_gallery_open_parse', 'MLAGalleryHooksExample::mla_gallery_open_parse', 10, 3 );
|
@@ -106,6 +107,7 @@ class MLAGalleryHooksExample {
|
|
106 |
add_filter( 'mla_gallery_row_open_template', 'MLAGalleryHooksExample::mla_gallery_row_open_template', 10, 1 );
|
107 |
add_filter( 'mla_gallery_row_open_parse', 'MLAGalleryHooksExample::mla_gallery_row_open_parse', 10, 3 );
|
108 |
|
|
|
109 |
add_filter( 'mla_gallery_item_values', 'MLAGalleryHooksExample::mla_gallery_item_values', 10, 1 );
|
110 |
add_filter( 'mla_gallery_item_template', 'MLAGalleryHooksExample::mla_gallery_item_template', 10, 1 );
|
111 |
add_filter( 'mla_gallery_item_parse', 'MLAGalleryHooksExample::mla_gallery_item_parse', 10, 3 );
|
@@ -838,7 +840,7 @@ class MLAGalleryHooksExample {
|
|
838 |
* @return string Complete 'ids_name="value,value"' parameter or an empty string to omit parameter
|
839 |
*/
|
840 |
public static function mla_gallery_alt_shortcode_ids( $ids, $ids_name, $attachments ) {
|
841 |
-
//error_log(
|
842 |
|
843 |
return $ids;
|
844 |
} // mla_gallery_alt_shortcode_ids
|
@@ -976,6 +978,21 @@ class MLAGalleryHooksExample {
|
|
976 |
return $html_markup;
|
977 |
} // mla_gallery_style_parse
|
978 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
979 |
/**
|
980 |
* MLA Gallery Open Values
|
981 |
*
|
@@ -1137,6 +1154,24 @@ class MLAGalleryHooksExample {
|
|
1137 |
return $item_values;
|
1138 |
} // _update_caption
|
1139 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1140 |
/**
|
1141 |
* MLA Gallery Item Values
|
1142 |
*
|
16 |
* and illustrates some of the techniques you can use to customize the gallery display.
|
17 |
*
|
18 |
* @package MLA Gallery Hooks Example
|
19 |
+
* @version 1.13
|
20 |
*/
|
21 |
|
22 |
/*
|
24 |
Plugin URI: http://fairtradejudaica.org/media-library-assistant-a-wordpress-plugin/
|
25 |
Description: Provides examples of hooking the filters provided by the [mla_gallery] shortcode
|
26 |
Author: David Lingren
|
27 |
+
Version: 1.13
|
28 |
Author URI: http://fairtradejudaica.org/our-story/staff/
|
29 |
|
30 |
+
Copyright 2013 - 2017 David Lingren
|
31 |
|
32 |
This program is free software; you can redistribute it and/or modify
|
33 |
it under the terms of the GNU General Public License as published by
|
96 |
add_filter( 'mla_gallery_style_template', 'MLAGalleryHooksExample::mla_gallery_style_template', 10, 1 );
|
97 |
add_filter( 'mla_gallery_style_parse', 'MLAGalleryHooksExample::mla_gallery_style_parse', 10, 3 );
|
98 |
|
99 |
+
add_filter( 'mla_gallery_pagination_values', 'MLAGalleryHooksExample::mla_gallery_pagination_values', 10, 1 );
|
100 |
add_filter( 'mla_gallery_open_values', 'MLAGalleryHooksExample::mla_gallery_open_values', 10, 1 );
|
101 |
add_filter( 'mla_gallery_open_template', 'MLAGalleryHooksExample::mla_gallery_open_template', 10, 1 );
|
102 |
add_filter( 'mla_gallery_open_parse', 'MLAGalleryHooksExample::mla_gallery_open_parse', 10, 3 );
|
107 |
add_filter( 'mla_gallery_row_open_template', 'MLAGalleryHooksExample::mla_gallery_row_open_template', 10, 1 );
|
108 |
add_filter( 'mla_gallery_row_open_parse', 'MLAGalleryHooksExample::mla_gallery_row_open_parse', 10, 3 );
|
109 |
|
110 |
+
add_filter( 'mla_gallery_item_initial_values', 'MLAGalleryHooksExample::mla_gallery_item_initial_values', 10, 2 );
|
111 |
add_filter( 'mla_gallery_item_values', 'MLAGalleryHooksExample::mla_gallery_item_values', 10, 1 );
|
112 |
add_filter( 'mla_gallery_item_template', 'MLAGalleryHooksExample::mla_gallery_item_template', 10, 1 );
|
113 |
add_filter( 'mla_gallery_item_parse', 'MLAGalleryHooksExample::mla_gallery_item_parse', 10, 3 );
|
840 |
* @return string Complete 'ids_name="value,value"' parameter or an empty string to omit parameter
|
841 |
*/
|
842 |
public static function mla_gallery_alt_shortcode_ids( $ids, $ids_name, $attachments ) {
|
843 |
+
//error_log( "MLAGalleryHooksExample::mla_gallery_alt_shortcode_ids( $ids_name ) attachments = " . var_export( $attachments, true ), 0 );
|
844 |
|
845 |
return $ids;
|
846 |
} // mla_gallery_alt_shortcode_ids
|
978 |
return $html_markup;
|
979 |
} // mla_gallery_style_parse
|
980 |
|
981 |
+
/**
|
982 |
+
* MLA Gallery Pagination Values
|
983 |
+
*
|
984 |
+
* This filter gives you an opportunity to customize the markup values used in pagination controls.
|
985 |
+
*
|
986 |
+
* @since 1.13
|
987 |
+
*
|
988 |
+
* @param array $markup_values gallery-level parameter_name => parameter_value pairs
|
989 |
+
*/
|
990 |
+
public static function mla_gallery_pagination_values( $markup_values ) {
|
991 |
+
//error_log( 'MLAGalleryHooksExample::mla_gallery_pagination_values $markup_values = ' . var_export( $markup_values, true ), 0 );
|
992 |
+
|
993 |
+
return $markup_values;
|
994 |
+
} // mla_gallery_pagination_values
|
995 |
+
|
996 |
/**
|
997 |
* MLA Gallery Open Values
|
998 |
*
|
1154 |
return $item_values;
|
1155 |
} // _update_caption
|
1156 |
|
1157 |
+
/**
|
1158 |
+
* MLA Gallery Item Initial Values
|
1159 |
+
*
|
1160 |
+
* This filter gives you an opportunity to add custom elements to each item
|
1161 |
+
* returned by the query item-level processing occurs.
|
1162 |
+
*
|
1163 |
+
* @since 1.13
|
1164 |
+
*
|
1165 |
+
* @param array $markup_values gallery-level parameter_name => parameter_value pairs
|
1166 |
+
* @param array $attachment WP_Post object of the current item
|
1167 |
+
*/
|
1168 |
+
public static function mla_gallery_item_initial_values( $markup_values, $attachment ) {
|
1169 |
+
//error_log( 'MLAGalleryHooksExample::mla_gallery_item_initial_values $markup_values = ' . var_export( $markup_values, true ), 0 );
|
1170 |
+
//error_log( 'MLAGalleryHooksExample::mla_gallery_item_initial_values $attachment = ' . var_export( $attachment, true ), 0 );
|
1171 |
+
|
1172 |
+
return $markup_values;
|
1173 |
+
} // mla_gallery_item_initial_values
|
1174 |
+
|
1175 |
/**
|
1176 |
* MLA Gallery Item Values
|
1177 |
*
|
examples/plugins/mla-list-table-hooks-example.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Provides an example of hooking the filters provided by the MLA_List_Table class
|
4 |
*
|
5 |
* @package MLA List Table Hooks Example
|
6 |
-
* @version 1.
|
7 |
*/
|
8 |
|
9 |
/*
|
@@ -11,10 +11,10 @@ Plugin Name: MLA List Table Hooks Example
|
|
11 |
Plugin URI: http://fairtradejudaica.org/media-library-assistant-a-wordpress-plugin/
|
12 |
Description: Provides an example of hooking the filters provided by the MLA_List_Table class
|
13 |
Author: David Lingren
|
14 |
-
Version: 1.
|
15 |
Author URI: http://fairtradejudaica.org/our-story/staff/
|
16 |
|
17 |
-
Copyright 2014 -
|
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
|
@@ -76,6 +76,7 @@ class MLAListTableHooksExample {
|
|
76 |
*/
|
77 |
add_filter( 'mla_taxonomy_get_columns', 'MLAListTableHooksExample::mla_taxonomy_get_columns', 10, 3 );
|
78 |
add_filter( 'mla_taxonomy_column', 'MLAListTableHooksExample::mla_taxonomy_column', 10, 5 );
|
|
|
79 |
|
80 |
/*
|
81 |
* Defined in /media-library-assistant/includes/class-mla-data.php
|
@@ -307,7 +308,7 @@ class MLAListTableHooksExample {
|
|
307 |
* Pre-process Edit Taxonomy submenu table column content
|
308 |
*
|
309 |
* This filter gives you an opportunity to change column content in
|
310 |
-
* for the Edit Taxonomy submenu table(s).
|
311 |
*
|
312 |
* @since 1.06
|
313 |
*
|
@@ -325,6 +326,28 @@ class MLAListTableHooksExample {
|
|
325 |
return $filter_content;
|
326 |
} // mla_taxonomy_column
|
327 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
328 |
/**
|
329 |
* Process the "where-used" reference reporting results
|
330 |
*
|
3 |
* Provides an example of hooking the filters provided by the MLA_List_Table class
|
4 |
*
|
5 |
* @package MLA List Table Hooks Example
|
6 |
+
* @version 1.09
|
7 |
*/
|
8 |
|
9 |
/*
|
11 |
Plugin URI: http://fairtradejudaica.org/media-library-assistant-a-wordpress-plugin/
|
12 |
Description: Provides an example of hooking the filters provided by the MLA_List_Table class
|
13 |
Author: David Lingren
|
14 |
+
Version: 1.09
|
15 |
Author URI: http://fairtradejudaica.org/our-story/staff/
|
16 |
|
17 |
+
Copyright 2014 - 2017 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
|
76 |
*/
|
77 |
add_filter( 'mla_taxonomy_get_columns', 'MLAListTableHooksExample::mla_taxonomy_get_columns', 10, 3 );
|
78 |
add_filter( 'mla_taxonomy_column', 'MLAListTableHooksExample::mla_taxonomy_column', 10, 5 );
|
79 |
+
add_filter( 'mla_taxonomy_column_final', 'MLAListTableHooksExample::mla_taxonomy_column_final', 10, 5 );
|
80 |
|
81 |
/*
|
82 |
* Defined in /media-library-assistant/includes/class-mla-data.php
|
308 |
* Pre-process Edit Taxonomy submenu table column content
|
309 |
*
|
310 |
* This filter gives you an opportunity to change column content in
|
311 |
+
* for the Edit Taxonomy submenu table(s) before MLA computes the count.
|
312 |
*
|
313 |
* @since 1.06
|
314 |
*
|
326 |
return $filter_content;
|
327 |
} // mla_taxonomy_column
|
328 |
|
329 |
+
/**
|
330 |
+
* Post-process Edit Taxonomy submenu table column content
|
331 |
+
*
|
332 |
+
* This filter gives you an opportunity to change column content in
|
333 |
+
* for the Edit Taxonomy submenu table(s) after MLA computes the count.
|
334 |
+
*
|
335 |
+
* @since 1.09
|
336 |
+
*
|
337 |
+
* @param NULL $filter_content NULL, indicating no changes to the current content.
|
338 |
+
* @param object $tax_object Defines the current taxonomy.
|
339 |
+
* @param object $term Defines the current term.
|
340 |
+
* @param string $column_text MLA-computed count or "click to search".
|
341 |
+
* @param boolean $count_terms True to compute counts.
|
342 |
+
*/
|
343 |
+
public static function mla_taxonomy_column_final( $filter_content, $tax_object, $term, $column_text, $count_terms ) {
|
344 |
+
//error_log( 'MLAListTableHooksExample::mla_taxonomy_column_final $tax_object = ' . var_export( $tax_object, true ), 0 );
|
345 |
+
//error_log( 'MLAListTableHooksExample::mla_taxonomy_column_final $term = ' . var_export( $term, true ), 0 );
|
346 |
+
//error_log( 'MLAListTableHooksExample::mla_taxonomy_column_final $column_text = ' . var_export( $column_text, true ), 0 );
|
347 |
+
//error_log( 'MLAListTableHooksExample::mla_taxonomy_column_final $count_terms = ' . var_export( $count_terms, true ), 0 );
|
348 |
+
return $filter_content;
|
349 |
+
} // mla_taxonomy_column_final
|
350 |
+
|
351 |
/**
|
352 |
* Process the "where-used" reference reporting results
|
353 |
*
|
examples/plugins/mla-login-filtered-gallery-example.php
CHANGED
@@ -1,12 +1,15 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* Provides an [mla_gallery] parameter to restrict items to logged-in users
|
4 |
*
|
5 |
-
* In this example
|
6 |
-
*
|
|
|
|
|
|
|
7 |
* This can be combined with a "simple" attachment_category query. For example:
|
8 |
*
|
9 |
-
* [mla_gallery members_only=client attachment_category=cityscape tax_include_children=false]
|
10 |
*
|
11 |
* This example plugin uses one of the many filters available in the [mla_gallery] shortcode
|
12 |
* and illustrates a technique you can use to customize the gallery display.
|
@@ -16,7 +19,7 @@
|
|
16 |
* https://wordpress.org/support/topic/multiple-calls-to-a-smaller-amount
|
17 |
*
|
18 |
* @package MLA Login-filtered Gallery Example
|
19 |
-
* @version 1.
|
20 |
*/
|
21 |
|
22 |
/*
|
@@ -24,7 +27,7 @@ Plugin Name: MLA Login-filtered Gallery Example
|
|
24 |
Plugin URI: http://fairtradejudaica.org/media-library-assistant-a-wordpress-plugin/
|
25 |
Description: Restricts items to logged-in users based on an Att. Categories term
|
26 |
Author: David Lingren
|
27 |
-
Version: 1.
|
28 |
Author URI: http://fairtradejudaica.org/our-story/staff/
|
29 |
|
30 |
Copyright 2017 David Lingren
|
@@ -61,7 +64,8 @@ class MLALoginFilteredGalleryExample {
|
|
61 |
return;
|
62 |
}
|
63 |
|
64 |
-
add_filter( 'mla_gallery_attributes', 'MLALoginFilteredGalleryExample::
|
|
|
65 |
}
|
66 |
|
67 |
/**
|
@@ -74,11 +78,10 @@ class MLALoginFilteredGalleryExample {
|
|
74 |
*
|
75 |
* @param array the shortcode parameters passed in to the shortcode
|
76 |
*/
|
77 |
-
public static function
|
78 |
global $wpdb;
|
79 |
-
//error_log( __LINE__ . ' MLALoginFilteredGalleryExample::mla_gallery_attributes_filter shortcode_attributes = ' . var_export( $shortcode_attributes, true ), 0 );
|
80 |
|
81 |
-
// ignore shortcodes without the random_category parameter
|
82 |
if ( empty( $shortcode_attributes['members_only'] ) ) {
|
83 |
return $shortcode_attributes;
|
84 |
}
|
@@ -122,14 +125,50 @@ class MLALoginFilteredGalleryExample {
|
|
122 |
$tax_query[] = array( 'taxonomy' => 'attachment_category', 'field' => 'slug', 'terms' => explode( ',', $shortcode_attributes['members_only'] ), 'operator' => 'NOT IN', 'include_children' => $tax_include_children );
|
123 |
|
124 |
$shortcode_attributes['tax_query'] = $tax_query;
|
125 |
-
//error_log( __LINE__ . ' MLALoginFilteredGalleryExample::mla_gallery_attributes_filter shortcode_attributes = ' . var_export( $shortcode_attributes, true ), 0 );
|
126 |
|
127 |
return $shortcode_attributes;
|
128 |
-
} //
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
129 |
} // Class MLALoginFilteredGalleryExample
|
130 |
|
131 |
-
|
132 |
-
* Install the filters at an early opportunity
|
133 |
-
*/
|
134 |
add_action('init', 'MLALoginFilteredGalleryExample::initialize');
|
135 |
?>
|
1 |
<?php
|
2 |
/**
|
3 |
+
* Provides an [mla_gallery] parameter and a custom shortcode to restrict items and content to logged-in users
|
4 |
*
|
5 |
+
* In this example:
|
6 |
+
* * A custom "members-only" parameter names a taxonomy and one or more terms
|
7 |
+
* * A custom shortcode [mla_login_filter login_status=true/false][/mla_login_filter] returns shortcode content based on login status
|
8 |
+
*
|
9 |
+
* If the current user is not logged in any items assigned to the term(s) are excluded from the gallery results.
|
10 |
* This can be combined with a "simple" attachment_category query. For example:
|
11 |
*
|
12 |
+
* [mla_gallery members_only="attachment_category:client" attachment_category=cityscape tax_include_children=false]
|
13 |
*
|
14 |
* This example plugin uses one of the many filters available in the [mla_gallery] shortcode
|
15 |
* and illustrates a technique you can use to customize the gallery display.
|
19 |
* https://wordpress.org/support/topic/multiple-calls-to-a-smaller-amount
|
20 |
*
|
21 |
* @package MLA Login-filtered Gallery Example
|
22 |
+
* @version 1.01
|
23 |
*/
|
24 |
|
25 |
/*
|
27 |
Plugin URI: http://fairtradejudaica.org/media-library-assistant-a-wordpress-plugin/
|
28 |
Description: Restricts items to logged-in users based on an Att. Categories term
|
29 |
Author: David Lingren
|
30 |
+
Version: 1.01
|
31 |
Author URI: http://fairtradejudaica.org/our-story/staff/
|
32 |
|
33 |
Copyright 2017 David Lingren
|
64 |
return;
|
65 |
}
|
66 |
|
67 |
+
add_filter( 'mla_gallery_attributes', 'MLALoginFilteredGalleryExample::mla_gallery_attributes', 10, 1 );
|
68 |
+
add_shortcode( 'mla_login_filter', 'MLALoginFilteredGalleryExample::mla_login_filter' );
|
69 |
}
|
70 |
|
71 |
/**
|
78 |
*
|
79 |
* @param array the shortcode parameters passed in to the shortcode
|
80 |
*/
|
81 |
+
public static function mla_gallery_attributes( $shortcode_attributes ) {
|
82 |
global $wpdb;
|
|
|
83 |
|
84 |
+
// ignore shortcodes without the random_category parameter TODO - any taxonomy, multiple terms
|
85 |
if ( empty( $shortcode_attributes['members_only'] ) ) {
|
86 |
return $shortcode_attributes;
|
87 |
}
|
125 |
$tax_query[] = array( 'taxonomy' => 'attachment_category', 'field' => 'slug', 'terms' => explode( ',', $shortcode_attributes['members_only'] ), 'operator' => 'NOT IN', 'include_children' => $tax_include_children );
|
126 |
|
127 |
$shortcode_attributes['tax_query'] = $tax_query;
|
|
|
128 |
|
129 |
return $shortcode_attributes;
|
130 |
+
} // mla_gallery_attributes
|
131 |
+
|
132 |
+
/**
|
133 |
+
* MLA Login Filter Shortcode
|
134 |
+
*
|
135 |
+
* This enclosing shortcode returns its content when the user login status matches the 'login_status' argument.
|
136 |
+
* For example [mla_login_filter login_status=true]The content for logged in users.[/mla_login_filter]
|
137 |
+
*
|
138 |
+
* @since 1.01
|
139 |
+
*
|
140 |
+
* @param array $shortcode_attributes the parameters passed in to the shortcode
|
141 |
+
* @param string $shortcode_content Optional content for enclosing shortcodes
|
142 |
+
*/
|
143 |
+
public static function mla_login_filter( $shortcode_attributes, $shortcode_content = NULL ) {
|
144 |
+
|
145 |
+
if ( is_null( $shortcode_content ) ) {
|
146 |
+
return '';
|
147 |
+
}
|
148 |
+
|
149 |
+
$default_arguments = array(
|
150 |
+
'login_status' => 'true',
|
151 |
+
);
|
152 |
+
|
153 |
+
// Make sure $shortcode_attributes is an array, even if it's empty
|
154 |
+
if ( empty( $shortcode_attributes ) ) {
|
155 |
+
$shortcode_attributes = array();
|
156 |
+
} elseif ( is_string( $shortcode_attributes ) ) {
|
157 |
+
$shortcode_attributes = shortcode_parse_atts( $shortcode_attributes );
|
158 |
+
}
|
159 |
+
|
160 |
+
// Accept only the attributes we need and supply defaults
|
161 |
+
$arguments = shortcode_atts( $default_arguments, $shortcode_attributes );
|
162 |
+
$login_status = 'true' === strtolower( $arguments['login_status'] );
|
163 |
+
|
164 |
+
if ( $login_status === is_user_logged_in() ) {
|
165 |
+
return $shortcode_content;
|
166 |
+
}
|
167 |
+
|
168 |
+
return '';
|
169 |
+
} // mla_login_filter
|
170 |
} // Class MLALoginFilteredGalleryExample
|
171 |
|
172 |
+
// Install the filters at an early opportunity
|
|
|
|
|
173 |
add_action('init', 'MLALoginFilteredGalleryExample::initialize');
|
174 |
?>
|
examples/plugins/mla-multisite-extensions.php
ADDED
@@ -0,0 +1,541 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Adds Multisite filters to MLA shortcodes:
|
4 |
+
*
|
5 |
+
* 1. The "site_id=id[,id...]|all" parameter names one or more or all sites to query.
|
6 |
+
* 2.
|
7 |
+
* 3.
|
8 |
+
*
|
9 |
+
* This example plugin uses the WP 4.6+ terminology of Network and Site (not Blog).
|
10 |
+
*
|
11 |
+
* Created for support topic "Using Shortcodes to retrieve media from another sites media library"
|
12 |
+
* opened on 7/12/2017 by "jeynon (@jeynon)".
|
13 |
+
* https://wordpress.org/support/topic/using-shortcodes-to-retrieve-media-from-another-sites-media-library/
|
14 |
+
*
|
15 |
+
* @package MLA Multisite Extensions
|
16 |
+
* @version 1.02
|
17 |
+
*/
|
18 |
+
|
19 |
+
/*
|
20 |
+
Plugin Name: MLA Multisite Extensions
|
21 |
+
Plugin URI: http://fairtradejudaica.org/media-library-assistant-a-wordpress-plugin/
|
22 |
+
Description: Adds Multisite filters to MLA shortcodes
|
23 |
+
Author: David Lingren
|
24 |
+
Version: 1.02
|
25 |
+
Author URI: http://fairtradejudaica.org/our-story/staff/
|
26 |
+
|
27 |
+
Copyright 2017 David Lingren
|
28 |
+
|
29 |
+
This program is free software; you can redistribute it and/or modify
|
30 |
+
it under the terms of the GNU General Public License as published by
|
31 |
+
the Free Software Foundation; either version 2 of the License, or
|
32 |
+
(at your option) any later version.
|
33 |
+
|
34 |
+
This program is distributed in the hope that it will be useful,
|
35 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
36 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
37 |
+
GNU General Public License for more details.
|
38 |
+
|
39 |
+
You can get a copy of the GNU General Public License by writing to the
|
40 |
+
Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
|
41 |
+
*/
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Class MLA Multisite Extensions Adds Multisite filters to MLA shortcodes
|
45 |
+
*
|
46 |
+
* @package MLA Multisite Extensions
|
47 |
+
* @since 1.00
|
48 |
+
*/
|
49 |
+
class MLAMultisiteExtensions {
|
50 |
+
/**
|
51 |
+
* Initialization function, similar to __construct()
|
52 |
+
*
|
53 |
+
* @since 1.00
|
54 |
+
*/
|
55 |
+
public static function initialize() {
|
56 |
+
//error_log( __LINE__ . ' MLAMultisiteExtensions::initialize() get_sites = ' . var_export( get_sites(), true ), 0 );
|
57 |
+
|
58 |
+
add_filter( 'mla_gallery_attributes', 'MLAMultisiteExtensions::mla_gallery_attributes', 10, 1 );
|
59 |
+
add_filter( 'mla_gallery_query_arguments', 'MLAMultisiteExtensions::mla_gallery_query_arguments', 10, 1 );
|
60 |
+
add_action( 'mla_gallery_wp_query_object', 'MLAMultisiteExtensions::mla_gallery_wp_query_object', 10, 1 );
|
61 |
+
add_filter( 'mla_gallery_the_attachments', 'MLAMultisiteExtensions::mla_gallery_the_attachments', 10, 2 );
|
62 |
+
add_filter( 'mla_gallery_item_initial_values', 'MLAMultisiteExtensions::mla_gallery_item_initial_values', 10, 2 );
|
63 |
+
add_filter( 'mla_gallery_item_values', 'MLAMultisiteExtensions::mla_gallery_item_values', 10, 1 );
|
64 |
+
}
|
65 |
+
|
66 |
+
/**
|
67 |
+
* Save the shortcode attributes
|
68 |
+
*
|
69 |
+
* @since 1.00
|
70 |
+
*
|
71 |
+
* @var array
|
72 |
+
*/
|
73 |
+
private static $shortcode_attributes = array();
|
74 |
+
|
75 |
+
/**
|
76 |
+
* MLA Gallery (Display) Attributes
|
77 |
+
*
|
78 |
+
* This filter gives you an opportunity to record or modify the arguments passed in to the shortcode
|
79 |
+
* before they are merged with the default arguments used for the gallery display.
|
80 |
+
*
|
81 |
+
* The $shortcode_attributes array is where you will find any of your own parameters that are coded in the
|
82 |
+
* shortcode, e.g., [mla_gallery my_parameter="my value"].
|
83 |
+
*
|
84 |
+
* @since 1.00
|
85 |
+
*
|
86 |
+
* @param array the shortcode parameters passed in to the shortcode
|
87 |
+
*
|
88 |
+
* @return array updated shortcode attributes
|
89 |
+
*/
|
90 |
+
public static function mla_gallery_attributes( $shortcode_attributes ) {
|
91 |
+
//error_log( __LINE__ . ' MLAMultisiteExtensions::mla_gallery_attributes $shortcode_attributes = ' . var_export( $shortcode_attributes, true ), 0 );
|
92 |
+
|
93 |
+
// Save the original attributes for use in the later filters
|
94 |
+
if ( !isset( self::$all_query_parameters['multi_site_query'] ) ) {
|
95 |
+
self::$shortcode_attributes = $shortcode_attributes;
|
96 |
+
unset( $shortcode_attributes['site_id'] );
|
97 |
+
}
|
98 |
+
|
99 |
+
return $shortcode_attributes;
|
100 |
+
} // mla_gallery_attributes
|
101 |
+
|
102 |
+
/**
|
103 |
+
* Save the query arguments
|
104 |
+
*
|
105 |
+
* @since 1.00
|
106 |
+
*
|
107 |
+
* @var array
|
108 |
+
*/
|
109 |
+
private static $all_query_parameters = array();
|
110 |
+
|
111 |
+
/**
|
112 |
+
* MLA Gallery Query Arguments
|
113 |
+
*
|
114 |
+
* This filter gives you an opportunity to record or modify the attachment query arguments
|
115 |
+
* after the shortcode attributes are merged with the default arguments.
|
116 |
+
*
|
117 |
+
* @since 1.00
|
118 |
+
*
|
119 |
+
* @param array shortcode arguments merged with attachment selection defaults, so every possible parameter is present
|
120 |
+
*
|
121 |
+
* @return array updated attachment query arguments
|
122 |
+
*/
|
123 |
+
public static function mla_gallery_query_arguments( $all_query_parameters ) {
|
124 |
+
global $post;
|
125 |
+
//error_log( __LINE__ . ' MLAMultisiteExtensions::mla_gallery_query_arguments $all_query_parameters = ' . var_export( $all_query_parameters, true ), 0 );
|
126 |
+
|
127 |
+
// Save the original parameters for use in the later filters
|
128 |
+
if ( !isset( self::$all_query_parameters['multi_site_query'] ) ) {
|
129 |
+
//error_log( __LINE__ . ' MLAMultisiteExtensions::mla_gallery_query_arguments self::$shortcode_attributes = ' . var_export( self::$shortcode_attributes, true ), 0 );
|
130 |
+
|
131 |
+
self::$all_query_parameters = $all_query_parameters;
|
132 |
+
}
|
133 |
+
|
134 |
+
if ( isset( self::$shortcode_attributes['site_id'] ) ) {
|
135 |
+
if ( 'all' === trim( strtolower( self::$shortcode_attributes['site_id'] ) ) ) {
|
136 |
+
$sites = get_sites( array( 'network_id' => 1 ) );
|
137 |
+
$site_ids = array();
|
138 |
+
foreach( $sites as $site ) {
|
139 |
+
$site_ids[] = $site->blog_id;
|
140 |
+
}
|
141 |
+
} else {
|
142 |
+
$site_ids = array_map( 'absint', explode( ',', self::$shortcode_attributes['site_id'] ) );
|
143 |
+
foreach ( $site_ids as &$site ) {
|
144 |
+
if ( 0 === $site ) {
|
145 |
+
$site = get_current_blog_id();
|
146 |
+
}
|
147 |
+
}
|
148 |
+
|
149 |
+
$site_ids = array_unique( $site_ids );
|
150 |
+
self::$shortcode_attributes['site_id'] = implode( ',', $site_ids );
|
151 |
+
}
|
152 |
+
|
153 |
+
// Accumulate attachments from multiple blogs and short-circuit the normal query
|
154 |
+
if ( 1 < count( $site_ids ) ) {
|
155 |
+
// Save the site_id parameter, then remove it from the site-specific queries
|
156 |
+
$save_site_id = self::$shortcode_attributes['site_id'];
|
157 |
+
unset( self::$shortcode_attributes['site_id'] );
|
158 |
+
|
159 |
+
// We must do the multi-site pagination
|
160 |
+
if ( !empty( $all_query_parameters['posts_per_page'] ) ) {
|
161 |
+
self::$all_query_parameters['multi_site_limit'] = absint( $all_query_parameters['posts_per_page'] );
|
162 |
+
} elseif ( !empty( $all_query_parameters['numberposts'] ) ) {
|
163 |
+
self::$all_query_parameters['multi_site_limit'] = absint( $all_query_parameters['numberposts'] );
|
164 |
+
}
|
165 |
+
|
166 |
+
if ( isset( self::$all_query_parameters['multi_site_limit'] ) ) {
|
167 |
+
if ( !empty( $all_query_parameters['offset'] ) ) {
|
168 |
+
self::$all_query_parameters['multi_site_offset'] = $all_query_parameters['offset'];
|
169 |
+
} else {
|
170 |
+
if ( !empty( $all_query_parameters[ self::$shortcode_attributes['mla_page_parameter' ] ] ) ) {
|
171 |
+
$page = $all_query_parameters[ self::$shortcode_attributes['mla_page_parameter' ] ];
|
172 |
+
} else {
|
173 |
+
$page = 1;
|
174 |
+
}
|
175 |
+
|
176 |
+
self::$all_query_parameters['multi_site_offset'] = ( absint( $page ) - 1 ) * self::$all_query_parameters['multi_site_limit'];
|
177 |
+
}
|
178 |
+
|
179 |
+
// Remove pagination from site-specific queries
|
180 |
+
$all_query_parameters['numberposts'] = 0;
|
181 |
+
$all_query_parameters['posts_per_page'] = 0;
|
182 |
+
$all_query_parameters['posts_per_archive_page'] = 0;
|
183 |
+
$all_query_parameters['paged'] = NULL;
|
184 |
+
$all_query_parameters['offset'] = NULL;
|
185 |
+
$all_query_parameters['mla_paginate_current'] = NULL;
|
186 |
+
$all_query_parameters['mla_paginate_total'] = NULL;
|
187 |
+
$all_query_parameters[ self::$shortcode_attributes['mla_page_parameter' ] ] = NULL;
|
188 |
+
}
|
189 |
+
|
190 |
+
// Tell all filters this is not the original query
|
191 |
+
self::$all_query_parameters['multi_site_query'] = true;
|
192 |
+
self::$all_attachments = array();
|
193 |
+
foreach( $site_ids as $site_id ) {
|
194 |
+
$blog_details = get_blog_details( $site_id );
|
195 |
+
if ( $blog_details ) {
|
196 |
+
switch_to_blog( $site_id );
|
197 |
+
$attachments = MLAShortcodes::mla_get_shortcode_attachments( $post->ID, $all_query_parameters, true );
|
198 |
+
restore_current_blog();
|
199 |
+
|
200 |
+
if ( is_array( $attachments ) ) {
|
201 |
+
unset( $attachments['found_rows'] );
|
202 |
+
unset( $attachments['max_num_pages'] );
|
203 |
+
self::$all_attachments[ $site_id ] = $attachments;
|
204 |
+
}
|
205 |
+
} // $blog_details
|
206 |
+
} // foreach $site_id
|
207 |
+
unset( self::$all_query_parameters['multi_site_query'] );
|
208 |
+
|
209 |
+
// Restore the site_id parameter, then replace the original query with a quick alternative that returns no attachments
|
210 |
+
self::$shortcode_attributes['site_id'] = $save_site_id;
|
211 |
+
return array( 'ids' => '1' );
|
212 |
+
} // multi-blog query
|
213 |
+
|
214 |
+
$blog_details = get_blog_details( reset( $site_ids ) );
|
215 |
+
|
216 |
+
if ( $blog_details ) {
|
217 |
+
switch_to_blog( current( $site_ids ));
|
218 |
+
} else {
|
219 |
+
unset( self::$shortcode_attributes['site_id'] );
|
220 |
+
}
|
221 |
+
}
|
222 |
+
|
223 |
+
return $all_query_parameters;
|
224 |
+
} // mla_gallery_query_arguments
|
225 |
+
|
226 |
+
/**
|
227 |
+
* Save some of the WP_Query object properties
|
228 |
+
*
|
229 |
+
* @since 1.00
|
230 |
+
*
|
231 |
+
* @var array
|
232 |
+
*/
|
233 |
+
private static $wp_query_properties = array();
|
234 |
+
|
235 |
+
/**
|
236 |
+
* MLA Gallery WP Query Object
|
237 |
+
*
|
238 |
+
* This action gives you an opportunity (read-only) to record anything you need from the WP_Query object used
|
239 |
+
* to select the attachments for gallery display. This is the ONLY point at which the WP_Query object is defined.
|
240 |
+
*
|
241 |
+
* @since 1.00
|
242 |
+
* @uses MLAShortcodes::$mla_gallery_wp_query_object
|
243 |
+
*
|
244 |
+
* @param array $query_arguments Query arguments passed to WP_Query->query
|
245 |
+
*/
|
246 |
+
public static function mla_gallery_wp_query_object( $query_arguments ) {
|
247 |
+
//error_log( __LINE__ . ' MLAMultisiteExtensions::mla_gallery_wp_query_object $query_arguments = ' . var_export( $query_arguments, true ), 0 );
|
248 |
+
|
249 |
+
self::$wp_query_properties = array();
|
250 |
+
self::$wp_query_properties ['request'] = MLAShortcodes::$mla_gallery_wp_query_object->request;
|
251 |
+
//self::$wp_query_properties ['query_vars'] = MLAShortcodes::$mla_gallery_wp_query_object->query_vars;
|
252 |
+
self::$wp_query_properties ['post_count'] = MLAShortcodes::$mla_gallery_wp_query_object->post_count;
|
253 |
+
|
254 |
+
//error_log( __LINE__ . ' MLAMultisiteExtensions::mla_gallery_wp_query_object self::$wp_query_properties = ' . var_export( self::$wp_query_properties, true ), 0 );
|
255 |
+
|
256 |
+
if ( isset( self::$shortcode_attributes['site_id'] ) ) {
|
257 |
+
restore_current_blog();
|
258 |
+
self::$current_site_id = get_current_blog_id();
|
259 |
+
}
|
260 |
+
} // mla_gallery_wp_query_object
|
261 |
+
|
262 |
+
/**
|
263 |
+
* Translates query parameters to orderby rules.
|
264 |
+
*
|
265 |
+
* Accepts one or more valid columns, with or without ASC/DESC.
|
266 |
+
* Enhanced version of /wp-includes/formatting.php function sanitize_sql_orderby().
|
267 |
+
*
|
268 |
+
* @since 1.02
|
269 |
+
* @uses self::$all_query_parameters
|
270 |
+
*
|
271 |
+
* @return array Returns the orderby rules if present, empty array otherwise.
|
272 |
+
*/
|
273 |
+
private static function _validate_orderby(){
|
274 |
+
|
275 |
+
$results = array ();
|
276 |
+
$order = isset( self::$all_query_parameters['order'] ) ? trim( strtoupper( self::$all_query_parameters['order'] ) ) : 'ASC';
|
277 |
+
$orderby = isset( self::$all_query_parameters['orderby'] ) ? self::$all_query_parameters['orderby'] : '';
|
278 |
+
$meta_key = isset( self::$all_query_parameters['meta_key'] ) ? self::$all_query_parameters['meta_key'] : '';
|
279 |
+
|
280 |
+
$allowed_keys = array(
|
281 |
+
'empty_orderby_default' => 'site_id',
|
282 |
+
'id' => 'ID',
|
283 |
+
'author' => 'post_author',
|
284 |
+
'date' => 'post_date',
|
285 |
+
'description' => 'post_content',
|
286 |
+
'content' => 'post_content',
|
287 |
+
'title' => 'post_title',
|
288 |
+
'caption' => 'post_excerpt',
|
289 |
+
'excerpt' => 'post_excerpt',
|
290 |
+
'slug' => 'post_name',
|
291 |
+
'name' => 'post_name',
|
292 |
+
'modified' => 'post_modified',
|
293 |
+
'parent' => 'post_parent',
|
294 |
+
'menu_order' => 'menu_order',
|
295 |
+
'mime_type' => 'post_mime_type',
|
296 |
+
'comment_count' => 'post_content',
|
297 |
+
'site_id' => 'site_id',
|
298 |
+
'rand' => 'rand',
|
299 |
+
);
|
300 |
+
|
301 |
+
if ( empty( $orderby ) ) {
|
302 |
+
if ( ! empty( $allowed_keys['empty_orderby_default'] ) ) {
|
303 |
+
return array( array( 'field' => $allowed_keys['empty_orderby_default'], 'order' => $order ) ) ;
|
304 |
+
} else {
|
305 |
+
return array( array( 'field' => 'site_id', 'order' => $order ) ) ;
|
306 |
+
}
|
307 |
+
} elseif ( 'none' == $orderby ) {
|
308 |
+
return array();
|
309 |
+
}
|
310 |
+
|
311 |
+
if ( ! empty( $meta_key ) ) {
|
312 |
+
$allowed_keys[ $meta_key ] = "custom:$meta_key";
|
313 |
+
$allowed_keys['meta_value'] = "custom:$meta_key";
|
314 |
+
$allowed_keys['meta_value_num'] = "custom:$meta_key";
|
315 |
+
}
|
316 |
+
|
317 |
+
$obmatches = preg_split('/\s*,\s*/', trim(self::$all_query_parameters['orderby']));
|
318 |
+
foreach ( $obmatches as $index => $value ) {
|
319 |
+
$count = preg_match('/([a-z0-9_]+)(\s+(ASC|DESC))?/i', $value, $matches);
|
320 |
+
if ( $count && ( $value == $matches[0] ) ) {
|
321 |
+
$matches[1] = strtolower( $matches[1] );
|
322 |
+
if ( isset( $matches[2] ) ) {
|
323 |
+
$matches[2] = strtoupper( $matches[2] );
|
324 |
+
}
|
325 |
+
|
326 |
+
if ( array_key_exists( $matches[1], $allowed_keys ) ) {
|
327 |
+
$results[] = isset( $matches[2] ) ? array( 'field' => $allowed_keys[ $matches[1] ], 'order' => trim( $matches[2] ) ) : array( 'field' => $allowed_keys[ $matches[1] ], 'order' => $order );
|
328 |
+
} // allowed key
|
329 |
+
} // valid column specification
|
330 |
+
} // foreach $obmatches
|
331 |
+
|
332 |
+
//error_log( __LINE__ . ' MLAMultisiteExtensions::_validate_orderby $results = ' . var_export( $results, true ), 0 );
|
333 |
+
return $results;
|
334 |
+
} // _validate_orderby
|
335 |
+
|
336 |
+
/**
|
337 |
+
* Compare two attachments and return:
|
338 |
+
* -1 if the first is lower than the second
|
339 |
+
* 0 if they are equal
|
340 |
+
* 1 if the second is lower than the first OR if the first is NULL
|
341 |
+
*
|
342 |
+
* @since 1.02
|
343 |
+
*
|
344 |
+
* @param array $orderby ( $index => array( $field, $order ) ... )
|
345 |
+
* @param object $first WP_Post object
|
346 |
+
* @param object $second WP_Post object
|
347 |
+
* @param integer $level Optional, default 0; index in $orderby to use for comparison
|
348 |
+
*/
|
349 |
+
private static function _compare_attachments( $orderby, $first, $second, $level = 0 ) {
|
350 |
+
if ( NULL === $first ) {
|
351 |
+
return 1;
|
352 |
+
}
|
353 |
+
|
354 |
+
if ( count( $orderby ) <= $level ) {
|
355 |
+
return -1;
|
356 |
+
}
|
357 |
+
|
358 |
+
$field = $orderby[ $level ]['field'];
|
359 |
+
$order = $orderby[ $level ]['order'];
|
360 |
+
|
361 |
+
if ( 'rand' === $field ) {
|
362 |
+
return 51 < rand( 1, 100 ) ? -1 : 1;
|
363 |
+
}
|
364 |
+
|
365 |
+
if ( 'custom:' === substr( $field, 0, 7 ) ) {
|
366 |
+
$custom = substr( $field, 7 );
|
367 |
+
|
368 |
+
switch_to_blog( $first->site_id );
|
369 |
+
$first_field = get_post_meta( $first->ID, $custom, true );
|
370 |
+
restore_current_blog();
|
371 |
+
|
372 |
+
switch_to_blog( $second->site_id );
|
373 |
+
$second_field = get_post_meta( $second->ID, $custom, true );
|
374 |
+
restore_current_blog();
|
375 |
+
} else {
|
376 |
+
$first_field = $first->{$field};
|
377 |
+
$second_field = $second->{$field};
|
378 |
+
}
|
379 |
+
|
380 |
+
if ( $first_field === $second_field ) {
|
381 |
+
return self::_compare_attachments( $orderby, $first, $second, ++$level );
|
382 |
+
}
|
383 |
+
|
384 |
+
if ( $first_field > $second_field ) {
|
385 |
+
return 'DESC' === $order ? -1 : 1;
|
386 |
+
}
|
387 |
+
|
388 |
+
return 'DESC' === $order ? 1 : -1;
|
389 |
+
} // _compare_attachments
|
390 |
+
|
391 |
+
/**
|
392 |
+
* MLA Gallery The Attachments
|
393 |
+
*
|
394 |
+
* This filter gives you an opportunity to record or modify the array of items
|
395 |
+
* returned by the query.
|
396 |
+
*
|
397 |
+
* @since 1.00
|
398 |
+
*
|
399 |
+
* @param NULL $filtered_attachments initially NULL, indicating no substitution.
|
400 |
+
* @param array $attachments WP_Post objects returned by WP_Query->query, passed by reference
|
401 |
+
*/
|
402 |
+
public static function mla_gallery_the_attachments( $filtered_attachments, $attachments ) {
|
403 |
+
if ( isset( self::$shortcode_attributes['site_id'] ) ) {
|
404 |
+
if ( is_array( self::$all_attachments ) ) {
|
405 |
+
$filtered_attachments = array();
|
406 |
+
$orderby = self::_validate_orderby();
|
407 |
+
|
408 |
+
if ( isset( self::$all_query_parameters['multi_site_limit'] ) ) {
|
409 |
+
$offset = self::$all_query_parameters['multi_site_offset'];
|
410 |
+
$limit = self::$all_query_parameters['multi_site_limit'];
|
411 |
+
} else {
|
412 |
+
$offset = 0;
|
413 |
+
$limit = 0x7FFF;
|
414 |
+
}
|
415 |
+
|
416 |
+
foreach( self::$all_attachments as $site_id => &$attachments ) {
|
417 |
+
if ( count( $attachments ) ) {
|
418 |
+
|
419 |
+
$primary_attachments = &$filtered_attachments;
|
420 |
+
$first = array_shift( $primary_attachments );
|
421 |
+
unset( $filtered_attachments );
|
422 |
+
$filtered_attachments = array();
|
423 |
+
|
424 |
+
foreach( $attachments as $attachment ) {
|
425 |
+
$attachment->site_id = $site_id;
|
426 |
+
|
427 |
+
while ( 1 !== self::_compare_attachments( $orderby, $first, $attachment ) ) {
|
428 |
+
$filtered_attachments[] = $first;
|
429 |
+
$first = array_shift( $primary_attachments );
|
430 |
+
}
|
431 |
+
|
432 |
+
$filtered_attachments[] = $attachment;
|
433 |
+
} // foreach attachment
|
434 |
+
|
435 |
+
while ( !empty( $first ) ) {
|
436 |
+
$filtered_attachments[] = $first;
|
437 |
+
$first = array_shift( $primary_attachments );
|
438 |
+
}
|
439 |
+
} // if count attachments
|
440 |
+
|
441 |
+
if ( 0 === $limit ) {
|
442 |
+
break;
|
443 |
+
}
|
444 |
+
} // foreach site_id
|
445 |
+
|
446 |
+
$filtered_attachments = array_slice ( $filtered_attachments, $offset, $limit );
|
447 |
+
self::$all_attachments = NULL;
|
448 |
+
$filtered_attachments['found_rows'] = count( $filtered_attachments );
|
449 |
+
$filtered_attachments['max_num_pages'] = 0;
|
450 |
+
} else {
|
451 |
+
$site_id = self::$shortcode_attributes['site_id'];
|
452 |
+
self::$attachment_count = 0;
|
453 |
+
foreach ( $attachments as $index => &$attachment ) {
|
454 |
+
if ( is_integer( $index ) ) {
|
455 |
+
self::$attachment_count++;
|
456 |
+
$attachment->site_id = $site_id;
|
457 |
+
}
|
458 |
+
}
|
459 |
+
} // single-blog query
|
460 |
+
}
|
461 |
+
|
462 |
+
return $filtered_attachments;
|
463 |
+
}
|
464 |
+
|
465 |
+
/**
|
466 |
+
* Save the site_id from attachment to attachment
|
467 |
+
*
|
468 |
+
* @since 1.00
|
469 |
+
*
|
470 |
+
* @var array
|
471 |
+
*/
|
472 |
+
private static $current_site_id = 0;
|
473 |
+
|
474 |
+
/**
|
475 |
+
* Save the total number of attachments
|
476 |
+
*
|
477 |
+
* @since 1.00
|
478 |
+
*
|
479 |
+
* @var array
|
480 |
+
*/
|
481 |
+
private static $attachment_count = 0;
|
482 |
+
|
483 |
+
/**
|
484 |
+
* Save the attachments from a multi-blog query; key [blog][index]
|
485 |
+
*
|
486 |
+
* @since 1.01
|
487 |
+
*
|
488 |
+
* @var array
|
489 |
+
*/
|
490 |
+
private static $all_attachments = NULL;
|
491 |
+
|
492 |
+
/**
|
493 |
+
* MLA Gallery Item Initial Values
|
494 |
+
*
|
495 |
+
* This filter gives you an opportunity to add custom elements to each item
|
496 |
+
* returned by the query item-level processing occurs.
|
497 |
+
*
|
498 |
+
* @since 1.00
|
499 |
+
*
|
500 |
+
* @param array $markup_values gallery-level parameter_name => parameter_value pairs
|
501 |
+
* @param array $attachment WP_Post object of the current item
|
502 |
+
*/
|
503 |
+
public static function mla_gallery_item_initial_values( $markup_values, $attachment ) {
|
504 |
+
if ( isset( $attachment->site_id ) ) {
|
505 |
+
if ( self::$current_site_id !== intval( $attachment->site_id ) ) {
|
506 |
+
if ( ms_is_switched() ) {
|
507 |
+
restore_current_blog();
|
508 |
+
}
|
509 |
+
|
510 |
+
self::$current_site_id = intval( $attachment->site_id );
|
511 |
+
switch_to_blog( self::$current_site_id );
|
512 |
+
}
|
513 |
+
}
|
514 |
+
|
515 |
+
return $markup_values;
|
516 |
+
} // mla_gallery_item_initial_values
|
517 |
+
|
518 |
+
/**
|
519 |
+
* MLA Gallery Item Values
|
520 |
+
*
|
521 |
+
* @since 1.00
|
522 |
+
*
|
523 |
+
* @param array parameter_name => parameter_value pairs
|
524 |
+
*
|
525 |
+
* @return array updated substitution parameter name => value pairs
|
526 |
+
*/
|
527 |
+
public static function mla_gallery_item_values( $item_values ) {
|
528 |
+
if ( 0 === --self::$attachment_count ) {
|
529 |
+
if ( ms_is_switched() ) {
|
530 |
+
restore_current_blog();
|
531 |
+
}
|
532 |
+
}
|
533 |
+
|
534 |
+
//error_log( 'MLAGalleryHooksExample::mla_gallery_item_values $item_values = ' . var_export( $item_values, true ), 0 );
|
535 |
+
return $item_values;
|
536 |
+
} // mla_gallery_item_values
|
537 |
+
} // MLAMultisiteExtensions
|
538 |
+
|
539 |
+
// Install the shortcode at an early opportunity
|
540 |
+
add_action('init', 'MLAMultisiteExtensions::initialize');
|
541 |
+
?>
|
examples/plugins/mla-subscriber-media-access-example.php
ADDED
@@ -0,0 +1,194 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Allows "owner only" access to the Media Library for the Subscriber role
|
4 |
+
*
|
5 |
+
* Created for support topic "Limiting users to their own uploaded media"
|
6 |
+
* opened on 9/28/2017 by "drewmarksystems".
|
7 |
+
* https://wordpress.org/support/topic/limiting-users-to-their-own-uploaded-media/
|
8 |
+
*
|
9 |
+
* @package MLA Subscriber Media Access Example
|
10 |
+
* @version 1.00
|
11 |
+
*/
|
12 |
+
|
13 |
+
/*
|
14 |
+
Plugin Name: MLA Subscriber Media Access Example
|
15 |
+
Plugin URI: http://fairtradejudaica.org/media-library-assistant-a-wordpress-plugin/
|
16 |
+
Description: Allows "owner only" access to the Media Library for the Subscriber role
|
17 |
+
Author: David Lingren
|
18 |
+
Version: 1.00
|
19 |
+
Author URI: http://fairtradejudaica.org/our-story/staff/
|
20 |
+
|
21 |
+
Copyright 2017 David Lingren
|
22 |
+
|
23 |
+
This program is free software; you can redistribute it and/or modify
|
24 |
+
it under the terms of the GNU General Public License as published by
|
25 |
+
the Free Software Foundation; either version 2 of the License, or
|
26 |
+
(at your option) any later version.
|
27 |
+
|
28 |
+
This program is distributed in the hope that it will be useful,
|
29 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
30 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
31 |
+
GNU General Public License for more details.
|
32 |
+
|
33 |
+
You can get a copy of the GNU General Public License by writing to the
|
34 |
+
Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
|
35 |
+
*/
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Class MLA Subscriber Media Access Example allows "owner only" access to the Media Library
|
39 |
+
* for the Subscriber role
|
40 |
+
*
|
41 |
+
* @package MLA Subscriber Media Access Example
|
42 |
+
* @since 1.00
|
43 |
+
*/
|
44 |
+
class MLASubscriberMediaAccessExample {
|
45 |
+
/**
|
46 |
+
* Initialization function, similar to __construct()
|
47 |
+
*
|
48 |
+
* @since 1.00
|
49 |
+
*/
|
50 |
+
public static function initialize() {
|
51 |
+
global $current_user;
|
52 |
+
|
53 |
+
// The filters are only useful for admin pages; exit if in the front end
|
54 |
+
if ( !is_admin() ) {
|
55 |
+
return;
|
56 |
+
}
|
57 |
+
|
58 |
+
// Use extra caution before applying actions & filters
|
59 |
+
if ( ( $current_user instanceof WP_User ) && ( 0 !== $current_user->ID ) ) {
|
60 |
+
if( 'subscriber' == $current_user->roles[0] && current_user_can( 'upload_files' ) ) {
|
61 |
+
add_action( 'pre_get_posts', 'MLASubscriberMediaAccessExample::pre_get_posts', 10, 1 );
|
62 |
+
add_filter( 'views_media_page_mla-menu', 'MLASubscriberMediaAccessExample::views_media_page_mla_menu', 10, 1 );
|
63 |
+
add_filter( 'wp_count_attachments', 'MLASubscriberMediaAccessExample::wp_count_attachments', 10, 1 );
|
64 |
+
|
65 |
+
// Run at lower priority to allow for thumbnail generation bulk action
|
66 |
+
add_filter( 'mla_list_table_get_bulk_actions', 'MLASubscriberMediaAccessExample::mla_list_table_get_bulk_actions', 11, 1 );
|
67 |
+
}
|
68 |
+
}
|
69 |
+
}
|
70 |
+
|
71 |
+
/**
|
72 |
+
* Pre Get Posts for role = subscriber
|
73 |
+
*
|
74 |
+
* Restrict Media Library items to those owned by the subscriber
|
75 |
+
*
|
76 |
+
* @since 1.00
|
77 |
+
*
|
78 |
+
* @param object $wp_query Current WP_Query object
|
79 |
+
*/
|
80 |
+
public static function pre_get_posts( $wp_query ) {
|
81 |
+
global $current_user;
|
82 |
+
|
83 |
+
$wp_query->set( 'author', $current_user->ID );
|
84 |
+
}
|
85 |
+
|
86 |
+
/**
|
87 |
+
* WP Count Attachments for role = subscriber
|
88 |
+
*
|
89 |
+
* @since 1.00
|
90 |
+
*
|
91 |
+
* @param object $counts An object containing the attachment counts by mime type.
|
92 |
+
*/
|
93 |
+
public static function wp_count_attachments( $counts ) {
|
94 |
+
global $wpdb;
|
95 |
+
global $current_user;
|
96 |
+
|
97 |
+
$and = wp_post_mime_type_where(''); // Default mime type // AND post_author = {$current_user->ID}
|
98 |
+
$count = $wpdb->get_results("SELECT post_mime_type, COUNT(*) AS num_posts FROM $wpdb->posts WHERE post_type = 'attachment' AND post_status != 'trash' AND post_author = {$current_user->ID} $and GROUP BY post_mime_type", ARRAY_A);
|
99 |
+
|
100 |
+
$counts = array();
|
101 |
+
|
102 |
+
foreach((array)$count as $row){
|
103 |
+
$counts[$row['post_mime_type']] = $row['num_posts'];
|
104 |
+
}
|
105 |
+
|
106 |
+
$counts['trash'] = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_type = 'attachment' AND post_author = {$current_user->ID} AND post_status = 'trash' $and");
|
107 |
+
|
108 |
+
return $counts;
|
109 |
+
}
|
110 |
+
|
111 |
+
/**
|
112 |
+
* Media/Assistant submenu table views for role = subscriber
|
113 |
+
*
|
114 |
+
* @since 1.00
|
115 |
+
*
|
116 |
+
* @param array $views An array of available list table views.
|
117 |
+
* format: view_slug => link to the view, with count
|
118 |
+
*/
|
119 |
+
public static function views_media_page_mla_menu( $views ) {
|
120 |
+
global $wpdb;
|
121 |
+
global $current_user;
|
122 |
+
|
123 |
+
$detached_items = $wpdb->get_var( "SELECT COUNT(*) FROM {$wpdb->posts} WHERE post_type = 'attachment' AND post_status != 'trash' AND post_parent < 1 AND post_author = {$current_user->ID}" );
|
124 |
+
$base_url = 'upload.php?page=' . MLACore::ADMIN_PAGE_SLUG;
|
125 |
+
|
126 |
+
// 'detached':
|
127 |
+
if ( $detached_items ) {
|
128 |
+
$class = strpos( $views['detached'], 'class="current"' ) ? ' class="current"' : '';
|
129 |
+
$value = sprintf('Unattached <span class="count">(%s)</span>', number_format_i18n( $detached_items ) );
|
130 |
+
$views['detached'] = '<a href="' . add_query_arg( array( 'detached' => '1' ), $base_url ) . '"' . $class . '>' . $value . '</a>';
|
131 |
+
} else {
|
132 |
+
unset( $views['detached'] );
|
133 |
+
}
|
134 |
+
|
135 |
+
unset( $views['attached'] );
|
136 |
+
return $views;
|
137 |
+
} // views_media_page_mla_menu
|
138 |
+
|
139 |
+
/**
|
140 |
+
* Filter the MLA_List_Table bulk actions
|
141 |
+
*
|
142 |
+
* Removes Edit and Thumbnail from subscriber's bulk actions.
|
143 |
+
*
|
144 |
+
* @since 1.00
|
145 |
+
*
|
146 |
+
* @param array $actions An array of bulk actions.
|
147 |
+
* Format: 'slug' => 'Label'
|
148 |
+
*/
|
149 |
+
public static function mla_list_table_get_bulk_actions( $actions ) {
|
150 |
+
unset( $actions['edit'] );
|
151 |
+
|
152 |
+
if ( class_exists( 'MLA_Thumbnail' ) ) {
|
153 |
+
unset( $actions[MLA_Thumbnail::MLA_GFI_ACTION] );
|
154 |
+
}
|
155 |
+
|
156 |
+
return $actions;
|
157 |
+
} // mla_list_table_get_bulk_actions
|
158 |
+
|
159 |
+
/**
|
160 |
+
* Perform one-time capabilities addition on plugin activation
|
161 |
+
*
|
162 |
+
* @since 1.00
|
163 |
+
*/
|
164 |
+
public static function mla_activation_hook( ) {
|
165 |
+
$subscriber = get_role( 'subscriber' );
|
166 |
+
|
167 |
+
if ( !array_key_exists( 'upload_files', $subscriber->capabilities ) ) {
|
168 |
+
$subscriber->add_cap( 'upload_files' );
|
169 |
+
$subscriber->add_cap( 'delete_posts' );
|
170 |
+
}
|
171 |
+
}
|
172 |
+
|
173 |
+
/**
|
174 |
+
* Perform one-time capabilities removal on plugin deactivation
|
175 |
+
*
|
176 |
+
* @since 1.00
|
177 |
+
*/
|
178 |
+
public static function mla_deactivation_hook( ) {
|
179 |
+
$subscriber = get_role( 'subscriber' );
|
180 |
+
|
181 |
+
if ( array_key_exists( 'upload_files', $subscriber->capabilities ) ) {
|
182 |
+
$subscriber->remove_cap( 'upload_files' );
|
183 |
+
$subscriber->remove_cap( 'delete_posts' );
|
184 |
+
}
|
185 |
+
}
|
186 |
+
} // Class MLASubscriberMediaAccessExample
|
187 |
+
|
188 |
+
// Install the filters at an early opportunity
|
189 |
+
add_action('init', 'MLASubscriberMediaAccessExample::initialize');
|
190 |
+
|
191 |
+
// Register hooks that are fired when the plugin is activated or deactivated.
|
192 |
+
register_activation_hook( __FILE__, array( 'MLASubscriberMediaAccessExample', 'mla_activation_hook' ) );
|
193 |
+
register_deactivation_hook( __FILE__, array( 'MLASubscriberMediaAccessExample', 'mla_deactivation_hook' ) );
|
194 |
+
?>
|
examples/plugins/mla-taxonomy-hooks-example.php
ADDED
@@ -0,0 +1,165 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Provides an example of the filters provided by the MLA registration code for the Att. Cateogires and Att. Tags taxonomies
|
4 |
+
*
|
5 |
+
* Created for support topic "attachment_category rewrite"
|
6 |
+
* opened on 9/8/2017 by "alx359":
|
7 |
+
* https://wordpress.org/support/topic/attachment_category-rewrite/
|
8 |
+
*
|
9 |
+
* @package MLA Taxonomy Hooks Example
|
10 |
+
* @version 1.00
|
11 |
+
*/
|
12 |
+
|
13 |
+
/*
|
14 |
+
Plugin Name: MLA Taxonomy Hooks Example
|
15 |
+
Plugin URI: http://fairtradejudaica.org/media-library-assistant-a-wordpress-plugin/
|
16 |
+
Description: Documents the hooks provided for registering the Att. Categories and Att. Tags taxonomies
|
17 |
+
Author: David Lingren
|
18 |
+
Version: 1.00
|
19 |
+
Author URI: http://fairtradejudaica.org/our-story/staff/
|
20 |
+
|
21 |
+
Copyright 2017 David Lingren
|
22 |
+
|
23 |
+
This program is free software; you can redistribute it and/or modify
|
24 |
+
it under the terms of the GNU General Public License as published by
|
25 |
+
the Free Software Foundation; either version 2 of the License, or
|
26 |
+
(at your option) any later version.
|
27 |
+
|
28 |
+
This program is distributed in the hope that it will be useful,
|
29 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
30 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
31 |
+
GNU General Public License for more details.
|
32 |
+
|
33 |
+
You can get a copy of the GNU General Public License by writing to the
|
34 |
+
Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
|
35 |
+
*/
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Class MLA Taxonomy Hooks Example hooks all of the filters provided
|
39 |
+
* by the "Custom Taxonomy Actions and Filters (Hooks)"
|
40 |
+
*
|
41 |
+
* Call it anything you want, but give it an unlikely and hopefully unique name. Hiding
|
42 |
+
* everything else inside a class means this is the only name you have to worry about.
|
43 |
+
*
|
44 |
+
* @package MLA Taxonomy Hooks Example
|
45 |
+
* @since 1.00
|
46 |
+
*/
|
47 |
+
class MLATaxonomyHooksExample {
|
48 |
+
/**
|
49 |
+
* Initialization function, similar to __construct()
|
50 |
+
*
|
51 |
+
* Installs filters and actions that handle the MLA hooks for the
|
52 |
+
* "Field-level substitution parameters"
|
53 |
+
*
|
54 |
+
* @since 1.00
|
55 |
+
*
|
56 |
+
* @return void
|
57 |
+
*/
|
58 |
+
public static function initialize() {
|
59 |
+
|
60 |
+
// Defined in /media-library-assistant/includes/class-mla-objects.php
|
61 |
+
add_filter( 'mla_attachment_category_types', 'MLATaxonomyHooksExample::mla_attachment_category_types', 10, 1 );
|
62 |
+
add_filter( 'mla_attachment_category_labels', 'MLATaxonomyHooksExample::mla_attachment_category_labels', 10, 1 );
|
63 |
+
add_filter( 'mla_attachment_category_arguments', 'MLATaxonomyHooksExample::mla_attachment_category_arguments', 10, 1 );
|
64 |
+
|
65 |
+
add_filter( 'mla_attachment_tag_types', 'MLATaxonomyHooksExample::mla_attachment_tag_types', 10, 1 );
|
66 |
+
add_filter( 'mla_attachment_tag_labels', 'MLATaxonomyHooksExample::mla_attachment_tag_labels', 10, 1 );
|
67 |
+
add_filter( 'mla_attachment_tag_arguments', 'MLATaxonomyHooksExample::mla_attachment_tag_arguments', 10, 1 );
|
68 |
+
} // initialize
|
69 |
+
|
70 |
+
/**
|
71 |
+
* MLA Att. Categories Object Type Filter
|
72 |
+
*
|
73 |
+
* Gives you an opportunity to modify the object types for which the taxonomy will be registered.
|
74 |
+
*
|
75 |
+
* @since 1.00
|
76 |
+
*
|
77 |
+
* @param array $object_type The object type(s) for which the taxonomy will be registered. Default array( 'attachment' ).
|
78 |
+
*/
|
79 |
+
public static function mla_attachment_category_types( $object_type ) {
|
80 |
+
//error_log( __LINE__ . " MLATaxonomyHooksExample::mla_attachment_category_types object_type = " . var_export( $object_type, true ), 0 );
|
81 |
+
|
82 |
+
return $object_type;
|
83 |
+
} // mla_attachment_category_types
|
84 |
+
|
85 |
+
/**
|
86 |
+
* MLA Att. Categories Labels Filter
|
87 |
+
*
|
88 |
+
* Gives you an opportunity to modify the labels used to define the taxonomy in the user interface.
|
89 |
+
*
|
90 |
+
* @since 1.00
|
91 |
+
*
|
92 |
+
* @param array $labels The labels used to define the taxonomy in the user interface.
|
93 |
+
*/
|
94 |
+
public static function mla_attachment_category_labels( $labels ) {
|
95 |
+
//error_log( __LINE__ . " MLATaxonomyHooksExample::mla_attachment_category_labels labels = " . var_export( $labels, true ), 0 );
|
96 |
+
|
97 |
+
return $labels;
|
98 |
+
} // mla_attachment_category_labels
|
99 |
+
|
100 |
+
/**
|
101 |
+
* MLA Att. Categories Arguments Filter
|
102 |
+
*
|
103 |
+
* Gives you an opportunity to modify the arguments used to define the taxonomy.
|
104 |
+
*
|
105 |
+
* @since 1.00
|
106 |
+
*
|
107 |
+
* @param array $args The arguments used to define the taxonomy.
|
108 |
+
*/
|
109 |
+
public static function mla_attachment_category_arguments( $args ) {
|
110 |
+
//error_log( __LINE__ . " MLATaxonomyHooksExample::mla_attachment_category_arguments args = " . var_export( $args, true ), 0 );
|
111 |
+
|
112 |
+
//$args['rewrite'] = array( 'slug' => 'genre' ); // Example of a custom "base" value for the taxonomy URLs
|
113 |
+
|
114 |
+
return $args;
|
115 |
+
} // mla_attachment_category_arguments
|
116 |
+
|
117 |
+
/**
|
118 |
+
* MLA Att. Tags Object Type Filter
|
119 |
+
*
|
120 |
+
* Gives you an opportunity to modify the object types for which the taxonomy will be registered.
|
121 |
+
*
|
122 |
+
* @since 1.00
|
123 |
+
*
|
124 |
+
* @param array $object_type The object type(s) for which the taxonomy will be registered. Default array( 'attachment' ).
|
125 |
+
*/
|
126 |
+
public static function mla_attachment_tag_types( $object_type ) {
|
127 |
+
//error_log( __LINE__ . " MLATaxonomyHooksExample::mla_attachment_tag_types object_type = " . var_export( $object_type, true ), 0 );
|
128 |
+
|
129 |
+
return $object_type;
|
130 |
+
} // mla_attachment_tag_types
|
131 |
+
|
132 |
+
/**
|
133 |
+
* MLA Att. Tags Labels Filter
|
134 |
+
*
|
135 |
+
* Gives you an opportunity to modify the labels used to define the taxonomy in the user interface.
|
136 |
+
*
|
137 |
+
* @since 1.00
|
138 |
+
*
|
139 |
+
* @param array $labels The labels used to define the taxonomy in the user interface.
|
140 |
+
*/
|
141 |
+
public static function mla_attachment_tag_labels( $labels ) {
|
142 |
+
//error_log( __LINE__ . " MLATaxonomyHooksExample::mla_attachment_tag_labels labels = " . var_export( $labels, true ), 0 );
|
143 |
+
|
144 |
+
return $labels;
|
145 |
+
} // mla_attachment_tag_labels
|
146 |
+
|
147 |
+
/**
|
148 |
+
* MLA Att. Tags Arguments Filter
|
149 |
+
*
|
150 |
+
* Gives you an opportunity to modify the arguments used to define the taxonomy.
|
151 |
+
*
|
152 |
+
* @since 1.00
|
153 |
+
*
|
154 |
+
* @param array $args The arguments used to define the taxonomy.
|
155 |
+
*/
|
156 |
+
public static function mla_attachment_tag_arguments( $args ) {
|
157 |
+
//error_log( __LINE__ . " MLATaxonomyHooksExample::mla_attachment_tag_arguments args = " . var_export( $args, true ), 0 );
|
158 |
+
|
159 |
+
return $args;
|
160 |
+
} // mla_attachment_tag_arguments
|
161 |
+
} //MLATaxonomyHooksExample
|
162 |
+
|
163 |
+
// Install the filters at an early opportunity, e.g., 'plugins_loaded' or 'init'
|
164 |
+
add_action('plugins_loaded', 'MLATaxonomyHooksExample::initialize');
|
165 |
+
?>
|
phpDocs/js/jqplot/gpl-2.0.txt → examples/plugins/smart-media-categories/LICENSE.txt
RENAMED
@@ -1,14 +1,12 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
GNU GENERAL PUBLIC LICENSE
|
4 |
-
Version 2, June 1991
|
5 |
|
6 |
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
7 |
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
8 |
Everyone is permitted to copy and distribute verbatim copies
|
9 |
of this license document, but changing it is not allowed.
|
10 |
|
11 |
-
|
12 |
|
13 |
The licenses for most software are designed to take away your
|
14 |
freedom to share and change it. By contrast, the GNU General Public
|
@@ -58,7 +56,7 @@ patent must be licensed for everyone's free use or not licensed at all.
|
|
58 |
The precise terms and conditions for copying, distribution and
|
59 |
modification follow.
|
60 |
|
61 |
-
|
62 |
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
63 |
|
64 |
0. This License applies to any program or other work which contains
|
@@ -257,7 +255,7 @@ make exceptions for this. Our decision will be guided by the two goals
|
|
257 |
of preserving the free status of all derivatives of our free software and
|
258 |
of promoting the sharing and reuse of software generally.
|
259 |
|
260 |
-
|
261 |
|
262 |
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
263 |
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
@@ -277,4 +275,65 @@ OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
|
277 |
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
278 |
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
279 |
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
280 |
-
POSSIBILITY OF SUCH DAMAGES.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
GNU GENERAL PUBLIC LICENSE
|
2 |
+
Version 2, June 1991
|
|
|
|
|
3 |
|
4 |
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
5 |
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
6 |
Everyone is permitted to copy and distribute verbatim copies
|
7 |
of this license document, but changing it is not allowed.
|
8 |
|
9 |
+
Preamble
|
10 |
|
11 |
The licenses for most software are designed to take away your
|
12 |
freedom to share and change it. By contrast, the GNU General Public
|
56 |
The precise terms and conditions for copying, distribution and
|
57 |
modification follow.
|
58 |
|
59 |
+
GNU GENERAL PUBLIC LICENSE
|
60 |
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
61 |
|
62 |
0. This License applies to any program or other work which contains
|
255 |
of preserving the free status of all derivatives of our free software and
|
256 |
of promoting the sharing and reuse of software generally.
|
257 |
|
258 |
+
NO WARRANTY
|
259 |
|
260 |
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
261 |
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
275 |
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
276 |
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
277 |
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
278 |
+
POSSIBILITY OF SUCH DAMAGES.
|
279 |
+
|
280 |
+
END OF TERMS AND CONDITIONS
|
281 |
+
|
282 |
+
How to Apply These Terms to Your New Programs
|
283 |
+
|
284 |
+
If you develop a new program, and you want it to be of the greatest
|
285 |
+
possible use to the public, the best way to achieve this is to make it
|
286 |
+
free software which everyone can redistribute and change under these terms.
|
287 |
+
|
288 |
+
To do so, attach the following notices to the program. It is safest
|
289 |
+
to attach them to the start of each source file to most effectively
|
290 |
+
convey the exclusion of warranty; and each file should have at least
|
291 |
+
the "copyright" line and a pointer to where the full notice is found.
|
292 |
+
|
293 |
+
<one line to give the program's name and a brief idea of what it does.>
|
294 |
+
Copyright (C) <year> <name of author>
|
295 |
+
|
296 |
+
This program is free software; you can redistribute it and/or modify
|
297 |
+
it under the terms of the GNU General Public License as published by
|
298 |
+
the Free Software Foundation; either version 2 of the License, or
|
299 |
+
(at your option) any later version.
|
300 |
+
|
301 |
+
This program is distributed in the hope that it will be useful,
|
302 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
303 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
304 |
+
GNU General Public License for more details.
|
305 |
+
|
306 |
+
You should have received a copy of the GNU General Public License along
|
307 |
+
with this program; if not, write to the Free Software Foundation, Inc.,
|
308 |
+
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
309 |
+
|
310 |
+
Also add information on how to contact you by electronic and paper mail.
|
311 |
+
|
312 |
+
If the program is interactive, make it output a short notice like this
|
313 |
+
when it starts in an interactive mode:
|
314 |
+
|
315 |
+
Gnomovision version 69, Copyright (C) year name of author
|
316 |
+
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
317 |
+
This is free software, and you are welcome to redistribute it
|
318 |
+
under certain conditions; type `show c' for details.
|
319 |
+
|
320 |
+
The hypothetical commands `show w' and `show c' should show the appropriate
|
321 |
+
parts of the General Public License. Of course, the commands you use may
|
322 |
+
be called something other than `show w' and `show c'; they could even be
|
323 |
+
mouse-clicks or menu items--whatever suits your program.
|
324 |
+
|
325 |
+
You should also get your employer (if you work as a programmer) or your
|
326 |
+
school, if any, to sign a "copyright disclaimer" for the program, if
|
327 |
+
necessary. Here is a sample; alter the names:
|
328 |
+
|
329 |
+
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
330 |
+
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
331 |
+
|
332 |
+
<signature of Ty Coon>, 1 April 1989
|
333 |
+
Ty Coon, President of Vice
|
334 |
+
|
335 |
+
This General Public License does not permit incorporating your program into
|
336 |
+
proprietary programs. If your program is a subroutine library, you may
|
337 |
+
consider it more useful to permit linking proprietary applications with the
|
338 |
+
library. If this is what you want to do, use the GNU Lesser General
|
339 |
+
Public License instead of this License.
|
examples/plugins/smart-media-categories/admin/assets/css/index.php
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?php // Silence is golden
|
examples/plugins/smart-media-categories/admin/assets/css/smc-admin.css
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
* This stylesheet is used for the Settings/Smart Media Categories submenu.
|
3 |
+
*/
|
examples/plugins/smart-media-categories/admin/assets/css/smc-posts-pages.css
ADDED
@@ -0,0 +1,564 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
* This stylesheet is used for the All Posts/All Pages modal windows.
|
3 |
+
*/
|
4 |
+
|
5 |
+
#smc-sync-all-bulk {
|
6 |
+
margin-right: .5em;
|
7 |
+
}
|
8 |
+
|
9 |
+
#smc-posts-modal-div {
|
10 |
+
background-color: #fff;
|
11 |
+
-webkit-box-shadow: 0 3px 6px rgba( 0, 0, 0, 0.3 );
|
12 |
+
box-shadow: 0 3px 6px rgba( 0, 0, 0, 0.3 );
|
13 |
+
width: 600px;
|
14 |
+
overflow: hidden;
|
15 |
+
margin-left: -300px;
|
16 |
+
position: fixed;
|
17 |
+
top: 30px;
|
18 |
+
bottom: 30px;
|
19 |
+
left: 50%;
|
20 |
+
z-index: 100105;
|
21 |
+
}
|
22 |
+
|
23 |
+
@media screen and ( max-width: 660px ) {
|
24 |
+
#smc-posts-modal-div {
|
25 |
+
top: 0;
|
26 |
+
bottom: 0;
|
27 |
+
left: 0;
|
28 |
+
right: 0;
|
29 |
+
margin: 0;
|
30 |
+
width: 100%;
|
31 |
+
}
|
32 |
+
}
|
33 |
+
|
34 |
+
#smc-posts-modal-head-div {
|
35 |
+
background: #fcfcfc;
|
36 |
+
border-bottom: 1px solid #dfdfdf;
|
37 |
+
height: 36px;
|
38 |
+
font-size: 18px;
|
39 |
+
font-weight: 600;
|
40 |
+
line-height: 36px;
|
41 |
+
padding: 0 36px 0 16px;
|
42 |
+
position: absolute;
|
43 |
+
top: 0;
|
44 |
+
left: 0;
|
45 |
+
right: 0;
|
46 |
+
}
|
47 |
+
|
48 |
+
#smc-sync-close,
|
49 |
+
#smc-posts-modal-close-div {
|
50 |
+
width: 36px;
|
51 |
+
height: 36px;
|
52 |
+
position: absolute;
|
53 |
+
top: 0;
|
54 |
+
right: 0;
|
55 |
+
cursor: pointer;
|
56 |
+
text-align: center;
|
57 |
+
vertical-align: middle;
|
58 |
+
font-style: normal;
|
59 |
+
font-variant: normal;
|
60 |
+
font-weight: bold;
|
61 |
+
font-size: 24px;
|
62 |
+
font-family: "Open Sans", sans-serif
|
63 |
+
color: #666;
|
64 |
+
}
|
65 |
+
|
66 |
+
#smc-sync-close:hover,
|
67 |
+
#smc-posts-modal-close-div:hover {
|
68 |
+
color: #2ea2cc;
|
69 |
+
}
|
70 |
+
|
71 |
+
#smc-posts-modal-inside-div {
|
72 |
+
overflow: auto;
|
73 |
+
padding: 16px;
|
74 |
+
background-color: #fff;
|
75 |
+
position: absolute;
|
76 |
+
top: 37px;
|
77 |
+
bottom: 45px;
|
78 |
+
overflow-y: scroll;
|
79 |
+
width: 100%;
|
80 |
+
-webkit-box-sizing: border-box;
|
81 |
+
-moz-box-sizing: border-box;
|
82 |
+
box-sizing: border-box;
|
83 |
+
}
|
84 |
+
|
85 |
+
@media screen and ( max-width: 782px ) {
|
86 |
+
#smc-posts-modal-inside-div {
|
87 |
+
bottom: 57px;
|
88 |
+
}
|
89 |
+
}
|
90 |
+
|
91 |
+
#smc-posts-modal-search-div {
|
92 |
+
padding-bottom: 16px;
|
93 |
+
}
|
94 |
+
|
95 |
+
#smc-posts-modal-input {
|
96 |
+
float: left;
|
97 |
+
width: 140px;
|
98 |
+
height: 28px;
|
99 |
+
margin: 0 4px 0 0;
|
100 |
+
}
|
101 |
+
|
102 |
+
#smc-posts-modal-search-div .spinner {
|
103 |
+
float: none;
|
104 |
+
left: 125px;
|
105 |
+
position: absolute;
|
106 |
+
top: 18px;
|
107 |
+
padding: 4px 10px 0;
|
108 |
+
}
|
109 |
+
|
110 |
+
#smc-posts-modal-search {
|
111 |
+
float: left;
|
112 |
+
}
|
113 |
+
|
114 |
+
#smc-posts-modal-current-title-div {
|
115 |
+
float:left;
|
116 |
+
font-size: 12px;
|
117 |
+
margin-top: 10px;
|
118 |
+
}
|
119 |
+
|
120 |
+
#smc-posts-modal-pagination-div {
|
121 |
+
float: right;
|
122 |
+
padding-bottom: 4px;
|
123 |
+
}
|
124 |
+
|
125 |
+
/* Added or modified in JavaScript code */
|
126 |
+
.smc-sync-close-dashicons:before,
|
127 |
+
.smc-posts-modal-close-div-dashicons:before {
|
128 |
+
font: normal 20px/36px 'dashicons';
|
129 |
+
vertical-align: top;
|
130 |
+
speak: none;
|
131 |
+
-webkit-font-smoothing: antialiased;
|
132 |
+
-moz-osx-font-smoothing: grayscale;
|
133 |
+
content: '\f158';
|
134 |
+
}
|
135 |
+
|
136 |
+
#smc-posts-modal-buttons-div {
|
137 |
+
padding: 8px 16px;
|
138 |
+
background: #fcfcfc;
|
139 |
+
border-top: 1px solid #dfdfdf;
|
140 |
+
position: absolute;
|
141 |
+
bottom: 0;
|
142 |
+
left: 0;
|
143 |
+
right: 0;
|
144 |
+
}
|
145 |
+
|
146 |
+
#smc-find-overlay,
|
147 |
+
#smc-sync-overlay {
|
148 |
+
position: fixed;
|
149 |
+
top: 0;
|
150 |
+
left: 0;
|
151 |
+
right: 0;
|
152 |
+
bottom: 0;
|
153 |
+
background: #000;
|
154 |
+
opacity: 0.7;
|
155 |
+
filter: alpha(opacity=70);
|
156 |
+
z-index: 100100;
|
157 |
+
}
|
158 |
+
|
159 |
+
/*
|
160 |
+
* Sync box styles, adapted from /wp-admin/css/media.css
|
161 |
+
*/
|
162 |
+
|
163 |
+
#smc-sync-div {
|
164 |
+
background-color: #fff;
|
165 |
+
-webkit-box-shadow: 0 3px 6px rgba( 0, 0, 0, 0.3 );
|
166 |
+
box-shadow: 0 3px 6px rgba( 0, 0, 0, 0.3 );
|
167 |
+
width: 800px;
|
168 |
+
overflow: hidden;
|
169 |
+
margin-left: -300px;
|
170 |
+
position: fixed;
|
171 |
+
top: 30px;
|
172 |
+
bottom: 30px;
|
173 |
+
left: 50%;
|
174 |
+
z-index: 100105;
|
175 |
+
}
|
176 |
+
|
177 |
+
@media screen and ( max-width: 660px ) {
|
178 |
+
#smc-sync-div {
|
179 |
+
top: 0;
|
180 |
+
bottom: 0;
|
181 |
+
left: 0;
|
182 |
+
right: 0;
|
183 |
+
margin: 0;
|
184 |
+
width: 100%;
|
185 |
+
}
|
186 |
+
}
|
187 |
+
|
188 |
+
#smc-sync-head {
|
189 |
+
background: #fcfcfc;
|
190 |
+
border-bottom: 1px solid #dfdfdf;
|
191 |
+
height: 36px;
|
192 |
+
font-size: 18px;
|
193 |
+
font-weight: 600;
|
194 |
+
line-height: 36px;
|
195 |
+
padding: 0 36px 0 16px;
|
196 |
+
position: absolute;
|
197 |
+
top: 0;
|
198 |
+
left: 0;
|
199 |
+
right: 0;
|
200 |
+
}
|
201 |
+
|
202 |
+
#smc-sync-inside {
|
203 |
+
overflow: auto;
|
204 |
+
padding: 16px;
|
205 |
+
background-color: #fff;
|
206 |
+
position: absolute;
|
207 |
+
top: 37px;
|
208 |
+
bottom: 45px;
|
209 |
+
overflow-y: scroll;
|
210 |
+
width: 100%;
|
211 |
+
-webkit-box-sizing: border-box;
|
212 |
+
-moz-box-sizing: border-box;
|
213 |
+
box-sizing: border-box;
|
214 |
+
}
|
215 |
+
|
216 |
+
@media screen and ( max-width: 782px ) {
|
217 |
+
#smc-sync-inside {
|
218 |
+
bottom: 57px;
|
219 |
+
}
|
220 |
+
}
|
221 |
+
|
222 |
+
#smc-sync-buttons-div {
|
223 |
+
padding: 8px 16px;
|
224 |
+
background: #fcfcfc;
|
225 |
+
border-top: 1px solid #dfdfdf;
|
226 |
+
position: absolute;
|
227 |
+
bottom: 0;
|
228 |
+
left: 0;
|
229 |
+
right: 0;
|
230 |
+
}
|
231 |
+
|
232 |
+
/*
|
233 |
+
* smc-sync-box-inside styles, adapted from /wp-admin/css/list-tables.css
|
234 |
+
*/
|
235 |
+
|
236 |
+
#smc-sync-inside .smc-sync-col-left {
|
237 |
+
width: 25%;
|
238 |
+
}
|
239 |
+
|
240 |
+
#smc-sync-inside .smc-sync-col-center {
|
241 |
+
width: 25%;
|
242 |
+
}
|
243 |
+
|
244 |
+
#smc-sync-inside .smc-sync-col-right {
|
245 |
+
width: 49%;
|
246 |
+
}
|
247 |
+
|
248 |
+
#smc-sync-inside .smc-sync-group {
|
249 |
+
clear: both;
|
250 |
+
}
|
251 |
+
|
252 |
+
#smc-sync-inside .smc-sync-group:after {
|
253 |
+
content: ".";
|
254 |
+
display: block;
|
255 |
+
height: 0;
|
256 |
+
clear: both;
|
257 |
+
visibility: hidden;
|
258 |
+
}
|
259 |
+
|
260 |
+
#smc-sync-inside #smc-sync-error {
|
261 |
+
line-height: 22px;
|
262 |
+
margin: 0 15px;
|
263 |
+
padding: 3px 5px;
|
264 |
+
}
|
265 |
+
|
266 |
+
/*
|
267 |
+
#smc-sync-inside h4 {
|
268 |
+
margin: .2em 0;
|
269 |
+
padding: 0;
|
270 |
+
line-height: 23px;
|
271 |
+
text-transform: uppercase;
|
272 |
+
}
|
273 |
+
*/
|
274 |
+
|
275 |
+
#smc-sync-inside .input-text-wrap input[type=text] {
|
276 |
+
width: 100%;
|
277 |
+
}
|
278 |
+
|
279 |
+
#smc-sync-inside fieldset {
|
280 |
+
font-size: 12px;
|
281 |
+
float: left;
|
282 |
+
margin: 0;
|
283 |
+
padding: 0;
|
284 |
+
width: 100%;
|
285 |
+
}
|
286 |
+
|
287 |
+
#smc-sync-inside fieldset .smc-sync-col {
|
288 |
+
padding: 0 0.5em;
|
289 |
+
}
|
290 |
+
|
291 |
+
#smc-sync-inside fieldset span.title,
|
292 |
+
#smc-sync-inside fieldset span.checkbox-title {
|
293 |
+
margin: 0;
|
294 |
+
padding: 0;
|
295 |
+
line-height: 27px;
|
296 |
+
}
|
297 |
+
|
298 |
+
#smc-sync-inside fieldset label {
|
299 |
+
display: block;
|
300 |
+
margin: .2em 0;
|
301 |
+
}
|
302 |
+
|
303 |
+
/*
|
304 |
+
#smc-sync-inside fieldset label.inline-edit-tags {
|
305 |
+
margin-top: 0;
|
306 |
+
}
|
307 |
+
|
308 |
+
#smc-sync-inside fieldset label.inline-edit-tags span.title {
|
309 |
+
margin: .2em 0;
|
310 |
+
width: auto;
|
311 |
+
}
|
312 |
+
*/
|
313 |
+
|
314 |
+
#smc-sync-inside fieldset label span.title {
|
315 |
+
display: block;
|
316 |
+
float: left;
|
317 |
+
width: 5em;
|
318 |
+
}
|
319 |
+
|
320 |
+
#smc-sync-inside fieldset label span.input-text-wrap {
|
321 |
+
display: block;
|
322 |
+
margin-left: 5em;
|
323 |
+
}
|
324 |
+
|
325 |
+
#smc-sync-inside fieldset.smc-sync-col-right label span.title {
|
326 |
+
width: auto;
|
327 |
+
padding-right: 0.5em;
|
328 |
+
}
|
329 |
+
|
330 |
+
#smc-sync-inside fieldset label input[type=checkbox] {
|
331 |
+
vertical-align: text-bottom;
|
332 |
+
}
|
333 |
+
|
334 |
+
#smc-sync-inside fieldset label textarea {
|
335 |
+
width: 100%;
|
336 |
+
height: 4em;
|
337 |
+
}
|
338 |
+
|
339 |
+
#smc-sync-inside fieldset .smc-sync-group label {
|
340 |
+
max-width: 50%;
|
341 |
+
}
|
342 |
+
|
343 |
+
#smc-sync-inside fieldset .smc-sync-group label.alignleft:first-child {
|
344 |
+
margin-right: 0.5em
|
345 |
+
}
|
346 |
+
|
347 |
+
#smc-sync-inside fieldset span.title,
|
348 |
+
#smc-sync-inside fieldset span.checkbox-title {
|
349 |
+
font-style: italic;
|
350 |
+
line-height: 1.8em;
|
351 |
+
}
|
352 |
+
|
353 |
+
.smc-sync-true {
|
354 |
+
font-style:normal;
|
355 |
+
color:#555555;
|
356 |
+
}
|
357 |
+
|
358 |
+
.column-smc_children .smc-sync-true {
|
359 |
+
color: #0074A2;
|
360 |
+
}
|
361 |
+
|
362 |
+
.column-smc_children a.smc-sync-true:hover,
|
363 |
+
.column-smc_children a.smc-sync-true:active {
|
364 |
+
color: #2ea2cc;
|
365 |
+
}
|
366 |
+
|
367 |
+
.smc-sync-false {
|
368 |
+
font-style: italic;
|
369 |
+
color:#F00;
|
370 |
+
}
|
371 |
+
|
372 |
+
/* Specific Elements */
|
373 |
+
|
374 |
+
#smc-sync-parent-block {
|
375 |
+
margin-top: 10px;
|
376 |
+
}
|
377 |
+
|
378 |
+
#smc-current-parent {
|
379 |
+
font-size: 14px;
|
380 |
+
}
|
381 |
+
|
382 |
+
#smc-sync-reattach {
|
383 |
+
font-size: 12px;
|
384 |
+
height: 20px;
|
385 |
+
line-height: 14px;
|
386 |
+
}
|
387 |
+
|
388 |
+
/*
|
389 |
+
#smc-sync-inside fieldset .inline-edit-date {
|
390 |
+
float: left;
|
391 |
+
}
|
392 |
+
|
393 |
+
#smc-sync-inside fieldset input[name=jj],
|
394 |
+
#smc-sync-inside fieldset input[name=hh],
|
395 |
+
#smc-sync-inside fieldset input[name=mn] {
|
396 |
+
font-size: 12px;
|
397 |
+
width: 2.1em;
|
398 |
+
}
|
399 |
+
|
400 |
+
#smc-sync-inside fieldset input[name=aa] {
|
401 |
+
font-size: 12px;
|
402 |
+
width: 3.5em;
|
403 |
+
}
|
404 |
+
|
405 |
+
#smc-sync-inside fieldset label input.inline-edit-password-input {
|
406 |
+
width: 8em;
|
407 |
+
}
|
408 |
+
*/
|
409 |
+
|
410 |
+
.smc-sync-col ul.cat-checklist {
|
411 |
+
height: 12em;
|
412 |
+
border: solid 1px #ddd;
|
413 |
+
overflow-y: scroll;
|
414 |
+
padding: 0 5px;
|
415 |
+
margin: 0;
|
416 |
+
background-color: #fff;
|
417 |
+
}
|
418 |
+
|
419 |
+
.smc-sync-col ul.cat-checklist ul {
|
420 |
+
margin-left: 18px;
|
421 |
+
}
|
422 |
+
|
423 |
+
#smc-sync-inside fieldset ul.cat-checklist li,
|
424 |
+
#smc-sync-inside fieldset ul.cat-checklist input {
|
425 |
+
margin: 0;
|
426 |
+
position: relative; /* RTL fix, #WP27629 */
|
427 |
+
}
|
428 |
+
|
429 |
+
#smc-sync-inside fieldset ul.cat-checklist label {
|
430 |
+
font-style: normal;
|
431 |
+
font-size: 11px;
|
432 |
+
}
|
433 |
+
|
434 |
+
/*
|
435 |
+
smc-sync-inside fieldset label input.inline-edit-menu-order-input {
|
436 |
+
width: 3em;
|
437 |
+
}
|
438 |
+
|
439 |
+
#smc-sync-inside fieldset label input.inline-edit-slug-input {
|
440 |
+
width: 75%;
|
441 |
+
}
|
442 |
+
|
443 |
+
#smc-sync-inside #post_parent,
|
444 |
+
#smc-sync-inside select[name="page_template"] {
|
445 |
+
max-width: 80%;
|
446 |
+
}
|
447 |
+
|
448 |
+
.ie8 #smc-sync-inside #post_parent,
|
449 |
+
.ie8 #smc-sync-inside select[name="page_template"] {
|
450 |
+
width: 250px;
|
451 |
+
}
|
452 |
+
|
453 |
+
#smc-sync-inside fieldset label.inline-edit-status {
|
454 |
+
float: left;
|
455 |
+
}
|
456 |
+
*/
|
457 |
+
|
458 |
+
#smc-sync-children-div {
|
459 |
+
display: block;
|
460 |
+
height: 12em;
|
461 |
+
border: 1px solid #ddd;
|
462 |
+
overflow-y: scroll;
|
463 |
+
padding: 0 5px;
|
464 |
+
margin: 0 0 5px;
|
465 |
+
line-height: 140%;
|
466 |
+
}
|
467 |
+
|
468 |
+
#smc-sync-children-div div {
|
469 |
+
margin: 0.2em 0.3em;
|
470 |
+
font-family: "Open Sans", sans-serif
|
471 |
+
font-style: normal;
|
472 |
+
font-size: 11px;
|
473 |
+
}
|
474 |
+
|
475 |
+
.smc-sync-children-a-dashicons {
|
476 |
+
background: none !important;
|
477 |
+
cursor: pointer;
|
478 |
+
display: block;
|
479 |
+
float: left;
|
480 |
+
height: 18px;
|
481 |
+
margin: 0 3px 0 -2px;
|
482 |
+
overflow: hidden;
|
483 |
+
position: relative;
|
484 |
+
width: 20px;
|
485 |
+
}
|
486 |
+
|
487 |
+
.smc-sync-children-a-dashicons:before {
|
488 |
+
position: relative;
|
489 |
+
top: -3px;
|
490 |
+
background: none;
|
491 |
+
color: #bbb;
|
492 |
+
content: '\f153';
|
493 |
+
display: block !important;
|
494 |
+
font: normal 16px/1 'dashicons';
|
495 |
+
speak: none;
|
496 |
+
height: 20px;
|
497 |
+
margin: 2px 0;
|
498 |
+
text-align: center;
|
499 |
+
width: 20px;
|
500 |
+
-webkit-font-smoothing: antialiased !important;
|
501 |
+
}
|
502 |
+
|
503 |
+
.smc-sync-children-a-dashicons:hover {
|
504 |
+
background: none !important;
|
505 |
+
}
|
506 |
+
|
507 |
+
.smc-sync-children-a-dashicons:hover:before {
|
508 |
+
color: #c00;
|
509 |
+
}
|
510 |
+
|
511 |
+
.smc-sync-children-a-gif {
|
512 |
+
background: url(/wp-admin/images/xit.gif) no-repeat;
|
513 |
+
cursor: pointer;
|
514 |
+
display: block;
|
515 |
+
float: left;
|
516 |
+
height: 10px;
|
517 |
+
margin: 3px 3px 0 -2px;
|
518 |
+
overflow: hidden;
|
519 |
+
position: relative;
|
520 |
+
text-indent: -9999px;
|
521 |
+
width: 10px;
|
522 |
+
}
|
523 |
+
|
524 |
+
.smc-sync-children-a-gif:hover {
|
525 |
+
background: url(/wp-admin/images/xit.gif) no-repeat -10px 0;
|
526 |
+
}
|
527 |
+
|
528 |
+
/*
|
529 |
+
#smc-sync-children-div div a {
|
530 |
+
cursor: pointer;
|
531 |
+
display: block;
|
532 |
+
float: left;
|
533 |
+
height: 18px;
|
534 |
+
margin: 0 3px 0 -2px;
|
535 |
+
overflow: hidden;
|
536 |
+
position: relative;
|
537 |
+
width: 20px;
|
538 |
+
}
|
539 |
+
|
540 |
+
#smc-sync-children-div div a,
|
541 |
+
#smc-sync-children-div div a:hover {
|
542 |
+
background: none !important;
|
543 |
+
}
|
544 |
+
|
545 |
+
#smc-sync-children-div div a:before {
|
546 |
+
position: relative;
|
547 |
+
top: -3px;
|
548 |
+
background: none;
|
549 |
+
color: #bbb;
|
550 |
+
content: '\f153';
|
551 |
+
display: block !important;
|
552 |
+
font: normal 16px/1 'dashicons';
|
553 |
+
speak: none;
|
554 |
+
height: 20px;
|
555 |
+
margin: 2px 0;
|
556 |
+
text-align: center;
|
557 |
+
width: 20px;
|
558 |
+
-webkit-font-smoothing: antialiased !important;
|
559 |
+
}
|
560 |
+
|
561 |
+
#smc-sync-children-div div a:hover:before {
|
562 |
+
color: #c00;
|
563 |
+
}
|
564 |
+
*/
|
examples/plugins/smart-media-categories/admin/assets/js/index.php
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?php // Silence is golden
|
examples/plugins/smart-media-categories/admin/assets/js/smc-admin.js
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function ( $ ) {
|
2 |
+
"use strict";
|
3 |
+
|
4 |
+
$(function () {
|
5 |
+
|
6 |
+
// Place your administration-specific JavaScript here
|
7 |
+
|
8 |
+
});
|
9 |
+
|
10 |
+
}(jQuery));
|
examples/plugins/smart-media-categories/admin/assets/js/smc-admin.min.js
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function ( $ ) {
|
2 |
+
"use strict";
|
3 |
+
|
4 |
+
$(function () {
|
5 |
+
|
6 |
+
// Place your administration-specific JavaScript here
|
7 |
+
|
8 |
+
});
|
9 |
+
|
10 |
+
}(jQuery));
|
examples/plugins/smart-media-categories/admin/assets/js/smc-find-posts.js
ADDED
@@ -0,0 +1,209 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* global ajaxurl */
|
2 |
+
|
3 |
+
var smc = {
|
4 |
+
// Properties
|
5 |
+
settings: {},
|
6 |
+
|
7 |
+
// Utility functions
|
8 |
+
utility: {
|
9 |
+
},
|
10 |
+
|
11 |
+
// Components
|
12 |
+
findPosts: null,
|
13 |
+
syncPosts: null,
|
14 |
+
bulkActions: null
|
15 |
+
};
|
16 |
+
|
17 |
+
( function( $ ){
|
18 |
+
/**
|
19 |
+
* Localized settings and strings
|
20 |
+
*/
|
21 |
+
smc.settings = typeof smart_media_categories_posts_settings === 'undefined' ? {} : smart_media_categories_posts_settings;
|
22 |
+
smart_media_categories_posts_settings = void 0; // delete won't work on Globals
|
23 |
+
|
24 |
+
/**
|
25 |
+
* findPosts displays a popup modal window with a post/page list
|
26 |
+
* from which a new parent can be selected.
|
27 |
+
* findPosts.open is called from an "onclick" attribute in the submenu table links
|
28 |
+
*/
|
29 |
+
smc.findPosts = {
|
30 |
+
init: function() {
|
31 |
+
// Firefox and Safari don't support innerText; they use textContent.
|
32 |
+
// smc.settings.useInnerText = typeof document.getElementsByTagName("body")[0].innerText !== 'undefined';
|
33 |
+
|
34 |
+
// Send findPosts selected parent
|
35 |
+
$( '#smc-posts-modal-submit' ).click( function( event ) {
|
36 |
+
if ( ! $( '#smc-posts-modal-response-div input[type="radio"]:checked' ).length )
|
37 |
+
event.preventDefault();
|
38 |
+
});
|
39 |
+
|
40 |
+
// Send findPosts parent keywords for filtering
|
41 |
+
$( '#smc-posts-modal-search' ).click( function ( event ) {
|
42 |
+
$( '#smc-set-parent-paged' ).val( 1 );
|
43 |
+
smc.findPosts.send();
|
44 |
+
});
|
45 |
+
|
46 |
+
$( '#smc-posts-modal-search-div :input' ).keypress( function( event ) {
|
47 |
+
if ( 13 == event.which ) {
|
48 |
+
smc.findPosts.send();
|
49 |
+
return false;
|
50 |
+
}
|
51 |
+
});
|
52 |
+
|
53 |
+
// Send post type(s) for filtering
|
54 |
+
$( '#smc-set-parent-post-type' ).change( function ( event ) {
|
55 |
+
$( '#smc-set-parent-paged' ).val( 1 );
|
56 |
+
smc.findPosts.send();
|
57 |
+
});
|
58 |
+
|
59 |
+
// Pagination controls
|
60 |
+
$( '#smc-set-parent-previous' ).click( function ( event ) {
|
61 |
+
var paged = + $( '#smc-set-parent-paged' ).val();
|
62 |
+
|
63 |
+
if ( paged > 1 ) {
|
64 |
+
$( '#smc-set-parent-paged' ).val( paged - 1 );
|
65 |
+
} else {
|
66 |
+
$( '#smc-set-parent-paged' ).val( 1 );
|
67 |
+
}
|
68 |
+
|
69 |
+
smc.findPosts.send();
|
70 |
+
});
|
71 |
+
|
72 |
+
$( '#smc-set-parent-next' ).click( function ( event ) {
|
73 |
+
var count = + $( '#smc-set-parent-count' ).val(),
|
74 |
+
paged = + $( '#smc-set-parent-paged' ).val(),
|
75 |
+
found = + $( '#smc-set-parent-found' ).val();
|
76 |
+
|
77 |
+
if ( found < count ) {
|
78 |
+
$( '#smc-set-parent-paged' ).val( 1 );
|
79 |
+
} else {
|
80 |
+
$( '#smc-set-parent-paged' ).val( paged + 1 );
|
81 |
+
}
|
82 |
+
|
83 |
+
smc.findPosts.send();
|
84 |
+
});
|
85 |
+
|
86 |
+
// Close the findPosts pop-up
|
87 |
+
$( '#smc-posts-modal-close-div' ).click( smc.findPosts.close );
|
88 |
+
|
89 |
+
$( '#smc-posts-modal-cancel' ).click( function ( event ) {
|
90 |
+
event.preventDefault();
|
91 |
+
return smc.findPosts.close();
|
92 |
+
});
|
93 |
+
|
94 |
+
// Enable whole row to be clicked
|
95 |
+
$( '#smc-posts-modal-inside-div' ).on( 'click', 'tr', function() {
|
96 |
+
$( this ).find( '.found-radio input' ).prop( 'checked', true );
|
97 |
+
});
|
98 |
+
},
|
99 |
+
|
100 |
+
open: function( affectedParent, affectedChild, affectedTitles ) {
|
101 |
+
var overlay = $( '#smc-find-overlay' );
|
102 |
+
|
103 |
+
if ( overlay.length === 0 ) {
|
104 |
+
$( 'body' ).append( '<div id="smc-find-overlay"></div>' );
|
105 |
+
smc.findPosts.overlay();
|
106 |
+
}
|
107 |
+
|
108 |
+
overlay.show();
|
109 |
+
|
110 |
+
if ( affectedParent && affectedChild ) {
|
111 |
+
$( '#smc-posts-modal-parent' ).val( affectedParent );
|
112 |
+
$( '#smc-posts-modal-children' ).val( affectedChild );
|
113 |
+
}
|
114 |
+
|
115 |
+
if ( affectedTitles ) {
|
116 |
+
$( '#smc-posts-modal-titles' ).html( affectedTitles );
|
117 |
+
}
|
118 |
+
|
119 |
+
if ( smc.settings.useDashicons ) {
|
120 |
+
$( '#smc-posts-modal-close-div' ).addClass("smc-posts-modal-close-div-dashicons");
|
121 |
+
} else {
|
122 |
+
$( '#smc-posts-modal-close-div' ).html( 'x' );
|
123 |
+
}
|
124 |
+
|
125 |
+
$( '#smc-posts-modal-div' ).show();
|
126 |
+
|
127 |
+
$( '#smc-posts-modal-input ' ).focus().keyup( function( event ){
|
128 |
+
if ( event.which == 27 ) {
|
129 |
+
smc.findPosts.close();
|
130 |
+
} // close on Escape
|
131 |
+
});
|
132 |
+
|
133 |
+
// Pull some results up by default
|
134 |
+
smc.findPosts.send();
|
135 |
+
|
136 |
+
return false;
|
137 |
+
},
|
138 |
+
|
139 |
+
close: function() {
|
140 |
+
$( '#smc-posts-modal-response-div' ).html('');
|
141 |
+
$( '#smc-posts-modal-div' ).hide();
|
142 |
+
$( '#smc-find-overlay' ).hide();
|
143 |
+
},
|
144 |
+
|
145 |
+
overlay: function() {
|
146 |
+
$( '#smc-find-overlay' ).on( 'click', function () {
|
147 |
+
smc.findPosts.close();
|
148 |
+
});
|
149 |
+
},
|
150 |
+
|
151 |
+
send: function() {
|
152 |
+
var post = {
|
153 |
+
smc_set_parent_search_text: $( '#smc-posts-modal-input' ).val(),
|
154 |
+
smc_set_parent_post_type: $( '#smc-set-parent-post-type' ).val(),
|
155 |
+
smc_set_parent_count: $( '#smc-set-parent-count' ).val(),
|
156 |
+
smc_set_parent_paged: $( '#smc-set-parent-paged' ).val(),
|
157 |
+
action: 'smc_find_posts',
|
158 |
+
_ajax_nonce: $('#smc-posts-modal-ajax-nonce').val()
|
159 |
+
},
|
160 |
+
spinner = $( '#smc-posts-modal-search-div .spinner' ),
|
161 |
+
ajaxResponse = null;
|
162 |
+
|
163 |
+
spinner.show();
|
164 |
+
|
165 |
+
$.ajax( ajaxurl, {
|
166 |
+
type: 'POST',
|
167 |
+
data: post,
|
168 |
+
dataType: 'json'
|
169 |
+
}).always( function() {
|
170 |
+
spinner.hide();
|
171 |
+
}).done( function( response ) {
|
172 |
+
var responseData = 'no response.data', id = 0;
|
173 |
+
|
174 |
+
if ( ! response.success ) {
|
175 |
+
if ( response.responseData ) {
|
176 |
+
responseData = response.data;
|
177 |
+
}
|
178 |
+
|
179 |
+
$( '#smc-posts-modal-response-div' ).text( smc.settings.ajaxDoneError + ' (' + responseData + ')' );
|
180 |
+
} else {
|
181 |
+
/*
|
182 |
+
* Add the (Unattached) row, then the post/page list
|
183 |
+
*/
|
184 |
+
$( '#smc-posts-modal-response-div' ).html( response.data );
|
185 |
+
$( '#smc-posts-modal-response-div table tbody tr:eq(0)' ).before( $( '#found-0-row' ).clone() );
|
186 |
+
|
187 |
+
/*
|
188 |
+
* See if we can "check" the current parent
|
189 |
+
*/
|
190 |
+
id = $( '#smc-posts-modal-parent' ).val();
|
191 |
+
$( '#smc-posts-modal-response-div #found-' + id ).each(function( index, element ){
|
192 |
+
$( this ).prop( 'checked', true );
|
193 |
+
});
|
194 |
+
}
|
195 |
+
}).fail( function( jqXHR, status ) {
|
196 |
+
if ( 200 == jqXHR.status ) {
|
197 |
+
$( '#smc-posts-modal-response-div' ).text( '(' + status + ') ' + jqXHR.responseText + ' ' + JSON.stringify( post ) );
|
198 |
+
} else {
|
199 |
+
$( '#smc-posts-modal-response-div' ).text( smc.settings.ajaxFailError + ' (' + status + '), jqXHR( ' + jqXHR.status + ', ' + jqXHR.statusText + ', ' + jqXHR.responseText + ') ' + JSON.stringify( post ) );
|
200 |
+
}
|
201 |
+
});
|
202 |
+
}
|
203 |
+
}; // smc.findPosts
|
204 |
+
|
205 |
+
$( document ).ready( function() {
|
206 |
+
// Initialize the findPosts module
|
207 |
+
smc.findPosts.init();
|
208 |
+
});
|
209 |
+
})( jQuery );
|
examples/plugins/smart-media-categories/admin/assets/js/smc-find-posts.min.js
ADDED
@@ -0,0 +1,209 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* global ajaxurl */
|
2 |
+
|
3 |
+
var smc = {
|
4 |
+
// Properties
|
5 |
+
settings: {},
|
6 |
+
|
7 |
+
// Utility functions
|
8 |
+
utility: {
|
9 |
+
},
|
10 |
+
|
11 |
+
// Components
|
12 |
+
findPosts: null,
|
13 |
+
syncPosts: null,
|
14 |
+
bulkActions: null
|
15 |
+
};
|
16 |
+
|
17 |
+
( function( $ ){
|
18 |
+
/**
|
19 |
+
* Localized settings and strings
|
20 |
+
*/
|
21 |
+
smc.settings = typeof smart_media_categories_posts_settings === 'undefined' ? {} : smart_media_categories_posts_settings;
|
22 |
+
smart_media_categories_posts_settings = void 0; // delete won't work on Globals
|
23 |
+
|
24 |
+
/**
|
25 |
+
* findPosts displays a popup modal window with a post/page list
|
26 |
+
* from which a new parent can be selected.
|
27 |
+
* findPosts.open is called from an "onclick" attribute in the submenu table links
|
28 |
+
*/
|
29 |
+
smc.findPosts = {
|
30 |
+
init: function() {
|
31 |
+
// Firefox and Safari don't support innerText; they use textContent.
|
32 |
+
// smc.settings.useInnerText = typeof document.getElementsByTagName("body")[0].innerText !== 'undefined';
|
33 |
+
|
34 |
+
// Send findPosts selected parent
|
35 |
+
$( '#smc-posts-modal-submit' ).click( function( event ) {
|
36 |
+
if ( ! $( '#smc-posts-modal-response-div input[type="radio"]:checked' ).length )
|
37 |
+
event.preventDefault();
|
38 |
+
});
|
39 |
+
|
40 |
+
// Send findPosts parent keywords for filtering
|
41 |
+
$( '#smc-posts-modal-search' ).click( function ( event ) {
|
42 |
+
$( '#smc-set-parent-paged' ).val( 1 );
|
43 |
+
smc.findPosts.send();
|
44 |
+
});
|
45 |
+
|
46 |
+
$( '#smc-posts-modal-search-div :input' ).keypress( function( event ) {
|
47 |
+
if ( 13 == event.which ) {
|
48 |
+
smc.findPosts.send();
|
49 |
+
return false;
|
50 |
+
}
|
51 |
+
});
|
52 |
+
|
53 |
+
// Send post type(s) for filtering
|
54 |
+
$( '#smc-set-parent-post-type' ).change( function ( event ) {
|
55 |
+
$( '#smc-set-parent-paged' ).val( 1 );
|
56 |
+
smc.findPosts.send();
|
57 |
+
});
|
58 |
+
|
59 |
+
// Pagination controls
|
60 |
+
$( '#smc-set-parent-previous' ).click( function ( event ) {
|
61 |
+
var paged = + $( '#smc-set-parent-paged' ).val();
|
62 |
+
|
63 |
+
if ( paged > 1 ) {
|
64 |
+
$( '#smc-set-parent-paged' ).val( paged - 1 );
|
65 |
+
} else {
|
66 |
+
$( '#smc-set-parent-paged' ).val( 1 );
|
67 |
+
}
|
68 |
+
|
69 |
+
smc.findPosts.send();
|
70 |
+
});
|
71 |
+
|
72 |
+
$( '#smc-set-parent-next' ).click( function ( event ) {
|
73 |
+
var count = + $( '#smc-set-parent-count' ).val(),
|
74 |
+
paged = + $( '#smc-set-parent-paged' ).val(),
|
75 |
+
found = + $( '#smc-set-parent-found' ).val();
|
76 |
+
|
77 |
+
if ( found < count ) {
|
78 |
+
$( '#smc-set-parent-paged' ).val( 1 );
|
79 |
+
} else {
|
80 |
+
$( '#smc-set-parent-paged' ).val( paged + 1 );
|
81 |
+
}
|
82 |
+
|
83 |
+
smc.findPosts.send();
|
84 |
+
});
|
85 |
+
|
86 |
+
// Close the findPosts pop-up
|
87 |
+
$( '#smc-posts-modal-close-div' ).click( smc.findPosts.close );
|
88 |
+
|
89 |
+
$( '#smc-posts-modal-cancel' ).click( function ( event ) {
|
90 |
+
event.preventDefault();
|
91 |
+
return smc.findPosts.close();
|
92 |
+
});
|
93 |
+
|
94 |
+
// Enable whole row to be clicked
|
95 |
+
$( '#smc-posts-modal-inside-div' ).on( 'click', 'tr', function() {
|
96 |
+
$( this ).find( '.found-radio input' ).prop( 'checked', true );
|
97 |
+
});
|
98 |
+
},
|
99 |
+
|
100 |
+
open: function( affectedParent, affectedChild, affectedTitles ) {
|
101 |
+
var overlay = $( '#smc-find-overlay' );
|
102 |
+
|
103 |
+
if ( overlay.length === 0 ) {
|
104 |
+
$( 'body' ).append( '<div id="smc-find-overlay"></div>' );
|
105 |
+
smc.findPosts.overlay();
|
106 |
+
}
|
107 |
+
|
108 |
+
overlay.show();
|
109 |
+
|
110 |
+
if ( affectedParent && affectedChild ) {
|
111 |
+
$( '#smc-posts-modal-parent' ).val( affectedParent );
|
112 |
+
$( '#smc-posts-modal-children' ).val( affectedChild );
|
113 |
+
}
|
114 |
+
|
115 |
+
if ( affectedTitles ) {
|
116 |
+
$( '#smc-posts-modal-titles' ).html( affectedTitles );
|
117 |
+
}
|
118 |
+
|
119 |
+
if ( smc.settings.useDashicons ) {
|
120 |
+
$( '#smc-posts-modal-close-div' ).addClass("smc-posts-modal-close-div-dashicons");
|
121 |
+
} else {
|
122 |
+
$( '#smc-posts-modal-close-div' ).html( 'x' );
|
123 |
+
}
|
124 |
+
|
125 |
+
$( '#smc-posts-modal-div' ).show();
|
126 |
+
|
127 |
+
$( '#smc-posts-modal-input ' ).focus().keyup( function( event ){
|
128 |
+
if ( event.which == 27 ) {
|
129 |
+
smc.findPosts.close();
|
130 |
+
} // close on Escape
|
131 |
+
});
|
132 |
+
|
133 |
+
// Pull some results up by default
|
134 |
+
smc.findPosts.send();
|
135 |
+
|
136 |
+
return false;
|
137 |
+
},
|
138 |
+
|
139 |
+
close: function() {
|
140 |
+
$( '#smc-posts-modal-response-div' ).html('');
|
141 |
+
$( '#smc-posts-modal-div' ).hide();
|
142 |
+
$( '#smc-find-overlay' ).hide();
|
143 |
+
},
|
144 |
+
|
145 |
+
overlay: function() {
|
146 |
+
$( '#smc-find-overlay' ).on( 'click', function () {
|
147 |
+
smc.findPosts.close();
|
148 |
+
});
|
149 |
+
},
|
150 |
+
|
151 |
+
send: function() {
|
152 |
+
var post = {
|
153 |
+
smc_set_parent_search_text: $( '#smc-posts-modal-input' ).val(),
|
154 |
+
smc_set_parent_post_type: $( '#smc-set-parent-post-type' ).val(),
|
155 |
+
smc_set_parent_count: $( '#smc-set-parent-count' ).val(),
|
156 |
+
smc_set_parent_paged: $( '#smc-set-parent-paged' ).val(),
|
157 |
+
action: 'smc_find_posts',
|
158 |
+
_ajax_nonce: $('#smc-posts-modal-ajax-nonce').val()
|
159 |
+
},
|
160 |
+
spinner = $( '#smc-posts-modal-search-div .spinner' ),
|
161 |
+
ajaxResponse = null;
|
162 |
+
|
163 |
+
spinner.show();
|
164 |
+
|
165 |
+
$.ajax( ajaxurl, {
|
166 |
+
type: 'POST',
|
167 |
+
data: post,
|
168 |
+
dataType: 'json'
|
169 |
+
}).always( function() {
|
170 |
+
spinner.hide();
|
171 |
+
}).done( function( response ) {
|
172 |
+
var responseData = 'no response.data', id = 0;
|
173 |
+
|
174 |
+
if ( ! response.success ) {
|
175 |
+
if ( response.responseData ) {
|
176 |
+
responseData = response.data;
|
177 |
+
}
|
178 |
+
|
179 |
+
$( '#smc-posts-modal-response-div' ).text( smc.settings.ajaxDoneError + ' (' + responseData + ')' );
|
180 |
+
} else {
|
181 |
+
/*
|
182 |
+
* Add the (Unattached) row, then the post/page list
|
183 |
+
*/
|
184 |
+
$( '#smc-posts-modal-response-div' ).html( response.data );
|
185 |
+
$( '#smc-posts-modal-response-div table tbody tr:eq(0)' ).before( $( '#found-0-row' ).clone() );
|
186 |
+
|
187 |
+
/*
|
188 |
+
* See if we can "check" the current parent
|
189 |
+
*/
|
190 |
+
id = $( '#smc-posts-modal-parent' ).val();
|
191 |
+
$( '#smc-posts-modal-response-div #found-' + id ).each(function( index, element ){
|
192 |
+
$( this ).prop( 'checked', true );
|
193 |
+
});
|
194 |
+
}
|
195 |
+
}).fail( function( jqXHR, status ) {
|
196 |
+
if ( 200 == jqXHR.status ) {
|
197 |
+
$( '#smc-posts-modal-response-div' ).text( '(' + status + ') ' + jqXHR.responseText + ' ' + JSON.stringify( post ) );
|
198 |
+
} else {
|
199 |
+
$( '#smc-posts-modal-response-div' ).text( smc.settings.ajaxFailError + ' (' + status + '), jqXHR( ' + jqXHR.status + ', ' + jqXHR.statusText + ', ' + jqXHR.responseText + ') ' + JSON.stringify( post ) );
|
200 |
+
}
|
201 |
+
});
|
202 |
+
}
|
203 |
+
}; // smc.findPosts
|
204 |
+
|
205 |
+
$( document ).ready( function() {
|
206 |
+
// Initialize the findPosts module
|
207 |
+
smc.findPosts.init();
|
208 |
+
});
|
209 |
+
})( jQuery );
|
examples/plugins/smart-media-categories/admin/assets/js/smc-sync-posts.js
ADDED
@@ -0,0 +1,214 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
( function( $ ){
|
2 |
+
/**
|
3 |
+
* syncPosts displays a popup modal window with taxonomy term assignments of
|
4 |
+
* the current parent post/page. The user can synchronize the terms to the
|
5 |
+
* children by setting radio buttons below the desired taxonomies. The pop-up also
|
6 |
+
* has dropdown lists for assigning children to a new parent.
|
7 |
+
*
|
8 |
+
* This script depends on the "smc-find-posts.js" script to set up the "smc." global
|
9 |
+
* object and to provide the "Select Parent" popup functionality in "syncPosts.reattach".
|
10 |
+
*/
|
11 |
+
smc.syncPosts = {
|
12 |
+
init : function(){
|
13 |
+
var t = this, smcDiv = $( '#smc-sync-div' );
|
14 |
+
|
15 |
+
t.type = 'attachment';
|
16 |
+
t.what = '#attachment-';
|
17 |
+
|
18 |
+
// Close the smc-sync-box pop-up
|
19 |
+
smcDiv.keyup( function( event ){
|
20 |
+
if ( event.which == 27 )
|
21 |
+
return smc.syncPosts.close();
|
22 |
+
});
|
23 |
+
|
24 |
+
$( '#smc-sync-close' ).click( smc.syncPosts.close );
|
25 |
+
|
26 |
+
$( '#smc-sync-cancel' ).click( function ( event ) {
|
27 |
+
event.preventDefault();
|
28 |
+
return smc.syncPosts.close();
|
29 |
+
});
|
30 |
+
|
31 |
+
$( '#smc-sync-update' ).click( function ( event ) {
|
32 |
+
return smc.syncPosts.save();
|
33 |
+
});
|
34 |
+
|
35 |
+
$( '#smc-sync-reattach' ).click( function ( event ) {
|
36 |
+
return smc.syncPosts.reattach( event );
|
37 |
+
});
|
38 |
+
|
39 |
+
// hiearchical taxonomies expandable?
|
40 |
+
$('span.catshow').click(function(){
|
41 |
+
$(this).hide().next().show().parent().next().addClass("cat-hover");
|
42 |
+
});
|
43 |
+
|
44 |
+
$('span.cathide').click(function(){
|
45 |
+
$(this).hide().prev().show().parent().next().removeClass("cat-hover");
|
46 |
+
});
|
47 |
+
|
48 |
+
$('select[name="_status"] option[value="future"]', smcDiv).remove();
|
49 |
+
|
50 |
+
},
|
51 |
+
|
52 |
+
// called from "onclick=" attributes in the "Smart Media" rollover actions
|
53 |
+
open: function( affectedParent ) {
|
54 |
+
var t = this, overlay = $( '#smc-sync-overlay' ), theCell = $( '#the-list tr.post-' + affectedParent + ' td.smc_children' ),
|
55 |
+
syncTitles = '';
|
56 |
+
|
57 |
+
// Block out the underlying All Posts submenu
|
58 |
+
if ( overlay.length === 0 ) {
|
59 |
+
$( 'body' ).append( '<div id="smc-sync-overlay"></div>' );
|
60 |
+
smc.syncPosts.overlay();
|
61 |
+
}
|
62 |
+
overlay.show();
|
63 |
+
|
64 |
+
// Save the parent ID
|
65 |
+
if ( affectedParent ) {
|
66 |
+
$( '#smc-posts-modal-parent' ).val( affectedParent );
|
67 |
+
}
|
68 |
+
|
69 |
+
// Fill the left column - children list
|
70 |
+
$( 'a', theCell ).each( function( index, element ) {
|
71 |
+
titleText = ( element.textContent || element.innerText || "" )
|
72 |
+
|
73 |
+
syncClass = $( element ).hasClass( 'smc-sync-true' ) ? 'smc-sync-true' : 'smc-sync-false';
|
74 |
+
syncTitles += '<div id="' + element.id + '-div"><input name="children[]" id="smc-sync-children-' + element.id + '" type="hidden" value="' + element.id.replace('smc-child-', '') + '"><a id="' + element.id + '" class="ntdelbutton" title="' + smc.settings.ntDelTitle + '">X</a><span class="' + syncClass + '">' + titleText + '</span></div>';
|
75 |
+
});
|
76 |
+
|
77 |
+
if ( syncTitles.length ) {
|
78 |
+
$( '#smc-sync-children-div' ).html( syncTitles );
|
79 |
+
$( '#smc-sync-children-div a' ).click( function(){
|
80 |
+
$( '#' + $( this ).attr( 'id' ) + '-div' ).remove();
|
81 |
+
});
|
82 |
+
}
|
83 |
+
|
84 |
+
// Fill the middle column - hiearachical taxonomies
|
85 |
+
$('#smc-sync-category-blocks ul.cat-checklist').each(function(){
|
86 |
+
var thisJq = $(this), taxname = thisJq.attr('id').replace('smc-tax-checklist-', ''), prefix = '#in-' + taxname + '-',
|
87 |
+
terms = $( '#' + taxname + '-' + affectedParent, theCell ).html().split( ',' );
|
88 |
+
|
89 |
+
$( 'input:checked', thisJq ).removeAttr( 'checked' );
|
90 |
+
for ( i = 0; i < terms.length; i++ ) {
|
91 |
+
$( prefix + terms[ i ], thisJq ).attr( 'checked', 'checked' );
|
92 |
+
}
|
93 |
+
});
|
94 |
+
|
95 |
+
// Fill the right column - flat taxonomies
|
96 |
+
$('textarea.smc-tags').each(function(){
|
97 |
+
var thisJq = $(this), taxname = thisJq.attr('id').replace('smc-tax-input-', '');
|
98 |
+
|
99 |
+
thisJq.html( $( '#' + taxname + '-' + affectedParent, theCell ).html() );
|
100 |
+
|
101 |
+
//link flat taxonomies to auto-suggest function
|
102 |
+
thisJq.suggest( ajaxurl + '?action=ajax-tag-search&tax=' + taxname, { delay: 500, minchars: 2, multiple: true, multipleSep: smc.settings.comma + ' ' } );
|
103 |
+
});
|
104 |
+
|
105 |
+
// Fill the right column - parent information
|
106 |
+
$('#smc-current-parent').each(function(){
|
107 |
+
var thisJq = $(this);
|
108 |
+
|
109 |
+
thisJq.html( $( '#post-title-' + affectedParent, theCell ).html() );
|
110 |
+
});
|
111 |
+
|
112 |
+
if ( smc.settings.useDashicons ) {
|
113 |
+
$( '#smc-sync-close' ).addClass("smc-sync-close-dashicons");
|
114 |
+
$( '#smc-sync-children-div div a' ).addClass("smc-sync-children-a-dashicons");
|
115 |
+
} else {
|
116 |
+
$( '#smc-sync-close' ).html( 'x' );
|
117 |
+
$( '#smc-sync-children-div div a' ).addClass("smc-sync-children-a-gif");
|
118 |
+
}
|
119 |
+
|
120 |
+
$( '#smc-sync-div' ).show();
|
121 |
+
$( '#smc-sync-cancel' ).focus();
|
122 |
+
},
|
123 |
+
|
124 |
+
close: function() {
|
125 |
+
$( '#smc-posts-modal-parent' ).val( '' );
|
126 |
+
$( '#smc-posts-modal-children' ).val( '0' );
|
127 |
+
$( '#smc-sync-children-div' ).html('');
|
128 |
+
$( '#smc-sync-category-blocks ul.cat-checklist' ).each(function(){
|
129 |
+
$( 'input:checked', $(this) ).removeAttr( 'checked' );
|
130 |
+
});
|
131 |
+
$( 'textarea.smc-tags' ).each(function(){
|
132 |
+
$(this).html( '' );
|
133 |
+
});
|
134 |
+
$( '#smc-sync-div' ).hide();
|
135 |
+
$( '#smc-sync-overlay' ).hide();
|
136 |
+
return false;
|
137 |
+
},
|
138 |
+
|
139 |
+
overlay: function() {
|
140 |
+
// Click outside the modal window closes it
|
141 |
+
$( '#smc-sync-overlay' ).on( 'click', function ( event ) {
|
142 |
+
smc.syncPosts.close();
|
143 |
+
event.preventDefault();
|
144 |
+
return false;
|
145 |
+
});
|
146 |
+
},
|
147 |
+
|
148 |
+
reattach: function( event ) {
|
149 |
+
var titles = [];
|
150 |
+
|
151 |
+
$( '#smc-sync-children-div span' ).each(function(){
|
152 |
+
titles[ titles.length ] = ( this.textContent || this.innerText || "" )
|
153 |
+
});
|
154 |
+
|
155 |
+
if ( titles.length ) {
|
156 |
+
titles = titles.join( ', ' );
|
157 |
+
} else {
|
158 |
+
titles = smc.settings.noChildren;
|
159 |
+
}
|
160 |
+
|
161 |
+
$( '#smc-sync-category-blocks ul.cat-checklist' ).each(function(){
|
162 |
+
$( 'input:checked', $(this) ).removeAttr( 'checked' );
|
163 |
+
});
|
164 |
+
|
165 |
+
$( 'textarea.smc-tags' ).each(function(){
|
166 |
+
$(this).html( '' );
|
167 |
+
});
|
168 |
+
|
169 |
+
$( '#smc-sync-div' ).hide();
|
170 |
+
$( '#smc-sync-overlay' ).hide();
|
171 |
+
smc.findPosts.open( 0, 0, titles );
|
172 |
+
|
173 |
+
event.preventDefault();
|
174 |
+
return false;
|
175 |
+
},
|
176 |
+
|
177 |
+
save : function(id) {
|
178 |
+
var categoryJq = $( '#smc-tax-checklist-category' );
|
179 |
+
|
180 |
+
/*
|
181 |
+
* Convert category/post_category checkboxes
|
182 |
+
*/
|
183 |
+
if ( categoryJq.length ) {
|
184 |
+
$( 'input:checked', categoryJq ).each(function(){
|
185 |
+
$(this).attr( 'name', 'tax_input[category][]' );
|
186 |
+
});
|
187 |
+
}
|
188 |
+
|
189 |
+
return true;
|
190 |
+
}
|
191 |
+
}; // smc.syncPosts
|
192 |
+
|
193 |
+
/**
|
194 |
+
* bulkActions adds "Sync All Children" buttons to the Posts/All Posts Bulk Edit area
|
195 |
+
* and on the top Navigation bar above the submenu table.
|
196 |
+
*/
|
197 |
+
smc.bulkActions = {
|
198 |
+
init : function(){
|
199 |
+
var t = this, filterDiv = $( '#post-query-submit' ).parent(), bulkButton = $( '#bulk_edit' ),
|
200 |
+
syncAllFilter = $( '<input name="sync_all_filter" class="button" id="smc-sync-all-filter" type="submit" value="' + smc.settings.syncAllChildren + '"></input>' ),
|
201 |
+
syncAllBulk = $( '<input name="sync_all_bulk" class="button button-secondary alignright" id="smc-sync-all-bulk" type="submit" value="' + smc.settings.syncAllChildren + '"></input>' );
|
202 |
+
|
203 |
+
filterDiv.append( syncAllFilter );
|
204 |
+
bulkButton.after( syncAllBulk );
|
205 |
+
return;
|
206 |
+
}
|
207 |
+
}; // smc.bulkActions
|
208 |
+
|
209 |
+
$( document ).ready( function() {
|
210 |
+
// Initialize the modules
|
211 |
+
smc.syncPosts.init();
|
212 |
+
smc.bulkActions.init();
|
213 |
+
});
|
214 |
+
})( jQuery );
|
examples/plugins/smart-media-categories/admin/assets/js/smc-sync-posts.min.js
ADDED
@@ -0,0 +1,214 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
( function( $ ){
|
2 |
+
/**
|
3 |
+
* syncPosts displays a popup modal window with taxonomy term assignments of
|
4 |
+
* the current parent post/page. The user can synchronize the terms to the
|
5 |
+
* children by setting radio buttons below the desired taxonomies. The pop-up also
|
6 |
+
* has dropdown lists for assigning children to a new parent.
|
7 |
+
*
|
8 |
+
* This script depends on the "smc-find-posts.js" script to set up the "smc." global
|
9 |
+
* object and to provide the "Select Parent" popup functionality in "syncPosts.reattach".
|
10 |
+
*/
|
11 |
+
smc.syncPosts = {
|
12 |
+
init : function(){
|
13 |
+
var t = this, smcDiv = $( '#smc-sync-div' );
|
14 |
+
|
15 |
+
t.type = 'attachment';
|
16 |
+
t.what = '#attachment-';
|
17 |
+
|
18 |
+
// Close the smc-sync-box pop-up
|
19 |
+
smcDiv.keyup( function( event ){
|
20 |
+
if ( event.which == 27 )
|
21 |
+
return smc.syncPosts.close();
|
22 |
+
});
|
23 |
+
|
24 |
+
$( '#smc-sync-close' ).click( smc.syncPosts.close );
|
25 |
+
|
26 |
+
$( '#smc-sync-cancel' ).click( function ( event ) {
|
27 |
+
event.preventDefault();
|
28 |
+
return smc.syncPosts.close();
|
29 |
+
});
|
30 |
+
|
31 |
+
$( '#smc-sync-update' ).click( function ( event ) {
|
32 |
+
return smc.syncPosts.save();
|
33 |
+
});
|
34 |
+
|
35 |
+
$( '#smc-sync-reattach' ).click( function ( event ) {
|
36 |
+
return smc.syncPosts.reattach( event );
|
37 |
+
});
|
38 |
+
|
39 |
+
// hiearchical taxonomies expandable?
|
40 |
+
$('span.catshow').click(function(){
|
41 |
+
$(this).hide().next().show().parent().next().addClass("cat-hover");
|
42 |
+
});
|
43 |
+
|
44 |
+
$('span.cathide').click(function(){
|
45 |
+
$(this).hide().prev().show().parent().next().removeClass("cat-hover");
|
46 |
+
});
|
47 |
+
|
48 |
+
$('select[name="_status"] option[value="future"]', smcDiv).remove();
|
49 |
+
|
50 |
+
},
|
51 |
+
|
52 |
+
// called from "onclick=" attributes in the "Smart Media" rollover actions
|
53 |
+
open: function( affectedParent ) {
|
54 |
+
var t = this, overlay = $( '#smc-sync-overlay' ), theCell = $( '#the-list tr.post-' + affectedParent + ' td.smc_children' ),
|
55 |
+
syncTitles = '';
|
56 |
+
|
57 |
+
// Block out the underlying All Posts submenu
|
58 |
+
if ( overlay.length === 0 ) {
|
59 |
+
$( 'body' ).append( '<div id="smc-sync-overlay"></div>' );
|
60 |
+
smc.syncPosts.overlay();
|
61 |
+
}
|
62 |
+
overlay.show();
|
63 |
+
|
64 |
+
// Save the parent ID
|
65 |
+
if ( affectedParent ) {
|
66 |
+
$( '#smc-posts-modal-parent' ).val( affectedParent );
|
67 |
+
}
|
68 |
+
|
69 |
+
// Fill the left column - children list
|
70 |
+
$( 'a', theCell ).each( function( index, element ) {
|
71 |
+
titleText = ( element.textContent || element.innerText || "" )
|
72 |
+
|
73 |
+
syncClass = $( element ).hasClass( 'smc-sync-true' ) ? 'smc-sync-true' : 'smc-sync-false';
|
74 |
+
syncTitles += '<div id="' + element.id + '-div"><input name="children[]" id="smc-sync-children-' + element.id + '" type="hidden" value="' + element.id.replace('smc-child-', '') + '"><a id="' + element.id + '" class="ntdelbutton" title="' + smc.settings.ntDelTitle + '">X</a><span class="' + syncClass + '">' + titleText + '</span></div>';
|
75 |
+
});
|
76 |
+
|
77 |
+
if ( syncTitles.length ) {
|
78 |
+
$( '#smc-sync-children-div' ).html( syncTitles );
|
79 |
+
$( '#smc-sync-children-div a' ).click( function(){
|
80 |
+
$( '#' + $( this ).attr( 'id' ) + '-div' ).remove();
|
81 |
+
});
|
82 |
+
}
|
83 |
+
|
84 |
+
// Fill the middle column - hiearachical taxonomies
|
85 |
+
$('#smc-sync-category-blocks ul.cat-checklist').each(function(){
|
86 |
+
var thisJq = $(this), taxname = thisJq.attr('id').replace('smc-tax-checklist-', ''), prefix = '#in-' + taxname + '-',
|
87 |
+
terms = $( '#' + taxname + '-' + affectedParent, theCell ).html().split( ',' );
|
88 |
+
|
89 |
+
$( 'input:checked', thisJq ).removeAttr( 'checked' );
|
90 |
+
for ( i = 0; i < terms.length; i++ ) {
|
91 |
+
$( prefix + terms[ i ], thisJq ).attr( 'checked', 'checked' );
|
92 |
+
}
|
93 |
+
});
|
94 |
+
|
95 |
+
// Fill the right column - flat taxonomies
|
96 |
+
$('textarea.smc-tags').each(function(){
|
97 |
+
var thisJq = $(this), taxname = thisJq.attr('id').replace('smc-tax-input-', '');
|
98 |
+
|
99 |
+
thisJq.html( $( '#' + taxname + '-' + affectedParent, theCell ).html() );
|
100 |
+
|
101 |
+
//link flat taxonomies to auto-suggest function
|
102 |
+
thisJq.suggest( ajaxurl + '?action=ajax-tag-search&tax=' + taxname, { delay: 500, minchars: 2, multiple: true, multipleSep: smc.settings.comma + ' ' } );
|
103 |
+
});
|
104 |
+
|
105 |
+
// Fill the right column - parent information
|
106 |
+
$('#smc-current-parent').each(function(){
|
107 |
+
var thisJq = $(this);
|
108 |
+
|
109 |
+
thisJq.html( $( '#post-title-' + affectedParent, theCell ).html() );
|
110 |
+
});
|
111 |
+
|
112 |
+
if ( smc.settings.useDashicons ) {
|
113 |
+
$( '#smc-sync-close' ).addClass("smc-sync-close-dashicons");
|
114 |
+
$( '#smc-sync-children-div div a' ).addClass("smc-sync-children-a-dashicons");
|
115 |
+
} else {
|
116 |
+
$( '#smc-sync-close' ).html( 'x' );
|
117 |
+
$( '#smc-sync-children-div div a' ).addClass("smc-sync-children-a-gif");
|
118 |
+
}
|
119 |
+
|
120 |
+
$( '#smc-sync-div' ).show();
|
121 |
+
$( '#smc-sync-cancel' ).focus();
|
122 |
+
},
|
123 |
+
|
124 |
+
close: function() {
|
125 |
+
$( '#smc-posts-modal-parent' ).val( '' );
|
126 |
+
$( '#smc-posts-modal-children' ).val( '0' );
|
127 |
+
$( '#smc-sync-children-div' ).html('');
|
128 |
+
$( '#smc-sync-category-blocks ul.cat-checklist' ).each(function(){
|
129 |
+
$( 'input:checked', $(this) ).removeAttr( 'checked' );
|
130 |
+
});
|
131 |
+
$( 'textarea.smc-tags' ).each(function(){
|
132 |
+
$(this).html( '' );
|
133 |
+
});
|
134 |
+
$( '#smc-sync-div' ).hide();
|
135 |
+
$( '#smc-sync-overlay' ).hide();
|
136 |
+
return false;
|
137 |
+
},
|
138 |
+
|
139 |
+
overlay: function() {
|
140 |
+
// Click outside the modal window closes it
|
141 |
+
$( '#smc-sync-overlay' ).on( 'click', function ( event ) {
|
142 |
+
smc.syncPosts.close();
|
143 |
+
event.preventDefault();
|
144 |
+
return false;
|
145 |
+
});
|
146 |
+
},
|
147 |
+
|
148 |
+
reattach: function( event ) {
|
149 |
+
var titles = [];
|
150 |
+
|
151 |
+
$( '#smc-sync-children-div span' ).each(function(){
|
152 |
+
titles[ titles.length ] = ( this.textContent || this.innerText || "" )
|
153 |
+
});
|
154 |
+
|
155 |
+
if ( titles.length ) {
|
156 |
+
titles = titles.join( ', ' );
|
157 |
+
} else {
|
158 |
+
titles = smc.settings.noChildren;
|
159 |
+
}
|
160 |
+
|
161 |
+
$( '#smc-sync-category-blocks ul.cat-checklist' ).each(function(){
|
162 |
+
$( 'input:checked', $(this) ).removeAttr( 'checked' );
|
163 |
+
});
|
164 |
+
|
165 |
+
$( 'textarea.smc-tags' ).each(function(){
|
166 |
+
$(this).html( '' );
|
167 |
+
});
|
168 |
+
|
169 |
+
$( '#smc-sync-div' ).hide();
|
170 |
+
$( '#smc-sync-overlay' ).hide();
|
171 |
+
smc.findPosts.open( 0, 0, titles );
|
172 |
+
|
173 |
+
event.preventDefault();
|
174 |
+
return false;
|
175 |
+
},
|
176 |
+
|
177 |
+
save : function(id) {
|
178 |
+
var categoryJq = $( '#smc-tax-checklist-category' );
|
179 |
+
|
180 |
+
/*
|
181 |
+
* Convert category/post_category checkboxes
|
182 |
+
*/
|
183 |
+
if ( categoryJq.length ) {
|
184 |
+
$( 'input:checked', categoryJq ).each(function(){
|
185 |
+
$(this).attr( 'name', 'tax_input[category][]' );
|
186 |
+
});
|
187 |
+
}
|
188 |
+
|
189 |
+
return true;
|
190 |
+
}
|
191 |
+
}; // smc.syncPosts
|
192 |
+
|
193 |
+
/**
|
194 |
+
* bulkActions adds "Sync All Children" buttons to the Posts/All Posts Bulk Edit area
|
195 |
+
* and on the top Navigation bar above the submenu table.
|
196 |
+
*/
|
197 |
+
smc.bulkActions = {
|
198 |
+
init : function(){
|
199 |
+
var t = this, filterDiv = $( '#post-query-submit' ).parent(), bulkButton = $( '#bulk_edit' ),
|
200 |
+
syncAllFilter = $( '<input name="sync_all_filter" class="button" id="smc-sync-all-filter" type="submit" value="' + smc.settings.syncAllChildren + '"></input>' ),
|
201 |
+
syncAllBulk = $( '<input name="sync_all_bulk" class="button button-secondary alignright" id="smc-sync-all-bulk" type="submit" value="' + smc.settings.syncAllChildren + '"></input>' );
|
202 |
+
|
203 |
+
filterDiv.append( syncAllFilter );
|
204 |
+
bulkButton.after( syncAllBulk );
|
205 |
+
return;
|
206 |
+
}
|
207 |
+
}; // smc.bulkActions
|
208 |
+
|
209 |
+
$( document ).ready( function() {
|
210 |
+
// Initialize the modules
|
211 |
+
smc.syncPosts.init();
|
212 |
+
smc.bulkActions.init();
|
213 |
+
});
|
214 |
+
})( jQuery );
|
examples/plugins/smart-media-categories/admin/class-smart-media-categories-admin.php
ADDED
@@ -0,0 +1,1315 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The Smart Media Categories (SMC) Plugin, Admin Mode.
|
4 |
+
*
|
5 |
+
* @package Smart_Media_Categories_Admin
|
6 |
+
* @author David Lingren <dlingren@comcast.net>
|
7 |
+
* @license GPL-2.0+
|
8 |
+
* @link @TODO http://example.com
|
9 |
+
* @copyright 2014 David Lingren
|
10 |
+
*/
|
11 |
+
|
12 |
+
/*
|
13 |
+
* Include support classes
|
14 |
+
*/
|
15 |
+
require_once( 'includes/class-smc-sync-support.php' );
|
16 |
+
require_once( 'includes/class-smc-settings-support.php' );
|
17 |
+
SMC_Settings_Support::initialize();
|
18 |
+
require_once( 'includes/class-smc-automatic-support.php' );
|
19 |
+
SMC_Automatic_Support::initialize();
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Plugin class. This class works with the
|
23 |
+
* administrative-side of the WordPress site.
|
24 |
+
*
|
25 |
+
* @package Smart_Media_Categories_Admin
|
26 |
+
* @author David Lingren <dlingren@comcast.net>
|
27 |
+
*/
|
28 |
+
class Smart_Media_Categories_Admin {
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Instance of this class.
|
32 |
+
*
|
33 |
+
* @since 1.0.0
|
34 |
+
*
|
35 |
+
* @var object
|
36 |
+
*/
|
37 |
+
protected static $instance = NULL;
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Slug of the plugin screen.
|
41 |
+
*
|
42 |
+
* @since 1.0.0
|
43 |
+
*
|
44 |
+
* @var string
|
45 |
+
*/
|
46 |
+
protected $plugin_screen_hook_suffix = NULL;
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Slug of the current 'edit-' Post Type.
|
50 |
+
*
|
51 |
+
* @since 1.0.9
|
52 |
+
*
|
53 |
+
* @var string
|
54 |
+
*/
|
55 |
+
protected $current_edit_type = NULL;
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Initialize the plugin by loading admin scripts & styles and adding a
|
59 |
+
* settings page and menu.
|
60 |
+
*
|
61 |
+
* @since 1.0.0
|
62 |
+
*/
|
63 |
+
private function __construct() {
|
64 |
+
// Call $plugin_slug from public plugin class.
|
65 |
+
$plugin = Smart_Media_Categories::get_instance();
|
66 |
+
$this->plugin_slug = $plugin->get_plugin_slug();
|
67 |
+
$this->plugin_object = $plugin->get_plugin_object();
|
68 |
+
|
69 |
+
// Load admin style sheet and JavaScript.
|
70 |
+
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_styles' ) );
|
71 |
+
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_scripts' ) );
|
72 |
+
|
73 |
+
// Add the options page and menu item.
|
74 |
+
add_action( 'admin_menu', array( $this, 'add_plugin_admin_menu' ) );
|
75 |
+
|
76 |
+
// Add an action link pointing to the options page.
|
77 |
+
$plugin_basename = plugin_basename( plugin_dir_path( __DIR__ ) . $this->plugin_slug . '.php' );
|
78 |
+
add_filter( 'plugin_action_links_' . $plugin_basename, array( $this, 'add_action_links' ) );
|
79 |
+
|
80 |
+
/*
|
81 |
+
* Define custom functionality.
|
82 |
+
*
|
83 |
+
* Read more about actions and filters:
|
84 |
+
* http://codex.wordpress.org/Plugin_API#Hooks.2C_Actions_and_Filters
|
85 |
+
* /
|
86 |
+
|
87 |
+
if ( isset( $_REQUEST['action'] ) ) {
|
88 |
+
//error_log( __LINE__ . ' Smart_Media_Categories_Admin::__construct() action = ' . var_export( $_REQUEST['action'], true ), 0 );
|
89 |
+
if ( 'heartbeat' != $_REQUEST['action'] ) {
|
90 |
+
//error_log( __LINE__ . ' Smart_Media_Categories_Admin::__construct() $_REQUEST = ' . var_export( $_REQUEST, true ), 0 );
|
91 |
+
//error_log( __LINE__ . ' Smart_Media_Categories_Admin::__construct() $_GET = ' . var_export( $_GET, true ), 0 );
|
92 |
+
}
|
93 |
+
} // */
|
94 |
+
|
95 |
+
// Determine Post Type, if possible
|
96 |
+
if ( isset( $_REQUEST['post_type'] ) ) {
|
97 |
+
$this->current_edit_type = $_REQUEST['post_type'];
|
98 |
+
}
|
99 |
+
|
100 |
+
// Handle Ajax requests
|
101 |
+
if ( defined('DOING_AJAX') && DOING_AJAX ) {
|
102 |
+
add_action( 'wp_ajax_' . 'smc_find_posts', array( $this, 'action_wp_ajax_smc_find_posts' ) );
|
103 |
+
|
104 |
+
if ( isset( $_REQUEST['screen'] ) && ( 'edit-post' == $_REQUEST['screen'] ) && isset( $_REQUEST['action'] ) && ( 'inline-save' == $_REQUEST['action'] ) ) {
|
105 |
+
add_filter( "manage_posts_columns", array( $this, 'filter_manage_posts_columns' ), 10, 1 );
|
106 |
+
add_action( "manage_posts_custom_column", array( $this, 'action_manage_posts_custom_column' ), 10, 2 );
|
107 |
+
}
|
108 |
+
|
109 |
+
return;
|
110 |
+
} // DOING_AJAX
|
111 |
+
|
112 |
+
// Process SMC-specific actions
|
113 |
+
if ( isset( $_REQUEST['action'] ) ) {
|
114 |
+
if ( in_array( $_REQUEST['action'], array( 'smc_posts_modal', 'smc_pages_modal' ) ) ) {
|
115 |
+
$action = 'action_' . $_REQUEST['action'];
|
116 |
+
add_action( 'admin_init', array( $this, $action ) );
|
117 |
+
} elseif ( isset( $_REQUEST['sync_all_bulk'] ) ) {
|
118 |
+
add_action( 'admin_init', array( $this, 'action_sync_all_bulk' ) );
|
119 |
+
} elseif ( isset( $_REQUEST['sync_all_filter'] ) ) {
|
120 |
+
add_action( 'admin_init', array( $this, 'action_sync_all_filter' ) );
|
121 |
+
}
|
122 |
+
}
|
123 |
+
|
124 |
+
/*
|
125 |
+
* Intercept Posts/All Posts and Pages/All Pages submenus
|
126 |
+
*/
|
127 |
+
add_action( "load-edit.php", array( $this, 'action_load_edit_php' ) );
|
128 |
+
}
|
129 |
+
|
130 |
+
/**
|
131 |
+
* Return an instance of this class.
|
132 |
+
*
|
133 |
+
* @since 1.0.0
|
134 |
+
*
|
135 |
+
* @return object A single instance of this class.
|
136 |
+
*/
|
137 |
+
public static function get_instance() {
|
138 |
+
/*
|
139 |
+
* - Uncomment following lines if the admin class should only be available for super admins
|
140 |
+
* /
|
141 |
+
if( ! is_super_admin() ) {
|
142 |
+
return;
|
143 |
+
} // */
|
144 |
+
|
145 |
+
// If the single instance hasn't been set, set it now.
|
146 |
+
if ( NULL == self::$instance ) {
|
147 |
+
self::$instance = new self;
|
148 |
+
}
|
149 |
+
|
150 |
+
return self::$instance;
|
151 |
+
}
|
152 |
+
|
153 |
+
/**
|
154 |
+
* Register and enqueue admin-specific style sheet.
|
155 |
+
*
|
156 |
+
* @since 1.0.0
|
157 |
+
*
|
158 |
+
* @return NULL Return early if no settings page is registered.
|
159 |
+
*/
|
160 |
+
public function enqueue_admin_styles() {
|
161 |
+
if ( ! isset( $this->plugin_screen_hook_suffix ) ) {
|
162 |
+
return;
|
163 |
+
}
|
164 |
+
|
165 |
+
$screen = get_current_screen();
|
166 |
+
|
167 |
+
/*
|
168 |
+
* The All Posts/All Pages modal windows share styles at this time, but
|
169 |
+
* provide for different styles in the future.
|
170 |
+
*/
|
171 |
+
$is_smc_type = false;
|
172 |
+
if ( 0 === strpos( $screen->id, 'edit-' ) ) {
|
173 |
+
$is_smc_type = SMC_Settings_Support::is_smc_post_type( substr( $screen->id, 5 ) );
|
174 |
+
}
|
175 |
+
|
176 |
+
if ( $is_smc_type ) {
|
177 |
+
// All Posts
|
178 |
+
wp_enqueue_style( $this->plugin_slug .'-posts-pages-styles', plugins_url( 'assets/css/smc-posts-pages.css', __FILE__ ), array(), Smart_Media_Categories::VERSION );
|
179 |
+
} elseif ( 'edit-page' == $screen->id ) {
|
180 |
+
// All Pages
|
181 |
+
wp_enqueue_style( $this->plugin_slug .'-posts-pages-styles', plugins_url( 'assets/css/smc-posts-pages.css', __FILE__ ), array(), Smart_Media_Categories::VERSION );
|
182 |
+
} elseif ( $this->plugin_screen_hook_suffix == $screen->id ) {
|
183 |
+
// Settings/Smart Media Categories
|
184 |
+
wp_enqueue_style( $this->plugin_slug .'-admin-styles', plugins_url( 'assets/css/smc-admin.css', __FILE__ ), array(), Smart_Media_Categories::VERSION );
|
185 |
+
}
|
186 |
+
}
|
187 |
+
|
188 |
+
/**
|
189 |
+
* Register and enqueue admin-specific JavaScript.
|
190 |
+
*
|
191 |
+
* @since 1.0.0
|
192 |
+
*
|
193 |
+
* @return NULL Return early if no settings page is registered.
|
194 |
+
*/
|
195 |
+
public function enqueue_admin_scripts() {
|
196 |
+
if ( ! isset( $this->plugin_screen_hook_suffix ) ) {
|
197 |
+
return;
|
198 |
+
}
|
199 |
+
|
200 |
+
$suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
|
201 |
+
$screen = get_current_screen();
|
202 |
+
//error_log( __LINE__ . ' Smart_Media_Categories_Admin::enqueue_admin_scripts $screen = ' . var_export( $screen, true ), 0 );
|
203 |
+
|
204 |
+
if ( version_compare( get_bloginfo( 'version' ), '3.8', '>=' ) ) {
|
205 |
+
$useDashicons = true;
|
206 |
+
} else {
|
207 |
+
$useDashicons = false;
|
208 |
+
}
|
209 |
+
|
210 |
+
$is_smc_type = false;
|
211 |
+
if ( 0 === strpos( $screen->id, 'edit-' ) ) {
|
212 |
+
$is_smc_type = SMC_Settings_Support::is_smc_post_type( substr( $screen->id, 5 ) );
|
213 |
+
}
|
214 |
+
|
215 |
+
if ( $is_smc_type ) {
|
216 |
+
/*
|
217 |
+
* Posts/All Posts submenu
|
218 |
+
*/
|
219 |
+
wp_enqueue_script( $this->plugin_slug . 'find-posts-script', plugins_url( "assets/js/smc-find-posts{$suffix}.js", __FILE__ ), array( 'jquery' ), Smart_Media_Categories::VERSION );
|
220 |
+
|
221 |
+
$script_variables = array(
|
222 |
+
'comma' => _x( ',', 'tag_delimiter', 'smart-media-categories' ),
|
223 |
+
'ajaxFailError' => __( 'An ajax.fail error has occurred. Please reload the page and try again.', 'smart-media-categories' ),
|
224 |
+
'ajaxDoneError' => __( 'An ajax.done error has occurred. Please reload the page and try again.', 'smart-media-categories' ),
|
225 |
+
'ntDelTitle' => __( 'Remove from sync list.', 'smart-media-categories' ),
|
226 |
+
'syncAllChildren' => __( 'Sync All Children', 'smart-media-categories' ),
|
227 |
+
'noChildren' => __( 'None - no children selected', 'smart-media-categories' ),
|
228 |
+
'useDashicons' => $useDashicons,
|
229 |
+
);
|
230 |
+
|
231 |
+
wp_localize_script( $this->plugin_slug . 'find-posts-script', $this->plugin_object . '_posts_settings', $script_variables );
|
232 |
+
|
233 |
+
wp_enqueue_script( $this->plugin_slug . 'sync-posts-script', plugins_url( "assets/js/smc-sync-posts{$suffix}.js", __FILE__ ), array( 'suggest', 'jquery', $this->plugin_slug . 'find-posts-script' ), Smart_Media_Categories::VERSION );
|
234 |
+
|
235 |
+
/*
|
236 |
+
* Add the "Select Parent" popup window
|
237 |
+
*/
|
238 |
+
add_action( 'admin_footer', array( $this, 'action_posts_admin_footer' ) );
|
239 |
+
} elseif ( 'edit-page' == $screen->id ) {
|
240 |
+
/*
|
241 |
+
* Pages/All Pages submenu
|
242 |
+
*/
|
243 |
+
wp_enqueue_script( $this->plugin_slug . 'find-posts-script', plugins_url( "assets/js/smc-find-posts{$suffix}.js", __FILE__ ), array( 'jquery' ), Smart_Media_Categories::VERSION );
|
244 |
+
|
245 |
+
$script_variables = array(
|
246 |
+
'comma' => _x( ',', 'tag_delimiter', 'smart-media-categories' ),
|
247 |
+
'ajaxFailError' => __( 'An ajax.fail error has occurred. Please reload the page and try again.', 'smart-media-categories' ),
|
248 |
+
'ajaxDoneError' => __( 'An ajax.done error has occurred. Please reload the page and try again.', 'smart-media-categories' ),
|
249 |
+
'syncAllChildren' => __( 'Sync All Children', 'smart-media-categories' ),
|
250 |
+
'noChildren' => __( 'None - no children selected', 'smart-media-categories' ),
|
251 |
+
'useDashicons' => $useDashicons,
|
252 |
+
);
|
253 |
+
|
254 |
+
wp_localize_script( $this->plugin_slug . 'find-posts-script', $this->plugin_object . '_posts_settings', $script_variables );
|
255 |
+
|
256 |
+
/*
|
257 |
+
* Add the "Select Parent" popup window
|
258 |
+
*/
|
259 |
+
add_action( 'admin_footer', array( $this, 'action_pages_admin_footer' ) );
|
260 |
+
} elseif ( $this->plugin_screen_hook_suffix == $screen->id ) {
|
261 |
+
/*
|
262 |
+
* Settings/Smart Media Categories page
|
263 |
+
*/
|
264 |
+
wp_enqueue_script( $this->plugin_slug . '-admin-script', plugins_url( 'assets/js/smc-admin.js', __FILE__ ), array( 'jquery' ), Smart_Media_Categories::VERSION );
|
265 |
+
}
|
266 |
+
}
|
267 |
+
|
268 |
+
/**
|
269 |
+
* Register the administration menu for this plugin into the WordPress Dashboard menu.
|
270 |
+
*
|
271 |
+
* @since 1.0.0
|
272 |
+
*/
|
273 |
+
public function add_plugin_admin_menu() {
|
274 |
+
/*
|
275 |
+
* Add a settings page for this plugin to the Settings menu.
|
276 |
+
*/
|
277 |
+
$this->plugin_screen_hook_suffix = add_options_page(
|
278 |
+
/* translators: 1: version number */
|
279 |
+
sprintf( __( 'Smart Media Categories v%1$s Settings', 'smart-media-categories' ), Smart_Media_Categories::VERSION ),
|
280 |
+
__( 'Smart Media Categories', 'smart-media-categories' ),
|
281 |
+
'manage_options',
|
282 |
+
$this->plugin_slug,
|
283 |
+
array( $this, 'render_plugin_admin_page' )
|
284 |
+
);
|
285 |
+
|
286 |
+
SMC_Settings_Support::initialize_settings_page( $this->plugin_slug );
|
287 |
+
}
|
288 |
+
|
289 |
+
/**
|
290 |
+
* Render the settings page for this plugin.
|
291 |
+
*
|
292 |
+
* @since 1.0.0
|
293 |
+
*/
|
294 |
+
public function render_plugin_admin_page() {
|
295 |
+
if ( isset( $_REQUEST['action'] ) && 'update' == $_REQUEST['action'] ) {
|
296 |
+
$active_tab = SMC_Settings_Support::get_active_tab();
|
297 |
+
$options = isset( $_REQUEST[ $active_tab ] ) ? $_REQUEST[ $active_tab ] : array();
|
298 |
+
|
299 |
+
if ( 'smc_automatic_options' == $active_tab ) {
|
300 |
+
SMC_Settings_Support::validate_automatic_options( $options );
|
301 |
+
}
|
302 |
+
}
|
303 |
+
|
304 |
+
include_once( 'views/smc-admin.php' );
|
305 |
+
}
|
306 |
+
|
307 |
+
/**
|
308 |
+
* Add settings action link to the plugins page.
|
309 |
+
*
|
310 |
+
* @since 1.0.0
|
311 |
+
*/
|
312 |
+
public function add_action_links( $links ) {
|
313 |
+
return array_merge(
|
314 |
+
array(
|
315 |
+
'settings' => '<a href="' . admin_url( 'options-general.php?page=' . $this->plugin_slug ) . '">' . __( 'Settings', 'smart-media-categories' ) . '</a>'
|
316 |
+
),
|
317 |
+
$links
|
318 |
+
);
|
319 |
+
}
|
320 |
+
|
321 |
+
/*
|
322 |
+
* NOTE: Actions are points in the execution of a page or process
|
323 |
+
* lifecycle that WordPress fires.
|
324 |
+
*
|
325 |
+
* Actions: http://codex.wordpress.org/Plugin_API#Actions
|
326 |
+
* Reference: http://codex.wordpress.org/Plugin_API/Action_Reference
|
327 |
+
*
|
328 |
+
* NOTE: Filters are points of execution in which WordPress modifies data
|
329 |
+
* before saving it or sending it to the browser.
|
330 |
+
*
|
331 |
+
* Filters: http://codex.wordpress.org/Plugin_API#Filters
|
332 |
+
* Reference: http://codex.wordpress.org/Plugin_API/Filter_Reference
|
333 |
+
*/
|
334 |
+
|
335 |
+
/**
|
336 |
+
* Add the "Children" column to the Posts/All Posts and Pages/All Pages submenus
|
337 |
+
*
|
338 |
+
* @since 1.0.0
|
339 |
+
*
|
340 |
+
*
|
341 |
+
* @return void echoes HTML markup for the Attach popup
|
342 |
+
*/
|
343 |
+
public function action_load_edit_php() {
|
344 |
+
$screen = get_current_screen();
|
345 |
+
//error_log( __LINE__ . ' Smart_Media_Categories_Admin::action_load_edit_php $screen = ' . var_export( $screen, true ), 0 );
|
346 |
+
|
347 |
+
$is_smc_type = false;
|
348 |
+
$this->current_edit_type = 'post';
|
349 |
+
if ( 0 === strpos( $screen->id, 'edit-' ) ) {
|
350 |
+
$this->current_edit_type = substr( $screen->id, 5 );
|
351 |
+
$is_smc_type = SMC_Settings_Support::is_smc_post_type( $this->current_edit_type );
|
352 |
+
}
|
353 |
+
|
354 |
+
if ( $is_smc_type ) {}
|
355 |
+
/*
|
356 |
+
* Add the "Smart Media" action to the Posts/All Posts submenu rollover actions
|
357 |
+
* Add the "Children" column to the Posts/All Posts and Pages/All Pages submenus
|
358 |
+
* filters/actions are in /wp-admin/includes/class-wp-posts-list-table.php
|
359 |
+
* filter "views_{$this->screen->id}" is in /wp-admin/includes/class-wp-list-table.php
|
360 |
+
*/
|
361 |
+
add_filter( "views_edit-{$this->current_edit_type}", array( $this, 'filter_views_edit_post' ), 10, 1 );
|
362 |
+
|
363 |
+
add_filter( "post_row_actions", array( $this, 'filter_post_row_actions' ), 10, 2 );
|
364 |
+
add_filter( "manage_posts_columns", array( $this, 'filter_manage_posts_columns' ), 10, 1 );
|
365 |
+
add_action( "manage_posts_custom_column", array( $this, 'action_manage_posts_custom_column' ), 10, 2 );
|
366 |
+
|
367 |
+
add_filter( "manage_pages_columns", array( $this, 'filter_manage_pages_columns' ), 10, 1 );
|
368 |
+
add_action( "manage_pages_custom_column", array( $this, 'action_manage_pages_custom_column' ), 10, 2 );
|
369 |
+
|
370 |
+
if ( isset( $_REQUEST['smc_message'] ) ) {
|
371 |
+
add_filter( 'bulk_post_updated_messages', array( $this, 'filter_bulk_post_updated_messages' ), 10, 2 );
|
372 |
+
}
|
373 |
+
|
374 |
+
add_filter( 'posts_clauses', array( $this, 'filter_posts_clauses' ), 10, 2 );
|
375 |
+
}
|
376 |
+
|
377 |
+
/**
|
378 |
+
* $clauses = (array) apply_filters_ref_array( 'posts_clauses', array( compact( $pieces ), &$this ) );
|
379 |
+
*
|
380 |
+
* @since 1.0.2
|
381 |
+
*
|
382 |
+
* @param array The list of clauses for the query.
|
383 |
+
* @param WP_Query The WP_Query instance (passed by reference).
|
384 |
+
*
|
385 |
+
* @return array updated list of clauses for the query
|
386 |
+
*/
|
387 |
+
public function filter_posts_clauses( $clauses, $wp_query ) {
|
388 |
+
global $wpdb;
|
389 |
+
//error_log( __LINE__ . ' Smart_Media_Categories_Admin::filter_posts_clauses $clauses = ' . var_export( $clauses, true ), 0 );
|
390 |
+
//error_log( __LINE__ . ' Smart_Media_Categories_Admin::filter_posts_clauses query_type = ' . var_export( $wp_query->query_vars['post_type'], true ), 0 );
|
391 |
+
if ( isset( $_REQUEST['smc_status'] ) && ( $wp_query->query_vars['post_type'] == $this->current_edit_type ) ) {
|
392 |
+
//error_log( __LINE__ . ' Smart_Media_Categories_Admin::filter_posts_clauses $this->current_edit_type = ' . var_export( $this->current_edit_type, true ), 0 );
|
393 |
+
$posts = implode( ',', SMC_Sync_support::get_posts_per_view( array( 'post_type' => $this->current_edit_type, 'smc_status' => $_REQUEST['smc_status'] ) ) );
|
394 |
+
if ( empty( $posts ) ) {
|
395 |
+
$posts = '0';
|
396 |
+
}
|
397 |
+
|
398 |
+
$clauses['where'] = " AND {$wpdb->posts}.ID IN ( " . $posts . ' )' . $clauses['where'];
|
399 |
+
//error_log( __LINE__ . ' Smart_Media_Categories_Admin::filter_posts_clauses updated $clauses[where] = ' . var_export( $clauses['where'], true ), 0 );
|
400 |
+
}
|
401 |
+
|
402 |
+
return $clauses;
|
403 |
+
}
|
404 |
+
|
405 |
+
/**
|
406 |
+
* Add the "Smart Media" action to the Posts/All Posts submenu rollover actions
|
407 |
+
*
|
408 |
+
* @since 1.0.0
|
409 |
+
*
|
410 |
+
* @param array An array of row action links
|
411 |
+
* @param WP_Post The post object
|
412 |
+
*
|
413 |
+
* @return array updated array of row action links
|
414 |
+
*/
|
415 |
+
public function filter_post_row_actions( $actions, $post ) {
|
416 |
+
if ( SMC_Settings_Support::is_smc_post_type( $post->post_type ) ) {
|
417 |
+
$actions['smart hide-if-no-js'] = sprintf( '<a href="#" onclick="smc.syncPosts.open( \'%1$s\' ); return false;" title="Sync terms">Smart Media</a>', $post->ID );
|
418 |
+
}
|
419 |
+
|
420 |
+
return $actions;
|
421 |
+
}
|
422 |
+
|
423 |
+
/**
|
424 |
+
* Add the "Children" column to the Posts/All Posts submenu
|
425 |
+
*
|
426 |
+
* @since 1.0.0
|
427 |
+
*
|
428 |
+
* @param array column definitions for the All Posts submenu table
|
429 |
+
*
|
430 |
+
* @return array updated column definitions for the All Posts submenu table
|
431 |
+
*/
|
432 |
+
public function filter_manage_posts_columns( $columns ) {
|
433 |
+
$columns['smc_children'] = __( 'Children', 'smart-media-categories' );
|
434 |
+
return $columns;
|
435 |
+
}
|
436 |
+
|
437 |
+
/**
|
438 |
+
* Compose <div> tags for term assignments
|
439 |
+
*
|
440 |
+
* @since 1.0.0
|
441 |
+
*
|
442 |
+
* @param integer ID of the parent object
|
443 |
+
* @param object taxonomy object
|
444 |
+
* @param array object => term id and slug assignments
|
445 |
+
*
|
446 |
+
* @return string HTML <div> tags with assignment data
|
447 |
+
*/
|
448 |
+
private function _build_term_assignments( $post_id, &$tax_object, &$term_assignments ) {
|
449 |
+
$tax_name = $tax_object->name;
|
450 |
+
|
451 |
+
if ( isset( $term_assignments[ $post_id ][ $tax_name ] ) ) {
|
452 |
+
$terms = $term_assignments[ $post_id ][ $tax_name ];
|
453 |
+
} else {
|
454 |
+
$terms = array();
|
455 |
+
}
|
456 |
+
|
457 |
+
$ids = array();
|
458 |
+
if ( $tax_object->hierarchical ) {
|
459 |
+
foreach( $terms as $term ) {
|
460 |
+
$ids[] = $term['id'];
|
461 |
+
}
|
462 |
+
|
463 |
+
return ' <div class="smc-categories" id="' . $tax_name . '-' . $post_id . '">'
|
464 |
+
. implode( ',', $ids ) . "</div>\n";
|
465 |
+
} else {
|
466 |
+
foreach( $terms as $term ) {
|
467 |
+
$ids[] = $term['slug'];
|
468 |
+
}
|
469 |
+
|
470 |
+
return ' <div class="smc-tags" id="' . $tax_name. '-' .$post_id . '">'
|
471 |
+
. esc_attr( implode( ', ', $ids ) ) . "</div>\n";
|
472 |
+
}
|
473 |
+
}
|
474 |
+
|
475 |
+
/**
|
476 |
+
* Add hidden fields with the data for use in the "Smart Media Categories" popup
|
477 |
+
*
|
478 |
+
* @since 1.0.0
|
479 |
+
*
|
480 |
+
* @param object The parent object
|
481 |
+
* @param array IDs of the children
|
482 |
+
* @param array object => term id and slug assignments
|
483 |
+
*
|
484 |
+
* @return string HTML <div> with row data
|
485 |
+
*/
|
486 |
+
private function _build_inline_data( $parent, $children, $term_assignments ) {
|
487 |
+
$inline_data = "\n" . '<div class="hidden smc-inline" id="smc-inline-' . $parent->ID . "\">\n";
|
488 |
+
$inline_data .= '<div class="smc-inline-post-title" id="post-title-' . $parent->ID . '">' . esc_html( $parent->post_title ) . "</div>\n";
|
489 |
+
$taxonomies = get_object_taxonomies( 'attachment', 'objects' );
|
490 |
+
$post_taxonomies = SMC_Settings_Support::smc_taxonomies();
|
491 |
+
|
492 |
+
foreach ( $taxonomies as $tax_name => $tax_object ) {
|
493 |
+
if ( $tax_object->show_ui && in_array( $tax_name, $post_taxonomies ) ) {
|
494 |
+
$inline_data .= $this->_build_term_assignments( $parent->ID, $tax_object, $term_assignments );
|
495 |
+
}
|
496 |
+
}
|
497 |
+
|
498 |
+
$inline_data .= "</div>\n";
|
499 |
+
return $inline_data;
|
500 |
+
}
|
501 |
+
|
502 |
+
/**
|
503 |
+
* Returns HTML markup for one view that can be used with this table
|
504 |
+
*
|
505 |
+
* @since 1.0.2
|
506 |
+
*
|
507 |
+
* @param string View slug
|
508 |
+
* @param string Slug for current view
|
509 |
+
*
|
510 |
+
* @return string | false HTML for link to display the view, false if count = zero
|
511 |
+
*/
|
512 |
+
function _get_view( $view_slug, $current_view ) {
|
513 |
+
global $wpdb;
|
514 |
+
static $posts_per_view = NULL,
|
515 |
+
$view_singular = array (),
|
516 |
+
$view_plural = array ();
|
517 |
+
/*
|
518 |
+
* Calculate the common values once per page load
|
519 |
+
*/
|
520 |
+
if ( is_null( $posts_per_view ) ) {
|
521 |
+
$posts_per_view = SMC_Sync_Support::get_posts_per_view( array( 'post_type' => $this->current_edit_type ) );
|
522 |
+
$view_singular = array (
|
523 |
+
'sync' => __( 'Synced', 'smart-media-categories' ),
|
524 |
+
'unsync' => __( 'Unsynced', 'smart-media-categories' ),
|
525 |
+
);
|
526 |
+
$view_plural = array (
|
527 |
+
'sync' => __( 'Synced', 'smart-media-categories' ),
|
528 |
+
'unsync' => __( 'Unsynced', 'smart-media-categories' ),
|
529 |
+
);
|
530 |
+
}
|
531 |
+
|
532 |
+
/*
|
533 |
+
* Make sure the slug is in our list and has posts
|
534 |
+
*/
|
535 |
+
if ( array_key_exists( $view_slug, $posts_per_view ) ) {
|
536 |
+
$post_count = $posts_per_view[ $view_slug ];
|
537 |
+
$singular = sprintf('%s <span class="count">(%%s)</span>', $view_singular[ $view_slug ] );
|
538 |
+
$plural = sprintf('%s <span class="count">(%%s)</span>', $view_plural[ $view_slug ] );
|
539 |
+
$nooped_plural = _n_noop( $singular, $plural, 'smart-media-categories' );
|
540 |
+
} else {
|
541 |
+
return false;
|
542 |
+
}
|
543 |
+
|
544 |
+
if ( $post_count ) {
|
545 |
+
$query = array( 'smc_status' => $view_slug );
|
546 |
+
$base_url = "edit.php?post_type={$this->current_edit_type}";
|
547 |
+
$class = ( $view_slug == $current_view ) ? ' class="current"' : '';
|
548 |
+
|
549 |
+
return "<a href='" . add_query_arg( $query, $base_url ) . "'$class>" . sprintf( translate_nooped_plural( $nooped_plural, $post_count, 'smart-media-categories' ), number_format_i18n( $post_count ) ) . '</a>';
|
550 |
+
}
|
551 |
+
|
552 |
+
return false;
|
553 |
+
}
|
554 |
+
|
555 |
+
/**
|
556 |
+
* Add the "Synced/Unsynced" views to the Posts/All Posts submenu
|
557 |
+
*
|
558 |
+
* This filter is applied in /wp-admin/includes/class-wp-list-table.php
|
559 |
+
*
|
560 |
+
* @since 1.0.2
|
561 |
+
*
|
562 |
+
* @param array column definitions for the All Posts submenu table
|
563 |
+
*
|
564 |
+
* @return array updated column definitions for the All Posts submenu table
|
565 |
+
*/
|
566 |
+
public function filter_views_edit_post( $views ) {
|
567 |
+
//error_log( __LINE__ . ' Smart_Media_Categories_Admin::filter_views_edit_post $views = ' . var_export( $views, true ), 0 );
|
568 |
+
|
569 |
+
if ( isset( $_REQUEST['smc_status'] ) ) {
|
570 |
+
switch( $_REQUEST['smc_status'] ) {
|
571 |
+
case 'sync':
|
572 |
+
$current_view = 'sync';
|
573 |
+
break;
|
574 |
+
case 'unsync':
|
575 |
+
$current_view = 'unsync';
|
576 |
+
break;
|
577 |
+
default:
|
578 |
+
$current_view = '';
|
579 |
+
} // smc_status
|
580 |
+
} else {
|
581 |
+
$current_view = '';
|
582 |
+
}
|
583 |
+
|
584 |
+
foreach ( $views as $slug => $view ) {
|
585 |
+
// Find/update the current view
|
586 |
+
if ( strpos( $view, ' class="current"' ) ) {
|
587 |
+
if ( ! empty( $current_view ) ) {
|
588 |
+
//error_log( __LINE__ . ' Smart_Media_Categories_Admin::filter_views_edit_post before = ' . var_export( $views[ $slug ], true ), 0 );
|
589 |
+
$views[ $slug ] = str_replace( ' class="current"', '', $view );
|
590 |
+
//error_log( __LINE__ . ' Smart_Media_Categories_Admin::filter_views_edit_post after = ' . var_export( $views[ $slug ], true ), 0 );
|
591 |
+
} else {
|
592 |
+
$current_view = $slug;
|
593 |
+
}
|
594 |
+
}
|
595 |
+
} // each view
|
596 |
+
//error_log( __LINE__ . ' Smart_Media_Categories_Admin::filter_views_edit_post $current_view = ' . var_export( $current_view, true ), 0 );
|
597 |
+
|
598 |
+
if ( SMC_Settings_Support::is_smc_post_type( $this->current_edit_type ) ) {
|
599 |
+
$value = $this->_get_view( 'sync', $current_view );
|
600 |
+
if ( $value ) {
|
601 |
+
$views['sync'] = $value;
|
602 |
+
}
|
603 |
+
|
604 |
+
$value = $this->_get_view( 'unsync', $current_view );
|
605 |
+
if ( $value ) {
|
606 |
+
$views['unsync'] = $value;
|
607 |
+
}
|
608 |
+
}
|
609 |
+
|
610 |
+
//error_log( __LINE__ . ' Smart_Media_Categories_Admin::filter_views_edit_post updated $views = ' . var_export( $views, true ), 0 );
|
611 |
+
return $views;
|
612 |
+
}
|
613 |
+
|
614 |
+
/**
|
615 |
+
* Render the "Children" column for the Posts/All Posts submenu
|
616 |
+
*
|
617 |
+
* @since 1.0.0
|
618 |
+
*
|
619 |
+
* @param array name of the column
|
620 |
+
* @param array ID of the post for which the content is desired
|
621 |
+
*
|
622 |
+
* @return void echoes HTML markup for the column content
|
623 |
+
*/
|
624 |
+
public function action_manage_posts_custom_column( $column_name, $post_id ) {
|
625 |
+
// global $wp, $wp_query, $wp_the_query;
|
626 |
+
global $post;
|
627 |
+
static $smc_status = NULL;
|
628 |
+
//error_log( __LINE__ . " Smart_Media_Categories_Admin::action_manage_posts_custom_column( {$column_name}, {$post_id} )", 0 );
|
629 |
+
|
630 |
+
//error_log( __LINE__ . ' Smart_Media_Categories_Admin::action_manage_posts_custom_column wp = ' . var_export( $wp, true ), 0 );
|
631 |
+
//error_log( __LINE__ . ' Smart_Media_Categories_Admin::action_manage_posts_custom_column wp_query = ' . var_export( $wp_query, true ), 0 );
|
632 |
+
|
633 |
+
if ( 'smc_children' != $column_name ) {
|
634 |
+
return;
|
635 |
+
}
|
636 |
+
//error_log( __LINE__ . ' Smart_Media_Categories_Admin::action_manage_posts_custom_column post = ' . var_export( $post, true ), 0 );
|
637 |
+
|
638 |
+
// Retain the view when the Year/Month or Categories are set and "Filter" is clicked.
|
639 |
+
if ( NULL == $smc_status && isset( $_REQUEST['smc_status'] ) ) {
|
640 |
+
$smc_status = $_REQUEST['smc_status'];
|
641 |
+
echo '<input type="hidden" name="smc_status" class="smc_status_page" value="' . $smc_status . '" />';
|
642 |
+
}
|
643 |
+
|
644 |
+
$args = array( 'post_parent' => $post_id, 'post_type' => 'attachment', 'post_status' => 'inherit' );
|
645 |
+
$children = get_children( $args );
|
646 |
+
//error_log( __LINE__ . ' Smart_Media_Categories_Admin::action_manage_posts_custom_column array_keys( $children ) = ' . var_export( array_keys( $children ), true ), 0 );
|
647 |
+
$term_assignments = SMC_Sync_Support::get_terms( $post_id, array_keys( $children ) );
|
648 |
+
//error_log( __LINE__ . ' Smart_Media_Categories_Admin::action_manage_posts_custom_column term_assignments = ' . var_export( $term_assignments, true ), 0 );
|
649 |
+
if ( $children ) {
|
650 |
+
$threshold = SMC_Settings_Support::get_option( 'scroll_threshold' );
|
651 |
+
$count = count( $children );
|
652 |
+
//error_log( __LINE__ . ' Smart_Media_Categories_Admin::action_manage_posts_custom_column $count = ' . var_export( $count, true ), 0 );
|
653 |
+
if ( $threshold <= $count ) {
|
654 |
+
$height = SMC_Settings_Support::get_option( 'scroll_height' );
|
655 |
+
echo "<div style=\"width: 100%; height: {$height}; overflow: auto\">\n";
|
656 |
+
}
|
657 |
+
|
658 |
+
ksort( $children);
|
659 |
+
foreach ($children as $child_id => $child ) {
|
660 |
+
$sync_class = ( $term_assignments[ $child_id ]['smc_sync'] ) ? 'smc-sync-true' : 'smc-sync-false';
|
661 |
+
|
662 |
+
echo sprintf( '<a class="hide-if-no-js %1$s" id="smc-child-%3$s" onclick="smc.findPosts.open( \'%2$s\',\'%3$s\',\'%5$s\' ); return false;" href="%4$s#the-list">%5$s (%3$s)</a><br>', /*%1$s*/ $sync_class, /*%2$s*/ $post_id, /*%3$s*/ $child->ID, /*%4$s*/ admin_url( 'edit.php' ), /*%5$s*/ esc_attr( $child->post_title ) );
|
663 |
+
}
|
664 |
+
|
665 |
+
if ( $threshold <= $count ) {
|
666 |
+
echo "</div>\n";
|
667 |
+
}
|
668 |
+
} else {
|
669 |
+
echo __( 'No Children', 'smart-media-categories' );
|
670 |
+
}
|
671 |
+
|
672 |
+
echo $this->_build_inline_data( $post, $children, $term_assignments );
|
673 |
+
}
|
674 |
+
|
675 |
+
/**
|
676 |
+
* Add the "Children" column to the Pages/All Pages submenu
|
677 |
+
*
|
678 |
+
* @since 1.0.0
|
679 |
+
*
|
680 |
+
* @param array column definitions for the All Posts submenu table
|
681 |
+
*
|
682 |
+
* @return array updated column definitions for the All Posts submenu table
|
683 |
+
*/
|
684 |
+
public function filter_manage_pages_columns( $columns ) {
|
685 |
+
$columns['smc_children'] = __( 'Children', 'smart-media-categories' );
|
686 |
+
return $columns;
|
687 |
+
}
|
688 |
+
|
689 |
+
/**
|
690 |
+
* Render the "Children" column for the Pages/All Pages submenu
|
691 |
+
*
|
692 |
+
* @since 1.0.0
|
693 |
+
*
|
694 |
+
* @param array name of the column
|
695 |
+
* @param array ID of the post for which the content is desired
|
696 |
+
*
|
697 |
+
* @return void echoes HTML markup for the column content
|
698 |
+
*/
|
699 |
+
public function action_manage_pages_custom_column( $column_name, $post_id ) {
|
700 |
+
//error_log( __LINE__ . " Smart_Media_Categories_Admin::action_manage_pages_custom_column( $column_name, $post_id )", 0 );
|
701 |
+
if ( 'smc_children' != $column_name ) {
|
702 |
+
return;
|
703 |
+
}
|
704 |
+
|
705 |
+
$args = array( 'post_parent' => $post_id, 'post_type' => 'attachment' );
|
706 |
+
$children = get_children( $args );
|
707 |
+
if ( $children ) {
|
708 |
+
$threshold = SMC_Settings_Support::get_option( 'scroll_threshold' );
|
709 |
+
$count = count( $children );
|
710 |
+
//error_log( __LINE__ . ' Smart_Media_Categories_Admin::action_manage_pages_custom_column $count = ' . var_export( $count, true ), 0 );
|
711 |
+
if ( $threshold <= $count ) {
|
712 |
+
$height = SMC_Settings_Support::get_option( 'scroll_height' );
|
713 |
+
echo "<div style=\"width: 100%; height: {$height}; overflow: auto\">\n";
|
714 |
+
}
|
715 |
+
|
716 |
+
ksort( $children);
|
717 |
+
foreach ($children as $child_id => $child ) {
|
718 |
+
$sync_class = 'smc-sync-true';
|
719 |
+
echo sprintf( '<a class="hide-if-no-js %1$s" id="smc-child-%3$s" onclick="smc.findPosts.open( \'%2$s\',\'%3$s\',\'%5$s\' ); return false;" href="%4$s#the-list">%5$s (%3$s)</a><br>', /*%1$s*/ $sync_class, /*%2$s*/ $post_id, /*%3$s*/ $child->ID, /*%4$s*/ admin_url( 'edit.php' ), /*%5$s*/ esc_attr( $child->post_title ) );
|
720 |
+
}
|
721 |
+
|
722 |
+
if ( $threshold <= $count ) {
|
723 |
+
echo "</div>\n";
|
724 |
+
}
|
725 |
+
} else {
|
726 |
+
echo __( 'No Children', 'smart-media-categories' );
|
727 |
+
}
|
728 |
+
}
|
729 |
+
|
730 |
+
/**
|
731 |
+
* Adds mapping update messages for display at the top of the All Posts/All Pages screen
|
732 |
+
*
|
733 |
+
* @since 1.0.0
|
734 |
+
*
|
735 |
+
* @param array messages for the Edit screen
|
736 |
+
*
|
737 |
+
* @return array updated messages
|
738 |
+
*/
|
739 |
+
public function filter_bulk_post_updated_messages( $messages, $counts ) {
|
740 |
+
//error_log( __LINE__ . ' Smart_Media_Categories_Admin::filter_bulk_post_updated_messages $_REQUEST = ' . var_export( $_REQUEST, true ), 0 );
|
741 |
+
|
742 |
+
if ( isset( $_REQUEST['smc_message'] ) ) {
|
743 |
+
// Determine which message array to update
|
744 |
+
if ( !empty( $_REQUEST['post_type'] ) && ( 'page' === $_REQUEST['post_type'] ) ) {
|
745 |
+
$message_type = 'page';
|
746 |
+
} else {
|
747 |
+
$message_type = 'post';
|
748 |
+
}
|
749 |
+
|
750 |
+
$smc_message = explode( ',', $_REQUEST['smc_message'] );
|
751 |
+
switch ( $smc_message[0] ) {
|
752 |
+
case '101':
|
753 |
+
$messages[ $message_type ]['updated'] = _n( '%s parent updated.', '%s parents updated.', $counts['updated'], 'smart-media-categories' );
|
754 |
+
break;
|
755 |
+
case '102':
|
756 |
+
$messages[ $message_type ]['updated'] = __( 'No terms updated.', 'smart-media-categories' );
|
757 |
+
break;
|
758 |
+
case '103':
|
759 |
+
$messages[ $message_type ]['updated'] = _n( '%s child terms updated.', '%s children terms updated.', $counts['updated'], 'smart-media-categories' );
|
760 |
+
break;
|
761 |
+
case '104':
|
762 |
+
$messages[ $message_type ]['updated'] = _n( 'Parent and %s child terms updated.', 'Parent and %s children terms updated.', $counts['updated'], 'smart-media-categories' );
|
763 |
+
break;
|
764 |
+
case '105':
|
765 |
+
$messages[ $message_type ]['updated'] = __( 'No parents updated.', 'smart-media-categories' );
|
766 |
+
break;
|
767 |
+
case '106':
|
768 |
+
$parent_clause = sprintf( _n( '%d parent', '%d parents', $smc_message[1], 'smart-media-categories' ), $smc_message[1] );
|
769 |
+
$children_clause = sprintf( _n( '%d child', '%d children', (integer)$smc_message[2], 'smart-media-categories' ), $smc_message[2] );
|
770 |
+
$messages[ $message_type ]['updated'] = sprintf( __( 'All Children synced %1$s to %2$s.', 'smart-media-categories' ), $children_clause, $parent_clause );
|
771 |
+
break;
|
772 |
+
case '107':
|
773 |
+
$parent_clause = sprintf( _n( '%d parent', '%d parents', $smc_message[1], 'smart-media-categories' ), $smc_message[1] );
|
774 |
+
$children_clause = sprintf( _n( '%d child', '%d children', (integer)$smc_message[2], 'smart-media-categories' ), $smc_message[2] );
|
775 |
+
$messages[ $message_type ]['updated'] = sprintf( __( 'Bulk Edit synced %1$s to %2$s.', 'smart-media-categories' ), $children_clause, $parent_clause );
|
776 |
+
break;
|
777 |
+
}
|
778 |
+
}
|
779 |
+
|
780 |
+
//error_log( __LINE__ . ' Smart_Media_Categories_Admin::filter_bulk_post_updated_messages $messages = ' . var_export( $messages, true ), 0 );
|
781 |
+
return $messages;
|
782 |
+
} // filter_bulk_post_updated_messages
|
783 |
+
|
784 |
+
/**
|
785 |
+
* Move attachment(s) from one parent to another
|
786 |
+
*
|
787 |
+
* Adapted from case "attach": in /wp-admin/upload.php
|
788 |
+
*
|
789 |
+
* @since 1.0.0
|
790 |
+
*
|
791 |
+
* @param integer ID of the current parent post
|
792 |
+
* @param integer ID of the new parent post
|
793 |
+
* @param array IDs of the attachments to be reassigned
|
794 |
+
*
|
795 |
+
* @return void exits after wp_redirect to All Posts/All Pages submenu
|
796 |
+
*/
|
797 |
+
private function _reassign_parent( $old_parent, $new_parent, $attachments ) {
|
798 |
+
global $wpdb;
|
799 |
+
//error_log( __LINE__ . " Smart_Media_Categories_Admin::_reassign_parent( $old_parent, $new_parent ) \$attachments = " . var_export( $attachments, true ), 0 );
|
800 |
+
//error_log( __LINE__ . ' Smart_Media_Categories_Admin::_reassign_parent $_REQUEST = ' . var_export( $_REQUEST, true ), 0 );
|
801 |
+
|
802 |
+
if ( !$old_parent ) {
|
803 |
+
wp_die( __( 'Current parent ID not in request.', 'smart-media-categories' ) );
|
804 |
+
}
|
805 |
+
|
806 |
+
if ( !current_user_can( 'edit_post', $old_parent ) ) {
|
807 |
+
wp_die( __( 'You are not allowed to edit the current parent.', 'smart-media-categories' ) );
|
808 |
+
}
|
809 |
+
|
810 |
+
if ( $new_parent && !current_user_can( 'edit_post', $new_parent ) ) {
|
811 |
+
wp_die( __( 'You are not allowed to edit the new parent.', 'smart-media-categories' ) );
|
812 |
+
}
|
813 |
+
|
814 |
+
$attached = 0;
|
815 |
+
if ( $old_parent != $new_parent ) {
|
816 |
+
$attach = array();
|
817 |
+
foreach ( $attachments as $att_id ) {
|
818 |
+
$att_id = (int) $att_id;
|
819 |
+
|
820 |
+
if ( !current_user_can( 'edit_post', $att_id ) )
|
821 |
+
continue;
|
822 |
+
|
823 |
+
$attach[] = $att_id;
|
824 |
+
}
|
825 |
+
|
826 |
+
if ( ! empty( $attach ) ) {
|
827 |
+
foreach ( $attach as $att_id ) {
|
828 |
+
if ( wp_update_post( array( 'ID' => $att_id, 'post_parent' => $new_parent ), true ) ) {
|
829 |
+
$attached++;
|
830 |
+
}
|
831 |
+
}
|
832 |
+
}
|
833 |
+
}
|
834 |
+
|
835 |
+
$location = 'edit.php';
|
836 |
+
if ( !empty( $_REQUEST['post_type'] ) ) {
|
837 |
+
$location .= '?post_type=' . $_REQUEST['post_type'];
|
838 |
+
}
|
839 |
+
|
840 |
+
if ( $referer = wp_get_referer() ) {
|
841 |
+
if ( false !== strpos( $referer, 'edit.php' ) )
|
842 |
+
$location = $referer;
|
843 |
+
//error_log( __LINE__ . ' Smart_Media_Categories_Admin::_reassign_parent $location = ' . var_export( $location, true ), 0 );
|
844 |
+
}
|
845 |
+
//error_log( __LINE__ . ' Smart_Media_Categories_Admin::_reassign_parent $referer = ' . var_export( $referer, true ), 0 );
|
846 |
+
|
847 |
+
if ( $attached ) {
|
848 |
+
$location = add_query_arg( array( 'updated' => $attached, 'smc_message' => '101' ) , $location );
|
849 |
+
} else {
|
850 |
+
$location = add_query_arg( array( 'updated' => 1, 'smc_message' => '105' ) , $location );
|
851 |
+
}
|
852 |
+
|
853 |
+
//error_log( __LINE__ . ' Smart_Media_Categories_Admin::_reassign_parent $location = ' . var_export( $location, true ), 0 );
|
854 |
+
wp_redirect( $location );
|
855 |
+
exit();
|
856 |
+
}
|
857 |
+
|
858 |
+
/**
|
859 |
+
* Process the Posts/All Posts "Select Parent" popup form submission
|
860 |
+
*
|
861 |
+
* @since 1.0.0
|
862 |
+
*
|
863 |
+
* @return void exits after wp_redirect to All Posts submenu
|
864 |
+
*/
|
865 |
+
public function action_smc_posts_modal() {
|
866 |
+
//error_log( __LINE__ . ' Smart_Media_Categories_Admin::action_smc_posts_modal $_POST = ' . var_export( $_POST, true ), 0 );
|
867 |
+
|
868 |
+
if ( isset( $_REQUEST['smc-posts-modal-submit'] ) ) {
|
869 |
+
$this->_reassign_parent( (int) $_REQUEST['parent'], (int) $_REQUEST['found_post_id'], (array) $_REQUEST['children'] );
|
870 |
+
} elseif ( isset( $_REQUEST['smc-sync-update'] ) ) {
|
871 |
+
$parent_id = (int) $_REQUEST['parent'];
|
872 |
+
if ( !$parent_id ) {
|
873 |
+
wp_die( __( 'Parent ID not in request.', 'smart-media-categories' ) );
|
874 |
+
}
|
875 |
+
|
876 |
+
//$parent = get_post( $parent_id );
|
877 |
+
if ( !current_user_can( 'edit_post', $parent_id ) ) {
|
878 |
+
wp_die( __( 'You are not allowed to edit this post.', 'smart-media-categories' ) );
|
879 |
+
}
|
880 |
+
|
881 |
+
// TODO: delete #smc-posts-modal-children
|
882 |
+
if ( empty( $_REQUEST['children'] ) ) {
|
883 |
+
$_REQUEST['children'] = array();
|
884 |
+
} elseif ( empty( $_REQUEST['children'][0] ) ) {
|
885 |
+
unset( $_REQUEST['children'][0] );
|
886 |
+
}
|
887 |
+
|
888 |
+
extract( SMC_Sync_Support::sync_terms( $parent_id, $_REQUEST['children'], $_REQUEST['tax_input'], $_REQUEST['tax_action'] ) );
|
889 |
+
}
|
890 |
+
|
891 |
+
if ( $parent_changed ) {
|
892 |
+
$smc_message = '104';
|
893 |
+
} elseif ( $updated ) {
|
894 |
+
$smc_message = '103';
|
895 |
+
} else {
|
896 |
+
$smc_message = '102';
|
897 |
+
}
|
898 |
+
|
899 |
+
if ( ! $updated ) {
|
900 |
+
$updated = 1;
|
901 |
+
}
|
902 |
+
|
903 |
+
$location = 'edit.php';
|
904 |
+
if ( $referer = wp_get_referer() ) {
|
905 |
+
if ( false !== strpos( $referer, 'edit.php' ) )
|
906 |
+
$location = $referer;
|
907 |
+
}
|
908 |
+
|
909 |
+
$location = add_query_arg( array( 'updated' => $updated, 'smc_message' => $smc_message ) , $location );
|
910 |
+
wp_redirect( $location );
|
911 |
+
exit();
|
912 |
+
}
|
913 |
+
|
914 |
+
/**
|
915 |
+
* Process the Pages/All Pages "Select Parent" popup form submission
|
916 |
+
*
|
917 |
+
* @since 1.0.0
|
918 |
+
*
|
919 |
+
* @return void exits after wp_redirect to All Pages submenu
|
920 |
+
*/
|
921 |
+
public function action_smc_pages_modal() {
|
922 |
+
//error_log( __LINE__ . ' Smart_Media_Categories_Admin::action_smc_pages_modal $_POST = ' . var_export( $_POST, true ), 0 );
|
923 |
+
|
924 |
+
if ( isset( $_REQUEST['smc-posts-modal-submit'] ) ) {
|
925 |
+
$this->_reassign_parent( (int) $_REQUEST['parent'], (int) $_REQUEST['found_post_id'], (array) $_REQUEST['children'] );
|
926 |
+
}
|
927 |
+
|
928 |
+
wp_redirect( admin_url( 'edit.php' ) . '?post_type=page' );
|
929 |
+
exit();
|
930 |
+
}
|
931 |
+
|
932 |
+
/**
|
933 |
+
* Extract the view and pagination query arguments for reuse
|
934 |
+
*
|
935 |
+
* @since 1.0.2
|
936 |
+
*
|
937 |
+
* @return array view and pagination query arguments
|
938 |
+
*/
|
939 |
+
private function _view_query_args() {
|
940 |
+
//error_log( __LINE__ . ' Smart_Media_Categories_Admin::_view_query_args $_REQUEST = ' . var_export( $_REQUEST, true ), 0 );
|
941 |
+
$view_args = array();
|
942 |
+
foreach( $_REQUEST as $key => $value ) {
|
943 |
+
switch ( $key ) {
|
944 |
+
case 's':
|
945 |
+
case 'post_status':
|
946 |
+
case 'post_type':
|
947 |
+
case 'm':
|
948 |
+
case 'cat':
|
949 |
+
case 'paged':
|
950 |
+
case 'mode':
|
951 |
+
case 'smc_status':
|
952 |
+
$view_args[ $key ] = urlencode( stripslashes( $value ) );
|
953 |
+
break;
|
954 |
+
}
|
955 |
+
}
|
956 |
+
|
957 |
+
//error_log( __LINE__ . ' Smart_Media_Categories_Admin::_view_query_args $view_args = ' . var_export( $view_args, true ), 0 );
|
958 |
+
return $view_args;
|
959 |
+
}
|
960 |
+
|
961 |
+
/**
|
962 |
+
* Process the "Sync All Children" button in the Bulk Edit area
|
963 |
+
*
|
964 |
+
* @since 1.0.2
|
965 |
+
*
|
966 |
+
* @return void exits after wp_redirect to All Pages submenu
|
967 |
+
*/
|
968 |
+
public function action_sync_all_bulk() {
|
969 |
+
//error_log( __LINE__ . ' Smart_Media_Categories_Admin::action_sync_all_bulk $_GET = ' . var_export( $_GET, true ), 0 );
|
970 |
+
$post_parents = isset( $_REQUEST['post'] ) ? $_REQUEST['post'] : array();
|
971 |
+
//error_log( __LINE__ . ' Smart_Media_Categories_Admin::action_sync_all_bulk $post_parents = ' . var_export( $post_parents, true ), 0 );
|
972 |
+
|
973 |
+
$assignments = SMC_Sync_Support::get_posts_per_view( array( 'post_type' => $this->current_edit_type, 'smc_status' => 'unsync', 'post_parents' => $post_parents, 'fields' => 'all' ) );
|
974 |
+
//error_log( __LINE__ . ' Smart_Media_Categories_Admin::action_sync_all_bulk $assignments = ' . var_export( $assignments, true ), 0 );
|
975 |
+
if ( ! empty( $assignments ) ) {
|
976 |
+
$results = SMC_Sync_Support::sync_all( $assignments );
|
977 |
+
$parent_count = $results['parent_count'];
|
978 |
+
$children_count = $results['children_count'];
|
979 |
+
} else {
|
980 |
+
$parent_count = 0;
|
981 |
+
$children_count = 0;
|
982 |
+
}
|
983 |
+
//error_log( __LINE__ . ' Smart_Media_Categories_Admin::action_sync_all_bulk $parent_count = ' . var_export( $parent_count, true ), 0 );
|
984 |
+
//error_log( __LINE__ . ' Smart_Media_Categories_Admin::action_sync_all_bulk $children_count = ' . var_export( $children_count, true ), 0 );
|
985 |
+
|
986 |
+
$view_args = $this->_view_query_args();
|
987 |
+
$view_args['updated'] = 1;
|
988 |
+
$view_args['smc_message'] = '107,' . $parent_count . ',' . $children_count;
|
989 |
+
|
990 |
+
//error_log( __LINE__ . ' Smart_Media_Categories_Admin::action_sync_all_bulk URL = ' . var_export( add_query_arg( $view_args, admin_url( 'edit.php' ) ), true ), 0 );
|
991 |
+
wp_redirect( add_query_arg( $view_args, admin_url( 'edit.php' ) ) );
|
992 |
+
exit();
|
993 |
+
}
|
994 |
+
|
995 |
+
/**
|
996 |
+
* Process the "Sync All Children" button in the Posts/All Posts extra navigation area
|
997 |
+
*
|
998 |
+
* @since 1.0.2
|
999 |
+
*
|
1000 |
+
* @return void exits after wp_redirect to All Pages submenu
|
1001 |
+
*/
|
1002 |
+
public function action_sync_all_filter() {
|
1003 |
+
global $wp_query;
|
1004 |
+
//error_log( __LINE__ . ' Smart_Media_Categories_Admin::action_sync_all_filter $_GET = ' . var_export( $_GET, true ), 0 );
|
1005 |
+
|
1006 |
+
$assignments = SMC_Sync_Support::get_posts_per_view( array( 'post_type' => $this->current_edit_type, 'smc_status' => 'unsync', 'fields' => 'all' ) );
|
1007 |
+
//error_log( __LINE__ . ' Smart_Media_Categories_Admin::action_sync_all_filter $assignments = ' . var_export( $assignments, true ), 0 );
|
1008 |
+
|
1009 |
+
$view_args = $this->_view_query_args();
|
1010 |
+
//error_log( __LINE__ . ' Smart_Media_Categories_Admin::action_sync_all_filter $view_args = ' . var_export( $view_args, true ), 0 );
|
1011 |
+
|
1012 |
+
$parent_count = 0;
|
1013 |
+
$children_count = 0;
|
1014 |
+
$paged_index = 1;
|
1015 |
+
$max_num_pages = 1;
|
1016 |
+
add_filter( 'posts_clauses', array( $this, 'filter_posts_clauses' ), 10, 2 );
|
1017 |
+
while ( $paged_index <= $max_num_pages ) {
|
1018 |
+
//error_log( __LINE__ . ' Smart_Media_Categories_Admin::action_sync_all_filter SYNCH $paged_index = ' . var_export( $paged_index, true ), 0 );
|
1019 |
+
$_GET['paged'] = $paged_index++;
|
1020 |
+
wp_edit_posts_query();
|
1021 |
+
//error_log( __LINE__ . ' Smart_Media_Categories_Admin::action_sync_all_filter $wp_query = ' . var_export( $wp_query, true ), 0 );
|
1022 |
+
$max_num_pages = $wp_query->max_num_pages;
|
1023 |
+
//error_log( __LINE__ . ' Smart_Media_Categories_Admin::action_sync_all_filter $max_num_pages = ' . var_export( $max_num_pages, true ), 0 );
|
1024 |
+
//error_log( __LINE__ . ' Smart_Media_Categories_Admin::action_sync_all_filter $wp_query->posts = ' . var_export( $wp_query->posts, true ), 0 );
|
1025 |
+
$unsync_assignments = array();
|
1026 |
+
foreach( $wp_query->posts as $post ) {
|
1027 |
+
//error_log( __LINE__ . ' Smart_Media_Categories_Admin::action_sync_all_filter TEST $post->ID = ' . var_export( $post->ID, true ), 0 );
|
1028 |
+
if ( array_key_exists( $post->ID, $assignments ) ) {
|
1029 |
+
//error_log( __LINE__ . ' Smart_Media_Categories_Admin::action_sync_all_filter SYNCH $post->ID = ' . var_export( $post->ID, true ), 0 );
|
1030 |
+
$unsync_assignments[ $post->ID ] = $assignments[ $post->ID ];
|
1031 |
+
}
|
1032 |
+
} // each post
|
1033 |
+
|
1034 |
+
//error_log( __LINE__ . ' Smart_Media_Categories_Admin::action_sync_all_filter unsync_assignments = ' . var_export( $unsync_assignments, true ), 0 );
|
1035 |
+
if ( ! empty( $unsync_assignments ) ) {
|
1036 |
+
$results = SMC_Sync_Support::sync_all( $unsync_assignments );
|
1037 |
+
$parent_count += $results['parent_count'];
|
1038 |
+
$children_count += $results['children_count'];
|
1039 |
+
}
|
1040 |
+
} // each page
|
1041 |
+
remove_filter( 'posts_clauses', array( $this, 'filter_posts_clauses' ), 10 );
|
1042 |
+
|
1043 |
+
$view_args['updated'] = 1;
|
1044 |
+
$view_args['smc_message'] = '106,' . $parent_count . ',' . $children_count;
|
1045 |
+
|
1046 |
+
//error_log( __LINE__ . ' Smart_Media_Categories_Admin::action_sync_all_filter URL = ' . var_export( add_query_arg( $view_args, admin_url( 'edit.php' ) ), true ), 0 );
|
1047 |
+
wp_redirect( add_query_arg( $view_args, admin_url( 'edit.php' ) ) );
|
1048 |
+
exit();
|
1049 |
+
}
|
1050 |
+
|
1051 |
+
/**
|
1052 |
+
* Maximum number of posts per "Select Parent" page.
|
1053 |
+
*
|
1054 |
+
* @since 1.0.1
|
1055 |
+
*
|
1056 |
+
* @var string
|
1057 |
+
*/
|
1058 |
+
const POSTS_PER_PAGE = "50";
|
1059 |
+
|
1060 |
+
/**
|
1061 |
+
* Ajax handler to fetch candidates for the "Select Parent" popup form
|
1062 |
+
*
|
1063 |
+
* Adapted from wp_ajax_find_posts in /wp-admin/includes/ajax-actions.php.
|
1064 |
+
* Adds filters for post type and pagination.
|
1065 |
+
*
|
1066 |
+
* @since 1.0.1
|
1067 |
+
*
|
1068 |
+
* @return void passes results to wp_send_json_success() for JSON encoding and transmission
|
1069 |
+
*/
|
1070 |
+
public function action_wp_ajax_smc_find_posts() {
|
1071 |
+
global $wpdb;
|
1072 |
+
//error_log( __LINE__ . ' Smart_Media_Categories_Admin::action_wp_ajax_smc_find_posts $_REQUEST = ' . var_export( $_REQUEST, true ), 0 );
|
1073 |
+
|
1074 |
+
check_ajax_referer( 'smc_find_posts' );
|
1075 |
+
|
1076 |
+
$post_types = get_post_types( array( 'public' => true ), 'objects' );
|
1077 |
+
unset( $post_types['attachment'] );
|
1078 |
+
|
1079 |
+
$s = stripslashes( $_REQUEST['smc_set_parent_search_text'] );
|
1080 |
+
$count = isset( $_REQUEST['smc_set_parent_count'] ) ? $_REQUEST['smc_set_parent_count'] : self::POSTS_PER_PAGE;
|
1081 |
+
$paged = isset( $_REQUEST['smc_set_parent_paged'] ) ? $_REQUEST['smc_set_parent_paged'] : '1';
|
1082 |
+
|
1083 |
+
$args = array(
|
1084 |
+
'post_type' => ( 'all' == $_REQUEST['smc_set_parent_post_type'] ) ? array_keys( $post_types ) : $_REQUEST['smc_set_parent_post_type'],
|
1085 |
+
'post_status' => 'any',
|
1086 |
+
'posts_per_page' => $count,
|
1087 |
+
'paged' => $paged,
|
1088 |
+
);
|
1089 |
+
|
1090 |
+
if ( '' !== $s )
|
1091 |
+
$args['s'] = $s;
|
1092 |
+
|
1093 |
+
//error_log( __LINE__ . ' Smart_Media_Categories_Admin::action_wp_ajax_smc_find_posts $args = ' . var_export( $args, true ), 0 );
|
1094 |
+
$posts = get_posts( $args );
|
1095 |
+
//error_log( __LINE__ . ' Smart_Media_Categories_Admin::action_wp_ajax_smc_find_posts $posts = ' . var_export( $posts, true ), 0 );
|
1096 |
+
|
1097 |
+
if ( ( ! $posts ) && $paged > 1 ) {
|
1098 |
+
$args['paged'] = $paged = 1;
|
1099 |
+
$posts = get_posts( $args );
|
1100 |
+
}
|
1101 |
+
|
1102 |
+
$found = count( $posts );
|
1103 |
+
|
1104 |
+
$html = '<input name="smc_set_parent_count" id="smc-set-parent-count" type="hidden" value="' . $count . "\">\n";
|
1105 |
+
$html .= '<input name="smc_set_parent_paged" id="smc-set-parent-paged" type="hidden" value="' . $paged . "\">\n";
|
1106 |
+
$html .= '<input name="smc_set_parent_found" id="smc-set-parent-found" type="hidden" value="' . $found . "\">\n";
|
1107 |
+
|
1108 |
+
$html .= '<table class="widefat"><thead><tr><th class="found-radio"><br /></th><th>'.__('Title').'</th><th class="no-break">'.__('Type').'</th><th class="no-break">'.__('Date').'</th><th class="no-break">'.__('Status').'</th></tr></thead><tbody>' . "\n";
|
1109 |
+
if ( $found ) {
|
1110 |
+
$alt = '';
|
1111 |
+
foreach ( $posts as $post ) {
|
1112 |
+
$title = trim( $post->post_title ) ? $post->post_title : __( '(no title)' );
|
1113 |
+
$alt = ( 'alternate' == $alt ) ? '' : 'alternate';
|
1114 |
+
|
1115 |
+
switch ( $post->post_status ) {
|
1116 |
+
case 'publish' :
|
1117 |
+
case 'private' :
|
1118 |
+
$stat = __('Published');
|
1119 |
+
break;
|
1120 |
+
case 'future' :
|
1121 |
+
$stat = __('Scheduled');
|
1122 |
+
break;
|
1123 |
+
case 'pending' :
|
1124 |
+
$stat = __('Pending Review');
|
1125 |
+
break;
|
1126 |
+
case 'draft' :
|
1127 |
+
$stat = __('Draft');
|
1128 |
+
break;
|
1129 |
+
}
|
1130 |
+
|
1131 |
+
if ( '0000-00-00 00:00:00' == $post->post_date ) {
|
1132 |
+
$time = '';
|
1133 |
+
} else {
|
1134 |
+
/* translators: date format in table columns, see http://php.net/date */
|
1135 |
+
$time = mysql2date(__('Y/m/d'), $post->post_date);
|
1136 |
+
}
|
1137 |
+
|
1138 |
+
$html .= '<tr class="' . trim( 'found-posts ' . $alt ) . '"><td class="found-radio"><input type="radio" id="found-'.$post->ID.'" name="found_post_id" value="' . esc_attr($post->ID) . '"></td>';
|
1139 |
+
$html .= '<td><label for="found-'.$post->ID.'">' . esc_html( $title ) . '</label></td><td class="no-break">' . esc_html( $post_types[$post->post_type]->labels->singular_name ) . '</td><td class="no-break">'.esc_html( $time ) . '</td><td class="no-break">' . esc_html( $stat ). ' </td></tr>' . "\n";
|
1140 |
+
} // foreach post
|
1141 |
+
} else {
|
1142 |
+
$html .= '<tr class="' . trim( 'found-posts ' ) . '"><td class="found-radio"> </td>';
|
1143 |
+
$html .= '<td colspan="4">No results found.</td></tr>' . "\n";
|
1144 |
+
}
|
1145 |
+
|
1146 |
+
$html .= "</tbody></table>\n";
|
1147 |
+
|
1148 |
+
//error_log( __LINE__ . ' Smart_Media_Categories_Admin::action_wp_ajax_smc_find_posts $html = ' . var_export( $html, true ), 0 );
|
1149 |
+
wp_send_json_success( $html );
|
1150 |
+
}
|
1151 |
+
|
1152 |
+
/**
|
1153 |
+
* Process the "Select Parent" popup form submission
|
1154 |
+
*
|
1155 |
+
* @since 1.0.0
|
1156 |
+
*
|
1157 |
+
*
|
1158 |
+
* @return void echoes HTML markup for the Attach popup
|
1159 |
+
*/
|
1160 |
+
public function action_wp_ajax_smc_posts_modal() {
|
1161 |
+
//error_log( __LINE__ . ' Smart_Media_Categories_Admin::action_wp_ajax_smc_posts_modal $_POST = ' . var_export( $_POST, true ), 0 );
|
1162 |
+
wp_redirect( admin_url( 'edit.php' ) . '?post_type=page' );
|
1163 |
+
exit();
|
1164 |
+
}
|
1165 |
+
|
1166 |
+
/**
|
1167 |
+
* Compose a Post Type Options list with current selection
|
1168 |
+
*
|
1169 |
+
* @since 1.0.1
|
1170 |
+
* @uses $mla_option_templates contains row and table templates
|
1171 |
+
*
|
1172 |
+
* @param string current selection or 'all' (default)
|
1173 |
+
*
|
1174 |
+
* @return string HTML markup with select field options
|
1175 |
+
*/
|
1176 |
+
private function _compose_post_type_select( $selection = 'all' ) {
|
1177 |
+
$option_template = ' <option %1$s value="%2$s">%3$s</option>' . "\n";
|
1178 |
+
$options = sprintf( $option_template, ( 'all' == $selection ) ? 'selected="selected"' : '', 'all', '— ' . __( 'All Post Types', 'media-library-assistant' ) . ' —' );
|
1179 |
+
|
1180 |
+
$post_types = get_post_types( array( 'public' => true ), 'objects' );
|
1181 |
+
unset( $post_types['attachment'] );
|
1182 |
+
|
1183 |
+
foreach ( $post_types as $key => $value ) {
|
1184 |
+
$options .= sprintf( $option_template, ( $key == $selection ) ? 'selected="selected"' : '', $key, $value->labels->name );
|
1185 |
+
} // foreach post_type
|
1186 |
+
|
1187 |
+
$select_template = ' <select name="smc_set_parent_post_type" id="smc-set-parent-post-type">' . "\n" . '%1$s' . "\n" . ' </select>'
|
1188 |
+
. "\n";
|
1189 |
+
return sprintf( $select_template, $options );
|
1190 |
+
} // _compose_post_type_select
|
1191 |
+
|
1192 |
+
/**
|
1193 |
+
* Compose the "Smart Media Categories" popup HTML elements
|
1194 |
+
*
|
1195 |
+
* @since 1.0.0
|
1196 |
+
*
|
1197 |
+
*
|
1198 |
+
* @return array HTML markup elements for the SMC popup; middle_column, right_column, parent_dropdown
|
1199 |
+
*/
|
1200 |
+
private function _build_smc_popup_form() {
|
1201 |
+
$results = array();
|
1202 |
+
|
1203 |
+
// Build separate arrays of hierarchical and flat taxonomies
|
1204 |
+
$taxonomies = get_object_taxonomies( 'attachment', 'objects' );
|
1205 |
+
$post_taxonomies = SMC_Settings_Support::smc_taxonomies();
|
1206 |
+
//error_log( __LINE__ . ' Smart_Media_Categories_Admin::_build_smc_popup_form post_taxonomies = ' . var_export( $post_taxonomies, true ), 0 );
|
1207 |
+
|
1208 |
+
$hierarchical_taxonomies = array();
|
1209 |
+
$flat_taxonomies = array();
|
1210 |
+
foreach ( $taxonomies as $tax_name => $tax_object ) {
|
1211 |
+
if ( $tax_object->show_ui && in_array( $tax_name, $post_taxonomies ) ) {
|
1212 |
+
if ( $tax_object->hierarchical && $tax_object->show_ui ) {
|
1213 |
+
$hierarchical_taxonomies[$tax_name] = $tax_object;
|
1214 |
+
} elseif ( $tax_object->show_ui ) {
|
1215 |
+
$flat_taxonomies[$tax_name] = $tax_object;
|
1216 |
+
}
|
1217 |
+
}
|
1218 |
+
}
|
1219 |
+
|
1220 |
+
// Build the middle column - hierarchical taxonomies
|
1221 |
+
$category_blocks = '';
|
1222 |
+
foreach ($hierarchical_taxonomies as $tax_slug => $tax_object ) {
|
1223 |
+
if ( current_user_can( $tax_object->cap->assign_terms ) ) {
|
1224 |
+
$tax_name = esc_html( $tax_object->labels->name );
|
1225 |
+
$tax_attr = esc_attr( $tax_slug );
|
1226 |
+
|
1227 |
+
ob_start();
|
1228 |
+
wp_terms_checklist( NULL, array( 'taxonomy' => $tax_slug ) );
|
1229 |
+
$tax_checklist = ob_get_clean();
|
1230 |
+
|
1231 |
+
ob_start();
|
1232 |
+
include( 'views/smc-sync-tax-options.php' );
|
1233 |
+
$taxonomy_options = ob_get_clean();
|
1234 |
+
|
1235 |
+
ob_start();
|
1236 |
+
include( 'views/smc-sync-category-block.php' );
|
1237 |
+
$category_block = ob_get_clean();
|
1238 |
+
|
1239 |
+
$category_blocks .= $category_block;
|
1240 |
+
} // current_user_can
|
1241 |
+
} // foreach $hierarchical_taxonomies
|
1242 |
+
|
1243 |
+
ob_start();
|
1244 |
+
include( 'views/smc-sync-category-fieldset.php' );
|
1245 |
+
$middle_column = ob_get_clean();
|
1246 |
+
|
1247 |
+
// Build the right column - flat taxonomies
|
1248 |
+
$tag_blocks = '';
|
1249 |
+
foreach ($flat_taxonomies as $tax_slug => $tax_object ) {
|
1250 |
+
if ( current_user_can( $tax_object->cap->assign_terms ) ) {
|
1251 |
+
$tax_name = esc_html( $tax_object->labels->name );
|
1252 |
+
$tax_attr = esc_attr( $tax_slug );
|
1253 |
+
|
1254 |
+
ob_start();
|
1255 |
+
include( 'views/smc-sync-tax-options.php' );
|
1256 |
+
$taxonomy_options = ob_get_clean();
|
1257 |
+
|
1258 |
+
ob_start();
|
1259 |
+
include( 'views/smc-sync-tag-block.php' );
|
1260 |
+
$tag_block = ob_get_clean();
|
1261 |
+
|
1262 |
+
$tag_blocks .= $tag_block;
|
1263 |
+
} // current_user_can
|
1264 |
+
} // foreach $flat_taxonomies
|
1265 |
+
|
1266 |
+
ob_start();
|
1267 |
+
include( 'views/smc-sync-tag-fieldset.php' );
|
1268 |
+
$right_column = ob_get_clean();
|
1269 |
+
|
1270 |
+
ob_start();
|
1271 |
+
include( 'views/smc-sync-div.php' );
|
1272 |
+
$results['sync_box'] = ob_get_clean();
|
1273 |
+
|
1274 |
+
return $results;
|
1275 |
+
}
|
1276 |
+
|
1277 |
+
/**
|
1278 |
+
* Add the "Select Parent" popup HTML to the Pages/All Pages submenu
|
1279 |
+
*
|
1280 |
+
* @since 1.0.0
|
1281 |
+
*
|
1282 |
+
*
|
1283 |
+
* @return void echoes HTML markup for the Attach popup
|
1284 |
+
*/
|
1285 |
+
public function action_posts_admin_footer() {
|
1286 |
+
$form_url = admin_url( 'edit.php' );
|
1287 |
+
$form_action = 'smc_posts_modal';
|
1288 |
+
$post_type_dropdown = $this->_compose_post_type_select();
|
1289 |
+
$count = self::POSTS_PER_PAGE;
|
1290 |
+
$paged = '1';
|
1291 |
+
$found = '0';
|
1292 |
+
extract( $this->_build_smc_popup_form() );
|
1293 |
+
include_once( 'views/smc-posts-modal-form.php' );
|
1294 |
+
}
|
1295 |
+
|
1296 |
+
/**
|
1297 |
+
* Add the "Select Parent" popup HTML to the Pages/All Pages submenu
|
1298 |
+
*
|
1299 |
+
* @since 1.0.0
|
1300 |
+
*
|
1301 |
+
*
|
1302 |
+
* @return void echoes HTML markup for the Attach popup
|
1303 |
+
*/
|
1304 |
+
public function action_pages_admin_footer() {
|
1305 |
+
$form_url = admin_url( 'edit.php' ) . '?post_type=page';
|
1306 |
+
$form_action = 'smc_pages_modal';
|
1307 |
+
$post_type_dropdown = $this->_compose_post_type_select();
|
1308 |
+
$count = self::POSTS_PER_PAGE;
|
1309 |
+
$paged = '1';
|
1310 |
+
$found = '0';
|
1311 |
+
$sync_box = '';
|
1312 |
+
include_once( 'views/smc-posts-modal-form.php' );
|
1313 |
+
}
|
1314 |
+
}
|
1315 |
+
?>
|
examples/plugins/smart-media-categories/admin/includes/class-smc-automatic-support.php
ADDED
@@ -0,0 +1,999 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Support functions for the SMC automatic actions.
|
4 |
+
*
|
5 |
+
* @package Smart_Media_Categories_Admin
|
6 |
+
* @author David Lingren <dlingren@comcast.net>
|
7 |
+
* @license GPL-2.0+
|
8 |
+
* @link @TODO http://example.com
|
9 |
+
* @copyright 2014 David Lingren
|
10 |
+
*/
|
11 |
+
|
12 |
+
/**
|
13 |
+
* This support class provides functions to implement the "automatic actions"
|
14 |
+
*
|
15 |
+
* In the current version all of the support functions are static, and there is
|
16 |
+
* no need to create a new instance of the class.
|
17 |
+
*
|
18 |
+
* @package Smart_Media_Categories_Admin
|
19 |
+
* @author David Lingren <dlingren@comcast.net>
|
20 |
+
*/
|
21 |
+
class SMC_Automatic_Support {
|
22 |
+
/**
|
23 |
+
* Option definitions
|
24 |
+
*
|
25 |
+
* Defined NULL and initialized at runtime for I18N support.
|
26 |
+
*
|
27 |
+
* @since 1.0.6
|
28 |
+
*
|
29 |
+
* @var array
|
30 |
+
*/
|
31 |
+
// protected static $option_definitions = NULL;
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Initialize the hooks required for automatic actions
|
35 |
+
*
|
36 |
+
* @since 1.0.6
|
37 |
+
*
|
38 |
+
* @return void
|
39 |
+
*/
|
40 |
+
public static function initialize() {
|
41 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::initialize() $_REQUEST = ' . var_export( $_REQUEST, true), 0 );
|
42 |
+
|
43 |
+
add_filter( 'wp_handle_upload_prefilter', 'SMC_Automatic_Support::filter_wp_handle_upload_prefilter', 0x7FFFFFFE, 1 );
|
44 |
+
add_filter( 'wp_handle_upload', 'SMC_Automatic_Support::filter_wp_handle_upload_filter', 0x7FFFFFFE, 2 );
|
45 |
+
|
46 |
+
add_action( 'pre_post_update', 'SMC_Automatic_Support::action_pre_post_update', 0x7FFFFFFE, 2 );
|
47 |
+
add_action( 'edit_attachment', 'SMC_Automatic_Support::action_edit_attachment', 0x7FFFFFFE, 1 );
|
48 |
+
add_action( 'add_attachment', 'SMC_Automatic_Support::action_add_attachment', 0x7FFFFFFE, 1 );
|
49 |
+
add_action( 'post_updated', 'SMC_Automatic_Support::action_post_updated', 0x7FFFFFFE, 3 );
|
50 |
+
|
51 |
+
add_action( 'add_post_meta', 'SMC_Automatic_Support::action_add_post_meta', 0x7FFFFFFE, 3 );
|
52 |
+
add_action( 'added_post_meta', 'SMC_Automatic_Support::action_added_post_meta', 0x7FFFFFFE, 4 );
|
53 |
+
add_action( 'update_post_meta', 'SMC_Automatic_Support::action_update_post_meta', 0x7FFFFFFE, 4 );
|
54 |
+
add_action( 'updated_post_meta', 'SMC_Automatic_Support::action_updated_post_meta', 0x7FFFFFFE, 4 );
|
55 |
+
add_action( 'delete_post_meta', 'SMC_Automatic_Support::action_delete_post_meta', 0x7FFFFFFE, 4 );
|
56 |
+
add_action( 'deleted_post_meta', 'SMC_Automatic_Support::action_deleted_post_meta', 0x7FFFFFFE, 4 );
|
57 |
+
|
58 |
+
add_action( 'set_object_terms', 'SMC_Automatic_Support::action_set_object_terms', 0x7FFFFFFE, 6 );
|
59 |
+
|
60 |
+
add_filter( 'wp_update_attachment_metadata', 'SMC_Automatic_Support::filter_wp_update_attachment_metadata', 0x7FFFFFFE, 2 );
|
61 |
+
}
|
62 |
+
|
63 |
+
/**
|
64 |
+
* Examine or alter the filename before the file is made permanent
|
65 |
+
*
|
66 |
+
* Called from /wp-admin/includes/file.php, function _wp_handle_upload.
|
67 |
+
*
|
68 |
+
* @since 1.0.6
|
69 |
+
*
|
70 |
+
* @param array $file An array of data for a single file.
|
71 |
+
*
|
72 |
+
* @return array updated file parameters
|
73 |
+
*/
|
74 |
+
public static function filter_wp_handle_upload_prefilter( $file ) {
|
75 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::filter_wp_handle_upload_prefilter $file = ' . var_export( $file, true), 0 );
|
76 |
+
|
77 |
+
return $file;
|
78 |
+
} // filter_wp_handle_upload_prefilter
|
79 |
+
|
80 |
+
/**
|
81 |
+
* Filter the data array for the uploaded file.
|
82 |
+
*
|
83 |
+
* Called from /wp-admin/includes/file.php, function _wp_handle_upload.
|
84 |
+
*
|
85 |
+
* @since 1.0.6
|
86 |
+
*
|
87 |
+
* @param array {
|
88 |
+
* Array of upload data.
|
89 |
+
*
|
90 |
+
* @type string $file Filename of the newly-uploaded file.
|
91 |
+
* @type string $url URL of the uploaded file.
|
92 |
+
* @type string $type File type.
|
93 |
+
* }
|
94 |
+
* @param string The type of upload action. Values include 'upload' or 'sideload'.
|
95 |
+
*
|
96 |
+
* @return array updated file parameters
|
97 |
+
*/
|
98 |
+
public static function filter_wp_handle_upload_filter( $upload, $context ) {
|
99 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::filter_wp_handle_upload_filter $upload = ' . var_export( $upload, true), 0 );
|
100 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::filter_wp_handle_upload_filter $context = ' . var_export( $context, true), 0 );
|
101 |
+
|
102 |
+
return $upload;
|
103 |
+
} // filter_wp_handle_upload_filter
|
104 |
+
|
105 |
+
/**
|
106 |
+
* Fires immediately before an existing post/attachment is updated in the database
|
107 |
+
*
|
108 |
+
* Called from /wp-includes/post.php, function wp_insert_post
|
109 |
+
*
|
110 |
+
* @since 1.0.6
|
111 |
+
*
|
112 |
+
* @param integer ID of updated attachment
|
113 |
+
* @param array Array of unslashed post data
|
114 |
+
*
|
115 |
+
* @return void
|
116 |
+
*/
|
117 |
+
public static function action_pre_post_update( $post_id, $data ) {
|
118 |
+
//error_log( __LINE__ . " SMC_Automatic_Support::action_pre_post_update( {$post_id} ) \$data = " . var_export( $data, true), 0 );
|
119 |
+
//error_log( __LINE__ . " SMC_Automatic_Support::action_pre_post_update( {$post_id} ) \$post = " . var_export(get_post( $post_id ), true), 0 );
|
120 |
+
|
121 |
+
if ( (boolean) SMC_Settings_Support::get_option( 'update_post_terms' ) ) {
|
122 |
+
SMC_Automatic_support::rule_update_post_terms( $post_id, NULL, NULL, NULL, 'before' );
|
123 |
+
}
|
124 |
+
|
125 |
+
if ( (boolean) SMC_Settings_Support::get_option( 'attach_orphan' ) ) {
|
126 |
+
SMC_Automatic_support::rule_attach_orphan( $data['post_parent'], $post_id, true );
|
127 |
+
}
|
128 |
+
|
129 |
+
if ( (boolean) SMC_Settings_Support::get_option( 'reattach_item' ) ) {
|
130 |
+
SMC_Automatic_support::rule_reattach_item( $data['post_parent'], $post_id, true );
|
131 |
+
}
|
132 |
+
} // action_pre_post_update
|
133 |
+
|
134 |
+
/**
|
135 |
+
* Fires once an existing attachment has been updated
|
136 |
+
*
|
137 |
+
* Called from /wp-includes/post.php, function wp_insert_post
|
138 |
+
*
|
139 |
+
* @since 1.0.6
|
140 |
+
*
|
141 |
+
* @param integer ID of updated attachment
|
142 |
+
*
|
143 |
+
* @return void
|
144 |
+
*/
|
145 |
+
public static function action_edit_attachment( $post_id ) {
|
146 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::action_edit_attachment $post_id = ' . var_export( $post_id, true), 0 );
|
147 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::action_edit_attachment $post = ' . var_export( get_post( $post_id ), true), 0 );
|
148 |
+
|
149 |
+
if ( (boolean) SMC_Settings_Support::get_option( 'attach_orphan' ) ) {
|
150 |
+
SMC_Automatic_support::rule_attach_orphan( NULL, $post_id, false );
|
151 |
+
}
|
152 |
+
|
153 |
+
if ( (boolean) SMC_Settings_Support::get_option( 'reattach_item' ) ) {
|
154 |
+
SMC_Automatic_support::rule_reattach_item( NULL, $post_id, false );
|
155 |
+
}
|
156 |
+
} // action_edit_attachment
|
157 |
+
|
158 |
+
/**
|
159 |
+
* Fires once an attachment has been added
|
160 |
+
*
|
161 |
+
* Called from /wp-includes/post.php, function wp_insert_post
|
162 |
+
*
|
163 |
+
* @since 1.0.6
|
164 |
+
*
|
165 |
+
* @param integer ID of just-inserted attachment
|
166 |
+
*
|
167 |
+
* @return void
|
168 |
+
*/
|
169 |
+
public static function action_add_attachment( $post_id ) {
|
170 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::action_add_attachment $post_id = ' . var_export( $post_id, true), 0 );
|
171 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::action_add_attachment $post = ' . var_export( get_post( $post_id ), true), 0 );
|
172 |
+
|
173 |
+
if ( (boolean) SMC_Settings_Support::get_option( 'upload_item' ) ) {
|
174 |
+
SMC_Automatic_support::rule_upload_item( $post_id );
|
175 |
+
}
|
176 |
+
} // action_add_attachment
|
177 |
+
|
178 |
+
/**
|
179 |
+
* Fires once an existing post has been updated.
|
180 |
+
*
|
181 |
+
* Called from /wp-includes/post.php, function wp_insert_post
|
182 |
+
*
|
183 |
+
* @since 1.0.6
|
184 |
+
*
|
185 |
+
* @param integer Post ID.
|
186 |
+
* @param WP_Post Post object following the update.
|
187 |
+
* @param WP_Post Post object before the update.
|
188 |
+
*
|
189 |
+
* @return void
|
190 |
+
*/
|
191 |
+
public static function action_post_updated( $post_id, $post_after, $post_before ) {
|
192 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::action_post_updated $post_id = ' . var_export( $post_id, true), 0 );
|
193 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::action_post_updated $post_after = ' . var_export( $post_after, true), 0 );
|
194 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::action_post_updated $post_before = ' . var_export( $post_before, true), 0 );
|
195 |
+
|
196 |
+
if ( (boolean) SMC_Settings_Support::get_option( 'insert_orphan' ) ) {
|
197 |
+
$inserted_items = SMC_Automatic_support::compare_inserted_items( $post_after, $post_before );
|
198 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::action_post_updated orphan $inserted_items = ' . var_export( $inserted_items, true), 0 );
|
199 |
+
SMC_Automatic_support::rule_insert_orphan( $post_after, $post_before, $inserted_items );
|
200 |
+
}
|
201 |
+
|
202 |
+
if ( (boolean) SMC_Settings_Support::get_option( 'insert_attached' ) ) {
|
203 |
+
if ( empty( $inserted_items ) ) {
|
204 |
+
$inserted_items = SMC_Automatic_support::compare_inserted_items( $post_after, $post_before );
|
205 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::action_post_updated attached $inserted_items = ' . var_export( $inserted_items, true), 0 );
|
206 |
+
}
|
207 |
+
|
208 |
+
SMC_Automatic_support::rule_insert_attached( $post_after, $post_before, $inserted_items );
|
209 |
+
}
|
210 |
+
|
211 |
+
if ( (boolean) SMC_Settings_Support::get_option( 'update_post_terms' ) ) {
|
212 |
+
SMC_Automatic_support::rule_update_post_terms( $post_id, NULL, NULL, NULL, 'after' );
|
213 |
+
}
|
214 |
+
} // action_post_updated
|
215 |
+
|
216 |
+
/**
|
217 |
+
* Fires immediately before meta of a specific type is added
|
218 |
+
*
|
219 |
+
* Called from /wp-includes/meta.php, function add_metadata
|
220 |
+
*
|
221 |
+
* @since 1.0.6
|
222 |
+
*
|
223 |
+
* @param int $object_id Object ID.
|
224 |
+
* @param string $meta_key Meta key.
|
225 |
+
* @param mixed $meta_value Meta value.
|
226 |
+
*
|
227 |
+
* @return void
|
228 |
+
*/
|
229 |
+
public static function action_add_post_meta( $object_id, $meta_key, $meta_value ) {
|
230 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::action_add_post_meta $object_id = ' . var_export( $object_id, true), 0 );
|
231 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::action_add_post_meta $meta_key = ' . var_export( $meta_key, true), 0 );
|
232 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::action_add_post_meta $meta_value = ' . var_export( $meta_value, true), 0 );
|
233 |
+
|
234 |
+
if ( ( '_thumbnail_id' == $meta_key ) && (boolean) SMC_Settings_Support::get_option( 'remove_feature' ) ) {
|
235 |
+
SMC_Automatic_support::rule_remove_feature( $object_id, $meta_value, true );
|
236 |
+
}
|
237 |
+
} // action_add_post_meta
|
238 |
+
|
239 |
+
/**
|
240 |
+
* Fires immediately after meta of a specific type is added
|
241 |
+
*
|
242 |
+
* Called from /wp-includes/meta.php, function add_metadata
|
243 |
+
*
|
244 |
+
* @since 1.0.6
|
245 |
+
*
|
246 |
+
* @param int $mid The meta ID after successful update.
|
247 |
+
* @param int $object_id Object ID.
|
248 |
+
* @param string $meta_key Meta key.
|
249 |
+
* @param mixed $meta_value Meta value.
|
250 |
+
*
|
251 |
+
* @return void
|
252 |
+
*/
|
253 |
+
public static function action_added_post_meta( $mid, $object_id, $meta_key, $meta_value ) {
|
254 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::action_added_post_meta $mid = ' . var_export( $mid, true), 0 );
|
255 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::action_added_post_meta $object_id = ' . var_export( $object_id, true), 0 );
|
256 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::action_added_post_meta $meta_key = ' . var_export( $meta_key, true), 0 );
|
257 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::action_added_post_meta $meta_value = ' . var_export( $meta_value, true), 0 );
|
258 |
+
|
259 |
+
if ( '_thumbnail_id' == $meta_key ) {
|
260 |
+
if ( (boolean) SMC_Settings_Support::get_option( 'set_feature' ) ) {
|
261 |
+
SMC_Automatic_support::rule_set_feature( $object_id, $meta_value );
|
262 |
+
}
|
263 |
+
|
264 |
+
if ( (boolean) SMC_Settings_Support::get_option( 'reattach_feature' ) ) {
|
265 |
+
SMC_Automatic_support::rule_reattach_feature( $object_id, $meta_value );
|
266 |
+
}
|
267 |
+
|
268 |
+
if ( (boolean) SMC_Settings_Support::get_option( 'remove_feature' ) ) {
|
269 |
+
SMC_Automatic_support::rule_remove_feature( $object_id, $meta_value, false );
|
270 |
+
}
|
271 |
+
}
|
272 |
+
} // action_added_post_meta
|
273 |
+
|
274 |
+
/**
|
275 |
+
* Fires immediately before updating metadata of a specific type.
|
276 |
+
*
|
277 |
+
* Called from /wp-includes/meta.php, function update_metadata
|
278 |
+
*
|
279 |
+
* @since 1.0.6
|
280 |
+
*
|
281 |
+
* @param int $meta_id ID of metadata entry to update.
|
282 |
+
* @param int $object_id Object ID.
|
283 |
+
* @param string $meta_key Meta key.
|
284 |
+
* @param mixed $meta_value Meta value.
|
285 |
+
*
|
286 |
+
* @return void
|
287 |
+
*/
|
288 |
+
public static function action_update_post_meta( $meta_id, $object_id, $meta_key, $meta_value ) {
|
289 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::action_update_post_meta $meta_id = ' . var_export( $meta_id, true), 0 );
|
290 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::action_update_post_meta $object_id = ' . var_export( $object_id, true), 0 );
|
291 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::action_update_post_meta $meta_key = ' . var_export( $meta_key, true), 0 );
|
292 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::action_update_post_meta $meta_value = ' . var_export( $meta_value, true), 0 );
|
293 |
+
|
294 |
+
if ( ( '_thumbnail_id' == $meta_key ) && (boolean) SMC_Settings_Support::get_option( 'remove_feature' ) ) {
|
295 |
+
SMC_Automatic_support::rule_remove_feature( $object_id, $meta_value, true );
|
296 |
+
}
|
297 |
+
} // action_update_post_meta
|
298 |
+
|
299 |
+
/**
|
300 |
+
* Fires immediately after updating metadata of a specific type.
|
301 |
+
*
|
302 |
+
* Called from /wp-includes/meta.php, function update_metadata
|
303 |
+
*
|
304 |
+
* @since 1.0.6
|
305 |
+
*
|
306 |
+
* @param int $meta_id ID of updated metadata entry.
|
307 |
+
* @param int $object_id Object ID.
|
308 |
+
* @param string $meta_key Meta key.
|
309 |
+
* @param mixed $meta_value Meta value.
|
310 |
+
*
|
311 |
+
* @return void
|
312 |
+
*/
|
313 |
+
public static function action_updated_post_meta( $meta_id, $object_id, $meta_key, $meta_value ) {
|
314 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::action_updated_post_meta $meta_id = ' . var_export( $meta_id, true), 0 );
|
315 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::action_updated_post_meta $object_id = ' . var_export( $object_id, true), 0 );
|
316 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::action_updated_post_meta $meta_key = ' . var_export( $meta_key, true), 0 );
|
317 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::action_updated_post_meta $meta_value = ' . var_export( $meta_value, true), 0 );
|
318 |
+
|
319 |
+
if ( '_thumbnail_id' == $meta_key ) {
|
320 |
+
if ( (boolean) SMC_Settings_Support::get_option( 'set_feature' ) ) {
|
321 |
+
SMC_Automatic_support::rule_set_feature( $object_id, $meta_value );
|
322 |
+
}
|
323 |
+
|
324 |
+
if ( (boolean) SMC_Settings_Support::get_option( 'reattach_feature' ) ) {
|
325 |
+
SMC_Automatic_support::rule_reattach_feature( $object_id, $meta_value );
|
326 |
+
}
|
327 |
+
|
328 |
+
if ( (boolean) SMC_Settings_Support::get_option( 'remove_feature' ) ) {
|
329 |
+
SMC_Automatic_support::rule_remove_feature( $object_id, $meta_value, false );
|
330 |
+
}
|
331 |
+
}
|
332 |
+
} // action_updated_post_meta
|
333 |
+
|
334 |
+
/**
|
335 |
+
* Fires immediately before deleting metadata of a specific type.
|
336 |
+
*
|
337 |
+
* Called from /wp-includes/meta.php, function delete_metadata
|
338 |
+
*
|
339 |
+
* @since 1.0.6
|
340 |
+
*
|
341 |
+
* @param array $meta_ids An array of metadata entry IDs to delete.
|
342 |
+
* @param int $object_id Object ID.
|
343 |
+
* @param string $meta_key Meta key.
|
344 |
+
* @param mixed $meta_value Meta value.
|
345 |
+
*
|
346 |
+
* @return void
|
347 |
+
*/
|
348 |
+
public static function action_delete_post_meta( $meta_ids, $object_id, $meta_key, $meta_value ) {
|
349 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::action_delete_post_meta $meta_ids = ' . var_export( $meta_ids, true), 0 );
|
350 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::action_delete_post_meta $object_id = ' . var_export( $object_id, true), 0 );
|
351 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::action_delete_post_meta $meta_key = ' . var_export( $meta_key, true), 0 );
|
352 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::action_delete_post_meta $meta_value = ' . var_export( $meta_value, true), 0 );
|
353 |
+
} // action_delete_post_meta
|
354 |
+
|
355 |
+
/**
|
356 |
+
* Fires immediately after updating metadata of a specific type.
|
357 |
+
*
|
358 |
+
* Called from /wp-includes/meta.php, function delete_metadata
|
359 |
+
*
|
360 |
+
* @since 1.0.6
|
361 |
+
*
|
362 |
+
* @param array $meta_ids An array of deleted metadata entry IDs.
|
363 |
+
* @param int $object_id Object ID.
|
364 |
+
* @param string $meta_key Meta key.
|
365 |
+
* @param mixed $meta_value Meta value.
|
366 |
+
*
|
367 |
+
* @return void
|
368 |
+
*/
|
369 |
+
public static function action_deleted_post_meta( $meta_ids, $object_id, $meta_key, $meta_value ) {
|
370 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::action_deleted_post_meta $meta_ids = ' . var_export( $meta_ids, true), 0 );
|
371 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::action_deleted_post_meta $object_id = ' . var_export( $object_id, true), 0 );
|
372 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::action_deleted_post_meta $meta_key = ' . var_export( $meta_key, true), 0 );
|
373 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::action_deleted_post_meta $meta_value = ' . var_export( $meta_value, true), 0 );
|
374 |
+
} // action_updated_post_meta
|
375 |
+
|
376 |
+
/**
|
377 |
+
* Fires after an object's terms have been set.
|
378 |
+
*
|
379 |
+
* Called from /wp-includes/taxonomy.php, function wp_set_object_terms
|
380 |
+
*
|
381 |
+
* @since 1.0.6
|
382 |
+
*
|
383 |
+
* @param int $object_id Object ID.
|
384 |
+
* @param array $terms An array of object terms.
|
385 |
+
* @param array $tt_ids An array of term taxonomy IDs.
|
386 |
+
* @param string $taxonomy Taxonomy slug.
|
387 |
+
* @param bool $append Whether to append new terms to the old terms.
|
388 |
+
* @param array $old_tt_ids Old array of term taxonomy IDs.
|
389 |
+
*/
|
390 |
+
public static function action_set_object_terms( $object_id, $terms, $tt_ids, $taxonomy, $append, $old_tt_ids ) {
|
391 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::action_set_object_terms $object_id = ' . var_export( $object_id, true), 0 );
|
392 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::action_set_object_terms $terms = ' . var_export( $terms, true), 0 );
|
393 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::action_set_object_terms $tt_ids = ' . var_export( $tt_ids, true), 0 );
|
394 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::action_set_object_terms $taxonomy = ' . var_export( $taxonomy, true), 0 );
|
395 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::action_set_object_terms $append = ' . var_export( $append, true), 0 );
|
396 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::action_set_object_terms $old_tt_ids = ' . var_export( $old_tt_ids, true), 0 );
|
397 |
+
|
398 |
+
if ( (boolean) SMC_Settings_Support::get_option( 'update_post_terms' ) ) {
|
399 |
+
SMC_Automatic_support::rule_update_post_terms( $object_id, $taxonomy, $tt_ids, $old_tt_ids, 'during' );
|
400 |
+
}
|
401 |
+
} // action_set_object_terms
|
402 |
+
|
403 |
+
/**
|
404 |
+
* Filter the updated attachment meta data
|
405 |
+
*
|
406 |
+
* Called from /wp-includes/post.php, function wp_update_attachment_metadata
|
407 |
+
*
|
408 |
+
* This filter could test the $post_id variable set by action_add_attachment
|
409 |
+
* to separate new additions from metadata updates.
|
410 |
+
*
|
411 |
+
* @since 1.0.6
|
412 |
+
*
|
413 |
+
* @param array Attachment metadata for just-inserted attachment
|
414 |
+
* @param integer ID of just-inserted attachment
|
415 |
+
*
|
416 |
+
* @return array Updated attachment metadata
|
417 |
+
*/
|
418 |
+
public static function filter_wp_update_attachment_metadata( $data, $post_id ) {
|
419 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::filter_wp_update_attachment_metadata $data = ' . var_export( $data, true), 0 );
|
420 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::filter_wp_update_attachment_metadata $post_id = ' . var_export( $post_id, true), 0 );
|
421 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::filter_wp_update_attachment_metadata $post = ' . var_export( get_post( $post_id ), true), 0 );
|
422 |
+
|
423 |
+
return $data;
|
424 |
+
} // filter_wp_update_attachment_metadata
|
425 |
+
|
426 |
+
/**
|
427 |
+
* Implements item uploaded to a post rule
|
428 |
+
*
|
429 |
+
* 1. When an item is uploaded to a Post (post_type = 'post'), the item inherits the parent's terms.
|
430 |
+
*
|
431 |
+
* @since 1.0.6
|
432 |
+
*
|
433 |
+
* @param integer attachment/child ID.
|
434 |
+
*
|
435 |
+
* @return void
|
436 |
+
*/
|
437 |
+
private static function rule_upload_item( $post_id ) {
|
438 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::rule_upload_item $post_id = ' . var_export( $post_id, true), 0 );
|
439 |
+
|
440 |
+
$child = get_post( $post_id );
|
441 |
+
|
442 |
+
// Is it a child?
|
443 |
+
if ( ( 'attachment' == $child->post_type ) && ( 0 < $child->post_parent ) ) {
|
444 |
+
$parent = get_post( $child->post_parent );
|
445 |
+
|
446 |
+
// Is it a child of a supported Post Type?
|
447 |
+
if ( SMC_Settings_Support::is_smc_post_type( $parent->post_type ) ) {
|
448 |
+
$results = SMC_Sync_Support::sync_children_to_parent( $child->post_parent, $post_id );
|
449 |
+
} // Post child
|
450 |
+
} // attached item
|
451 |
+
} // rule_upload_item
|
452 |
+
|
453 |
+
/**
|
454 |
+
* Returns attachment IDs for items in post content
|
455 |
+
*
|
456 |
+
* @since 1.0.7
|
457 |
+
*
|
458 |
+
* @param string Post content.
|
459 |
+
*
|
460 |
+
* @return array items in content; ( [ID] => 'base file' )
|
461 |
+
*/
|
462 |
+
private static function find_inserted_items( $content ) {
|
463 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::find_inserted_items $content = ' . var_export( $content, true), 0 );
|
464 |
+
global $wpdb;
|
465 |
+
static $upload_dir = NULL, $base_url = NULL;
|
466 |
+
|
467 |
+
$results = array();
|
468 |
+
|
469 |
+
if ( is_null( $upload_dir ) ) {
|
470 |
+
$upload_dir = wp_upload_dir();
|
471 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::find_inserted_items $upload_dir = ' . var_export( $upload_dir, true), 0 );
|
472 |
+
$base_url = $upload_dir['url'] . '/';
|
473 |
+
}
|
474 |
+
|
475 |
+
$match_count = preg_match_all( '/<img src="([^"]*)"/', $content, $matches, PREG_OFFSET_CAPTURE );
|
476 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::find_inserted_items $match_count = ' . var_export( $match_count, true), 0 );
|
477 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::find_inserted_items $matches = ' . var_export( $matches, true), 0 );
|
478 |
+
if ( ( $match_count == false ) || ( $match_count == 0 ) ) {
|
479 |
+
return $results;
|
480 |
+
}
|
481 |
+
|
482 |
+
foreach ( $matches[1] as $match ) {
|
483 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::find_inserted_items $match = ' . var_export( $match, true), 0 );
|
484 |
+
// Is it in our uploads directory?
|
485 |
+
if ( false === strpos( $match[0], $base_url ) ) {
|
486 |
+
continue;
|
487 |
+
}
|
488 |
+
|
489 |
+
$base_file = str_replace( $base_url, '', $match[0] );
|
490 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::find_inserted_items $base_file = ' . var_export( $base_file, true), 0 );
|
491 |
+
// Strip out intermediate sizes
|
492 |
+
$match_count = preg_match( '/(-\d+x\d+)\./', $base_file, $matches );
|
493 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::find_inserted_items base_file $match_count = ' . var_export( $match_count, true), 0 );
|
494 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::find_inserted_items base_file $matches = ' . var_export( $matches, true), 0 );
|
495 |
+
if ( 1 == $match_count ) {
|
496 |
+
$base_file = str_replace( $matches[1], '', $base_file );
|
497 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::find_inserted_items new $base_file = ' . var_export( $base_file, true), 0 );
|
498 |
+
}
|
499 |
+
|
500 |
+
// look for an attachment match
|
501 |
+
$sql = "SELECT post_id FROM $wpdb->postmeta
|
502 |
+
WHERE meta_key = '_wp_attached_file' AND meta_value = '{$base_file}' LIMIT 1";
|
503 |
+
$assignments = $wpdb->get_col( $sql );
|
504 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::find_inserted_items $assignments = ' . var_export( $assignments, true), 0 );
|
505 |
+
if ( isset( $assignments[0] ) ) {
|
506 |
+
$results[ absint( $assignments[0] ) ] = $base_file;
|
507 |
+
}
|
508 |
+
} // each URL
|
509 |
+
|
510 |
+
asort( $results );
|
511 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::find_inserted_items $results = ' . var_export( $results, true), 0 );
|
512 |
+
return $results;
|
513 |
+
} // find_inserted_items
|
514 |
+
|
515 |
+
/**
|
516 |
+
* Finds the "inserted items" differences before/after a post update
|
517 |
+
*
|
518 |
+
* @since 1.0.7
|
519 |
+
*
|
520 |
+
* @param WP_Post $post_after Post object following the update.
|
521 |
+
* @param WP_Post $post_before Post object before the update.
|
522 |
+
*
|
523 |
+
* @return array ( 'inserts_changed' => false, 'inserts_before' => array(), 'inserts_after' => array(), 'inserts_added' => array() )
|
524 |
+
*/
|
525 |
+
private static function compare_inserted_items( $post_after, $post_before ) {
|
526 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::compare_inserted_items $post_after = ' . var_export( $post_after, true), 0 );
|
527 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::compare_inserted_items $post_before = ' . var_export( $post_before, true), 0 );
|
528 |
+
$results = array( 'inserts_changed' => false, 'inserts_before' => array(), 'inserts_after' => array(), 'inserts_added' => array() );
|
529 |
+
|
530 |
+
if ( isset( $post_before->post_content ) ) {
|
531 |
+
$results['inserts_before'] = SMC_Automatic_Support::find_inserted_items( $post_before->post_content );
|
532 |
+
}
|
533 |
+
|
534 |
+
if ( isset( $post_after->post_content ) ) {
|
535 |
+
$results['inserts_after'] = SMC_Automatic_Support::find_inserted_items( $post_after->post_content );
|
536 |
+
}
|
537 |
+
|
538 |
+
$results['inserts_changed'] = $results['inserts_before'] != $results['inserts_after'];
|
539 |
+
if ( $results['inserts_changed'] ) {
|
540 |
+
$results['inserts_added'] = array_diff_assoc( $results['inserts_after'], $results['inserts_before'] );
|
541 |
+
}
|
542 |
+
|
543 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::compare_inserted_items $results = ' . var_export( $results, true), 0 );
|
544 |
+
return $results;
|
545 |
+
} // compare_inserted_items
|
546 |
+
|
547 |
+
/**
|
548 |
+
* Implements insert an orphan in a post rule
|
549 |
+
*
|
550 |
+
* 2. Inserting an orphan in a Post will attach it to the Post and assign its terms.
|
551 |
+
*
|
552 |
+
* @since 1.0.6
|
553 |
+
*
|
554 |
+
* @param WP_Post Post object following the update.
|
555 |
+
* @param WP_Post Post object before the update.
|
556 |
+
* @param array ( 'inserts_changed' => false, 'inserts_before' => array(), 'inserts_after' => array(), 'inserts_added' => array() )
|
557 |
+
*
|
558 |
+
* @return void
|
559 |
+
*/
|
560 |
+
private static function rule_insert_orphan( $post_after, $post_before, $inserted_items ) {
|
561 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::rule_insert_orphan $post_after = ' . var_export( $post_after, true), 0 );
|
562 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::rule_insert_orphan $post_before = ' . var_export( $post_before, true), 0 );
|
563 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::rule_insert_orphan $inserted_items = ' . var_export( $inserted_items, true), 0 );
|
564 |
+
global $wpdb;
|
565 |
+
|
566 |
+
// Make sure its a supported Post Type and published Post
|
567 |
+
if ( ( !SMC_Settings_Support::is_smc_post_type( $post_after->post_type ) ) || ( 'publish' != $post_after->post_status ) ) {
|
568 |
+
return;
|
569 |
+
}
|
570 |
+
|
571 |
+
// If this is the "Publish" action, evaluate all items as new inserts
|
572 |
+
if ( 'publish' != $post_before->post_status ) {
|
573 |
+
$inserted_items['inserts_added'] = $inserted_items['inserts_after'];
|
574 |
+
}
|
575 |
+
|
576 |
+
$parent_id = $post_after->ID;
|
577 |
+
|
578 |
+
// Evaluate new inserts
|
579 |
+
$orphans = array();
|
580 |
+
foreach ( $inserted_items['inserts_added'] as $insert_id => $insert ) {
|
581 |
+
$item = get_post( $insert_id );
|
582 |
+
|
583 |
+
// Make sure its an Orphan
|
584 |
+
if ( 0 != $item->post_parent ) {
|
585 |
+
continue;
|
586 |
+
}
|
587 |
+
|
588 |
+
$orphans[] = $insert_id;
|
589 |
+
|
590 |
+
//Attach the child to the new Parent
|
591 |
+
$sql = "UPDATE $wpdb->posts SET post_parent = {$parent_id}
|
592 |
+
WHERE ID = {$insert_id}";
|
593 |
+
$results = $wpdb->query( $sql );
|
594 |
+
//error_log( "rule_insert_orphan SET post_parent({$insert_id}) $results = " . var_export( $results, true), 0 );
|
595 |
+
clean_attachment_cache( $insert_id );
|
596 |
+
} // each insert
|
597 |
+
|
598 |
+
|
599 |
+
// Sync the new children to the parent
|
600 |
+
if ( ! empty( $orphans ) ) {
|
601 |
+
$results = SMC_Sync_Support::sync_children_to_parent( $parent_id, $orphans );
|
602 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::rule_insert_orphan sync $results = ' . var_export( $results, true), 0 );
|
603 |
+
}
|
604 |
+
} // rule_insert_orphan
|
605 |
+
|
606 |
+
/**
|
607 |
+
* Implements move inserted item to a post rule
|
608 |
+
*
|
609 |
+
* 3. Inserting an item already attached to a different Post (or Page or Custom
|
610 |
+
* Post Type) will change the item's post_parent, delete its terms and assign
|
611 |
+
* the terms assigned to the new parent Post.
|
612 |
+
*
|
613 |
+
* @since 1.0.6
|
614 |
+
*
|
615 |
+
* @param WP_Post Post object following the update.
|
616 |
+
* @param WP_Post Post object before the update.
|
617 |
+
* @param array ( 'inserts_changed' => false, 'inserts_before' => array(), 'inserts_after' => array(), 'inserts_added' => array() )
|
618 |
+
*
|
619 |
+
* @return void
|
620 |
+
*/
|
621 |
+
private static function rule_insert_attached( $post_after, $post_before, $inserted_items ) {
|
622 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::rule_insert_attached $post_after = ' . var_export( $post_after, true), 0 );
|
623 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::rule_insert_attached $post_before = ' . var_export( $post_before, true), 0 );
|
624 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::rule_insert_attached $inserted_items = ' . var_export( $inserted_items, true), 0 );
|
625 |
+
global $wpdb;
|
626 |
+
|
627 |
+
// Make sure its a supported Post Type and published Post
|
628 |
+
if ( ( !SMC_Settings_Support::is_smc_post_type( $post_after->post_type ) ) || ( 'publish' != $post_after->post_status ) ) {
|
629 |
+
return;
|
630 |
+
}
|
631 |
+
|
632 |
+
// If this is the "Publish" action, evaluate all items as new inserts
|
633 |
+
if ( 'publish' != $post_before->post_status ) {
|
634 |
+
$inserted_items['inserts_added'] = $inserted_items['inserts_after'];
|
635 |
+
}
|
636 |
+
|
637 |
+
$parent_id = $post_after->ID;
|
638 |
+
|
639 |
+
// Evaluate new inserts
|
640 |
+
$new_kids = array();
|
641 |
+
foreach ( $inserted_items['inserts_added'] as $insert_id => $insert ) {
|
642 |
+
$item = get_post( $insert_id );
|
643 |
+
|
644 |
+
// Make sure its changing parents
|
645 |
+
if ( ( 0 == $item->post_parent ) || ( $parent_id == $item->post_parent ) ) {
|
646 |
+
continue;
|
647 |
+
}
|
648 |
+
|
649 |
+
$new_kids[] = $insert_id;
|
650 |
+
|
651 |
+
//Attach the child to the new Parent
|
652 |
+
$sql = "UPDATE $wpdb->posts SET post_parent = {$parent_id}
|
653 |
+
WHERE ID = {$insert_id}";
|
654 |
+
$results = $wpdb->query( $sql );
|
655 |
+
//error_log( "rule_insert_attached SET post_parent({$insert_id}) $results = " . var_export( $results, true), 0 );
|
656 |
+
clean_attachment_cache( $insert_id );
|
657 |
+
} // each insert
|
658 |
+
|
659 |
+
|
660 |
+
// Sync the new children to the parent
|
661 |
+
if ( ! empty( $new_kids ) ) {
|
662 |
+
$results = SMC_Sync_Support::sync_children_to_parent( $parent_id, $new_kids );
|
663 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::rule_insert_attached sync $results = ' . var_export( $results, true), 0 );
|
664 |
+
}
|
665 |
+
} // rule_insert_attached
|
666 |
+
|
667 |
+
/**
|
668 |
+
* Implements update a post's terms rule
|
669 |
+
*
|
670 |
+
* 4. When a Post's terms are updated, the Post's children inherit the current terms of the parent.
|
671 |
+
*
|
672 |
+
* @since 1.0.6
|
673 |
+
*
|
674 |
+
* @param integer Post ID.
|
675 |
+
* @param array An array of new term taxonomy IDs.
|
676 |
+
* @param string Taxonomy slug.
|
677 |
+
* @param array Old array of term taxonomy IDs.
|
678 |
+
* @param string Update phase; 'before', 'during', 'after'.
|
679 |
+
*
|
680 |
+
* @return void
|
681 |
+
*/
|
682 |
+
private static function rule_update_post_terms( $post_id, $taxonomy, $tt_ids, $old_tt_ids, $phase ) {
|
683 |
+
//error_log( __LINE__ . " SMC_Automatic_Support::rule_update_post_terms( {$post_id}, {$taxonomy}, {$phase} ) \$tt_ids = " . var_export( $tt_ids, true), 0 );
|
684 |
+
//error_log( __LINE__ . " SMC_Automatic_Support::rule_update_post_terms( {$post_id}, {$taxonomy}, {$phase} ) \$old_tt_ids = " . var_export( $old_tt_ids, true), 0 );
|
685 |
+
static $update_post = NULL, $update_type = NULL, $active_taxonomies = NULL, $terms_changed = false;
|
686 |
+
|
687 |
+
switch ( $phase ) {
|
688 |
+
case 'before':
|
689 |
+
$terms_changed = false;
|
690 |
+
|
691 |
+
// Make sure the object is a supported Post Type
|
692 |
+
$post = get_post( $post_id );
|
693 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::rule_update_post_terms $post = ' . var_export( $post, true), 0 );
|
694 |
+
if ( !SMC_Settings_Support::is_smc_post_type( $post->post_type ) ) {
|
695 |
+
$update_post = NULL;
|
696 |
+
$update_type = NULL;
|
697 |
+
return;
|
698 |
+
}
|
699 |
+
|
700 |
+
$update_post = $post_id;
|
701 |
+
$update_type = $post->post_type;
|
702 |
+
if ( is_null( $active_taxonomies ) ) {
|
703 |
+
$active_taxonomies = SMC_Sync_Support::get_active_taxonomies( $update_type );
|
704 |
+
}
|
705 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::rule_update_post_terms $active_taxonomies = ' . var_export( $active_taxonomies, true), 0 );
|
706 |
+
break;
|
707 |
+
case 'during':
|
708 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::rule_update_post_terms during $update_post = ' . var_export( $update_post, true), 0 );
|
709 |
+
// Make sure it's the right Post
|
710 |
+
if ( is_null( $update_post ) || ( $update_post != $post_id ) ) {
|
711 |
+
return;
|
712 |
+
}
|
713 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::rule_update_post_terms during $taxonomy = ' . var_export( $taxonomy, true), 0 );
|
714 |
+
|
715 |
+
// Make sure it's an active taxonomy
|
716 |
+
if ( ! array_key_exists( $taxonomy, $active_taxonomies ) ) {
|
717 |
+
return;
|
718 |
+
}
|
719 |
+
|
720 |
+
// tt_ids are strings on input, old_tt_ids are integers
|
721 |
+
$tt_ids = array_map( absint, $tt_ids );
|
722 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::rule_update_post_terms mapped $tt_ids = ' . var_export( $tt_ids, true), 0 );
|
723 |
+
if ( $tt_ids != $old_tt_ids ) {
|
724 |
+
$terms_changed = true;
|
725 |
+
}
|
726 |
+
|
727 |
+
//error_log( __LINE__ . " SMC_Automatic_Support::rule_update_post_terms ({$taxonomy}) \$terms_changed = " . var_export( $terms_changed, true), 0 );
|
728 |
+
break;
|
729 |
+
case 'after':
|
730 |
+
// Make sure terms have changed and it's the right Post
|
731 |
+
if ( $terms_changed && $update_post == $post_id ) {
|
732 |
+
$all_assignments = SMC_Sync_Support::get_posts_per_view( array( 'post_type' => $update_type, 'smc_status' => 'unsync', 'post_parents' => array( $post_id ), 'fields' => 'all' ) );
|
733 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::rule_update_post_terms $all_assignments = ' . var_export( $all_assignments, true ), 0 );
|
734 |
+
$results = SMC_Sync_Support::sync_all( $all_assignments );
|
735 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::rule_update_post_terms $results = ' . var_export( $results, true ), 0 );
|
736 |
+
}
|
737 |
+
|
738 |
+
$update_post = NULL;
|
739 |
+
$terms_changed = false;
|
740 |
+
break;
|
741 |
+
} // phase
|
742 |
+
} // rule_update_post_terms
|
743 |
+
|
744 |
+
/**
|
745 |
+
* Implements set featured image rule
|
746 |
+
*
|
747 |
+
* 5. When an orphan is set as a Featured Image of a Post it is attached to the Post and inherits the Post's terms.
|
748 |
+
*
|
749 |
+
* @since 1.0.6
|
750 |
+
*
|
751 |
+
* @param integer post/parent ID.
|
752 |
+
* @param integer attachment/child ID.
|
753 |
+
*
|
754 |
+
* @return void
|
755 |
+
*/
|
756 |
+
private static function rule_set_feature( $parent_id, $child_id ) {
|
757 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::rule_set_feature $parent_id = ' . var_export( $parent_id, true), 0 );
|
758 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::rule_set_feature $child_id = ' . var_export( $child_id, true), 0 );
|
759 |
+
global $wpdb;
|
760 |
+
|
761 |
+
// Make sure the item is an Orphan
|
762 |
+
$child = get_post( $child_id );
|
763 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::rule_set_feature $child = ' . var_export( $child, true), 0 );
|
764 |
+
if ( 0 != $child->post_parent ) {
|
765 |
+
return;
|
766 |
+
}
|
767 |
+
|
768 |
+
// Make sure the new parent is a supported Post Type
|
769 |
+
$parent = get_post( $parent_id );
|
770 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::rule_set_feature $parent = ' . var_export( $parent, true), 0 );
|
771 |
+
if ( !SMC_Settings_Support::is_smc_post_type( $parent->post_type ) ) {
|
772 |
+
return;
|
773 |
+
}
|
774 |
+
|
775 |
+
//Attach the child to the new Parent
|
776 |
+
$sql = "UPDATE $wpdb->posts SET post_parent = {$parent_id}
|
777 |
+
WHERE ID = {$child_id}";
|
778 |
+
$results = $wpdb->query( $sql );
|
779 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::rule_set_feature attach $results = ' . var_export( $results, true), 0 );
|
780 |
+
clean_attachment_cache( $child_id );
|
781 |
+
|
782 |
+
// Sync the child to the parent
|
783 |
+
$results = SMC_Sync_Support::sync_children_to_parent( $parent_id, $child_id );
|
784 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::rule_set_feature sync $results = ' . var_export( $results, true), 0 );
|
785 |
+
} // rule_set_feature
|
786 |
+
|
787 |
+
/**
|
788 |
+
* Implements move featured image rule
|
789 |
+
*
|
790 |
+
* 6. If the item was previously attached to a different Post, Page or Custom Post Type, it is detached from the previous parent, reattached to the current Post and inherits the current Post's terms.
|
791 |
+
*
|
792 |
+
* @since 1.0.6
|
793 |
+
*
|
794 |
+
* @param integer post/parent ID.
|
795 |
+
* @param integer attachment/child ID.
|
796 |
+
*
|
797 |
+
* @return void
|
798 |
+
*/
|
799 |
+
private static function rule_reattach_feature( $parent_id, $child_id ) {
|
800 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::rule_reattach_feature $parent_id = ' . var_export( $parent_id, true), 0 );
|
801 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::rule_reattach_feature $child_id = ' . var_export( $child_id, true), 0 );
|
802 |
+
global $wpdb;
|
803 |
+
|
804 |
+
// Make sure the item is a Child, and the parent is different
|
805 |
+
$child = get_post( $child_id );
|
806 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::rule_reattach_feature $child = ' . var_export( $child, true), 0 );
|
807 |
+
if ( ( 0 == $child->post_parent ) || ( $parent_id == $child->post_parent ) ) {
|
808 |
+
return;
|
809 |
+
}
|
810 |
+
|
811 |
+
// Make sure the new parent is a supported Post Type
|
812 |
+
$parent = get_post( $parent_id );
|
813 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::rule_reattach_feature $parent = ' . var_export( $parent, true), 0 );
|
814 |
+
if ( !SMC_Settings_Support::is_smc_post_type( $parent->post_type ) ) {
|
815 |
+
return;
|
816 |
+
}
|
817 |
+
|
818 |
+
//Attach the child to the new Parent
|
819 |
+
$sql = "UPDATE $wpdb->posts SET post_parent = {$parent_id}
|
820 |
+
WHERE ID = {$child_id}";
|
821 |
+
$results = $wpdb->query( $sql );
|
822 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::rule_reattach_feature $results = ' . var_export( $results, true), 0 );
|
823 |
+
clean_attachment_cache( $child_id );
|
824 |
+
|
825 |
+
// Sync the child to the parent
|
826 |
+
$results = SMC_Sync_Support::sync_children_to_parent( $parent_id, $child_id );
|
827 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::rule_reattach_feature sync $results = ' . var_export( $results, true), 0 );
|
828 |
+
} // rule_reattach_feature
|
829 |
+
|
830 |
+
/**
|
831 |
+
* Implements remove old post's featured image rule
|
832 |
+
*
|
833 |
+
* 7. If the item was the Featured Image of a different Post, it is removed as the Featured Image of that Post.
|
834 |
+
*
|
835 |
+
* @since 1.0.6
|
836 |
+
*
|
837 |
+
* @param integer post/parent ID.
|
838 |
+
* @param integer attachment/child ID.
|
839 |
+
* @param boolean optional, default false; is before update.
|
840 |
+
*
|
841 |
+
* @return void
|
842 |
+
*/
|
843 |
+
private static function rule_remove_feature( $parent_id, $child_id, $before_update = false ) {
|
844 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::rule_remove_feature $parent_id = ' . var_export( $parent_id, true), 0 );
|
845 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::rule_remove_feature $child_id = ' . var_export( $child_id, true), 0 );
|
846 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::rule_remove_feature $before_update = ' . var_export( $before_update, true), 0 );
|
847 |
+
global $wpdb;
|
848 |
+
static $old_ids = NULL;
|
849 |
+
|
850 |
+
// Make sure the new parent is a supported Post Type
|
851 |
+
$parent = get_post( $parent_id );
|
852 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::rule_remove_feature $parent = ' . var_export( $parent, true), 0 );
|
853 |
+
if ( !SMC_Settings_Support::is_smc_post_type( $parent->post_type ) ) {
|
854 |
+
return;
|
855 |
+
}
|
856 |
+
|
857 |
+
// Find all the old Featured Image assignments to a Post
|
858 |
+
if ( $before_update ) {
|
859 |
+
$old_ids = array();
|
860 |
+
|
861 |
+
// Find old assignments
|
862 |
+
$sql = "SELECT post_id FROM $wpdb->postmeta
|
863 |
+
WHERE meta_key = '_thumbnail_id' AND meta_value = '{$child_id}'";
|
864 |
+
$old_assignments = $wpdb->get_col( $sql );
|
865 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::rule_remove_feature $old_assignments = ' . var_export( $old_assignments, true), 0 );
|
866 |
+
|
867 |
+
// Remove current parent from old assignments
|
868 |
+
$index = array_search( $parent_id, $old_ids );
|
869 |
+
if ( false !== $index ) {
|
870 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::rule_remove_feature $index = ' . var_export( $index, true), 0 );
|
871 |
+
unset( $old_ids[ $index ] );
|
872 |
+
}
|
873 |
+
|
874 |
+
if ( ! empty( $old_assignments ) ) {
|
875 |
+
// Find old Post assignments
|
876 |
+
$old_assignments = implode( ',', $old_assignments );
|
877 |
+
$sql = "SELECT ID FROM {$wpdb->posts}
|
878 |
+
WHERE ID IN ( {$old_assignments} ) AND post_type = {$parent->post_type}";
|
879 |
+
$old_ids = $wpdb->get_col( $sql );
|
880 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::rule_remove_feature $old_ids = ' . var_export( $old_ids, true), 0 );
|
881 |
+
}
|
882 |
+
} else {
|
883 |
+
if ( ! empty( $old_ids ) ) {
|
884 |
+
// Delete old Post assignments
|
885 |
+
foreach( $old_ids as $index ) {
|
886 |
+
wp_cache_delete( $index, 'post_meta' );
|
887 |
+
}
|
888 |
+
|
889 |
+
$old_ids = implode( ',', $old_ids );
|
890 |
+
$sql = "DELETE FROM $wpdb->postmeta
|
891 |
+
WHERE post_id IN ( {$old_ids} ) AND meta_key = '_thumbnail_id'";
|
892 |
+
$results = $wpdb->query( $sql );
|
893 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::rule_remove_feature $results = ' . var_export( $results, true), 0 );
|
894 |
+
}
|
895 |
+
|
896 |
+
$old_ids = array();
|
897 |
+
}
|
898 |
+
} // rule_remove_feature
|
899 |
+
|
900 |
+
/**
|
901 |
+
* Implements orphan attached to a post rule
|
902 |
+
*
|
903 |
+
* 8. When an orphan is attached to a Post, it will inherit the Post's terms.
|
904 |
+
*
|
905 |
+
* @since 1.0.6
|
906 |
+
*
|
907 |
+
* @param integer new post/parent ID.
|
908 |
+
* @param integer attachment/child ID.
|
909 |
+
* @param boolean optional, default false; is before update.
|
910 |
+
*
|
911 |
+
* @return void
|
912 |
+
*/
|
913 |
+
private static function rule_attach_orphan( $parent_id, $child_id, $before_update = false ) {
|
914 |
+
//error_log( __LINE__ . " SMC_Automatic_Support::rule_attach_orphan( {$parent_id}, {$child_id} ) \$before_update = " . var_export( $before_update, true), 0 );
|
915 |
+
static $attaching_orphan = false, $new_parent = 0;
|
916 |
+
|
917 |
+
if ( $before_update ) {
|
918 |
+
// Quit if the new "parent" is "unattached"
|
919 |
+
if ( 0 == $parent_id ) {
|
920 |
+
return;
|
921 |
+
}
|
922 |
+
|
923 |
+
// Make sure the item is an Orphan
|
924 |
+
$child = get_post( $child_id );
|
925 |
+
//error_log( __LINE__ . " SMC_Automatic_Support::rule_attach_orphan( {$parent_id}, {$child_id} ) \$child = " . var_export( $child, true), 0 );
|
926 |
+
if ( ( 'attachment' != $child->post_type ) || ( 0 != $child->post_parent ) ) {
|
927 |
+
return;
|
928 |
+
}
|
929 |
+
|
930 |
+
// Make sure the new parent is a supported Post Type
|
931 |
+
$parent = get_post( $parent_id );
|
932 |
+
//error_log( __LINE__ . " SMC_Automatic_Support::rule_attach_orphan( {$parent_id}, {$child_id} ) \$parent = " . var_export( $parent, true), 0 );
|
933 |
+
if ( !SMC_Settings_Support::is_smc_post_type( $parent->post_type ) ) {
|
934 |
+
return;
|
935 |
+
}
|
936 |
+
|
937 |
+
$attaching_orphan = true;
|
938 |
+
$new_parent = $parent_id;
|
939 |
+
return;
|
940 |
+
} elseif ( ! $attaching_orphan ) {
|
941 |
+
return;
|
942 |
+
}
|
943 |
+
|
944 |
+
// Sync the child to the new parent
|
945 |
+
$results = SMC_Sync_Support::sync_children_to_parent( $new_parent, $child_id );
|
946 |
+
//error_log( __LINE__ . " SMC_Automatic_Support::rule_attach_orphan( {$new_parent}, {$child_id} ) \$results = " . var_export( $results, true), 0 );
|
947 |
+
$attaching_orphan = false;
|
948 |
+
$new_parent = 0;
|
949 |
+
} // rule_attach_orphan
|
950 |
+
|
951 |
+
/**
|
952 |
+
* Implements item reattached to a new post rule
|
953 |
+
*
|
954 |
+
* 9. When an items new parent is a Post, it will inherit the Post's terms.
|
955 |
+
*
|
956 |
+
* @since 1.0.6
|
957 |
+
*
|
958 |
+
* @param integer new post/parent ID.
|
959 |
+
* @param integer attachment/child ID.
|
960 |
+
* @param boolean optional, default false; is before update.
|
961 |
+
*
|
962 |
+
* @return void
|
963 |
+
*/
|
964 |
+
private static function rule_reattach_item( $parent_id, $child_id, $before_update = false ) {
|
965 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::rule_reattach_item $parent_id = ' . var_export( $parent_id, true), 0 );
|
966 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::rule_reattach_item $child_id = ' . var_export( $child_id, true), 0 );
|
967 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::rule_reattach_item $before_update = ' . var_export( $before_update, true), 0 );
|
968 |
+
static $changing_parent = false, $new_parent = 0;
|
969 |
+
|
970 |
+
if ( $before_update ) {
|
971 |
+
// Make sure the item has a new, different parent
|
972 |
+
$child = get_post( $child_id );
|
973 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::rule_reattach_item $child = ' . var_export( $child, true), 0 );
|
974 |
+
if ( ( 'attachment' != $child->post_type ) || ( 0 == $child->post_parent ) || ( $parent_id == $child->post_parent ) ) {
|
975 |
+
return;
|
976 |
+
}
|
977 |
+
|
978 |
+
// Make sure the new parent is a supported Post Type
|
979 |
+
$parent = get_post( $parent_id );
|
980 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::rule_reattach_item $parent = ' . var_export( $parent, true), 0 );
|
981 |
+
if ( !SMC_Settings_Support::is_smc_post_type( $parent->post_type ) ) {
|
982 |
+
return;
|
983 |
+
}
|
984 |
+
|
985 |
+
$changing_parent = true;
|
986 |
+
$new_parent = $parent_id;
|
987 |
+
return;
|
988 |
+
} elseif ( ! $changing_parent ) {
|
989 |
+
return;
|
990 |
+
}
|
991 |
+
|
992 |
+
// Sync the child to the new parent
|
993 |
+
$results = SMC_Sync_Support::sync_children_to_parent( $new_parent, $child_id );
|
994 |
+
//error_log( __LINE__ . ' SMC_Automatic_Support::rule_reattach_item sync $results = ' . var_export( $results, true), 0 );
|
995 |
+
$changing_parent = false;
|
996 |
+
$new_parent = 0;
|
997 |
+
} // rule_reattach_item
|
998 |
+
} // class SMC_Automatic_Support
|
999 |
+
?>
|
examples/plugins/smart-media-categories/admin/includes/class-smc-settings-support.php
ADDED
@@ -0,0 +1,455 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Support functions for the SMC Settings page.
|
4 |
+
*
|
5 |
+
* @package Smart_Media_Categories_Admin
|
6 |
+
* @author David Lingren <dlingren@comcast.net>
|
7 |
+
* @license GPL-2.0+
|
8 |
+
* @link @TODO http://example.com
|
9 |
+
* @copyright 2014 David Lingren
|
10 |
+
*/
|
11 |
+
|
12 |
+
/**
|
13 |
+
* This support class provides functions to manage the SMC options
|
14 |
+
*
|
15 |
+
* In the current version all of the support functions are static, and there is
|
16 |
+
* no need to create a new instance of the class.
|
17 |
+
*
|
18 |
+
* @package Smart_Media_Categories_Admin
|
19 |
+
* @author David Lingren <dlingren@comcast.net>
|
20 |
+
*/
|
21 |
+
class SMC_Settings_Support {
|
22 |
+
/**
|
23 |
+
* Option definitions
|
24 |
+
*
|
25 |
+
* Defined NULL and initialized at runtime for I18N support.
|
26 |
+
*
|
27 |
+
* @since 1.0.6
|
28 |
+
*
|
29 |
+
* @var array
|
30 |
+
*/
|
31 |
+
protected static $option_definitions = NULL;
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Initialize the $option_definitions array
|
35 |
+
*
|
36 |
+
* @since 1.0.6
|
37 |
+
*
|
38 |
+
* @return void
|
39 |
+
*/
|
40 |
+
public static function initialize() {
|
41 |
+
SMC_Settings_Support::$option_definitions = array(
|
42 |
+
'smc_automatic_options' => array(
|
43 |
+
'post_types' => array(
|
44 |
+
'type' => 'text',
|
45 |
+
'size' => 40,
|
46 |
+
'default' => 'post',
|
47 |
+
'id' => 'smc_automatic_post_types',
|
48 |
+
'title' => __( 'Sync Post Types', 'smart-media-categories' ),
|
49 |
+
'description' => __( "Which Post Type(s) are subject to these rules. Separate multiple types by commas.", 'smart-media-categories' ),
|
50 |
+
),
|
51 |
+
'scroll_threshold' => array(
|
52 |
+
'type' => 'text',
|
53 |
+
'size' => 2,
|
54 |
+
'default' => '10',
|
55 |
+
'id' => 'smc_automatic_scroll_threshold',
|
56 |
+
'title' => __( 'Scroll Threshold', 'smart-media-categories' ),
|
57 |
+
'description' => __( "The number of children required to activate column scrolling.", 'smart-media-categories' ),
|
58 |
+
),
|
59 |
+
'scroll_height' => array(
|
60 |
+
'type' => 'text',
|
61 |
+
'size' => 5,
|
62 |
+
'default' => '150px',
|
63 |
+
'id' => 'smc_automatic_scroll_height',
|
64 |
+
'title' => __( 'Scroll Height', 'smart-media-categories' ),
|
65 |
+
'description' => __( "Maximum height of scrolling Children column cell.", 'smart-media-categories' ),
|
66 |
+
),
|
67 |
+
'upload_item' => array(
|
68 |
+
'type' => 'checkbox',
|
69 |
+
'default' => '1',
|
70 |
+
'id' => 'smc_automatic_upload_item',
|
71 |
+
'title' => __( 'Upload Item', 'smart-media-categories' ),
|
72 |
+
'description' => __( "When an item is uploaded to a <strong>Sync Post Type</strong> (any post_type in the Sync Post Types list above), it will inherit the parent's terms.", 'smart-media-categories' ),
|
73 |
+
),
|
74 |
+
'attach_orphan' => array(
|
75 |
+
'type' => 'checkbox',
|
76 |
+
'default' => '1',
|
77 |
+
'id' => 'smc_automatic_attach_orphan',
|
78 |
+
'title' => __( 'Attach Orphan', 'smart-media-categories' ),
|
79 |
+
'description' => __( "When an orphan is attached to a <strong>Sync Post Type</strong>, it will inherit the parent's terms.", 'smart-media-categories' ),
|
80 |
+
),
|
81 |
+
'insert_orphan' => array(
|
82 |
+
'type' => 'checkbox',
|
83 |
+
'default' => '1',
|
84 |
+
'id' => 'smc_automatic_insert_orphan',
|
85 |
+
'title' => __( 'Insert Orphan', 'smart-media-categories' ),
|
86 |
+
'description' => __( "Inserting an orphan in a <strong>Sync Post Type</strong> will attach it to the <strong>Sync Post Type</strong> and assign its terms.", 'smart-media-categories' ),
|
87 |
+
),
|
88 |
+
'insert_attached' => array(
|
89 |
+
'type' => 'checkbox',
|
90 |
+
'default' => '1',
|
91 |
+
'id' => 'smc_automatic_insert_attached',
|
92 |
+
'title' => __( 'Insert Attached', 'smart-media-categories' ),
|
93 |
+
'description' => __( "Inserting an item already attached to a different <strong>Sync Post Type</strong> (or Page or Custom Post Type) will change the item's post_parent, delete its terms and assign the terms assigned to the new parent <strong>Sync Post Type</strong>.", 'smart-media-categories' ),
|
94 |
+
),
|
95 |
+
'update_post_terms' => array(
|
96 |
+
'type' => 'checkbox',
|
97 |
+
'default' => '1',
|
98 |
+
'id' => 'smc_automatic_update_post_terms',
|
99 |
+
'title' => __( 'Update Post', 'smart-media-categories' ),
|
100 |
+
'description' => __( "When a <strong>Sync Post Type's</strong> terms are updated, the <strong>Sync Post Type's</strong> children inherit the current terms of the parent.", 'smart-media-categories' ),
|
101 |
+
),
|
102 |
+
'set_feature' => array(
|
103 |
+
'type' => 'checkbox',
|
104 |
+
'default' => '1',
|
105 |
+
'id' => 'smc_automatic_set_feature',
|
106 |
+
'title' => __( 'Set Feature', 'smart-media-categories' ),
|
107 |
+
'description' => __( "When an orphan is set as a Featured Image of a <strong>Sync Post Type</strong> it is attached to the <strong>Sync Post Type</strong> and inherits the <strong>Sync Post Type's</strong> terms.", 'smart-media-categories' ),
|
108 |
+
),
|
109 |
+
'reattach_feature' => array(
|
110 |
+
'type' => 'checkbox',
|
111 |
+
'default' => '1',
|
112 |
+
'id' => 'smc_automatic_reattach_feature',
|
113 |
+
'title' => __( 'Reattach Feature', 'smart-media-categories' ),
|
114 |
+
'description' => __( "If the item was previously attached to a different <strong>Sync Post Type</strong>, Page or Custom Post Type, it is detached from the previous parent, reattached to the current <strong>Sync Post Type</strong> and inherits the current parent's terms.", 'smart-media-categories' ),
|
115 |
+
),
|
116 |
+
'remove_feature' => array(
|
117 |
+
'type' => 'checkbox',
|
118 |
+
'default' => '1',
|
119 |
+
'id' => 'smc_automatic_remove_feature',
|
120 |
+
'title' => __( 'Remove Old Feature', 'smart-media-categories' ),
|
121 |
+
'description' => __( "If the item was the Featured Image of a different <strong>Sync Post Type</strong>, it is removed as the Featured Image of that <strong>Sync Post Type</strong>. ", 'smart-media-categories' ),
|
122 |
+
),
|
123 |
+
'reattach_item' => array(
|
124 |
+
'type' => 'checkbox',
|
125 |
+
'default' => '1',
|
126 |
+
'id' => 'smc_automatic_reattach_item',
|
127 |
+
'title' => __( 'Reattach Item', 'smart-media-categories' ),
|
128 |
+
'description' => __( "When an items new parent is a <strong>Sync Post Type</strong>, it will inherit the parent's terms.", 'smart-media-categories' ),
|
129 |
+
),
|
130 |
+
),
|
131 |
+
'smc_manual_options' => array(
|
132 |
+
),
|
133 |
+
);
|
134 |
+
}
|
135 |
+
|
136 |
+
/**
|
137 |
+
* Find the SMC Settings page active tab
|
138 |
+
*
|
139 |
+
* @since 1.0.6
|
140 |
+
*
|
141 |
+
* @param string Optional; 'smc_automatic_options', 'smc_manual_options'
|
142 |
+
*
|
143 |
+
* @return string Active tab value
|
144 |
+
*/
|
145 |
+
public static function get_active_tab( $active_tab = NULL ) {
|
146 |
+
if ( isset( $_REQUEST[ 'smc_settings_tab' ] ) ) {
|
147 |
+
$active_tab = $_REQUEST[ 'smc_settings_tab' ];
|
148 |
+
} elseif ( is_null( $active_tab ) ) {
|
149 |
+
$active_tab = 'smc_automatic_options';
|
150 |
+
} elseif ( ! in_array( $active_tab, array( 'smc_automatic_options', 'smc_manual_options' ) ) ) {
|
151 |
+
$active_tab = 'smc_automatic_options';
|
152 |
+
}
|
153 |
+
|
154 |
+
return $active_tab;
|
155 |
+
}
|
156 |
+
|
157 |
+
/**
|
158 |
+
* Find taxonomies subjet to SMC rules
|
159 |
+
*
|
160 |
+
* @since 1.0.9
|
161 |
+
*
|
162 |
+
* @return array Taxonomies subject to the SMC rules, if any
|
163 |
+
*/
|
164 |
+
public static function smc_taxonomies() {
|
165 |
+
static $smc_taxonomies = NULL;
|
166 |
+
|
167 |
+
if ( is_null( $smc_taxonomies ) ) {
|
168 |
+
$smc_types = array_map( 'trim', explode( ',', self::get_option('post_types') ) );
|
169 |
+
//error_log( __LINE__ . ' SMC_Settings_Support::smc_taxonomies $smc_types = ' . var_export( $smc_types, true ), 0 );
|
170 |
+
|
171 |
+
$smc_taxonomies = array();
|
172 |
+
foreach ( $smc_types as $smc_type ) {
|
173 |
+
$taxonomies = get_object_taxonomies( $smc_type, 'names' );
|
174 |
+
//error_log( __LINE__ . " SMC_Settings_Support::smc_taxonomies( {$smc_type} ) taxonomies = " . var_export( $taxonomies, true ), 0 );
|
175 |
+
foreach ( $taxonomies as $tax_name ) {
|
176 |
+
// Index on name to avoid duplicates
|
177 |
+
$smc_taxonomies[ $tax_name ] = $tax_name;
|
178 |
+
}
|
179 |
+
}
|
180 |
+
|
181 |
+
//error_log( __LINE__ . ' SMC_Settings_Support::smc_taxonomies $smc_taxonomies = ' . var_export( $smc_taxonomies, true ), 0 );
|
182 |
+
}
|
183 |
+
|
184 |
+
return $smc_taxonomies;
|
185 |
+
}
|
186 |
+
|
187 |
+
/**
|
188 |
+
* Find Post Types subjet to SMC rules
|
189 |
+
*
|
190 |
+
* @since 1.0.9
|
191 |
+
*
|
192 |
+
* @return array Post Types subject to the SMC rules, if any
|
193 |
+
*/
|
194 |
+
public static function smc_post_types() {
|
195 |
+
static $smc_types = NULL;
|
196 |
+
|
197 |
+
if ( is_null( $smc_types ) ) {
|
198 |
+
$smc_types = array_map( 'trim', explode( ',', self::get_option('post_types') ) );
|
199 |
+
//error_log( __LINE__ . ' SMC_Settings_Support::smc_post_types $smc_types = ' . var_export( $smc_types, true ), 0 );
|
200 |
+
}
|
201 |
+
|
202 |
+
return $smc_types;
|
203 |
+
}
|
204 |
+
|
205 |
+
/**
|
206 |
+
* See if a Post Type is subjet to SMC rules
|
207 |
+
*
|
208 |
+
* @since 1.0.9
|
209 |
+
*
|
210 |
+
* @param string $post_type Post Type slug
|
211 |
+
*
|
212 |
+
* @return boolean True if the Post Type is subject to the SMC rules
|
213 |
+
*/
|
214 |
+
public static function is_smc_post_type( $post_type ) {
|
215 |
+
static $smc_types = NULL;
|
216 |
+
|
217 |
+
if ( is_null( $smc_types ) ) {
|
218 |
+
$smc_types = array_map( 'trim', explode( ',', self::get_option('post_types') ) );
|
219 |
+
//error_log( __LINE__ . ' SMC_Settings_Support::is_smc_post_type $smc_types = ' . var_export( $smc_types, true ), 0 );
|
220 |
+
}
|
221 |
+
|
222 |
+
return in_array( $post_type, $smc_types );
|
223 |
+
}
|
224 |
+
|
225 |
+
/**
|
226 |
+
* Find an SMC option by slug
|
227 |
+
*
|
228 |
+
* @since 1.0.6
|
229 |
+
*
|
230 |
+
* @param string Option slug
|
231 |
+
*
|
232 |
+
* @return string Option value
|
233 |
+
*/
|
234 |
+
public static function get_option( $slug ) {
|
235 |
+
$group = NULL;
|
236 |
+
$definition = NULL;
|
237 |
+
|
238 |
+
foreach ( SMC_Settings_Support::$option_definitions as $key => $value ) {
|
239 |
+
if ( array_key_exists( $slug, $value ) ) {
|
240 |
+
$group = $key;
|
241 |
+
$definition = $value[ $slug ];
|
242 |
+
break;
|
243 |
+
}
|
244 |
+
}
|
245 |
+
|
246 |
+
if ( is_null( $definition ) ) {
|
247 |
+
return NULL;
|
248 |
+
}
|
249 |
+
|
250 |
+
$options = get_option( $group );
|
251 |
+
if ( is_array( $options ) && isset( $options[ $slug ] ) ) {
|
252 |
+
return $options[ $slug ];
|
253 |
+
}
|
254 |
+
|
255 |
+
return $definition['default'];
|
256 |
+
}
|
257 |
+
|
258 |
+
/**
|
259 |
+
* Render the SMC Settings page, section and options
|
260 |
+
*
|
261 |
+
* @since 1.0.6
|
262 |
+
*
|
263 |
+
* @param string Settings page slug, as used in add_options_page()
|
264 |
+
* @param string Optional; 'smc_automatic_options', 'smc_manual_options'
|
265 |
+
*
|
266 |
+
* @return void
|
267 |
+
*/
|
268 |
+
public static function initialize_settings_page( $page_slug, $active_tab = NULL ) {
|
269 |
+
$active_tab = SMC_Settings_Support::get_active_tab( $active_tab );
|
270 |
+
|
271 |
+
if ( 'smc_automatic_options' == $active_tab ) {
|
272 |
+
add_settings_section( // $id, $title, $callback, $page
|
273 |
+
'smc_automatic_options_section',
|
274 |
+
__( 'Automatic Actions', 'smart-media-categories' ),
|
275 |
+
'SMC_Settings_Support::render_automatic_options_section',
|
276 |
+
$page_slug
|
277 |
+
);
|
278 |
+
|
279 |
+
foreach( SMC_Settings_Support::$option_definitions['smc_automatic_options'] as $key => $value ) {
|
280 |
+
add_settings_field( // $id, $title, $callback, $page, $section, $args
|
281 |
+
$value['id'],
|
282 |
+
$value['title'],
|
283 |
+
'SMC_Settings_Support::render_automatic_options',
|
284 |
+
$page_slug,
|
285 |
+
'smc_automatic_options_section',
|
286 |
+
array_merge( $value, array( 'slug' => $key ) )
|
287 |
+
);
|
288 |
+
}
|
289 |
+
} // smc_automatic_options
|
290 |
+
|
291 |
+
if ( 'smc_manual_options' == $active_tab ) {
|
292 |
+
add_settings_section( // $id, $title, $callback, $page
|
293 |
+
'smc_manual_options_section',
|
294 |
+
__( 'Manual Actions', 'smart-media-categories' ),
|
295 |
+
'SMC_Settings_Support::render_manual_options_section',
|
296 |
+
$page_slug
|
297 |
+
);
|
298 |
+
} // smc_manual_options
|
299 |
+
}
|
300 |
+
|
301 |
+
/**
|
302 |
+
* Render the SMC Settings page Automatic tab section-level content
|
303 |
+
*
|
304 |
+
* @since 1.0.6
|
305 |
+
*
|
306 |
+
* @param string Optional; 'smc_automatic_options', 'smc_manual_options'
|
307 |
+
*
|
308 |
+
* @return void echoes HTML markup for the section description
|
309 |
+
*/
|
310 |
+
public static function render_automatic_options_section() {
|
311 |
+
echo '<p>' . __( "You can find some User Interface notes and more information about the rules in this PDF document: ", 'smart-media-categories' ) . "<a href=\"http://fairtradejudaica.org/wp-content/uploads/Smart-Media-Categories-v07.pdf\" target=\"_blank\">Smart-Media-Categories-v07.pdf</a></p>\n";
|
312 |
+
echo '<p>' . __( "Check the box of each automatic rule you want to apply.", 'smart-media-categories' ) . "</p>\n";
|
313 |
+
}
|
314 |
+
|
315 |
+
/**
|
316 |
+
* Render the SMC Settings page Automatic tab section-level content
|
317 |
+
*
|
318 |
+
* @since 1.0.6
|
319 |
+
*
|
320 |
+
* @param string Optional; 'smc_automatic_options', 'smc_manual_options'
|
321 |
+
*
|
322 |
+
* @return void echoes HTML markup for the section description
|
323 |
+
*/
|
324 |
+
public static function render_manual_options_section() {
|
325 |
+
echo '<p><strong>' . __( "There are no Manual Settings in this version of the plugin.", 'smart-media-categories' ) . "</strong></p>\n";
|
326 |
+
}
|
327 |
+
|
328 |
+
/**
|
329 |
+
* Render the Automatic tab Upload Item setting
|
330 |
+
*
|
331 |
+
* @since 1.0.6
|
332 |
+
*
|
333 |
+
* @param array ( [0] => explaination of this setting )
|
334 |
+
*
|
335 |
+
* @return void echoes HTML markup for the setting
|
336 |
+
*/
|
337 |
+
public static function render_automatic_options( $args ) {
|
338 |
+
//error_log( __LINE__ . ' SMC_Settings_Support::render_automatic_options $args = ' . var_export( $args, true ), 0 );
|
339 |
+
|
340 |
+
$slug = $args['slug'];
|
341 |
+
$value = SMC_Settings_Support::get_option( $slug );
|
342 |
+
if ( NULL === $value ) {
|
343 |
+
echo __( 'Option not found: ', 'smart-media-categories' ) . $slug;
|
344 |
+
return;
|
345 |
+
}
|
346 |
+
|
347 |
+
switch ( $args['type'] ) {
|
348 |
+
case 'checkbox':
|
349 |
+
$html = '<input name="smc_automatic_options[' . $slug . ']" id="' . $args['id'] . '" type="checkbox" ' . checked( 1, $value, false ) . " value=\"1\"/>\n";
|
350 |
+
$html .= '<label for="smc_automatic_' . $slug . '"> ' . $args['description'] . "</label>\n";
|
351 |
+
break;
|
352 |
+
case 'text':
|
353 |
+
$html = '<input name="smc_automatic_options[' . $slug . ']" id="' . $args['id'] . '" type="text" size=' . $args['size'] . ' value="' . $value . "\"/>\n";
|
354 |
+
$html .= '<br><label for="smc_automatic_' . $slug . '"> ' . $args['description'] . "</label>\n";
|
355 |
+
break;
|
356 |
+
default:
|
357 |
+
$html = '';
|
358 |
+
}
|
359 |
+
|
360 |
+
echo $html;
|
361 |
+
}
|
362 |
+
|
363 |
+
/**
|
364 |
+
* Validate the SMC Settings page Automatic options
|
365 |
+
*
|
366 |
+
* @since 1.0.6
|
367 |
+
*
|
368 |
+
* @param array Option values as entered
|
369 |
+
*
|
370 |
+
* @return void
|
371 |
+
*/
|
372 |
+
public static function validate_automatic_options( $input ) {
|
373 |
+
//error_log( __LINE__ ."' SMC_Settings_Support::validate_automatic_options input = " . var_export( $input, true ), 0 );
|
374 |
+
$output = array();
|
375 |
+
$updates = 0;
|
376 |
+
|
377 |
+
foreach( SMC_Settings_Support::$option_definitions['smc_automatic_options'] as $key => $value ) {
|
378 |
+
//error_log( __LINE__ ."' SMC_Settings_Support::validate_automatic_options {$key} = " . var_export( $value, true ), 0 );
|
379 |
+
|
380 |
+
$update = NULL;
|
381 |
+
switch ( $value['type'] ) {
|
382 |
+
case 'checkbox':
|
383 |
+
if ( isset( $input[ $key ] ) && absint( $input[ $key ] ) ) {
|
384 |
+
$update = '1';
|
385 |
+
} else {
|
386 |
+
$update = '0';
|
387 |
+
}
|
388 |
+
break;
|
389 |
+
case 'text':
|
390 |
+
if ( isset( $input[ $key ] ) ) {
|
391 |
+
$update = trim( $input[ $key ] );
|
392 |
+
}
|
393 |
+
break;
|
394 |
+
default:
|
395 |
+
break;
|
396 |
+
}
|
397 |
+
|
398 |
+
if ( !is_null( $update ) ) {
|
399 |
+
$output[ $key ] = $update;
|
400 |
+
if ( $output[ $key ] != SMC_Settings_Support::get_option( $key ) ) {
|
401 |
+
$updates++;
|
402 |
+
add_settings_error( // $setting, $code, $message, $type
|
403 |
+
$key,
|
404 |
+
$key,
|
405 |
+
$value['title'] . __( ' updated', 'smart-media-categories' ),
|
406 |
+
'updated'
|
407 |
+
);
|
408 |
+
|
409 |
+
}
|
410 |
+
}
|
411 |
+
}
|
412 |
+
|
413 |
+
if ( 0 == $updates ) {
|
414 |
+
add_settings_error( // $setting, $code, $message, $type
|
415 |
+
'smc_automatic_options',
|
416 |
+
'smc_automatic_options',
|
417 |
+
__( 'No updates', 'smart-media-categories' ),
|
418 |
+
'updated'
|
419 |
+
);
|
420 |
+
}
|
421 |
+
|
422 |
+
//error_log( __LINE__ ."' SMC_Settings_Support::validate_automatic_options output = " . var_export( $output, true ), 0 );
|
423 |
+
update_option( 'smc_automatic_options', $output );
|
424 |
+
}
|
425 |
+
|
426 |
+
/**
|
427 |
+
* Render the SMC Settings page, section and options
|
428 |
+
*
|
429 |
+
* @since 1.0.6
|
430 |
+
*
|
431 |
+
* @param string Settings page slug
|
432 |
+
* @param string Optional; 'smc_automatic_options', 'smc_manual_options'
|
433 |
+
*
|
434 |
+
* @return void echoes HTML markup for the settings page
|
435 |
+
*/
|
436 |
+
public static function render_settings_page( $page, $active_tab = NULL ) {
|
437 |
+
$active_tab = SMC_Settings_Support::get_active_tab( $active_tab );
|
438 |
+
?>
|
439 |
+
|
440 |
+
<h2 class="nav-tab-wrapper">
|
441 |
+
<a href="?page=smart-media-categories&smc_settings_tab=smc_automatic_options" class="nav-tab <?php echo $active_tab == 'smc_automatic_options' ? 'nav-tab-active' : ''; ?>"><?php _e( 'Automatic', 'smart-media-categories' ); ?></a>
|
442 |
+
<a href="?page=smart-media-categories&smc_settings_tab=smc_manual_options" class="nav-tab <?php echo $active_tab == 'smc_manual_options' ? 'nav-tab-active' : ''; ?>"><?php _e( 'Manual', 'smart-media-categories' ); ?></a>
|
443 |
+
</h2>
|
444 |
+
|
445 |
+
<form method="post" action="options-general.php?page=smart-media-categories&smc_settings_tab=<?php echo $active_tab ?>">
|
446 |
+
<?php
|
447 |
+
settings_fields( $page );
|
448 |
+
do_settings_sections( $page );
|
449 |
+
submit_button();
|
450 |
+
?>
|
451 |
+
</form>
|
452 |
+
|
453 |
+
<?php }
|
454 |
+
}
|
455 |
+
?>
|
examples/plugins/smart-media-categories/admin/includes/class-smc-sync-support.php
ADDED
@@ -0,0 +1,631 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Manages synchronization between a parent post and its children.
|
4 |
+
*
|
5 |
+
* @package Smart_Media_Categories_Admin
|
6 |
+
* @author David Lingren <dlingren@comcast.net>
|
7 |
+
* @license GPL-2.0+
|
8 |
+
* @link @TODO http://example.com
|
9 |
+
* @copyright 2014 David Lingren
|
10 |
+
*/
|
11 |
+
|
12 |
+
/**
|
13 |
+
* This support class provides functions to manage syncronization
|
14 |
+
* of taxonomy terms between a parent post and its attached children.
|
15 |
+
*
|
16 |
+
* In the current version all of the support functions are static, and there is
|
17 |
+
* no need to create a new instance of the class.
|
18 |
+
*
|
19 |
+
* @package Smart_Media_Categories_Admin
|
20 |
+
* @author David Lingren <dlingren@comcast.net>
|
21 |
+
*/
|
22 |
+
class SMC_Sync_Support {
|
23 |
+
/**
|
24 |
+
* Find taxonomies common to Posts and Attachments
|
25 |
+
*
|
26 |
+
* @since 1.0.6
|
27 |
+
*
|
28 |
+
* @param string $post_type Optional; Post Type of parent objects
|
29 |
+
*
|
30 |
+
* @return array active taxonomy slugs
|
31 |
+
*/
|
32 |
+
public static function get_active_taxonomies( $post_type = NULL ) {
|
33 |
+
$atachment_taxonomies = get_object_taxonomies( 'attachment', 'objects' );
|
34 |
+
|
35 |
+
if ( is_null( $post_type ) ) {
|
36 |
+
$post_taxonomies = SMC_Settings_Support::smc_taxonomies();
|
37 |
+
} else {
|
38 |
+
$post_taxonomies = get_object_taxonomies( $post_type, 'names' );
|
39 |
+
}
|
40 |
+
|
41 |
+
$active_taxonomies = array();
|
42 |
+
|
43 |
+
foreach ( $atachment_taxonomies as $tax_name => $tax_object ) {
|
44 |
+
if ( $tax_object->show_ui && in_array( $tax_name, $post_taxonomies ) ) {
|
45 |
+
$active_taxonomies[ $tax_name ] = $tax_object;
|
46 |
+
}
|
47 |
+
}
|
48 |
+
|
49 |
+
return $active_taxonomies;
|
50 |
+
}
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Count the number of "Synced" and "Unsynced" posts
|
54 |
+
*
|
55 |
+
* @since 1.0.2
|
56 |
+
*
|
57 |
+
* @param array Optional; ('smc_status', 'post_parents', 'fields')
|
58 |
+
*
|
59 |
+
* @return array ( 'sync' => Synced posts, 'unsync' => Unsynced posts )
|
60 |
+
*/
|
61 |
+
public static function get_posts_per_view( $attr = NULL ) {
|
62 |
+
global $wpdb;
|
63 |
+
static $save_attr = NULL, $posts_per_view = NULL;
|
64 |
+
|
65 |
+
/*
|
66 |
+
* Make sure $attr is an array, even if it's empty
|
67 |
+
*/
|
68 |
+
if ( empty( $attr ) ) {
|
69 |
+
$attr = array();
|
70 |
+
} elseif ( is_string( $attr ) ) {
|
71 |
+
$attr = shortcode_parse_atts( $attr );
|
72 |
+
}
|
73 |
+
|
74 |
+
/*
|
75 |
+
* Create the PHP variables we need
|
76 |
+
*/
|
77 |
+
extract( shortcode_atts( array(
|
78 |
+
'post_type' => 'post',
|
79 |
+
'smc_status' => NULL, // 'sync', 'unsync'
|
80 |
+
'post_parents' => NULL, // array of IDs
|
81 |
+
'fields' => 'ids', // 'all'
|
82 |
+
), $attr ) );
|
83 |
+
//error_log( __LINE__ . ' SMC_Sync_Support::get_posts_per_view $attr = ' . var_export( $attr, true ), 0 );
|
84 |
+
//error_log( __LINE__ . ' SMC_Sync_Support::get_posts_per_view $save_attr = ' . var_export( $save_attr, true ), 0 );
|
85 |
+
//error_log( __LINE__ . ' SMC_Sync_Support::get_posts_per_view $smc_status = ' . var_export( $smc_status, true ), 0 );
|
86 |
+
//error_log( __LINE__ . ' SMC_Sync_Support::get_posts_per_view $post_parents = ' . var_export( $post_parents, true ), 0 );
|
87 |
+
//error_log( __LINE__ . ' SMC_Sync_Support::get_posts_per_view $fields = ' . var_export( $fields, true ), 0 );
|
88 |
+
|
89 |
+
//error_log( __LINE__ . ' SMC_Sync_Support::get_posts_per_view $posts_per_view = ' . var_export( $posts_per_view, true ), 0 );
|
90 |
+
if ( $attr == $save_attr && NULL !== $posts_per_view ) {
|
91 |
+
//error_log( __LINE__ . ' SMC_Sync_Support::get_posts_per_view returning cached array', 0 );
|
92 |
+
return $posts_per_view;
|
93 |
+
}
|
94 |
+
|
95 |
+
$save_attr = $attr;
|
96 |
+
$posts_per_view = NULL;
|
97 |
+
|
98 |
+
// Only taxonomies used for both posts AND attachments are tested
|
99 |
+
$active_taxonomies = SMC_Sync_Support::get_active_taxonomies( $post_type );
|
100 |
+
|
101 |
+
// Build an array of SQL clauses to find Parent/Child relationships
|
102 |
+
$query = array();
|
103 |
+
$query_parameters = array();
|
104 |
+
|
105 |
+
$query[] = "SELECT p2.ID AS `post_parent`, p.ID FROM {$wpdb->posts} AS p";
|
106 |
+
|
107 |
+
// INNER JOIN removes posts with no attachments
|
108 |
+
$query[] = "INNER JOIN {$wpdb->posts} as p2";
|
109 |
+
$query[] = "ON (p.post_parent = p2.ID)";
|
110 |
+
|
111 |
+
$query[] = "WHERE p2.post_type = '{$post_type}'";
|
112 |
+
$query[] = "AND p2.post_status != 'trash'";
|
113 |
+
|
114 |
+
if ( ! empty( $post_parents ) ) {
|
115 |
+
$placeholders = array();
|
116 |
+
foreach ( $post_parents as $post_parent ) {
|
117 |
+
$placeholders[] = '%s';
|
118 |
+
$query_parameters[] = $post_parent;
|
119 |
+
}
|
120 |
+
|
121 |
+
$query[] = 'AND ( p.post_parent IN (' . join( ',', $placeholders ) . ') )';
|
122 |
+
}
|
123 |
+
|
124 |
+
$query[] = "AND p.post_type = 'attachment'";
|
125 |
+
$query[] = "AND p.post_status = 'inherit'";
|
126 |
+
|
127 |
+
$query = join(' ', $query);
|
128 |
+
//error_log( __LINE__ . ' SMC_Sync_Support::get_posts_per_view $query = ' . var_export( $query, true ), 0 );
|
129 |
+
//error_log( __LINE__ . ' SMC_Sync_Support::get_posts_per_view $query_parameters = ' . var_export( $query_parameters, true ), 0 );
|
130 |
+
if ( ! empty( $query_parameters ) ) {
|
131 |
+
$results = $wpdb->get_results( $wpdb->prepare( $query, $query_parameters ) );
|
132 |
+
} else {
|
133 |
+
$results = $wpdb->get_results( $query );
|
134 |
+
}
|
135 |
+
//error_log( __LINE__ . ' SMC_Sync_Support::get_posts_per_view parent/child $results = ' . var_export( $results, true ), 0 );
|
136 |
+
|
137 |
+
if ( is_array( $results ) ) {
|
138 |
+
$assignments = array();
|
139 |
+
foreach ( $results as $result ) {
|
140 |
+
$assignments[ $result->post_parent ][ $result->ID ] = array();
|
141 |
+
$assignments[ $result->post_parent ][ 'ttids' ] = array();
|
142 |
+
if ( 'all' == $fields ) {
|
143 |
+
$assignments[ $result->post_parent ][ 'terms' ] = array();
|
144 |
+
}
|
145 |
+
}
|
146 |
+
//error_log( __LINE__ . ' SMC_Sync_Support::get_posts_per_view parent/child $assignments = ' . var_export( $assignments, true ), 0 );
|
147 |
+
} else {
|
148 |
+
return array( 'sync' => 0, 'unsync' => 0 );
|
149 |
+
}
|
150 |
+
|
151 |
+
// Build an array of SQL clauses to find Child terms
|
152 |
+
$query = array();
|
153 |
+
$query_parameters = array();
|
154 |
+
|
155 |
+
$query[] = "SELECT p2.ID AS `post_parent`, p.ID, tr.term_taxonomy_id FROM {$wpdb->posts} AS p";
|
156 |
+
|
157 |
+
// INNER JOIN removes posts with no attachments
|
158 |
+
$query[] = "INNER JOIN {$wpdb->posts} as p2";
|
159 |
+
$query[] = "ON (p.post_parent = p2.ID)";
|
160 |
+
|
161 |
+
$query[] = "LEFT JOIN {$wpdb->term_relationships} as tr";
|
162 |
+
$query[] = "ON (p.ID = tr.object_id)";
|
163 |
+
|
164 |
+
$query[] = "LEFT JOIN {$wpdb->term_taxonomy} as tt";
|
165 |
+
$query[] = "ON (tr.term_taxonomy_id = tt.term_taxonomy_id)";
|
166 |
+
|
167 |
+
$query[] = "WHERE p2.post_type = '{$post_type}'";
|
168 |
+
$query[] = "AND p2.post_status != 'trash'";
|
169 |
+
|
170 |
+
$placeholders = array();
|
171 |
+
foreach ( $active_taxonomies as $tax_name => $tax_object ) {
|
172 |
+
$placeholders[] = '%s';
|
173 |
+
$query_parameters[] = $tax_name;
|
174 |
+
}
|
175 |
+
|
176 |
+
$query[] = 'AND ( tt.taxonomy IN (' . join( ',', $placeholders ) . ') )';
|
177 |
+
if ( ! empty( $post_parents ) ) {
|
178 |
+
$placeholders = array();
|
179 |
+
foreach ( $post_parents as $post_parent ) {
|
180 |
+
$placeholders[] = '%s';
|
181 |
+
$query_parameters[] = $post_parent;
|
182 |
+
}
|
183 |
+
|
184 |
+
$query[] = 'AND ( p.post_parent IN (' . join( ',', $placeholders ) . ') )';
|
185 |
+
}
|
186 |
+
|
187 |
+
$query[] = "AND p.post_type = 'attachment'";
|
188 |
+
$query[] = "AND p.post_status = 'inherit'";
|
189 |
+
$query[] = "ORDER BY p.post_parent, p.ID, tr.term_taxonomy_id";
|
190 |
+
|
191 |
+
$query = join(' ', $query);
|
192 |
+
//error_log( __LINE__ . ' SMC_Sync_Support::get_posts_per_view $query = ' . var_export( $query, true ), 0 );
|
193 |
+
//error_log( __LINE__ . ' SMC_Sync_Support::get_posts_per_view $query_parameters = ' . var_export( $query_parameters, true ), 0 );
|
194 |
+
if ( ! empty( $query_parameters ) ) {
|
195 |
+
$results = $wpdb->get_results( $wpdb->prepare( $query, $query_parameters ) );
|
196 |
+
} else {
|
197 |
+
$results = $wpdb->get_results( $query );
|
198 |
+
}
|
199 |
+
//error_log( __LINE__ . ' SMC_Sync_Support::get_posts_per_view child term $results = ' . var_export( $results, true ), 0 );
|
200 |
+
|
201 |
+
if ( is_array( $results ) ) {
|
202 |
+
foreach ( $results as $result ) {
|
203 |
+
$assignments[ $result->post_parent ][ $result->ID ][ $result->term_taxonomy_id ] = (integer) $result->term_taxonomy_id;
|
204 |
+
}
|
205 |
+
//error_log( __LINE__ . ' SMC_Sync_Support::get_posts_per_view child term $assignments = ' . var_export( $assignments, true ), 0 );
|
206 |
+
} else {
|
207 |
+
return array( 'sync' => 0, 'unsync' => 0 );
|
208 |
+
}
|
209 |
+
|
210 |
+
// Build an array of SQL clauses to find Parent terms
|
211 |
+
$query = array();
|
212 |
+
$query_parameters = array();
|
213 |
+
|
214 |
+
if ( 'all' == $fields ) {
|
215 |
+
$query[] = "SELECT DISTINCT p2.ID, tr.term_taxonomy_id, tt.taxonomy, t.term_id, t.slug FROM {$wpdb->posts} AS p";
|
216 |
+
} else {
|
217 |
+
$query[] = "SELECT DISTINCT p2.ID, tr.term_taxonomy_id FROM {$wpdb->posts} AS p";
|
218 |
+
}
|
219 |
+
|
220 |
+
// INNER JOIN removes posts with no attachments
|
221 |
+
$query[] = "INNER JOIN {$wpdb->posts} as p2";
|
222 |
+
$query[] = "ON (p.post_parent = p2.ID)";
|
223 |
+
|
224 |
+
$query[] = "LEFT JOIN {$wpdb->term_relationships} as tr";
|
225 |
+
$query[] = "ON (p2.ID = tr.object_id)";
|
226 |
+
|
227 |
+
$query[] = "LEFT JOIN {$wpdb->term_taxonomy} as tt";
|
228 |
+
$query[] = "ON (tr.term_taxonomy_id = tt.term_taxonomy_id)";
|
229 |
+
|
230 |
+
if ( 'all' == $fields ) {
|
231 |
+
$query[] = "LEFT JOIN {$wpdb->terms} as t";
|
232 |
+
$query[] = "ON (tt.term_id = t.term_id)";
|
233 |
+
}
|
234 |
+
|
235 |
+
$query[] = "WHERE p2.post_type = '{$post_type}'";
|
236 |
+
$query[] = "AND p2.post_status != 'trash'";
|
237 |
+
|
238 |
+
$placeholders = array();
|
239 |
+
foreach ( $active_taxonomies as $tax_name => $tax_object ) {
|
240 |
+
$placeholders[] = '%s';
|
241 |
+
$query_parameters[] = $tax_name;
|
242 |
+
}
|
243 |
+
|
244 |
+
$query[] = 'AND ( tt.taxonomy IN (' . join( ',', $placeholders ) . ') )';
|
245 |
+
|
246 |
+
if ( ! empty( $post_parents ) ) {
|
247 |
+
$placeholders = array();
|
248 |
+
foreach ( $post_parents as $post_parent ) {
|
249 |
+
$placeholders[] = '%s';
|
250 |
+
$query_parameters[] = $post_parent;
|
251 |
+
}
|
252 |
+
|
253 |
+
$query[] = 'AND ( p.post_parent IN (' . join( ',', $placeholders ) . ') )';
|
254 |
+
}
|
255 |
+
|
256 |
+
$query[] = "AND p.post_type = 'attachment'";
|
257 |
+
$query[] = "AND p.post_status = 'inherit'";
|
258 |
+
|
259 |
+
//$query[] = "GROUP BY p2.ID, tr.term_taxonomy_id";
|
260 |
+
$query[] = "ORDER BY p2.ID, tr.term_taxonomy_id";
|
261 |
+
|
262 |
+
$query = join(' ', $query);
|
263 |
+
//error_log( __LINE__ . ' SMC_Sync_Support::get_posts_per_view $query = ' . var_export( $query, true ), 0 );
|
264 |
+
//error_log( __LINE__ . ' SMC_Sync_Support::get_posts_per_view $query_parameters = ' . var_export( $query_parameters, true ), 0 );
|
265 |
+
if ( ! empty( $query_parameters ) ) {
|
266 |
+
$results = $wpdb->get_results( $wpdb->prepare( $query, $query_parameters ) );
|
267 |
+
} else {
|
268 |
+
$results = $wpdb->get_results( $query );
|
269 |
+
}
|
270 |
+
//error_log( __LINE__ . ' SMC_Sync_Support::get_posts_per_view $results = ' . var_export( $results, true ), 0 );
|
271 |
+
|
272 |
+
if ( is_array( $results ) ) {
|
273 |
+
foreach ( $results as $result ) {
|
274 |
+
$assignments[ $result->ID ][ 'ttids' ][ $result->term_taxonomy_id ] = (integer) $result->term_taxonomy_id;
|
275 |
+
if ( 'all' == $fields ) {
|
276 |
+
$assignments[ $result->ID ][ 'terms' ][ $result->taxonomy ][ $result->term_taxonomy_id ] = array( 'term_id' => (integer) $result->term_id, 'slug' => $result->slug );
|
277 |
+
}
|
278 |
+
}
|
279 |
+
//error_log( __LINE__ . ' SMC_Sync_Support::get_posts_per_view all $assignments = ' . var_export( $assignments, true ), 0 );
|
280 |
+
} else {
|
281 |
+
return array( 'sync' => 0, 'unsync' => 0 );
|
282 |
+
}
|
283 |
+
|
284 |
+
// Compute sync status
|
285 |
+
foreach ( $assignments as $parent_id => $assignment ) {
|
286 |
+
//error_log( __LINE__ ."' SMC_Sync_Support::get_posts_per_view (parent {$parent_id}) assignment = " . var_export( $assignment, true ), 0 );
|
287 |
+
$parent_terms = $assignment['ttids'];
|
288 |
+
unset( $assignment['ttids'] );
|
289 |
+
unset( $assignment['terms'] );
|
290 |
+
$assignments[ $parent_id ]['smc_sync'] = true;
|
291 |
+
foreach ( $assignment as $child_id => $child_terms ) {
|
292 |
+
$smc_sync = $parent_terms == $child_terms;
|
293 |
+
$assignments[ $parent_id ][ $child_id ]['smc_sync'] = $smc_sync;
|
294 |
+
$assignments[ $parent_id ]['smc_sync'] &= $smc_sync;
|
295 |
+
}
|
296 |
+
}
|
297 |
+
//error_log( __LINE__ . ' SMC_Sync_Support::get_posts_per_view final $assignments = ' . var_export( $assignments, true ), 0 );
|
298 |
+
|
299 |
+
switch ( $smc_status ) {
|
300 |
+
case 'sync':
|
301 |
+
$posts_per_view = array();
|
302 |
+
foreach ( $assignments as $parent_id => $assignment ) {
|
303 |
+
if ( $assignment['smc_sync'] ) {
|
304 |
+
if ( 'ids' == $fields ) {
|
305 |
+
$posts_per_view[] = $parent_id;
|
306 |
+
} else {
|
307 |
+
$posts_per_view[ $parent_id ] = $assignment;
|
308 |
+
}
|
309 |
+
}
|
310 |
+
}
|
311 |
+
|
312 |
+
//error_log( __LINE__ . ' SMC_Sync_Support::get_posts_per_view sync $posts_per_view = ' . var_export( $posts_per_view, true ), 0 );
|
313 |
+
return $posts_per_view;
|
314 |
+
case 'unsync':
|
315 |
+
$posts_per_view = array();
|
316 |
+
foreach ( $assignments as $parent_id => $assignment ) {
|
317 |
+
if ( ! $assignment['smc_sync'] ) {
|
318 |
+
if ( 'ids' == $fields ) {
|
319 |
+
$posts_per_view[] = $parent_id;
|
320 |
+
} else {
|
321 |
+
$posts_per_view[ $parent_id ] = $assignment;
|
322 |
+
}
|
323 |
+
}
|
324 |
+
}
|
325 |
+
|
326 |
+
//error_log( __LINE__ . ' SMC_Sync_Support::get_posts_per_view unsync $posts_per_view = ' . var_export( $posts_per_view, true ), 0 );
|
327 |
+
return $posts_per_view;
|
328 |
+
} // smc_status
|
329 |
+
|
330 |
+
// Compute sync/unsync counts
|
331 |
+
$sync_count = $unsync_count = 0;
|
332 |
+
foreach ( $assignments as $parent_id => $assignment ) {
|
333 |
+
$sync_count += $assignment['smc_sync'];
|
334 |
+
$unsync_count += 1 - $assignment['smc_sync'];
|
335 |
+
}
|
336 |
+
|
337 |
+
$posts_per_view['sync'] = $sync_count;
|
338 |
+
$posts_per_view['unsync'] = $unsync_count; //( $total_count > $sync_count ) ? $total_count - $sync_count : 0;
|
339 |
+
return $posts_per_view;
|
340 |
+
}
|
341 |
+
|
342 |
+
/**
|
343 |
+
* Assemble taxonomy and term assignments for parent and children
|
344 |
+
*
|
345 |
+
* @since 1.0.2
|
346 |
+
*
|
347 |
+
* @param integer ID of the parent post
|
348 |
+
* @param array IDs of children
|
349 |
+
*
|
350 |
+
* @return array ( [object_id] => array( [taxonomy] => array( [term_taxonomy_id] => array( 'id' => term_id, 'slug' => term_slug )... 'smc_sync' => true/false )... 'smc_sync' => true/false )
|
351 |
+
*/
|
352 |
+
public static function get_terms( $parent_id, $children ) {
|
353 |
+
global $wpdb;
|
354 |
+
static $active_taxonomies = NULL, $current_type = NULL;
|
355 |
+
//error_log( __LINE__ . " SMC_Sync_Support::get_terms( $parent_id ) \$children = " . var_export( $children, true ), 0 );
|
356 |
+
|
357 |
+
$parent = get_post( $parent_id );
|
358 |
+
|
359 |
+
if ( NULL == $active_taxonomies || $current_type !== $parent->post_type ) {
|
360 |
+
$current_type = $parent->post_type;
|
361 |
+
$active_taxonomies = SMC_Sync_Support::get_active_taxonomies( $current_type );
|
362 |
+
}
|
363 |
+
//error_log( __LINE__ . ' SMC_Sync_Support::get_terms $active_taxonomies( {$current_type} ) = ' . var_export( $active_taxonomies, true ), 0 );
|
364 |
+
|
365 |
+
$posts = implode( ',', array_merge( array( $parent_id ), $children ) );
|
366 |
+
//error_log( __LINE__ . ' SMC_Sync_Support::get_terms $posts = ' . var_export( $posts, true ), 0 );
|
367 |
+
|
368 |
+
$query = "SELECT object_id, tt.term_taxonomy_id, tt.term_id, slug, taxonomy FROM " . $wpdb->term_relationships . " as tr INNER JOIN " . $wpdb->term_taxonomy . " AS tt ON tr.term_taxonomy_id = tt.term_taxonomy_id INNER JOIN " . $wpdb->terms . " AS t ON tt.term_id = t.term_id WHERE tr.object_id IN ( {$posts} )";
|
369 |
+
//error_log( __LINE__ . ' SMC_Sync_Support::get_terms $query = ' . var_export( $query, true ), 0 );
|
370 |
+
|
371 |
+
$terms = $wpdb->get_results( $query, OBJECT );
|
372 |
+
//error_log( __LINE__ . ' SMC_Sync_Support::get_terms $terms = ' . var_export( $terms, true ), 0 );
|
373 |
+
|
374 |
+
$results[ $parent_id ] = array();
|
375 |
+
foreach ( $children as $child ) {
|
376 |
+
$results[ $child ]['smc_sync'] = true;
|
377 |
+
}
|
378 |
+
|
379 |
+
$taxonomies = array();
|
380 |
+
foreach( $terms as $term ) {
|
381 |
+
if ( array_key_exists( $term->taxonomy, $active_taxonomies ) ) {
|
382 |
+
$taxonomies[ $term->taxonomy ] = $term->taxonomy;
|
383 |
+
$results[ $term->object_id ][ $term->taxonomy ][ $term->term_taxonomy_id ] = array( 'id' => (integer) $term->term_id, 'slug' => $term->slug );
|
384 |
+
}
|
385 |
+
}
|
386 |
+
//error_log( __LINE__ . ' SMC_Sync_Support::get_terms $taxonomies = ' . var_export( $taxonomies, true ), 0 );
|
387 |
+
//error_log( __LINE__ . ' SMC_Sync_Support::get_terms $results = ' . var_export( $results, true ), 0 );
|
388 |
+
|
389 |
+
// Add synchronization state information
|
390 |
+
foreach ( $taxonomies as $taxonomy ) {
|
391 |
+
if ( isset( $results[ $parent_id ][ $taxonomy ] ) ) {
|
392 |
+
$parent_terms = $results[ $parent_id ][ $taxonomy ];
|
393 |
+
} else {
|
394 |
+
$parent_terms = $results[ $parent_id ][ $taxonomy ] = array();
|
395 |
+
}
|
396 |
+
//error_log( __LINE__ ."' SMC_Sync_Support::get_terms ({$taxonomy}) \$parent_terms = " . var_export( $parent_terms, true ), 0 );
|
397 |
+
|
398 |
+
foreach( $children as $child ) {
|
399 |
+
if ( ! isset( $results[ $child ][ $taxonomy ] ) ) {
|
400 |
+
$results[ $child ][ $taxonomy ] = array();
|
401 |
+
}
|
402 |
+
|
403 |
+
$results[ $child ][ $taxonomy ]['smc_sync'] = ( $parent_terms == $results[ $child ][ $taxonomy ] );
|
404 |
+
|
405 |
+
// All taxonomies must be synched for the overall child to be synched
|
406 |
+
if ( isset( $results[ $child ]['smc_sync'] ) ) {
|
407 |
+
$results[ $child ]['smc_sync'] = $results[ $child ]['smc_sync'] && $results[ $child ][ $taxonomy ]['smc_sync'];
|
408 |
+
} else {
|
409 |
+
$results[ $child ]['smc_sync'] = $results[ $child ][ $taxonomy ]['smc_sync'];
|
410 |
+
}
|
411 |
+
//error_log( __LINE__ ."' SMC_Sync_Support::get_terms ({$child}) \$results = " . var_export( $results, true ), 0 );
|
412 |
+
}
|
413 |
+
}
|
414 |
+
|
415 |
+
//error_log( __LINE__ . ' SMC_Sync_Support::get_terms $results = ' . var_export( $results, true ), 0 );
|
416 |
+
return $results;
|
417 |
+
} // get_terms
|
418 |
+
|
419 |
+
/**
|
420 |
+
* Sync all children in an array of assignments
|
421 |
+
*
|
422 |
+
* @since 1.0.2
|
423 |
+
*
|
424 |
+
* @param array ( [parent_id] = array ( [child_id] => array( ttids, smc_sync ) ) )
|
425 |
+
* @return array update counts; array ( 'parent_count', 'children_count' )
|
426 |
+
*/
|
427 |
+
public static function sync_all( $assignments ) {
|
428 |
+
//error_log( __LINE__ . ' SMC_Sync_Support::sync_all $assignments = ' . var_export( $assignments, true ), 0 );
|
429 |
+
|
430 |
+
$parent_count = 0;
|
431 |
+
$children_count = 0;
|
432 |
+
$initial_tax_input = array();
|
433 |
+
|
434 |
+
// Only taxonomies used for both posts AND attachments are tested
|
435 |
+
$active_taxonomies = SMC_Sync_Support::get_active_taxonomies();
|
436 |
+
foreach ( $active_taxonomies as $tax_name => $tax_object ) {
|
437 |
+
$tax_action[ $tax_name ] = 'sync';
|
438 |
+
$initial_tax_input[ $tax_name ] = array();
|
439 |
+
}
|
440 |
+
//error_log( __LINE__ . ' SMC_Sync_Support::sync_all $active_taxonomies = ' . var_export( $active_taxonomies, true ), 0 );
|
441 |
+
//error_log( __LINE__ . ' SMC_Sync_Support::sync_all $tax_action = ' . var_export( $tax_action, true ), 0 );
|
442 |
+
|
443 |
+
foreach( $assignments as $parent_id => $assignment ) {
|
444 |
+
$taxonomy_terms = $assignment[ 'terms' ];
|
445 |
+
unset( $assignment['terms'] );
|
446 |
+
unset( $assignment['ttids'] );
|
447 |
+
unset( $assignment['smc_sync'] );
|
448 |
+
|
449 |
+
$tax_input = $initial_tax_input;
|
450 |
+
foreach( $taxonomy_terms as $taxonomy => $terms ) {
|
451 |
+
foreach( $terms as $ttid => $term ) {
|
452 |
+
if ( $active_taxonomies[ $taxonomy ]->hierarchical ) {
|
453 |
+
$tax_input[ $taxonomy ][] = $term['term_id'];
|
454 |
+
} else {
|
455 |
+
$tax_input[ $taxonomy ][] = $term['slug'];
|
456 |
+
}
|
457 |
+
} // term
|
458 |
+
|
459 |
+
if ( ! $active_taxonomies[ $taxonomy ]->hierarchical ) {
|
460 |
+
$tax_input[ $taxonomy ] = implode( ',', $tax_input[ $taxonomy ] );
|
461 |
+
}
|
462 |
+
} // taxonomy
|
463 |
+
|
464 |
+
$children = array();
|
465 |
+
foreach ( $assignment as $child => $terms ) {
|
466 |
+
$children[] = $child;
|
467 |
+
}
|
468 |
+
//error_log( __LINE__ . ' SMC_Sync_Support::sync_all $parent_id = ' . var_export( $parent_id, true ), 0 );
|
469 |
+
//error_log( __LINE__ . ' SMC_Sync_Support::sync_all $children = ' . var_export( $children, true ), 0 );
|
470 |
+
//error_log( __LINE__ . ' SMC_Sync_Support::sync_all $tax_input = ' . var_export( $tax_input, true ), 0 );
|
471 |
+
//error_log( __LINE__ . ' SMC_Sync_Support::sync_all $tax_action = ' . var_export( $tax_action, true ), 0 );
|
472 |
+
|
473 |
+
$results = SMC_Sync_Support::sync_terms( $parent_id, $children, $tax_input, $tax_action );
|
474 |
+
//error_log( __LINE__ ."' SMC_Sync_Support::sync_all {$parent_id} results = " . var_export( $results, true ), 0 );
|
475 |
+
if ( $results['updated'] ) {
|
476 |
+
$parent_count++;
|
477 |
+
$children_count += $results['updated'];
|
478 |
+
}
|
479 |
+
} // parent_id
|
480 |
+
|
481 |
+
$results = compact( 'parent_count', 'children_count' );
|
482 |
+
//error_log( __LINE__ . ' SMC_Sync_Support::sync_all $results = ' . var_export( $results, true ), 0 );
|
483 |
+
return $results;
|
484 |
+
}
|
485 |
+
|
486 |
+
/**
|
487 |
+
* Synchronize one or more children to the parent
|
488 |
+
*
|
489 |
+
* @since 1.0.6
|
490 |
+
*
|
491 |
+
* @param integer ID of the parent post
|
492 |
+
* @param integer|array ID of child/children to be synced
|
493 |
+
*
|
494 |
+
* @return array update counts; array ( 'parent_count', 'children_count' )
|
495 |
+
*/
|
496 |
+
public static function sync_children_to_parent( $parent_id, $children ) {
|
497 |
+
//error_log( __LINE__ . " SMC_Sync_Support::sync_children_to_parent( $parent_id ) \$children = " . var_export( $children, true ), 0 );
|
498 |
+
$parent = get_post( $parent_id );
|
499 |
+
$all_assignments = SMC_Sync_Support::get_posts_per_view( array( 'post_type' => $parent->post_type, 'smc_status' => 'unsync', 'post_parents' => array( $parent_id ), 'fields' => 'all' ) );
|
500 |
+
//error_log( __LINE__ . " SMC_Sync_Support::sync_children_to_parent( $parent_id ) \$all_assignments = " . var_export( $all_assignments, true ), 0 );
|
501 |
+
|
502 |
+
// Convert single child to an array
|
503 |
+
$children = (array) $children;
|
504 |
+
|
505 |
+
// Select only the requested, unsynced children
|
506 |
+
$all_assignments = $all_assignments[ $parent_id ];
|
507 |
+
//error_log( __LINE__ . " SMC_Sync_Support::sync_children_to_parent( $parent_id ) \$all_assignments = " . var_export( $all_assignments, true ), 0 );
|
508 |
+
$new_assignment['ttids'] = $all_assignments['ttids'];
|
509 |
+
$new_assignment['terms'] = $all_assignments['terms'];
|
510 |
+
$new_assignment['smc_sync'] = $all_assignments['smc_sync'];
|
511 |
+
//error_log( __LINE__ . " SMC_Sync_Support::sync_children_to_parent( $parent_id ) \$new_assignment = " . var_export( $new_assignment, true ), 0 );
|
512 |
+
|
513 |
+
$children_count = 0;
|
514 |
+
foreach( $children as $child_id ) {
|
515 |
+
// Is the child unsynchronized?
|
516 |
+
if ( isset( $all_assignments[ $child_id ] ) ) {
|
517 |
+
$new_assignment[ $child_id ] = $all_assignments[ $child_id ];
|
518 |
+
$children_count++;
|
519 |
+
}
|
520 |
+
}
|
521 |
+
//error_log( __LINE__ . " SMC_Sync_Support::sync_children_to_parent( $children_count ) \$new_assignment = " . var_export( $new_assignment, true ), 0 );
|
522 |
+
|
523 |
+
if ( $children_count ) {
|
524 |
+
$child_assignments[ $parent_id ] = $new_assignment;
|
525 |
+
return SMC_Sync_Support::sync_all( $child_assignments );
|
526 |
+
}
|
527 |
+
|
528 |
+
return array ( 'parent_count' => 0, 'children_count' => 0 );
|
529 |
+
}
|
530 |
+
|
531 |
+
/**
|
532 |
+
* Synchronize terms from parent to children
|
533 |
+
*
|
534 |
+
* @since 1.0.2
|
535 |
+
*
|
536 |
+
* @param integer ID of the parent post
|
537 |
+
* @param array IDs of children to be synced
|
538 |
+
* @param array taxonomy => terms to be assigned
|
539 |
+
* @param array taxonomy => sync/ignore to control assignment
|
540 |
+
*
|
541 |
+
* @return array ( 'parent_changed' => true/false, 'updated' => count( $children_changed )
|
542 |
+
*/
|
543 |
+
public static function sync_terms( $parent_id, $children, $tax_inputs, $tax_actions ) {
|
544 |
+
global $wpdb;
|
545 |
+
//error_log( __LINE__ . ' SMC_Sync_Support::sync_terms $parent_id = ' . var_export( $parent_id, true ), 0 );
|
546 |
+
//error_log( __LINE__ . ' SMC_Sync_Support::sync_terms $children = ' . var_export( $children, true ), 0 );
|
547 |
+
//error_log( __LINE__ . ' SMC_Sync_Support::sync_terms $tax_input = ' . var_export( $tax_inputs, true ), 0 );
|
548 |
+
//error_log( __LINE__ . ' SMC_Sync_Support::sync_terms $tax_action = ' . var_export( $tax_actions, true ), 0 );
|
549 |
+
|
550 |
+
$term_assignments = SMC_Sync_Support::get_terms( $parent_id, $children );
|
551 |
+
//error_log( __LINE__ . ' SMC_Sync_Support::sync_terms $term_assignments = ' . var_export( $term_assignments, true ), 0 );
|
552 |
+
|
553 |
+
$parent_changed = false;
|
554 |
+
$children_changed = array();
|
555 |
+
foreach ( $tax_actions as $taxonomy => $action ) {
|
556 |
+
if ( 'ignore' == $action ) {
|
557 |
+
continue;
|
558 |
+
}
|
559 |
+
|
560 |
+
$taxonomy_obj = get_taxonomy( $taxonomy );
|
561 |
+
//error_log( __LINE__ ."' SMC_Sync_Support::sync_terms \$taxonomy_obj = " . var_export( $taxonomy_obj, true ), 0 );
|
562 |
+
if ( ! current_user_can( $taxonomy_obj->cap->assign_terms ) ) {
|
563 |
+
continue;
|
564 |
+
}
|
565 |
+
|
566 |
+
/*
|
567 |
+
* Arrays are term-ids, strings are slugs
|
568 |
+
*/
|
569 |
+
$terms = $tax_inputs[ $taxonomy ];
|
570 |
+
if ( is_array( $terms ) ) {
|
571 |
+
$terms = array_filter( array_map( 'absint', $terms ) );
|
572 |
+
} else {
|
573 |
+
$comma = _x( ',', 'tag_delimiter', 'smart-media-categories' );
|
574 |
+
if ( ',' !== $comma ) {
|
575 |
+
$terms = str_replace( $comma, ',', $terms );
|
576 |
+
}
|
577 |
+
|
578 |
+
$terms = array_filter( array_map( 'trim', explode(',', $terms ) ) );
|
579 |
+
}
|
580 |
+
|
581 |
+
/*
|
582 |
+
* Get the parent terms, compare for changes, update as necessary
|
583 |
+
*/
|
584 |
+
$terms_before = array();
|
585 |
+
if ( isset( $term_assignments[ $parent_id ][ $taxonomy ] ) ) {
|
586 |
+
foreach( $term_assignments[ $parent_id ][ $taxonomy ] as $term_taxonomy_id => $term ) {
|
587 |
+
if ( 'smc_sync' != $term_taxonomy_id ) {
|
588 |
+
$terms_before[] = $term_taxonomy_id;
|
589 |
+
}
|
590 |
+
}
|
591 |
+
sort( $terms_before );
|
592 |
+
}
|
593 |
+
|
594 |
+
$terms_after = wp_set_post_terms( $parent_id, $terms, $taxonomy );
|
595 |
+
sort( $terms_after );
|
596 |
+
if ( $terms_after != $terms_before ) {
|
597 |
+
$parent_changed = true;
|
598 |
+
}
|
599 |
+
|
600 |
+
//error_log( __LINE__ ."' SMC_Sync_Support::sync_terms \$terms[{$taxonomy}] = " . var_export( $terms, true ), 0 );
|
601 |
+
//error_log( __LINE__ ."' SMC_Sync_Support::sync_terms \$parent_changed = " . var_export( $parent_changed, true ), 0 );
|
602 |
+
/*
|
603 |
+
* For each child, get the terms, compare for changes, update as necessary
|
604 |
+
*/
|
605 |
+
foreach( $children as $child ) {
|
606 |
+
$terms_before = array();
|
607 |
+
if ( isset( $term_assignments[ $child ][ $taxonomy ] ) ) {
|
608 |
+
foreach( $term_assignments[ $child ][ $taxonomy ] as $term_taxonomy_id => $term ) {
|
609 |
+
if ( 'smc_sync' != $term_taxonomy_id ) {
|
610 |
+
$terms_before[] = $term_taxonomy_id;
|
611 |
+
}
|
612 |
+
}
|
613 |
+
sort( $terms_before );
|
614 |
+
}
|
615 |
+
|
616 |
+
$terms_after = wp_set_post_terms( $child, $terms, $taxonomy );
|
617 |
+
sort( $terms_after );
|
618 |
+
if ( $terms_after != $terms_before ) {
|
619 |
+
$children_changed[ $child ] = $child;
|
620 |
+
}
|
621 |
+
//error_log( __LINE__ ."' SMC_Sync_Support::sync_terms \$terms_before[{$child}] = " . var_export( $terms_before, true ), 0 );
|
622 |
+
//error_log( __LINE__ ."' SMC_Sync_Support::sync_terms \$terms_after = " . var_export( $terms_after, true ), 0 );
|
623 |
+
//error_log( __LINE__ ."' SMC_Sync_Support::sync_terms \$children_changed = " . var_export( $children_changed, true ), 0 );
|
624 |
+
}
|
625 |
+
}
|
626 |
+
|
627 |
+
$updated = count( $children_changed );
|
628 |
+
return compact( 'parent_changed', 'updated' );
|
629 |
+
}
|
630 |
+
}
|
631 |
+
?>
|
examples/plugins/smart-media-categories/admin/includes/index.php
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?php // Silence is golden
|
examples/plugins/smart-media-categories/admin/views/index.php
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?php // Silence is golden
|
examples/plugins/smart-media-categories/admin/views/smc-admin.php
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Represents the view for the SMC Settings page.
|
4 |
+
*
|
5 |
+
* This includes the header, options, and other information that should provide
|
6 |
+
* The User Interface to the end user.
|
7 |
+
*
|
8 |
+
* @package Smart_Media_Categories_Admin
|
9 |
+
* @author David Lingren <dlingren@comcast.net>
|
10 |
+
* @license GPL-2.0+
|
11 |
+
* @link @TODO http://example.com
|
12 |
+
* @copyright 2014 David Lingren
|
13 |
+
*/
|
14 |
+
?>
|
15 |
+
|
16 |
+
<div class="wrap">
|
17 |
+
|
18 |
+
<?php screen_icon(); ?>
|
19 |
+
<h2><?php echo esc_html( get_admin_page_title() ); ?></h2>
|
20 |
+
<?php settings_errors(); ?>
|
21 |
+
|
22 |
+
<!-- @TODO: Provide markup for your options page here. -->
|
23 |
+
<?php SMC_Settings_Support::render_settings_page( $this->plugin_slug, $active_tab = 'smc_automatic_options' ); ?>
|
24 |
+
|
25 |
+
</div>
|
examples/plugins/smart-media-categories/admin/views/smc-posts-modal-form.php
ADDED
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* smc-posts-modal-form Parameters
|
4 |
+
*
|
5 |
+
* $form_url URL for processing form submission
|
6 |
+
* $form_action Ajax action suffix for processing form submission
|
7 |
+
* $sync_box HTML for Posts/All Posts Smart Media popup window
|
8 |
+
*/
|
9 |
+
?>
|
10 |
+
<form id="smc-posts-modal-form" action="<?php echo $form_url; ?>" method="post">
|
11 |
+
<input name="action" id="smc-posts-modal-action" type="hidden" value="<?php echo $form_action; ?>">
|
12 |
+
<div id="smc-posts-modal-div" style="display: none;">
|
13 |
+
<input name="parent" id="smc-posts-modal-parent" type="hidden" value="">
|
14 |
+
<input name="children[]" id="smc-posts-modal-children" type="hidden" value="">
|
15 |
+
<?php wp_nonce_field( 'smc_find_posts', 'smc-posts-modal-ajax-nonce', false ); ?>
|
16 |
+
<div id="smc-posts-modal-head-div">
|
17 |
+
<?php _e( 'Select Parent', $this->plugin_slug ); ?>
|
18 |
+
<div id="smc-posts-modal-close-div"></div>
|
19 |
+
</div>
|
20 |
+
<div id="smc-posts-modal-inside-div">
|
21 |
+
<div id="smc-posts-modal-search-div">
|
22 |
+
<label class="screen-reader-text" for="smc-posts-modal-input"><?php _e( 'Search', 'smart-media-categories' ); ?></label>
|
23 |
+
<input name="smc_set_parent_search_text" id="smc-posts-modal-input" type="text" value="">
|
24 |
+
<span class="spinner"></span>
|
25 |
+
<input class="button" id="smc-posts-modal-search" type="button" value="<?php esc_attr_e( 'Search', 'smart-media-categories' ); ?>">
|
26 |
+
<?php echo $post_type_dropdown; ?>
|
27 |
+
<div class="clear"></div>
|
28 |
+
</div>
|
29 |
+
<div id="smc-posts-modal-titles-div">
|
30 |
+
<div id="smc-posts-modal-current-title-div">
|
31 |
+
<?php _e( 'For', 'smart-media-categories' ); ?>: <span id="smc-posts-modal-titles"></span>
|
32 |
+
</div>
|
33 |
+
</div>
|
34 |
+
<div id="smc-posts-modal-pagination-div">
|
35 |
+
<input class="button" id="smc-set-parent-previous" type="button" value="«">
|
36 |
+
<input class="button" id="smc-set-parent-next" type="button" value="»">
|
37 |
+
</div>
|
38 |
+
<div class="clear"></div>
|
39 |
+
<div id="smc-posts-modal-response-div">
|
40 |
+
<input name="smc_set_parent_count" id="smc-set-parent-count" type="hidden" value="<?php echo $count; ?>">
|
41 |
+
<input name="smc_set_parent_paged" id="smc-set-parent-paged" type="hidden" value="<?php echo $paged; ?>">
|
42 |
+
<input name="smc_set_parent_found" id="smc-set-parent-found" type="hidden" value="<?php echo $found; ?>">
|
43 |
+
<table class="widefat">
|
44 |
+
<thead><tr>
|
45 |
+
<th class="found-radio"><br /></th>
|
46 |
+
<th><?php _e( 'Title', 'smart-media-categories' ); ?></th>
|
47 |
+
<th class="no-break"><?php _e( 'Type', 'smart-media-categories' ); ?></th>
|
48 |
+
<th class="no-break"><?php _e( 'Date', 'smart-media-categories' ); ?></th>
|
49 |
+
<th class="no-break"><?php _e( 'Status', 'smart-media-categories' ); ?></th>
|
50 |
+
</tr></thead>
|
51 |
+
<tbody></tbody>
|
52 |
+
</table>
|
53 |
+
</div>
|
54 |
+
</div>
|
55 |
+
<div id="smc-posts-modal-buttons-div">
|
56 |
+
<?php submit_button( __( 'Cancel', 'smart-media-categories' ), 'button-secondary cancel alignleft', 'smc-posts-modal-cancel', false ); ?>
|
57 |
+
<?php submit_button( __( 'Select', 'smart-media-categories' ), 'button-primary alignright', 'smc-posts-modal-submit', false ); ?>
|
58 |
+
<div class="clear"></div>
|
59 |
+
</div>
|
60 |
+
</div><!-- smc-posts-modal-div -->
|
61 |
+
<table id="found-0-table" style="display: none">
|
62 |
+
<tbody>
|
63 |
+
<tr id="found-0-row" class="found-posts">
|
64 |
+
<td class="found-radio">
|
65 |
+
<input name="found_post_id" id="found-0" type="radio" value="0">
|
66 |
+
</td>
|
67 |
+
<td>
|
68 |
+
<label for="found-0">(<?php _e( 'Unattached', 'smart-media-categories' ); ?>)</label>
|
69 |
+
</td>
|
70 |
+
<td class="no-break">—</td>
|
71 |
+
<td class="no-break">—</td>
|
72 |
+
<td class="no-break">—</td>
|
73 |
+
</tr>
|
74 |
+
</tbody>
|
75 |
+
</table>
|
76 |
+
<?php echo $sync_box; ?>
|
77 |
+
</form>
|
examples/plugins/smart-media-categories/admin/views/smc-sync-category-block.php
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Category Block Parameters
|
4 |
+
*
|
5 |
+
* $tax_name taxonomy name, display format
|
6 |
+
* $tax_attr taxonomy slug, attribute format
|
7 |
+
* $tax_checklist checklist for one taxonomy
|
8 |
+
* $taxonomy_options sync/ignore radio buttons for one taxonomy
|
9 |
+
*/
|
10 |
+
?>
|
11 |
+
<div id="smc-sync-<?php echo $tax_attr; ?>-block">
|
12 |
+
<span class="title smc-sync-categories-label"><?php echo $tax_name; ?>
|
13 |
+
<span class="catshow"><?php _e( 'more', $this->plugin_slug ); ?></span>
|
14 |
+
<span class="cathide" style="display:none;"><?php _e( 'less', 'smart-media-categories' ); ?></span>
|
15 |
+
</span>
|
16 |
+
<input id="smc-tax-input-<?php echo $tax_attr; ?>" type="hidden" name="tax_input[<?php echo $tax_attr; ?>][]" value="0" />
|
17 |
+
<ul class="cat-checklist" id="smc-tax-checklist-<?php echo $tax_attr; ?>">
|
18 |
+
<?php echo $tax_checklist; ?>
|
19 |
+
</ul>
|
20 |
+
<?php echo $taxonomy_options; ?>
|
21 |
+
</div>
|
examples/plugins/smart-media-categories/admin/views/smc-sync-category-fieldset.php
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Category Fieldset Parameters
|
4 |
+
*
|
5 |
+
* $category_blocks sequence of hierarchical taxonomy checkbox lists
|
6 |
+
*/
|
7 |
+
?>
|
8 |
+
<fieldset class="smc-sync-col-center smc-sync-categories">
|
9 |
+
<div class="smc-sync-col" id="smc-sync-category-blocks">
|
10 |
+
<?php echo $category_blocks; ?>
|
11 |
+
</div>
|
12 |
+
</fieldset>
|
examples/plugins/smart-media-categories/admin/views/smc-sync-div.php
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* smc-sync-div Parameters
|
4 |
+
*
|
5 |
+
* $middle_column HTML for hierarchical taxonomies
|
6 |
+
* $right_column HTML for flat taxonomies
|
7 |
+
*/
|
8 |
+
?>
|
9 |
+
<div class="smc-sync-box" id="smc-sync-div" style="display: none;">
|
10 |
+
<div class="smc-sync-box-head" id="smc-sync-head">
|
11 |
+
<?php _e( 'Smart Media Categories', $this->plugin_slug ); ?>
|
12 |
+
<div id="smc-sync-close"></div>
|
13 |
+
</div>
|
14 |
+
<div class="smc-sync-box-inside" id="smc-sync-inside">
|
15 |
+
<fieldset class="smc-sync-col-left">
|
16 |
+
<div class="smc-sync-col" id="smc-sync-col-left">
|
17 |
+
<span class="title"><?php _e( 'Sync List', 'smart-media-categories' ); ?></span>
|
18 |
+
<div id="smc-sync-children-div"></div>
|
19 |
+
</div>
|
20 |
+
</fieldset>
|
21 |
+
<?php echo $middle_column; ?>
|
22 |
+
<?php echo $right_column; ?>
|
23 |
+
<fieldset class="smc-sync-col-right">
|
24 |
+
<div class="smc-sync-col" id="smc-sync-parent-blocks">
|
25 |
+
<div id="smc-sync-parent-block">
|
26 |
+
<span class="title"><?php _e( 'Parent', 'smart-media-categories' ); ?></span>
|
27 |
+
<span class="smc-parent" id="smc-current-parent" ></span>
|
28 |
+
<?php submit_button( __( 'Change', 'smart-media-categories' ), 'button-primary alignright', 'smc-sync-reattach', false ); ?>
|
29 |
+
</div>
|
30 |
+
</div>
|
31 |
+
</fieldset>
|
32 |
+
<div class="smc-sync-box-buttons" id="smc-sync-buttons-div">
|
33 |
+
<?php submit_button( __( 'Cancel', 'smart-media-categories' ), 'button-secondary cancel alignleft', 'smc-sync-cancel', false ); ?>
|
34 |
+
<?php submit_button( __( 'Update', 'smart-media-categories' ), 'button-primary alignright', 'smc-sync-update', false ); ?>
|
35 |
+
<span id="smc-sync-error" style="display:none"></span>
|
36 |
+
<div class="clear"></div>
|
37 |
+
</div>
|
38 |
+
</div>
|
39 |
+
</div><!-- smc-sync-div -->
|
examples/plugins/smart-media-categories/admin/views/smc-sync-tag-block.php
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Tag Block Parameters
|
4 |
+
*
|
5 |
+
* $tax_name taxonomy name, display format
|
6 |
+
* $tax_attr taxonomy slug, attribute format
|
7 |
+
* $taxonomy_options sync/ignore radio buttons for one taxonomy
|
8 |
+
*/
|
9 |
+
?>
|
10 |
+
<div id="smc-sync-<?php echo $tax_attr; ?>-block">
|
11 |
+
<label class="smc-sync-tags">
|
12 |
+
<span class="title"><?php echo $tax_name; ?></span>
|
13 |
+
<textarea name="tax_input[<?php echo $tax_attr; ?>]" class="smc-tags" id="smc-tax-input-<?php echo $tax_attr; ?>" cols="22" rows="1"></textarea>
|
14 |
+
</label>
|
15 |
+
<?php echo $taxonomy_options; ?>
|
16 |
+
</div>
|
examples/plugins/smart-media-categories/admin/views/smc-sync-tag-fieldset.php
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Tag Fieldset Parameters
|
4 |
+
*
|
5 |
+
* $tag_blocks sequence of flat taxonomy text areas
|
6 |
+
*/
|
7 |
+
?>
|
8 |
+
<fieldset class="smc-sync-col-right">
|
9 |
+
<div class="smc-sync-col" id="smc-sync-tag-blocks">
|
10 |
+
<?php echo $tag_blocks; ?>
|
11 |
+
</div>
|
12 |
+
</fieldset>
|
examples/plugins/smart-media-categories/admin/views/smc-sync-tax-options.php
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Taxonomy Options Parameters
|
4 |
+
*
|
5 |
+
* $tax_attr taxonomy slug, attribute format
|
6 |
+
*/
|
7 |
+
?>
|
8 |
+
<div class="smc-sync-taxonomy-options" id="smc-sync-<?php echo $tax_attr; ?>-options">
|
9 |
+
<input type="radio" name="tax_action[<?php echo $tax_attr; ?>]" id="smc-sync-<?php echo $tax_attr; ?>-sync" checked="checked" value="sync" /> <?php _e( 'Sync', $this->plugin_slug ); ?>
|
10 |
+
<input type="radio" name="tax_action[<?php echo $tax_attr; ?>]" id="smc-sync-<?php echo $tax_attr; ?>-ignore" value="ignore" /> <?php _e( 'No Change', 'smart-media-categories' ); ?>
|
11 |
+
</div>
|
examples/plugins/smart-media-categories/assets/index.php
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?php // Silence is golden
|
examples/plugins/smart-media-categories/includes/index.php
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?php // Silence is golden
|
examples/plugins/smart-media-categories/index.php
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?php // Silence is golden
|
examples/plugins/smart-media-categories/languages/index.php
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?php // Silence is golden
|
examples/plugins/smart-media-categories/languages/smart-media-categories.pot
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (C) 2013 TODO
|
2 |
+
# This file is distributed under the same license as the TODO package.
|
3 |
+
msgid ""
|
4 |
+
msgstr ""
|
5 |
+
"Project-Id-Version: TODO 1.0.0\n"
|
6 |
+
"Report-Msgid-Bugs-To: http://wordpress.org/plugins/plugin-name\n"
|
7 |
+
"POT-Creation-Date: 2013-05-10 11:23:19+00:00\n"
|
8 |
+
"PO-Revision-Date: 2013-05-10 10:37-0500\n"
|
9 |
+
"Last-Translator: FULL NAME <email@example.com>\n"
|
10 |
+
"Language-Team: LANGUAGE <translations@example.com >\n"
|
11 |
+
"MIME-Version: 1.0\n"
|
12 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
13 |
+
"Content-Transfer-Encoding: 8bit\n"
|
14 |
+
"X-Generator: Poedit 1.5.7\n"
|
15 |
+
"X-Poedit-KeywordsList: __;_e;_n;_x;esc_html_e;esc_html__;esc_attr_e;"
|
16 |
+
"esc_attr__;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_x:1,2c;_n:1,2\n"
|
17 |
+
"X-Poedit-Basepath: ../\n"
|
18 |
+
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
19 |
+
"X-Poedit-SearchPath-0: .\n"
|
20 |
+
|
21 |
+
#: class-plugin-name-admin.php:170
|
22 |
+
msgid "Page Title"
|
23 |
+
msgstr ""
|
24 |
+
|
25 |
+
#: class-plugin-name-admin.php:171
|
26 |
+
msgid "Menu Text"
|
27 |
+
msgstr ""
|
28 |
+
|
29 |
+
#: class-plugin-name-admin.php:197
|
30 |
+
msgid "Settings"
|
31 |
+
msgstr ""
|
examples/plugins/smart-media-categories/public/assets/css/index.php
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?php // Silence is golden
|
examples/plugins/smart-media-categories/public/assets/css/public.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
/* This stylesheet is used to style the public-facing components of the plugin. */
|
examples/plugins/smart-media-categories/public/assets/index.php
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?php // Silence is golden
|
examples/plugins/smart-media-categories/public/assets/js/index.php
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?php // Silence is golden
|
examples/plugins/smart-media-categories/public/assets/js/public.js
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function ( $ ) {
|
2 |
+
"use strict";
|
3 |
+
|
4 |
+
$(function () {
|
5 |
+
|
6 |
+
// Place your public-facing JavaScript here
|
7 |
+
|
8 |
+
});
|
9 |
+
|
10 |
+
}(jQuery));
|
examples/plugins/smart-media-categories/public/class-smart-media-categories.php
ADDED
@@ -0,0 +1,385 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The Smart Media Categories (SMC) Plugin.
|
4 |
+
*
|
5 |
+
* @package Smart_Media_Categories
|
6 |
+
* @author David Lingren <dlingren@comcast.net>
|
7 |
+
* @license GPL-2.0+
|
8 |
+
* @link @TODO http://example.com
|
9 |
+
* @copyright 2014 David Lingren
|
10 |
+
*/
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Plugin class. This class works with the
|
14 |
+
* public-facing side of the WordPress site.
|
15 |
+
*
|
16 |
+
* @package Smart_Media_Categories
|
17 |
+
* @author David Lingren <dlingren@comcast.net>
|
18 |
+
*/
|
19 |
+
class Smart_Media_Categories {
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Plugin version, used for cache-busting of style and script file references.
|
23 |
+
*
|
24 |
+
* @since 1.0.0
|
25 |
+
*
|
26 |
+
* @var string
|
27 |
+
*/
|
28 |
+
const VERSION = '1.1.1';
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Unique identifier for your plugin.
|
32 |
+
*
|
33 |
+
*
|
34 |
+
* The variable name is used as the text domain when internationalizing strings
|
35 |
+
* of text. Its value should match the Text Domain file header in the main
|
36 |
+
* plugin file.
|
37 |
+
*
|
38 |
+
* @since 1.0.0
|
39 |
+
*
|
40 |
+
* @var string
|
41 |
+
*/
|
42 |
+
protected $plugin_slug = 'smart-media-categories';
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Unique JavaScript object name for your plugin.
|
46 |
+
*
|
47 |
+
*
|
48 |
+
* The variable name is used as the prefix for localized script variables.
|
49 |
+
* This is a JavaScript object name, so it cannot contain dashes.
|
50 |
+
* Use underscores or camelCasing.
|
51 |
+
*
|
52 |
+
* @since 1.0.0
|
53 |
+
*
|
54 |
+
* @var string
|
55 |
+
*/
|
56 |
+
protected $plugin_object = 'smart_media_categories';
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Instance of this class.
|
60 |
+
*
|
61 |
+
* @since 1.0.0
|
62 |
+
*
|
63 |
+
* @var object
|
64 |
+
*/
|
65 |
+
protected static $instance = NULL;
|
66 |
+
|
67 |
+
/**
|
68 |
+
* Initialize the plugin by setting localization and loading public scripts
|
69 |
+
* and styles.
|
70 |
+
*
|
71 |
+
* @since 1.0.0
|
72 |
+
*/
|
73 |
+
private function __construct() {
|
74 |
+
|
75 |
+
// Load plugin text domain
|
76 |
+
add_action( 'init', array( $this, 'load_plugin_textdomain' ) );
|
77 |
+
|
78 |
+
// Activate plugin when new blog is added
|
79 |
+
add_action( 'wpmu_new_blog', array( $this, 'activate_new_site' ) );
|
80 |
+
|
81 |
+
// Load public-facing style sheet and JavaScript.
|
82 |
+
add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_styles' ) );
|
83 |
+
add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
|
84 |
+
|
85 |
+
/* Define custom functionality.
|
86 |
+
* Refer To http://codex.wordpress.org/Plugin_API#Hooks.2C_Actions_and_Filters
|
87 |
+
*/
|
88 |
+
//add_action( '@TODO', array( $this, 'action_method_name' ) );
|
89 |
+
//add_filter( '@TODO', array( $this, 'filter_method_name' ) );
|
90 |
+
|
91 |
+
}
|
92 |
+
|
93 |
+
/**
|
94 |
+
* Return the plugin slug.
|
95 |
+
*
|
96 |
+
* @since 1.0.0
|
97 |
+
*
|
98 |
+
*@return Plugin slug variable.
|
99 |
+
*/
|
100 |
+
public function get_plugin_slug() {
|
101 |
+
return $this->plugin_slug;
|
102 |
+
}
|
103 |
+
|
104 |
+
/**
|
105 |
+
* Return the plugin object name.
|
106 |
+
*
|
107 |
+
* @since 1.0.0
|
108 |
+
*
|
109 |
+
*@return Plugin object variable.
|
110 |
+
*/
|
111 |
+
public function get_plugin_object() {
|
112 |
+
return $this->plugin_object;
|
113 |
+
}
|
114 |
+
|
115 |
+
/**
|
116 |
+
* Return an instance of this class.
|
117 |
+
*
|
118 |
+
* @since 1.0.0
|
119 |
+
*
|
120 |
+
* @return object A single instance of this class.
|
121 |
+
*/
|
122 |
+
public static function get_instance() {
|
123 |
+
|
124 |
+
// If the single instance hasn't been set, set it now.
|
125 |
+
if ( NULL == self::$instance ) {
|
126 |
+
self::$instance = new self;
|
127 |
+
}
|
128 |
+
|
129 |
+
return self::$instance;
|
130 |
+
}
|
131 |
+
|
132 |
+
/**
|
133 |
+
* Fired when the plugin is activated.
|
134 |
+
*
|
135 |
+
* @since 1.0.0
|
136 |
+
*
|
137 |
+
* @param boolean $network_wide True if WPMU superadmin uses
|
138 |
+
* "Network Activate" action, false if
|
139 |
+
* WPMU is disabled or plugin is
|
140 |
+
* activated on an individual blog.
|
141 |
+
*/
|
142 |
+
public static function activate( $network_wide ) {
|
143 |
+
|
144 |
+
if ( function_exists( 'is_multisite' ) && is_multisite() ) {
|
145 |
+
|
146 |
+
if ( $network_wide ) {
|
147 |
+
|
148 |
+
// Get all blog ids
|
149 |
+
$blog_ids = self::get_blog_ids();
|
150 |
+
|
151 |
+
foreach ( $blog_ids as $blog_id ) {
|
152 |
+
|
153 |
+
switch_to_blog( $blog_id );
|
154 |
+
self::single_activate();
|
155 |
+
}
|
156 |
+
|
157 |
+
restore_current_blog();
|
158 |
+
|
159 |
+
} else {
|
160 |
+
self::single_activate();
|
161 |
+
}
|
162 |
+
|
163 |
+
} else {
|
164 |
+
self::single_activate();
|
165 |
+
}
|
166 |
+
|
167 |
+
}
|
168 |
+
|
169 |
+
/**
|
170 |
+
* Fired when the plugin is deactivated.
|
171 |
+
*
|
172 |
+
* @since 1.0.0
|
173 |
+
*
|
174 |
+
* @param boolean $network_wide True if WPMU superadmin uses
|
175 |
+
* "Network Deactivate" action, false if
|
176 |
+
* WPMU is disabled or plugin is
|
177 |
+
* deactivated on an individual blog.
|
178 |
+
*/
|
179 |
+
public static function deactivate( $network_wide ) {
|
180 |
+
|
181 |
+
if ( function_exists( 'is_multisite' ) && is_multisite() ) {
|
182 |
+
|
183 |
+
if ( $network_wide ) {
|
184 |
+
|
185 |
+
// Get all blog ids
|
186 |
+
$blog_ids = self::get_blog_ids();
|
187 |
+
|
188 |
+
foreach ( $blog_ids as $blog_id ) {
|
189 |
+
|
190 |
+
switch_to_blog( $blog_id );
|
191 |
+
self::single_deactivate();
|
192 |
+
|
193 |
+
}
|
194 |
+
|
195 |
+
restore_current_blog();
|
196 |
+
|
197 |
+
} else {
|
198 |
+
self::single_deactivate();
|
199 |
+
}
|
200 |
+
|
201 |
+
} else {
|
202 |
+
self::single_deactivate();
|
203 |
+
}
|
204 |
+
|
205 |
+
}
|
206 |
+
|
207 |
+
/**
|
208 |
+
* Fired when a new site is activated with a WPMU environment.
|
209 |
+
*
|
210 |
+
* @since 1.0.0
|
211 |
+
*
|
212 |
+
* @param int $blog_id ID of the new blog.
|
213 |
+
*/
|
214 |
+
public function activate_new_site( $blog_id ) {
|
215 |
+
|
216 |
+
if ( 1 !== did_action( 'wpmu_new_blog' ) ) {
|
217 |
+
return;
|
218 |
+
}
|
219 |
+
|
220 |
+
switch_to_blog( $blog_id );
|
221 |
+
self::single_activate();
|
222 |
+
restore_current_blog();
|
223 |
+
|
224 |
+
}
|
225 |
+
|
226 |
+
/**
|
227 |
+
* Get all blog ids of blogs in the current network that are:
|
228 |
+
* - not archived
|
229 |
+
* - not spam
|
230 |
+
* - not deleted
|
231 |
+
*
|
232 |
+
* @since 1.0.0
|
233 |
+
*
|
234 |
+
* @return array|false The blog ids, false if no matches.
|
235 |
+
*/
|
236 |
+
private static function get_blog_ids() {
|
237 |
+
|
238 |
+
global $wpdb;
|
239 |
+
|
240 |
+
// get an array of blog ids
|
241 |
+
$sql = "SELECT blog_id FROM $wpdb->blogs
|
242 |
+
WHERE archived = '0' AND spam = '0'
|
243 |
+
AND deleted = '0'";
|
244 |
+
|
245 |
+
return $wpdb->get_col( $sql );
|
246 |
+
|
247 |
+
}
|
248 |
+
|
249 |
+
/**
|
250 |
+
* Fired for each blog when the plugin is activated.
|
251 |
+
*
|
252 |
+
* @since 1.0.0
|
253 |
+
*/
|
254 |
+
private static function single_activate() {
|
255 |
+
// @TODO: Define activation functionality here
|
256 |
+
}
|
257 |
+
|
258 |
+
/**
|
259 |
+
* Fired for each blog when the plugin is deactivated.
|
260 |
+
*
|
261 |
+
* @since 1.0.0
|
262 |
+
*/
|
263 |
+
private static function single_deactivate() {
|
264 |
+
// @TODO: Define deactivation functionality here
|
265 |
+
}
|
266 |
+
|
267 |
+
/**
|
268 |
+
* Load the plugin text domain for translation.
|
269 |
+
*
|
270 |
+
* @since 1.0.0
|
271 |
+
*/
|
272 |
+
public function load_plugin_textdomain() {
|
273 |
+
|
274 |
+
$domain = $this->plugin_slug;
|
275 |
+
$locale = apply_filters( 'plugin_locale', get_locale(), $domain );
|
276 |
+
|
277 |
+
load_textdomain( $domain, trailingslashit( WP_LANG_DIR ) . $domain . '/' . $domain . '-' . $locale . '.mo' );
|
278 |
+
|
279 |
+
}
|
280 |
+
|
281 |
+
/**
|
282 |
+
* Register and enqueue public-facing style sheet.
|
283 |
+
*
|
284 |
+
* @since 1.0.0
|
285 |
+
*/
|
286 |
+
public function enqueue_styles() {
|
287 |
+
wp_enqueue_style( $this->plugin_slug . '-plugin-styles', plugins_url( 'assets/css/public.css', __FILE__ ), array(), self::VERSION );
|
288 |
+
}
|
289 |
+
|
290 |
+
/**
|
291 |
+
* Register and enqueues public-facing JavaScript files.
|
292 |
+
*
|
293 |
+
* @since 1.0.0
|
294 |
+
*/
|
295 |
+
public function enqueue_scripts() {
|
296 |
+
wp_enqueue_script( $this->plugin_slug . '-plugin-script', plugins_url( 'assets/js/public.js', __FILE__ ), array( 'jquery' ), self::VERSION );
|
297 |
+
}
|
298 |
+
|
299 |
+
/**
|
300 |
+
* NOTE: Actions are points in the execution of a page or process
|
301 |
+
* lifecycle that WordPress fires.
|
302 |
+
*
|
303 |
+
* Actions: http://codex.wordpress.org/Plugin_API#Actions
|
304 |
+
* Reference: http://codex.wordpress.org/Plugin_API/Action_Reference
|
305 |
+
*
|
306 |
+
* @since 1.0.0
|
307 |
+
* /
|
308 |
+
public function action_method_name() {
|
309 |
+
// @TODO: Define your action hook callback here
|
310 |
+
} // */
|
311 |
+
|
312 |
+
/**
|
313 |
+
* NOTE: Filters are points of execution in which WordPress modifies data
|
314 |
+
* before saving it or sending it to the browser.
|
315 |
+
*
|
316 |
+
* Filters: http://codex.wordpress.org/Plugin_API#Filters
|
317 |
+
* Reference: http://codex.wordpress.org/Plugin_API/Filter_Reference
|
318 |
+
*
|
319 |
+
* @since 1.0.0
|
320 |
+
* /
|
321 |
+
public function filter_method_name() {
|
322 |
+
// @TODO: Define your filter hook callback here
|
323 |
+
} // */
|
324 |
+
|
325 |
+
}
|
326 |
+
|
327 |
+
/* Feature Custom Post Type - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
|
328 |
+
|
329 |
+
//add_action('init', 'feature_init', 0x80000000);
|
330 |
+
function feature_init() {
|
331 |
+
$labels = array(
|
332 |
+
'name' => _x('Features', 'post type general name'),
|
333 |
+
'singular_name' => _x('Feature', 'post type singular name'),
|
334 |
+
'add_new' => _x('Add New', 'feature'),
|
335 |
+
'add_new_item' => __('Add New Feature'),
|
336 |
+
'edit_item' => __('Edit Feature'),
|
337 |
+
'new_item' => __('New Feature'),
|
338 |
+
'view_item' => __('View Feature'),
|
339 |
+
'search_items' => __('Search Features'),
|
340 |
+
'not_found' => __('No Features found'),
|
341 |
+
'not_found_in_trash' => __('No Features found in Trash'),
|
342 |
+
'parent_item_colon' => ''
|
343 |
+
);
|
344 |
+
$args = array(
|
345 |
+
'labels' => $labels,
|
346 |
+
'public' => true,
|
347 |
+
'publicly_queryable' => true,
|
348 |
+
'query_var' => true,
|
349 |
+
'rewrite' => true,
|
350 |
+
'capability_type' => 'post',
|
351 |
+
'hierarchical' => false,
|
352 |
+
'menu_position' => null,
|
353 |
+
'supports' => array('title','editor','custom-fields','thumbnail'),
|
354 |
+
'taxonomies' => array('attachment_category', 'category', 'post_tag')
|
355 |
+
);
|
356 |
+
|
357 |
+
register_post_type('feature',$args);
|
358 |
+
}
|
359 |
+
|
360 |
+
//add filter to insure the text Feature, or feature, is displayed when user updates a feature
|
361 |
+
//add_filter('post_updated_messages', 'feature_updated_messages');
|
362 |
+
function feature_updated_messages( $messages ) {
|
363 |
+
global $post, $post_ID;
|
364 |
+
|
365 |
+
$messages['feature'] = array(
|
366 |
+
0 => '', // Unused. Messages start at index 1.
|
367 |
+
1 => sprintf( __('Feature updated. <a href="%s">View feature</a>'), esc_url( get_permalink($post_ID) ) ),
|
368 |
+
2 => __('Custom field updated.'),
|
369 |
+
3 => __('Custom field deleted.'),
|
370 |
+
4 => __('Feature updated.'),
|
371 |
+
/* translators: %s: date and time of the revision */
|
372 |
+
5 => isset($_GET['revision']) ? sprintf( __('Feature restored to revision from %s'), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false,
|
373 |
+
6 => sprintf( __('Feature published. <a href="%s">View feature</a>'), esc_url( get_permalink($post_ID) ) ),
|
374 |
+
7 => __('Feature saved.'),
|
375 |
+
8 => sprintf( __('Feature submitted. <a target="_blank" href="%s">Preview feature</a>'), esc_url( add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ) ),
|
376 |
+
9 => sprintf( __('Feature scheduled for: <strong>%1$s</strong>. <a target="_blank" href="%2$s">Preview feature</a>'),
|
377 |
+
// translators: Publish box date format, see http://php.net/date
|
378 |
+
date_i18n( __( 'M j, Y @ G:i' ), strtotime( $post->post_date ) ), esc_url( get_permalink($post_ID) ) ),
|
379 |
+
10 => sprintf( __('Feature draft updated. <a target="_blank" href="%s">Preview feature</a>'), esc_url( add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ) ),
|
380 |
+
);
|
381 |
+
|
382 |
+
return $messages;
|
383 |
+
}
|
384 |
+
|
385 |
+
?>
|
examples/plugins/smart-media-categories/public/includes/index.php
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?php // Silence is golden
|
examples/plugins/smart-media-categories/public/views/index.php
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?php // Silence is golden
|
examples/plugins/smart-media-categories/public/views/public.php
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Represents the view for the public-facing component of the plugin.
|
4 |
+
*
|
5 |
+
* This typically includes any information, if any, that is rendered to the
|
6 |
+
* frontend of the theme when the plugin is activated.
|
7 |
+
*
|
8 |
+
* @package Smart_Media_Categories
|
9 |
+
* @author David Lingren <dlingren@comcast.net>
|
10 |
+
* @license GPL-2.0+
|
11 |
+
* @link @TODO http://example.com
|
12 |
+
* @copyright 2014 David Lingren
|
13 |
+
*/
|
14 |
+
?>
|
15 |
+
|
16 |
+
<!-- This file is used to markup the public facing aspect of the plugin. -->
|
examples/plugins/smart-media-categories/smart-media-categories.php
ADDED
@@ -0,0 +1,89 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The Smart Media Categories (SMC) Plugin.
|
4 |
+
*
|
5 |
+
* Provides support to assign taxonomy terms to Media Library items based on
|
6 |
+
* the terms of their parent post/page.
|
7 |
+
*
|
8 |
+
* @package Smart_Media_Categories
|
9 |
+
* @author David Lingren <dlingren@comcast.net>
|
10 |
+
* @license GPL-2.0+
|
11 |
+
* @copyright 2014-2017 David Lingren
|
12 |
+
*
|
13 |
+
* @wordpress-plugin
|
14 |
+
* Plugin Name: Smart Media Categories
|
15 |
+
* Plugin URI: http://fairtradejudaica.org/media-library-assistant-a-wordpress-plugin/
|
16 |
+
* Description: Assigns taxonomy terms to Media Library items based on the terms of their parent post/page.
|
17 |
+
* Version: 1.1.1
|
18 |
+
* Author: David Lingren
|
19 |
+
* Author URI: http://fairtradejudaica.org/our-story/staff/
|
20 |
+
* Text Domain: smart-media-categories
|
21 |
+
* License: GPL-2.0+
|
22 |
+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
|
23 |
+
* Domain Path: /languages
|
24 |
+
*
|
25 |
+
* Created for support topic "How do I assign all images in posts to the post's categories?"
|
26 |
+
* opened on 10/24/2013 by "rosmo01".
|
27 |
+
* https://wordpress.org/support/topic/how-do-i-assign-all-images-in-posts-to-the-posts-categories/
|
28 |
+
*
|
29 |
+
* Enhanced for support topic "assign taxonomies to attachments for a standard WP gallery"
|
30 |
+
* opened on 8/24/2017 by "maxgx".
|
31 |
+
* https://wordpress.org/support/topic/assign-taxonomies-to-attachments-for-a-standard-wp-gallery/
|
32 |
+
*
|
33 |
+
* Based on Tom McFarlin's "WordPress Plugin Boilerplate", v2.6.1
|
34 |
+
* - http://tommcfarlin.com/wordpress-plugin-boilerplate/
|
35 |
+
* - http://github.com/tommcfarlin/WordPress-Widget-Boilerplate
|
36 |
+
*
|
37 |
+
* The Settings page is based on Tom McFarlin's "WordPress Settings Sandbox"
|
38 |
+
* - http://wp.tutsplus.com/series/the-complete-guide-to-the-wordpress-settings-api/
|
39 |
+
* - http://tommcfarlin.com/wordpress-settings-api-example/
|
40 |
+
* - https://github.com/tommcfarlin/WordPress-Settings-Sandbox
|
41 |
+
*/
|
42 |
+
|
43 |
+
// If this file is called directly, abort.
|
44 |
+
if ( ! defined( 'WPINC' ) ) {
|
45 |
+
die;
|
46 |
+
}
|
47 |
+
|
48 |
+
/*----------------------------------------------------------------------------*
|
49 |
+
* Public-Facing Functionality
|
50 |
+
*----------------------------------------------------------------------------*/
|
51 |
+
|
52 |
+
/*
|
53 |
+
* Plugin class for the public-facing side of the WordPress site.
|
54 |
+
*/
|
55 |
+
require_once( plugin_dir_path( __FILE__ ) . 'public/class-smart-media-categories.php' );
|
56 |
+
|
57 |
+
/*
|
58 |
+
* Register hooks that are fired when the plugin is activated or deactivated.
|
59 |
+
* When the plugin is deleted, the uninstall.php file is loaded.
|
60 |
+
*/
|
61 |
+
register_activation_hook( __FILE__, array( 'Smart_Media_Categories', 'activate' ) );
|
62 |
+
register_deactivation_hook( __FILE__, array( 'Smart_Media_Categories', 'deactivate' ) );
|
63 |
+
|
64 |
+
/*
|
65 |
+
* Create an instance of the public-facing class.
|
66 |
+
*/
|
67 |
+
add_action( 'plugins_loaded', array( 'Smart_Media_Categories', 'get_instance' ) );
|
68 |
+
|
69 |
+
/*----------------------------------------------------------------------------*
|
70 |
+
* Dashboard and Administrative Functionality
|
71 |
+
*----------------------------------------------------------------------------*/
|
72 |
+
|
73 |
+
/*
|
74 |
+
* Create an instance of the administrative-side class, if appropriate.
|
75 |
+
*
|
76 |
+
* If you want to include Ajax within the dashboard, change the following
|
77 |
+
* conditional to:
|
78 |
+
*
|
79 |
+
* if ( is_admin() ) {
|
80 |
+
* ...
|
81 |
+
* }
|
82 |
+
*
|
83 |
+
* The code below is intended to to give the lightest footprint possible.
|
84 |
+
*/
|
85 |
+
if ( is_admin() /* && ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) */ ) {
|
86 |
+
require_once( plugin_dir_path( __FILE__ ) . 'admin/class-smart-media-categories-admin.php' );
|
87 |
+
add_action( 'plugins_loaded', array( 'Smart_Media_Categories_Admin', 'get_instance' ) );
|
88 |
+
}
|
89 |
+
?>
|
examples/plugins/smart-media-categories/uninstall.php
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Fired when the plugin is uninstalled.
|
4 |
+
*
|
5 |
+
* @package Smart_Media_Categories
|
6 |
+
* @author David Lingren <dlingren@comcast.net>
|
7 |
+
* @license GPL-2.0+
|
8 |
+
* @link @TODO http://example.com
|
9 |
+
* @copyright 2014 David Lingren
|
10 |
+
*/
|
11 |
+
|
12 |
+
// If uninstall not called from WordPress, then exit
|
13 |
+
if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
|
14 |
+
exit;
|
15 |
+
}
|
16 |
+
|
17 |
+
// @TODO: Define uninstall functionality here
|
includes/class-mla-ajax.php
CHANGED
@@ -44,9 +44,10 @@ class MLA_Ajax {
|
|
44 |
public static function mla_admin_init_action( ) {
|
45 |
$ajax_only = var_export( self::$ajax_only, true );
|
46 |
|
47 |
-
//error_log( __LINE__ . " DEBUG: MLA_Ajax::mla_admin_init_action( {$ajax_only} )
|
|
|
48 |
if ( $_REQUEST['action'] !== 'heartbeat' ) {
|
49 |
-
//error_log( __LINE__ . " DEBUG: MLA_Ajax::mla_admin_init_action( {$ajax_only} )
|
50 |
MLACore::mla_debug_add( __LINE__ . " MLA_Ajax::mla_admin_init_action( {$ajax_only} ) \$_REQUEST = " . var_export( $_REQUEST, true ), MLACore::MLA_DEBUG_CATEGORY_AJAX );
|
51 |
}
|
52 |
|
@@ -260,6 +261,19 @@ class MLA_Ajax {
|
|
260 |
if ( ! class_exists( 'MLA_List_Table' ) ) {
|
261 |
require_once( MLA_PLUGIN_PATH . 'includes/class-mla-list-table.php' );
|
262 |
MLA_List_Table::mla_admin_init_action();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
263 |
}
|
264 |
|
265 |
// Create an instance of our package class and echo the new HTML
|
44 |
public static function mla_admin_init_action( ) {
|
45 |
$ajax_only = var_export( self::$ajax_only, true );
|
46 |
|
47 |
+
//error_log( __LINE__ . " DEBUG: MLA_Ajax::mla_admin_init_action( {$ajax_only} ) \$_REQUEST = " . var_export( $_REQUEST, true ), 0 );
|
48 |
+
//error_log( __LINE__ . " DEBUG: MLA_Ajax::mla_admin_init_action( {$ajax_only} ) \$_POST = " . var_export( $_POST, true ), 0 );
|
49 |
if ( $_REQUEST['action'] !== 'heartbeat' ) {
|
50 |
+
//error_log( __LINE__ . " DEBUG: MLA_Ajax::mla_admin_init_action( {$ajax_only} ) \$_REQUEST = " . var_export( $_REQUEST, true ), 0 );
|
51 |
MLACore::mla_debug_add( __LINE__ . " MLA_Ajax::mla_admin_init_action( {$ajax_only} ) \$_REQUEST = " . var_export( $_REQUEST, true ), MLACore::MLA_DEBUG_CATEGORY_AJAX );
|
52 |
}
|
53 |
|
261 |
if ( ! class_exists( 'MLA_List_Table' ) ) {
|
262 |
require_once( MLA_PLUGIN_PATH . 'includes/class-mla-list-table.php' );
|
263 |
MLA_List_Table::mla_admin_init_action();
|
264 |
+
|
265 |
+
// Check for multi-language table column support
|
266 |
+
global $sitepress, $polylang;
|
267 |
+
|
268 |
+
if ( is_object( $sitepress ) ) {
|
269 |
+
require_once( MLA_PLUGIN_PATH . 'includes/class-mla-wpml-support.php' );
|
270 |
+
MLA_WPML::initialize();
|
271 |
+
MLA_WPML::admin_init(); // This action has already passed.
|
272 |
+
} elseif ( is_object( $polylang ) ) {
|
273 |
+
require_once( MLA_PLUGIN_PATH . 'includes/class-mla-polylang-support.php' );
|
274 |
+
MLA_Polylang::initialize();
|
275 |
+
MLA_Polylang::admin_init();
|
276 |
+
}
|
277 |
}
|
278 |
|
279 |
// Create an instance of our package class and echo the new HTML
|
includes/class-mla-core-options.php
CHANGED
@@ -129,10 +129,15 @@ class MLACoreOptions {
|
|
129 |
const MLA_TABLE_ICON_SIZE = 'table_icon_size';
|
130 |
|
131 |
/**
|
132 |
-
* Provides a unique name for the Media/Assistant submenu table
|
133 |
*/
|
134 |
const MLA_SHOW_FILE_NAME = 'show_file_name';
|
135 |
|
|
|
|
|
|
|
|
|
|
|
136 |
/**
|
137 |
* Provides a unique name for the Bulk Update and Map All chunk size option
|
138 |
*/
|
@@ -624,6 +629,14 @@ class MLACoreOptions {
|
|
624 |
'std' => '',
|
625 |
'help' => __( 'Check/uncheck this option to show/omit the file name from the primary column.', 'media-library-assistant' )),
|
626 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
627 |
self::MLA_BULK_CHUNK_SIZE =>
|
628 |
array('tab' => 'general',
|
629 |
'name' => __( 'Bulk Chunk Size', 'media-library-assistant' ),
|
129 |
const MLA_TABLE_ICON_SIZE = 'table_icon_size';
|
130 |
|
131 |
/**
|
132 |
+
* Provides a unique name for the Media/Assistant submenu table file name in the primary column
|
133 |
*/
|
134 |
const MLA_SHOW_FILE_NAME = 'show_file_name';
|
135 |
|
136 |
+
/**
|
137 |
+
* Provides a unique name for the Media/Assistant submenu table bulk description wp_editor
|
138 |
+
*/
|
139 |
+
const MLA_BULK_EDITOR = 'bulk_wp_editor';
|
140 |
+
|
141 |
/**
|
142 |
* Provides a unique name for the Bulk Update and Map All chunk size option
|
143 |
*/
|
629 |
'std' => '',
|
630 |
'help' => __( 'Check/uncheck this option to show/omit the file name from the primary column.', 'media-library-assistant' )),
|
631 |
|
632 |
+
self::MLA_BULK_EDITOR =>
|
633 |
+
array('tab' => 'general',
|
634 |
+
'name' => __( 'QuickTags editor for bulk description', 'media-library-assistant' ),
|
635 |
+
'type' => 'checkbox',
|
636 |
+
'autoload' => true,
|
637 |
+
'std' => '',
|
638 |
+
'help' => __( 'Check this option to use the QuickTags editor for the Description field in the Bulk Edit area.', 'media-library-assistant' )),
|
639 |
+
|
640 |
self::MLA_BULK_CHUNK_SIZE =>
|
641 |
array('tab' => 'general',
|
642 |
'name' => __( 'Bulk Chunk Size', 'media-library-assistant' ),
|
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)
|
@@ -415,9 +415,7 @@ class MLACore {
|
|
415 |
}
|
416 |
} // MLA_MEDIA_MODAL_APPLY_DISPLAY_SETTINGS
|
417 |
|
418 |
-
|
419 |
-
* Hook wp_enqueue_media() so we can add MLA enhancements, if requested
|
420 |
-
*/
|
421 |
if ( 'checked' == MLACore::mla_get_option( MLACoreOptions::MLA_MEDIA_MODAL_TOOLBAR ) ) {
|
422 |
add_filter( 'media_view_settings', 'MLACore::mla_media_view_settings_filter', 10, 2 );
|
423 |
}
|
@@ -437,9 +435,15 @@ class MLACore {
|
|
437 |
return $settings;
|
438 |
}
|
439 |
|
440 |
-
|
441 |
-
|
442 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
443 |
require_once( MLA_PLUGIN_PATH . 'includes/class-mla-list-table.php' );
|
444 |
|
445 |
require_once( MLA_PLUGIN_PATH . 'includes/class-mla-media-modal.php' );
|
@@ -529,9 +533,10 @@ class MLACore {
|
|
529 |
*/
|
530 |
MLACoreOptions::mla_localize_option_definitions_array();
|
531 |
|
532 |
-
|
533 |
-
|
534 |
-
|
|
|
535 |
if ( MLA_DEBUG_LEVEL & 1 ) {
|
536 |
/*
|
537 |
* Set up alternate MLA debug log file
|
@@ -1721,6 +1726,7 @@ class MLA_Checklist_Walker extends Walker_Category {
|
|
1721 |
* Custom Taxonomies and WordPress objects.
|
1722 |
*/
|
1723 |
require_once( MLA_PLUGIN_PATH . 'includes/class-mla-objects.php' );
|
|
|
1724 |
add_action( 'init', 'MLAObjects::initialize', 0x7FFFFFFF );
|
1725 |
|
1726 |
/*
|
21 |
*
|
22 |
* @var string
|
23 |
*/
|
24 |
+
const CURRENT_MLA_VERSION = '2.61';
|
25 |
|
26 |
/**
|
27 |
* Slug for registering and enqueueing plugin style sheets (moved from class-mla-main.php)
|
415 |
}
|
416 |
} // MLA_MEDIA_MODAL_APPLY_DISPLAY_SETTINGS
|
417 |
|
418 |
+
// Hook wp_enqueue_media() so we can add MLA enhancements, if requested
|
|
|
|
|
419 |
if ( 'checked' == MLACore::mla_get_option( MLACoreOptions::MLA_MEDIA_MODAL_TOOLBAR ) ) {
|
420 |
add_filter( 'media_view_settings', 'MLACore::mla_media_view_settings_filter', 10, 2 );
|
421 |
}
|
435 |
return $settings;
|
436 |
}
|
437 |
|
438 |
+
// Visual Composer template preview doesn't need MLA enhancements
|
439 |
+
if ( defined( 'VC_IS_TEMPLATE_PREVIEW' ) ) {
|
440 |
+
return $settings;
|
441 |
+
}
|
442 |
+
|
443 |
+
// Media Manager (Modal window) additions
|
444 |
+
require_once( MLA_PLUGIN_PATH . 'includes/class-mla-data.php' );
|
445 |
+
MLAData::initialize();
|
446 |
+
|
447 |
require_once( MLA_PLUGIN_PATH . 'includes/class-mla-list-table.php' );
|
448 |
|
449 |
require_once( MLA_PLUGIN_PATH . 'includes/class-mla-media-modal.php' );
|
533 |
*/
|
534 |
MLACoreOptions::mla_localize_option_definitions_array();
|
535 |
|
536 |
+
MLACore::$original_php_log = ini_get( 'error_log' );
|
537 |
+
MLACore::$original_php_reporting = sprintf( '0x%1$04X', error_reporting() );
|
538 |
+
|
539 |
+
// Do not process debug options unless MLA_DEBUG_LEVEL is set in wp-config.php
|
540 |
if ( MLA_DEBUG_LEVEL & 1 ) {
|
541 |
/*
|
542 |
* Set up alternate MLA debug log file
|
1726 |
* Custom Taxonomies and WordPress objects.
|
1727 |
*/
|
1728 |
require_once( MLA_PLUGIN_PATH . 'includes/class-mla-objects.php' );
|
1729 |
+
add_action( 'init', 'MLAObjects::mla_build_taxonomies', 5 );
|
1730 |
add_action( 'init', 'MLAObjects::initialize', 0x7FFFFFFF );
|
1731 |
|
1732 |
/*
|
includes/class-mla-data-query.php
CHANGED
@@ -410,7 +410,7 @@ class MLAQuery {
|
|
410 |
*/
|
411 |
$parent_data = self::mla_fetch_attachment_parent_data( $attachment->post_parent );
|
412 |
foreach ( $parent_data as $parent_key => $parent_value ) {
|
413 |
-
$attachments[ $index ]
|
414 |
}
|
415 |
|
416 |
/*
|
@@ -418,7 +418,7 @@ class MLAQuery {
|
|
418 |
*/
|
419 |
$meta_data = self::mla_fetch_attachment_metadata( $attachment->ID );
|
420 |
foreach ( $meta_data as $meta_key => $meta_value ) {
|
421 |
-
$attachments[ $index ]
|
422 |
}
|
423 |
}
|
424 |
|
@@ -873,7 +873,7 @@ class MLAQuery {
|
|
873 |
if ( is_array( $value ) ) {
|
874 |
$clean_request[ $key ] = $value;
|
875 |
} else {
|
876 |
-
$clean_request[ $key ] =
|
877 |
unset( $clean_request[ $key ]['slug'] );
|
878 |
} // not array
|
879 |
}
|
@@ -1335,148 +1335,170 @@ class MLAQuery {
|
|
1335 |
*
|
1336 |
* @since 0.60
|
1337 |
*
|
1338 |
-
* @param
|
|
|
1339 |
*
|
1340 |
-
* @return
|
1341 |
*/
|
1342 |
-
|
1343 |
-
|
1344 |
-
|
1345 |
-
$numeric_clause = '';
|
1346 |
-
$search_clause = '';
|
1347 |
$tax_clause = '';
|
1348 |
-
$tax_connector = 'AND';
|
1349 |
$tax_index = 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1350 |
|
1351 |
-
|
1352 |
-
|
1353 |
-
*/
|
1354 |
-
if ( isset( self::$search_parameters['mla_terms_search']['phrases'] ) ) {
|
1355 |
-
$terms_search_parameters = self::$search_parameters['mla_terms_search'];
|
1356 |
-
$term_delimiter = isset( $terms_search_parameters['term_delimiter'] ) ? $terms_search_parameters['term_delimiter'] : ',';
|
1357 |
-
$phrase_delimiter = isset( $terms_search_parameters['phrase_delimiter'] ) ? $terms_search_parameters['phrase_delimiter'] : ' ';
|
1358 |
|
1359 |
-
|
1360 |
-
|
1361 |
-
|
1362 |
-
|
1363 |
-
$
|
|
|
1364 |
}
|
1365 |
|
1366 |
-
|
|
|
1367 |
|
1368 |
-
|
1369 |
-
|
1370 |
-
|
1371 |
-
|
1372 |
-
$
|
1373 |
-
$
|
1374 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1375 |
|
1376 |
-
|
1377 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1378 |
|
1379 |
-
|
1380 |
-
|
1381 |
-
foreach ( $phrases as $index => $phrase ) {
|
1382 |
-
if ( isset( $terms_search_parameters['exact'] ) ) {
|
1383 |
$the_terms = array();
|
1384 |
-
|
1385 |
-
// WordPress encodes special characters, e.g., "&" as HTML entities in term names
|
1386 |
-
$the_term = get_term_by( 'name', _wp_specialchars( $phrase ), $taxonomy );
|
1387 |
-
if ( false !== $the_term ) {
|
1388 |
-
$the_terms[] = $the_term;
|
1389 |
-
}
|
1390 |
-
}
|
1391 |
-
} else {
|
1392 |
-
$is_wildcard_search = ( ! $quoted[ $index ] ) && self::_wildcard_search_string( $phrase );
|
1393 |
|
1394 |
-
|
1395 |
-
|
|
|
|
|
|
|
1396 |
}
|
|
|
|
|
1397 |
|
1398 |
-
|
1399 |
-
|
1400 |
|
1401 |
-
|
1402 |
-
|
1403 |
-
|
|
|
|
|
|
|
|
|
1404 |
|
1405 |
-
|
1406 |
-
|
1407 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
1408 |
}
|
|
|
1409 |
|
1410 |
-
|
1411 |
-
|
1412 |
-
|
1413 |
-
|
1414 |
-
|
1415 |
-
|
1416 |
-
|
1417 |
-
} // not exact
|
1418 |
|
1419 |
-
|
1420 |
-
|
|
|
|
|
|
|
|
|
|
|
1421 |
|
1422 |
-
|
1423 |
-
|
1424 |
-
|
1425 |
-
|
1426 |
-
|
|
|
|
|
1427 |
}
|
1428 |
-
} // foreach phrase
|
1429 |
|
1430 |
-
|
1431 |
-
|
1432 |
-
|
1433 |
-
if ( 'AND' == $terms_search_parameters['radio_phrases'] ) {
|
1434 |
-
$search_term_count = count( $phrases );
|
1435 |
-
foreach ($tax_terms as $taxonomy => $term_ids ) {
|
1436 |
-
foreach ( $term_ids as $term_id => $term_taxonomy_id ) {
|
1437 |
-
if ( $search_term_count != $tax_counts[ $taxonomy ][ $term_id ] ) {
|
1438 |
-
unset( $term_ids[ $term_id ] );
|
1439 |
-
}
|
1440 |
-
}
|
1441 |
|
1442 |
-
|
1443 |
-
|
1444 |
-
|
1445 |
-
$tax_terms[ $taxonomy ] = $term_ids;
|
1446 |
-
}
|
1447 |
-
} // foreach taxonomy
|
1448 |
-
} // AND (i.e., All phrases)
|
1449 |
|
1450 |
-
|
1451 |
-
|
|
|
1452 |
|
1453 |
-
|
1454 |
-
|
1455 |
-
|
1456 |
-
|
1457 |
-
} else {
|
1458 |
-
$prefix = 'mlatt0';
|
1459 |
-
$tax_index = 1; // only one JOIN needed for the "Any Term" case
|
1460 |
-
}
|
1461 |
|
1462 |
-
|
1463 |
-
|
1464 |
-
} // foreach tax_term
|
1465 |
|
1466 |
-
|
1467 |
-
|
1468 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1469 |
|
1470 |
-
|
1471 |
-
|
1472 |
-
|
|
|
|
|
1473 |
|
1474 |
-
|
1475 |
-
|
1476 |
-
|
1477 |
-
|
1478 |
-
};
|
1479 |
-
} // isset mla_terms_search
|
1480 |
|
1481 |
/*
|
1482 |
* Process the keyword search argument, if present.
|
@@ -1513,30 +1535,24 @@ class MLAQuery {
|
|
1513 |
if ( empty( $fields ) ) {
|
1514 |
$search_clause = '1=0';
|
1515 |
} else {
|
1516 |
-
$
|
1517 |
-
$tax_counts = array();
|
1518 |
-
foreach ( $keyword_array as $term ) {
|
1519 |
if ( $is_wildcard_search ) {
|
1520 |
-
|
1521 |
-
* Escape any % in the source string
|
1522 |
-
*/
|
1523 |
if ( self::$wp_4dot0_plus ) {
|
1524 |
-
$
|
1525 |
-
$
|
1526 |
} else {
|
1527 |
-
$
|
1528 |
}
|
1529 |
|
1530 |
-
|
1531 |
-
|
1532 |
-
*/
|
1533 |
-
$sql_term = str_replace( '*', '%', $sql_term );
|
1534 |
} else {
|
1535 |
if ( self::$wp_4dot0_plus ) {
|
1536 |
-
$
|
1537 |
-
$
|
1538 |
} else {
|
1539 |
-
$
|
1540 |
}
|
1541 |
}
|
1542 |
|
@@ -1544,107 +1560,53 @@ class MLAQuery {
|
|
1544 |
$inner_clause = '';
|
1545 |
|
1546 |
if ( in_array( 'content', $fields ) ) {
|
1547 |
-
$inner_clause .= "{$inner_connector}({$wpdb->posts}.post_content LIKE {$
|
1548 |
$inner_connector = ' OR ';
|
1549 |
}
|
1550 |
|
1551 |
if ( in_array( 'title', $fields ) ) {
|
1552 |
-
$inner_clause .= "{$inner_connector}({$wpdb->posts}.post_title LIKE {$
|
1553 |
$inner_connector = ' OR ';
|
1554 |
}
|
1555 |
|
1556 |
if ( in_array( 'excerpt', $fields ) ) {
|
1557 |
-
$inner_clause .= "{$inner_connector}({$wpdb->posts}.post_excerpt LIKE {$
|
1558 |
$inner_connector = ' OR ';
|
1559 |
}
|
1560 |
|
1561 |
if ( in_array( 'alt-text', $fields ) ) {
|
1562 |
$view_name = self::MLA_ALT_TEXT_SUBQUERY;
|
1563 |
-
$inner_clause .= "{$inner_connector}({$view_name}.meta_value LIKE {$
|
1564 |
$inner_connector = ' OR ';
|
1565 |
}
|
1566 |
|
1567 |
if ( in_array( 'file', $fields ) ) {
|
1568 |
$view_name = self::MLA_FILE_SUBQUERY;
|
1569 |
-
$inner_clause .= "{$inner_connector}({$view_name}.meta_value LIKE {$
|
1570 |
$inner_connector = ' OR ';
|
1571 |
}
|
1572 |
|
1573 |
if ( in_array( 'name', $fields ) ) {
|
1574 |
-
$inner_clause .= "{$inner_connector}({$wpdb->posts}.post_name LIKE {$
|
1575 |
}
|
1576 |
|
1577 |
-
$inner_clause = apply_filters( 'mla_list_table_search_filter_inner_clause', $inner_clause, $inner_connector, $wpdb->posts, $
|
1578 |
|
1579 |
if ( ! empty($inner_clause) ) {
|
1580 |
$search_clause .= "{$connector}({$inner_clause})";
|
1581 |
$connector = ' ' . self::$search_parameters['mla_search_connector'] . ' ';
|
1582 |
}
|
1583 |
-
|
1584 |
-
/*
|
1585 |
-
* Convert search term text to term_taxonomy_id value(s),
|
1586 |
-
* separated by taxonomy.
|
1587 |
-
*/
|
1588 |
-
if ( $allow_terms_search ) {
|
1589 |
-
// WordPress encodes special characters, e.g., "&" as HTML entities in term names
|
1590 |
-
$the_terms = get_terms( self::$search_parameters['mla_search_taxonomies'], array( 'name__like' => _wp_specialchars( $term ), 'fields' => 'all', 'hide_empty' => false ) );
|
1591 |
-
// Invalid taxonomy will return WP_Error object
|
1592 |
-
if ( ! is_array( $the_terms ) ) {
|
1593 |
-
$the_terms = array();
|
1594 |
-
}
|
1595 |
-
|
1596 |
-
foreach( $the_terms as $the_term ) {
|
1597 |
-
$tax_terms[ $the_term->taxonomy ][ $the_term->term_id ] = (integer) $the_term->term_taxonomy_id;
|
1598 |
-
|
1599 |
-
if ( isset( $tax_counts[ $the_term->taxonomy ][ $the_term->term_id ] ) ) {
|
1600 |
-
$tax_counts[ $the_term->taxonomy ][ $the_term->term_id ]++;
|
1601 |
-
} else {
|
1602 |
-
$tax_counts[ $the_term->taxonomy ][ $the_term->term_id ] = 1;
|
1603 |
-
}
|
1604 |
-
}
|
1605 |
-
} // in_array terms
|
1606 |
-
} // foreach term
|
1607 |
|
1608 |
if ( $allow_terms_search ) {
|
1609 |
-
|
1610 |
-
* For the AND connector, a taxonomy term must have all of the search terms within it
|
1611 |
-
*/
|
1612 |
-
if ( 'AND' == self::$search_parameters['mla_search_connector'] ) {
|
1613 |
-
$search_term_count = count( $keyword_array );
|
1614 |
-
foreach ($tax_terms as $taxonomy => $term_ids ) {
|
1615 |
-
foreach ( $term_ids as $term_id => $term_taxonomy_id ) {
|
1616 |
-
if ( $search_term_count != $tax_counts[ $taxonomy ][ $term_id ] ) {
|
1617 |
-
unset( $term_ids[ $term_id ] );
|
1618 |
-
}
|
1619 |
-
}
|
1620 |
|
1621 |
-
|
1622 |
-
|
1623 |
-
|
1624 |
-
|
1625 |
-
}
|
1626 |
-
} // foreach taxonomy
|
1627 |
-
} // AND connector
|
1628 |
-
|
1629 |
-
if ( empty( $tax_terms ) ) {
|
1630 |
-
/*
|
1631 |
-
* If "Terms" is the only field and no terms are present,
|
1632 |
-
* the search must fail.
|
1633 |
-
*/
|
1634 |
-
if ( ( 1 == count( $fields ) ) && ( 'terms' == array_shift( $fields ) ) ) {
|
1635 |
-
$tax_clause = '1=0';
|
1636 |
}
|
1637 |
} else {
|
1638 |
-
$tax_index = 0;
|
1639 |
-
$inner_connector = '';
|
1640 |
-
|
1641 |
-
foreach( $tax_terms as $tax_term ) {
|
1642 |
-
$prefix = 'mlatt' . $tax_index++;
|
1643 |
-
$tax_clause .= sprintf( '%1$s %2$s.term_taxonomy_id IN (%3$s)', $inner_connector, $prefix, implode( ',', $tax_term ) );
|
1644 |
-
$inner_connector = ' OR';
|
1645 |
-
} // foreach tax_term
|
1646 |
-
|
1647 |
-
self::$search_parameters['tax_terms_count'] = $tax_index;
|
1648 |
$tax_connector = 'OR';
|
1649 |
} // tax_terms present
|
1650 |
} // terms in fields
|
@@ -1800,7 +1762,7 @@ class MLAQuery {
|
|
1800 |
}
|
1801 |
}
|
1802 |
|
1803 |
-
if ( isset( self::$search_parameters['tax_terms_count'] ) ) {
|
1804 |
$tax_index = 0;
|
1805 |
$tax_clause = '';
|
1806 |
|
410 |
*/
|
411 |
$parent_data = self::mla_fetch_attachment_parent_data( $attachment->post_parent );
|
412 |
foreach ( $parent_data as $parent_key => $parent_value ) {
|
413 |
+
$attachments[ $index ]->{$parent_key} = $parent_value;
|
414 |
}
|
415 |
|
416 |
/*
|
418 |
*/
|
419 |
$meta_data = self::mla_fetch_attachment_metadata( $attachment->ID );
|
420 |
foreach ( $meta_data as $meta_key => $meta_value ) {
|
421 |
+
$attachments[ $index ]->{$meta_key} = $meta_value;
|
422 |
}
|
423 |
}
|
424 |
|
873 |
if ( is_array( $value ) ) {
|
874 |
$clean_request[ $key ] = $value;
|
875 |
} else {
|
876 |
+
$clean_request[ $key ] = json_decode( stripslashes( $value ), true );
|
877 |
unset( $clean_request[ $key ]['slug'] );
|
878 |
} // not array
|
879 |
}
|
1335 |
*
|
1336 |
* @since 0.60
|
1337 |
*
|
1338 |
+
* @param array Terms search phrases and delimiters
|
1339 |
+
* @param string SQL clause for tax query, by reference
|
1340 |
*
|
1341 |
+
* @return integer Taxonomy JOIN clauses required. Updates $tax_clause as well
|
1342 |
*/
|
1343 |
+
private static function _generate_tax_clause( $terms_search_parameters, &$tax_clause ) {
|
1344 |
+
$term_delimiter = isset( $terms_search_parameters['term_delimiter'] ) ? $terms_search_parameters['term_delimiter'] : ',';
|
1345 |
+
$phrase_delimiter = isset( $terms_search_parameters['phrase_delimiter'] ) ? $terms_search_parameters['phrase_delimiter'] : ' ';
|
|
|
|
|
1346 |
$tax_clause = '';
|
|
|
1347 |
$tax_index = 0;
|
1348 |
+
|
1349 |
+
$terms = self::_parse_terms_search( $terms_search_parameters['phrases'], $term_delimiter );
|
1350 |
+
if ( 1 < count( $terms ) ) {
|
1351 |
+
$terms_connector = '(';
|
1352 |
+
} else {
|
1353 |
+
$terms_connector = '';
|
1354 |
+
}
|
1355 |
|
1356 |
+
$matched_terms = 0;
|
1357 |
+
foreach ( $terms as $term ) {
|
|
|
|
|
|
|
|
|
|
|
1358 |
|
1359 |
+
// Find the quoted phrases for a word-boundary check
|
1360 |
+
$phrases = self::_parse_terms_search( $term, $phrase_delimiter, false );
|
1361 |
+
$quoted = array();
|
1362 |
+
foreach ( $phrases as $index => $phrase ) {
|
1363 |
+
$delimiter = substr( $phrase, 0, 1 );
|
1364 |
+
$quoted[ $index ] = ( '"' == $delimiter ) || ( "'" == $delimiter );
|
1365 |
}
|
1366 |
|
1367 |
+
// Strip delimiters and escape backslashes
|
1368 |
+
$phrases = self::_parse_terms_search( $term, $phrase_delimiter, true );
|
1369 |
|
1370 |
+
$tax_terms = array();
|
1371 |
+
$tax_counts = array();
|
1372 |
+
foreach ( $phrases as $index => $phrase ) {
|
1373 |
+
if ( isset( $terms_search_parameters['exact'] ) ) {
|
1374 |
+
$the_terms = array();
|
1375 |
+
foreach( $terms_search_parameters['taxonomies'] as $taxonomy ) {
|
1376 |
+
// WordPress encodes special characters, e.g., "&" as HTML entities in term names
|
1377 |
+
$the_term = get_term_by( 'name', _wp_specialchars( $phrase ), $taxonomy );
|
1378 |
+
if ( false !== $the_term ) {
|
1379 |
+
$the_terms[] = $the_term;
|
1380 |
+
}
|
1381 |
+
}
|
1382 |
+
} else {
|
1383 |
+
$is_wildcard_search = ( ! $quoted[ $index ] ) && self::_wildcard_search_string( $phrase );
|
1384 |
|
1385 |
+
if ( $is_wildcard_search ) {
|
1386 |
+
add_filter( 'terms_clauses', 'MLAQuery::mla_query_terms_clauses_filter', 0x7FFFFFFF, 3 );
|
1387 |
+
}
|
1388 |
+
|
1389 |
+
// WordPress encodes special characters, e.g., "&" as HTML entities in term names
|
1390 |
+
$the_terms = get_terms( $terms_search_parameters['taxonomies'], array( 'name__like' => _wp_specialchars( $phrase ), 'fields' => 'all', 'hide_empty' => false ) );
|
1391 |
+
|
1392 |
+
if ( $is_wildcard_search ) {
|
1393 |
+
remove_filter( 'terms_clauses', 'MLAQuery::mla_query_terms_clauses_filter', 0x7FFFFFFF );
|
1394 |
+
}
|
1395 |
|
1396 |
+
// Invalid taxonomy will return WP_Error object
|
1397 |
+
if ( ! is_array( $the_terms ) ) {
|
|
|
|
|
1398 |
$the_terms = array();
|
1399 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1400 |
|
1401 |
+
if ( $quoted[ $index ] ) {
|
1402 |
+
foreach ( $the_terms as $term_index => $the_term ) {
|
1403 |
+
if ( ! self::_match_quoted_phrase( $phrase, $the_term->name ) ) {
|
1404 |
+
unset( $the_terms[ $term_index ]);
|
1405 |
+
}
|
1406 |
}
|
1407 |
+
} // quoted phrase
|
1408 |
+
} // not exact
|
1409 |
|
1410 |
+
foreach( $the_terms as $the_term ) {
|
1411 |
+
$tax_terms[ $the_term->taxonomy ][ $the_term->term_id ] = (integer) $the_term->term_taxonomy_id;
|
1412 |
|
1413 |
+
if ( isset( $tax_counts[ $the_term->taxonomy ][ $the_term->term_id ] ) ) {
|
1414 |
+
$tax_counts[ $the_term->taxonomy ][ $the_term->term_id ]++;
|
1415 |
+
} else {
|
1416 |
+
$tax_counts[ $the_term->taxonomy ][ $the_term->term_id ] = 1;
|
1417 |
+
}
|
1418 |
+
}
|
1419 |
+
} // foreach phrase
|
1420 |
|
1421 |
+
/*
|
1422 |
+
* For the AND connector, a taxonomy term must have all of the search terms within it
|
1423 |
+
*/
|
1424 |
+
if ( 'AND' == $terms_search_parameters['radio_phrases'] ) {
|
1425 |
+
$search_term_count = count( $phrases );
|
1426 |
+
foreach ($tax_terms as $taxonomy => $term_ids ) {
|
1427 |
+
foreach ( $term_ids as $term_id => $term_taxonomy_id ) {
|
1428 |
+
if ( $search_term_count != $tax_counts[ $taxonomy ][ $term_id ] ) {
|
1429 |
+
unset( $term_ids[ $term_id ] );
|
1430 |
}
|
1431 |
+
}
|
1432 |
|
1433 |
+
if ( empty( $term_ids ) ) {
|
1434 |
+
unset( $tax_terms[ $taxonomy ] );
|
1435 |
+
} else {
|
1436 |
+
$tax_terms[ $taxonomy ] = $term_ids;
|
1437 |
+
}
|
1438 |
+
} // foreach taxonomy
|
1439 |
+
} // AND (i.e., All phrases)
|
|
|
1440 |
|
1441 |
+
if ( empty( $tax_terms ) ) {
|
1442 |
+
if ( 'AND' == $terms_search_parameters['radio_terms'] ) {
|
1443 |
+
$tax_clause = '';
|
1444 |
+
break;
|
1445 |
+
}
|
1446 |
+
} else {
|
1447 |
+
$inner_connector = '';
|
1448 |
|
1449 |
+
$tax_clause .= $terms_connector;
|
1450 |
+
foreach( $tax_terms as $tax_term ) {
|
1451 |
+
if ( 'AND' == $terms_search_parameters['radio_terms'] ) {
|
1452 |
+
$prefix = 'mlatt' . $tax_index++;
|
1453 |
+
} else {
|
1454 |
+
$prefix = 'mlatt0';
|
1455 |
+
$tax_index = 1; // only one JOIN needed for the "Any Term" case
|
1456 |
}
|
|
|
1457 |
|
1458 |
+
$tax_clause .= sprintf( '%1$s %2$s.term_taxonomy_id IN (%3$s)', $inner_connector, $prefix, implode( ',', $tax_term ) );
|
1459 |
+
$inner_connector = ' OR';
|
1460 |
+
} // foreach tax_term
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1461 |
|
1462 |
+
$terms_connector = ' ) ' . $terms_search_parameters['radio_terms'] . ' (';
|
1463 |
+
} // tax_terms present
|
1464 |
+
} // foreach term
|
|
|
|
|
|
|
|
|
1465 |
|
1466 |
+
if ( 1 < count( $terms ) && ! empty( $tax_clause ) ) {
|
1467 |
+
$tax_clause .= ')';
|
1468 |
+
}
|
1469 |
|
1470 |
+
if ( empty( $tax_clause ) ) {
|
1471 |
+
$tax_clause = '1=0';
|
1472 |
+
$tax_index = 0;
|
1473 |
+
};
|
|
|
|
|
|
|
|
|
1474 |
|
1475 |
+
return $tax_index;
|
1476 |
+
}
|
|
|
1477 |
|
1478 |
+
/**
|
1479 |
+
* Adds a keyword search to the WHERE clause, if required
|
1480 |
+
*
|
1481 |
+
* Defined as public because it's a filter.
|
1482 |
+
*
|
1483 |
+
* @since 0.60
|
1484 |
+
*
|
1485 |
+
* @param string query clause before modification
|
1486 |
+
*
|
1487 |
+
* @return string query clause after keyword search addition
|
1488 |
+
*/
|
1489 |
+
public static function mla_query_posts_search_filter( $search_string ) {
|
1490 |
+
global $wpdb;
|
1491 |
|
1492 |
+
$numeric_clause = '';
|
1493 |
+
$search_clause = '';
|
1494 |
+
$tax_clause = '';
|
1495 |
+
$tax_connector = 'AND';
|
1496 |
+
$tax_index = 0;
|
1497 |
|
1498 |
+
// Process the Terms Search arguments, if present.
|
1499 |
+
if ( isset( self::$search_parameters['mla_terms_search']['phrases'] ) ) {
|
1500 |
+
self::$search_parameters['tax_terms_count'] = self::_generate_tax_clause( self::$search_parameters['mla_terms_search'], $tax_clause );
|
1501 |
+
}
|
|
|
|
|
1502 |
|
1503 |
/*
|
1504 |
* Process the keyword search argument, if present.
|
1535 |
if ( empty( $fields ) ) {
|
1536 |
$search_clause = '1=0';
|
1537 |
} else {
|
1538 |
+
foreach ( $keyword_array as $phrase ) {
|
|
|
|
|
1539 |
if ( $is_wildcard_search ) {
|
1540 |
+
// Escape any % in the source string
|
|
|
|
|
1541 |
if ( self::$wp_4dot0_plus ) {
|
1542 |
+
$sql_phrase = $wpdb->esc_like( $phrase );
|
1543 |
+
$sql_phrase = $wpdb->prepare( '%s', $sql_phrase );
|
1544 |
} else {
|
1545 |
+
$sql_phrase = "'" . esc_sql( like_escape( $phrase ) ) . "'";
|
1546 |
}
|
1547 |
|
1548 |
+
// Convert wildcard * to SQL %
|
1549 |
+
$sql_phrase = str_replace( '*', '%', $sql_phrase );
|
|
|
|
|
1550 |
} else {
|
1551 |
if ( self::$wp_4dot0_plus ) {
|
1552 |
+
$sql_phrase = $percent . $wpdb->esc_like( $phrase ) . $percent;
|
1553 |
+
$sql_phrase = $wpdb->prepare( '%s', $sql_phrase );
|
1554 |
} else {
|
1555 |
+
$sql_phrase = "'" . $percent . esc_sql( like_escape( $phrase ) ) . $percent . "'";
|
1556 |
}
|
1557 |
}
|
1558 |
|
1560 |
$inner_clause = '';
|
1561 |
|
1562 |
if ( in_array( 'content', $fields ) ) {
|
1563 |
+
$inner_clause .= "{$inner_connector}({$wpdb->posts}.post_content LIKE {$sql_phrase})";
|
1564 |
$inner_connector = ' OR ';
|
1565 |
}
|
1566 |
|
1567 |
if ( in_array( 'title', $fields ) ) {
|
1568 |
+
$inner_clause .= "{$inner_connector}({$wpdb->posts}.post_title LIKE {$sql_phrase})";
|
1569 |
$inner_connector = ' OR ';
|
1570 |
}
|
1571 |
|
1572 |
if ( in_array( 'excerpt', $fields ) ) {
|
1573 |
+
$inner_clause .= "{$inner_connector}({$wpdb->posts}.post_excerpt LIKE {$sql_phrase})";
|
1574 |
$inner_connector = ' OR ';
|
1575 |
}
|
1576 |
|
1577 |
if ( in_array( 'alt-text', $fields ) ) {
|
1578 |
$view_name = self::MLA_ALT_TEXT_SUBQUERY;
|
1579 |
+
$inner_clause .= "{$inner_connector}({$view_name}.meta_value LIKE {$sql_phrase})";
|
1580 |
$inner_connector = ' OR ';
|
1581 |
}
|
1582 |
|
1583 |
if ( in_array( 'file', $fields ) ) {
|
1584 |
$view_name = self::MLA_FILE_SUBQUERY;
|
1585 |
+
$inner_clause .= "{$inner_connector}({$view_name}.meta_value LIKE {$sql_phrase})";
|
1586 |
$inner_connector = ' OR ';
|
1587 |
}
|
1588 |
|
1589 |
if ( in_array( 'name', $fields ) ) {
|
1590 |
+
$inner_clause .= "{$inner_connector}({$wpdb->posts}.post_name LIKE {$sql_phrase})";
|
1591 |
}
|
1592 |
|
1593 |
+
$inner_clause = apply_filters( 'mla_list_table_search_filter_inner_clause', $inner_clause, $inner_connector, $wpdb->posts, $sql_phrase );
|
1594 |
|
1595 |
if ( ! empty($inner_clause) ) {
|
1596 |
$search_clause .= "{$connector}({$inner_clause})";
|
1597 |
$connector = ' ' . self::$search_parameters['mla_search_connector'] . ' ';
|
1598 |
}
|
1599 |
+
} // foreach phrase
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1600 |
|
1601 |
if ( $allow_terms_search ) {
|
1602 |
+
self::$search_parameters['tax_terms_count'] = self::_generate_tax_clause( array( 'phrases' => $keyword_string, 'radio_phrases' => self::$search_parameters['mla_search_connector'], 'radio_terms' => self::$search_parameters['mla_search_connector'], 'taxonomies' => self::$search_parameters['mla_search_taxonomies'] ), $tax_clause );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1603 |
|
1604 |
+
if ( '1=0' === $tax_clause ) {
|
1605 |
+
// If "Terms" is the only field and no terms are present, the search must fail.
|
1606 |
+
if ( ( 1 < count( $fields ) ) || ( 'terms' !== array_shift( $fields ) ) ) {
|
1607 |
+
$tax_clause = '';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1608 |
}
|
1609 |
} else {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1610 |
$tax_connector = 'OR';
|
1611 |
} // tax_terms present
|
1612 |
} // terms in fields
|
1762 |
}
|
1763 |
}
|
1764 |
|
1765 |
+
if ( isset( self::$search_parameters['tax_terms_count'] ) && ( 0 < self::$search_parameters['tax_terms_count'] ) ) {
|
1766 |
$tax_index = 0;
|
1767 |
$tax_clause = '';
|
1768 |
|
includes/class-mla-list-table.php
CHANGED
@@ -722,10 +722,12 @@ class MLA_List_Table extends WP_List_Table {
|
|
722 |
$view_args['paged'] = $_REQUEST['paged'];
|
723 |
}
|
724 |
|
725 |
-
if (
|
726 |
-
if ( $
|
727 |
-
|
728 |
-
|
|
|
|
|
729 |
/*
|
730 |
* Use the WordPress Edit Media screen
|
731 |
*/
|
@@ -737,8 +739,8 @@ class MLA_List_Table extends WP_List_Table {
|
|
737 |
|
738 |
$actions['edit'] = '<a href="' . admin_url( $edit_url ) . '" title="' . __( 'Edit this item', 'media-library-assistant' ) . '">' . __( 'Edit', 'media-library-assistant' ) . '</a>';
|
739 |
$actions['inline hide-if-no-js'] = '<a class="editinline" href="#" title="' . __( 'Edit this item inline', 'media-library-assistant' ) . '">' . __( 'Quick Edit', 'media-library-assistant' ) . '</a>';
|
740 |
-
}
|
741 |
-
}
|
742 |
|
743 |
if ( current_user_can( 'delete_post', $item->ID ) ) {
|
744 |
if ( !$this->is_trash && EMPTY_TRASH_DAYS && MEDIA_TRASH ) {
|
@@ -751,14 +753,12 @@ class MLA_List_Table extends WP_List_Table {
|
|
751 |
}
|
752 |
} // delete_post
|
753 |
|
754 |
-
if (
|
755 |
$file = get_attached_file( $item->ID );
|
756 |
$download_args = array( 'page' => MLACore::ADMIN_PAGE_SLUG, 'mla_download_file' => urlencode( $file ), 'mla_download_type' => $item->post_mime_type );
|
757 |
|
758 |
$actions['download'] = '<a href="' . add_query_arg( $download_args, wp_nonce_url( 'upload.php', MLACore::MLA_ADMIN_NONCE_ACTION, MLACore::MLA_ADMIN_NONCE_NAME ) ) . '" title="' . __( 'Download', 'media-library-assistant' ) . ' “' . $att_title . '”">' . __( 'Download', 'media-library-assistant' ) . '</a>';
|
759 |
-
}
|
760 |
|
761 |
-
if ( ! $this->is_trash ) {
|
762 |
$actions['view'] = '<a href="' . site_url( ) . '?attachment_id=' . $item->ID . '" rel="permalink" title="' . __( 'View', 'media-library-assistant' ) . ' “' . $att_title . '”">' . __( 'View', 'media-library-assistant' ) . '</a>';
|
763 |
}
|
764 |
|
@@ -1767,7 +1767,7 @@ class MLA_List_Table extends WP_List_Table {
|
|
1767 |
$query['post_mime_type'] = urlencode( $query['post_mime_type'] );
|
1768 |
} else {
|
1769 |
$query['meta_slug'] = $view_slug;
|
1770 |
-
$query['meta_query'] = urlencode(
|
1771 |
}
|
1772 |
|
1773 |
return "<a href='" . add_query_arg( $query, $base_url ) . "'$class>" . sprintf( translate_nooped_plural( $nooped_plural, $total_items, 'media-library-assistant' ), number_format_i18n( $total_items ) ) . '</a>';
|
@@ -1796,7 +1796,7 @@ class MLA_List_Table extends WP_List_Table {
|
|
1796 |
$current_view = 'trash';
|
1797 |
} elseif ( empty( $_REQUEST['post_mime_type'] ) ) {
|
1798 |
if ( isset( $_REQUEST['meta_query'] ) ) {
|
1799 |
-
$query =
|
1800 |
$current_view = $query['slug'];
|
1801 |
} else {
|
1802 |
$current_view = 'all';
|
722 |
$view_args['paged'] = $_REQUEST['paged'];
|
723 |
}
|
724 |
|
725 |
+
if ( $this->is_trash ) {
|
726 |
+
if ( current_user_can( 'delete_post', $item->ID ) ) {
|
727 |
+
$actions['restore'] = '<a class="submitdelete" href="' . add_query_arg( $view_args, wp_nonce_url( '?mla_admin_action=' . MLACore::MLA_ADMIN_SINGLE_RESTORE, MLACore::MLA_ADMIN_NONCE_ACTION, MLACore::MLA_ADMIN_NONCE_NAME ) ) . '" title="' . __( 'Restore this item from the Trash', 'media-library-assistant' ) . '">' . __( 'Restore', 'media-library-assistant' ) . '</a>';
|
728 |
+
}
|
729 |
+
} else {
|
730 |
+
if ( current_user_can( 'edit_post', $item->ID ) ) {
|
731 |
/*
|
732 |
* Use the WordPress Edit Media screen
|
733 |
*/
|
739 |
|
740 |
$actions['edit'] = '<a href="' . admin_url( $edit_url ) . '" title="' . __( 'Edit this item', 'media-library-assistant' ) . '">' . __( 'Edit', 'media-library-assistant' ) . '</a>';
|
741 |
$actions['inline hide-if-no-js'] = '<a class="editinline" href="#" title="' . __( 'Edit this item inline', 'media-library-assistant' ) . '">' . __( 'Quick Edit', 'media-library-assistant' ) . '</a>';
|
742 |
+
} // edit_post
|
743 |
+
}
|
744 |
|
745 |
if ( current_user_can( 'delete_post', $item->ID ) ) {
|
746 |
if ( !$this->is_trash && EMPTY_TRASH_DAYS && MEDIA_TRASH ) {
|
753 |
}
|
754 |
} // delete_post
|
755 |
|
756 |
+
if ( ! $this->is_trash ) {
|
757 |
$file = get_attached_file( $item->ID );
|
758 |
$download_args = array( 'page' => MLACore::ADMIN_PAGE_SLUG, 'mla_download_file' => urlencode( $file ), 'mla_download_type' => $item->post_mime_type );
|
759 |
|
760 |
$actions['download'] = '<a href="' . add_query_arg( $download_args, wp_nonce_url( 'upload.php', MLACore::MLA_ADMIN_NONCE_ACTION, MLACore::MLA_ADMIN_NONCE_NAME ) ) . '" title="' . __( 'Download', 'media-library-assistant' ) . ' “' . $att_title . '”">' . __( 'Download', 'media-library-assistant' ) . '</a>';
|
|
|
761 |
|
|
|
762 |
$actions['view'] = '<a href="' . site_url( ) . '?attachment_id=' . $item->ID . '" rel="permalink" title="' . __( 'View', 'media-library-assistant' ) . ' “' . $att_title . '”">' . __( 'View', 'media-library-assistant' ) . '</a>';
|
763 |
}
|
764 |
|
1767 |
$query['post_mime_type'] = urlencode( $query['post_mime_type'] );
|
1768 |
} else {
|
1769 |
$query['meta_slug'] = $view_slug;
|
1770 |
+
$query['meta_query'] = urlencode( json_encode( $query['meta_query'] ) );
|
1771 |
}
|
1772 |
|
1773 |
return "<a href='" . add_query_arg( $query, $base_url ) . "'$class>" . sprintf( translate_nooped_plural( $nooped_plural, $total_items, 'media-library-assistant' ), number_format_i18n( $total_items ) ) . '</a>';
|
1796 |
$current_view = 'trash';
|
1797 |
} elseif ( empty( $_REQUEST['post_mime_type'] ) ) {
|
1798 |
if ( isset( $_REQUEST['meta_query'] ) ) {
|
1799 |
+
$query = json_decode( stripslashes( $_REQUEST['meta_query'] ), true );
|
1800 |
$current_view = $query['slug'];
|
1801 |
} else {
|
1802 |
$current_view = 'all';
|
includes/class-mla-main.php
CHANGED
@@ -351,9 +351,7 @@ class MLA {
|
|
351 |
return;
|
352 |
}
|
353 |
|
354 |
-
|
355 |
-
* Add the styles for variable-size icon and WP 4.3 primary column display
|
356 |
-
*/
|
357 |
add_action( 'admin_print_styles', 'MLA::mla_admin_print_styles_action' );
|
358 |
|
359 |
if ( $wp_locale->is_rtl() ) {
|
@@ -409,6 +407,10 @@ class MLA {
|
|
409 |
$script_variables['useSpinnerClass'] = true;
|
410 |
}
|
411 |
|
|
|
|
|
|
|
|
|
412 |
wp_localize_script( MLACore::JAVASCRIPT_INLINE_EDIT_SLUG, self::JAVASCRIPT_INLINE_EDIT_OBJECT, $script_variables );
|
413 |
}
|
414 |
|
@@ -468,7 +470,7 @@ class MLA {
|
|
468 |
$menu_position = (integer) MLACore::mla_get_option( MLACoreOptions::MLA_SCREEN_ORDER );
|
469 |
}
|
470 |
|
471 |
-
if ( $menu_position &&
|
472 |
foreach ( $submenu['upload.php'] as $menu_order => $menu_item ) {
|
473 |
if ( MLACore::ADMIN_PAGE_SLUG == $menu_item[2] ) {
|
474 |
$menu_item[2] = 'upload.php?page=' . MLACore::ADMIN_PAGE_SLUG;
|
@@ -700,11 +702,17 @@ class MLA {
|
|
700 |
public static function mla_parent_file_filter( $parent_file ) {
|
701 |
global $submenu_file, $submenu, $hook_suffix;
|
702 |
|
703 |
-
|
704 |
-
* Make sure the "Assistant" submenu line is bolded if it's the default
|
705 |
-
*/
|
706 |
if ( 'media_page_' . MLACore::ADMIN_PAGE_SLUG == $hook_suffix ) {
|
707 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
708 |
}
|
709 |
|
710 |
/*
|
@@ -789,7 +797,7 @@ class MLA {
|
|
789 |
* @return string Empty, or new value for the field
|
790 |
*/
|
791 |
private static function _process_bulk_value( $post_id, $bulk_value ) {
|
792 |
-
$new_value = trim( $bulk_value );
|
793 |
|
794 |
if ( 'template:[+empty+]' == $new_value ) {
|
795 |
return NULL;
|
@@ -2008,6 +2016,16 @@ class MLA {
|
|
2008 |
|
2009 |
$set_parent_form = MLA::mla_set_parent_form();
|
2010 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011 |
$page_values = array(
|
2012 |
'colspan' => $MLAListTable->get_column_count(),
|
2013 |
'Quick Edit' => __( 'Quick Edit', 'media-library-assistant' ),
|
@@ -2015,6 +2033,7 @@ class MLA {
|
|
2015 |
'Name/Slug' => __( 'Name/Slug', 'media-library-assistant' ),
|
2016 |
'Caption' => __( 'Caption', 'media-library-assistant' ),
|
2017 |
'Description' => __( 'Description', 'media-library-assistant' ),
|
|
|
2018 |
'ALT Text' => __( 'ALT Text', 'media-library-assistant' ),
|
2019 |
'Parent ID' => __( 'Parent ID', 'media-library-assistant' ),
|
2020 |
'Select' => __( 'Select', 'media-library-assistant' ),
|
351 |
return;
|
352 |
}
|
353 |
|
354 |
+
// Add the styles for variable-size icon and WP 4.3 primary column display
|
|
|
|
|
355 |
add_action( 'admin_print_styles', 'MLA::mla_admin_print_styles_action' );
|
356 |
|
357 |
if ( $wp_locale->is_rtl() ) {
|
407 |
$script_variables['useSpinnerClass'] = true;
|
408 |
}
|
409 |
|
410 |
+
if ( 'checked' == MLACore::mla_get_option( MLACoreOptions::MLA_BULK_EDITOR ) ) {
|
411 |
+
$script_variables['quickTagsInit'] = array( 'post_content' => array( 'id' => 'post_content', 'buttons' => 'strong,em,link,block,del,ins,img,ul,ol,li,code,close', 'active' => true, ) );
|
412 |
+
}
|
413 |
+
|
414 |
wp_localize_script( MLACore::JAVASCRIPT_INLINE_EDIT_SLUG, self::JAVASCRIPT_INLINE_EDIT_OBJECT, $script_variables );
|
415 |
}
|
416 |
|
470 |
$menu_position = (integer) MLACore::mla_get_option( MLACoreOptions::MLA_SCREEN_ORDER );
|
471 |
}
|
472 |
|
473 |
+
if ( $menu_position && !empty( $submenu['upload.php'] ) ) {
|
474 |
foreach ( $submenu['upload.php'] as $menu_order => $menu_item ) {
|
475 |
if ( MLACore::ADMIN_PAGE_SLUG == $menu_item[2] ) {
|
476 |
$menu_item[2] = 'upload.php?page=' . MLACore::ADMIN_PAGE_SLUG;
|
702 |
public static function mla_parent_file_filter( $parent_file ) {
|
703 |
global $submenu_file, $submenu, $hook_suffix;
|
704 |
|
705 |
+
// Make sure the "Assistant" submenu line is bolded if it's been moved
|
|
|
|
|
706 |
if ( 'media_page_' . MLACore::ADMIN_PAGE_SLUG == $hook_suffix ) {
|
707 |
+
if ( 'checked' != MLACore::mla_get_option( MLACoreOptions::MLA_SCREEN_DISPLAY_LIBRARY ) ) {
|
708 |
+
$menu_position = 4;
|
709 |
+
} else {
|
710 |
+
$menu_position = (integer) MLACore::mla_get_option( MLACoreOptions::MLA_SCREEN_ORDER );
|
711 |
+
}
|
712 |
+
|
713 |
+
if ( $menu_position ) {
|
714 |
+
$submenu_file = 'upload.php?page=' . MLACore::ADMIN_PAGE_SLUG;
|
715 |
+
}
|
716 |
}
|
717 |
|
718 |
/*
|
797 |
* @return string Empty, or new value for the field
|
798 |
*/
|
799 |
private static function _process_bulk_value( $post_id, $bulk_value ) {
|
800 |
+
$new_value = stripslashes( trim( $bulk_value ) );
|
801 |
|
802 |
if ( 'template:[+empty+]' == $new_value ) {
|
803 |
return NULL;
|
2016 |
|
2017 |
$set_parent_form = MLA::mla_set_parent_form();
|
2018 |
|
2019 |
+
if ( 'checked' == MLACore::mla_get_option( MLACoreOptions::MLA_BULK_EDITOR ) ) {
|
2020 |
+
$quicktags_settings = array( 'buttons' => 'strong,em,link,block,del,ins,img,ul,ol,li,code,close' );
|
2021 |
+
ob_start();
|
2022 |
+
wp_editor( '', 'post_content', array( 'media_buttons' => false, 'tinymce' => false, 'textarea_rows' => 5, 'quicktags' => $quicktags_settings ) );
|
2023 |
+
$description_field = ob_get_contents();
|
2024 |
+
ob_end_clean();
|
2025 |
+
} else {
|
2026 |
+
$description_field = '<textarea class="widefat" name="post_content"></textarea>';
|
2027 |
+
}
|
2028 |
+
|
2029 |
$page_values = array(
|
2030 |
'colspan' => $MLAListTable->get_column_count(),
|
2031 |
'Quick Edit' => __( 'Quick Edit', 'media-library-assistant' ),
|
2033 |
'Name/Slug' => __( 'Name/Slug', 'media-library-assistant' ),
|
2034 |
'Caption' => __( 'Caption', 'media-library-assistant' ),
|
2035 |
'Description' => __( 'Description', 'media-library-assistant' ),
|
2036 |
+
'description_field' => $description_field,
|
2037 |
'ALT Text' => __( 'ALT Text', 'media-library-assistant' ),
|
2038 |
'Parent ID' => __( 'Parent ID', 'media-library-assistant' ),
|
2039 |
'Select' => __( 'Select', 'media-library-assistant' ),
|
includes/class-mla-mime-types.php
CHANGED
@@ -561,20 +561,18 @@ class MLAMime {
|
|
561 |
}
|
562 |
|
563 |
/**
|
564 |
-
* Return the
|
565 |
*
|
566 |
* @since 1.40
|
567 |
*
|
568 |
-
* @return array
|
569 |
*/
|
570 |
private static function _get_sortable_upload_columns( ) {
|
571 |
-
$results = array()
|
572 |
-
|
573 |
foreach ( self::$default_sortable_upload_columns as $key => $value ) {
|
574 |
-
$value[
|
575 |
-
$results[ $key ] = $value;
|
576 |
}
|
577 |
-
|
578 |
return $results;
|
579 |
}
|
580 |
|
@@ -636,20 +634,18 @@ class MLAMime {
|
|
636 |
}
|
637 |
|
638 |
/**
|
639 |
-
* Return the names and
|
640 |
*
|
641 |
* @since 1.40
|
642 |
*
|
643 |
-
* @return array
|
644 |
*/
|
645 |
private static function _get_sortable_upload_optional_columns( ) {
|
646 |
-
$results = array()
|
647 |
-
|
648 |
foreach ( self::$default_upload_optional_sortable_columns as $key => $value ) {
|
649 |
-
$value[
|
650 |
-
$results[ $key ] = $value;
|
651 |
}
|
652 |
-
|
653 |
return $results;
|
654 |
}
|
655 |
|
@@ -717,20 +713,18 @@ class MLAMime {
|
|
717 |
}
|
718 |
|
719 |
/**
|
720 |
-
* Return the names and
|
721 |
*
|
722 |
* @since 1.40
|
723 |
*
|
724 |
-
* @return array
|
725 |
*/
|
726 |
private static function _get_sortable_view_columns( ) {
|
727 |
-
$results = array()
|
728 |
-
|
729 |
foreach ( self::$default_sortable_view_columns as $key => $value ) {
|
730 |
-
$value[
|
731 |
-
$results[ $key ] = $value;
|
732 |
}
|
733 |
-
|
734 |
return $results;
|
735 |
}
|
736 |
|
@@ -768,13 +762,9 @@ class MLAMime {
|
|
768 |
if ( 'none' == $value ) {
|
769 |
$clean_request[ $key ] = $value;
|
770 |
} else {
|
771 |
-
$
|
772 |
-
|
773 |
-
|
774 |
-
$clean_request[ $key ] = $value;
|
775 |
-
break;
|
776 |
-
}
|
777 |
-
} // foreach
|
778 |
}
|
779 |
break;
|
780 |
case 'order':
|
@@ -1425,13 +1415,9 @@ class MLAMime {
|
|
1425 |
if ( 'none' == $value ) {
|
1426 |
$clean_request[ $key ] = $value;
|
1427 |
} else {
|
1428 |
-
$
|
1429 |
-
|
1430 |
-
|
1431 |
-
$clean_request[ $key ] = $value;
|
1432 |
-
break;
|
1433 |
-
}
|
1434 |
-
} // foreach
|
1435 |
}
|
1436 |
break;
|
1437 |
case 'order':
|
@@ -2613,13 +2599,9 @@ class MLAMime {
|
|
2613 |
if ( 'none' == $value ) {
|
2614 |
$clean_request[ $key ] = $value;
|
2615 |
} else {
|
2616 |
-
$
|
2617 |
-
|
2618 |
-
|
2619 |
-
$clean_request[ $key ] = $value;
|
2620 |
-
break;
|
2621 |
-
}
|
2622 |
-
} // foreach
|
2623 |
}
|
2624 |
break;
|
2625 |
case 'order':
|
561 |
}
|
562 |
|
563 |
/**
|
564 |
+
* Return the orderby values of the sortable columns
|
565 |
*
|
566 |
* @since 1.40
|
567 |
*
|
568 |
+
* @return array orderby_valuecolumn_slug => array( , initial_descending_sort ) for sortable columns
|
569 |
*/
|
570 |
private static function _get_sortable_upload_columns( ) {
|
571 |
+
$results = array();
|
|
|
572 |
foreach ( self::$default_sortable_upload_columns as $key => $value ) {
|
573 |
+
$results[ $value[0] ] = $value[0];
|
|
|
574 |
}
|
575 |
+
|
576 |
return $results;
|
577 |
}
|
578 |
|
634 |
}
|
635 |
|
636 |
/**
|
637 |
+
* Return the names and orderby values of the sortable columns
|
638 |
*
|
639 |
* @since 1.40
|
640 |
*
|
641 |
+
* @return array column_slug => array( orderby value, initial_descending_sort ) for sortable columns
|
642 |
*/
|
643 |
private static function _get_sortable_upload_optional_columns( ) {
|
644 |
+
$results = array();
|
|
|
645 |
foreach ( self::$default_upload_optional_sortable_columns as $key => $value ) {
|
646 |
+
$results[ $value[0] ] = $value[0];
|
|
|
647 |
}
|
648 |
+
|
649 |
return $results;
|
650 |
}
|
651 |
|
713 |
}
|
714 |
|
715 |
/**
|
716 |
+
* Return the names and orderby values of the sortable columns
|
717 |
*
|
718 |
* @since 1.40
|
719 |
*
|
720 |
+
* @return array column_slug => array( orderby value, initial_descending_sort ) for sortable columns
|
721 |
*/
|
722 |
private static function _get_sortable_view_columns( ) {
|
723 |
+
$results = array();
|
|
|
724 |
foreach ( self::$default_sortable_view_columns as $key => $value ) {
|
725 |
+
$results[ $value[0] ] = $value[0];
|
|
|
726 |
}
|
727 |
+
|
728 |
return $results;
|
729 |
}
|
730 |
|
762 |
if ( 'none' == $value ) {
|
763 |
$clean_request[ $key ] = $value;
|
764 |
} else {
|
765 |
+
if ( array_key_exists( $value, self::_get_sortable_view_columns() ) ) {
|
766 |
+
$clean_request[ $key ] = $value;
|
767 |
+
}
|
|
|
|
|
|
|
|
|
768 |
}
|
769 |
break;
|
770 |
case 'order':
|
1415 |
if ( 'none' == $value ) {
|
1416 |
$clean_request[ $key ] = $value;
|
1417 |
} else {
|
1418 |
+
if ( array_key_exists( $value, self::_get_sortable_upload_columns() ) ) {
|
1419 |
+
$clean_request[ $key ] = $value;
|
1420 |
+
}
|
|
|
|
|
|
|
|
|
1421 |
}
|
1422 |
break;
|
1423 |
case 'order':
|
2599 |
if ( 'none' == $value ) {
|
2600 |
$clean_request[ $key ] = $value;
|
2601 |
} else {
|
2602 |
+
if ( array_key_exists( $value, self::_get_sortable_upload_optional_columns() ) ) {
|
2603 |
+
$clean_request[ $key ] = $value;
|
2604 |
+
}
|
|
|
|
|
|
|
|
|
2605 |
}
|
2606 |
break;
|
2607 |
case 'order':
|
includes/class-mla-objects.php
CHANGED
@@ -21,19 +21,23 @@ class MLAObjects {
|
|
21 |
* @return void
|
22 |
*/
|
23 |
public static function initialize() {
|
24 |
-
self::
|
25 |
}
|
26 |
|
27 |
/**
|
28 |
-
* Registers Attachment Categories and Attachment Tags custom taxonomies
|
29 |
*
|
30 |
-
* @since
|
31 |
*
|
32 |
* @return void
|
33 |
*/
|
34 |
-
|
35 |
if ( MLACore::mla_taxonomy_support('attachment_category') ) {
|
36 |
-
$
|
|
|
|
|
|
|
|
|
37 |
'name' => _x( 'Att. Categories', 'taxonomy_name_plural', 'media-library-assistant' ),
|
38 |
'singular_name' => _x( 'Att. Category', 'taxonomy_name_singular', 'media-library-assistant' ),
|
39 |
'search_items' => __( 'Search Att. Categories', 'media-library-assistant' ),
|
@@ -46,24 +50,26 @@ class MLAObjects {
|
|
46 |
'add_new_item' => sprintf( __( 'Add New %1$s', 'media-library-assistant' ), __( 'Att. Category', 'media-library-assistant' ) ),
|
47 |
'new_item_name' => __( 'New Att. Category Name', 'media-library-assistant' ),
|
48 |
'menu_name' => __( 'Att. Category', 'media-library-assistant' )
|
49 |
-
);
|
50 |
-
|
51 |
-
|
52 |
-
'
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
)
|
62 |
-
);
|
63 |
}
|
64 |
|
65 |
if ( MLACore::mla_taxonomy_support('attachment_tag') ) {
|
66 |
-
$
|
|
|
|
|
|
|
|
|
67 |
'name' => _x( 'Att. Tags', 'taxonomy_name_plural', 'media-library-assistant' ),
|
68 |
'singular_name' => _x( 'Att. Tag', 'taxonomy_name_singular', 'media-library-assistant' ),
|
69 |
'search_items' => __( 'Search Att. Tags', 'media-library-assistant' ),
|
@@ -76,22 +82,29 @@ class MLAObjects {
|
|
76 |
'add_new_item' => sprintf( __( 'Add New %1$s', 'media-library-assistant' ), __( 'Att. Tag', 'media-library-assistant' ) ),
|
77 |
'new_item_name' => __( 'New Att. Tag Name', 'media-library-assistant' ),
|
78 |
'menu_name' => __( 'Att. Tag', 'media-library-assistant' )
|
79 |
-
);
|
80 |
|
81 |
-
|
82 |
-
'attachment_tag',
|
83 |
-
array( 'attachment' ),
|
84 |
-
array(
|
85 |
'hierarchical' => false,
|
86 |
'labels' => $labels,
|
87 |
'show_ui' => true,
|
88 |
'query_var' => true,
|
89 |
'rewrite' => true,
|
90 |
'update_count_callback' => '_update_generic_term_count'
|
91 |
-
|
92 |
-
|
|
|
93 |
}
|
|
|
94 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
MLACore::mla_initialize_tax_checked_on_top();
|
96 |
$taxonomies = get_taxonomies( array ( 'show_ui' => true ), 'names' );
|
97 |
foreach ( $taxonomies as $tax_name ) {
|
@@ -101,7 +114,7 @@ class MLAObjects {
|
|
101 |
add_filter( "manage_{$tax_name}_custom_column", 'MLAObjects::mla_taxonomy_column_filter', 0x7FFFFFFF, 3 ); // $place_holder, $column_name, $tag->term_id
|
102 |
} // taxonomy support
|
103 |
} // foreach
|
104 |
-
} //
|
105 |
|
106 |
/**
|
107 |
* WordPress Filter for edit taxonomy "Attachments" column,
|
@@ -206,16 +219,14 @@ class MLAObjects {
|
|
206 |
$terms = get_transient( MLA_OPTION_PREFIX . 't_term_counts_' . $taxonomy );
|
207 |
|
208 |
if ( ! is_array( $terms ) ) {
|
209 |
-
|
210 |
-
* The MLAShortcodes class is only loaded when needed.
|
211 |
-
*/
|
212 |
if ( !class_exists( 'MLAShortcodes' ) ) {
|
213 |
require_once( MLA_PLUGIN_PATH . 'includes/class-mla-shortcodes.php' );
|
214 |
}
|
215 |
|
216 |
$cloud = MLAShortcodes::mla_get_terms( array(
|
217 |
'taxonomy' => $taxonomy,
|
218 |
-
'fields' => 't.term_id, t.name, t.slug, COUNT(p.ID) AS `count`',
|
219 |
'number' => 0,
|
220 |
'no_orderby' => true
|
221 |
) );
|
@@ -234,19 +245,44 @@ class MLAObjects {
|
|
234 |
$term = $terms[ $term_id ];
|
235 |
$column_text = number_format_i18n( $term->count );
|
236 |
} else {
|
|
|
237 |
$term = get_term( $term_id, $taxonomy );
|
238 |
|
239 |
if ( is_wp_error( $term ) ) {
|
240 |
/* translators: 1: ERROR tag 2: taxonomy 3: error message */
|
241 |
MLACore::mla_debug_add( sprintf( _x( '%1$s: mla_taxonomy_column_filter( "%2$s" ) - get_term failed: "%3$s"', 'error_log', 'media-library-assistant' ), __( 'ERROR', 'media-library-assistant' ), $taxonomy, $term->get_error_message() ), MLACore::MLA_DEBUG_CATEGORY_ANY );
|
242 |
return 0;
|
243 |
-
} elseif ($count_terms ) {
|
|
|
244 |
$column_text = number_format_i18n( 0 );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
245 |
} else {
|
246 |
$column_text = __( 'click to search', 'media-library-assistant' );
|
247 |
}
|
248 |
}
|
249 |
|
|
|
|
|
|
|
|
|
|
|
250 |
return sprintf( '<a href="%1$s">%2$s</a>', esc_url( add_query_arg(
|
251 |
array( 'page' => MLACore::ADMIN_PAGE_SLUG, 'mla-tax' => $taxonomy, 'mla-term' => $term->slug, 'heading_suffix' => urlencode( $tax_object->label . ':' . $term->name ) ), 'upload.php' ) ), $column_text );
|
252 |
}
|
@@ -296,7 +332,9 @@ class MLATextWidget extends WP_Widget {
|
|
296 |
$text = do_shortcode( apply_filters( 'widget_text', empty( $instance['text'] ) ? '' : $instance['text'], $instance ) );
|
297 |
echo $args['before_widget'];
|
298 |
if ( !empty( $title ) ) { echo $args['before_title'] . $title . $args['after_title']; } ?>
|
299 |
-
|
|
|
|
|
300 |
<?php
|
301 |
echo $args['after_widget'];
|
302 |
}
|
@@ -321,6 +359,7 @@ class MLATextWidget extends WP_Widget {
|
|
321 |
<textarea class="widefat" rows="16" cols="20" id="<?php echo $this->get_field_id( 'text' ); ?>" name="<?php echo $this->get_field_name( 'text' ); ?>"><?php echo $text; ?></textarea>
|
322 |
|
323 |
<p><input id="<?php echo $this->get_field_id( 'filter' ); ?>" name="<?php echo $this->get_field_name( 'filter' ); ?>" type="checkbox" <?php checked( isset( $instance['filter'] ) ? $instance['filter'] : 0 ); ?> /> <label for="<?php echo $this->get_field_id( 'filter' ); ?>"><?php _e( 'Automatically add paragraphs', 'media-library-assistant' ); ?></label></p>
|
|
|
324 |
<?php
|
325 |
}
|
326 |
|
@@ -344,6 +383,7 @@ class MLATextWidget extends WP_Widget {
|
|
344 |
}
|
345 |
|
346 |
$instance['filter'] = isset( $new_instance['filter'] );
|
|
|
347 |
return $instance;
|
348 |
}
|
349 |
|
21 |
* @return void
|
22 |
*/
|
23 |
public static function initialize() {
|
24 |
+
self::_add_taxonomy_support();
|
25 |
}
|
26 |
|
27 |
/**
|
28 |
+
* Registers Attachment Categories and Attachment Tags custom taxonomies
|
29 |
*
|
30 |
+
* @since 2.61
|
31 |
*
|
32 |
* @return void
|
33 |
*/
|
34 |
+
public static function mla_build_taxonomies( ) {
|
35 |
if ( MLACore::mla_taxonomy_support('attachment_category') ) {
|
36 |
+
$object_type = apply_filters( 'mla_attachment_category_types', array(
|
37 |
+
'attachment'
|
38 |
+
) );
|
39 |
+
|
40 |
+
$labels = apply_filters( 'mla_attachment_category_labels', array(
|
41 |
'name' => _x( 'Att. Categories', 'taxonomy_name_plural', 'media-library-assistant' ),
|
42 |
'singular_name' => _x( 'Att. Category', 'taxonomy_name_singular', 'media-library-assistant' ),
|
43 |
'search_items' => __( 'Search Att. Categories', 'media-library-assistant' ),
|
50 |
'add_new_item' => sprintf( __( 'Add New %1$s', 'media-library-assistant' ), __( 'Att. Category', 'media-library-assistant' ) ),
|
51 |
'new_item_name' => __( 'New Att. Category Name', 'media-library-assistant' ),
|
52 |
'menu_name' => __( 'Att. Category', 'media-library-assistant' )
|
53 |
+
) );
|
54 |
+
|
55 |
+
$args = apply_filters( 'mla_attachment_category_arguments', array(
|
56 |
+
'hierarchical' => true,
|
57 |
+
'labels' => $labels,
|
58 |
+
'show_ui' => true,
|
59 |
+
'query_var' => true,
|
60 |
+
'rewrite' => true,
|
61 |
+
'update_count_callback' => '_update_generic_term_count'
|
62 |
+
) );
|
63 |
+
|
64 |
+
register_taxonomy( 'attachment_category', $object_type, $args );
|
|
|
|
|
65 |
}
|
66 |
|
67 |
if ( MLACore::mla_taxonomy_support('attachment_tag') ) {
|
68 |
+
$object_type = apply_filters( 'mla_attachment_tag_types', array(
|
69 |
+
'attachment'
|
70 |
+
) );
|
71 |
+
|
72 |
+
$labels = apply_filters( 'mla_attachment_tag_labels', array(
|
73 |
'name' => _x( 'Att. Tags', 'taxonomy_name_plural', 'media-library-assistant' ),
|
74 |
'singular_name' => _x( 'Att. Tag', 'taxonomy_name_singular', 'media-library-assistant' ),
|
75 |
'search_items' => __( 'Search Att. Tags', 'media-library-assistant' ),
|
82 |
'add_new_item' => sprintf( __( 'Add New %1$s', 'media-library-assistant' ), __( 'Att. Tag', 'media-library-assistant' ) ),
|
83 |
'new_item_name' => __( 'New Att. Tag Name', 'media-library-assistant' ),
|
84 |
'menu_name' => __( 'Att. Tag', 'media-library-assistant' )
|
85 |
+
) );
|
86 |
|
87 |
+
$args = apply_filters( 'mla_attachment_tag_arguments', array(
|
|
|
|
|
|
|
88 |
'hierarchical' => false,
|
89 |
'labels' => $labels,
|
90 |
'show_ui' => true,
|
91 |
'query_var' => true,
|
92 |
'rewrite' => true,
|
93 |
'update_count_callback' => '_update_generic_term_count'
|
94 |
+
) );
|
95 |
+
|
96 |
+
register_taxonomy( 'attachment_tag', $object_type, $args );
|
97 |
}
|
98 |
+
} // mla_build_taxonomies
|
99 |
|
100 |
+
/**
|
101 |
+
* Adds taxonomy-related filters for MLA-supported taxonomies
|
102 |
+
*
|
103 |
+
* @since 2.61
|
104 |
+
*
|
105 |
+
* @return void
|
106 |
+
*/
|
107 |
+
private static function _add_taxonomy_support( ) {
|
108 |
MLACore::mla_initialize_tax_checked_on_top();
|
109 |
$taxonomies = get_taxonomies( array ( 'show_ui' => true ), 'names' );
|
110 |
foreach ( $taxonomies as $tax_name ) {
|
114 |
add_filter( "manage_{$tax_name}_custom_column", 'MLAObjects::mla_taxonomy_column_filter', 0x7FFFFFFF, 3 ); // $place_holder, $column_name, $tag->term_id
|
115 |
} // taxonomy support
|
116 |
} // foreach
|
117 |
+
} // _add_taxonomy_support
|
118 |
|
119 |
/**
|
120 |
* WordPress Filter for edit taxonomy "Attachments" column,
|
219 |
$terms = get_transient( MLA_OPTION_PREFIX . 't_term_counts_' . $taxonomy );
|
220 |
|
221 |
if ( ! is_array( $terms ) ) {
|
222 |
+
// The MLAShortcodes class is only loaded when needed.
|
|
|
|
|
223 |
if ( !class_exists( 'MLAShortcodes' ) ) {
|
224 |
require_once( MLA_PLUGIN_PATH . 'includes/class-mla-shortcodes.php' );
|
225 |
}
|
226 |
|
227 |
$cloud = MLAShortcodes::mla_get_terms( array(
|
228 |
'taxonomy' => $taxonomy,
|
229 |
+
'fields' => 't.term_id, tt.term_taxonomy_id, t.name, t.slug, COUNT(p.ID) AS `count`',
|
230 |
'number' => 0,
|
231 |
'no_orderby' => true
|
232 |
) );
|
245 |
$term = $terms[ $term_id ];
|
246 |
$column_text = number_format_i18n( $term->count );
|
247 |
} else {
|
248 |
+
// Cache miss, e.g., WPML/Polylang language has changed
|
249 |
$term = get_term( $term_id, $taxonomy );
|
250 |
|
251 |
if ( is_wp_error( $term ) ) {
|
252 |
/* translators: 1: ERROR tag 2: taxonomy 3: error message */
|
253 |
MLACore::mla_debug_add( sprintf( _x( '%1$s: mla_taxonomy_column_filter( "%2$s" ) - get_term failed: "%3$s"', 'error_log', 'media-library-assistant' ), __( 'ERROR', 'media-library-assistant' ), $taxonomy, $term->get_error_message() ), MLACore::MLA_DEBUG_CATEGORY_ANY );
|
254 |
return 0;
|
255 |
+
} elseif ( $count_terms ) {
|
256 |
+
// Default to zero, then try to find a real count
|
257 |
$column_text = number_format_i18n( 0 );
|
258 |
+
|
259 |
+
// The MLAShortcodes class is only loaded when needed.
|
260 |
+
if ( !class_exists( 'MLAShortcodes' ) ) {
|
261 |
+
require_once( MLA_PLUGIN_PATH . 'includes/class-mla-shortcodes.php' );
|
262 |
+
}
|
263 |
+
|
264 |
+
$cloud = MLAShortcodes::mla_get_terms( array(
|
265 |
+
'taxonomy' => $taxonomy,
|
266 |
+
'include' => $term->term_id,
|
267 |
+
'fields' => 't.term_id, tt.term_taxonomy_id, t.name, t.slug, COUNT(p.ID) AS `count`',
|
268 |
+
'number' => 0,
|
269 |
+
'no_orderby' => true
|
270 |
+
) );
|
271 |
+
|
272 |
+
unset( $cloud['found_rows'] );
|
273 |
+
foreach( $cloud as $term ) {
|
274 |
+
$column_text = number_format_i18n( $term->count );
|
275 |
+
}
|
276 |
} else {
|
277 |
$column_text = __( 'click to search', 'media-library-assistant' );
|
278 |
}
|
279 |
}
|
280 |
|
281 |
+
$filter_content = apply_filters( 'mla_taxonomy_column_final', NULL, $tax_object, $term, $column_text, $count_terms );
|
282 |
+
if ( ! empty( $filter_content ) ) {
|
283 |
+
return $filter_content;
|
284 |
+
}
|
285 |
+
|
286 |
return sprintf( '<a href="%1$s">%2$s</a>', esc_url( add_query_arg(
|
287 |
array( 'page' => MLACore::ADMIN_PAGE_SLUG, 'mla-tax' => $taxonomy, 'mla-term' => $term->slug, 'heading_suffix' => urlencode( $tax_object->label . ':' . $term->name ) ), 'upload.php' ) ), $column_text );
|
288 |
}
|
332 |
$text = do_shortcode( apply_filters( 'widget_text', empty( $instance['text'] ) ? '' : $instance['text'], $instance ) );
|
333 |
echo $args['before_widget'];
|
334 |
if ( !empty( $title ) ) { echo $args['before_title'] . $title . $args['after_title']; } ?>
|
335 |
+
<?php if ( !empty( $instance['textwidget_div'] ) ) echo '<div class="textwidget">';
|
336 |
+
echo !empty( $instance['filter'] ) ? wpautop( $text ) : $text;
|
337 |
+
if ( !empty( $instance['textwidget_div'] ) ) echo '</div>'; ?>
|
338 |
<?php
|
339 |
echo $args['after_widget'];
|
340 |
}
|
359 |
<textarea class="widefat" rows="16" cols="20" id="<?php echo $this->get_field_id( 'text' ); ?>" name="<?php echo $this->get_field_name( 'text' ); ?>"><?php echo $text; ?></textarea>
|
360 |
|
361 |
<p><input id="<?php echo $this->get_field_id( 'filter' ); ?>" name="<?php echo $this->get_field_name( 'filter' ); ?>" type="checkbox" <?php checked( isset( $instance['filter'] ) ? $instance['filter'] : 0 ); ?> /> <label for="<?php echo $this->get_field_id( 'filter' ); ?>"><?php _e( 'Automatically add paragraphs', 'media-library-assistant' ); ?></label></p>
|
362 |
+
<p><input id="<?php echo $this->get_field_id( 'textwidget_div' ); ?>" name="<?php echo $this->get_field_name( 'textwidget_div' ); ?>" type="checkbox" <?php checked( isset( $instance['textwidget_div'] ) ? $instance['textwidget_div'] : 1 ); ?> /> <label for="<?php echo $this->get_field_id( 'textwidget_div' ); ?>"><?php _e( 'Add .textwidget div tags', 'media-library-assistant' ); ?></label></p>
|
363 |
<?php
|
364 |
}
|
365 |
|
383 |
}
|
384 |
|
385 |
$instance['filter'] = isset( $new_instance['filter'] );
|
386 |
+
$instance['textwidget_div'] = isset( $new_instance['textwidget_div'] );
|
387 |
return $instance;
|
388 |
}
|
389 |
|
includes/class-mla-polylang-support.php
CHANGED
@@ -656,13 +656,13 @@ class MLA_Polylang {
|
|
656 |
*/
|
657 |
private static function _create_relevant_term( $name, $taxonomy, $language ) {
|
658 |
global $polylang;
|
659 |
-
|
660 |
// save_language() does a check_admin_referer() security test
|
661 |
$_REQUEST['_pll_nonce'] = wp_create_nonce( 'pll_language' );
|
662 |
$_POST['term_lang_choice'] = $language;
|
663 |
$_POST['action'] = 'mla';
|
664 |
$res = wp_insert_term( $name, $taxonomy, array( 'parent' => 0 ) );
|
665 |
-
|
666 |
if ( ( ! is_wp_error( $res ) ) && isset( $res['term_id'] ) ) {
|
667 |
if ( self::$polylang_1dot8_plus ) {
|
668 |
PLL()->model->term->set_language( $res['term_id'], $language );
|
@@ -670,6 +670,7 @@ class MLA_Polylang {
|
|
670 |
$polylang->model->set_term_language( $res['term_id'], $language );
|
671 |
}
|
672 |
}
|
|
|
673 |
unset( $_POST['term_lang_choice'] );
|
674 |
unset( $_POST['action'] );
|
675 |
|
@@ -691,41 +692,39 @@ class MLA_Polylang {
|
|
691 |
$source_term = $relevant_term['term']->term_id;
|
692 |
$name = $relevant_term['term']->name;
|
693 |
$taxonomy = $relevant_term['term']->taxonomy;
|
694 |
-
//error_log( __LINE__ . " _create_relevant_translation( {$name}, {$taxonomy}, {$language} )", 0 );
|
695 |
|
696 |
// save_language() does a check_admin_referer() security test
|
697 |
$_REQUEST['_pll_nonce'] = wp_create_nonce( 'pll_language' );
|
698 |
$_POST['term_lang_choice'] = $language;
|
699 |
$_POST['action'] = 'mla';
|
700 |
$res = wp_insert_term( $name, $taxonomy, array( 'parent' => 0 ) );
|
701 |
-
|
702 |
if ( ( ! is_wp_error( $res ) ) && isset( $res['term_id'] ) ) {
|
703 |
if ( self::$polylang_1dot8_plus ) {
|
704 |
PLL()->model->term->set_language( $res['term_id'], $language );
|
705 |
} else {
|
706 |
$polylang->model->set_term_language( $res['term_id'], $language );
|
707 |
}
|
708 |
-
}
|
709 |
-
unset( $_POST['term_lang_choice'] );
|
710 |
-
unset( $_POST['action'] );
|
711 |
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
716 |
}
|
717 |
}
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
} else {
|
722 |
-
$polylang->model->save_translations( 'term', $source_term, $translations );
|
723 |
-
}
|
724 |
|
725 |
// Reload the term with its new translation
|
726 |
-
|
727 |
-
//error_log( __LINE__ . " _create_relevant_translation( {$name}, {$taxonomy}, {$language} ) term = " . var_export( $term, true ), 0 );
|
728 |
-
return $term;
|
729 |
} // _create_relevant_translation
|
730 |
|
731 |
/**
|
@@ -786,9 +785,8 @@ class MLA_Polylang {
|
|
786 |
* @param boolean $test_only false (default) to add missing term, true to leave term out
|
787 |
*/
|
788 |
private static function _get_relevant_term( $field, $value, $taxonomy, $language = NULL, $test_only = false ) {
|
789 |
-
|
790 |
-
|
791 |
-
*/
|
792 |
if ( 'name' == $field ) {
|
793 |
$value = _wp_specialchars( $value );
|
794 |
}
|
@@ -825,26 +823,18 @@ class MLA_Polylang {
|
|
825 |
if ( ( false === $relevant_term ) && $test_only ) {
|
826 |
return false;
|
827 |
}
|
828 |
-
//error_log( __LINE__ . " _get_relevant_term( {$field}, {$taxonomy}, {$value} ) relevant_term = " . var_export( $relevant_term, true ), 0 );
|
829 |
|
830 |
-
|
831 |
-
* If no match, try to add it and its translations
|
832 |
-
*/
|
833 |
if ( ( false === $relevant_term ) && $candidate = get_term_by( $field, $value, $taxonomy ) ) {
|
834 |
-
//error_log( __LINE__ . " _get_relevant_term( {$field}, {$taxonomy}, {$value} ) candidate = " . var_export( $candidate, true ), 0 );
|
835 |
$relevant_term = self::_add_relevant_term( $candidate );
|
836 |
-
//error_log( __LINE__ . " _get_relevant_term( {$field}, {$taxonomy}, {$value} ) relevant_term = " . var_export( $relevant_term, true ), 0 );
|
837 |
|
838 |
foreach ( $relevant_term['translations'] as $translation ) {
|
839 |
$term_object = get_term_by( 'id', $translation->element_id, $taxonomy );
|
840 |
self::_add_relevant_term( $term_object, $relevant_term['translations'] );
|
841 |
} // translation
|
842 |
} // new term
|
843 |
-
//error_log( __LINE__ . " _get_relevant_term( {$field}, {$taxonomy}, {$value} ) candidate = " . var_export( $candidate, true ), 0 );
|
844 |
|
845 |
-
|
846 |
-
* Find the language-specific value, if requested
|
847 |
-
*/
|
848 |
if ( $relevant_term && ! empty( $language ) ) {
|
849 |
if ( $relevant_term && array_key_exists( $language, $relevant_term['translations'] ) ) {
|
850 |
$relevant_term = self::$relevant_terms[ $relevant_term['translations'][ $language ]->element_id ];
|
@@ -1128,9 +1118,6 @@ class MLA_Polylang {
|
|
1128 |
$relevant_term = self::_create_relevant_term( $term_name, $taxonomy, self::$existing_terms['slug'] );
|
1129 |
$new_names[ $term_name ][ self::$existing_terms['slug'] ] = $relevant_term['term']->term_id;
|
1130 |
} else {
|
1131 |
-
$language = self::$existing_terms['slug'];
|
1132 |
-
//error_log( __LINE__ . " _build_tax_input( {$post_id}, {$term_name}, {$language} ) relevant_term = " . var_export( $relevant_term, true ), 0 );
|
1133 |
-
//error_log( __LINE__ . " _build_tax_input( {$post_id}, {$term_name}, {$language} ) new_names = " . var_export( $new_names, true ), 0 );
|
1134 |
if ( !array_key_exists( self::$existing_terms['slug'], $relevant_term['translations'] ) && isset( $new_names[ $term_name ] ) ) {
|
1135 |
$relevant_term = self::_create_relevant_translation( $relevant_term, self::$existing_terms['slug'] );
|
1136 |
$new_names[ $term_name ][ self::$existing_terms['slug'] ] = $relevant_term['term']->term_id;
|
@@ -1150,10 +1137,8 @@ class MLA_Polylang {
|
|
1150 |
} // flat taxonomy
|
1151 |
|
1152 |
foreach( $active_languages as $language => $language_details ) {
|
|
|
1153 |
$language = $language_details->slug;
|
1154 |
-
/*
|
1155 |
-
* Apply the tax_action to the terms_before to find the terms_after
|
1156 |
-
*/
|
1157 |
$term_changes = isset( $input_terms[ $language ] ) ? $input_terms[ $language ] : array();
|
1158 |
if ( 'replace' == $tax_action ) {
|
1159 |
$terms_after = $term_changes;
|
@@ -1169,9 +1154,7 @@ class MLA_Polylang {
|
|
1169 |
} // input_term
|
1170 |
}
|
1171 |
|
1172 |
-
|
1173 |
-
* Convert terms_after to tax_input format
|
1174 |
-
*/
|
1175 |
$term_changes = array();
|
1176 |
foreach( $terms_after as $input_term ) {
|
1177 |
$term_changes[] = $input_term->term_id;
|
@@ -1570,7 +1553,6 @@ class MLA_Polylang {
|
|
1570 |
} else {
|
1571 |
$tax_inputs = array( $key => implode( ',', $terms ) );
|
1572 |
}
|
1573 |
-
//error_log( __LINE__ . " MLA_Polylang::mla_media_modal_update_compat_fields_terms = " . var_export( $tax_inputs, true ), 0 );
|
1574 |
|
1575 |
self::_build_tax_input( $post_id, $tax_inputs, NULL, true );
|
1576 |
$tax_inputs = self::_apply_tax_input( $post_id );
|
@@ -2580,7 +2562,7 @@ class MLA_Polylang {
|
|
2580 |
foreach ( MLA_Polylang::$mla_language_option_definitions as $key => $value ) {
|
2581 |
if ( 'language' == $value['tab'] ) {
|
2582 |
if ( 'custom' == $value['type'] && isset( $value['reset'] ) ) {
|
2583 |
-
$message = MLA_Polylang
|
2584 |
} elseif ( ('header' == $value['type']) || ('hidden' == $value['type']) ) {
|
2585 |
$message = '';
|
2586 |
} else {
|
656 |
*/
|
657 |
private static function _create_relevant_term( $name, $taxonomy, $language ) {
|
658 |
global $polylang;
|
659 |
+
|
660 |
// save_language() does a check_admin_referer() security test
|
661 |
$_REQUEST['_pll_nonce'] = wp_create_nonce( 'pll_language' );
|
662 |
$_POST['term_lang_choice'] = $language;
|
663 |
$_POST['action'] = 'mla';
|
664 |
$res = wp_insert_term( $name, $taxonomy, array( 'parent' => 0 ) );
|
665 |
+
|
666 |
if ( ( ! is_wp_error( $res ) ) && isset( $res['term_id'] ) ) {
|
667 |
if ( self::$polylang_1dot8_plus ) {
|
668 |
PLL()->model->term->set_language( $res['term_id'], $language );
|
670 |
$polylang->model->set_term_language( $res['term_id'], $language );
|
671 |
}
|
672 |
}
|
673 |
+
|
674 |
unset( $_POST['term_lang_choice'] );
|
675 |
unset( $_POST['action'] );
|
676 |
|
692 |
$source_term = $relevant_term['term']->term_id;
|
693 |
$name = $relevant_term['term']->name;
|
694 |
$taxonomy = $relevant_term['term']->taxonomy;
|
|
|
695 |
|
696 |
// save_language() does a check_admin_referer() security test
|
697 |
$_REQUEST['_pll_nonce'] = wp_create_nonce( 'pll_language' );
|
698 |
$_POST['term_lang_choice'] = $language;
|
699 |
$_POST['action'] = 'mla';
|
700 |
$res = wp_insert_term( $name, $taxonomy, array( 'parent' => 0 ) );
|
701 |
+
|
702 |
if ( ( ! is_wp_error( $res ) ) && isset( $res['term_id'] ) ) {
|
703 |
if ( self::$polylang_1dot8_plus ) {
|
704 |
PLL()->model->term->set_language( $res['term_id'], $language );
|
705 |
} else {
|
706 |
$polylang->model->set_term_language( $res['term_id'], $language );
|
707 |
}
|
|
|
|
|
|
|
708 |
|
709 |
+
$translations = array( $language => $res['term_id'] );
|
710 |
+
if (isset( $relevant_term['translations'] ) ) {
|
711 |
+
foreach( $relevant_term['translations'] as $slug => $translation ) {
|
712 |
+
$translations[ $slug ] = $translation->element_id;
|
713 |
+
}
|
714 |
+
}
|
715 |
+
|
716 |
+
if ( self::$polylang_1dot8_plus ) {
|
717 |
+
PLL()->model->term->save_translations( $source_term, $translations );
|
718 |
+
} else {
|
719 |
+
$polylang->model->save_translations( 'term', $source_term, $translations );
|
720 |
}
|
721 |
}
|
722 |
+
|
723 |
+
unset( $_POST['term_lang_choice'] );
|
724 |
+
unset( $_POST['action'] );
|
|
|
|
|
|
|
725 |
|
726 |
// Reload the term with its new translation
|
727 |
+
return self::_get_relevant_term( 'id', $res['term_id'], $taxonomy );
|
|
|
|
|
728 |
} // _create_relevant_translation
|
729 |
|
730 |
/**
|
785 |
* @param boolean $test_only false (default) to add missing term, true to leave term out
|
786 |
*/
|
787 |
private static function _get_relevant_term( $field, $value, $taxonomy, $language = NULL, $test_only = false ) {
|
788 |
+
|
789 |
+
// WordPress encodes special characters, e.g., "&" as HTML entities in term names
|
|
|
790 |
if ( 'name' == $field ) {
|
791 |
$value = _wp_specialchars( $value );
|
792 |
}
|
823 |
if ( ( false === $relevant_term ) && $test_only ) {
|
824 |
return false;
|
825 |
}
|
|
|
826 |
|
827 |
+
// If no match, try to add it and its translations
|
|
|
|
|
828 |
if ( ( false === $relevant_term ) && $candidate = get_term_by( $field, $value, $taxonomy ) ) {
|
|
|
829 |
$relevant_term = self::_add_relevant_term( $candidate );
|
|
|
830 |
|
831 |
foreach ( $relevant_term['translations'] as $translation ) {
|
832 |
$term_object = get_term_by( 'id', $translation->element_id, $taxonomy );
|
833 |
self::_add_relevant_term( $term_object, $relevant_term['translations'] );
|
834 |
} // translation
|
835 |
} // new term
|
|
|
836 |
|
837 |
+
// Find the language-specific value, if requested
|
|
|
|
|
838 |
if ( $relevant_term && ! empty( $language ) ) {
|
839 |
if ( $relevant_term && array_key_exists( $language, $relevant_term['translations'] ) ) {
|
840 |
$relevant_term = self::$relevant_terms[ $relevant_term['translations'][ $language ]->element_id ];
|
1118 |
$relevant_term = self::_create_relevant_term( $term_name, $taxonomy, self::$existing_terms['slug'] );
|
1119 |
$new_names[ $term_name ][ self::$existing_terms['slug'] ] = $relevant_term['term']->term_id;
|
1120 |
} else {
|
|
|
|
|
|
|
1121 |
if ( !array_key_exists( self::$existing_terms['slug'], $relevant_term['translations'] ) && isset( $new_names[ $term_name ] ) ) {
|
1122 |
$relevant_term = self::_create_relevant_translation( $relevant_term, self::$existing_terms['slug'] );
|
1123 |
$new_names[ $term_name ][ self::$existing_terms['slug'] ] = $relevant_term['term']->term_id;
|
1137 |
} // flat taxonomy
|
1138 |
|
1139 |
foreach( $active_languages as $language => $language_details ) {
|
1140 |
+
// Apply the tax_action to the terms_before to find the terms_after
|
1141 |
$language = $language_details->slug;
|
|
|
|
|
|
|
1142 |
$term_changes = isset( $input_terms[ $language ] ) ? $input_terms[ $language ] : array();
|
1143 |
if ( 'replace' == $tax_action ) {
|
1144 |
$terms_after = $term_changes;
|
1154 |
} // input_term
|
1155 |
}
|
1156 |
|
1157 |
+
// Convert terms_after to tax_input format
|
|
|
|
|
1158 |
$term_changes = array();
|
1159 |
foreach( $terms_after as $input_term ) {
|
1160 |
$term_changes[] = $input_term->term_id;
|
1553 |
} else {
|
1554 |
$tax_inputs = array( $key => implode( ',', $terms ) );
|
1555 |
}
|
|
|
1556 |
|
1557 |
self::_build_tax_input( $post_id, $tax_inputs, NULL, true );
|
1558 |
$tax_inputs = self::_apply_tax_input( $post_id );
|
2562 |
foreach ( MLA_Polylang::$mla_language_option_definitions as $key => $value ) {
|
2563 |
if ( 'language' == $value['tab'] ) {
|
2564 |
if ( 'custom' == $value['type'] && isset( $value['reset'] ) ) {
|
2565 |
+
$message = call_user_func( array( 'MLA_Polylang', $value['reset'] ), 'reset', $key, $value, $_REQUEST );
|
2566 |
} elseif ( ('header' == $value['type']) || ('hidden' == $value['type']) ) {
|
2567 |
$message = '';
|
2568 |
} else {
|
includes/class-mla-settings-custom-fields-tab.php
CHANGED
@@ -1069,35 +1069,14 @@ class MLA_Custom_Fields_List_Table extends WP_List_Table {
|
|
1069 |
}
|
1070 |
|
1071 |
/**
|
1072 |
-
* Return the names and
|
1073 |
*
|
1074 |
* @since 2.50
|
1075 |
*
|
1076 |
-
* @return array
|
1077 |
*/
|
1078 |
public static function mla_get_sortable_columns( ) {
|
1079 |
-
self
|
1080 |
-
$columns = self::$default_sortable_columns;
|
1081 |
-
|
1082 |
-
if ( isset( $_REQUEST['orderby'] ) ) {
|
1083 |
-
$needle = array( $_REQUEST['orderby'], false );
|
1084 |
-
$key = array_search( $needle, $columns );
|
1085 |
-
if ( $key ) {
|
1086 |
-
$columns[ $key ][ 1 ] = true;
|
1087 |
-
}
|
1088 |
-
} else {
|
1089 |
-
$columns['name'][ 1 ] = true;
|
1090 |
-
}
|
1091 |
-
|
1092 |
-
return $columns;
|
1093 |
-
$results = array() ;
|
1094 |
-
|
1095 |
-
foreach ( self::$default_sortable_columns as $key => $value ) {
|
1096 |
-
$value[1] = self::$default_columns[ $key ];
|
1097 |
-
$results[ $key ] = $value;
|
1098 |
-
}
|
1099 |
-
|
1100 |
-
return $results;
|
1101 |
}
|
1102 |
|
1103 |
/**
|
@@ -1583,29 +1562,16 @@ class MLA_Custom_Fields_List_Table extends WP_List_Table {
|
|
1583 |
}
|
1584 |
|
1585 |
/**
|
1586 |
-
* Returns an array where the
|
1587 |
-
* and the value is db column to sort by.
|
1588 |
-
* if set.
|
1589 |
*
|
1590 |
* @since 2.50
|
1591 |
*
|
1592 |
* @return array Sortable column information,e.g.,
|
1593 |
-
* 'slugs'=>array('data_values',boolean)
|
1594 |
*/
|
1595 |
function get_sortable_columns( ) {
|
1596 |
-
|
1597 |
-
|
1598 |
-
if ( isset( $_REQUEST['orderby'] ) ) {
|
1599 |
-
$needle = array( $_REQUEST['orderby'], false );
|
1600 |
-
$key = array_search( $needle, $columns );
|
1601 |
-
if ( $key ) {
|
1602 |
-
$columns[ $key ][ 1 ] = true;
|
1603 |
-
}
|
1604 |
-
} else {
|
1605 |
-
$columns['menu_order'][ 1 ] = true;
|
1606 |
-
}
|
1607 |
-
|
1608 |
-
return $columns;
|
1609 |
}
|
1610 |
|
1611 |
/**
|
@@ -2058,13 +2024,9 @@ class MLA_Custom_Field_Query {
|
|
2058 |
if ( 'none' == $value ) {
|
2059 |
$clean_request[ $key ] = $value;
|
2060 |
} else {
|
2061 |
-
$
|
2062 |
-
|
2063 |
-
|
2064 |
-
$clean_request[ $key ] = $value;
|
2065 |
-
break;
|
2066 |
-
}
|
2067 |
-
} // foreach
|
2068 |
}
|
2069 |
break;
|
2070 |
case 'order':
|
1069 |
}
|
1070 |
|
1071 |
/**
|
1072 |
+
* Return the names and orderby values of the sortable columns
|
1073 |
*
|
1074 |
* @since 2.50
|
1075 |
*
|
1076 |
+
* @return array column_slug => array( orderby value, initial_descending_sort ) for sortable columns
|
1077 |
*/
|
1078 |
public static function mla_get_sortable_columns( ) {
|
1079 |
+
return self::$default_sortable_columns;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1080 |
}
|
1081 |
|
1082 |
/**
|
1562 |
}
|
1563 |
|
1564 |
/**
|
1565 |
+
* Returns an array where the key is the column that needs to be sortable
|
1566 |
+
* and the value is db column to sort by.
|
|
|
1567 |
*
|
1568 |
* @since 2.50
|
1569 |
*
|
1570 |
* @return array Sortable column information,e.g.,
|
1571 |
+
* 'slugs'=>array('data_values', boolean initial_descending_sort)
|
1572 |
*/
|
1573 |
function get_sortable_columns( ) {
|
1574 |
+
return self::$default_sortable_columns;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1575 |
}
|
1576 |
|
1577 |
/**
|
2024 |
if ( 'none' == $value ) {
|
2025 |
$clean_request[ $key ] = $value;
|
2026 |
} else {
|
2027 |
+
if ( array_key_exists( $value, MLA_Custom_Fields_List_Table::mla_get_sortable_columns() ) ) {
|
2028 |
+
$clean_request[ $key ] = $value;
|
2029 |
+
}
|
|
|
|
|
|
|
|
|
2030 |
}
|
2031 |
break;
|
2032 |
case 'order':
|
includes/class-mla-settings-documentation-tab.php
CHANGED
@@ -304,7 +304,8 @@ class MLASettings_Documentation {
|
|
304 |
$page_values = array(
|
305 |
'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 ),
|
306 |
'translate_url' => MLA_PLUGIN_URL . 'languages/MLA Internationalization Guide.pdf',
|
307 |
-
'phpDocs_url' => MLA_PLUGIN_URL . 'phpDocs/index.html',
|
|
|
308 |
);
|
309 |
|
310 |
$page_content['body'] = MLAData::mla_parse_template( $page_template['documentation-tab'], $page_values );
|
@@ -434,35 +435,14 @@ class MLA_Example_List_Table extends WP_List_Table {
|
|
434 |
}
|
435 |
|
436 |
/**
|
437 |
-
* Return the names and
|
438 |
*
|
439 |
* @since 2.32
|
440 |
*
|
441 |
-
* @return array
|
442 |
*/
|
443 |
public static function mla_get_sortable_columns( ) {
|
444 |
-
self
|
445 |
-
$columns = self::$default_sortable_columns;
|
446 |
-
|
447 |
-
if ( isset( $_REQUEST['orderby'] ) ) {
|
448 |
-
$needle = array( $_REQUEST['orderby'], false );
|
449 |
-
$key = array_search( $needle, $columns );
|
450 |
-
if ( $key ) {
|
451 |
-
$columns[ $key ][ 1 ] = true;
|
452 |
-
}
|
453 |
-
} else {
|
454 |
-
$columns['name'][ 1 ] = true;
|
455 |
-
}
|
456 |
-
|
457 |
-
return $columns;
|
458 |
-
$results = array() ;
|
459 |
-
|
460 |
-
foreach ( self::$default_sortable_columns as $key => $value ) {
|
461 |
-
$value[1] = self::$default_columns[ $key ];
|
462 |
-
$results[ $key ] = $value;
|
463 |
-
}
|
464 |
-
|
465 |
-
return $results;
|
466 |
}
|
467 |
|
468 |
/**
|
@@ -784,8 +764,7 @@ class MLA_Example_List_Table extends WP_List_Table {
|
|
784 |
|
785 |
/**
|
786 |
* Returns an array where the key is the column that needs to be sortable
|
787 |
-
* and the value is db column to sort by.
|
788 |
-
* if set.
|
789 |
*
|
790 |
* @since 2.32
|
791 |
*
|
@@ -793,19 +772,7 @@ class MLA_Example_List_Table extends WP_List_Table {
|
|
793 |
* 'slugs'=>array('data_values',boolean)
|
794 |
*/
|
795 |
function get_sortable_columns( ) {
|
796 |
-
|
797 |
-
|
798 |
-
if ( isset( $_REQUEST['orderby'] ) ) {
|
799 |
-
$needle = array( $_REQUEST['orderby'], false );
|
800 |
-
$key = array_search( $needle, $columns );
|
801 |
-
if ( $key ) {
|
802 |
-
$columns[ $key ][ 1 ] = true;
|
803 |
-
}
|
804 |
-
} else {
|
805 |
-
$columns['name'][ 1 ] = true;
|
806 |
-
}
|
807 |
-
|
808 |
-
return $columns;
|
809 |
}
|
810 |
|
811 |
/**
|
@@ -1319,13 +1286,9 @@ class MLA_Example_List_Table extends WP_List_Table {
|
|
1319 |
if ( 'none' == $value ) {
|
1320 |
$clean_request[ $key ] = $value;
|
1321 |
} else {
|
1322 |
-
$
|
1323 |
-
|
1324 |
-
|
1325 |
-
$clean_request[ $key ] = $value;
|
1326 |
-
break;
|
1327 |
-
}
|
1328 |
-
} // foreach
|
1329 |
}
|
1330 |
break;
|
1331 |
case 'order':
|
304 |
$page_values = array(
|
305 |
'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 ),
|
306 |
'translate_url' => MLA_PLUGIN_URL . 'languages/MLA Internationalization Guide.pdf',
|
307 |
+
// 'phpDocs_url' => MLA_PLUGIN_URL . 'phpDocs/index.html',
|
308 |
+
'phpDocs_url' => 'http://fairtradejudaica.org/wp-content/uploads/' . 'phpDocs/index.html',
|
309 |
);
|
310 |
|
311 |
$page_content['body'] = MLAData::mla_parse_template( $page_template['documentation-tab'], $page_values );
|
435 |
}
|
436 |
|
437 |
/**
|
438 |
+
* Return the names and orderby values of the sortable columns
|
439 |
*
|
440 |
* @since 2.32
|
441 |
*
|
442 |
+
* @return array column_slug => array( orderby value, initial_descending_sort ) for sortable columns
|
443 |
*/
|
444 |
public static function mla_get_sortable_columns( ) {
|
445 |
+
return self::$default_sortable_columns;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
446 |
}
|
447 |
|
448 |
/**
|
764 |
|
765 |
/**
|
766 |
* Returns an array where the key is the column that needs to be sortable
|
767 |
+
* and the value is db column to sort by.
|
|
|
768 |
*
|
769 |
* @since 2.32
|
770 |
*
|
772 |
* 'slugs'=>array('data_values',boolean)
|
773 |
*/
|
774 |
function get_sortable_columns( ) {
|
775 |
+
return self::$default_sortable_columns;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
776 |
}
|
777 |
|
778 |
/**
|
1286 |
if ( 'none' == $value ) {
|
1287 |
$clean_request[ $key ] = $value;
|
1288 |
} else {
|
1289 |
+
if ( array_key_exists( $value, MLA_Example_List_Table::mla_get_sortable_columns() ) ) {
|
1290 |
+
$clean_request[ $key ] = $value;
|
1291 |
+
}
|
|
|
|
|
|
|
|
|
1292 |
}
|
1293 |
break;
|
1294 |
case 'order':
|
includes/class-mla-settings-iptc-exif-tab.php
CHANGED
@@ -1144,35 +1144,14 @@ class MLA_IPTC_EXIF_List_Table extends WP_List_Table {
|
|
1144 |
}
|
1145 |
|
1146 |
/**
|
1147 |
-
* Return the names and
|
1148 |
*
|
1149 |
* @since 2.60
|
1150 |
*
|
1151 |
-
* @return array
|
1152 |
*/
|
1153 |
public static function mla_get_sortable_columns( ) {
|
1154 |
-
self
|
1155 |
-
$columns = self::$default_sortable_columns;
|
1156 |
-
|
1157 |
-
if ( isset( $_REQUEST['orderby'] ) ) {
|
1158 |
-
$needle = array( $_REQUEST['orderby'], false );
|
1159 |
-
$key = array_search( $needle, $columns );
|
1160 |
-
if ( $key ) {
|
1161 |
-
$columns[ $key ][ 1 ] = true;
|
1162 |
-
}
|
1163 |
-
} else {
|
1164 |
-
$columns['name'][ 1 ] = true;
|
1165 |
-
}
|
1166 |
-
|
1167 |
-
return $columns;
|
1168 |
-
$results = array() ;
|
1169 |
-
|
1170 |
-
foreach ( self::$default_sortable_columns as $key => $value ) {
|
1171 |
-
$value[1] = self::$default_columns[ $key ];
|
1172 |
-
$results[ $key ] = $value;
|
1173 |
-
}
|
1174 |
-
|
1175 |
-
return $results;
|
1176 |
}
|
1177 |
|
1178 |
/**
|
@@ -1689,8 +1668,7 @@ class MLA_IPTC_EXIF_List_Table extends WP_List_Table {
|
|
1689 |
|
1690 |
/**
|
1691 |
* Returns an array where the key is the column that needs to be sortable
|
1692 |
-
* and the value is db column to sort by.
|
1693 |
-
* if set.
|
1694 |
*
|
1695 |
* @since 2.60
|
1696 |
*
|
@@ -1698,19 +1676,7 @@ class MLA_IPTC_EXIF_List_Table extends WP_List_Table {
|
|
1698 |
* 'slugs'=>array('data_values',boolean)
|
1699 |
*/
|
1700 |
function get_sortable_columns( ) {
|
1701 |
-
|
1702 |
-
|
1703 |
-
if ( isset( $_REQUEST['orderby'] ) ) {
|
1704 |
-
$needle = array( $_REQUEST['orderby'], false );
|
1705 |
-
$key = array_search( $needle, $columns );
|
1706 |
-
if ( $key ) {
|
1707 |
-
$columns[ $key ][ 1 ] = true;
|
1708 |
-
}
|
1709 |
-
} else {
|
1710 |
-
$columns['menu_order'][ 1 ] = true;
|
1711 |
-
}
|
1712 |
-
|
1713 |
-
return $columns;
|
1714 |
}
|
1715 |
|
1716 |
/**
|
@@ -2061,29 +2027,7 @@ class MLA_IPTC_EXIF_Query {
|
|
2061 |
'deleted' => false,
|
2062 |
);
|
2063 |
}
|
2064 |
-
|
2065 |
-
self::$_iptc_exif_rules[ ++self::$_iptc_exif_rule_highest_ID ] = array(
|
2066 |
-
'post_ID' => self::$_iptc_exif_rule_highest_ID,
|
2067 |
-
'type' => 'custom',
|
2068 |
-
'key' => $current_value['name'],
|
2069 |
-
'rule_name' => 'bad ' . $current_value['name'],
|
2070 |
-
'name' => $current_value['name'],
|
2071 |
-
'hierarchical' => false,
|
2072 |
-
'iptc_value' => $current_value['iptc_value'],
|
2073 |
-
'exif_value' => $current_value['exif_value'],
|
2074 |
-
'iptc_first' => $current_value['iptc_first'],
|
2075 |
-
'keep_existing' => $current_value['keep_existing'],
|
2076 |
-
'format' => 'native',
|
2077 |
-
'option' => 'text',
|
2078 |
-
'no_null' => false,
|
2079 |
-
'delimiters' => '',
|
2080 |
-
'parent' => 0,
|
2081 |
-
'active' => isset( $current_value['active'] ) ? $current_value['active'] : false,
|
2082 |
-
'read_only' => true,
|
2083 |
-
'changed' => false,
|
2084 |
-
'deleted' => false,
|
2085 |
-
);
|
2086 |
-
*/
|
2087 |
// One rule for each registered and supported taxonomy
|
2088 |
$taxonomies = get_taxonomies( array ( 'show_ui' => true ), 'objects' );
|
2089 |
foreach ( $taxonomies as $key => $value ) {
|
@@ -2276,13 +2220,9 @@ self::$_iptc_exif_rules[ ++self::$_iptc_exif_rule_highest_ID ] = array(
|
|
2276 |
if ( 'none' == $value ) {
|
2277 |
$clean_request[ $key ] = $value;
|
2278 |
} else {
|
2279 |
-
$
|
2280 |
-
|
2281 |
-
|
2282 |
-
$clean_request[ $key ] = $value;
|
2283 |
-
break;
|
2284 |
-
}
|
2285 |
-
} // foreach
|
2286 |
}
|
2287 |
break;
|
2288 |
case 'order':
|
1144 |
}
|
1145 |
|
1146 |
/**
|
1147 |
+
* Return the names and orderby values of the sortable columns
|
1148 |
*
|
1149 |
* @since 2.60
|
1150 |
*
|
1151 |
+
* @return array column_slug => array( orderby value, initial_descending_sort ) for sortable columns
|
1152 |
*/
|
1153 |
public static function mla_get_sortable_columns( ) {
|
1154 |
+
return self::$default_sortable_columns;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1155 |
}
|
1156 |
|
1157 |
/**
|
1668 |
|
1669 |
/**
|
1670 |
* Returns an array where the key is the column that needs to be sortable
|
1671 |
+
* and the value is db column to sort by.
|
|
|
1672 |
*
|
1673 |
* @since 2.60
|
1674 |
*
|
1676 |
* 'slugs'=>array('data_values',boolean)
|
1677 |
*/
|
1678 |
function get_sortable_columns( ) {
|
1679 |
+
return self::$default_sortable_columns;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1680 |
}
|
1681 |
|
1682 |
/**
|
2027 |
'deleted' => false,
|
2028 |
);
|
2029 |
}
|
2030 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2031 |
// One rule for each registered and supported taxonomy
|
2032 |
$taxonomies = get_taxonomies( array ( 'show_ui' => true ), 'objects' );
|
2033 |
foreach ( $taxonomies as $key => $value ) {
|
2220 |
if ( 'none' == $value ) {
|
2221 |
$clean_request[ $key ] = $value;
|
2222 |
} else {
|
2223 |
+
if ( array_key_exists( $value, MLA_IPTC_EXIF_List_Table::mla_get_sortable_columns() ) ) {
|
2224 |
+
$clean_request[ $key ] = $value;
|
2225 |
+
}
|
|
|
|
|
|
|
|
|
2226 |
}
|
2227 |
break;
|
2228 |
case 'order':
|
includes/class-mla-settings-shortcodes-tab.php
CHANGED
@@ -843,22 +843,14 @@ class MLA_Template_List_Table extends WP_List_Table {
|
|
843 |
}
|
844 |
|
845 |
/**
|
846 |
-
* Return the names and
|
847 |
*
|
848 |
* @since 2.40
|
849 |
*
|
850 |
-
* @return array
|
851 |
*/
|
852 |
public static function mla_get_sortable_columns( ) {
|
853 |
-
self
|
854 |
-
$results = array() ;
|
855 |
-
|
856 |
-
foreach ( self::$default_sortable_columns as $key => $value ) {
|
857 |
-
$value[1] = self::$default_columns[ $key ];
|
858 |
-
$results[ $key ] = $value;
|
859 |
-
}
|
860 |
-
|
861 |
-
return $results;
|
862 |
}
|
863 |
|
864 |
/**
|
@@ -1188,8 +1180,7 @@ class MLA_Template_List_Table extends WP_List_Table {
|
|
1188 |
|
1189 |
/**
|
1190 |
* Returns an array where the key is the column that needs to be sortable
|
1191 |
-
* and the value is db column to sort by.
|
1192 |
-
* if set.
|
1193 |
*
|
1194 |
* @since 2.40
|
1195 |
*
|
@@ -1197,19 +1188,7 @@ class MLA_Template_List_Table extends WP_List_Table {
|
|
1197 |
* 'slugs'=>array('data_values',boolean)
|
1198 |
*/
|
1199 |
function get_sortable_columns( ) {
|
1200 |
-
|
1201 |
-
|
1202 |
-
if ( isset( $_REQUEST['orderby'] ) ) {
|
1203 |
-
$needle = array( $_REQUEST['orderby'], false );
|
1204 |
-
$key = array_search( $needle, $columns );
|
1205 |
-
if ( $key ) {
|
1206 |
-
$columns[ $key ][ 1 ] = true;
|
1207 |
-
}
|
1208 |
-
} else {
|
1209 |
-
$columns['name'][ 1 ] = true;
|
1210 |
-
}
|
1211 |
-
|
1212 |
-
return $columns;
|
1213 |
}
|
1214 |
|
1215 |
/**
|
@@ -1667,13 +1646,9 @@ class MLA_Template_Query {
|
|
1667 |
if ( 'none' == $value ) {
|
1668 |
$clean_request[ $key ] = $value;
|
1669 |
} else {
|
1670 |
-
$
|
1671 |
-
|
1672 |
-
|
1673 |
-
$clean_request[ $key ] = $value;
|
1674 |
-
break;
|
1675 |
-
}
|
1676 |
-
} // foreach
|
1677 |
}
|
1678 |
break;
|
1679 |
case 'order':
|
843 |
}
|
844 |
|
845 |
/**
|
846 |
+
* Return the names and orderby values of the sortable columns
|
847 |
*
|
848 |
* @since 2.40
|
849 |
*
|
850 |
+
* @return array column_slug => array( orderby value, initial_descending_sort ) for sortable columns
|
851 |
*/
|
852 |
public static function mla_get_sortable_columns( ) {
|
853 |
+
return self::$default_sortable_columns;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
854 |
}
|
855 |
|
856 |
/**
|
1180 |
|
1181 |
/**
|
1182 |
* Returns an array where the key is the column that needs to be sortable
|
1183 |
+
* and the value is db column to sort by.
|
|
|
1184 |
*
|
1185 |
* @since 2.40
|
1186 |
*
|
1188 |
* 'slugs'=>array('data_values',boolean)
|
1189 |
*/
|
1190 |
function get_sortable_columns( ) {
|
1191 |
+
return self::$default_sortable_columns;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1192 |
}
|
1193 |
|
1194 |
/**
|
1646 |
if ( 'none' == $value ) {
|
1647 |
$clean_request[ $key ] = $value;
|
1648 |
} else {
|
1649 |
+
if ( array_key_exists( $value, MLA_Template_List_Table::mla_get_sortable_columns() ) ) {
|
1650 |
+
$clean_request[ $key ] = $value;
|
1651 |
+
}
|
|
|
|
|
|
|
|
|
1652 |
}
|
1653 |
break;
|
1654 |
case 'order':
|
includes/class-mla-settings-upload-tab.php
CHANGED
@@ -1128,8 +1128,7 @@ class MLA_Upload_List_Table extends WP_List_Table {
|
|
1128 |
|
1129 |
/**
|
1130 |
* Returns an array where the key is the column that needs to be sortable
|
1131 |
-
* and the value is db column to sort by.
|
1132 |
-
* if set.
|
1133 |
*
|
1134 |
* @since 1.40
|
1135 |
*
|
@@ -1137,19 +1136,7 @@ class MLA_Upload_List_Table extends WP_List_Table {
|
|
1137 |
* 'slugs'=>array('data_values',boolean)
|
1138 |
*/
|
1139 |
function get_sortable_columns( ) {
|
1140 |
-
|
1141 |
-
|
1142 |
-
if ( isset( $_REQUEST['orderby'] ) ) {
|
1143 |
-
$needle = array( $_REQUEST['orderby'], false );
|
1144 |
-
$key = array_search( $needle, $columns );
|
1145 |
-
if ( $key ) {
|
1146 |
-
$columns[ $key ][ 1 ] = true;
|
1147 |
-
}
|
1148 |
-
} else {
|
1149 |
-
$columns['name'][ 1 ] = true;
|
1150 |
-
}
|
1151 |
-
|
1152 |
-
return $columns;
|
1153 |
}
|
1154 |
|
1155 |
/**
|
@@ -1577,8 +1564,7 @@ class MLA_Upload_Optional_List_Table extends WP_List_Table {
|
|
1577 |
|
1578 |
/**
|
1579 |
* Returns an array where the key is the column that needs to be sortable
|
1580 |
-
* and the value is db column to sort by.
|
1581 |
-
* if set.
|
1582 |
*
|
1583 |
* @since 1.40
|
1584 |
*
|
@@ -1586,19 +1572,7 @@ class MLA_Upload_Optional_List_Table extends WP_List_Table {
|
|
1586 |
* 'slugs'=>array('data_values',boolean)
|
1587 |
*/
|
1588 |
function get_sortable_columns( ) {
|
1589 |
-
|
1590 |
-
|
1591 |
-
if ( isset( $_REQUEST['orderby'] ) ) {
|
1592 |
-
$needle = array( $_REQUEST['orderby'], false );
|
1593 |
-
$key = array_search( $needle, $columns );
|
1594 |
-
if ( $key ) {
|
1595 |
-
$columns[ $key ][ 1 ] = true;
|
1596 |
-
}
|
1597 |
-
} else {
|
1598 |
-
$columns['name'][ 1 ] = true;
|
1599 |
-
}
|
1600 |
-
|
1601 |
-
return $columns;
|
1602 |
}
|
1603 |
|
1604 |
/**
|
1128 |
|
1129 |
/**
|
1130 |
* Returns an array where the key is the column that needs to be sortable
|
1131 |
+
* and the value is db column to sort by.
|
|
|
1132 |
*
|
1133 |
* @since 1.40
|
1134 |
*
|
1136 |
* 'slugs'=>array('data_values',boolean)
|
1137 |
*/
|
1138 |
function get_sortable_columns( ) {
|
1139 |
+
return MLAMime::$default_sortable_upload_columns;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1140 |
}
|
1141 |
|
1142 |
/**
|
1564 |
|
1565 |
/**
|
1566 |
* Returns an array where the key is the column that needs to be sortable
|
1567 |
+
* and the value is db column to sort by.
|
|
|
1568 |
*
|
1569 |
* @since 1.40
|
1570 |
*
|
1572 |
* 'slugs'=>array('data_values',boolean)
|
1573 |
*/
|
1574 |
function get_sortable_columns( ) {
|
1575 |
+
return MLAMime::$default_upload_optional_sortable_columns;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1576 |
}
|
1577 |
|
1578 |
/**
|
includes/class-mla-settings-view-tab.php
CHANGED
@@ -897,8 +897,7 @@ class MLA_View_List_Table extends WP_List_Table {
|
|
897 |
|
898 |
/**
|
899 |
* Returns an array where the key is the column that needs to be sortable
|
900 |
-
* and the value is db column to sort by.
|
901 |
-
* if set.
|
902 |
*
|
903 |
* @since 1.40
|
904 |
*
|
@@ -906,19 +905,7 @@ class MLA_View_List_Table extends WP_List_Table {
|
|
906 |
* 'slugs'=>array('data_values',boolean)
|
907 |
*/
|
908 |
function get_sortable_columns( ) {
|
909 |
-
|
910 |
-
|
911 |
-
if ( isset( $_REQUEST['orderby'] ) ) {
|
912 |
-
$needle = array( $_REQUEST['orderby'], false );
|
913 |
-
$key = array_search( $needle, $columns );
|
914 |
-
if ( $key ) {
|
915 |
-
$columns[ $key ][ 1 ] = true;
|
916 |
-
}
|
917 |
-
} else {
|
918 |
-
$columns['menu_order'][ 1 ] = true;
|
919 |
-
}
|
920 |
-
|
921 |
-
return $columns;
|
922 |
}
|
923 |
|
924 |
/**
|
897 |
|
898 |
/**
|
899 |
* Returns an array where the key is the column that needs to be sortable
|
900 |
+
* and the value is db column to sort by.
|
|
|
901 |
*
|
902 |
* @since 1.40
|
903 |
*
|
905 |
* 'slugs'=>array('data_values',boolean)
|
906 |
*/
|
907 |
function get_sortable_columns( ) {
|
908 |
+
return MLAMime::$default_sortable_view_columns;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
909 |
}
|
910 |
|
911 |
/**
|
includes/class-mla-shortcode-support.php
CHANGED
@@ -172,7 +172,7 @@ class MLAShortcode_Support {
|
|
172 |
|
173 |
return $image;
|
174 |
}
|
175 |
-
|
176 |
/**
|
177 |
* Make sure $attr is an array, repair line-break damage, merge with $content
|
178 |
*
|
@@ -578,7 +578,7 @@ class MLAShortcode_Support {
|
|
578 |
} else {
|
579 |
$max_num_pages = 1;
|
580 |
}
|
581 |
-
|
582 |
if ( isset( $attachments['found_rows'] ) ) {
|
583 |
$found_rows = $attachments['found_rows'];
|
584 |
unset( $attachments['found_rows'] );
|
@@ -586,7 +586,7 @@ class MLAShortcode_Support {
|
|
586 |
} else {
|
587 |
$found_rows = $current_rows;
|
588 |
}
|
589 |
-
|
590 |
if ( ( $is_gallery && empty($attachments) ) || ( $is_pagination && empty( $found_rows ) ) ) {
|
591 |
if ( self::$mla_debug ) {
|
592 |
MLACore::mla_debug_add( '<strong>' . __( 'mla_debug empty gallery', 'media-library-assistant' ) . '</strong>, query = ' . var_export( $attr, true ) );
|
@@ -627,7 +627,7 @@ class MLAShortcode_Support {
|
|
627 |
if ( 'mla_tag_cloud' !== $arguments['mla_alt_shortcode'] ) {
|
628 |
$blacklist = array_merge( $mla_arguments, $blacklist );
|
629 |
}
|
630 |
-
|
631 |
$blacklist = apply_filters( 'mla_gallery_alt_shortcode_blacklist', $blacklist );
|
632 |
$alt_attr = apply_filters( 'mla_gallery_alt_shortcode_attributes', $attr );
|
633 |
|
@@ -653,7 +653,7 @@ class MLAShortcode_Support {
|
|
653 |
$mla_alt_shortcode_ids = array();
|
654 |
|
655 |
if ( is_null( $mla_alt_ids_value ) ) {
|
656 |
-
|
657 |
$mla_alt_shortcode_ids = apply_filters_ref_array( 'mla_gallery_alt_shortcode_ids', array( $mla_alt_shortcode_ids, $arguments['mla_alt_ids_name'], &$attachments ) );
|
658 |
if ( is_array( $mla_alt_shortcode_ids ) ) {
|
659 |
if ( 0 == count( $mla_alt_shortcode_ids ) ) {
|
@@ -661,7 +661,7 @@ class MLAShortcode_Support {
|
|
661 |
$mla_alt_shortcode_ids[] = $value->ID;
|
662 |
} // foreach $attachments
|
663 |
}
|
664 |
-
|
665 |
$mla_alt_shortcode_ids = $arguments['mla_alt_ids_name'] . '="' . implode( ',', $mla_alt_shortcode_ids ) . '"';
|
666 |
}
|
667 |
|
@@ -680,7 +680,7 @@ class MLAShortcode_Support {
|
|
680 |
} else {
|
681 |
$output .= do_shortcode( sprintf( '[%1$s %2$s %3$s]', $arguments['mla_alt_shortcode'], $mla_alt_shortcode_ids, $mla_alt_shortcode_args ) );
|
682 |
}
|
683 |
-
|
684 |
do_action( 'mla_gallery_end_alt_shortcode' );
|
685 |
return $output;
|
686 |
} // is_null( $mla_alt_ids_value )
|
@@ -693,7 +693,7 @@ class MLAShortcode_Support {
|
|
693 |
if ( $icon_only ) {
|
694 |
$size = $size_class = 'icon';
|
695 |
}
|
696 |
-
|
697 |
if ( 'icon' == strtolower( $size) ) {
|
698 |
if ( 'checked' == MLACore::mla_get_option( MLACoreOptions::MLA_ENABLE_MLA_ICONS ) ) {
|
699 |
$size = array( 64, 64 );
|
@@ -934,8 +934,6 @@ class MLAShortcode_Support {
|
|
934 |
$markup_values = apply_filters( 'mla_gallery_open_values', $markup_values );
|
935 |
|
936 |
if ( $is_gallery ) {
|
937 |
-
//$markup_values = apply_filters( 'mla_gallery_open_values', $markup_values );
|
938 |
-
|
939 |
$open_template = apply_filters( 'mla_gallery_open_template', $open_template );
|
940 |
if ( empty( $open_template ) ) {
|
941 |
$gallery_open = '';
|
@@ -974,7 +972,7 @@ class MLAShortcode_Support {
|
|
974 |
if ( $attachment->ID == $current_id ) {
|
975 |
break;
|
976 |
}
|
977 |
-
|
978 |
$pagination_index++;
|
979 |
}
|
980 |
|
@@ -991,7 +989,7 @@ class MLAShortcode_Support {
|
|
991 |
default:
|
992 |
$target_id = $id;
|
993 |
} // link_type
|
994 |
-
|
995 |
if ( isset( $attachments[ $target_id ] ) ) {
|
996 |
$target = $attachments[ $target_id ];
|
997 |
} elseif ( $is_wrap ) {
|
@@ -1018,11 +1016,9 @@ class MLAShortcode_Support {
|
|
1018 |
|
1019 |
$column_index = 0;
|
1020 |
foreach ( $attachments as $id => $attachment ) {
|
1021 |
-
$item_values = $markup_values;
|
1022 |
|
1023 |
-
|
1024 |
-
* fill in item-specific elements
|
1025 |
-
*/
|
1026 |
$item_values['index'] = (string) $is_gallery ? 1 + $column_index : $pagination_index;
|
1027 |
$item_values['last_in_row'] = '';
|
1028 |
|
@@ -1049,7 +1045,7 @@ class MLAShortcode_Support {
|
|
1049 |
$item_values['path'] = '';
|
1050 |
$item_values['file'] = '';
|
1051 |
$item_values['description'] = wptexturize( $attachment->post_content );
|
1052 |
-
$item_values['file_url'] = $attachment->guid;
|
1053 |
$item_values['author_id'] = $attachment->post_author;
|
1054 |
$item_values['author'] = '';
|
1055 |
$item_values['caption'] = '';
|
@@ -1179,7 +1175,7 @@ class MLAShortcode_Support {
|
|
1179 |
if ( $icon_only ) {
|
1180 |
add_filter( 'wp_get_attachment_image_src', 'MLAShortcode_Support::_get_attachment_icon_src', 10, 2 );
|
1181 |
}
|
1182 |
-
|
1183 |
$item_values['pagelink'] = wp_get_attachment_link($attachment->ID, $size, true, $show_icon, $link_text);
|
1184 |
$item_values['filelink'] = wp_get_attachment_link($attachment->ID, $size, false, $show_icon, $link_text);
|
1185 |
|
@@ -1719,9 +1715,7 @@ class MLAShortcode_Support {
|
|
1719 |
public static function mla_tag_cloud( $attr ) {
|
1720 |
global $post;
|
1721 |
|
1722 |
-
|
1723 |
-
* Some do_shortcode callers may not have a specific post in mind
|
1724 |
-
*/
|
1725 |
if ( ! is_object( $post ) ) {
|
1726 |
$post = (object) self::$empty_post;
|
1727 |
}
|
@@ -1730,9 +1724,7 @@ class MLAShortcode_Support {
|
|
1730 |
static $instance = 0;
|
1731 |
$instance++;
|
1732 |
|
1733 |
-
|
1734 |
-
* Some values are already known, and can be used in data selection parameters
|
1735 |
-
*/
|
1736 |
$upload_dir = wp_upload_dir();
|
1737 |
$page_values = array(
|
1738 |
'instance' => $instance,
|
@@ -1755,9 +1747,7 @@ class MLAShortcode_Support {
|
|
1755 |
'page_url' => get_page_link(),
|
1756 |
);
|
1757 |
|
1758 |
-
|
1759 |
-
* These are the default parameters for tag cloud display
|
1760 |
-
*/
|
1761 |
$mla_item_specific_arguments = array(
|
1762 |
'mla_link_attributes' => '',
|
1763 |
'mla_link_class' => '',
|
@@ -1811,10 +1801,7 @@ class MLAShortcode_Support {
|
|
1811 |
$mla_item_specific_arguments
|
1812 |
);
|
1813 |
|
1814 |
-
|
1815 |
-
* Filter the attributes before $mla_page_parameter and "request:" prefix processing.
|
1816 |
-
*/
|
1817 |
-
|
1818 |
$attr = apply_filters( 'mla_tag_cloud_raw_attributes', $attr );
|
1819 |
|
1820 |
/*
|
@@ -1830,9 +1817,8 @@ class MLAShortcode_Support {
|
|
1830 |
$mla_page_parameter = MLAData::mla_parse_template( $attr_value, $page_values );
|
1831 |
|
1832 |
/*
|
1833 |
-
* Special handling of mla_page_parameter to make
|
1834 |
-
*
|
1835 |
-
* if it's not present in the shortcode itself.
|
1836 |
*/
|
1837 |
if ( ! isset( $attr[ $mla_page_parameter ] ) ) {
|
1838 |
if ( isset( $_REQUEST[ $mla_page_parameter ] ) ) {
|
@@ -1840,9 +1826,7 @@ class MLAShortcode_Support {
|
|
1840 |
}
|
1841 |
}
|
1842 |
|
1843 |
-
|
1844 |
-
* Determine markup template to get default arguments
|
1845 |
-
*/
|
1846 |
$arguments = shortcode_atts( $defaults, $attr );
|
1847 |
if ( $arguments['mla_markup'] ) {
|
1848 |
$template = $arguments['mla_markup'];
|
@@ -1859,7 +1843,7 @@ class MLAShortcode_Support {
|
|
1859 |
if ( !in_array( $output_parameters[0], array( 'flat', 'list', 'ulist', 'olist', 'dlist', 'grid', 'array' ) ) ) {
|
1860 |
$output_parameters[0] = 'flat';
|
1861 |
}
|
1862 |
-
|
1863 |
if ( 'grid' == $output_parameters[0] ) {
|
1864 |
$template = MLACore::mla_get_option('default_tag_cloud_markup');
|
1865 |
} elseif ( in_array( $output_parameters[0], array( 'list', 'ulist', 'olist', 'dlist' ) ) ) {
|
@@ -1873,9 +1857,7 @@ class MLAShortcode_Support {
|
|
1873 |
}
|
1874 |
}
|
1875 |
|
1876 |
-
|
1877 |
-
* Apply default arguments set in the markup template
|
1878 |
-
*/
|
1879 |
if ( !empty( $template ) ) {
|
1880 |
$arguments = MLATemplate_Support::mla_fetch_custom_template( $template, 'tag-cloud', 'markup', 'arguments' );
|
1881 |
if ( !empty( $arguments ) ) {
|
@@ -1972,7 +1954,7 @@ class MLAShortcode_Support {
|
|
1972 |
if ( !in_array( $output_parameters[0], array( 'flat', 'list', 'ulist', 'olist', 'dlist', 'grid', 'array' ) ) ) {
|
1973 |
$output_parameters[0] = 'flat';
|
1974 |
}
|
1975 |
-
|
1976 |
if ( $is_grid = 'grid' == $output_parameters[0] ) {
|
1977 |
$default_style = MLACore::mla_get_option('default_tag_cloud_style');
|
1978 |
$default_markup = MLACore::mla_get_option('default_tag_cloud_markup');
|
@@ -2432,7 +2414,7 @@ class MLAShortcode_Support {
|
|
2432 |
} else {
|
2433 |
$current_item_delimiter = '?';
|
2434 |
}
|
2435 |
-
|
2436 |
$column_index = 0;
|
2437 |
foreach ( $tags as $key => $tag ) {
|
2438 |
$item_values = $markup_values;
|
@@ -2450,10 +2432,10 @@ class MLAShortcode_Support {
|
|
2450 |
$item_values['key'] = $key;
|
2451 |
$item_values['term_id'] = $tag->term_id;
|
2452 |
$item_values['name'] = wptexturize( $tag->name );
|
2453 |
-
$item_values['slug'] = $tag->slug;
|
2454 |
$item_values['term_group'] = $tag->term_group;
|
2455 |
$item_values['term_taxonomy_id'] = $tag->term_taxonomy_id;
|
2456 |
-
$item_values['taxonomy'] = $tag->taxonomy;
|
2457 |
$item_values['description'] = wptexturize( $tag->description );
|
2458 |
$item_values['parent'] = $tag->parent;
|
2459 |
$item_values['count'] = isset ( $tag->count ) ? $tag->count : 0;
|
@@ -2696,7 +2678,7 @@ class MLAShortcode_Support {
|
|
2696 |
* @param array $arguments Shortcode parameters, including defaults, by reference
|
2697 |
* @param array $attr Shortcode parameters, explicit, by reference
|
2698 |
*
|
2699 |
-
* @return
|
2700 |
*/
|
2701 |
public static function _compose_term_list( &$list, &$links, &$terms, &$markup_values, &$arguments, &$attr ) {
|
2702 |
$term = reset( $terms );
|
@@ -2711,15 +2693,13 @@ class MLAShortcode_Support {
|
|
2711 |
|
2712 |
$mla_item_parameter = $arguments['mla_item_parameter'];
|
2713 |
|
2714 |
-
|
2715 |
-
* Determine output type and templates
|
2716 |
-
*/
|
2717 |
$output_parameters = array_map( 'strtolower', array_map( 'trim', explode( ',', $arguments['mla_output'] ) ) );
|
2718 |
|
2719 |
if ( !in_array( $output_parameters[0], array( 'flat', 'list', 'ulist', 'olist', 'dlist', 'dropdown', 'checklist', 'array' ) ) ) {
|
2720 |
$output_parameters[0] = 'ulist';
|
2721 |
}
|
2722 |
-
|
2723 |
$is_list = in_array( $output_parameters[0], array( 'list', 'ulist', 'olist', 'dlist' ) );
|
2724 |
$is_dropdown = 'dropdown' == $output_parameters[0];
|
2725 |
$is_checklist = 'checklist' == $output_parameters[0];
|
@@ -2728,7 +2708,7 @@ class MLAShortcode_Support {
|
|
2728 |
|
2729 |
// Using the slug is a common practice and affects current_item
|
2730 |
$current_is_slug = in_array( $arguments['mla_option_value'], array( '{+slug+}', '[+slug+]' ) );
|
2731 |
-
|
2732 |
if ( $is_list || $is_dropdown || $is_checklist ) {
|
2733 |
if ( $term->parent ) {
|
2734 |
$open_template = MLATemplate_support::mla_fetch_custom_template( $markup_values['mla_markup'], 'term-list', 'markup', 'child-open' );
|
@@ -2740,9 +2720,7 @@ class MLAShortcode_Support {
|
|
2740 |
$open_template = MLATemplate_support::mla_fetch_custom_template( $markup_values['mla_markup'], 'term-list', 'markup', 'open' );
|
2741 |
}
|
2742 |
|
2743 |
-
|
2744 |
-
* Fall back to default template if no Open section
|
2745 |
-
*/
|
2746 |
if ( false === $open_template ) {
|
2747 |
$markup_values['mla_markup'] = $default_markup;
|
2748 |
|
@@ -2790,9 +2768,7 @@ class MLAShortcode_Support {
|
|
2790 |
}
|
2791 |
|
2792 |
if ( $is_list || ( ( 0 == $current_level ) && $is_dropdown ) || $is_checklist ) {
|
2793 |
-
|
2794 |
-
* Look for gallery-level markup substitution parameters
|
2795 |
-
*/
|
2796 |
$new_text = $open_template . $close_template;
|
2797 |
$markup_values = MLAData::mla_expand_field_level_parameters( $new_text, $attr, $markup_values );
|
2798 |
|
@@ -2814,20 +2790,20 @@ class MLAShortcode_Support {
|
|
2814 |
} else {
|
2815 |
$current_item_delimiter = '?';
|
2816 |
}
|
2817 |
-
|
|
|
2818 |
foreach ( $terms as $key => $term ) {
|
2819 |
$item_values = $markup_values;
|
|
|
2820 |
|
2821 |
-
|
2822 |
-
* fill in item-specific elements
|
2823 |
-
*/
|
2824 |
$item_values['key'] = $key;
|
2825 |
$item_values['term_id'] = $term->term_id;
|
2826 |
$item_values['name'] = wptexturize( $term->name );
|
2827 |
-
$item_values['slug'] = $term->slug;
|
2828 |
$item_values['term_group'] = $term->term_group;
|
2829 |
$item_values['term_taxonomy_id'] = $term->term_taxonomy_id;
|
2830 |
-
$item_values['taxonomy'] = $term->taxonomy;
|
2831 |
$item_values['description'] = wptexturize( $term->description );
|
2832 |
$item_values['parent'] = $term->parent;
|
2833 |
$item_values['count'] = isset ( $term->count ) ? 0 + $term->count : 0;
|
@@ -2842,6 +2818,7 @@ class MLAShortcode_Support {
|
|
2842 |
// Added in the code below:
|
2843 |
$item_values['caption'] = '';
|
2844 |
$item_values['link_attributes'] = '';
|
|
|
2845 |
$item_values['current_item_class'] = '';
|
2846 |
$item_values['rollover_text'] = '';
|
2847 |
$item_values['link_style'] = '';
|
@@ -2859,17 +2836,19 @@ class MLAShortcode_Support {
|
|
2859 |
if ( $value[0] !== $term->taxonomy ) {
|
2860 |
continue;
|
2861 |
}
|
2862 |
-
|
2863 |
$current_item = $value[1];
|
2864 |
}
|
2865 |
-
|
2866 |
-
if ( $current_is_slug || !ctype_digit( $current_item ) ) {
|
2867 |
if ( $current_item == $term->slug ) {
|
|
|
2868 |
$item_values['current_item_class'] = $arguments['current_item_class'];
|
2869 |
break;
|
2870 |
}
|
2871 |
} else {
|
2872 |
if ( $current_item == $term->term_id ) {
|
|
|
2873 |
$item_values['current_item_class'] = $arguments['current_item_class'];
|
2874 |
break;
|
2875 |
}
|
@@ -2877,9 +2856,7 @@ class MLAShortcode_Support {
|
|
2877 |
}
|
2878 |
}
|
2879 |
|
2880 |
-
|
2881 |
-
* Add item_specific field-level substitution parameters
|
2882 |
-
*/
|
2883 |
$new_text = isset( $item_template ) ? $item_template : '';
|
2884 |
foreach( self::$term_list_item_specific_arguments as $index => $value ) {
|
2885 |
$new_text .= str_replace( '{+', '[+', str_replace( '+}', '+]', $arguments[ $index ] ) );
|
@@ -2896,9 +2873,7 @@ class MLAShortcode_Support {
|
|
2896 |
$item_values['caption'] = '';
|
2897 |
}
|
2898 |
|
2899 |
-
|
2900 |
-
* Apply the Display Content parameters.
|
2901 |
-
*/
|
2902 |
if ( ! empty( $arguments['mla_target'] ) ) {
|
2903 |
$link_attributes = 'target="' . $arguments['mla_target'] . '" ';
|
2904 |
} else {
|
@@ -2946,9 +2921,7 @@ class MLAShortcode_Support {
|
|
2946 |
$item_values['thevalue'] = self::_process_shortcode_parameter( $arguments['mla_item_value'], $item_values );
|
2947 |
}
|
2948 |
|
2949 |
-
|
2950 |
-
* Currentlink, editlink, termlink and thelink TODO - link style
|
2951 |
-
*/
|
2952 |
$item_values['currentlink'] = sprintf( '<a %1$shref="%2$s%3$s%4$s=%5$s" title="%6$s" style="%7$s">%8$s</a>', $link_attributes, $item_values['page_url'], $current_item_delimiter, $mla_item_parameter, $item_values['thevalue'], $item_values['rollover_text'], '', $item_values['link_text'] );
|
2953 |
$item_values['editlink'] = sprintf( '<a %1$shref="%2$s" title="%3$s" style="%4$s">%5$s</a>', $link_attributes, $item_values['editlink_url'], $item_values['rollover_text'], '', $item_values['link_text'] );
|
2954 |
$item_values['termlink'] = sprintf( '<a %1$shref="%2$s" title="%3$s" style="%4$s">%5$s</a>', $link_attributes, $item_values['termlink_url'], $item_values['rollover_text'], '', $item_values['link_text'] );
|
@@ -3009,15 +2982,19 @@ class MLAShortcode_Support {
|
|
3009 |
}
|
3010 |
|
3011 |
$child_links = array();
|
|
|
3012 |
if ( $is_hierarchical && !empty( $term->children ) ) {
|
3013 |
-
self::_compose_term_list( $item_values['children'], $child_links, $term->children, $markup_values, $arguments, $attr );
|
3014 |
$markup_values['current_level'] = $current_level; // Changed in _compose_term_list
|
3015 |
}
|
3016 |
|
|
|
|
|
|
|
|
|
|
|
3017 |
if ( $is_list || $is_dropdown || $is_checklist ) {
|
3018 |
-
|
3019 |
-
* item markup
|
3020 |
-
*/
|
3021 |
$item_values = apply_filters( 'mla_term_list_item_values', $item_values );
|
3022 |
$item_template = apply_filters( 'mla_term_list_item_template', $item_template );
|
3023 |
$parse_value = MLAData::mla_parse_template( $item_template, $item_values );
|
@@ -3050,6 +3027,8 @@ class MLAShortcode_Support {
|
|
3050 |
break;
|
3051 |
} // switch format
|
3052 |
}
|
|
|
|
|
3053 |
}
|
3054 |
|
3055 |
/**
|
@@ -3089,9 +3068,7 @@ class MLAShortcode_Support {
|
|
3089 |
public static function mla_term_list( $attr ) {
|
3090 |
global $post;
|
3091 |
|
3092 |
-
|
3093 |
-
* Some do_shortcode callers may not have a specific post in mind
|
3094 |
-
*/
|
3095 |
if ( ! is_object( $post ) ) {
|
3096 |
$post = (object) self::$empty_post;
|
3097 |
}
|
@@ -3100,9 +3077,7 @@ class MLAShortcode_Support {
|
|
3100 |
static $instance = 0;
|
3101 |
$instance++;
|
3102 |
|
3103 |
-
|
3104 |
-
* Some values are already known, and can be used in data selection parameters
|
3105 |
-
*/
|
3106 |
$upload_dir = wp_upload_dir();
|
3107 |
$page_values = array(
|
3108 |
'instance' => $instance,
|
@@ -3138,6 +3113,7 @@ class MLAShortcode_Support {
|
|
3138 |
'multiple_text' => '%d items',
|
3139 |
'link' => 'current',
|
3140 |
'current_item' => '',
|
|
|
3141 |
'current_item_class' => 'mla_current_item',
|
3142 |
'mla_item_parameter' => 'current_item',
|
3143 |
'show_count' => false,
|
@@ -3165,10 +3141,7 @@ class MLAShortcode_Support {
|
|
3165 |
self::$term_list_item_specific_arguments
|
3166 |
);
|
3167 |
|
3168 |
-
|
3169 |
-
* Filter the attributes before $mla_item_parameter and "request:" prefix processing.
|
3170 |
-
*/
|
3171 |
-
|
3172 |
$attr = apply_filters( 'mla_term_list_raw_attributes', $attr );
|
3173 |
|
3174 |
/*
|
@@ -3184,9 +3157,8 @@ class MLAShortcode_Support {
|
|
3184 |
$mla_item_parameter = MLAData::mla_parse_template( $attr_value, $page_values );
|
3185 |
|
3186 |
/*
|
3187 |
-
* Special handling of mla_item_parameter to make
|
3188 |
-
*
|
3189 |
-
* if it's not present in the shortcode itself.
|
3190 |
*/
|
3191 |
if ( ! isset( $attr[ $mla_item_parameter ] ) ) {
|
3192 |
if ( isset( $_REQUEST[ $mla_item_parameter ] ) ) {
|
@@ -3194,9 +3166,7 @@ class MLAShortcode_Support {
|
|
3194 |
}
|
3195 |
}
|
3196 |
|
3197 |
-
|
3198 |
-
* Determine markup template to get default arguments
|
3199 |
-
*/
|
3200 |
$arguments = shortcode_atts( $defaults, $attr );
|
3201 |
|
3202 |
/*
|
@@ -3227,7 +3197,7 @@ class MLAShortcode_Support {
|
|
3227 |
if ( !in_array( $output_parameters[0], array( 'flat', 'list', 'ulist', 'olist', 'dlist', 'dropdown', 'checklist', 'array' ) ) ) {
|
3228 |
$output_parameters[0] = 'ulist';
|
3229 |
}
|
3230 |
-
|
3231 |
if ( in_array( $output_parameters[0], array( 'list', 'ulist', 'olist', 'dlist' ) ) ) {
|
3232 |
if ( ( 'dlist' == $output_parameters[0] ) || ('list' == $output_parameters[0] && 'dd' == $arguments['captiontag'] ) ) {
|
3233 |
$template = 'term-list-dl';
|
@@ -3241,17 +3211,13 @@ class MLAShortcode_Support {
|
|
3241 |
}
|
3242 |
}
|
3243 |
|
3244 |
-
|
3245 |
-
* Apply default arguments set in the markup template
|
3246 |
-
*/
|
3247 |
$arguments = MLATemplate_Support::mla_fetch_custom_template( $template, 'term-list', 'markup', 'arguments' );
|
3248 |
if ( !empty( $arguments ) ) {
|
3249 |
$attr = wp_parse_args( $attr, self::_validate_attributes( array(), $arguments ) );
|
3250 |
}
|
3251 |
|
3252 |
-
|
3253 |
-
* Adjust data selection arguments; remove pagination-specific arguments
|
3254 |
-
*/
|
3255 |
unset( $attr['limit'] );
|
3256 |
unset( $attr['offset'] );
|
3257 |
|
@@ -3309,7 +3275,7 @@ class MLAShortcode_Support {
|
|
3309 |
if ( !in_array( $arguments['hierarchical'], array( 'true', 'combine' ) ) ) {
|
3310 |
$arguments['hierarchical'] = 'false';
|
3311 |
}
|
3312 |
-
|
3313 |
self::$mla_debug = ( ! empty( $arguments['mla_debug'] ) ) ? trim( strtolower( $arguments['mla_debug'] ) ) : false;
|
3314 |
if ( self::$mla_debug ) {
|
3315 |
if ( 'true' == self::$mla_debug ) {
|
@@ -3327,9 +3293,7 @@ class MLAShortcode_Support {
|
|
3327 |
MLACore::mla_debug_add( __LINE__ . ' <strong>' . __( 'mla_debug arguments', 'media-library-assistant' ) . '</strong> = ' . var_export( $arguments, true ) );
|
3328 |
}
|
3329 |
|
3330 |
-
|
3331 |
-
* Determine templates and output type
|
3332 |
-
*/
|
3333 |
if ( $arguments['mla_style'] && ( 'none' !== $arguments['mla_style'] ) ) {
|
3334 |
if ( !MLATemplate_Support::mla_fetch_custom_template( $arguments['mla_style'], 'term-list', 'style', '[exists]' ) ) {
|
3335 |
MLACore::mla_debug_add( '<strong>mla_term_list mla_style</strong> "' . $arguments['mla_style'] . '" ' . __( 'not found', 'media-library-assistant' ), MLACore::MLA_DEBUG_CATEGORY_ANY );
|
@@ -3352,7 +3316,7 @@ class MLAShortcode_Support {
|
|
3352 |
|
3353 |
$default_style = 'term-list';
|
3354 |
$default_markup = 'term-list-ul';
|
3355 |
-
|
3356 |
if ( $is_list = in_array( $output_parameters[0], array( 'list', 'ulist', 'olist', 'dlist' ) ) ) {
|
3357 |
|
3358 |
if ( 'list' == $output_parameters[0] && 'dd' == $arguments['captiontag'] ) {
|
@@ -3407,9 +3371,7 @@ class MLAShortcode_Support {
|
|
3407 |
$is_hierarchical = !( 'false' === $arguments['hierarchical'] );
|
3408 |
$combine_hierarchical = 'combine' === $arguments['hierarchical'];
|
3409 |
|
3410 |
-
|
3411 |
-
* Convert lists to arrays
|
3412 |
-
*/
|
3413 |
if ( is_string( $arguments['taxonomy'] ) ) {
|
3414 |
$arguments['taxonomy'] = explode( ',', $arguments['taxonomy'] );
|
3415 |
}
|
@@ -3435,9 +3397,7 @@ class MLAShortcode_Support {
|
|
3435 |
$arguments['exclude'] = $exclude_later;
|
3436 |
}
|
3437 |
|
3438 |
-
|
3439 |
-
* Invalid taxonomy names return WP_Error
|
3440 |
-
*/
|
3441 |
if ( is_wp_error( $tags ) ) {
|
3442 |
$list = '<strong>' . __( 'ERROR', 'media-library-assistant' ) . ': ' . $tags->get_error_message() . '</strong>, ' . $tags->get_error_data( $tags->get_error_code() );
|
3443 |
|
@@ -3453,9 +3413,7 @@ class MLAShortcode_Support {
|
|
3453 |
return;
|
3454 |
}
|
3455 |
|
3456 |
-
|
3457 |
-
* Fill in the item_specific link properties, calculate list parameters
|
3458 |
-
*/
|
3459 |
if ( isset( $tags['found_rows'] ) ) {
|
3460 |
$found_rows = $tags['found_rows'];
|
3461 |
unset( $tags['found_rows'] );
|
@@ -3505,7 +3463,7 @@ class MLAShortcode_Support {
|
|
3505 |
$option_none_id = -1;
|
3506 |
$option_none_slug = sanitize_title( $arguments['option_none_text'] );
|
3507 |
}
|
3508 |
-
|
3509 |
$tags[0] = ( object ) array(
|
3510 |
'term_id' => $option_none_id,
|
3511 |
'name' => $arguments['option_none_text'],
|
@@ -3563,7 +3521,7 @@ class MLAShortcode_Support {
|
|
3563 |
$option_all_id = 0;
|
3564 |
$option_all_slug = 'all';
|
3565 |
}
|
3566 |
-
|
3567 |
if ( $is_hierarchical ) {
|
3568 |
$tags = self::_get_term_tree( $tags, $arguments );
|
3569 |
|
@@ -3622,7 +3580,7 @@ class MLAShortcode_Support {
|
|
3622 |
} // foreach tag
|
3623 |
}
|
3624 |
}
|
3625 |
-
|
3626 |
if ( $add_all_option ) {
|
3627 |
$found_rows += 1;
|
3628 |
}
|
@@ -3673,7 +3631,7 @@ class MLAShortcode_Support {
|
|
3673 |
|
3674 |
$list .= $gallery_style;
|
3675 |
$markup_values = $style_values;
|
3676 |
-
|
3677 |
if ( empty( $arguments['mla_control_name'] ) ) {
|
3678 |
$mla_control_name = 'tax_input[[+taxonomy+]][]';
|
3679 |
} else {
|
@@ -3684,7 +3642,7 @@ class MLAShortcode_Support {
|
|
3684 |
$tag_links = array();
|
3685 |
|
3686 |
if ( $is_hierarchical ) {
|
3687 |
-
|
3688 |
if ( $combine_hierarchical ) {
|
3689 |
$combined_tags = array();
|
3690 |
foreach( $tags as $taxonomy => $root_terms ) {
|
@@ -3714,7 +3672,7 @@ class MLAShortcode_Support {
|
|
3714 |
'term_link' => '',
|
3715 |
'link' => '',
|
3716 |
);
|
3717 |
-
|
3718 |
array_unshift( $root_terms, $option_all );
|
3719 |
$add_to_found_rows = 1;
|
3720 |
} else {
|
@@ -3734,7 +3692,7 @@ class MLAShortcode_Support {
|
|
3734 |
}
|
3735 |
} else {
|
3736 |
$markup_values['thename'] = self::_process_shortcode_parameter( $mla_control_name, $markup_values );
|
3737 |
-
|
3738 |
// Add the optional 'all-terms' option, if requested
|
3739 |
if ( $add_all_option ) {
|
3740 |
$option_all = ( object ) array(
|
@@ -3752,7 +3710,7 @@ class MLAShortcode_Support {
|
|
3752 |
'term_link' => '',
|
3753 |
'link' => '',
|
3754 |
);
|
3755 |
-
|
3756 |
array_unshift( $tags, $option_all );
|
3757 |
}
|
3758 |
|
@@ -3787,16 +3745,12 @@ class MLAShortcode_Support {
|
|
3787 |
*/
|
3788 |
$attr = self::_validate_attributes( $attr, $content );
|
3789 |
|
3790 |
-
|
3791 |
-
* The 'array' format makes no sense in a shortcode
|
3792 |
-
*/
|
3793 |
if ( isset( $attr['mla_output'] ) && 'array' == $attr['mla_output'] ) {
|
3794 |
$attr['mla_output'] = 'flat';
|
3795 |
}
|
3796 |
|
3797 |
-
|
3798 |
-
* A shortcode must return its content to the caller, so "echo" makes no sense
|
3799 |
-
*/
|
3800 |
$attr['echo'] = false;
|
3801 |
|
3802 |
if ( !empty( $attr['mla_output'] ) ) {
|
@@ -4148,6 +4102,7 @@ class MLAShortcode_Support {
|
|
4148 |
}
|
4149 |
|
4150 |
$markup_values['new_url'] = set_url_scheme( $markup_values['scheme'] . $markup_values['http_host'] . $markup_values['request_uri'] );
|
|
|
4151 |
|
4152 |
/*
|
4153 |
* Expand pagination-specific Gallery Display Content parameters,
|
@@ -4342,7 +4297,7 @@ class MLAShortcode_Support {
|
|
4342 |
if ( isset( $matches[2] ) ) {
|
4343 |
$matches[2] = strtoupper( $matches[2] );
|
4344 |
}
|
4345 |
-
|
4346 |
if ( array_key_exists( $matches[1], $allowed_keys ) ) {
|
4347 |
if ( ( 'rand' == $matches[1] ) || ( 'random' == $matches[1] ) ){
|
4348 |
$results[] = 'RAND()';
|
@@ -4362,7 +4317,7 @@ class MLAShortcode_Support {
|
|
4362 |
$matches[1] = $table_prefix . $allowed_keys[ $matches[1] ];
|
4363 |
}
|
4364 |
} // switch $matches[1]
|
4365 |
-
|
4366 |
$results[] = isset( $matches[2] ) ? $matches[1] . $matches[2] : $matches[1] . $order;
|
4367 |
} // not 'rand'
|
4368 |
} // allowed key
|
@@ -4475,7 +4430,7 @@ class MLAShortcode_Support {
|
|
4475 |
// 'tax_operator' => 'OR' (default), 'IN', 'NOT IN', 'AND',
|
4476 |
// 'tax_include_children' => true (default), false
|
4477 |
);
|
4478 |
-
|
4479 |
/**
|
4480 |
* Parses shortcode parameters and returns the gallery objects
|
4481 |
*
|
@@ -4517,7 +4472,7 @@ class MLAShortcode_Support {
|
|
4517 |
if ( isset( $attr['where_used_query'] ) && ( 'this-is-a-where-used-query' == $attr['where_used_query'] ) ) {
|
4518 |
$where_used_query = true;
|
4519 |
unset( $attr['where_used_query'] );
|
4520 |
-
|
4521 |
// remove pagination parameters to get a complete result
|
4522 |
$attr['nopaging'] = true;
|
4523 |
unset( $attr['numberposts'] );
|
@@ -4528,7 +4483,7 @@ class MLAShortcode_Support {
|
|
4528 |
unset( $attr['mla_paginate_current'] );
|
4529 |
unset( $attr['mla_page_parameter'] );
|
4530 |
unset( $attr['mla_paginate_total'] );
|
4531 |
-
|
4532 |
// There's no point in sorting the items
|
4533 |
$attr['orderby'] = 'none';
|
4534 |
} else {
|
@@ -4580,6 +4535,7 @@ class MLAShortcode_Support {
|
|
4580 |
*/
|
4581 |
self::$mla_get_shortcode_dynamic_attachments_parameters = array();
|
4582 |
$query_arguments = array();
|
|
|
4583 |
if ( ! empty( $attr ) ) {
|
4584 |
$all_taxonomies = get_taxonomies( array ( 'show_ui' => true ), 'names' );
|
4585 |
$simple_tax_queries = array();
|
@@ -4603,7 +4559,7 @@ class MLAShortcode_Support {
|
|
4603 |
} catch ( Exception $e ) { // PHP 5
|
4604 |
$function = NULL;
|
4605 |
}
|
4606 |
-
|
4607 |
if ( is_callable( $function ) ) {
|
4608 |
$tax_query = $function();
|
4609 |
} else {
|
@@ -4612,6 +4568,26 @@ class MLAShortcode_Support {
|
|
4612 |
}
|
4613 |
|
4614 |
if ( is_array( $tax_query ) ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4615 |
$query_arguments[ $key ] = $tax_query;
|
4616 |
self::$mla_get_shortcode_dynamic_attachments_parameters[ $key ] = $value;
|
4617 |
break; // Done - the tax_query overrides all other taxonomy parameters
|
@@ -4631,13 +4607,16 @@ class MLAShortcode_Support {
|
|
4631 |
} // valid taxonomy
|
4632 |
} // valid coumpound value
|
4633 |
} // foreach compound_value
|
4634 |
-
|
4635 |
foreach( $tax_queries as $key => $value ) {
|
4636 |
$simple_tax_queries[ $key ] = implode(',', $value );
|
4637 |
}
|
4638 |
} // tax_input
|
4639 |
elseif ( array_key_exists( $key, $all_taxonomies ) ) {
|
4640 |
$simple_tax_queries[ $key ] = implode(',', array_filter( array_map( 'trim', explode( ',', $value ) ) ) );
|
|
|
|
|
|
|
4641 |
} // array_key_exists
|
4642 |
} //foreach $attr
|
4643 |
|
@@ -4651,7 +4630,7 @@ class MLAShortcode_Support {
|
|
4651 |
*/
|
4652 |
if ( isset( $query_arguments['tax_query'] ) || empty( $simple_tax_queries ) ) {
|
4653 |
// No further action required
|
4654 |
-
} elseif ( ( 1 < count( $simple_tax_queries ) ) || isset( $attr['tax_operator'] ) || isset( $attr['tax_include_children'] ) ) {
|
4655 |
// Build a tax_query
|
4656 |
if ( 1 < count( $simple_tax_queries ) ) {
|
4657 |
$tax_relation = 'AND';
|
@@ -4685,7 +4664,23 @@ class MLAShortcode_Support {
|
|
4685 |
if ( empty( $value ) ) {
|
4686 |
continue;
|
4687 |
}
|
4688 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4689 |
$tax_query[] = array( 'taxonomy' => $key, 'field' => 'slug', 'terms' => explode( ',', $value ), 'operator' => $tax_operator, 'include_children' => $tax_include_children );
|
4690 |
}
|
4691 |
|
@@ -4991,7 +4986,7 @@ class MLAShortcode_Support {
|
|
4991 |
} catch ( Exception $e ) { // PHP 5
|
4992 |
$function = NULL;
|
4993 |
}
|
4994 |
-
|
4995 |
if ( is_callable( $function ) ) {
|
4996 |
$date_query = $function();
|
4997 |
} else {
|
@@ -5028,7 +5023,7 @@ class MLAShortcode_Support {
|
|
5028 |
} catch ( Exception $e ) { // PHP 5
|
5029 |
$function = NULL;
|
5030 |
}
|
5031 |
-
|
5032 |
if ( is_callable( $function ) ) {
|
5033 |
$meta_query = $function();
|
5034 |
} else {
|
@@ -5088,7 +5083,7 @@ class MLAShortcode_Support {
|
|
5088 |
MLACore::mla_debug_add( '<strong>mla_debug is_archive()</strong> = ' . var_export( is_archive(), true ) );
|
5089 |
MLACore::mla_debug_add( '<strong>mla_debug is_search()</strong> = ' . var_export( is_search(), true ) );
|
5090 |
}
|
5091 |
-
|
5092 |
if ( isset( $query_arguments['posts_per_archive_page'] ) && ( is_archive() || is_search() ) ) {
|
5093 |
$query_arguments['posts_per_page'] = $query_arguments['posts_per_archive_page'];
|
5094 |
}
|
@@ -5301,7 +5296,7 @@ class MLAShortcode_Support {
|
|
5301 |
$attachments['found_rows'] = absint( MLAShortcodes::$mla_gallery_wp_query_object->found_posts );
|
5302 |
$attachments['max_num_pages'] = absint( MLAShortcodes::$mla_gallery_wp_query_object->max_num_pages );
|
5303 |
}
|
5304 |
-
|
5305 |
$filtered_attachments = apply_filters_ref_array( 'mla_gallery_the_attachments', array( NULL, &$attachments ) ) ;
|
5306 |
if ( !is_null( $filtered_attachments ) ) {
|
5307 |
$attachments = $filtered_attachments;
|
@@ -5580,9 +5575,7 @@ class MLAShortcode_Support {
|
|
5580 |
public static function mla_get_terms( $attr ) {
|
5581 |
global $wpdb;
|
5582 |
|
5583 |
-
|
5584 |
-
* Make sure $attr is an array, even if it's empty
|
5585 |
-
*/
|
5586 |
if ( empty( $attr ) ) {
|
5587 |
$attr = array();
|
5588 |
} elseif ( is_string( $attr ) ) {
|
@@ -5596,9 +5589,7 @@ class MLAShortcode_Support {
|
|
5596 |
$arguments = shortcode_atts( self::$mla_get_terms_parameters, $attr );
|
5597 |
$arguments = apply_filters( 'mla_get_terms_query_arguments', $arguments );
|
5598 |
|
5599 |
-
|
5600 |
-
* Build an array of individual clauses that can be filtered
|
5601 |
-
*/
|
5602 |
$clauses = array( 'fields' => '', 'join' => '', 'where' => '', 'orderby' => '', 'limits' => '', );
|
5603 |
|
5604 |
/*
|
@@ -5630,9 +5621,7 @@ class MLAShortcode_Support {
|
|
5630 |
$clause[] = 'LEFT JOIN `' . $wpdb->term_relationships . '` AS tr ON tt.term_taxonomy_id = tr.term_taxonomy_id';
|
5631 |
$clause[] = 'LEFT JOIN `' . $wpdb->posts . '` AS p ON tr.object_id = p.ID';
|
5632 |
|
5633 |
-
|
5634 |
-
* Add type and status constraints
|
5635 |
-
*/
|
5636 |
if ( is_array( $arguments['post_type'] ) ) {
|
5637 |
$post_types = $arguments['post_type'];
|
5638 |
} else {
|
@@ -5665,11 +5654,13 @@ class MLAShortcode_Support {
|
|
5665 |
}
|
5666 |
|
5667 |
$clause = join(' ', $clause);
|
5668 |
-
|
|
|
|
|
|
|
|
|
5669 |
|
5670 |
-
|
5671 |
-
* Start WHERE clause with a taxonomy constraint
|
5672 |
-
*/
|
5673 |
if ( is_array( $arguments['taxonomy'] ) ) {
|
5674 |
$taxonomies = $arguments['taxonomy'];
|
5675 |
} else {
|
@@ -5713,9 +5704,7 @@ class MLAShortcode_Support {
|
|
5713 |
} // taxonomies
|
5714 |
} // ids
|
5715 |
|
5716 |
-
|
5717 |
-
* If there are no terms we want an empty cloud
|
5718 |
-
*/
|
5719 |
if ( empty( $includes ) ) {
|
5720 |
$arguments['include'] = (string) 0x7FFFFFFF;
|
5721 |
} else {
|
@@ -5724,9 +5713,7 @@ class MLAShortcode_Support {
|
|
5724 |
}
|
5725 |
}
|
5726 |
|
5727 |
-
|
5728 |
-
* Add include/exclude and parent constraints to WHERE cluse
|
5729 |
-
*/
|
5730 |
if ( ! empty( $arguments['include'] ) ) {
|
5731 |
$placeholders = implode( "','", wp_parse_id_list( $arguments['include'] ) );
|
5732 |
$clause[] = "AND t.term_id IN ( '{$placeholders}' )";
|
@@ -5751,39 +5738,41 @@ class MLAShortcode_Support {
|
|
5751 |
}
|
5752 |
|
5753 |
$clause = join(' ', $clause);
|
5754 |
-
|
|
|
|
|
|
|
|
|
5755 |
|
5756 |
-
|
5757 |
-
* For the inner/initial query, always select the most popular terms
|
5758 |
-
*/
|
5759 |
if ( $no_orderby = 'true' == (string) $arguments['no_orderby'] ) {
|
5760 |
$arguments['orderby'] = 'count';
|
5761 |
$arguments['order'] = 'DESC';
|
5762 |
}
|
5763 |
|
5764 |
-
|
5765 |
-
|
5766 |
-
|
5767 |
-
|
5768 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5769 |
} else {
|
5770 |
-
$
|
5771 |
}
|
5772 |
|
5773 |
-
|
5774 |
-
'empty_orderby_default' => 'name',
|
5775 |
-
'count' => 'count',
|
5776 |
-
'id' => 'term_id',
|
5777 |
-
'name' => 'name',
|
5778 |
-
'random' => 'RAND()',
|
5779 |
-
'slug' => 'slug',
|
5780 |
-
);
|
5781 |
-
|
5782 |
-
$clauses['orderby'] = 'ORDER BY ' . self::_validate_sql_orderby( $arguments, '', $allowed_keys, $binary_keys );
|
5783 |
-
|
5784 |
-
/*
|
5785 |
-
* Add pagination
|
5786 |
-
*/
|
5787 |
$clauses['limits'] = '';
|
5788 |
$offset = absint( $arguments['offset'] );
|
5789 |
$limit = absint( $arguments['limit'] );
|
@@ -5798,9 +5787,7 @@ class MLAShortcode_Support {
|
|
5798 |
|
5799 |
$clauses = apply_filters( 'mla_get_terms_clauses', $clauses );
|
5800 |
|
5801 |
-
|
5802 |
-
* Build the final query
|
5803 |
-
*/
|
5804 |
$query = array( 'SELECT' );
|
5805 |
$query[] = $clauses['fields'];
|
5806 |
$query[] = 'FROM `' . $wpdb->terms . '` AS t';
|
@@ -5815,27 +5802,23 @@ class MLAShortcode_Support {
|
|
5815 |
}
|
5816 |
|
5817 |
/*
|
5818 |
-
*
|
5819 |
* supply a sort order for the initial/inner query only
|
5820 |
*/
|
5821 |
if ( ! ( $no_orderby || $no_count ) ) {
|
5822 |
$query[] = 'ORDER BY count DESC, t.term_id ASC';
|
5823 |
}
|
5824 |
|
5825 |
-
|
5826 |
-
* Limit the total number of terms returned
|
5827 |
-
*/
|
5828 |
$terms_limit = absint( $arguments['number'] );
|
5829 |
if ( 0 < $terms_limit ) {
|
5830 |
$query[] = "LIMIT {$terms_limit}";
|
5831 |
}
|
5832 |
|
5833 |
-
|
5834 |
-
* $final_clauses, if present, require an SQL subquery
|
5835 |
-
*/
|
5836 |
$final_clauses = array();
|
5837 |
|
5838 |
-
if ( 'ORDER BY count DESC' != $clauses['orderby'] ) {
|
5839 |
$final_clauses[] = $clauses['orderby'];
|
5840 |
}
|
5841 |
|
@@ -5843,9 +5826,7 @@ class MLAShortcode_Support {
|
|
5843 |
$final_clauses[] = $clauses['limits'];
|
5844 |
}
|
5845 |
|
5846 |
-
|
5847 |
-
* If we're limiting the final results, we need to get an accurate total count first
|
5848 |
-
*/
|
5849 |
if ( ! $no_count && ( 0 < $offset || 0 < $limit ) ) {
|
5850 |
$count_query = 'SELECT COUNT(*) as count FROM (' . join(' ', $query) . ' ) as subQuery';
|
5851 |
$count = $wpdb->get_results( $count_query );
|
172 |
|
173 |
return $image;
|
174 |
}
|
175 |
+
|
176 |
/**
|
177 |
* Make sure $attr is an array, repair line-break damage, merge with $content
|
178 |
*
|
578 |
} else {
|
579 |
$max_num_pages = 1;
|
580 |
}
|
581 |
+
|
582 |
if ( isset( $attachments['found_rows'] ) ) {
|
583 |
$found_rows = $attachments['found_rows'];
|
584 |
unset( $attachments['found_rows'] );
|
586 |
} else {
|
587 |
$found_rows = $current_rows;
|
588 |
}
|
589 |
+
|
590 |
if ( ( $is_gallery && empty($attachments) ) || ( $is_pagination && empty( $found_rows ) ) ) {
|
591 |
if ( self::$mla_debug ) {
|
592 |
MLACore::mla_debug_add( '<strong>' . __( 'mla_debug empty gallery', 'media-library-assistant' ) . '</strong>, query = ' . var_export( $attr, true ) );
|
627 |
if ( 'mla_tag_cloud' !== $arguments['mla_alt_shortcode'] ) {
|
628 |
$blacklist = array_merge( $mla_arguments, $blacklist );
|
629 |
}
|
630 |
+
|
631 |
$blacklist = apply_filters( 'mla_gallery_alt_shortcode_blacklist', $blacklist );
|
632 |
$alt_attr = apply_filters( 'mla_gallery_alt_shortcode_attributes', $attr );
|
633 |
|
653 |
$mla_alt_shortcode_ids = array();
|
654 |
|
655 |
if ( is_null( $mla_alt_ids_value ) ) {
|
656 |
+
|
657 |
$mla_alt_shortcode_ids = apply_filters_ref_array( 'mla_gallery_alt_shortcode_ids', array( $mla_alt_shortcode_ids, $arguments['mla_alt_ids_name'], &$attachments ) );
|
658 |
if ( is_array( $mla_alt_shortcode_ids ) ) {
|
659 |
if ( 0 == count( $mla_alt_shortcode_ids ) ) {
|
661 |
$mla_alt_shortcode_ids[] = $value->ID;
|
662 |
} // foreach $attachments
|
663 |
}
|
664 |
+
|
665 |
$mla_alt_shortcode_ids = $arguments['mla_alt_ids_name'] . '="' . implode( ',', $mla_alt_shortcode_ids ) . '"';
|
666 |
}
|
667 |
|
680 |
} else {
|
681 |
$output .= do_shortcode( sprintf( '[%1$s %2$s %3$s]', $arguments['mla_alt_shortcode'], $mla_alt_shortcode_ids, $mla_alt_shortcode_args ) );
|
682 |
}
|
683 |
+
|
684 |
do_action( 'mla_gallery_end_alt_shortcode' );
|
685 |
return $output;
|
686 |
} // is_null( $mla_alt_ids_value )
|
693 |
if ( $icon_only ) {
|
694 |
$size = $size_class = 'icon';
|
695 |
}
|
696 |
+
|
697 |
if ( 'icon' == strtolower( $size) ) {
|
698 |
if ( 'checked' == MLACore::mla_get_option( MLACoreOptions::MLA_ENABLE_MLA_ICONS ) ) {
|
699 |
$size = array( 64, 64 );
|
934 |
$markup_values = apply_filters( 'mla_gallery_open_values', $markup_values );
|
935 |
|
936 |
if ( $is_gallery ) {
|
|
|
|
|
937 |
$open_template = apply_filters( 'mla_gallery_open_template', $open_template );
|
938 |
if ( empty( $open_template ) ) {
|
939 |
$gallery_open = '';
|
972 |
if ( $attachment->ID == $current_id ) {
|
973 |
break;
|
974 |
}
|
975 |
+
|
976 |
$pagination_index++;
|
977 |
}
|
978 |
|
989 |
default:
|
990 |
$target_id = $id;
|
991 |
} // link_type
|
992 |
+
|
993 |
if ( isset( $attachments[ $target_id ] ) ) {
|
994 |
$target = $attachments[ $target_id ];
|
995 |
} elseif ( $is_wrap ) {
|
1016 |
|
1017 |
$column_index = 0;
|
1018 |
foreach ( $attachments as $id => $attachment ) {
|
1019 |
+
$item_values = apply_filters( 'mla_gallery_item_initial_values', $markup_values, $attachment );
|
1020 |
|
1021 |
+
// fill in item-specific elements
|
|
|
|
|
1022 |
$item_values['index'] = (string) $is_gallery ? 1 + $column_index : $pagination_index;
|
1023 |
$item_values['last_in_row'] = '';
|
1024 |
|
1045 |
$item_values['path'] = '';
|
1046 |
$item_values['file'] = '';
|
1047 |
$item_values['description'] = wptexturize( $attachment->post_content );
|
1048 |
+
$item_values['file_url'] = wp_get_attachment_url( $attachment->ID ); // $attachment->guid;
|
1049 |
$item_values['author_id'] = $attachment->post_author;
|
1050 |
$item_values['author'] = '';
|
1051 |
$item_values['caption'] = '';
|
1175 |
if ( $icon_only ) {
|
1176 |
add_filter( 'wp_get_attachment_image_src', 'MLAShortcode_Support::_get_attachment_icon_src', 10, 2 );
|
1177 |
}
|
1178 |
+
|
1179 |
$item_values['pagelink'] = wp_get_attachment_link($attachment->ID, $size, true, $show_icon, $link_text);
|
1180 |
$item_values['filelink'] = wp_get_attachment_link($attachment->ID, $size, false, $show_icon, $link_text);
|
1181 |
|
1715 |
public static function mla_tag_cloud( $attr ) {
|
1716 |
global $post;
|
1717 |
|
1718 |
+
// Some do_shortcode callers may not have a specific post in mind
|
|
|
|
|
1719 |
if ( ! is_object( $post ) ) {
|
1720 |
$post = (object) self::$empty_post;
|
1721 |
}
|
1724 |
static $instance = 0;
|
1725 |
$instance++;
|
1726 |
|
1727 |
+
// Some values are already known, and can be used in data selection parameters
|
|
|
|
|
1728 |
$upload_dir = wp_upload_dir();
|
1729 |
$page_values = array(
|
1730 |
'instance' => $instance,
|
1747 |
'page_url' => get_page_link(),
|
1748 |
);
|
1749 |
|
1750 |
+
// These are the default parameters for tag cloud display
|
|
|
|
|
1751 |
$mla_item_specific_arguments = array(
|
1752 |
'mla_link_attributes' => '',
|
1753 |
'mla_link_class' => '',
|
1801 |
$mla_item_specific_arguments
|
1802 |
);
|
1803 |
|
1804 |
+
// Filter the attributes before $mla_page_parameter and "request:" prefix processing.
|
|
|
|
|
|
|
1805 |
$attr = apply_filters( 'mla_tag_cloud_raw_attributes', $attr );
|
1806 |
|
1807 |
/*
|
1817 |
$mla_page_parameter = MLAData::mla_parse_template( $attr_value, $page_values );
|
1818 |
|
1819 |
/*
|
1820 |
+
* Special handling of mla_page_parameter to make "MLA pagination" easier.
|
1821 |
+
* Look for this parameter in $_REQUEST if it's not present in the shortcode itself.
|
|
|
1822 |
*/
|
1823 |
if ( ! isset( $attr[ $mla_page_parameter ] ) ) {
|
1824 |
if ( isset( $_REQUEST[ $mla_page_parameter ] ) ) {
|
1826 |
}
|
1827 |
}
|
1828 |
|
1829 |
+
// Determine markup template to get default arguments
|
|
|
|
|
1830 |
$arguments = shortcode_atts( $defaults, $attr );
|
1831 |
if ( $arguments['mla_markup'] ) {
|
1832 |
$template = $arguments['mla_markup'];
|
1843 |
if ( !in_array( $output_parameters[0], array( 'flat', 'list', 'ulist', 'olist', 'dlist', 'grid', 'array' ) ) ) {
|
1844 |
$output_parameters[0] = 'flat';
|
1845 |
}
|
1846 |
+
|
1847 |
if ( 'grid' == $output_parameters[0] ) {
|
1848 |
$template = MLACore::mla_get_option('default_tag_cloud_markup');
|
1849 |
} elseif ( in_array( $output_parameters[0], array( 'list', 'ulist', 'olist', 'dlist' ) ) ) {
|
1857 |
}
|
1858 |
}
|
1859 |
|
1860 |
+
// Apply default arguments set in the markup template
|
|
|
|
|
1861 |
if ( !empty( $template ) ) {
|
1862 |
$arguments = MLATemplate_Support::mla_fetch_custom_template( $template, 'tag-cloud', 'markup', 'arguments' );
|
1863 |
if ( !empty( $arguments ) ) {
|
1954 |
if ( !in_array( $output_parameters[0], array( 'flat', 'list', 'ulist', 'olist', 'dlist', 'grid', 'array' ) ) ) {
|
1955 |
$output_parameters[0] = 'flat';
|
1956 |
}
|
1957 |
+
|
1958 |
if ( $is_grid = 'grid' == $output_parameters[0] ) {
|
1959 |
$default_style = MLACore::mla_get_option('default_tag_cloud_style');
|
1960 |
$default_markup = MLACore::mla_get_option('default_tag_cloud_markup');
|
2414 |
} else {
|
2415 |
$current_item_delimiter = '?';
|
2416 |
}
|
2417 |
+
|
2418 |
$column_index = 0;
|
2419 |
foreach ( $tags as $key => $tag ) {
|
2420 |
$item_values = $markup_values;
|
2432 |
$item_values['key'] = $key;
|
2433 |
$item_values['term_id'] = $tag->term_id;
|
2434 |
$item_values['name'] = wptexturize( $tag->name );
|
2435 |
+
$item_values['slug'] = $tag->slug;
|
2436 |
$item_values['term_group'] = $tag->term_group;
|
2437 |
$item_values['term_taxonomy_id'] = $tag->term_taxonomy_id;
|
2438 |
+
$item_values['taxonomy'] = $tag->taxonomy;
|
2439 |
$item_values['description'] = wptexturize( $tag->description );
|
2440 |
$item_values['parent'] = $tag->parent;
|
2441 |
$item_values['count'] = isset ( $tag->count ) ? $tag->count : 0;
|
2678 |
* @param array $arguments Shortcode parameters, including defaults, by reference
|
2679 |
* @param array $attr Shortcode parameters, explicit, by reference
|
2680 |
*
|
2681 |
+
* @return boolean True if the list contains the "current_item"; appends to &$list, &$links
|
2682 |
*/
|
2683 |
public static function _compose_term_list( &$list, &$links, &$terms, &$markup_values, &$arguments, &$attr ) {
|
2684 |
$term = reset( $terms );
|
2693 |
|
2694 |
$mla_item_parameter = $arguments['mla_item_parameter'];
|
2695 |
|
2696 |
+
// Determine output type and templates
|
|
|
|
|
2697 |
$output_parameters = array_map( 'strtolower', array_map( 'trim', explode( ',', $arguments['mla_output'] ) ) );
|
2698 |
|
2699 |
if ( !in_array( $output_parameters[0], array( 'flat', 'list', 'ulist', 'olist', 'dlist', 'dropdown', 'checklist', 'array' ) ) ) {
|
2700 |
$output_parameters[0] = 'ulist';
|
2701 |
}
|
2702 |
+
|
2703 |
$is_list = in_array( $output_parameters[0], array( 'list', 'ulist', 'olist', 'dlist' ) );
|
2704 |
$is_dropdown = 'dropdown' == $output_parameters[0];
|
2705 |
$is_checklist = 'checklist' == $output_parameters[0];
|
2708 |
|
2709 |
// Using the slug is a common practice and affects current_item
|
2710 |
$current_is_slug = in_array( $arguments['mla_option_value'], array( '{+slug+}', '[+slug+]' ) );
|
2711 |
+
|
2712 |
if ( $is_list || $is_dropdown || $is_checklist ) {
|
2713 |
if ( $term->parent ) {
|
2714 |
$open_template = MLATemplate_support::mla_fetch_custom_template( $markup_values['mla_markup'], 'term-list', 'markup', 'child-open' );
|
2720 |
$open_template = MLATemplate_support::mla_fetch_custom_template( $markup_values['mla_markup'], 'term-list', 'markup', 'open' );
|
2721 |
}
|
2722 |
|
2723 |
+
// Fall back to default template if no Open section
|
|
|
|
|
2724 |
if ( false === $open_template ) {
|
2725 |
$markup_values['mla_markup'] = $default_markup;
|
2726 |
|
2768 |
}
|
2769 |
|
2770 |
if ( $is_list || ( ( 0 == $current_level ) && $is_dropdown ) || $is_checklist ) {
|
2771 |
+
// Look for gallery-level markup substitution parameters
|
|
|
|
|
2772 |
$new_text = $open_template . $close_template;
|
2773 |
$markup_values = MLAData::mla_expand_field_level_parameters( $new_text, $attr, $markup_values );
|
2774 |
|
2790 |
} else {
|
2791 |
$current_item_delimiter = '?';
|
2792 |
}
|
2793 |
+
|
2794 |
+
$has_active = false;
|
2795 |
foreach ( $terms as $key => $term ) {
|
2796 |
$item_values = $markup_values;
|
2797 |
+
$is_active = false;
|
2798 |
|
2799 |
+
// fill in item-specific elements
|
|
|
|
|
2800 |
$item_values['key'] = $key;
|
2801 |
$item_values['term_id'] = $term->term_id;
|
2802 |
$item_values['name'] = wptexturize( $term->name );
|
2803 |
+
$item_values['slug'] = $term->slug;
|
2804 |
$item_values['term_group'] = $term->term_group;
|
2805 |
$item_values['term_taxonomy_id'] = $term->term_taxonomy_id;
|
2806 |
+
$item_values['taxonomy'] = $term->taxonomy;
|
2807 |
$item_values['description'] = wptexturize( $term->description );
|
2808 |
$item_values['parent'] = $term->parent;
|
2809 |
$item_values['count'] = isset ( $term->count ) ? 0 + $term->count : 0;
|
2818 |
// Added in the code below:
|
2819 |
$item_values['caption'] = '';
|
2820 |
$item_values['link_attributes'] = '';
|
2821 |
+
$item_values['active_item_class'] = '';
|
2822 |
$item_values['current_item_class'] = '';
|
2823 |
$item_values['rollover_text'] = '';
|
2824 |
$item_values['link_style'] = '';
|
2836 |
if ( $value[0] !== $term->taxonomy ) {
|
2837 |
continue;
|
2838 |
}
|
2839 |
+
|
2840 |
$current_item = $value[1];
|
2841 |
}
|
2842 |
+
|
2843 |
+
if ( $current_is_slug || !( ctype_digit( $current_item ) || is_int( $current_item ) ) ) {
|
2844 |
if ( $current_item == $term->slug ) {
|
2845 |
+
$is_active = true;
|
2846 |
$item_values['current_item_class'] = $arguments['current_item_class'];
|
2847 |
break;
|
2848 |
}
|
2849 |
} else {
|
2850 |
if ( $current_item == $term->term_id ) {
|
2851 |
+
$is_active = true;
|
2852 |
$item_values['current_item_class'] = $arguments['current_item_class'];
|
2853 |
break;
|
2854 |
}
|
2856 |
}
|
2857 |
}
|
2858 |
|
2859 |
+
// Add item_specific field-level substitution parameters
|
|
|
|
|
2860 |
$new_text = isset( $item_template ) ? $item_template : '';
|
2861 |
foreach( self::$term_list_item_specific_arguments as $index => $value ) {
|
2862 |
$new_text .= str_replace( '{+', '[+', str_replace( '+}', '+]', $arguments[ $index ] ) );
|
2873 |
$item_values['caption'] = '';
|
2874 |
}
|
2875 |
|
2876 |
+
// Apply the Display Content parameters.
|
|
|
|
|
2877 |
if ( ! empty( $arguments['mla_target'] ) ) {
|
2878 |
$link_attributes = 'target="' . $arguments['mla_target'] . '" ';
|
2879 |
} else {
|
2921 |
$item_values['thevalue'] = self::_process_shortcode_parameter( $arguments['mla_item_value'], $item_values );
|
2922 |
}
|
2923 |
|
2924 |
+
// Currentlink, editlink, termlink and thelink TODO - link style
|
|
|
|
|
2925 |
$item_values['currentlink'] = sprintf( '<a %1$shref="%2$s%3$s%4$s=%5$s" title="%6$s" style="%7$s">%8$s</a>', $link_attributes, $item_values['page_url'], $current_item_delimiter, $mla_item_parameter, $item_values['thevalue'], $item_values['rollover_text'], '', $item_values['link_text'] );
|
2926 |
$item_values['editlink'] = sprintf( '<a %1$shref="%2$s" title="%3$s" style="%4$s">%5$s</a>', $link_attributes, $item_values['editlink_url'], $item_values['rollover_text'], '', $item_values['link_text'] );
|
2927 |
$item_values['termlink'] = sprintf( '<a %1$shref="%2$s" title="%3$s" style="%4$s">%5$s</a>', $link_attributes, $item_values['termlink_url'], $item_values['rollover_text'], '', $item_values['link_text'] );
|
2982 |
}
|
2983 |
|
2984 |
$child_links = array();
|
2985 |
+
$child_active = false;
|
2986 |
if ( $is_hierarchical && !empty( $term->children ) ) {
|
2987 |
+
$child_active = self::_compose_term_list( $item_values['children'], $child_links, $term->children, $markup_values, $arguments, $attr );
|
2988 |
$markup_values['current_level'] = $current_level; // Changed in _compose_term_list
|
2989 |
}
|
2990 |
|
2991 |
+
if ( $is_active || $child_active ) {
|
2992 |
+
$has_active = true;
|
2993 |
+
$item_values['active_item_class'] = $arguments['active_item_class'];
|
2994 |
+
}
|
2995 |
+
|
2996 |
if ( $is_list || $is_dropdown || $is_checklist ) {
|
2997 |
+
// item markup
|
|
|
|
|
2998 |
$item_values = apply_filters( 'mla_term_list_item_values', $item_values );
|
2999 |
$item_template = apply_filters( 'mla_term_list_item_template', $item_template );
|
3000 |
$parse_value = MLAData::mla_parse_template( $item_template, $item_values );
|
3027 |
break;
|
3028 |
} // switch format
|
3029 |
}
|
3030 |
+
|
3031 |
+
return $has_active;
|
3032 |
}
|
3033 |
|
3034 |
/**
|
3068 |
public static function mla_term_list( $attr ) {
|
3069 |
global $post;
|
3070 |
|
3071 |
+
// Some do_shortcode callers may not have a specific post in mind
|
|
|
|
|
3072 |
if ( ! is_object( $post ) ) {
|
3073 |
$post = (object) self::$empty_post;
|
3074 |
}
|
3077 |
static $instance = 0;
|
3078 |
$instance++;
|
3079 |
|
3080 |
+
// Some values are already known, and can be used in data selection parameters
|
|
|
|
|
3081 |
$upload_dir = wp_upload_dir();
|
3082 |
$page_values = array(
|
3083 |
'instance' => $instance,
|
3113 |
'multiple_text' => '%d items',
|
3114 |
'link' => 'current',
|
3115 |
'current_item' => '',
|
3116 |
+
'active_item_class' => 'mla_active_item',
|
3117 |
'current_item_class' => 'mla_current_item',
|
3118 |
'mla_item_parameter' => 'current_item',
|
3119 |
'show_count' => false,
|
3141 |
self::$term_list_item_specific_arguments
|
3142 |
);
|
3143 |
|
3144 |
+
// Filter the attributes before $mla_item_parameter and "request:" prefix processing.
|
|
|
|
|
|
|
3145 |
$attr = apply_filters( 'mla_term_list_raw_attributes', $attr );
|
3146 |
|
3147 |
/*
|
3157 |
$mla_item_parameter = MLAData::mla_parse_template( $attr_value, $page_values );
|
3158 |
|
3159 |
/*
|
3160 |
+
* Special handling of mla_item_parameter to make multiple lists per page easier.
|
3161 |
+
* Look for this parameter in $_REQUEST if it's not present in the shortcode itself.
|
|
|
3162 |
*/
|
3163 |
if ( ! isset( $attr[ $mla_item_parameter ] ) ) {
|
3164 |
if ( isset( $_REQUEST[ $mla_item_parameter ] ) ) {
|
3166 |
}
|
3167 |
}
|
3168 |
|
3169 |
+
// Determine markup template to get default arguments
|
|
|
|
|
3170 |
$arguments = shortcode_atts( $defaults, $attr );
|
3171 |
|
3172 |
/*
|
3197 |
if ( !in_array( $output_parameters[0], array( 'flat', 'list', 'ulist', 'olist', 'dlist', 'dropdown', 'checklist', 'array' ) ) ) {
|
3198 |
$output_parameters[0] = 'ulist';
|
3199 |
}
|
3200 |
+
|
3201 |
if ( in_array( $output_parameters[0], array( 'list', 'ulist', 'olist', 'dlist' ) ) ) {
|
3202 |
if ( ( 'dlist' == $output_parameters[0] ) || ('list' == $output_parameters[0] && 'dd' == $arguments['captiontag'] ) ) {
|
3203 |
$template = 'term-list-dl';
|
3211 |
}
|
3212 |
}
|
3213 |
|
3214 |
+
// Apply default arguments set in the markup template
|
|
|
|
|
3215 |
$arguments = MLATemplate_Support::mla_fetch_custom_template( $template, 'term-list', 'markup', 'arguments' );
|
3216 |
if ( !empty( $arguments ) ) {
|
3217 |
$attr = wp_parse_args( $attr, self::_validate_attributes( array(), $arguments ) );
|
3218 |
}
|
3219 |
|
3220 |
+
// Adjust data selection arguments; remove pagination-specific arguments
|
|
|
|
|
3221 |
unset( $attr['limit'] );
|
3222 |
unset( $attr['offset'] );
|
3223 |
|
3275 |
if ( !in_array( $arguments['hierarchical'], array( 'true', 'combine' ) ) ) {
|
3276 |
$arguments['hierarchical'] = 'false';
|
3277 |
}
|
3278 |
+
|
3279 |
self::$mla_debug = ( ! empty( $arguments['mla_debug'] ) ) ? trim( strtolower( $arguments['mla_debug'] ) ) : false;
|
3280 |
if ( self::$mla_debug ) {
|
3281 |
if ( 'true' == self::$mla_debug ) {
|
3293 |
MLACore::mla_debug_add( __LINE__ . ' <strong>' . __( 'mla_debug arguments', 'media-library-assistant' ) . '</strong> = ' . var_export( $arguments, true ) );
|
3294 |
}
|
3295 |
|
3296 |
+
// Determine templates and output type
|
|
|
|
|
3297 |
if ( $arguments['mla_style'] && ( 'none' !== $arguments['mla_style'] ) ) {
|
3298 |
if ( !MLATemplate_Support::mla_fetch_custom_template( $arguments['mla_style'], 'term-list', 'style', '[exists]' ) ) {
|
3299 |
MLACore::mla_debug_add( '<strong>mla_term_list mla_style</strong> "' . $arguments['mla_style'] . '" ' . __( 'not found', 'media-library-assistant' ), MLACore::MLA_DEBUG_CATEGORY_ANY );
|
3316 |
|
3317 |
$default_style = 'term-list';
|
3318 |
$default_markup = 'term-list-ul';
|
3319 |
+
|
3320 |
if ( $is_list = in_array( $output_parameters[0], array( 'list', 'ulist', 'olist', 'dlist' ) ) ) {
|
3321 |
|
3322 |
if ( 'list' == $output_parameters[0] && 'dd' == $arguments['captiontag'] ) {
|
3371 |
$is_hierarchical = !( 'false' === $arguments['hierarchical'] );
|
3372 |
$combine_hierarchical = 'combine' === $arguments['hierarchical'];
|
3373 |
|
3374 |
+
// Convert lists to arrays
|
|
|
|
|
3375 |
if ( is_string( $arguments['taxonomy'] ) ) {
|
3376 |
$arguments['taxonomy'] = explode( ',', $arguments['taxonomy'] );
|
3377 |
}
|
3397 |
$arguments['exclude'] = $exclude_later;
|
3398 |
}
|
3399 |
|
3400 |
+
// Invalid taxonomy names return WP_Error
|
|
|
|
|
3401 |
if ( is_wp_error( $tags ) ) {
|
3402 |
$list = '<strong>' . __( 'ERROR', 'media-library-assistant' ) . ': ' . $tags->get_error_message() . '</strong>, ' . $tags->get_error_data( $tags->get_error_code() );
|
3403 |
|
3413 |
return;
|
3414 |
}
|
3415 |
|
3416 |
+
// Fill in the item_specific link properties, calculate list parameters
|
|
|
|
|
3417 |
if ( isset( $tags['found_rows'] ) ) {
|
3418 |
$found_rows = $tags['found_rows'];
|
3419 |
unset( $tags['found_rows'] );
|
3463 |
$option_none_id = -1;
|
3464 |
$option_none_slug = sanitize_title( $arguments['option_none_text'] );
|
3465 |
}
|
3466 |
+
|
3467 |
$tags[0] = ( object ) array(
|
3468 |
'term_id' => $option_none_id,
|
3469 |
'name' => $arguments['option_none_text'],
|
3521 |
$option_all_id = 0;
|
3522 |
$option_all_slug = 'all';
|
3523 |
}
|
3524 |
+
|
3525 |
if ( $is_hierarchical ) {
|
3526 |
$tags = self::_get_term_tree( $tags, $arguments );
|
3527 |
|
3580 |
} // foreach tag
|
3581 |
}
|
3582 |
}
|
3583 |
+
|
3584 |
if ( $add_all_option ) {
|
3585 |
$found_rows += 1;
|
3586 |
}
|
3631 |
|
3632 |
$list .= $gallery_style;
|
3633 |
$markup_values = $style_values;
|
3634 |
+
|
3635 |
if ( empty( $arguments['mla_control_name'] ) ) {
|
3636 |
$mla_control_name = 'tax_input[[+taxonomy+]][]';
|
3637 |
} else {
|
3642 |
$tag_links = array();
|
3643 |
|
3644 |
if ( $is_hierarchical ) {
|
3645 |
+
|
3646 |
if ( $combine_hierarchical ) {
|
3647 |
$combined_tags = array();
|
3648 |
foreach( $tags as $taxonomy => $root_terms ) {
|
3672 |
'term_link' => '',
|
3673 |
'link' => '',
|
3674 |
);
|
3675 |
+
|
3676 |
array_unshift( $root_terms, $option_all );
|
3677 |
$add_to_found_rows = 1;
|
3678 |
} else {
|
3692 |
}
|
3693 |
} else {
|
3694 |
$markup_values['thename'] = self::_process_shortcode_parameter( $mla_control_name, $markup_values );
|
3695 |
+
|
3696 |
// Add the optional 'all-terms' option, if requested
|
3697 |
if ( $add_all_option ) {
|
3698 |
$option_all = ( object ) array(
|
3710 |
'term_link' => '',
|
3711 |
'link' => '',
|
3712 |
);
|
3713 |
+
|
3714 |
array_unshift( $tags, $option_all );
|
3715 |
}
|
3716 |
|
3745 |
*/
|
3746 |
$attr = self::_validate_attributes( $attr, $content );
|
3747 |
|
3748 |
+
// The 'array' format makes no sense in a shortcode
|
|
|
|
|
3749 |
if ( isset( $attr['mla_output'] ) && 'array' == $attr['mla_output'] ) {
|
3750 |
$attr['mla_output'] = 'flat';
|
3751 |
}
|
3752 |
|
3753 |
+
// A shortcode must return its content to the caller, so "echo" makes no sense
|
|
|
|
|
3754 |
$attr['echo'] = false;
|
3755 |
|
3756 |
if ( !empty( $attr['mla_output'] ) ) {
|
4102 |
}
|
4103 |
|
4104 |
$markup_values['new_url'] = set_url_scheme( $markup_values['scheme'] . $markup_values['http_host'] . $markup_values['request_uri'] );
|
4105 |
+
$markup_values = apply_filters( 'mla_gallery_pagination_values', $markup_values );
|
4106 |
|
4107 |
/*
|
4108 |
* Expand pagination-specific Gallery Display Content parameters,
|
4297 |
if ( isset( $matches[2] ) ) {
|
4298 |
$matches[2] = strtoupper( $matches[2] );
|
4299 |
}
|
4300 |
+
|
4301 |
if ( array_key_exists( $matches[1], $allowed_keys ) ) {
|
4302 |
if ( ( 'rand' == $matches[1] ) || ( 'random' == $matches[1] ) ){
|
4303 |
$results[] = 'RAND()';
|
4317 |
$matches[1] = $table_prefix . $allowed_keys[ $matches[1] ];
|
4318 |
}
|
4319 |
} // switch $matches[1]
|
4320 |
+
|
4321 |
$results[] = isset( $matches[2] ) ? $matches[1] . $matches[2] : $matches[1] . $order;
|
4322 |
} // not 'rand'
|
4323 |
} // allowed key
|
4430 |
// 'tax_operator' => 'OR' (default), 'IN', 'NOT IN', 'AND',
|
4431 |
// 'tax_include_children' => true (default), false
|
4432 |
);
|
4433 |
+
|
4434 |
/**
|
4435 |
* Parses shortcode parameters and returns the gallery objects
|
4436 |
*
|
4472 |
if ( isset( $attr['where_used_query'] ) && ( 'this-is-a-where-used-query' == $attr['where_used_query'] ) ) {
|
4473 |
$where_used_query = true;
|
4474 |
unset( $attr['where_used_query'] );
|
4475 |
+
|
4476 |
// remove pagination parameters to get a complete result
|
4477 |
$attr['nopaging'] = true;
|
4478 |
unset( $attr['numberposts'] );
|
4483 |
unset( $attr['mla_paginate_current'] );
|
4484 |
unset( $attr['mla_page_parameter'] );
|
4485 |
unset( $attr['mla_paginate_total'] );
|
4486 |
+
|
4487 |
// There's no point in sorting the items
|
4488 |
$attr['orderby'] = 'none';
|
4489 |
} else {
|
4535 |
*/
|
4536 |
self::$mla_get_shortcode_dynamic_attachments_parameters = array();
|
4537 |
$query_arguments = array();
|
4538 |
+
$no_terms_assigned_query = false;
|
4539 |
if ( ! empty( $attr ) ) {
|
4540 |
$all_taxonomies = get_taxonomies( array ( 'show_ui' => true ), 'names' );
|
4541 |
$simple_tax_queries = array();
|
4559 |
} catch ( Exception $e ) { // PHP 5
|
4560 |
$function = NULL;
|
4561 |
}
|
4562 |
+
|
4563 |
if ( is_callable( $function ) ) {
|
4564 |
$tax_query = $function();
|
4565 |
} else {
|
4568 |
}
|
4569 |
|
4570 |
if ( is_array( $tax_query ) ) {
|
4571 |
+
// Check for no.terms.assigned
|
4572 |
+
foreach ( $tax_query as $tax_query_key => $tax_query_element ) {
|
4573 |
+
if ( !is_array( $tax_query_element ) ) {
|
4574 |
+
continue;
|
4575 |
+
}
|
4576 |
+
|
4577 |
+
if ( isset( $tax_query_element['taxonomy'] ) ) {
|
4578 |
+
$tax_query_taxonomy = $tax_query_element['taxonomy'];
|
4579 |
+
} else {
|
4580 |
+
continue;
|
4581 |
+
}
|
4582 |
+
|
4583 |
+
if ( isset( $tax_query_element['terms'] ) && is_array( $tax_query_element['terms'] ) && in_array( 'no.terms.assigned', $tax_query_element['terms'] ) ) {
|
4584 |
+
$tax_query[ $tax_query_key ]['terms'] = get_terms( $tax_query_taxonomy, array(
|
4585 |
+
'fields' => 'ids',
|
4586 |
+
'hide_empty' => false
|
4587 |
+
) );
|
4588 |
+
}
|
4589 |
+
}
|
4590 |
+
|
4591 |
$query_arguments[ $key ] = $tax_query;
|
4592 |
self::$mla_get_shortcode_dynamic_attachments_parameters[ $key ] = $value;
|
4593 |
break; // Done - the tax_query overrides all other taxonomy parameters
|
4607 |
} // valid taxonomy
|
4608 |
} // valid coumpound value
|
4609 |
} // foreach compound_value
|
4610 |
+
|
4611 |
foreach( $tax_queries as $key => $value ) {
|
4612 |
$simple_tax_queries[ $key ] = implode(',', $value );
|
4613 |
}
|
4614 |
} // tax_input
|
4615 |
elseif ( array_key_exists( $key, $all_taxonomies ) ) {
|
4616 |
$simple_tax_queries[ $key ] = implode(',', array_filter( array_map( 'trim', explode( ',', $value ) ) ) );
|
4617 |
+
if ( 'no.terms.assigned' === $simple_tax_queries[ $key ] ) {
|
4618 |
+
$no_terms_assigned_query = true;
|
4619 |
+
}
|
4620 |
} // array_key_exists
|
4621 |
} //foreach $attr
|
4622 |
|
4630 |
*/
|
4631 |
if ( isset( $query_arguments['tax_query'] ) || empty( $simple_tax_queries ) ) {
|
4632 |
// No further action required
|
4633 |
+
} elseif ( ( 1 < count( $simple_tax_queries ) ) || isset( $attr['tax_operator'] ) || isset( $attr['tax_include_children'] ) || $no_terms_assigned_query ) {
|
4634 |
// Build a tax_query
|
4635 |
if ( 1 < count( $simple_tax_queries ) ) {
|
4636 |
$tax_relation = 'AND';
|
4664 |
if ( empty( $value ) ) {
|
4665 |
continue;
|
4666 |
}
|
4667 |
+
|
4668 |
+
if ( 'no.terms.assigned' === $value ) {
|
4669 |
+
$term_list = get_terms( $key, array(
|
4670 |
+
'fields' => 'ids',
|
4671 |
+
'hide_empty' => false
|
4672 |
+
) );
|
4673 |
+
|
4674 |
+
$tax_query[] = array(
|
4675 |
+
'taxonomy' => $key,
|
4676 |
+
'field' => 'id',
|
4677 |
+
'terms' => $term_list,
|
4678 |
+
'operator' => 'NOT IN'
|
4679 |
+
);
|
4680 |
+
|
4681 |
+
continue;
|
4682 |
+
}
|
4683 |
+
|
4684 |
$tax_query[] = array( 'taxonomy' => $key, 'field' => 'slug', 'terms' => explode( ',', $value ), 'operator' => $tax_operator, 'include_children' => $tax_include_children );
|
4685 |
}
|
4686 |
|
4986 |
} catch ( Exception $e ) { // PHP 5
|
4987 |
$function = NULL;
|
4988 |
}
|
4989 |
+
|
4990 |
if ( is_callable( $function ) ) {
|
4991 |
$date_query = $function();
|
4992 |
} else {
|
5023 |
} catch ( Exception $e ) { // PHP 5
|
5024 |
$function = NULL;
|
5025 |
}
|
5026 |
+
|
5027 |
if ( is_callable( $function ) ) {
|
5028 |
$meta_query = $function();
|
5029 |
} else {
|
5083 |
MLACore::mla_debug_add( '<strong>mla_debug is_archive()</strong> = ' . var_export( is_archive(), true ) );
|
5084 |
MLACore::mla_debug_add( '<strong>mla_debug is_search()</strong> = ' . var_export( is_search(), true ) );
|
5085 |
}
|
5086 |
+
|
5087 |
if ( isset( $query_arguments['posts_per_archive_page'] ) && ( is_archive() || is_search() ) ) {
|
5088 |
$query_arguments['posts_per_page'] = $query_arguments['posts_per_archive_page'];
|
5089 |
}
|
5296 |
$attachments['found_rows'] = absint( MLAShortcodes::$mla_gallery_wp_query_object->found_posts );
|
5297 |
$attachments['max_num_pages'] = absint( MLAShortcodes::$mla_gallery_wp_query_object->max_num_pages );
|
5298 |
}
|
5299 |
+
|
5300 |
$filtered_attachments = apply_filters_ref_array( 'mla_gallery_the_attachments', array( NULL, &$attachments ) ) ;
|
5301 |
if ( !is_null( $filtered_attachments ) ) {
|
5302 |
$attachments = $filtered_attachments;
|
5575 |
public static function mla_get_terms( $attr ) {
|
5576 |
global $wpdb;
|
5577 |
|
5578 |
+
// Make sure $attr is an array, even if it's empty
|
|
|
|
|
5579 |
if ( empty( $attr ) ) {
|
5580 |
$attr = array();
|
5581 |
} elseif ( is_string( $attr ) ) {
|
5589 |
$arguments = shortcode_atts( self::$mla_get_terms_parameters, $attr );
|
5590 |
$arguments = apply_filters( 'mla_get_terms_query_arguments', $arguments );
|
5591 |
|
5592 |
+
// Build an array of individual clauses that can be filtered
|
|
|
|
|
5593 |
$clauses = array( 'fields' => '', 'join' => '', 'where' => '', 'orderby' => '', 'limits' => '', );
|
5594 |
|
5595 |
/*
|
5621 |
$clause[] = 'LEFT JOIN `' . $wpdb->term_relationships . '` AS tr ON tt.term_taxonomy_id = tr.term_taxonomy_id';
|
5622 |
$clause[] = 'LEFT JOIN `' . $wpdb->posts . '` AS p ON tr.object_id = p.ID';
|
5623 |
|
5624 |
+
// Add type and status constraints
|
|
|
|
|
5625 |
if ( is_array( $arguments['post_type'] ) ) {
|
5626 |
$post_types = $arguments['post_type'];
|
5627 |
} else {
|
5654 |
}
|
5655 |
|
5656 |
$clause = join(' ', $clause);
|
5657 |
+
if ( !empty( $clause_parameters ) ) {
|
5658 |
+
$clauses['join'] = $wpdb->prepare( $clause, $clause_parameters );
|
5659 |
+
} else {
|
5660 |
+
$clauses['join'] = $clause;
|
5661 |
+
}
|
5662 |
|
5663 |
+
// Start WHERE clause with a taxonomy constraint
|
|
|
|
|
5664 |
if ( is_array( $arguments['taxonomy'] ) ) {
|
5665 |
$taxonomies = $arguments['taxonomy'];
|
5666 |
} else {
|
5704 |
} // taxonomies
|
5705 |
} // ids
|
5706 |
|
5707 |
+
// If there are no terms we want an empty cloud
|
|
|
|
|
5708 |
if ( empty( $includes ) ) {
|
5709 |
$arguments['include'] = (string) 0x7FFFFFFF;
|
5710 |
} else {
|
5713 |
}
|
5714 |
}
|
5715 |
|
5716 |
+
// Add include/exclude and parent constraints to WHERE cluse
|
|
|
|
|
5717 |
if ( ! empty( $arguments['include'] ) ) {
|
5718 |
$placeholders = implode( "','", wp_parse_id_list( $arguments['include'] ) );
|
5719 |
$clause[] = "AND t.term_id IN ( '{$placeholders}' )";
|
5738 |
}
|
5739 |
|
5740 |
$clause = join(' ', $clause);
|
5741 |
+
if ( !empty( $clause_parameters ) ) {
|
5742 |
+
$clauses['where'] = $wpdb->prepare( $clause, $clause_parameters );
|
5743 |
+
} else {
|
5744 |
+
$clauses['where'] = $clause;
|
5745 |
+
}
|
5746 |
|
5747 |
+
// For the inner/initial query, always select the most popular terms
|
|
|
|
|
5748 |
if ( $no_orderby = 'true' == (string) $arguments['no_orderby'] ) {
|
5749 |
$arguments['orderby'] = 'count';
|
5750 |
$arguments['order'] = 'DESC';
|
5751 |
}
|
5752 |
|
5753 |
+
// Add sort order
|
5754 |
+
if ( 'none' !== strtolower( $arguments['orderby'] ) ) {
|
5755 |
+
if ( 'true' == strtolower( $arguments['preserve_case'] ) ) {
|
5756 |
+
$binary_keys = array( 'name', 'slug', );
|
5757 |
+
} else {
|
5758 |
+
$binary_keys = array();
|
5759 |
+
}
|
5760 |
+
|
5761 |
+
$allowed_keys = array(
|
5762 |
+
'empty_orderby_default' => 'name',
|
5763 |
+
'count' => 'count',
|
5764 |
+
'id' => 'term_id',
|
5765 |
+
'name' => 'name',
|
5766 |
+
'random' => 'RAND()',
|
5767 |
+
'slug' => 'slug',
|
5768 |
+
);
|
5769 |
+
|
5770 |
+
$clauses['orderby'] = 'ORDER BY ' . self::_validate_sql_orderby( $arguments, '', $allowed_keys, $binary_keys );
|
5771 |
} else {
|
5772 |
+
$clauses['orderby'] = '';
|
5773 |
}
|
5774 |
|
5775 |
+
// Add pagination
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5776 |
$clauses['limits'] = '';
|
5777 |
$offset = absint( $arguments['offset'] );
|
5778 |
$limit = absint( $arguments['limit'] );
|
5787 |
|
5788 |
$clauses = apply_filters( 'mla_get_terms_clauses', $clauses );
|
5789 |
|
5790 |
+
// Build the final query
|
|
|
|
|
5791 |
$query = array( 'SELECT' );
|
5792 |
$query[] = $clauses['fields'];
|
5793 |
$query[] = 'FROM `' . $wpdb->terms . '` AS t';
|
5802 |
}
|
5803 |
|
5804 |
/*
|
5805 |
+
* Unless specifically told to omit the ORDER BY clause or the COUNT,
|
5806 |
* supply a sort order for the initial/inner query only
|
5807 |
*/
|
5808 |
if ( ! ( $no_orderby || $no_count ) ) {
|
5809 |
$query[] = 'ORDER BY count DESC, t.term_id ASC';
|
5810 |
}
|
5811 |
|
5812 |
+
// Limit the total number of terms returned
|
|
|
|
|
5813 |
$terms_limit = absint( $arguments['number'] );
|
5814 |
if ( 0 < $terms_limit ) {
|
5815 |
$query[] = "LIMIT {$terms_limit}";
|
5816 |
}
|
5817 |
|
5818 |
+
// $final_clauses, if present, require an SQL subquery
|
|
|
|
|
5819 |
$final_clauses = array();
|
5820 |
|
5821 |
+
if ( !empty( $clauses['orderby'] ) && 'ORDER BY count DESC' != $clauses['orderby'] ) {
|
5822 |
$final_clauses[] = $clauses['orderby'];
|
5823 |
}
|
5824 |
|
5826 |
$final_clauses[] = $clauses['limits'];
|
5827 |
}
|
5828 |
|
5829 |
+
// If we're limiting the final results, we need to get an accurate total count first
|
|
|
|
|
5830 |
if ( ! $no_count && ( 0 < $offset || 0 < $limit ) ) {
|
5831 |
$count_query = 'SELECT COUNT(*) as count FROM (' . join(' ', $query) . ' ) as subQuery';
|
5832 |
$count = $wpdb->get_results( $count_query );
|
includes/class-mla-thumbnail-generation.php
CHANGED
@@ -566,7 +566,10 @@ class MLA_Thumbnail {
|
|
566 |
* @return array updated array of actions.
|
567 |
*/
|
568 |
public static function mla_list_table_get_bulk_actions( $actions ) {
|
569 |
-
$
|
|
|
|
|
|
|
570 |
return $actions;
|
571 |
} // mla_list_table_get_bulk_actions
|
572 |
|
566 |
* @return array updated array of actions.
|
567 |
*/
|
568 |
public static function mla_list_table_get_bulk_actions( $actions ) {
|
569 |
+
if ( !( isset( $_REQUEST['status'] ) && $_REQUEST['status'] == 'trash' ) ) {
|
570 |
+
$actions[self::MLA_GFI_ACTION] = __( 'Thumbnail', 'media-library-assistant' );
|
571 |
+
}
|
572 |
+
|
573 |
return $actions;
|
574 |
} // mla_list_table_get_bulk_actions
|
575 |
|
includes/class-mla-wpml-support.php
CHANGED
@@ -26,71 +26,52 @@ class MLA_WPML {
|
|
26 |
* @return void
|
27 |
*/
|
28 |
public static function initialize() {
|
29 |
-
|
30 |
-
* These filters are only useful for the admin section; exit in the front-end posts/pages
|
31 |
-
*/
|
32 |
if ( ! is_admin() ) {
|
33 |
return;
|
34 |
}
|
35 |
|
36 |
-
|
37 |
-
* Defined in /wp-admin/admin.php
|
38 |
-
*/
|
39 |
add_action( 'admin_init', 'MLA_WPML::admin_init' );
|
40 |
|
41 |
-
|
42 |
-
* Defined in wp-admin/edit-form-advanced.php
|
43 |
-
*/
|
44 |
add_filter( 'post_updated_messages', 'MLA_WPML::post_updated_messages', 10, 1 );
|
45 |
|
46 |
-
|
47 |
-
* Defined in wp-admin/includes/post.php function edit_post
|
48 |
-
*/
|
49 |
add_filter( 'attachment_fields_to_save', 'MLA_WPML::attachment_fields_to_save', 10, 2 );
|
50 |
|
51 |
-
|
52 |
-
* Defined in wp-includes/post.php function wp_insert_post
|
53 |
-
*/
|
54 |
add_action( 'edit_attachment', 'MLA_WPML::edit_attachment', 10, 1 );
|
55 |
|
56 |
-
|
57 |
-
* Defined in /media-library-assistant/includes/class-mla-data.php
|
58 |
-
*/
|
59 |
add_action( 'mla_updated_single_item', 'MLA_WPML::mla_updated_single_item', 10, 2 );
|
60 |
|
61 |
-
|
62 |
-
* Defined in /media-library-assistant/includes/class-mla-edit-media.php
|
63 |
-
*/
|
64 |
add_filter( 'mla_upload_bulk_edit_form_values', 'MLA_WPML::mla_upload_bulk_edit_form_values', 10, 1 );
|
65 |
|
66 |
-
|
67 |
-
* Defined in /media-library-assistant/includes/class-mla-media-modal.php
|
68 |
-
*/
|
69 |
add_action( 'mla_media_modal_begin_update_compat_fields', 'MLA_WPML::mla_media_modal_begin_update_compat_fields', 10, 1 );
|
70 |
add_filter( 'mla_media_modal_update_compat_fields_terms', 'MLA_WPML::mla_media_modal_update_compat_fields_terms', 10, 4 );
|
71 |
add_filter( 'mla_media_modal_end_update_compat_fields', 'MLA_WPML::mla_media_modal_end_update_compat_fields', 10, 3 );
|
72 |
|
73 |
-
|
74 |
-
|
75 |
-
|
|
|
76 |
add_filter( 'mla_list_table_new_instance', 'MLA_WPML_Table::mla_list_table_new_instance', 10, 1 );
|
77 |
add_action( 'mla_list_table_custom_admin_action', 'MLA_WPML::mla_list_table_custom_admin_action', 10, 2 );
|
78 |
add_filter( 'mla_list_table_inline_action', 'MLA_WPML::mla_list_table_inline_action', 10, 2 );
|
79 |
add_filter( 'mla_list_table_bulk_action_initial_request', 'MLA_WPML::mla_list_table_bulk_action_initial_request', 10, 3 );
|
80 |
add_filter( 'mla_list_table_bulk_action_item_request', 'MLA_WPML::mla_list_table_bulk_action_item_request', 10, 4 );
|
81 |
|
82 |
-
|
83 |
-
* Defined in /media-library-assistant/includes/class-mla-settings.php
|
84 |
-
*/
|
85 |
add_filter( 'mla_get_options_tablist', 'MLA_WPML::mla_get_options_tablist', 10, 3 );
|
86 |
add_action( 'mla_begin_mapping', 'MLA_WPML::mla_begin_mapping', 10, 2 );
|
87 |
add_filter( 'mla_mapping_new_text', 'MLA_WPML::mla_mapping_new_text', 10, 5 );
|
88 |
add_action( 'mla_end_mapping', 'MLA_WPML::mla_end_mapping', 10, 0 );
|
89 |
add_filter( 'mla_update_attachment_metadata_postfilter', 'MLA_WPML::mla_update_attachment_metadata_postfilter', 10, 3 );
|
90 |
|
91 |
-
|
92 |
-
* Defined in /wpml-media/inc/wpml-media-class.php
|
93 |
-
*/
|
94 |
add_action( 'wpml_media_create_duplicate_attachment', 'MLA_WPML::wpml_media_create_duplicate_attachment', 10, 2 );
|
95 |
}
|
96 |
|
@@ -169,6 +150,31 @@ class MLA_WPML {
|
|
169 |
}
|
170 |
}
|
171 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
172 |
/**
|
173 |
* Captures the existing term assignments before the
|
174 |
* Media Manager Modal Window ATTACHMENT DETAILS taxonomy meta boxes updates
|
@@ -207,7 +213,7 @@ class MLA_WPML {
|
|
207 |
$tax_inputs = array( $key => implode( ',', $terms ) );
|
208 |
}
|
209 |
|
210 |
-
self::_build_tax_input( $post_id, $tax_inputs );
|
211 |
$tax_inputs = self::_apply_tax_input( $post_id );
|
212 |
$terms = $tax_inputs[ $key ];
|
213 |
} // term_assignment
|
@@ -268,7 +274,7 @@ class MLA_WPML {
|
|
268 |
|
269 |
if ( 'checked' == MLACore::mla_get_option( 'term_assignment', false, false, MLA_WPML::$mla_language_option_definitions ) ) {
|
270 |
// Quick Edit calls update_single_item right after this filter
|
271 |
-
self::_build_tax_input( $post_id, $_REQUEST['tax_input'] );
|
272 |
$_REQUEST['tax_input'] = self::_apply_tax_input( $post_id );
|
273 |
}
|
274 |
|
@@ -356,7 +362,7 @@ class MLA_WPML {
|
|
356 |
*/
|
357 |
if ( 'edit' == $bulk_action && ( ! empty( self::$bulk_edit_request['tax_input'] ) ) && ( 'checked' == MLACore::mla_get_option( 'term_assignment', false, false, MLA_WPML::$mla_language_option_definitions ) ) ) {
|
358 |
self::_build_existing_terms( $post_id );
|
359 |
-
self::_build_tax_input( $post_id, self::$bulk_edit_request['tax_input'], self::$bulk_edit_request['tax_action'] );
|
360 |
$request['tax_input'] = self::_apply_tax_input( $post_id );
|
361 |
foreach( self::$bulk_edit_request['tax_action'] as $taxonomy => $action ) {
|
362 |
// _apply_tax_input changes a remove to a replace
|
@@ -440,7 +446,6 @@ class MLA_WPML {
|
|
440 |
* @param mixed Attachment ID or NULL, depending on scope
|
441 |
*/
|
442 |
public static function mla_begin_mapping( $source, $post_id = NULL ) {
|
443 |
-
//error_log( __LINE__ . ' MLA_WPML::mla_begin_mapping $source = ' . var_export( $source, true ), 0 );
|
444 |
if ( in_array( $source, array( 'create_metadata', 'single_iptc_exif', 'iptc_exif_standard', 'iptc_exif_taxonomy', 'iptc_exif_custom', 'iptc_exif_custom_rule' ) ) ) {
|
445 |
/*
|
446 |
* Defined in /sitepress-multilingual-cms/sitepress.class.php
|
@@ -461,7 +466,6 @@ class MLA_WPML {
|
|
461 |
* @param array attachment_metadata, default NULL
|
462 |
*/
|
463 |
public static function mla_mapping_rule( $setting_value, $post_id, $category, $attachment_metadata ) {
|
464 |
-
//error_log( __LINE__ . ' MLA_WPML::mla_mapping_rule $setting_value = ' . var_export( $setting_value, true ), 0 );
|
465 |
return self::$current_mapping_rule = $setting_value;
|
466 |
} // mla_mapping_rule
|
467 |
|
@@ -497,32 +501,17 @@ class MLA_WPML {
|
|
497 |
|
498 |
if ( is_null( $replicate ) ) {
|
499 |
$replicate = ( 'checked' == MLACore::mla_get_option( 'term_mapping_replication', false, false, MLA_WPML::$mla_language_option_definitions ) );
|
500 |
-
//error_log( __LINE__ . ' MLA_WPML::mla_mapping_new_text $replicate = ' . var_export( $replicate, true ), 0 );
|
501 |
-
//$term_utils = new WPML_Terms_Translations();
|
502 |
-
|
503 |
$current_language = $sitepress->get_current_language();
|
504 |
-
//error_log( __LINE__ . ' MLA_WPML::mla_mapping_new_text $current_language = ' . var_export( $current_language, true ), 0 );
|
505 |
$taxonomies = $sitepress->get_translatable_taxonomies( true, 'attachment' );
|
506 |
-
|
507 |
-
|
508 |
-
unset( $other_languages[ $current_language ] );
|
509 |
-
//error_log( __LINE__ . ' MLA_WPML::mla_mapping_new_text $other_languages = ' . var_export( $other_languages, true ), 0 );
|
510 |
}
|
511 |
|
512 |
if ( ( ! empty( $new_text ) ) && in_array( $setting_key, $taxonomies ) ) {
|
513 |
-
//error_log( __LINE__ . ' MLA_WPML::mla_mapping_new_text mapping rule = ' . var_export( self::$current_mapping_rule, true ), 0 );
|
514 |
-
//error_log( __LINE__ . ' MLA_WPML::mla_mapping_new_text $new_text = ' . var_export( $new_text, true ), 0 );
|
515 |
-
//error_log( __LINE__ . ' MLA_WPML::mla_mapping_new_text $setting_key = ' . var_export( $setting_key, true ), 0 );
|
516 |
-
//error_log( __LINE__ . ' MLA_WPML::mla_mapping_new_text $post_id = ' . var_export( $post_id, true ), 0 );
|
517 |
-
//error_log( __LINE__ . ' MLA_WPML::mla_mapping_new_text $category = ' . var_export( $category, true ), 0 );
|
518 |
-
//error_log( __LINE__ . ' MLA_WPML::mla_mapping_new_text $attachment_metadata = ' . var_export( $attachment_metadata, true ), 0 );
|
519 |
$language_details = $sitepress->get_element_language_details( $post_id, 'post_attachment' );
|
520 |
$item_language = $language_details->language_code;
|
521 |
-
//error_log( __LINE__ . ' MLA_WPML::mla_mapping_new_text $language_details = ' . var_export( $language_details, true ), 0 );
|
522 |
|
523 |
-
|
524 |
-
* Find the parent term and its translations
|
525 |
-
*/
|
526 |
if ( isset( self::$current_mapping_rule['parent'] ) ) {
|
527 |
if ( $parent_term = absint( self::$current_mapping_rule['parent'] ) ) {
|
528 |
$parent_term = self::_get_relevant_term( 'id', $parent_term, $setting_key );
|
@@ -531,27 +520,21 @@ class MLA_WPML {
|
|
531 |
$parent_term = 0;
|
532 |
}
|
533 |
|
534 |
-
//error_log( __LINE__ . ' MLA_WPML::mla_mapping_new_text $parent_term = ' . var_export( $parent_term, true ), 0 );
|
535 |
-
|
536 |
$new_terms = array();
|
537 |
foreach( $new_text as $new_name ) {
|
538 |
$relevant_term = self::_get_relevant_term( 'name', $new_name, $setting_key );
|
539 |
-
//error_log( __LINE__ . ' MLA_WPML::mla_mapping_new_text $relevant_term = ' . var_export( $relevant_term, true ), 0 );
|
540 |
|
541 |
if ( $relevant_term ) {
|
542 |
if ( isset( $relevant_term['translations'][ $item_language ] ) ) {
|
543 |
$new_terms[] = absint( $relevant_term['translations'][ $item_language ]->term_id );
|
544 |
}
|
545 |
} else {
|
546 |
-
|
547 |
-
* Always create the new term in the current language
|
548 |
-
*/
|
549 |
if ( $parent_term && isset( $parent_term['translations'][ $current_language ] ) ) {
|
550 |
$parent = $parent_term['translations'][ $current_language ]->term_id;
|
551 |
} else {
|
552 |
$parent = 0;
|
553 |
}
|
554 |
-
//error_log( __LINE__ . ' MLA_Polylang::mla_mapping_new_text $parent = ' . var_export( $parent, true ), 0 );
|
555 |
|
556 |
$args = array(
|
557 |
'taxonomy' => $setting_key,
|
@@ -561,16 +544,11 @@ class MLA_WPML {
|
|
561 |
);
|
562 |
|
563 |
$res = WPML_Terms_Translations::create_new_term( $args );
|
564 |
-
//error_log( __LINE__ . ' MLA_WPML::mla_mapping_new_text $res = ' . var_export( $res, true ), 0 );
|
565 |
|
566 |
-
|
567 |
-
* Add translations in the other languages?
|
568 |
-
*/
|
569 |
if ( $replicate ) {
|
570 |
$trid = $sitepress->get_element_trid( $res['term_taxonomy_id'], 'tax_' . $setting_key );
|
571 |
-
//error_log( __LINE__ . ' MLA_WPML::mla_mapping_new_text $trid = ' . var_export( $trid, true ), 0 );
|
572 |
$original_term = get_term( $res['term_id'], $setting_key, OBJECT, 'no' );
|
573 |
-
//error_log( __LINE__ . ' MLA_WPML::mla_mapping_new_text $original_term = ' . var_export( $original_term, true ), 0 );
|
574 |
$args = array( 'trid' => $trid, 'source_language' => $current_language, 'term' => $new_name, 'original_id' => $res['term_id'], 'original_tax_id' => $res['term_taxonomy_id'], 'taxonomy' => $setting_key, 'update_translations' => true );
|
575 |
foreach( $other_languages as $language => $language_details ) {
|
576 |
if ( $parent_term && isset( $parent_term['translations'][ $language ] ) ) {
|
@@ -578,29 +556,22 @@ class MLA_WPML {
|
|
578 |
} else {
|
579 |
$parent = 0;
|
580 |
}
|
581 |
-
//error_log( __LINE__ . ' MLA_Polylang::mla_mapping_new_text $parent = ' . var_export( $parent, true ), 0 );
|
582 |
|
583 |
$translated_slug = apply_filters( 'icl_duplicate_generic_string',
|
584 |
$original_term->slug,
|
585 |
$language,
|
586 |
array( 'context' => 'taxonomy_slug', 'attribute' => $setting_key, 'key' => $original_term->term_id ) );
|
587 |
$translated_slug = WPML_Terms_Translations::term_unique_slug( $translated_slug, $setting_key, $language );
|
588 |
-
//error_log( __LINE__ . ' MLA_Polylang::mla_mapping_new_text $translated_slug = ' . var_export( $translated_slug, true ), 0 );
|
589 |
|
590 |
$args['slug'] = $translated_slug;
|
591 |
$args['parent'] = $parent;
|
592 |
$args['lang_code'] = $language;
|
593 |
-
//error_log( __LINE__ . ' MLA_WPML::mla_mapping_new_text $args = ' . var_export( $args, true ), 0 );
|
594 |
$res = WPML_Terms_Translations::create_new_term( $args );
|
595 |
-
//error_log( __LINE__ . ' MLA_WPML::mla_mapping_new_text $res = ' . var_export( $res, true ), 0 );
|
596 |
}
|
597 |
} // replicate
|
598 |
|
599 |
-
|
600 |
-
* Reload the term with all of its new translations
|
601 |
-
*/
|
602 |
$relevant_term = self::_get_relevant_term( 'name', $new_name, $setting_key, NULL, false, true );
|
603 |
-
//error_log( __LINE__ . ' MLA_WPML::mla_mapping_new_text $relevant_term = ' . var_export( $relevant_term, true ), 0 );
|
604 |
if ( isset( $relevant_term['translations'][ $item_language ] ) ) {
|
605 |
$new_terms[] = absint( $relevant_term['translations'][ $item_language ]->term_id );
|
606 |
}
|
@@ -637,6 +608,51 @@ class MLA_WPML {
|
|
637 |
*/
|
638 |
private static $relevant_terms = array();
|
639 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
640 |
/**
|
641 |
* Adds a term and its translations to $relevant_terms
|
642 |
*
|
@@ -648,9 +664,8 @@ class MLA_WPML {
|
|
648 |
* @param boolean Ignore the Sitepress terms cache; optional
|
649 |
*/
|
650 |
private static function _add_relevant_term( $term, $translations = NULL, $skip_cache = false ) {
|
651 |
-
//error_log( __LINE__ . " _add_relevant_term term = " . var_export( $term, true ), 0 );
|
652 |
-
//error_log( __LINE__ . " _add_relevant_term translations = " . var_export( $translations, true ), 0 );
|
653 |
global $sitepress;
|
|
|
654 |
if ( ! is_object( $term ) ) {
|
655 |
return false;
|
656 |
}
|
@@ -658,11 +673,9 @@ class MLA_WPML {
|
|
658 |
if ( ! array_key_exists( $term->term_taxonomy_id, self::$relevant_terms ) ) {
|
659 |
$taxonomy_name = 'tax_' . $term->taxonomy;
|
660 |
$details = $sitepress->get_element_language_details( $term->term_taxonomy_id, $taxonomy_name );
|
661 |
-
//error_log( __LINE__ . " _add_relevant_term details = " . var_export( $details, true ), 0 );
|
662 |
|
663 |
if ( empty( $translations ) ) {
|
664 |
$translations = $sitepress->get_element_translations( $details->trid, $taxonomy_name, false, false, $skip_cache );
|
665 |
-
//error_log( __LINE__ . " _add_relevant_term translations = " . var_export( $translations, true ), 0 );
|
666 |
|
667 |
if ( empty( $translations ) ) {
|
668 |
$language_code = $sitepress->get_default_language();
|
@@ -731,9 +744,7 @@ class MLA_WPML {
|
|
731 |
return false;
|
732 |
}
|
733 |
|
734 |
-
|
735 |
-
* If no match, try to add it and its translations
|
736 |
-
*/
|
737 |
if ( ( false === $relevant_term ) && $candidate = get_term_by( $field, $value, $taxonomy ) ) {
|
738 |
$relevant_term = self::_add_relevant_term( $candidate, NULL, $skip_cache );
|
739 |
|
@@ -747,9 +758,7 @@ class MLA_WPML {
|
|
747 |
} // translation
|
748 |
} // new term
|
749 |
|
750 |
-
|
751 |
-
* Find the language-specific value, if requested
|
752 |
-
*/
|
753 |
if ( $relevant_term && ! empty( $language ) ) {
|
754 |
if ( $relevant_term && array_key_exists( $language, $relevant_term['translations'] ) ) {
|
755 |
$relevant_term = self::$relevant_terms[ $relevant_term['translations'][ $language ]->element_id ];
|
@@ -954,12 +963,11 @@ class MLA_WPML {
|
|
954 |
* @param integer $post_id ID of the current post
|
955 |
* @param array $tax_inputs 'tax_input' request parameter
|
956 |
* @param array $tax_actions 'tax_action' request parameter
|
|
|
957 |
*/
|
958 |
-
private static function _build_tax_input( $post_id, $tax_inputs = NULL, $tax_actions = NULL ) {
|
959 |
global $sitepress;
|
960 |
-
|
961 |
-
//error_log( __LINE__ . " build_tax_input( {$post_id} ) tax_actions = " . var_export( $tax_actions, true ), 0 );
|
962 |
-
//error_log( __LINE__ . " build_tax_input( {$post_id} ) self :: tax_input = " . var_export( self::$tax_input, true ), 0 );
|
963 |
|
964 |
if ( $post_id == self::$tax_input['tax_input_post_id'] ) {
|
965 |
return;
|
@@ -968,9 +976,7 @@ class MLA_WPML {
|
|
968 |
self::$tax_input = array( 'tax_input_post_id' => $post_id );
|
969 |
$active_languages = $sitepress->get_active_languages();
|
970 |
|
971 |
-
|
972 |
-
* See if we are cloning/"replacing" the existing assignments
|
973 |
-
*/
|
974 |
if ( ( NULL == $tax_inputs ) && ( NULL == $tax_actions ) && isset( self::$existing_terms['element_id'] ) && ($post_id == self::$existing_terms['element_id'] ) ) {
|
975 |
$translation = self::$existing_terms[ self::$existing_terms['language_code'] ];
|
976 |
$taxonomies = $sitepress->get_translatable_taxonomies( true, 'attachment' );
|
@@ -990,7 +996,6 @@ class MLA_WPML {
|
|
990 |
$tax_inputs[ $taxonomy_name ] = array();
|
991 |
}
|
992 |
} // taxonomy_name
|
993 |
-
//error_log( __LINE__ . " build_tax_input( {$post_id} ) cloned tax_inputs = " . var_export( $tax_inputs, true ), 0 );
|
994 |
|
995 |
if ( $no_terms ) {
|
996 |
foreach( $active_languages as $language => $language_details ) {
|
@@ -1028,6 +1033,20 @@ class MLA_WPML {
|
|
1028 |
foreach ( $term_names as $term_name ) {
|
1029 |
if ( ! empty( $term_name ) ) {
|
1030 |
$relevant_term = self::_get_relevant_term( 'name', $term_name, $taxonomy );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1031 |
if ( isset( $relevant_term['translations'] ) ) {
|
1032 |
foreach ( $relevant_term['translations'] as $language => $translation ) {
|
1033 |
if ( $translated_term = self::_get_relevant_term( 'term_taxonomy_id', $translation->element_id, $taxonomy ) ) {
|
@@ -1459,7 +1478,7 @@ class MLA_WPML {
|
|
1459 |
if ( ! empty( self::$bulk_edit_request['tax_input'] ) ) {
|
1460 |
$tax_inputs = self::$bulk_edit_request['tax_input'];
|
1461 |
if ( 'checked' == MLACore::mla_get_option( 'term_assignment', false, false, MLA_WPML::$mla_language_option_definitions ) ) {
|
1462 |
-
self::_build_tax_input( $post_id, $tax_inputs, self::$bulk_edit_request['tax_action'] );
|
1463 |
$tax_inputs = self::_apply_tax_input( $post_id );
|
1464 |
}
|
1465 |
} else {
|
@@ -1765,7 +1784,7 @@ class MLA_WPML {
|
|
1765 |
foreach ( MLA_WPML::$mla_language_option_definitions as $key => $value ) {
|
1766 |
if ( 'language' == $value['tab'] ) {
|
1767 |
if ( 'custom' == $value['type'] && isset( $value['reset'] ) ) {
|
1768 |
-
$message =
|
1769 |
} elseif ( ('header' == $value['type']) || ('hidden' == $value['type']) ) {
|
1770 |
$message = '';
|
1771 |
} else {
|
@@ -1883,6 +1902,12 @@ class MLA_WPML_Table {
|
|
1883 |
public static function mla_views_media_page_mla_menu_filter( $views ) {
|
1884 |
// hooked by WPML Media in wpml-media.class.php
|
1885 |
$views = apply_filters( 'views_upload', $views );
|
|
|
|
|
|
|
|
|
|
|
|
|
1886 |
return $views;
|
1887 |
}
|
1888 |
|
@@ -2072,14 +2097,23 @@ class MLA_WPML_Table {
|
|
2072 |
*/
|
2073 |
public static function mla_list_table_get_columns( $columns ) {
|
2074 |
global $sitepress, $wpdb;
|
2075 |
-
|
2076 |
if ( is_null( self::$language_columns ) && $sitepress->is_translated_post_type( 'attachment' ) ) {
|
2077 |
-
|
2078 |
-
* Build language management columns
|
2079 |
-
*/
|
2080 |
$show_language = 'checked' == MLACore::mla_get_option( 'language_column', false, false, MLA_WPML::$mla_language_option_definitions );
|
2081 |
|
|
|
2082 |
$current_language = $sitepress->get_current_language();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2083 |
$languages = $sitepress->get_active_languages();
|
2084 |
$view_status = isset( $_REQUEST['status'] ) ? $_REQUEST['status'] : '';
|
2085 |
if ( 1 < count( $languages ) && $view_status != 'trash' ) {
|
@@ -2090,14 +2124,14 @@ class MLA_WPML_Table {
|
|
2090 |
|
2091 |
self::$language_columns = array();
|
2092 |
|
2093 |
-
if ( $show_language && 'all' == $
|
2094 |
self::$language_columns['language'] = __( 'Language', 'wpml-media' );
|
2095 |
}
|
2096 |
|
2097 |
if ( $show_translations ) {
|
2098 |
$language_codes = array();
|
2099 |
foreach ( $languages as $language ) {
|
2100 |
-
if ( $
|
2101 |
$language_codes[] = $language['code'];
|
2102 |
}
|
2103 |
}
|
@@ -2174,16 +2208,31 @@ class MLA_WPML_Table {
|
|
2174 |
*/
|
2175 |
public function mla_list_table_column_default( $content, $item, $column_name ) {
|
2176 |
global $sitepress;
|
2177 |
-
static $languages = NULL, $default_language, $current_language;
|
2178 |
|
2179 |
if ( 'language' == $column_name ) {
|
2180 |
$item_language = $sitepress->get_language_for_element( $item->ID, 'post_attachment' );
|
2181 |
-
$
|
|
|
|
|
|
|
|
|
|
|
2182 |
} elseif ('icl_translations' == $column_name ) {
|
2183 |
if ( is_null( $languages ) ) {
|
2184 |
$default_language = $sitepress->get_default_language();
|
2185 |
$current_language = $sitepress->get_current_language();
|
2186 |
$languages = $sitepress->get_active_languages();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2187 |
}
|
2188 |
|
2189 |
$trid = $sitepress->get_element_trid( $item->ID, 'post_attachment' );
|
@@ -2191,7 +2240,7 @@ class MLA_WPML_Table {
|
|
2191 |
|
2192 |
$content = '';
|
2193 |
foreach( $languages as $language ) {
|
2194 |
-
if ( $language['code'] == $
|
2195 |
continue;
|
2196 |
}
|
2197 |
|
26 |
* @return void
|
27 |
*/
|
28 |
public static function initialize() {
|
29 |
+
// These filters are only useful for the admin section; exit in the front-end posts/pages
|
|
|
|
|
30 |
if ( ! is_admin() ) {
|
31 |
return;
|
32 |
}
|
33 |
|
34 |
+
// Defined in /wp-admin/admin.php
|
|
|
|
|
35 |
add_action( 'admin_init', 'MLA_WPML::admin_init' );
|
36 |
|
37 |
+
// Defined in wp-admin/edit-form-advanced.php
|
|
|
|
|
38 |
add_filter( 'post_updated_messages', 'MLA_WPML::post_updated_messages', 10, 1 );
|
39 |
|
40 |
+
// Defined in wp-admin/includes/post.php function edit_post
|
|
|
|
|
41 |
add_filter( 'attachment_fields_to_save', 'MLA_WPML::attachment_fields_to_save', 10, 2 );
|
42 |
|
43 |
+
// Defined in wp-includes/post.php function wp_insert_post
|
|
|
|
|
44 |
add_action( 'edit_attachment', 'MLA_WPML::edit_attachment', 10, 1 );
|
45 |
|
46 |
+
// Defined in /media-library-assistant/includes/class-mla-data.php
|
|
|
|
|
47 |
add_action( 'mla_updated_single_item', 'MLA_WPML::mla_updated_single_item', 10, 2 );
|
48 |
|
49 |
+
// Defined in /media-library-assistant/includes/class-mla-edit-media.php
|
|
|
|
|
50 |
add_filter( 'mla_upload_bulk_edit_form_values', 'MLA_WPML::mla_upload_bulk_edit_form_values', 10, 1 );
|
51 |
|
52 |
+
// Defined in /media-library-assistant/includes/class-mla-media-modal.php
|
|
|
|
|
53 |
add_action( 'mla_media_modal_begin_update_compat_fields', 'MLA_WPML::mla_media_modal_begin_update_compat_fields', 10, 1 );
|
54 |
add_filter( 'mla_media_modal_update_compat_fields_terms', 'MLA_WPML::mla_media_modal_update_compat_fields_terms', 10, 4 );
|
55 |
add_filter( 'mla_media_modal_end_update_compat_fields', 'MLA_WPML::mla_media_modal_end_update_compat_fields', 10, 3 );
|
56 |
|
57 |
+
// Defined in /media-library-assistant/includes/class-mla-objects.php
|
58 |
+
add_filter( 'mla_taxonomy_column_final', 'MLA_WPML::mla_taxonomy_column_final', 10, 5 );
|
59 |
+
|
60 |
+
// Defined in /media-library-assistant/includes/class-mla-main.php
|
61 |
add_filter( 'mla_list_table_new_instance', 'MLA_WPML_Table::mla_list_table_new_instance', 10, 1 );
|
62 |
add_action( 'mla_list_table_custom_admin_action', 'MLA_WPML::mla_list_table_custom_admin_action', 10, 2 );
|
63 |
add_filter( 'mla_list_table_inline_action', 'MLA_WPML::mla_list_table_inline_action', 10, 2 );
|
64 |
add_filter( 'mla_list_table_bulk_action_initial_request', 'MLA_WPML::mla_list_table_bulk_action_initial_request', 10, 3 );
|
65 |
add_filter( 'mla_list_table_bulk_action_item_request', 'MLA_WPML::mla_list_table_bulk_action_item_request', 10, 4 );
|
66 |
|
67 |
+
// Defined in /media-library-assistant/includes/class-mla-settings.php
|
|
|
|
|
68 |
add_filter( 'mla_get_options_tablist', 'MLA_WPML::mla_get_options_tablist', 10, 3 );
|
69 |
add_action( 'mla_begin_mapping', 'MLA_WPML::mla_begin_mapping', 10, 2 );
|
70 |
add_filter( 'mla_mapping_new_text', 'MLA_WPML::mla_mapping_new_text', 10, 5 );
|
71 |
add_action( 'mla_end_mapping', 'MLA_WPML::mla_end_mapping', 10, 0 );
|
72 |
add_filter( 'mla_update_attachment_metadata_postfilter', 'MLA_WPML::mla_update_attachment_metadata_postfilter', 10, 3 );
|
73 |
|
74 |
+
// Defined in /wpml-media/inc/wpml-media-class.php
|
|
|
|
|
75 |
add_action( 'wpml_media_create_duplicate_attachment', 'MLA_WPML::wpml_media_create_duplicate_attachment', 10, 2 );
|
76 |
}
|
77 |
|
150 |
}
|
151 |
}
|
152 |
|
153 |
+
/**
|
154 |
+
* Adds the term-specific language code to each entry in the Media/Taxonomy "Attachments" column
|
155 |
+
*
|
156 |
+
* @since 2.61
|
157 |
+
*
|
158 |
+
* @param NULL $filter_content NULL, indicating no changes to the current content.
|
159 |
+
* @param object $tax_object Defines the current taxonomy.
|
160 |
+
* @param object $term Defines the current term.
|
161 |
+
* @param string $column_text MLA-computed count or "click to search".
|
162 |
+
* @param boolean $count_terms True to compute counts.
|
163 |
+
*/
|
164 |
+
public static function mla_taxonomy_column_final( $filter_content, $tax_object, $term, $column_text, $count_terms ) {
|
165 |
+
global $sitepress;
|
166 |
+
|
167 |
+
$details = $sitepress->get_element_language_details( $term->term_taxonomy_id, 'tax_' . $tax_object->name );
|
168 |
+
if ( !empty( $details ) ) {
|
169 |
+
$language_code = $details->language_code;
|
170 |
+
} else {
|
171 |
+
$language_code = 'all';
|
172 |
+
}
|
173 |
+
|
174 |
+
return sprintf( '<a href="%1$s">%2$s</a>', esc_url( add_query_arg(
|
175 |
+
array( 'page' => MLACore::ADMIN_PAGE_SLUG, 'mla-tax' => $tax_object->name, 'mla-term' => $term->slug, 'heading_suffix' => urlencode( $tax_object->label . ':' . $term->name ), 'lang' => $language_code ), 'upload.php' ) ), $column_text );
|
176 |
+
}
|
177 |
+
|
178 |
/**
|
179 |
* Captures the existing term assignments before the
|
180 |
* Media Manager Modal Window ATTACHMENT DETAILS taxonomy meta boxes updates
|
213 |
$tax_inputs = array( $key => implode( ',', $terms ) );
|
214 |
}
|
215 |
|
216 |
+
self::_build_tax_input( $post_id, $tax_inputs, NULL, true );
|
217 |
$tax_inputs = self::_apply_tax_input( $post_id );
|
218 |
$terms = $tax_inputs[ $key ];
|
219 |
} // term_assignment
|
274 |
|
275 |
if ( 'checked' == MLACore::mla_get_option( 'term_assignment', false, false, MLA_WPML::$mla_language_option_definitions ) ) {
|
276 |
// Quick Edit calls update_single_item right after this filter
|
277 |
+
self::_build_tax_input( $post_id, $_REQUEST['tax_input'], NULL, true );
|
278 |
$_REQUEST['tax_input'] = self::_apply_tax_input( $post_id );
|
279 |
}
|
280 |
|
362 |
*/
|
363 |
if ( 'edit' == $bulk_action && ( ! empty( self::$bulk_edit_request['tax_input'] ) ) && ( 'checked' == MLACore::mla_get_option( 'term_assignment', false, false, MLA_WPML::$mla_language_option_definitions ) ) ) {
|
364 |
self::_build_existing_terms( $post_id );
|
365 |
+
self::_build_tax_input( $post_id, self::$bulk_edit_request['tax_input'], self::$bulk_edit_request['tax_action'], true );
|
366 |
$request['tax_input'] = self::_apply_tax_input( $post_id );
|
367 |
foreach( self::$bulk_edit_request['tax_action'] as $taxonomy => $action ) {
|
368 |
// _apply_tax_input changes a remove to a replace
|
446 |
* @param mixed Attachment ID or NULL, depending on scope
|
447 |
*/
|
448 |
public static function mla_begin_mapping( $source, $post_id = NULL ) {
|
|
|
449 |
if ( in_array( $source, array( 'create_metadata', 'single_iptc_exif', 'iptc_exif_standard', 'iptc_exif_taxonomy', 'iptc_exif_custom', 'iptc_exif_custom_rule' ) ) ) {
|
450 |
/*
|
451 |
* Defined in /sitepress-multilingual-cms/sitepress.class.php
|
466 |
* @param array attachment_metadata, default NULL
|
467 |
*/
|
468 |
public static function mla_mapping_rule( $setting_value, $post_id, $category, $attachment_metadata ) {
|
|
|
469 |
return self::$current_mapping_rule = $setting_value;
|
470 |
} // mla_mapping_rule
|
471 |
|
501 |
|
502 |
if ( is_null( $replicate ) ) {
|
503 |
$replicate = ( 'checked' == MLACore::mla_get_option( 'term_mapping_replication', false, false, MLA_WPML::$mla_language_option_definitions ) );
|
|
|
|
|
|
|
504 |
$current_language = $sitepress->get_current_language();
|
|
|
505 |
$taxonomies = $sitepress->get_translatable_taxonomies( true, 'attachment' );
|
506 |
+
$other_languages = $sitepress->get_active_languages();
|
507 |
+
unset( $other_languages[ $current_language ] );
|
|
|
|
|
508 |
}
|
509 |
|
510 |
if ( ( ! empty( $new_text ) ) && in_array( $setting_key, $taxonomies ) ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
511 |
$language_details = $sitepress->get_element_language_details( $post_id, 'post_attachment' );
|
512 |
$item_language = $language_details->language_code;
|
|
|
513 |
|
514 |
+
// Find the parent term and its translations
|
|
|
|
|
515 |
if ( isset( self::$current_mapping_rule['parent'] ) ) {
|
516 |
if ( $parent_term = absint( self::$current_mapping_rule['parent'] ) ) {
|
517 |
$parent_term = self::_get_relevant_term( 'id', $parent_term, $setting_key );
|
520 |
$parent_term = 0;
|
521 |
}
|
522 |
|
|
|
|
|
523 |
$new_terms = array();
|
524 |
foreach( $new_text as $new_name ) {
|
525 |
$relevant_term = self::_get_relevant_term( 'name', $new_name, $setting_key );
|
|
|
526 |
|
527 |
if ( $relevant_term ) {
|
528 |
if ( isset( $relevant_term['translations'][ $item_language ] ) ) {
|
529 |
$new_terms[] = absint( $relevant_term['translations'][ $item_language ]->term_id );
|
530 |
}
|
531 |
} else {
|
532 |
+
// Always create the new term in the current language
|
|
|
|
|
533 |
if ( $parent_term && isset( $parent_term['translations'][ $current_language ] ) ) {
|
534 |
$parent = $parent_term['translations'][ $current_language ]->term_id;
|
535 |
} else {
|
536 |
$parent = 0;
|
537 |
}
|
|
|
538 |
|
539 |
$args = array(
|
540 |
'taxonomy' => $setting_key,
|
544 |
);
|
545 |
|
546 |
$res = WPML_Terms_Translations::create_new_term( $args );
|
|
|
547 |
|
548 |
+
// Add translations in the other languages?
|
|
|
|
|
549 |
if ( $replicate ) {
|
550 |
$trid = $sitepress->get_element_trid( $res['term_taxonomy_id'], 'tax_' . $setting_key );
|
|
|
551 |
$original_term = get_term( $res['term_id'], $setting_key, OBJECT, 'no' );
|
|
|
552 |
$args = array( 'trid' => $trid, 'source_language' => $current_language, 'term' => $new_name, 'original_id' => $res['term_id'], 'original_tax_id' => $res['term_taxonomy_id'], 'taxonomy' => $setting_key, 'update_translations' => true );
|
553 |
foreach( $other_languages as $language => $language_details ) {
|
554 |
if ( $parent_term && isset( $parent_term['translations'][ $language ] ) ) {
|
556 |
} else {
|
557 |
$parent = 0;
|
558 |
}
|
|
|
559 |
|
560 |
$translated_slug = apply_filters( 'icl_duplicate_generic_string',
|
561 |
$original_term->slug,
|
562 |
$language,
|
563 |
array( 'context' => 'taxonomy_slug', 'attribute' => $setting_key, 'key' => $original_term->term_id ) );
|
564 |
$translated_slug = WPML_Terms_Translations::term_unique_slug( $translated_slug, $setting_key, $language );
|
|
|
565 |
|
566 |
$args['slug'] = $translated_slug;
|
567 |
$args['parent'] = $parent;
|
568 |
$args['lang_code'] = $language;
|
|
|
569 |
$res = WPML_Terms_Translations::create_new_term( $args );
|
|
|
570 |
}
|
571 |
} // replicate
|
572 |
|
573 |
+
// Reload the term with all of its new translations
|
|
|
|
|
574 |
$relevant_term = self::_get_relevant_term( 'name', $new_name, $setting_key, NULL, false, true );
|
|
|
575 |
if ( isset( $relevant_term['translations'][ $item_language ] ) ) {
|
576 |
$new_terms[] = absint( $relevant_term['translations'][ $item_language ]->term_id );
|
577 |
}
|
608 |
*/
|
609 |
private static $relevant_terms = array();
|
610 |
|
611 |
+
/**
|
612 |
+
* Creates a $relevant_term given a name, taxonomy and language
|
613 |
+
*
|
614 |
+
* @since 2.61
|
615 |
+
*
|
616 |
+
* @param string $name new term name
|
617 |
+
* @param string $taxonomy slug
|
618 |
+
* @param string $language code/slug
|
619 |
+
*/
|
620 |
+
private static function _create_relevant_term( $name, $taxonomy, $language ) {
|
621 |
+
global $sitepress;
|
622 |
+
|
623 |
+
$current_language = $sitepress->get_current_language();
|
624 |
+
$sitepress->switch_lang( $language, true );
|
625 |
+
$res = wp_insert_term( $name, $taxonomy, array( 'parent' => 0 ) );
|
626 |
+
|
627 |
+
// Reload the term with all of its new translations
|
628 |
+
$res = self::_get_relevant_term( 'name', $name, $taxonomy );
|
629 |
+
$sitepress->switch_lang( $current_language, true );
|
630 |
+
return $res;
|
631 |
+
} // _create_relevant_term
|
632 |
+
|
633 |
+
/**
|
634 |
+
* Creates a translation given a $relevant_term and language
|
635 |
+
*
|
636 |
+
* @since 2.61
|
637 |
+
*
|
638 |
+
* @param string $relevant_term current term
|
639 |
+
* @param string $language code/slug
|
640 |
+
*/
|
641 |
+
private static function _create_relevant_translation( $relevant_term, $language ) {
|
642 |
+
global $sitepress;
|
643 |
+
|
644 |
+
$details = $sitepress->get_element_language_details( $relevant_term['term']->term_taxonomy_id, 'tax_' . $relevant_term['term']->taxonomy );
|
645 |
+
$args = array(
|
646 |
+
'trid' => $details->trid,
|
647 |
+
'taxonomy' => $relevant_term['term']->taxonomy,
|
648 |
+
'lang_code' => $language,
|
649 |
+
);
|
650 |
+
$res = WPML_Terms_Translations::create_automatic_translation( $args );
|
651 |
+
|
652 |
+
// Reload the term with its new translation
|
653 |
+
return self::_get_relevant_term( 'id', $res['term_id'], $taxonomy );
|
654 |
+
} // _create_relevant_translation
|
655 |
+
|
656 |
/**
|
657 |
* Adds a term and its translations to $relevant_terms
|
658 |
*
|
664 |
* @param boolean Ignore the Sitepress terms cache; optional
|
665 |
*/
|
666 |
private static function _add_relevant_term( $term, $translations = NULL, $skip_cache = false ) {
|
|
|
|
|
667 |
global $sitepress;
|
668 |
+
|
669 |
if ( ! is_object( $term ) ) {
|
670 |
return false;
|
671 |
}
|
673 |
if ( ! array_key_exists( $term->term_taxonomy_id, self::$relevant_terms ) ) {
|
674 |
$taxonomy_name = 'tax_' . $term->taxonomy;
|
675 |
$details = $sitepress->get_element_language_details( $term->term_taxonomy_id, $taxonomy_name );
|
|
|
676 |
|
677 |
if ( empty( $translations ) ) {
|
678 |
$translations = $sitepress->get_element_translations( $details->trid, $taxonomy_name, false, false, $skip_cache );
|
|
|
679 |
|
680 |
if ( empty( $translations ) ) {
|
681 |
$language_code = $sitepress->get_default_language();
|
744 |
return false;
|
745 |
}
|
746 |
|
747 |
+
// If no match, try to add it and its translations
|
|
|
|
|
748 |
if ( ( false === $relevant_term ) && $candidate = get_term_by( $field, $value, $taxonomy ) ) {
|
749 |
$relevant_term = self::_add_relevant_term( $candidate, NULL, $skip_cache );
|
750 |
|
758 |
} // translation
|
759 |
} // new term
|
760 |
|
761 |
+
// Find the language-specific value, if requested
|
|
|
|
|
762 |
if ( $relevant_term && ! empty( $language ) ) {
|
763 |
if ( $relevant_term && array_key_exists( $language, $relevant_term['translations'] ) ) {
|
764 |
$relevant_term = self::$relevant_terms[ $relevant_term['translations'][ $language ]->element_id ];
|
963 |
* @param integer $post_id ID of the current post
|
964 |
* @param array $tax_inputs 'tax_input' request parameter
|
965 |
* @param array $tax_actions 'tax_action' request parameter
|
966 |
+
* @param boolean $add_new_names Add term and translations for new names
|
967 |
*/
|
968 |
+
private static function _build_tax_input( $post_id, $tax_inputs = NULL, $tax_actions = NULL, $add_new_names = false ) {
|
969 |
global $sitepress;
|
970 |
+
static $new_names = array();
|
|
|
|
|
971 |
|
972 |
if ( $post_id == self::$tax_input['tax_input_post_id'] ) {
|
973 |
return;
|
976 |
self::$tax_input = array( 'tax_input_post_id' => $post_id );
|
977 |
$active_languages = $sitepress->get_active_languages();
|
978 |
|
979 |
+
// See if we are cloning/"replacing" the existing assignments
|
|
|
|
|
980 |
if ( ( NULL == $tax_inputs ) && ( NULL == $tax_actions ) && isset( self::$existing_terms['element_id'] ) && ($post_id == self::$existing_terms['element_id'] ) ) {
|
981 |
$translation = self::$existing_terms[ self::$existing_terms['language_code'] ];
|
982 |
$taxonomies = $sitepress->get_translatable_taxonomies( true, 'attachment' );
|
996 |
$tax_inputs[ $taxonomy_name ] = array();
|
997 |
}
|
998 |
} // taxonomy_name
|
|
|
999 |
|
1000 |
if ( $no_terms ) {
|
1001 |
foreach( $active_languages as $language => $language_details ) {
|
1033 |
foreach ( $term_names as $term_name ) {
|
1034 |
if ( ! empty( $term_name ) ) {
|
1035 |
$relevant_term = self::_get_relevant_term( 'name', $term_name, $taxonomy );
|
1036 |
+
// Add new term or translation if allowed and required
|
1037 |
+
if ( $add_new_names ) {
|
1038 |
+
if ( false === $relevant_term ) {
|
1039 |
+
$relevant_term = self::_create_relevant_term( $term_name, $taxonomy, self::$existing_terms['language_code'] );
|
1040 |
+
$new_names[ $term_name ][ self::$existing_terms['language_code'] ] = $relevant_term['term']->term_id;
|
1041 |
+
} else {
|
1042 |
+
$language = self::$existing_terms['language_code'];
|
1043 |
+
if ( !array_key_exists( self::$existing_terms['language_code'], $relevant_term['translations'] ) && isset( $new_names[ $term_name ] ) ) {
|
1044 |
+
$relevant_term = self::_create_relevant_translation( $relevant_term, self::$existing_terms['language_code'] );
|
1045 |
+
$new_names[ $term_name ][ self::$existing_terms['language_code'] ] = $relevant_term['term']->term_id;
|
1046 |
+
}
|
1047 |
+
}
|
1048 |
+
}
|
1049 |
+
|
1050 |
if ( isset( $relevant_term['translations'] ) ) {
|
1051 |
foreach ( $relevant_term['translations'] as $language => $translation ) {
|
1052 |
if ( $translated_term = self::_get_relevant_term( 'term_taxonomy_id', $translation->element_id, $taxonomy ) ) {
|
1478 |
if ( ! empty( self::$bulk_edit_request['tax_input'] ) ) {
|
1479 |
$tax_inputs = self::$bulk_edit_request['tax_input'];
|
1480 |
if ( 'checked' == MLACore::mla_get_option( 'term_assignment', false, false, MLA_WPML::$mla_language_option_definitions ) ) {
|
1481 |
+
self::_build_tax_input( $post_id, $tax_inputs, self::$bulk_edit_request['tax_action'], true );
|
1482 |
$tax_inputs = self::_apply_tax_input( $post_id );
|
1483 |
}
|
1484 |
} else {
|
1784 |
foreach ( MLA_WPML::$mla_language_option_definitions as $key => $value ) {
|
1785 |
if ( 'language' == $value['tab'] ) {
|
1786 |
if ( 'custom' == $value['type'] && isset( $value['reset'] ) ) {
|
1787 |
+
$message = call_user_func( array( 'MLA_WPML', $value['reset'] ), 'reset', $key, $value, $_REQUEST );
|
1788 |
} elseif ( ('header' == $value['type']) || ('hidden' == $value['type']) ) {
|
1789 |
$message = '';
|
1790 |
} else {
|
1902 |
public static function mla_views_media_page_mla_menu_filter( $views ) {
|
1903 |
// hooked by WPML Media in wpml-media.class.php
|
1904 |
$views = apply_filters( 'views_upload', $views );
|
1905 |
+
|
1906 |
+
// Fix WPML bug for view = all
|
1907 |
+
if ( false === strpos( $views['all'], 'page=mla-menu' ) ) {
|
1908 |
+
$views['all'] = str_replace( 'upload.php?', 'upload.php?page=mla-menu&', $views['all'] );
|
1909 |
+
}
|
1910 |
+
|
1911 |
return $views;
|
1912 |
}
|
1913 |
|
2097 |
*/
|
2098 |
public static function mla_list_table_get_columns( $columns ) {
|
2099 |
global $sitepress, $wpdb;
|
2100 |
+
|
2101 |
if ( is_null( self::$language_columns ) && $sitepress->is_translated_post_type( 'attachment' ) ) {
|
2102 |
+
// Build language management columns
|
|
|
|
|
2103 |
$show_language = 'checked' == MLACore::mla_get_option( 'language_column', false, false, MLA_WPML::$mla_language_option_definitions );
|
2104 |
|
2105 |
+
// $current_language is item-specific, $table_laguage is for the entire table
|
2106 |
$current_language = $sitepress->get_current_language();
|
2107 |
+
$table_language = $current_language;
|
2108 |
+
if ( ! empty( $_SERVER[ 'HTTP_REFERER' ] ) ) {
|
2109 |
+
$query_string = parse_url( $_SERVER[ 'HTTP_REFERER' ], PHP_URL_QUERY );
|
2110 |
+
$query = array();
|
2111 |
+
parse_str( strval( $query_string ), $query );
|
2112 |
+
if ( !empty( $query['lang'] ) ) {
|
2113 |
+
$table_language = $query['lang'];
|
2114 |
+
}
|
2115 |
+
}
|
2116 |
+
|
2117 |
$languages = $sitepress->get_active_languages();
|
2118 |
$view_status = isset( $_REQUEST['status'] ) ? $_REQUEST['status'] : '';
|
2119 |
if ( 1 < count( $languages ) && $view_status != 'trash' ) {
|
2124 |
|
2125 |
self::$language_columns = array();
|
2126 |
|
2127 |
+
if ( $show_language && 'all' == $table_language ) {
|
2128 |
self::$language_columns['language'] = __( 'Language', 'wpml-media' );
|
2129 |
}
|
2130 |
|
2131 |
if ( $show_translations ) {
|
2132 |
$language_codes = array();
|
2133 |
foreach ( $languages as $language ) {
|
2134 |
+
if ( $table_language != $language['code'] ) {
|
2135 |
$language_codes[] = $language['code'];
|
2136 |
}
|
2137 |
}
|
2208 |
*/
|
2209 |
public function mla_list_table_column_default( $content, $item, $column_name ) {
|
2210 |
global $sitepress;
|
2211 |
+
static $languages = NULL, $default_language, $current_language, $table_language;
|
2212 |
|
2213 |
if ( 'language' == $column_name ) {
|
2214 |
$item_language = $sitepress->get_language_for_element( $item->ID, 'post_attachment' );
|
2215 |
+
$display_language = $sitepress->get_admin_language();
|
2216 |
+
if ( 'all' === $display_language ) {
|
2217 |
+
$display_language = $sitepress->get_default_language();
|
2218 |
+
}
|
2219 |
+
|
2220 |
+
$content = $sitepress->get_display_language_name( $item_language, $display_language );
|
2221 |
} elseif ('icl_translations' == $column_name ) {
|
2222 |
if ( is_null( $languages ) ) {
|
2223 |
$default_language = $sitepress->get_default_language();
|
2224 |
$current_language = $sitepress->get_current_language();
|
2225 |
$languages = $sitepress->get_active_languages();
|
2226 |
+
// $current_language is item-specific, $table_laguage is for the entire table
|
2227 |
+
$table_language = $current_language;
|
2228 |
+
if ( ! empty( $_SERVER[ 'HTTP_REFERER' ] ) ) {
|
2229 |
+
$query_string = parse_url( $_SERVER[ 'HTTP_REFERER' ], PHP_URL_QUERY );
|
2230 |
+
$query = array();
|
2231 |
+
parse_str( strval( $query_string ), $query );
|
2232 |
+
if ( !empty( $query['lang'] ) ) {
|
2233 |
+
$table_language = $query['lang'];
|
2234 |
+
}
|
2235 |
+
}
|
2236 |
}
|
2237 |
|
2238 |
$trid = $sitepress->get_element_trid( $item->ID, 'post_attachment' );
|
2240 |
|
2241 |
$content = '';
|
2242 |
foreach( $languages as $language ) {
|
2243 |
+
if ( $language['code'] == $table_language ) {
|
2244 |
continue;
|
2245 |
}
|
2246 |
|
index.php
CHANGED
@@ -16,7 +16,7 @@ Description: Enhances the Media Library; powerful [mla_gallery] [mla_tag_cloud]
|
|
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-2017 David Lingren
|
16 |
Author: David Lingren, Fair Trade Judaica
|
17 |
Text Domain: media-library-assistant
|
18 |
Domain Path: /languages
|
19 |
+
Version: 2.61
|
20 |
Author URI: http://fairtradejudaica.org/our-story/staff/
|
21 |
|
22 |
Copyright 2011-2017 David Lingren
|
js/mla-inline-edit-scripts.js
CHANGED
@@ -175,6 +175,16 @@ var jQuery,
|
|
175 |
});
|
176 |
|
177 |
$('html, body').animate( { scrollTop: 0 }, 'fast' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
178 |
},
|
179 |
|
180 |
bulkSave : function(e) {
|
@@ -673,6 +683,16 @@ var jQuery,
|
|
673 |
$('.inline-edit-tags', bulkRow ).html( blankTags ),
|
674 |
$('.inline-edit-fields', bulkRow ).html( blankFields );
|
675 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
676 |
$('#bulk-edit-set-parent', bulkRow).on( 'click', function(){
|
677 |
return mla.inlineEditAttachment.bulkParentOpen();
|
678 |
});
|
175 |
});
|
176 |
|
177 |
$('html, body').animate( { scrollTop: 0 }, 'fast' );
|
178 |
+
|
179 |
+
if ( ( typeof quicktags !== 'undefined' ) && ( typeof mla.settings.quickTagsInit !== 'undefined' ) ) {
|
180 |
+
for ( id in mla.settings.quickTagsInit ) {
|
181 |
+
quicktags( mla.settings.quickTagsInit[id] );
|
182 |
+
|
183 |
+
if ( mla.settings.quickTagsInit[id]['active'] ) {
|
184 |
+
window.wpActiveEditor = id;
|
185 |
+
}
|
186 |
+
}
|
187 |
+
}
|
188 |
},
|
189 |
|
190 |
bulkSave : function(e) {
|
683 |
$('.inline-edit-tags', bulkRow ).html( blankTags ),
|
684 |
$('.inline-edit-fields', bulkRow ).html( blankFields );
|
685 |
|
686 |
+
if ( ( typeof quicktags !== 'undefined' ) && ( typeof mla.settings.quickTagsInit !== 'undefined' ) ) {
|
687 |
+
for ( id in mla.settings.quickTagsInit ) {
|
688 |
+
quicktags( mla.settings.quickTagsInit[id] );
|
689 |
+
|
690 |
+
if ( mla.settings.quickTagsInit[id]['active'] ) {
|
691 |
+
window.wpActiveEditor = id;
|
692 |
+
}
|
693 |
+
}
|
694 |
+
}
|
695 |
+
|
696 |
$('#bulk-edit-set-parent', bulkRow).on( 'click', function(){
|
697 |
return mla.inlineEditAttachment.bulkParentOpen();
|
698 |
});
|
js/mla-inline-edit-scripts.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
var jQuery,mla_inline_edit_vars,mla={settings:{},bulkEdit:{inProcess:false,doCancel:false},utility:{getId:function(b){var c=jQuery(b).closest("tr").attr("id"),a=c.split("-");return a[a.length-1]}},setParent:null,inlineEditAttachment:null};(function(a){mla.settings=typeof mla_inline_edit_vars==="undefined"?{}:mla_inline_edit_vars;mla_inline_edit_vars=void 0;mla.inlineEditAttachment={init:function(){var d=this,e=a("#inline-edit"),c=a("#bulk-edit"),b=a("#bulk-progress");d.type="attachment";d.what="#attachment-";e.keyup(function(f){if(f.which==27){return mla.inlineEditAttachment.revert()}});c.keyup(function(f){if(f.which==27){return mla.inlineEditAttachment.revert()}});b.keyup(function(f){if(f.which==27){return mla.inlineEditAttachment.revert()}});a("#inline-edit-post-set-parent",e).on("click",function(){return mla.inlineEditAttachment.inlineParentOpen(this)});a("a.cancel",e).click(function(){return mla.inlineEditAttachment.revert()});a("a.save",e).click(function(){return mla.inlineEditAttachment.quickSave(this)});a("td",e).keydown(function(f){if(f.which==13){return mla.inlineEditAttachment.quickSave(this)}});a("#bulk-edit-set-parent",c).on("click",function(){return mla.inlineEditAttachment.bulkParentOpen()});a("a.cancel",c).click(function(){return mla.inlineEditAttachment.revert()});a("a.reset",c).click(function(){return mla.inlineEditAttachment.doReset()});a('input[type="submit"]',c).click(function(f){f.preventDefault();return mla.inlineEditAttachment.bulkSave(f)});a("a.cancel",b).click(function(){if(mla.bulkEdit.inProcess){mla.bulkEdit.doCancel=true;return false}else{return mla.inlineEditAttachment.revert()}});a("#bulk_refresh",b).click(function(){a("#bulk-progress a").prop("disabled",true);a("#bulk-progress").css("opacity","0.5")});a("#the-list").on("click","a.editinline",function(){mla.inlineEditAttachment.quickEdit(this);return false});a("span.catshow").click(function(){a(this).hide().next().show().parent().next().addClass("cat-hover")});a("span.cathide").click(function(){a(this).hide().prev().show().parent().next().removeClass("cat-hover")});a('select[name="_status"] option[value="future"]',c).remove();a("#doaction, #doaction2").click(function(f){var g=a(this).attr("id").substr(2);if(a('select[name="'+g+'"]').val()=="edit"){f.preventDefault();d.bulkEdit()}else{if(a("form#posts-filter tr.inline-editor").length>0){d.revert()}}});a("#post-query-submit").mousedown(function(){d.revert();a('select[name^="action"]').val("-1")})},bulkEdit:function(){var b="",d=true;this.revert();a("#bulk-edit td").attr("colspan",a("th:visible, td:visible",".widefat:first thead").length);if(mla.settings.useSpinnerClass){a("table.widefat tbody").prepend(a("#bulk-edit")).prepend('<tr class="hidden"></tr>')}else{a("table.widefat tbody").prepend(a("#bulk-edit"))}a("#bulk-edit").addClass("inline-editor").show();a('tbody th.check-column input[type="checkbox"]').each(function(){if(a(this).prop("checked")){d=false;var e=a(this).val(),c;c=a("#inline_"+e+" .post_title").text()||mla.settings.noTitle;b+='<div id="ttle'+e+'"><a id="_'+e+'" class="ntdelbutton" title="'+mla.settings.ntdelTitle+'">X</a>'+c+"</div>"}});if(d){return this.revert()}a("#bulk-titles").html(b);a("#bulk-titles a").click(function(){var c=a(this).attr("id").substr(1);a('table.widefat input[value="'+c+'"]').prop("checked",false);a("#ttle"+c).remove()});a("textarea.mla_tags").each(function(){var c=a(this).attr("name").replace("]","").replace("tax_input[","");a(this).suggest(ajaxurl+"?action=ajax-tag-search&tax="+c,{delay:500,minchars:2,multiple:true,multipleSep:mla.settings.comma+" "})});a("html, body").animate({scrollTop:0},"fast")},bulkSave:function(c){var b;mla.bulkEdit={inProcess:false,doCancel:false,chunkSize:0,targetName:"",fields:"",ids:[],idsCount:0,offset:0,waiting:0,running:0,complete:0,unchanged:0,success:0,failure:0};mla.bulkEdit.chunkSize=+mla.settings.bulkChunkSize;mla.bulkEdit.targetName=c.target.name;mla.bulkEdit.fields=a("#bulk-edit :input").serialize();b=a('tbody th.check-column input[type="checkbox"]').serializeArray();a.each(b,function(d,e){mla.bulkEdit.ids[d]=+e.value});mla.bulkEdit.idsCount=mla.bulkEdit.waiting=mla.bulkEdit.ids.length;mla.inlineEditAttachment.bulkProgressOpen();mla.inlineEditAttachment.bulkPost();return false},bulkProgressOpen:function(){var b="",d=true;this.revert();a("#bulk-progress td").attr("colspan",a("th:visible, td:visible",".widefat:first thead").length);a("table.widefat tbody").prepend(a("#bulk-progress"));a("#bulk-progress").addClass("inline-editor").show();a("#cb-select-all-1").removeAttr("checked");a("#cb-select-all-2").removeAttr("checked");a('tbody th.check-column input[type="checkbox"]').each(function(){if(a(this).prop("checked")){d=false;var e=a(this).val(),c;c=a("#inline_"+e+" .post_title").text()||mla.settings.noTitle;b+='<div id="ttle'+e+'"><a id="_'+e+'" class="ntdelbutton" title="'+mla.settings.ntdelTitle+'">X</a>'+c+"</div>"}});if(d){return this.revert()}a("#bulk-progress-running").html("");a("#bulk-progress-complete").html("");a("#bulk-progress-waiting").html(b);a("#bulk-progress-waiting a").click(function(){var c=a(this).attr("id").substr(1);a('table.widefat input[value="'+c+'"]').prop("checked",false);a("#ttle"+c).remove()});a("#bulk-progress .inline-edit-save .error").html("");a("#bulk_refresh").prop("disabled",true).css("opacity","0.5");a("html, body").animate({scrollTop:0},"fast")},bulkPost:function(){var b,g,f,i,c,h=a("table.widefat .inline-edit-save .spinner"),d=a("#bulk-progress .inline-edit-save .error"),j=a("#bulk-progress-waiting"),e=a("#bulk-progress-running");g=mla.bulkEdit.ids.slice(mla.bulkEdit.offset,mla.bulkEdit.offset+mla.bulkEdit.chunkSize);for(f=0;f<g.length;f++){i=a("#ttle"+g[f],j).remove();a("a",i).hide();e.append(i)}mla.bulkEdit.waiting-=g.length;mla.bulkEdit.running=g.length;b={action:mla.settings.ajax_action,mla_admin_nonce:mla.settings.ajax_nonce,bulk_action:mla.bulkEdit.targetName,cb_offset:mla.bulkEdit.offset,cb_count:mla.bulkEdit.idsCount,cb_attachment:g};mla.bulkEdit.offset+=mla.bulkEdit.chunkSize;b=a.param(b)+"&"+mla.bulkEdit.fields;mla.bulkEdit.inProcess=true;if(mla.settings.useSpinnerClass){h.addClass("is-active")}else{h.show()}c=mla.settings.bulkWaiting+": "+mla.bulkEdit.waiting+", "+mla.settings.bulkComplete+": "+mla.bulkEdit.complete+", "+mla.settings.bulkUnchanged+": "+mla.bulkEdit.unchanged+", "+mla.settings.bulkSuccess+": "+mla.bulkEdit.success+", "+mla.settings.bulkFailure+": "+mla.bulkEdit.failure;d.html(c).show();a.ajax(ajaxurl,{type:"POST",data:b,dataType:"json"}).always(function(){if(mla.settings.useSpinnerClass){h.removeClass("is-active")}else{h.hide()}}).done(function(n,l){var o="no response.data",k,m;if(mla.settings.useSpinnerClass){h.removeClass("is-active")}else{h.hide()}if(n){if(!n.success){if(n.responseData){o=n.data}d.html(JSON.stringify(n)).show();mla.bulkEdit.offset=mla.bulkEdit.idsCount}else{m=a("#bulk-progress-running div").remove();a.each(m,function(){var p,q=a(this).html(),r=a(this).attr("id").substr(4);if("string"===typeof(n.data.item_results[r]["result"])){p=n.data.item_results[r]["result"];a(this).html(q+" ("+r+") - "+p)}a("#attachment-"+r).remove()});a("#bulk-progress-complete").append(m);mla.bulkEdit.complete+=mla.bulkEdit.running;mla.bulkEdit.running=0;mla.bulkEdit.unchanged+=n.data.unchanged;mla.bulkEdit.success+=n.data.success;mla.bulkEdit.failure+=n.data.failure;k=mla.settings.bulkWaiting+": "+mla.bulkEdit.waiting+", "+mla.settings.bulkComplete+": "+mla.bulkEdit.complete+", "+mla.settings.bulkUnchanged+": "+mla.bulkEdit.unchanged+", "+mla.settings.bulkSuccess+": "+mla.bulkEdit.success+", "+mla.settings.bulkFailure+": "+mla.bulkEdit.failure;d.html(k).show()}}else{d.html(mla.settings.error).show();mla.bulkEdit.offset=mla.bulkEdit.idsCount}if(mla.bulkEdit.doCancel){d.html(mla.settings.bulkCanceled+". "+k).show()}else{if(mla.bulkEdit.offset<mla.bulkEdit.idsCount){mla.inlineEditAttachment.bulkPost();return}}a("#bulk_refresh").prop("disabled",false).css("opacity","1.0");mla.bulkEdit.inProcess=false}).fail(function(l,k){if(200==l.status){d.text("("+k+") "+l.responseText)}else{d.text(mla.settings.ajaxFailError+" ("+k+"), jqXHR( "+l.status+", "+l.statusText+", "+l.responseText+")")}})},quickEdit:function(h){var d=this,b,c,f,e,g;d.revert();if(typeof(h)=="object"){h=mla.utility.getId(h)}b=mla.settings.fields;c=a("#inline-edit").clone(true);a("td",c).attr("colspan",a("th:visible, td:visible",".widefat:first thead").length);if(mla.settings.useSpinnerClass){a(d.what+h).hide().after(c).after('<tr class="hidden"></tr>')}else{if(a(d.what+h).hasClass("alternate")){a(c).addClass("alternate")}a(d.what+h).hide().after(c)}f=a("#inline_"+h);e=a(".item_thumbnail",f).html();if(e.length){a("#item_thumbnail",c).html(e)}if(!a(':input[name="post_author"] option[value="'+a(".post_author",f).text()+'"]',c).val()){a(':input[name="post_author"]',c).prepend('<option value="'+a(".post_author",f).text()+'">'+a("#"+d.type+"-"+h+" .author").text()+"</option>")}if(a(':input[name="post_author"] option',c).length==1){a("label.inline-edit-author",c).hide()}for(g=0;g<b.length;g++){a(':input[name="'+b[g]+'"]',c).val(a("."+b[g],f).text())}if(a(".image_alt",f).length===0){a("label.inline-edit-image-alt",c).hide()}a(".mla_category",f).each(function(){var i=a(this).text(),j;if(i){j=a(this).attr("id").replace("_"+h,"");a("ul."+j+"-checklist :checkbox",c).val(i.split(","))}});a(".mla_tags",f).each(function(){var l=a(this).text(),m=a(this).attr("id").replace("_"+h,""),k=a("textarea.tax_input_"+m,c),i=mla.settings.comma,j;if(l){if(","!==i){l=l.replace(/,/g,i)}k.val(l)}j=a(".lang",f).text();if(0<j.length){j="&lang="+j}else{j=""}k.suggest(ajaxurl+"?action=ajax-tag-search&tax="+m+"&preview_id="+h+j,{delay:500,minchars:2,multiple:true,multipleSep:mla.settings.comma+" "})});f=a(c).attr("id","edit-"+h).addClass("inline-editor").show().position().top;a(".ptitle",c).focus();a("html, body").animate({scrollTop:f},"fast");return false},quickSave:function(e){var d,b,c=a(".post_status_page").val()||"";if(typeof(e)=="object"){e=mla.utility.getId(e)}if(mla.settings.useSpinnerClass){a("table.widefat .inline-edit-save .spinner").addClass("is-active")}else{a("table.widefat .inline-edit-save .spinner").show()}d={action:mla.settings.ajax_action,mla_admin_nonce:mla.settings.ajax_nonce,post_type:"attachment",post_ID:e,edit_date:"true",post_status:c};b=a("#edit-"+e+" :input").serialize();d=b+"&"+a.param(d);a.post(ajaxurl,d,function(f){if(mla.settings.useSpinnerClass){a("table.widefat .inline-edit-save .spinner").removeClass("is-active")}else{a("table.widefat .inline-edit-save .spinner").hide()}if(f){if(-1!=f.indexOf("<tr")){if(mla.settings.useSpinnerClass){a(mla.inlineEditAttachment.what+e).siblings("tr.hidden").addBack().remove()}else{a(mla.inlineEditAttachment.what+e).remove()}a("#edit-"+e).before(f).remove();a(mla.inlineEditAttachment.what+e).hide().fadeIn()}else{f=f.replace(/<.[^<>]*?>/g,"");a("#edit-"+e+" .inline-edit-save .error").html(f).show()}}else{a("#edit-"+e+" .inline-edit-save .error").html(mla.settings.error).show()}},"html");return false},inlineParentOpen:function(e){var d,b,c;if(typeof(e)=="object"){b=mla.utility.getId(e);d=a("#edit-"+b+' :input[name="post_parent"]').val()||"";c=a("#edit-"+b+' :input[name="post_title"]').val()||"";mla.setParent.open(d,b,c);a("#mla-set-parent-submit").on("click",function(f){f.preventDefault();mla.inlineEditAttachment.inlineParentSave(b);return false})}},inlineParentSave:function(b){var f=a("#mla-set-parent-response-div input:checked").closest("tr"),h,e,c=a("#edit-"+b),d,g;if(f.length){h=a(":radio",f).val()||"";e=a("label",f).html()||"";d=a(':input[name="post_parent"]',c).clone(true).val(h);g=a(':input[name="post_parent_title"]',c).clone(true).val(e);a(':input[name="post_parent"]',c).replaceWith(d);a(':input[name="post_parent_title"]',c).replaceWith(g)}mla.setParent.close();a("#mla-set-parent-submit").off("click")},bulkParentOpen:function(){var d,b,c;b=-1;c=mla.settings.bulkTitle;d=a('#bulk-edit :input[name="post_parent"]').val()||-1;mla.setParent.open(d,b,c);a("#mla-set-parent-submit").on("click",function(e){e.preventDefault();mla.inlineEditAttachment.bulkParentSave();return false})},bulkParentSave:function(){var c=a("#mla-set-parent-response-div input:checked").closest("tr"),d,b;if(c.length){d=a(":radio",c).val()||"";b=a('#bulk-edit :input[name="post_parent"]').clone(true).val(d);a('#bulk-edit :input[name="post_parent"]').replaceWith(b)}mla.setParent.close();a("#mla-set-parent-submit").off("click")},tableParentOpen:function(d,b,c){mla.setParent.open(d,b,c);a("#mla-set-parent-submit").on("click",function(e){e.preventDefault();mla.inlineEditAttachment.tableParentSave(b);return false})},tableParentSave:function(b){var d=a("#mla-set-parent-response-div input:checked").closest("tr"),f=a(":radio",d).val()||"-1",c,e=a("#attachment-"+b+" td.attached_to").clone(true);if(d.length&&(f>=0)){e=a("#attachment-"+b+" td.attached_to").clone(true);e.html('<span class="spinner"></span>');a("#attachment-"+b+" td.attached_to").replaceWith(e);if(mla.settings.useSpinnerClass){a("#attachment-"+b+" td.attached_to .spinner").addClass("is-active")}else{a("#attachment-"+b+" td.attached_to .spinner").show()}c=a.param({action:mla.settings.ajax_action+"-set-parent",mla_admin_nonce:mla.settings.ajax_nonce,post_ID:b,post_parent:f});a.post(ajaxurl,c,function(g){if(g){if(-1==g.indexOf("tableParentOpen(")){g=g.replace(/<.[^<>]*?>/g,"")}}else{g=mla.settings.ajaxFailError}a("#attachment-"+b).before(g).remove();a("#attachment-"+b).hide().fadeIn()},"html")}else{e.html(mla.settings.error);a("#attachment-"+b+" td.attached_to").replaceWith(e)}a("#mla-set-parent-submit").off("click");mla.setParent.close()},doReset:function(){var g=a("table.widefat tr.inline-editor").attr("id"),d=a("table.widefat #bulk-edit"),c=a("#inlineedit #blank-bulk-edit"),b=a(".inline-edit-categories",c).html(),f=a(".inline-edit-tags",c).html(),e=a(".inline-edit-fields",c).html();if(g){if(mla.settings.useSpinnerClass){a("table.widefat .inline-edit-save .spinner").removeClass("is-active")}else{a("table.widefat .inline-edit-save .spinner").hide()}if("bulk-edit"==g){a(".inline-edit-categories",d).html(b),a(".inline-edit-tags",d).html(f),a(".inline-edit-fields",d).html(e);a("#bulk-edit-set-parent",d).on("click",function(){return mla.inlineEditAttachment.bulkParentOpen()})}}return false},revert:function(){var b=a("table.widefat tr.inline-editor").attr("id");if(b){if(mla.settings.useSpinnerClass){a("table.widefat .inline-edit-save .spinner").removeClass("is-active")}else{a("table.widefat .inline-edit-save .spinner").hide()}if("bulk-edit"==b){if(mla.settings.useSpinnerClass){a("table.widefat #bulk-edit").removeClass("inline-editor").hide().siblings("tr.hidden").remove()}else{a("table.widefat #bulk-edit").removeClass("inline-editor").hide()}a("#bulk-titles").html("");a("#inlineedit").append(a("#bulk-edit"))}else{if("bulk-progress"==b){a("table.widefat #bulk-progress").removeClass("inline-editor").hide();a("#bulk-progress-waiting").html("");a("#inlineedit").append(a("#bulk-progress"))}else{if(mla.settings.useSpinnerClass){a("#"+b).siblings("tr.hidden").addBack().remove()}else{a("#"+b).remove()}b=b.substr(b.lastIndexOf("-")+1);a(this.what+b).show()}}}return false}};a(document).ready(function(){mla.inlineEditAttachment.init()})})(jQuery);
|
1 |
+
var jQuery,mla_inline_edit_vars,mla={settings:{},bulkEdit:{inProcess:false,doCancel:false},utility:{getId:function(b){var c=jQuery(b).closest("tr").attr("id"),a=c.split("-");return a[a.length-1]}},setParent:null,inlineEditAttachment:null};(function(a){mla.settings=typeof mla_inline_edit_vars==="undefined"?{}:mla_inline_edit_vars;mla_inline_edit_vars=void 0;mla.inlineEditAttachment={init:function(){var d=this,e=a("#inline-edit"),c=a("#bulk-edit"),b=a("#bulk-progress");d.type="attachment";d.what="#attachment-";e.keyup(function(f){if(f.which==27){return mla.inlineEditAttachment.revert()}});c.keyup(function(f){if(f.which==27){return mla.inlineEditAttachment.revert()}});b.keyup(function(f){if(f.which==27){return mla.inlineEditAttachment.revert()}});a("#inline-edit-post-set-parent",e).on("click",function(){return mla.inlineEditAttachment.inlineParentOpen(this)});a("a.cancel",e).click(function(){return mla.inlineEditAttachment.revert()});a("a.save",e).click(function(){return mla.inlineEditAttachment.quickSave(this)});a("td",e).keydown(function(f){if(f.which==13){return mla.inlineEditAttachment.quickSave(this)}});a("#bulk-edit-set-parent",c).on("click",function(){return mla.inlineEditAttachment.bulkParentOpen()});a("a.cancel",c).click(function(){return mla.inlineEditAttachment.revert()});a("a.reset",c).click(function(){return mla.inlineEditAttachment.doReset()});a('input[type="submit"]',c).click(function(f){f.preventDefault();return mla.inlineEditAttachment.bulkSave(f)});a("a.cancel",b).click(function(){if(mla.bulkEdit.inProcess){mla.bulkEdit.doCancel=true;return false}else{return mla.inlineEditAttachment.revert()}});a("#bulk_refresh",b).click(function(){a("#bulk-progress a").prop("disabled",true);a("#bulk-progress").css("opacity","0.5")});a("#the-list").on("click","a.editinline",function(){mla.inlineEditAttachment.quickEdit(this);return false});a("span.catshow").click(function(){a(this).hide().next().show().parent().next().addClass("cat-hover")});a("span.cathide").click(function(){a(this).hide().prev().show().parent().next().removeClass("cat-hover")});a('select[name="_status"] option[value="future"]',c).remove();a("#doaction, #doaction2").click(function(f){var g=a(this).attr("id").substr(2);if(a('select[name="'+g+'"]').val()=="edit"){f.preventDefault();d.bulkEdit()}else{if(a("form#posts-filter tr.inline-editor").length>0){d.revert()}}});a("#post-query-submit").mousedown(function(){d.revert();a('select[name^="action"]').val("-1")})},bulkEdit:function(){var b="",d=true;this.revert();a("#bulk-edit td").attr("colspan",a("th:visible, td:visible",".widefat:first thead").length);if(mla.settings.useSpinnerClass){a("table.widefat tbody").prepend(a("#bulk-edit")).prepend('<tr class="hidden"></tr>')}else{a("table.widefat tbody").prepend(a("#bulk-edit"))}a("#bulk-edit").addClass("inline-editor").show();a('tbody th.check-column input[type="checkbox"]').each(function(){if(a(this).prop("checked")){d=false;var e=a(this).val(),c;c=a("#inline_"+e+" .post_title").text()||mla.settings.noTitle;b+='<div id="ttle'+e+'"><a id="_'+e+'" class="ntdelbutton" title="'+mla.settings.ntdelTitle+'">X</a>'+c+"</div>"}});if(d){return this.revert()}a("#bulk-titles").html(b);a("#bulk-titles a").click(function(){var c=a(this).attr("id").substr(1);a('table.widefat input[value="'+c+'"]').prop("checked",false);a("#ttle"+c).remove()});a("textarea.mla_tags").each(function(){var c=a(this).attr("name").replace("]","").replace("tax_input[","");a(this).suggest(ajaxurl+"?action=ajax-tag-search&tax="+c,{delay:500,minchars:2,multiple:true,multipleSep:mla.settings.comma+" "})});a("html, body").animate({scrollTop:0},"fast");if((typeof quicktags!=="undefined")&&(typeof mla.settings.quickTagsInit!=="undefined")){for(id in mla.settings.quickTagsInit){quicktags(mla.settings.quickTagsInit[id]);if(mla.settings.quickTagsInit[id]["active"]){window.wpActiveEditor=id}}}},bulkSave:function(c){var b;mla.bulkEdit={inProcess:false,doCancel:false,chunkSize:0,targetName:"",fields:"",ids:[],idsCount:0,offset:0,waiting:0,running:0,complete:0,unchanged:0,success:0,failure:0};mla.bulkEdit.chunkSize=+mla.settings.bulkChunkSize;mla.bulkEdit.targetName=c.target.name;mla.bulkEdit.fields=a("#bulk-edit :input").serialize();b=a('tbody th.check-column input[type="checkbox"]').serializeArray();a.each(b,function(d,e){mla.bulkEdit.ids[d]=+e.value});mla.bulkEdit.idsCount=mla.bulkEdit.waiting=mla.bulkEdit.ids.length;mla.inlineEditAttachment.bulkProgressOpen();mla.inlineEditAttachment.bulkPost();return false},bulkProgressOpen:function(){var b="",d=true;this.revert();a("#bulk-progress td").attr("colspan",a("th:visible, td:visible",".widefat:first thead").length);a("table.widefat tbody").prepend(a("#bulk-progress"));a("#bulk-progress").addClass("inline-editor").show();a("#cb-select-all-1").removeAttr("checked");a("#cb-select-all-2").removeAttr("checked");a('tbody th.check-column input[type="checkbox"]').each(function(){if(a(this).prop("checked")){d=false;var e=a(this).val(),c;c=a("#inline_"+e+" .post_title").text()||mla.settings.noTitle;b+='<div id="ttle'+e+'"><a id="_'+e+'" class="ntdelbutton" title="'+mla.settings.ntdelTitle+'">X</a>'+c+"</div>"}});if(d){return this.revert()}a("#bulk-progress-running").html("");a("#bulk-progress-complete").html("");a("#bulk-progress-waiting").html(b);a("#bulk-progress-waiting a").click(function(){var c=a(this).attr("id").substr(1);a('table.widefat input[value="'+c+'"]').prop("checked",false);a("#ttle"+c).remove()});a("#bulk-progress .inline-edit-save .error").html("");a("#bulk_refresh").prop("disabled",true).css("opacity","0.5");a("html, body").animate({scrollTop:0},"fast")},bulkPost:function(){var b,g,f,i,c,h=a("table.widefat .inline-edit-save .spinner"),d=a("#bulk-progress .inline-edit-save .error"),j=a("#bulk-progress-waiting"),e=a("#bulk-progress-running");g=mla.bulkEdit.ids.slice(mla.bulkEdit.offset,mla.bulkEdit.offset+mla.bulkEdit.chunkSize);for(f=0;f<g.length;f++){i=a("#ttle"+g[f],j).remove();a("a",i).hide();e.append(i)}mla.bulkEdit.waiting-=g.length;mla.bulkEdit.running=g.length;b={action:mla.settings.ajax_action,mla_admin_nonce:mla.settings.ajax_nonce,bulk_action:mla.bulkEdit.targetName,cb_offset:mla.bulkEdit.offset,cb_count:mla.bulkEdit.idsCount,cb_attachment:g};mla.bulkEdit.offset+=mla.bulkEdit.chunkSize;b=a.param(b)+"&"+mla.bulkEdit.fields;mla.bulkEdit.inProcess=true;if(mla.settings.useSpinnerClass){h.addClass("is-active")}else{h.show()}c=mla.settings.bulkWaiting+": "+mla.bulkEdit.waiting+", "+mla.settings.bulkComplete+": "+mla.bulkEdit.complete+", "+mla.settings.bulkUnchanged+": "+mla.bulkEdit.unchanged+", "+mla.settings.bulkSuccess+": "+mla.bulkEdit.success+", "+mla.settings.bulkFailure+": "+mla.bulkEdit.failure;d.html(c).show();a.ajax(ajaxurl,{type:"POST",data:b,dataType:"json"}).always(function(){if(mla.settings.useSpinnerClass){h.removeClass("is-active")}else{h.hide()}}).done(function(n,l){var o="no response.data",k,m;if(mla.settings.useSpinnerClass){h.removeClass("is-active")}else{h.hide()}if(n){if(!n.success){if(n.responseData){o=n.data}d.html(JSON.stringify(n)).show();mla.bulkEdit.offset=mla.bulkEdit.idsCount}else{m=a("#bulk-progress-running div").remove();a.each(m,function(){var p,q=a(this).html(),r=a(this).attr("id").substr(4);if("string"===typeof(n.data.item_results[r]["result"])){p=n.data.item_results[r]["result"];a(this).html(q+" ("+r+") - "+p)}a("#attachment-"+r).remove()});a("#bulk-progress-complete").append(m);mla.bulkEdit.complete+=mla.bulkEdit.running;mla.bulkEdit.running=0;mla.bulkEdit.unchanged+=n.data.unchanged;mla.bulkEdit.success+=n.data.success;mla.bulkEdit.failure+=n.data.failure;k=mla.settings.bulkWaiting+": "+mla.bulkEdit.waiting+", "+mla.settings.bulkComplete+": "+mla.bulkEdit.complete+", "+mla.settings.bulkUnchanged+": "+mla.bulkEdit.unchanged+", "+mla.settings.bulkSuccess+": "+mla.bulkEdit.success+", "+mla.settings.bulkFailure+": "+mla.bulkEdit.failure;d.html(k).show()}}else{d.html(mla.settings.error).show();mla.bulkEdit.offset=mla.bulkEdit.idsCount}if(mla.bulkEdit.doCancel){d.html(mla.settings.bulkCanceled+". "+k).show()}else{if(mla.bulkEdit.offset<mla.bulkEdit.idsCount){mla.inlineEditAttachment.bulkPost();return}}a("#bulk_refresh").prop("disabled",false).css("opacity","1.0");mla.bulkEdit.inProcess=false}).fail(function(l,k){if(200==l.status){d.text("("+k+") "+l.responseText)}else{d.text(mla.settings.ajaxFailError+" ("+k+"), jqXHR( "+l.status+", "+l.statusText+", "+l.responseText+")")}})},quickEdit:function(h){var d=this,b,c,f,e,g;d.revert();if(typeof(h)=="object"){h=mla.utility.getId(h)}b=mla.settings.fields;c=a("#inline-edit").clone(true);a("td",c).attr("colspan",a("th:visible, td:visible",".widefat:first thead").length);if(mla.settings.useSpinnerClass){a(d.what+h).hide().after(c).after('<tr class="hidden"></tr>')}else{if(a(d.what+h).hasClass("alternate")){a(c).addClass("alternate")}a(d.what+h).hide().after(c)}f=a("#inline_"+h);e=a(".item_thumbnail",f).html();if(e.length){a("#item_thumbnail",c).html(e)}if(!a(':input[name="post_author"] option[value="'+a(".post_author",f).text()+'"]',c).val()){a(':input[name="post_author"]',c).prepend('<option value="'+a(".post_author",f).text()+'">'+a("#"+d.type+"-"+h+" .author").text()+"</option>")}if(a(':input[name="post_author"] option',c).length==1){a("label.inline-edit-author",c).hide()}for(g=0;g<b.length;g++){a(':input[name="'+b[g]+'"]',c).val(a("."+b[g],f).text())}if(a(".image_alt",f).length===0){a("label.inline-edit-image-alt",c).hide()}a(".mla_category",f).each(function(){var i=a(this).text(),j;if(i){j=a(this).attr("id").replace("_"+h,"");a("ul."+j+"-checklist :checkbox",c).val(i.split(","))}});a(".mla_tags",f).each(function(){var l=a(this).text(),m=a(this).attr("id").replace("_"+h,""),k=a("textarea.tax_input_"+m,c),i=mla.settings.comma,j;if(l){if(","!==i){l=l.replace(/,/g,i)}k.val(l)}j=a(".lang",f).text();if(0<j.length){j="&lang="+j}else{j=""}k.suggest(ajaxurl+"?action=ajax-tag-search&tax="+m+"&preview_id="+h+j,{delay:500,minchars:2,multiple:true,multipleSep:mla.settings.comma+" "})});f=a(c).attr("id","edit-"+h).addClass("inline-editor").show().position().top;a(".ptitle",c).focus();a("html, body").animate({scrollTop:f},"fast");return false},quickSave:function(e){var d,b,c=a(".post_status_page").val()||"";if(typeof(e)=="object"){e=mla.utility.getId(e)}if(mla.settings.useSpinnerClass){a("table.widefat .inline-edit-save .spinner").addClass("is-active")}else{a("table.widefat .inline-edit-save .spinner").show()}d={action:mla.settings.ajax_action,mla_admin_nonce:mla.settings.ajax_nonce,post_type:"attachment",post_ID:e,edit_date:"true",post_status:c};b=a("#edit-"+e+" :input").serialize();d=b+"&"+a.param(d);a.post(ajaxurl,d,function(f){if(mla.settings.useSpinnerClass){a("table.widefat .inline-edit-save .spinner").removeClass("is-active")}else{a("table.widefat .inline-edit-save .spinner").hide()}if(f){if(-1!=f.indexOf("<tr")){if(mla.settings.useSpinnerClass){a(mla.inlineEditAttachment.what+e).siblings("tr.hidden").addBack().remove()}else{a(mla.inlineEditAttachment.what+e).remove()}a("#edit-"+e).before(f).remove();a(mla.inlineEditAttachment.what+e).hide().fadeIn()}else{f=f.replace(/<.[^<>]*?>/g,"");a("#edit-"+e+" .inline-edit-save .error").html(f).show()}}else{a("#edit-"+e+" .inline-edit-save .error").html(mla.settings.error).show()}},"html");return false},inlineParentOpen:function(e){var d,b,c;if(typeof(e)=="object"){b=mla.utility.getId(e);d=a("#edit-"+b+' :input[name="post_parent"]').val()||"";c=a("#edit-"+b+' :input[name="post_title"]').val()||"";mla.setParent.open(d,b,c);a("#mla-set-parent-submit").on("click",function(f){f.preventDefault();mla.inlineEditAttachment.inlineParentSave(b);return false})}},inlineParentSave:function(b){var f=a("#mla-set-parent-response-div input:checked").closest("tr"),h,e,c=a("#edit-"+b),d,g;if(f.length){h=a(":radio",f).val()||"";e=a("label",f).html()||"";d=a(':input[name="post_parent"]',c).clone(true).val(h);g=a(':input[name="post_parent_title"]',c).clone(true).val(e);a(':input[name="post_parent"]',c).replaceWith(d);a(':input[name="post_parent_title"]',c).replaceWith(g)}mla.setParent.close();a("#mla-set-parent-submit").off("click")},bulkParentOpen:function(){var d,b,c;b=-1;c=mla.settings.bulkTitle;d=a('#bulk-edit :input[name="post_parent"]').val()||-1;mla.setParent.open(d,b,c);a("#mla-set-parent-submit").on("click",function(e){e.preventDefault();mla.inlineEditAttachment.bulkParentSave();return false})},bulkParentSave:function(){var c=a("#mla-set-parent-response-div input:checked").closest("tr"),d,b;if(c.length){d=a(":radio",c).val()||"";b=a('#bulk-edit :input[name="post_parent"]').clone(true).val(d);a('#bulk-edit :input[name="post_parent"]').replaceWith(b)}mla.setParent.close();a("#mla-set-parent-submit").off("click")},tableParentOpen:function(d,b,c){mla.setParent.open(d,b,c);a("#mla-set-parent-submit").on("click",function(e){e.preventDefault();mla.inlineEditAttachment.tableParentSave(b);return false})},tableParentSave:function(b){var d=a("#mla-set-parent-response-div input:checked").closest("tr"),f=a(":radio",d).val()||"-1",c,e=a("#attachment-"+b+" td.attached_to").clone(true);if(d.length&&(f>=0)){e=a("#attachment-"+b+" td.attached_to").clone(true);e.html('<span class="spinner"></span>');a("#attachment-"+b+" td.attached_to").replaceWith(e);if(mla.settings.useSpinnerClass){a("#attachment-"+b+" td.attached_to .spinner").addClass("is-active")}else{a("#attachment-"+b+" td.attached_to .spinner").show()}c=a.param({action:mla.settings.ajax_action+"-set-parent",mla_admin_nonce:mla.settings.ajax_nonce,post_ID:b,post_parent:f});a.post(ajaxurl,c,function(g){if(g){if(-1==g.indexOf("tableParentOpen(")){g=g.replace(/<.[^<>]*?>/g,"")}}else{g=mla.settings.ajaxFailError}a("#attachment-"+b).before(g).remove();a("#attachment-"+b).hide().fadeIn()},"html")}else{e.html(mla.settings.error);a("#attachment-"+b+" td.attached_to").replaceWith(e)}a("#mla-set-parent-submit").off("click");mla.setParent.close()},doReset:function(){var g=a("table.widefat tr.inline-editor").attr("id"),d=a("table.widefat #bulk-edit"),c=a("#inlineedit #blank-bulk-edit"),b=a(".inline-edit-categories",c).html(),f=a(".inline-edit-tags",c).html(),e=a(".inline-edit-fields",c).html();if(g){if(mla.settings.useSpinnerClass){a("table.widefat .inline-edit-save .spinner").removeClass("is-active")}else{a("table.widefat .inline-edit-save .spinner").hide()}if("bulk-edit"==g){a(".inline-edit-categories",d).html(b),a(".inline-edit-tags",d).html(f),a(".inline-edit-fields",d).html(e);if((typeof quicktags!=="undefined")&&(typeof mla.settings.quickTagsInit!=="undefined")){for(g in mla.settings.quickTagsInit){quicktags(mla.settings.quickTagsInit[g]);if(mla.settings.quickTagsInit[g]["active"]){window.wpActiveEditor=g}}}a("#bulk-edit-set-parent",d).on("click",function(){return mla.inlineEditAttachment.bulkParentOpen()})}}return false},revert:function(){var b=a("table.widefat tr.inline-editor").attr("id");if(b){if(mla.settings.useSpinnerClass){a("table.widefat .inline-edit-save .spinner").removeClass("is-active")}else{a("table.widefat .inline-edit-save .spinner").hide()}if("bulk-edit"==b){if(mla.settings.useSpinnerClass){a("table.widefat #bulk-edit").removeClass("inline-editor").hide().siblings("tr.hidden").remove()}else{a("table.widefat #bulk-edit").removeClass("inline-editor").hide()}a("#bulk-titles").html("");a("#inlineedit").append(a("#bulk-edit"))}else{if("bulk-progress"==b){a("table.widefat #bulk-progress").removeClass("inline-editor").hide();a("#bulk-progress-waiting").html("");a("#inlineedit").append(a("#bulk-progress"))}else{if(mla.settings.useSpinnerClass){a("#"+b).siblings("tr.hidden").addBack().remove()}else{a("#"+b).remove()}b=b.substr(b.lastIndexOf("-")+1);a(this.what+b).show()}}}return false}};a(document).ready(function(){mla.inlineEditAttachment.init()})})(jQuery);
|
languages/media-library-assistant-en_US - References.pot
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
msgid ""
|
3 |
msgstr ""
|
4 |
"Project-Id-Version: Media Library Assistant\n"
|
5 |
-
"POT-Creation-Date: 2017-
|
6 |
"PO-Revision-Date: 2015-08-21 21:38-0800\n"
|
7 |
"Last-Translator: David Lingren <david@fairtradejudaica.org>\n"
|
8 |
"Language-Team: David Lingren <david@fairtradejudaica.org>\n"
|
@@ -22,7 +22,7 @@ msgstr ""
|
|
22 |
|
23 |
#: includes/class-mla-admin-columns-support-deprecated.php:33
|
24 |
#: includes/class-mla-admin-columns-support.php:55
|
25 |
-
#: includes/class-mla-core-options.php:
|
26 |
#: includes/class-mla-settings.php:1450 includes/class-mla-settings.php:1470
|
27 |
#: index.php:48
|
28 |
msgid "Media Library Assistant"
|
@@ -30,29 +30,29 @@ msgstr ""
|
|
30 |
|
31 |
#: includes/class-mla-admin-columns-support-deprecated.php:34
|
32 |
#: includes/class-mla-admin-columns-support.php:56
|
33 |
-
#: includes/class-mla-core-options.php:
|
34 |
msgid "Assistant"
|
35 |
msgstr ""
|
36 |
|
37 |
-
#: includes/class-mla-ajax.php:
|
38 |
-
#: includes/class-mla-data.php:
|
39 |
-
#: includes/class-mla-main.php:
|
40 |
-
#: includes/class-mla-objects.php:
|
41 |
#: includes/mla-main-search-box-template.php:47
|
42 |
#: includes/mla-media-modal-js-template.php:40
|
43 |
msgid "Title"
|
44 |
msgstr ""
|
45 |
|
46 |
-
#: includes/class-mla-ajax.php:
|
47 |
-
#: includes/class-mla-thumbnail-generation.php:
|
48 |
msgid "Type"
|
49 |
msgstr ""
|
50 |
|
51 |
-
#: includes/class-mla-ajax.php:
|
52 |
msgid "Date"
|
53 |
msgstr ""
|
54 |
|
55 |
-
#: includes/class-mla-ajax.php:
|
56 |
#: includes/class-mla-settings-custom-fields-tab.php:497
|
57 |
#: includes/class-mla-settings-custom-fields-tab.php:779
|
58 |
#: includes/class-mla-settings-iptc-exif-tab.php:506
|
@@ -61,41 +61,41 @@ msgstr ""
|
|
61 |
msgid "Status"
|
62 |
msgstr ""
|
63 |
|
64 |
-
#: includes/class-mla-ajax.php:
|
65 |
-
#: includes/class-mla-list-table.php:1030 includes/class-mla-main.php:
|
66 |
#: includes/class-mla-polylang-support.php:359
|
67 |
#: includes/class-mla-thumbnail-generation.php:97
|
68 |
msgid "(no title)"
|
69 |
msgstr ""
|
70 |
|
71 |
-
#: includes/class-mla-ajax.php:
|
72 |
msgid "Published"
|
73 |
msgstr ""
|
74 |
|
75 |
-
#: includes/class-mla-ajax.php:
|
76 |
#: includes/class-mla-list-table.php:631
|
77 |
msgid "Scheduled"
|
78 |
msgstr ""
|
79 |
|
80 |
-
#: includes/class-mla-ajax.php:
|
81 |
msgid "Pending Review"
|
82 |
msgstr ""
|
83 |
|
84 |
-
#: includes/class-mla-ajax.php:
|
85 |
#: includes/class-mla-list-table.php:628
|
86 |
msgid "Draft"
|
87 |
msgstr ""
|
88 |
|
89 |
-
#: includes/class-mla-ajax.php:
|
90 |
#: includes/class-mla-list-table.php:1468
|
91 |
#: includes/class-mla-list-table.php:1532
|
92 |
msgid "Y/m/d"
|
93 |
msgstr ""
|
94 |
|
95 |
-
#: includes/class-mla-ajax.php:
|
96 |
-
#: includes/class-mla-ajax.php:
|
97 |
-
#: includes/class-mla-core.php:
|
98 |
-
#: includes/class-mla-core.php:
|
99 |
#: includes/class-mla-data-pdf.php:216 includes/class-mla-data-pdf.php:517
|
100 |
#: includes/class-mla-data-pdf.php:519 includes/class-mla-data-pdf.php:565
|
101 |
#: includes/class-mla-data-pdf.php:749 includes/class-mla-data-query.php:674
|
@@ -105,40 +105,40 @@ msgstr ""
|
|
105 |
#: includes/class-mla-data.php:563 includes/class-mla-data.php:1261
|
106 |
#: includes/class-mla-data.php:1459 includes/class-mla-data.php:1465
|
107 |
#: includes/class-mla-data.php:1862 includes/class-mla-data.php:1866
|
108 |
-
#: includes/class-mla-data.php:
|
109 |
-
#: includes/class-mla-data.php:
|
110 |
-
#: includes/class-mla-data.php:
|
111 |
-
#: includes/class-mla-data.php:
|
112 |
-
#: includes/class-mla-data.php:
|
113 |
-
#: includes/class-mla-
|
114 |
-
#: includes/class-mla-edit-media.php:
|
115 |
-
#: includes/class-mla-main.php:
|
116 |
-
#: includes/class-mla-main.php:
|
117 |
-
#: includes/class-mla-main.php:
|
118 |
-
#: includes/class-mla-main.php:
|
119 |
-
#: includes/class-mla-main.php:
|
120 |
-
#: includes/class-mla-main.php:
|
121 |
-
#: includes/class-mla-main.php:
|
122 |
-
#: includes/class-mla-main.php:
|
123 |
-
#: includes/class-mla-main.php:
|
124 |
-
#: includes/class-mla-
|
125 |
-
#: includes/class-mla-mime-types.php:
|
126 |
-
#: includes/class-mla-mime-types.php:
|
127 |
-
#: includes/class-mla-mime-types.php:
|
128 |
-
#: includes/class-mla-mime-types.php:
|
129 |
-
#: includes/class-mla-mime-types.php:
|
130 |
-
#: includes/class-mla-mime-types.php:
|
131 |
-
#: includes/class-mla-mime-types.php:
|
132 |
-
#: includes/class-mla-mime-types.php:
|
133 |
-
#: includes/class-mla-mime-types.php:
|
134 |
-
#: includes/class-mla-mime-types.php:
|
135 |
-
#: includes/class-mla-mime-types.php:
|
136 |
-
#: includes/class-mla-mime-types.php:
|
137 |
-
#: includes/class-mla-mime-types.php:
|
138 |
-
#: includes/class-mla-mime-types.php:
|
139 |
-
#: includes/class-mla-mime-types.php:
|
140 |
-
#: includes/class-mla-mime-types.php:
|
141 |
-
#: includes/class-mla-mime-types.php:
|
142 |
#: includes/class-mla-options.php:219 includes/class-mla-options.php:421
|
143 |
#: includes/class-mla-options.php:500 includes/class-mla-options.php:1003
|
144 |
#: includes/class-mla-options.php:1440 includes/class-mla-options.php:1453
|
@@ -161,10 +161,10 @@ msgstr ""
|
|
161 |
#: includes/class-mla-settings-custom-fields-tab.php:904
|
162 |
#: includes/class-mla-settings-custom-fields-tab.php:908
|
163 |
#: includes/class-mla-settings-custom-fields-tab.php:932
|
164 |
-
#: includes/class-mla-settings-custom-fields-tab.php:
|
165 |
#: includes/class-mla-settings-documentation-tab.php:97
|
166 |
#: includes/class-mla-settings-documentation-tab.php:297
|
167 |
-
#: includes/class-mla-settings-documentation-tab.php:
|
168 |
#: includes/class-mla-settings-iptc-exif-tab.php:169
|
169 |
#: includes/class-mla-settings-iptc-exif-tab.php:235
|
170 |
#: includes/class-mla-settings-iptc-exif-tab.php:239
|
@@ -178,7 +178,7 @@ msgstr ""
|
|
178 |
#: includes/class-mla-settings-iptc-exif-tab.php:975
|
179 |
#: includes/class-mla-settings-iptc-exif-tab.php:979
|
180 |
#: includes/class-mla-settings-iptc-exif-tab.php:1003
|
181 |
-
#: includes/class-mla-settings-iptc-exif-tab.php:
|
182 |
#: includes/class-mla-settings-shortcodes-tab.php:79
|
183 |
#: includes/class-mla-settings-shortcodes-tab.php:90
|
184 |
#: includes/class-mla-settings-shortcodes-tab.php:94
|
@@ -188,7 +188,7 @@ msgstr ""
|
|
188 |
#: includes/class-mla-settings-shortcodes-tab.php:210
|
189 |
#: includes/class-mla-settings-shortcodes-tab.php:214
|
190 |
#: includes/class-mla-settings-shortcodes-tab.php:503
|
191 |
-
#: includes/class-mla-settings-shortcodes-tab.php:
|
192 |
#: includes/class-mla-settings-upload-tab.php:301
|
193 |
#: includes/class-mla-settings-upload-tab.php:353
|
194 |
#: includes/class-mla-settings-upload-tab.php:432
|
@@ -208,14 +208,14 @@ msgstr ""
|
|
208 |
#: includes/class-mla-settings.php:1798 includes/class-mla-settings.php:1805
|
209 |
#: includes/class-mla-settings.php:1814 includes/class-mla-settings.php:1851
|
210 |
#: includes/class-mla-settings.php:1859 includes/class-mla-settings.php:1868
|
211 |
-
#: includes/class-mla-shortcode-support.php:
|
212 |
-
#: includes/class-mla-shortcode-support.php:
|
213 |
-
#: includes/class-mla-shortcode-support.php:
|
214 |
-
#: includes/class-mla-shortcode-support.php:
|
215 |
-
#: includes/class-mla-shortcode-support.php:
|
216 |
-
#: includes/class-mla-shortcode-support.php:
|
217 |
-
#: includes/class-mla-shortcode-support.php:
|
218 |
-
#: includes/class-mla-shortcode-support.php:
|
219 |
#: includes/class-mla-thumbnail-generation.php:416
|
220 |
#: includes/class-mla-thumbnail-generation.php:428
|
221 |
#: includes/class-mla-thumbnail-generation.php:440
|
@@ -223,61 +223,61 @@ msgstr ""
|
|
223 |
msgid "ERROR"
|
224 |
msgstr ""
|
225 |
|
226 |
-
#: includes/class-mla-ajax.php:
|
227 |
msgid "No post ID found"
|
228 |
msgstr ""
|
229 |
|
230 |
-
#: includes/class-mla-ajax.php:
|
231 |
#: includes/class-mla-polylang-support.php:256
|
232 |
msgid "You are not allowed to edit this Attachment."
|
233 |
msgstr ""
|
234 |
|
235 |
-
#: includes/class-mla-core-options.php:
|
236 |
msgid "Attachment Categories"
|
237 |
msgstr ""
|
238 |
|
239 |
-
#: includes/class-mla-core-options.php:
|
240 |
msgid "Check this option to add support for Attachment Categories."
|
241 |
msgstr ""
|
242 |
|
243 |
-
#: includes/class-mla-core-options.php:
|
244 |
msgid "Attachment Tags"
|
245 |
msgstr ""
|
246 |
|
247 |
-
#: includes/class-mla-core-options.php:
|
248 |
msgid "Check this option to add support for Attachment Tags."
|
249 |
msgstr ""
|
250 |
|
251 |
-
#: includes/class-mla-core-options.php:
|
252 |
msgid "Where-used Reporting"
|
253 |
msgstr ""
|
254 |
|
255 |
-
#: includes/class-mla-core-options.php:
|
256 |
msgid "Exclude Revisions"
|
257 |
msgstr ""
|
258 |
|
259 |
-
#: includes/class-mla-core-options.php:
|
260 |
msgid "Check this option to exclude revisions from where-used reporting."
|
261 |
msgstr ""
|
262 |
|
263 |
-
#: includes/class-mla-core-options.php:
|
264 |
msgid "Where-used database access tuning"
|
265 |
msgstr ""
|
266 |
|
267 |
-
#: includes/class-mla-core-options.php:
|
268 |
#: includes/class-mla-edit-media.php:672 includes/class-mla-edit-media.php:922
|
269 |
msgid "Featured in"
|
270 |
msgstr ""
|
271 |
|
272 |
-
#: includes/class-mla-core-options.php:
|
273 |
-
#: includes/class-mla-core-options.php:
|
274 |
msgid "Enabled"
|
275 |
msgstr ""
|
276 |
|
277 |
-
#: includes/class-mla-core-options.php:
|
278 |
-
#: includes/class-mla-core-options.php:
|
279 |
-
#: includes/class-mla-core-options.php:
|
280 |
-
#: includes/class-mla-core-options.php:
|
281 |
#: includes/class-mla-list-table.php:1136
|
282 |
#: includes/class-mla-list-table.php:1181
|
283 |
#: includes/class-mla-list-table.php:1231
|
@@ -285,63 +285,63 @@ msgstr ""
|
|
285 |
msgid "Disabled"
|
286 |
msgstr ""
|
287 |
|
288 |
-
#: includes/class-mla-core-options.php:
|
289 |
msgid "Search database posts and pages for Featured Image attachments."
|
290 |
msgstr ""
|
291 |
|
292 |
-
#: includes/class-mla-core-options.php:
|
293 |
#: includes/class-mla-edit-media.php:676 includes/class-mla-edit-media.php:961
|
294 |
msgid "Inserted in"
|
295 |
msgstr ""
|
296 |
|
297 |
-
#: includes/class-mla-core-options.php:
|
298 |
msgid "Base"
|
299 |
msgstr ""
|
300 |
|
301 |
-
#: includes/class-mla-core-options.php:
|
302 |
msgid ""
|
303 |
"Search database posts and pages for attachments embedded in content."
|
304 |
"<br> Base = ignore intermediate size suffixes; use path, base "
|
305 |
"name and extension only."
|
306 |
msgstr ""
|
307 |
|
308 |
-
#: includes/class-mla-core-options.php:
|
309 |
#: includes/class-mla-edit-media.php:680 includes/class-mla-edit-media.php:996
|
310 |
#: includes/class-mla-settings.php:1564
|
311 |
msgid "Gallery in"
|
312 |
msgstr ""
|
313 |
|
314 |
-
#: includes/class-mla-core-options.php:
|
315 |
-
#: includes/class-mla-core-options.php:
|
316 |
msgid "Dynamic"
|
317 |
msgstr ""
|
318 |
|
319 |
-
#: includes/class-mla-core-options.php:
|
320 |
-
#: includes/class-mla-core-options.php:
|
321 |
#: includes/class-mla-settings-custom-fields-tab.php:709
|
322 |
#: includes/class-mla-settings-iptc-exif-tab.php:789
|
323 |
msgid "Refresh"
|
324 |
msgstr ""
|
325 |
|
326 |
-
#: includes/class-mla-core-options.php:
|
327 |
-
#: includes/class-mla-core-options.php:
|
328 |
msgid "Cached"
|
329 |
msgstr ""
|
330 |
|
331 |
-
#: includes/class-mla-core-options.php:
|
332 |
msgid ""
|
333 |
"Search database posts and pages for [ gallery ] shortcode results.<br> "
|
334 |
" Dynamic = once every page load, Cached = once every login, Disabled = "
|
335 |
"never.<br> Refresh = update references, then set to Cached."
|
336 |
msgstr ""
|
337 |
|
338 |
-
#: includes/class-mla-core-options.php:
|
339 |
#: includes/class-mla-edit-media.php:684 includes/class-mla-edit-media.php:1031
|
340 |
#: includes/class-mla-settings.php:1574
|
341 |
msgid "MLA Gallery in"
|
342 |
msgstr ""
|
343 |
|
344 |
-
#: includes/class-mla-core-options.php:
|
345 |
msgid ""
|
346 |
"Search database posts and pages for [mla_gallery] shortcode results."
|
347 |
"<br> Dynamic = once every page load, Cached = once every login, "
|
@@ -349,119 +349,119 @@ msgid ""
|
|
349 |
"Cached."
|
350 |
msgstr ""
|
351 |
|
352 |
-
#: includes/class-mla-core-options.php:
|
353 |
msgid "Taxonomy Support"
|
354 |
msgstr ""
|
355 |
|
356 |
-
#: includes/class-mla-core-options.php:
|
357 |
msgid "Compute Attachments Column"
|
358 |
msgstr ""
|
359 |
|
360 |
-
#: includes/class-mla-core-options.php:
|
361 |
msgid ""
|
362 |
"Check this option to calculate attachments per term in the Attachments "
|
363 |
"Column."
|
364 |
msgstr ""
|
365 |
|
366 |
-
#: includes/class-mla-core-options.php:
|
367 |
msgid "Show Count Column"
|
368 |
msgstr ""
|
369 |
|
370 |
-
#: includes/class-mla-core-options.php:
|
371 |
msgid ""
|
372 |
"Check this option to display the Count column on Categories and Tags "
|
373 |
"taxonomy edit screens."
|
374 |
msgstr ""
|
375 |
|
376 |
-
#: includes/class-mla-core-options.php:
|
377 |
msgid ""
|
378 |
"Check the \"<strong>Support</strong>\" box to add the taxonomy to the "
|
379 |
"Assistant and the Edit Media screen."
|
380 |
msgstr ""
|
381 |
|
382 |
-
#: includes/class-mla-core-options.php:
|
383 |
msgid ""
|
384 |
"Check the \"<strong>Inline Edit</strong>\" box to display the taxonomy in "
|
385 |
"the Quick Edit and Bulk Edit areas."
|
386 |
msgstr ""
|
387 |
|
388 |
-
#: includes/class-mla-core-options.php:
|
389 |
msgid ""
|
390 |
"Check the \"<strong>Term Search</strong>\" box to add the taxonomy to the "
|
391 |
"\"Search Media/Terms\" list."
|
392 |
msgstr ""
|
393 |
|
394 |
-
#: includes/class-mla-core-options.php:
|
395 |
-
#: includes/class-mla-core-options.php:
|
396 |
#: includes/class-mla-settings.php:1089 includes/class-mla-settings.php:1090
|
397 |
msgid "For complete documentation"
|
398 |
msgstr ""
|
399 |
|
400 |
-
#: includes/class-mla-core-options.php:
|
401 |
-
#: includes/class-mla-core-options.php:
|
402 |
#: includes/class-mla-settings.php:1089 includes/class-mla-settings.php:1090
|
403 |
msgid "click here"
|
404 |
msgstr ""
|
405 |
|
406 |
-
#: includes/class-mla-core-options.php:
|
407 |
msgid ""
|
408 |
"Check the \"<strong>Checklist</strong>\" box to enable the checklist-style "
|
409 |
"meta box for a flat taxonomy."
|
410 |
msgstr ""
|
411 |
|
412 |
-
#: includes/class-mla-core-options.php:
|
413 |
msgid ""
|
414 |
"You must also check the <strong>\"Enable enhanced checklist taxonomies\"</"
|
415 |
"strong> box below to enable this feature."
|
416 |
msgstr ""
|
417 |
|
418 |
-
#: includes/class-mla-core-options.php:
|
419 |
msgid ""
|
420 |
"Check the \"<strong>Checked On Top</strong>\" box to moved checked terms to "
|
421 |
"the top of the checklist-style meta box."
|
422 |
msgstr ""
|
423 |
|
424 |
-
#: includes/class-mla-core-options.php:
|
425 |
msgid ""
|
426 |
"Use the \"<strong>List Filter</strong>\" option to select the taxonomy (or "
|
427 |
"custom field) on which to filter the Assistant table listing."
|
428 |
msgstr ""
|
429 |
|
430 |
-
#: includes/class-mla-core-options.php:
|
431 |
msgid ""
|
432 |
"To <strong>filter on a custom field</strong>, enter the field name and "
|
433 |
"select ASC (Ascending) or DESC (Descending) order."
|
434 |
msgstr ""
|
435 |
|
436 |
-
#: includes/class-mla-core-options.php:
|
437 |
msgid "Media/Assistant Screen Options"
|
438 |
msgstr ""
|
439 |
|
440 |
-
#: includes/class-mla-core-options.php:
|
441 |
msgid "Admin Menu Options"
|
442 |
msgstr ""
|
443 |
|
444 |
-
#: includes/class-mla-core-options.php:
|
445 |
msgid "Page Title"
|
446 |
msgstr ""
|
447 |
|
448 |
-
#: includes/class-mla-core-options.php:
|
449 |
msgid "Enter the title for the Media/Assistant submenu page"
|
450 |
msgstr ""
|
451 |
|
452 |
-
#: includes/class-mla-core-options.php:
|
453 |
msgid "Menu Title"
|
454 |
msgstr ""
|
455 |
|
456 |
-
#: includes/class-mla-core-options.php:
|
457 |
msgid "Enter the title for the Media/Assistant submenu entry"
|
458 |
msgstr ""
|
459 |
|
460 |
-
#: includes/class-mla-core-options.php:
|
461 |
msgid "Submenu Order"
|
462 |
msgstr ""
|
463 |
|
464 |
-
#: includes/class-mla-core-options.php:
|
465 |
msgid ""
|
466 |
"Enter the position of the Media/Assistant submenu entry.<br> 0 = "
|
467 |
"natural order (at bottom), 1 - 4 = at top<br> "
|
@@ -469,295 +469,305 @@ msgid ""
|
|
469 |
"\""
|
470 |
msgstr ""
|
471 |
|
472 |
-
#: includes/class-mla-core-options.php:
|
473 |
msgid "Display Media/Library"
|
474 |
msgstr ""
|
475 |
|
476 |
-
#: includes/class-mla-core-options.php:
|
477 |
msgid ""
|
478 |
"Check/uncheck this option to display/remove the WordPress Media/Library "
|
479 |
"submenu entry."
|
480 |
msgstr ""
|
481 |
|
482 |
-
#: includes/class-mla-core-options.php:
|
483 |
msgid "Display Media/Assistant list/grid view switcher"
|
484 |
msgstr ""
|
485 |
|
486 |
-
#: includes/class-mla-core-options.php:
|
487 |
msgid ""
|
488 |
"Check/uncheck this option to display/remove the \"list/grid\" view switcher "
|
489 |
"on the Media/Assistant submenu."
|
490 |
msgstr ""
|
491 |
|
492 |
-
#: includes/class-mla-core-options.php:
|
493 |
msgid "Table Defaults"
|
494 |
msgstr ""
|
495 |
|
496 |
-
#: includes/class-mla-core-options.php:
|
497 |
msgid "Order By"
|
498 |
msgstr ""
|
499 |
|
500 |
-
#: includes/class-mla-core-options.php:
|
501 |
-
#: includes/class-mla-core-options.php:
|
502 |
-
#: includes/class-mla-core-options.php:
|
503 |
-
#: includes/class-mla-core-options.php:
|
504 |
#: includes/class-mla-list-table.php:486 includes/class-mla-list-table.php:1389
|
505 |
#: includes/class-mla-settings-shortcodes-tab.php:629
|
506 |
msgid "None"
|
507 |
msgstr ""
|
508 |
|
509 |
-
#: includes/class-mla-core-options.php:
|
510 |
msgid "ID/Parent"
|
511 |
msgstr ""
|
512 |
|
513 |
-
#: includes/class-mla-core-options.php:
|
514 |
msgid "Select the column for the sort order of the Assistant table listing."
|
515 |
msgstr ""
|
516 |
|
517 |
-
#: includes/class-mla-core-options.php:
|
518 |
msgid "Order"
|
519 |
msgstr ""
|
520 |
|
521 |
-
#: includes/class-mla-core-options.php:
|
522 |
msgid "Ascending"
|
523 |
msgstr ""
|
524 |
|
525 |
-
#: includes/class-mla-core-options.php:
|
526 |
msgid "Descending"
|
527 |
msgstr ""
|
528 |
|
529 |
-
#: includes/class-mla-core-options.php:
|
530 |
-
#: includes/class-mla-core-options.php:
|
531 |
msgid "Choose the sort order."
|
532 |
msgstr ""
|
533 |
|
534 |
-
#: includes/class-mla-core-options.php:
|
535 |
msgid "Views Width"
|
536 |
msgstr ""
|
537 |
|
538 |
-
#: includes/class-mla-core-options.php:
|
539 |
msgid "Enter the width for the views list, in pixels (px) or percent (%)"
|
540 |
msgstr ""
|
541 |
|
542 |
-
#: includes/class-mla-core-options.php:
|
543 |
msgid "Icon Size"
|
544 |
msgstr ""
|
545 |
|
546 |
-
#: includes/class-mla-core-options.php:
|
547 |
msgid "Enter the size of the thumbnail/icon images, in pixels"
|
548 |
msgstr ""
|
549 |
|
550 |
-
#: includes/class-mla-core-options.php:
|
551 |
msgid "Show Primary Column File Name"
|
552 |
msgstr ""
|
553 |
|
554 |
-
#: includes/class-mla-core-options.php:
|
555 |
msgid ""
|
556 |
"Check/uncheck this option to show/omit the file name from the primary column."
|
557 |
msgstr ""
|
558 |
|
559 |
-
#: includes/class-mla-core-options.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
560 |
msgid "Bulk Chunk Size"
|
561 |
msgstr ""
|
562 |
|
563 |
-
#: includes/class-mla-core-options.php:
|
564 |
msgid "Enter the size of the Bulk Edit and Map All processing chunks"
|
565 |
msgstr ""
|
566 |
|
567 |
-
#: includes/class-mla-core-options.php:
|
568 |
msgid "Taxonomy Filter parameters"
|
569 |
msgstr ""
|
570 |
|
571 |
-
#: includes/class-mla-core-options.php:
|
572 |
msgid "Maximum Depth"
|
573 |
msgstr ""
|
574 |
|
575 |
-
#: includes/class-mla-core-options.php:
|
576 |
msgid ""
|
577 |
"Enter the number of levels displayed for hierarchial taxonomies; enter zero "
|
578 |
"for no limit."
|
579 |
msgstr ""
|
580 |
|
581 |
-
#: includes/class-mla-core-options.php:
|
582 |
msgid "Include Children"
|
583 |
msgstr ""
|
584 |
|
585 |
-
#: includes/class-mla-core-options.php:
|
586 |
msgid ""
|
587 |
"Check/uncheck this option to include/exclude children for hierarchical "
|
588 |
"taxonomies."
|
589 |
msgstr ""
|
590 |
|
591 |
-
#: includes/class-mla-core-options.php:
|
592 |
msgid "Search Media Defaults"
|
593 |
msgstr ""
|
594 |
|
595 |
-
#: includes/class-mla-core-options.php:
|
596 |
msgid "Display Search Controls"
|
597 |
msgstr ""
|
598 |
|
599 |
-
#: includes/class-mla-core-options.php:
|
600 |
-
#: includes/class-mla-core-options.php:
|
601 |
msgid ""
|
602 |
"Check/uncheck this option to display/hide the and/or connector and search "
|
603 |
"fields controls."
|
604 |
msgstr ""
|
605 |
|
606 |
-
#: includes/class-mla-core-options.php:
|
607 |
msgid ""
|
608 |
"Use these controls to set defaults for the and/or connector and search "
|
609 |
"fields controls.<br>These defaults will be used for the Search Media boxes "
|
610 |
"on both the Media/Assistant submenu<br>and the Media Manager Modal Window."
|
611 |
msgstr ""
|
612 |
|
613 |
-
#: includes/class-mla-core-options.php:
|
614 |
msgid "Media/Edit Media Enhancements"
|
615 |
msgstr ""
|
616 |
|
617 |
-
#: includes/class-mla-core-options.php:
|
618 |
msgid "Enable "enhanced checklist" taxonomies"
|
619 |
msgstr ""
|
620 |
|
621 |
-
#: includes/class-mla-core-options.php:
|
622 |
msgid ""
|
623 |
"Check this option to enable the \"? Search\" feature for hierarchical "
|
624 |
"taxonomies, e.g., Att. Categories.<br> This option also enables "
|
625 |
"the \"checklist-style\" support for flat taxonomies, e.g., Att. Tags."
|
626 |
msgstr ""
|
627 |
|
628 |
-
#: includes/class-mla-core-options.php:
|
629 |
msgid "Enable Edit Media additional meta boxes"
|
630 |
msgstr ""
|
631 |
|
632 |
-
#: includes/class-mla-core-options.php:
|
633 |
msgid ""
|
634 |
"Check this option to add \"Parent Info\", \"Menu Order\", \"Attachment "
|
635 |
"Metadata\" and four \"where-used\" meta boxes to the Edit Media screen."
|
636 |
msgstr ""
|
637 |
|
638 |
-
#: includes/class-mla-core-options.php:
|
639 |
msgid "You can also use Filters to customize the meta boxes."
|
640 |
msgstr ""
|
641 |
|
642 |
-
#: includes/class-mla-core-options.php:
|
643 |
msgid "Media/Add New Enhancements"
|
644 |
msgstr ""
|
645 |
|
646 |
-
#: includes/class-mla-core-options.php:
|
647 |
msgid "Enable "bulk edit" area"
|
648 |
msgstr ""
|
649 |
|
650 |
-
#: includes/class-mla-core-options.php:
|
651 |
msgid ""
|
652 |
"Check this option to enable the \"Bulk Edit area\" feature on the Media/Add "
|
653 |
"New screen."
|
654 |
msgstr ""
|
655 |
|
656 |
-
#: includes/class-mla-core-options.php:
|
657 |
msgid ""bulk edit" area on top"
|
658 |
msgstr ""
|
659 |
|
660 |
-
#: includes/class-mla-core-options.php:
|
661 |
msgid ""
|
662 |
"Check this option to move the \"Bulk Edit area\" to the top of the Media/Add "
|
663 |
"New screen."
|
664 |
msgstr ""
|
665 |
|
666 |
-
#: includes/class-mla-core-options.php:
|
667 |
msgid ""bulk edit" area initially open"
|
668 |
msgstr ""
|
669 |
|
670 |
-
#: includes/class-mla-core-options.php:
|
671 |
msgid ""
|
672 |
"Check this option to automatically open the \"Bulk Edit area\" when the "
|
673 |
"Media/Add New screen is displayed."
|
674 |
msgstr ""
|
675 |
|
676 |
-
#: includes/class-mla-core-options.php:
|
677 |
msgid "Media Manager/Media Grid Enhancements"
|
678 |
msgstr ""
|
679 |
|
680 |
-
#: includes/class-mla-core-options.php:
|
681 |
msgid "Enable Media Grid Enhancements"
|
682 |
msgstr ""
|
683 |
|
684 |
-
#: includes/class-mla-core-options.php:
|
685 |
msgid ""
|
686 |
"Check/uncheck this option to enable/disable Media Library Grid View "
|
687 |
"Enhancements."
|
688 |
msgstr ""
|
689 |
|
690 |
-
#: includes/class-mla-core-options.php:
|
691 |
msgid "Enable Media Manager Enhancements"
|
692 |
msgstr ""
|
693 |
|
694 |
-
#: includes/class-mla-core-options.php:
|
695 |
msgid ""
|
696 |
"Check/uncheck this option to enable/disable Media Manager Modal Window "
|
697 |
"Enhancements."
|
698 |
msgstr ""
|
699 |
|
700 |
-
#: includes/class-mla-core-options.php:
|
701 |
msgid "Media Manager Enhanced MIME Type filter"
|
702 |
msgstr ""
|
703 |
|
704 |
-
#: includes/class-mla-core-options.php:
|
705 |
msgid ""
|
706 |
"Check this option to filter by more MIME Types, e.g., text, applications."
|
707 |
msgstr ""
|
708 |
|
709 |
-
#: includes/class-mla-core-options.php:
|
710 |
msgid "Media Manager Month and Year filter"
|
711 |
msgstr ""
|
712 |
|
713 |
-
#: includes/class-mla-core-options.php:
|
714 |
msgid "Check this option to filter by month and year uploaded."
|
715 |
msgstr ""
|
716 |
|
717 |
-
#: includes/class-mla-core-options.php:
|
718 |
msgid "Media Manager Category/Tag filter"
|
719 |
msgstr ""
|
720 |
|
721 |
-
#: includes/class-mla-core-options.php:
|
722 |
msgid "Check this option to filter by taxonomy terms."
|
723 |
msgstr ""
|
724 |
|
725 |
-
#: includes/class-mla-core-options.php:
|
726 |
msgid "Media Manager Terms Search popup"
|
727 |
msgstr ""
|
728 |
|
729 |
-
#: includes/class-mla-core-options.php:
|
730 |
msgid "Check this option to enable the \"Terms Search\" popup window."
|
731 |
msgstr ""
|
732 |
|
733 |
-
#: includes/class-mla-core-options.php:
|
734 |
msgid "Media Manager Enhanced Search Media box"
|
735 |
msgstr ""
|
736 |
|
737 |
-
#: includes/class-mla-core-options.php:
|
738 |
msgid "Check this option to enable search box enhancements."
|
739 |
msgstr ""
|
740 |
|
741 |
-
#: includes/class-mla-core-options.php:
|
742 |
msgid "Media Manager Enhanced Search Media Controls"
|
743 |
msgstr ""
|
744 |
|
745 |
-
#: includes/class-mla-core-options.php:
|
746 |
msgid "Media Manager Checklist meta boxes"
|
747 |
msgstr ""
|
748 |
|
749 |
-
#: includes/class-mla-core-options.php:
|
750 |
msgid ""
|
751 |
"Check this option to enable MLA-enhanced meta boxes in the \"ATTACHMENT "
|
752 |
"DETAILS\" pane.<br> This option is for any taxonomy that uses a "
|
753 |
"<strong>\"checklist-style\"</strong> meta box."
|
754 |
msgstr ""
|
755 |
|
756 |
-
#: includes/class-mla-core-options.php:
|
757 |
msgid "Media Manager Flat meta boxes"
|
758 |
msgstr ""
|
759 |
|
760 |
-
#: includes/class-mla-core-options.php:
|
761 |
msgid ""
|
762 |
"Check this option to enable MLA-enhanced meta boxes in the \"ATTACHMENT "
|
763 |
"DETAILS\" pane.<br> This option is for <strong>flat taxonomies</"
|
@@ -765,211 +775,211 @@ msgid ""
|
|
765 |
"style\" meta box."
|
766 |
msgstr ""
|
767 |
|
768 |
-
#: includes/class-mla-core-options.php:
|
769 |
msgid "Media Manager auto-fill meta boxes"
|
770 |
msgstr ""
|
771 |
|
772 |
-
#: includes/class-mla-core-options.php:
|
773 |
msgid ""
|
774 |
"Check this option to automatically fill MLA-enhanced meta boxes in the "
|
775 |
"\"ATTACHMENT DETAILS\" pane<br> when the item is selected."
|
776 |
msgstr ""
|
777 |
|
778 |
-
#: includes/class-mla-core-options.php:
|
779 |
msgid "Media Manager Order By"
|
780 |
msgstr ""
|
781 |
|
782 |
-
#: includes/class-mla-core-options.php:
|
783 |
-
#: includes/class-mla-core-options.php:
|
784 |
-
#: includes/class-mla-core-options.php:
|
785 |
-
#: includes/class-mla-core-options.php:
|
786 |
-
#: includes/class-mla-core-options.php:
|
787 |
msgid "Media Manager Default"
|
788 |
msgstr ""
|
789 |
|
790 |
-
#: includes/class-mla-core-options.php:
|
791 |
msgid "Title/Name"
|
792 |
msgstr ""
|
793 |
|
794 |
-
#: includes/class-mla-core-options.php:
|
795 |
msgid ""
|
796 |
"If you want to override the Media Manager default,<br> select a "
|
797 |
"column for the sort order of the Media Library listing."
|
798 |
msgstr ""
|
799 |
|
800 |
-
#: includes/class-mla-core-options.php:
|
801 |
msgid "Media Manager Order"
|
802 |
msgstr ""
|
803 |
|
804 |
-
#: includes/class-mla-core-options.php:
|
805 |
msgid "Attachment Display Settings"
|
806 |
msgstr ""
|
807 |
|
808 |
-
#: includes/class-mla-core-options.php:
|
809 |
msgid "Media Manager Apply Display Settings"
|
810 |
msgstr ""
|
811 |
|
812 |
-
#: includes/class-mla-core-options.php:
|
813 |
msgid ""
|
814 |
"Check this option to always start with the Attachment Display Settings set "
|
815 |
"here,<br> overriding browser-/cookie-based defaults."
|
816 |
msgstr ""
|
817 |
|
818 |
-
#: includes/class-mla-core-options.php:
|
819 |
-
#: includes/class-mla-core-options.php:
|
820 |
msgid "Alignment"
|
821 |
msgstr ""
|
822 |
|
823 |
-
#: includes/class-mla-core-options.php:
|
824 |
-
#: includes/class-mla-core-options.php:
|
825 |
-
#: includes/class-mla-core-options.php:
|
826 |
#, php-format
|
827 |
msgid ""
|
828 |
"Select a value for the default %1$s option in the Attachment Display "
|
829 |
"Settings."
|
830 |
msgstr ""
|
831 |
|
832 |
-
#: includes/class-mla-core-options.php:
|
833 |
msgid "Left"
|
834 |
msgstr ""
|
835 |
|
836 |
-
#: includes/class-mla-core-options.php:
|
837 |
msgid "Center"
|
838 |
msgstr ""
|
839 |
|
840 |
-
#: includes/class-mla-core-options.php:
|
841 |
msgid "Right"
|
842 |
msgstr ""
|
843 |
|
844 |
-
#: includes/class-mla-core-options.php:
|
845 |
-
#: includes/class-mla-core-options.php:
|
846 |
msgid "Link To"
|
847 |
msgstr ""
|
848 |
|
849 |
-
#: includes/class-mla-core-options.php:
|
850 |
msgid "Media File"
|
851 |
msgstr ""
|
852 |
|
853 |
-
#: includes/class-mla-core-options.php:
|
854 |
msgid "Attachment Page"
|
855 |
msgstr ""
|
856 |
|
857 |
-
#: includes/class-mla-core-options.php:
|
858 |
msgid "Custom URL"
|
859 |
msgstr ""
|
860 |
|
861 |
-
#: includes/class-mla-core-options.php:
|
862 |
-
#: includes/class-mla-core-options.php:
|
863 |
msgid "Size"
|
864 |
msgstr ""
|
865 |
|
866 |
-
#: includes/class-mla-core-options.php:
|
867 |
-
#: includes/class-mla-thumbnail-generation.php:
|
868 |
-
#: includes/class-mla-thumbnail-generation.php:
|
869 |
msgid "Thumbnail"
|
870 |
msgstr ""
|
871 |
|
872 |
-
#: includes/class-mla-core-options.php:
|
873 |
msgid "Medium"
|
874 |
msgstr ""
|
875 |
|
876 |
-
#: includes/class-mla-core-options.php:
|
877 |
msgid "Large"
|
878 |
msgstr ""
|
879 |
|
880 |
-
#: includes/class-mla-core-options.php:
|
881 |
msgid "Full Size"
|
882 |
msgstr ""
|
883 |
|
884 |
-
#: includes/class-mla-core-options.php:
|
885 |
msgid "Uninstall (Delete) Plugin Settings"
|
886 |
msgstr ""
|
887 |
|
888 |
-
#: includes/class-mla-core-options.php:
|
889 |
msgid "Delete Option Settings"
|
890 |
msgstr ""
|
891 |
|
892 |
-
#: includes/class-mla-core-options.php:
|
893 |
msgid ""
|
894 |
"Check this option to remove all MLA option settings from the database when "
|
895 |
"the plugin is deleted.<br> <strong>You can make a backup copy</"
|
896 |
"strong> of your settings below by clicking \""
|
897 |
msgstr ""
|
898 |
|
899 |
-
#: includes/class-mla-core-options.php:
|
900 |
msgid "Export ALL Settings"
|
901 |
msgstr ""
|
902 |
|
903 |
-
#: includes/class-mla-core-options.php:
|
904 |
msgid "Delete Option Settings Backups"
|
905 |
msgstr ""
|
906 |
|
907 |
-
#: includes/class-mla-core-options.php:
|
908 |
msgid ""
|
909 |
"Check this option to remove the <code>/wp-content/mla-backup</code> "
|
910 |
"directory and its contents when the plugin is deleted."
|
911 |
msgstr ""
|
912 |
|
913 |
-
#: includes/class-mla-core-options.php:
|
914 |
msgid "Default [mla_gallery] Templates and Settings"
|
915 |
msgstr ""
|
916 |
|
917 |
-
#: includes/class-mla-core-options.php:
|
918 |
-
#: includes/class-mla-core-options.php:
|
919 |
-
#: includes/class-mla-core-options.php:
|
920 |
-
#: includes/class-mla-core-options.php:
|
921 |
msgid "Style Template"
|
922 |
msgstr ""
|
923 |
|
924 |
-
#: includes/class-mla-core-options.php:
|
925 |
-
#: includes/class-mla-core-options.php:
|
926 |
-
#: includes/class-mla-core-options.php:
|
927 |
-
#: includes/class-mla-core-options.php:
|
928 |
#, php-format
|
929 |
msgid "Select the default %1$s for your %2$s shortcodes."
|
930 |
msgstr ""
|
931 |
|
932 |
-
#: includes/class-mla-core-options.php:
|
933 |
-
#: includes/class-mla-core-options.php:
|
934 |
msgid "Markup Template"
|
935 |
msgstr ""
|
936 |
|
937 |
-
#: includes/class-mla-core-options.php:
|
938 |
-
#: includes/class-mla-core-options.php:
|
939 |
#: includes/class-mla-settings-shortcodes-tab.php:85
|
940 |
msgid "markup template"
|
941 |
msgstr ""
|
942 |
|
943 |
-
#: includes/class-mla-core-options.php:
|
944 |
-
#: includes/class-mla-core-options.php:
|
945 |
msgid "Default columns"
|
946 |
msgstr ""
|
947 |
|
948 |
-
#: includes/class-mla-core-options.php:
|
949 |
msgid ""
|
950 |
"Enter the number of [mla_tag_cloud] columns; must be a positive integer."
|
951 |
msgstr ""
|
952 |
|
953 |
-
#: includes/class-mla-core-options.php:
|
954 |
-
#: includes/class-mla-core-options.php:
|
955 |
msgid "Default mla_margin"
|
956 |
msgstr ""
|
957 |
|
958 |
-
#: includes/class-mla-core-options.php:
|
959 |
-
#: includes/class-mla-core-options.php:
|
960 |
msgid ""
|
961 |
"Enter the CSS \"margin\" property value, in length (px, em, pt, etc.), "
|
962 |
"percent (%), \"auto\" or \"inherit\".<br> Enter \"none\" to "
|
963 |
"remove the property entirely."
|
964 |
msgstr ""
|
965 |
|
966 |
-
#: includes/class-mla-core-options.php:
|
967 |
-
#: includes/class-mla-core-options.php:
|
968 |
msgid "Default mla_itemwidth"
|
969 |
msgstr ""
|
970 |
|
971 |
-
#: includes/class-mla-core-options.php:
|
972 |
-
#: includes/class-mla-core-options.php:
|
973 |
msgid ""
|
974 |
"Enter the CSS \"width\" property value, in length (px, em, pt, etc.), "
|
975 |
"percent (%), \"auto\" or \"inherit\".<br> Enter \"calculate"
|
@@ -979,19 +989,19 @@ msgid ""
|
|
979 |
"the property entirely."
|
980 |
msgstr ""
|
981 |
|
982 |
-
#: includes/class-mla-core-options.php:
|
983 |
msgid "Enter the number of [mla_gallery] columns; must be a positive integer."
|
984 |
msgstr ""
|
985 |
|
986 |
-
#: includes/class-mla-core-options.php:
|
987 |
msgid "Thumbnail Substitution Support, mla_viewer"
|
988 |
msgstr ""
|
989 |
|
990 |
-
#: includes/class-mla-core-options.php:
|
991 |
msgid "Enable thumbnail substitution"
|
992 |
msgstr ""
|
993 |
|
994 |
-
#: includes/class-mla-core-options.php:
|
995 |
msgid ""
|
996 |
"Check this option to allow the \"mla_viewer\" to generate thumbnail images "
|
997 |
"for PDF documents. Thumbnails are generated dynamically, each time the item "
|
@@ -1000,32 +1010,32 @@ msgid ""
|
|
1000 |
"strong>"
|
1001 |
msgstr ""
|
1002 |
|
1003 |
-
#: includes/class-mla-core-options.php:
|
1004 |
msgid "Enable Featured Images"
|
1005 |
msgstr ""
|
1006 |
|
1007 |
-
#: includes/class-mla-core-options.php:
|
1008 |
msgid ""
|
1009 |
"Check this option to extend Featured Image support to all Media Library "
|
1010 |
"items. The Featured Image can be used as a thumbnail image for the item in "
|
1011 |
"an [mla_gallery] display."
|
1012 |
msgstr ""
|
1013 |
|
1014 |
-
#: includes/class-mla-core-options.php:
|
1015 |
msgid "Enable Featured Image Generation"
|
1016 |
msgstr ""
|
1017 |
|
1018 |
-
#: includes/class-mla-core-options.php:
|
1019 |
msgid ""
|
1020 |
"Check this option to enable the \"Thumbnail\" generation action in the Media/"
|
1021 |
"Assistant submenu Bulk Actions dropdown."
|
1022 |
msgstr ""
|
1023 |
|
1024 |
-
#: includes/class-mla-core-options.php:
|
1025 |
msgid "Enable explicit Ghostscript check"
|
1026 |
msgstr ""
|
1027 |
|
1028 |
-
#: includes/class-mla-core-options.php:
|
1029 |
msgid ""
|
1030 |
"Check this option to enable the explicit check for Ghostscript support "
|
1031 |
"required for thumbnail generation. If your Ghostscript software is in a non-"
|
@@ -1034,31 +1044,31 @@ msgid ""
|
|
1034 |
"leave this option checked unless you know it is safe to turn it off."
|
1035 |
msgstr ""
|
1036 |
|
1037 |
-
#: includes/class-mla-core-options.php:
|
1038 |
msgid "Ghostscript path"
|
1039 |
msgstr ""
|
1040 |
|
1041 |
-
#: includes/class-mla-core-options.php:
|
1042 |
msgid ""
|
1043 |
"If your “gs” executable is in a non-standard location, enter the "
|
1044 |
"full path and filename here, e.g., “/usr/bin/gs”. It will "
|
1045 |
"override the search for Ghostscript in other places."
|
1046 |
msgstr ""
|
1047 |
|
1048 |
-
#: includes/class-mla-core-options.php:
|
1049 |
msgid "Enable custom field mapping when adding new media"
|
1050 |
msgstr ""
|
1051 |
|
1052 |
-
#: includes/class-mla-core-options.php:
|
1053 |
-
#: includes/class-mla-core-options.php:
|
1054 |
msgid "See Help menu."
|
1055 |
msgstr ""
|
1056 |
|
1057 |
-
#: includes/class-mla-core-options.php:
|
1058 |
msgid "Enable custom field mapping when updating media metadata"
|
1059 |
msgstr ""
|
1060 |
|
1061 |
-
#: includes/class-mla-core-options.php:
|
1062 |
msgid ""
|
1063 |
"Update the custom field mapping values above, then click Save Changes to "
|
1064 |
"make the updates permanent.<br>You can also make temporary updates and click "
|
@@ -1066,29 +1076,29 @@ msgid ""
|
|
1066 |
"saving any rule changes."
|
1067 |
msgstr ""
|
1068 |
|
1069 |
-
#: includes/class-mla-core-options.php:
|
1070 |
msgid "Enable IPTC/EXIF Mapping when adding new media"
|
1071 |
msgstr ""
|
1072 |
|
1073 |
-
#: includes/class-mla-core-options.php:
|
1074 |
msgid ""
|
1075 |
"Check this option to enable mapping when uploading new media (attachments)."
|
1076 |
"<br> Does NOT affect the operation of the \"Map\" buttons on the "
|
1077 |
"bulk edit, single edit and settings screens."
|
1078 |
msgstr ""
|
1079 |
|
1080 |
-
#: includes/class-mla-core-options.php:
|
1081 |
msgid "Enable IPTC/EXIF Mapping when updating media metadata"
|
1082 |
msgstr ""
|
1083 |
|
1084 |
-
#: includes/class-mla-core-options.php:
|
1085 |
msgid ""
|
1086 |
"Check this option to enable mapping when media (attachments) metadata is "
|
1087 |
"regenerated,<br> e.g., when the Media/Edit Media \"Edit Image\" "
|
1088 |
"functions are used."
|
1089 |
msgstr ""
|
1090 |
|
1091 |
-
#: includes/class-mla-core-options.php:
|
1092 |
msgid ""
|
1093 |
"Update the standard field mapping values above, then click <strong>Save "
|
1094 |
"Changes</strong> to make the updates permanent.<br>You can also make "
|
@@ -1097,13 +1107,13 @@ msgid ""
|
|
1097 |
"changes."
|
1098 |
msgstr ""
|
1099 |
|
1100 |
-
#: includes/class-mla-core-options.php:
|
1101 |
msgid ""
|
1102 |
"Update the taxonomy term mapping values above, then click <strong>Save "
|
1103 |
"Changes</strong> or <strong>Map All Attachments, Taxonomy Terms Now</strong>."
|
1104 |
msgstr ""
|
1105 |
|
1106 |
-
#: includes/class-mla-core-options.php:
|
1107 |
msgid ""
|
1108 |
"<strong>Update</strong> individual custom field mapping values above, or "
|
1109 |
"make several updates and click <strong>Save Changes</strong> below to apply "
|
@@ -1114,33 +1124,33 @@ msgid ""
|
|
1114 |
"changes."
|
1115 |
msgstr ""
|
1116 |
|
1117 |
-
#: includes/class-mla-core-options.php:
|
1118 |
msgid "IPTC/EXIF Mapping help"
|
1119 |
msgstr ""
|
1120 |
|
1121 |
-
#: includes/class-mla-core-options.php:
|
1122 |
-
#: includes/class-mla-edit-media.php:427 includes/class-mla-main.php:
|
1123 |
msgid "Name/Slug"
|
1124 |
msgstr ""
|
1125 |
|
1126 |
-
#: includes/class-mla-core-options.php:
|
1127 |
#: includes/class-mla-edit-media.php:430 includes/class-mla-list-table.php:1331
|
1128 |
-
#: includes/class-mla-main.php:
|
1129 |
#: includes/mla-main-search-box-template.php:51
|
1130 |
#: includes/mla-media-modal-js-template.php:48
|
1131 |
msgid "ALT Text"
|
1132 |
msgstr ""
|
1133 |
|
1134 |
-
#: includes/class-mla-core-options.php:
|
1135 |
-
#: includes/class-mla-edit-media.php:428 includes/class-mla-main.php:
|
1136 |
#: includes/class-mla-options.php:460
|
1137 |
#: includes/mla-main-search-box-template.php:53
|
1138 |
#: includes/mla-media-modal-js-template.php:53
|
1139 |
msgid "Caption"
|
1140 |
msgstr ""
|
1141 |
|
1142 |
-
#: includes/class-mla-core-options.php:
|
1143 |
-
#: includes/class-mla-edit-media.php:429 includes/class-mla-main.php:
|
1144 |
#: includes/class-mla-options.php:463
|
1145 |
#: includes/class-mla-settings-upload-tab.php:174
|
1146 |
#: includes/class-mla-settings-upload-tab.php:542
|
@@ -1157,265 +1167,265 @@ msgstr ""
|
|
1157 |
msgid "Description"
|
1158 |
msgstr ""
|
1159 |
|
1160 |
-
#: includes/class-mla-core-options.php:
|
1161 |
msgid "Enable View and Post MIME Type Support"
|
1162 |
msgstr ""
|
1163 |
|
1164 |
-
#: includes/class-mla-core-options.php:
|
1165 |
msgid ""
|
1166 |
"Check/uncheck this option to enable/disable Post MIME Type Support, then "
|
1167 |
"click <strong>Save Changes</strong> to record the new setting."
|
1168 |
msgstr ""
|
1169 |
|
1170 |
-
#: includes/class-mla-core-options.php:
|
1171 |
msgid "Post MIME Types help."
|
1172 |
msgstr ""
|
1173 |
|
1174 |
-
#: includes/class-mla-core-options.php:
|
1175 |
-
#: includes/class-mla-mime-types.php:
|
1176 |
-
#: includes/class-mla-settings-custom-fields-tab.php:
|
1177 |
-
#: includes/class-mla-settings-documentation-tab.php:
|
1178 |
-
#: includes/class-mla-settings-iptc-exif-tab.php:
|
1179 |
-
#: includes/class-mla-settings-shortcodes-tab.php:
|
1180 |
msgctxt "table_view_singular"
|
1181 |
msgid "All"
|
1182 |
msgstr ""
|
1183 |
|
1184 |
-
#: includes/class-mla-core-options.php:
|
1185 |
-
#: includes/class-mla-mime-types.php:
|
1186 |
-
#: includes/class-mla-settings-custom-fields-tab.php:
|
1187 |
-
#: includes/class-mla-settings-documentation-tab.php:
|
1188 |
-
#: includes/class-mla-settings-iptc-exif-tab.php:
|
1189 |
-
#: includes/class-mla-settings-shortcodes-tab.php:
|
1190 |
msgctxt "table_view_plural"
|
1191 |
msgid "All"
|
1192 |
msgstr ""
|
1193 |
|
1194 |
-
#: includes/class-mla-core-options.php:
|
1195 |
-
#: includes/class-mla-core-options.php:
|
1196 |
-
#: includes/class-mla-core-options.php:
|
1197 |
-
#: includes/class-mla-core-options.php:
|
1198 |
msgctxt "post_mime_types_description"
|
1199 |
msgid "Built-in view"
|
1200 |
msgstr ""
|
1201 |
|
1202 |
-
#: includes/class-mla-core-options.php:
|
1203 |
msgctxt "table_view_singular"
|
1204 |
msgid "Image"
|
1205 |
msgstr ""
|
1206 |
|
1207 |
-
#: includes/class-mla-core-options.php:
|
1208 |
msgctxt "table_view_plural"
|
1209 |
msgid "Images"
|
1210 |
msgstr ""
|
1211 |
|
1212 |
-
#: includes/class-mla-core-options.php:
|
1213 |
msgctxt "post_mime_types_description"
|
1214 |
msgid "All image subtypes"
|
1215 |
msgstr ""
|
1216 |
|
1217 |
-
#: includes/class-mla-core-options.php:
|
1218 |
msgctxt "table_view_singular"
|
1219 |
msgid "Audio"
|
1220 |
msgstr ""
|
1221 |
|
1222 |
-
#: includes/class-mla-core-options.php:
|
1223 |
msgctxt "table_view_plural"
|
1224 |
msgid "Audio"
|
1225 |
msgstr ""
|
1226 |
|
1227 |
-
#: includes/class-mla-core-options.php:
|
1228 |
msgctxt "post_mime_types_description"
|
1229 |
msgid "All audio subtypes"
|
1230 |
msgstr ""
|
1231 |
|
1232 |
-
#: includes/class-mla-core-options.php:
|
1233 |
msgctxt "table_view_singular"
|
1234 |
msgid "Video"
|
1235 |
msgstr ""
|
1236 |
|
1237 |
-
#: includes/class-mla-core-options.php:
|
1238 |
msgctxt "table_view_plural"
|
1239 |
msgid "Video"
|
1240 |
msgstr ""
|
1241 |
|
1242 |
-
#: includes/class-mla-core-options.php:
|
1243 |
msgctxt "post_mime_types_description"
|
1244 |
msgid "All video subtypes"
|
1245 |
msgstr ""
|
1246 |
|
1247 |
-
#: includes/class-mla-core-options.php:
|
1248 |
msgctxt "table_view_singular"
|
1249 |
msgid "Text"
|
1250 |
msgstr ""
|
1251 |
|
1252 |
-
#: includes/class-mla-core-options.php:
|
1253 |
msgctxt "table_view_plural"
|
1254 |
msgid "Text"
|
1255 |
msgstr ""
|
1256 |
|
1257 |
-
#: includes/class-mla-core-options.php:
|
1258 |
msgctxt "post_mime_types_description"
|
1259 |
msgid "All text subtypes"
|
1260 |
msgstr ""
|
1261 |
|
1262 |
-
#: includes/class-mla-core-options.php:
|
1263 |
msgctxt "table_view_singular"
|
1264 |
msgid "Application"
|
1265 |
msgstr ""
|
1266 |
|
1267 |
-
#: includes/class-mla-core-options.php:
|
1268 |
msgctxt "table_view_plural"
|
1269 |
msgid "Applications"
|
1270 |
msgstr ""
|
1271 |
|
1272 |
-
#: includes/class-mla-core-options.php:
|
1273 |
msgctxt "post_mime_types_description"
|
1274 |
msgid "All application subtypes"
|
1275 |
msgstr ""
|
1276 |
|
1277 |
-
#: includes/class-mla-core-options.php:
|
1278 |
#: includes/class-mla-list-table.php:1545
|
1279 |
msgctxt "table_view_singular"
|
1280 |
msgid "Unattached"
|
1281 |
msgstr ""
|
1282 |
|
1283 |
-
#: includes/class-mla-core-options.php:
|
1284 |
msgctxt "table_view_plural"
|
1285 |
msgid "Unattached"
|
1286 |
msgstr ""
|
1287 |
|
1288 |
-
#: includes/class-mla-core-options.php:
|
1289 |
msgctxt "table_view_singular"
|
1290 |
msgid "Attached"
|
1291 |
msgstr ""
|
1292 |
|
1293 |
-
#: includes/class-mla-core-options.php:
|
1294 |
msgctxt "table_view_plural"
|
1295 |
msgid "Attached"
|
1296 |
msgstr ""
|
1297 |
|
1298 |
-
#: includes/class-mla-core-options.php:
|
1299 |
msgctxt "table_view_singular"
|
1300 |
msgid "Trash"
|
1301 |
msgstr ""
|
1302 |
|
1303 |
-
#: includes/class-mla-core-options.php:
|
1304 |
msgctxt "table_view_plural"
|
1305 |
msgid "Trash"
|
1306 |
msgstr ""
|
1307 |
|
1308 |
-
#: includes/class-mla-core-options.php:
|
1309 |
msgid "Enable Upload MIME Type Support"
|
1310 |
msgstr ""
|
1311 |
|
1312 |
-
#: includes/class-mla-core-options.php:
|
1313 |
msgid ""
|
1314 |
"Check/uncheck this option to enable/disable Upload MIME Type Support, then "
|
1315 |
"click <strong>Save Changes</strong> to record the new setting."
|
1316 |
msgstr ""
|
1317 |
|
1318 |
-
#: includes/class-mla-core-options.php:
|
1319 |
msgid "Upload MIME Types help."
|
1320 |
msgstr ""
|
1321 |
|
1322 |
-
#: includes/class-mla-core-options.php:
|
1323 |
msgid "Enable MLA File Type Icons Support"
|
1324 |
msgstr ""
|
1325 |
|
1326 |
-
#: includes/class-mla-core-options.php:
|
1327 |
msgid ""
|
1328 |
"Check/uncheck this option to enable/disable MLA File Type Icons Support, "
|
1329 |
"then click <strong>Save Changes</strong> to record the new setting."
|
1330 |
msgstr ""
|
1331 |
|
1332 |
-
#: includes/class-mla-core-options.php:
|
1333 |
msgid "Display Limit"
|
1334 |
msgstr ""
|
1335 |
|
1336 |
-
#: includes/class-mla-core-options.php:
|
1337 |
msgid ""
|
1338 |
"Enter the maximum number of debug log characters to display; enter zero or "
|
1339 |
"leave blank for no limit."
|
1340 |
msgstr ""
|
1341 |
|
1342 |
-
#: includes/class-mla-core-options.php:
|
1343 |
msgid "Debug File"
|
1344 |
msgstr ""
|
1345 |
|
1346 |
-
#: includes/class-mla-core-options.php:
|
1347 |
msgid ""
|
1348 |
"Enter the name of an alternate, MLA-specific debug log file; leave blank to "
|
1349 |
"use the PHP error_log."
|
1350 |
msgstr ""
|
1351 |
|
1352 |
-
#: includes/class-mla-core-options.php:
|
1353 |
msgid "Replace PHP error_log file"
|
1354 |
msgstr ""
|
1355 |
|
1356 |
-
#: includes/class-mla-core-options.php:
|
1357 |
msgid ""
|
1358 |
"Check this option to replace the PHP error_log file with the MLA Debug File."
|
1359 |
"<br> allows capture of PHP messages in the MLA Debug File."
|
1360 |
msgstr ""
|
1361 |
|
1362 |
-
#: includes/class-mla-core-options.php:
|
1363 |
msgid "PHP Reporting"
|
1364 |
msgstr ""
|
1365 |
|
1366 |
-
#: includes/class-mla-core-options.php:
|
1367 |
msgid ""
|
1368 |
"Enter a numeric error_reporting value, e.g., 0x7FFF or 32767; leave blank to "
|
1369 |
"use the existing PHP error_reporting value."
|
1370 |
msgstr ""
|
1371 |
|
1372 |
-
#: includes/class-mla-core-options.php:
|
1373 |
msgid "MLA Reporting"
|
1374 |
msgstr ""
|
1375 |
|
1376 |
-
#: includes/class-mla-core-options.php:
|
1377 |
msgid ""
|
1378 |
"Enter a numeric MLA_DEBUG_LEVEL value, e.g., 0x0003 or 3; leave blank to use "
|
1379 |
"the existing MLA_DEBUG_LEVEL value."
|
1380 |
msgstr ""
|
1381 |
|
1382 |
-
#: includes/class-mla-core.php:
|
1383 |
#, php-format
|
1384 |
msgctxt "error_log"
|
1385 |
msgid "%1$s: mla_load_template file \"%2$s\" not found."
|
1386 |
msgstr ""
|
1387 |
|
1388 |
-
#: includes/class-mla-core.php:
|
1389 |
#, php-format
|
1390 |
msgctxt "error_log"
|
1391 |
msgid "%1$s: mla_load_template file \"%2$s\" bad source type \"%3$s\"."
|
1392 |
msgstr ""
|
1393 |
|
1394 |
-
#: includes/class-mla-core.php:
|
1395 |
#, php-format
|
1396 |
msgid "%1$s: Bad specification part \"%2$s\""
|
1397 |
msgstr ""
|
1398 |
|
1399 |
-
#: includes/class-mla-core.php:
|
1400 |
#, php-format
|
1401 |
msgid "%1$s: Bad specification option \"%2$s\""
|
1402 |
msgstr ""
|
1403 |
|
1404 |
-
#: includes/class-mla-core.php:
|
1405 |
#, php-format
|
1406 |
msgid "%1$s: Bad specification prefix \"%2$s\""
|
1407 |
msgstr ""
|
1408 |
|
1409 |
-
#: includes/class-mla-core.php:
|
1410 |
msgid "Most Used"
|
1411 |
msgstr ""
|
1412 |
|
1413 |
-
#: includes/class-mla-core.php:
|
1414 |
#, php-format
|
1415 |
msgid "+ %s"
|
1416 |
msgstr ""
|
1417 |
|
1418 |
-
#: includes/class-mla-core.php:
|
1419 |
#: includes/class-mla-media-modal.php:605
|
1420 |
#: includes/mla-media-modal-js-template.php:28
|
1421 |
#: includes/mla-media-modal-js-template.php:75
|
@@ -1468,10 +1478,10 @@ msgid "Title"
|
|
1468 |
msgstr ""
|
1469 |
|
1470 |
#: includes/class-mla-data-query.php:294
|
1471 |
-
#: includes/class-mla-settings-custom-fields-tab.php:
|
1472 |
-
#: includes/class-mla-settings-documentation-tab.php:
|
1473 |
-
#: includes/class-mla-settings-iptc-exif-tab.php:
|
1474 |
-
#: includes/class-mla-settings-shortcodes-tab.php:
|
1475 |
msgctxt "list_table_column"
|
1476 |
msgid "Name"
|
1477 |
msgstr ""
|
@@ -1517,15 +1527,15 @@ msgid "Caption"
|
|
1517 |
msgstr ""
|
1518 |
|
1519 |
#: includes/class-mla-data-query.php:303 includes/class-mla-mime-types.php:559
|
1520 |
-
#: includes/class-mla-mime-types.php:
|
1521 |
-
#: includes/class-mla-settings-documentation-tab.php:
|
1522 |
-
#: includes/class-mla-settings-shortcodes-tab.php:
|
1523 |
msgctxt "list_table_column"
|
1524 |
msgid "Description"
|
1525 |
msgstr ""
|
1526 |
|
1527 |
#: includes/class-mla-data-query.php:304 includes/class-mla-mime-types.php:551
|
1528 |
-
#: includes/class-mla-mime-types.php:
|
1529 |
msgctxt "list_table_column"
|
1530 |
msgid "MIME Type"
|
1531 |
msgstr ""
|
@@ -1561,20 +1571,20 @@ msgid "Attached to"
|
|
1561 |
msgstr ""
|
1562 |
|
1563 |
#: includes/class-mla-data-query.php:674 includes/class-mla-edit-media.php:316
|
1564 |
-
#: includes/class-mla-main.php:
|
1565 |
-
#: includes/class-mla-media-modal.php:575 includes/class-mla-mime-types.php:
|
1566 |
-
#: includes/class-mla-mime-types.php:
|
1567 |
-
#: includes/class-mla-mime-types.php:
|
1568 |
#: includes/class-mla-settings-custom-fields-tab.php:546
|
1569 |
#: includes/class-mla-settings-custom-fields-tab.php:694
|
1570 |
-
#: includes/class-mla-settings-custom-fields-tab.php:
|
1571 |
#: includes/class-mla-settings-documentation-tab.php:297
|
1572 |
-
#: includes/class-mla-settings-documentation-tab.php:
|
1573 |
#: includes/class-mla-settings-iptc-exif-tab.php:626
|
1574 |
#: includes/class-mla-settings-iptc-exif-tab.php:774
|
1575 |
-
#: includes/class-mla-settings-iptc-exif-tab.php:
|
1576 |
#: includes/class-mla-settings-shortcodes-tab.php:503
|
1577 |
-
#: includes/class-mla-settings-shortcodes-tab.php:
|
1578 |
#: includes/class-mla-settings-upload-tab.php:301
|
1579 |
#: includes/class-mla-settings-view-tab.php:166
|
1580 |
#, php-format
|
@@ -1591,12 +1601,12 @@ msgstr ""
|
|
1591 |
#: includes/class-mla-data-query.php:1137
|
1592 |
#: includes/class-mla-data-query.php:1152
|
1593 |
#: includes/class-mla-data-query.php:1154
|
1594 |
-
#: includes/class-mla-data-query.php:
|
1595 |
-
#: includes/class-mla-data-query.php:
|
1596 |
-
#: includes/class-mla-data-query.php:
|
1597 |
-
#: includes/class-mla-data-query.php:
|
1598 |
-
#: includes/class-mla-data-query.php:
|
1599 |
-
#: includes/class-mla-data-query.php:
|
1600 |
msgid "DEBUG"
|
1601 |
msgstr ""
|
1602 |
|
@@ -1612,37 +1622,37 @@ msgctxt "error_log"
|
|
1612 |
msgid "%1$s: _execute_list_table_query SQL_request = \"%2$s\"."
|
1613 |
msgstr ""
|
1614 |
|
1615 |
-
#: includes/class-mla-data-query.php:
|
1616 |
#, php-format
|
1617 |
msgctxt "error_log"
|
1618 |
msgid "%1$s: mla_query_posts_search_filter = \"%2$s\"."
|
1619 |
msgstr ""
|
1620 |
|
1621 |
-
#: includes/class-mla-data-query.php:
|
1622 |
#, php-format
|
1623 |
msgctxt "error_log"
|
1624 |
msgid "%1$s: mla_query_posts_where_filter = \"%2$s\"."
|
1625 |
msgstr ""
|
1626 |
|
1627 |
-
#: includes/class-mla-data-query.php:
|
1628 |
#, php-format
|
1629 |
msgctxt "error_log"
|
1630 |
msgid "%1$s: mla_query_posts_join_filter = \"%2$s\"."
|
1631 |
msgstr ""
|
1632 |
|
1633 |
-
#: includes/class-mla-data-query.php:
|
1634 |
#, php-format
|
1635 |
msgctxt "error_log"
|
1636 |
msgid "%1$s: mla_query_posts_orderby_filter = \"%2$s\"."
|
1637 |
msgstr ""
|
1638 |
|
1639 |
-
#: includes/class-mla-data-query.php:
|
1640 |
#, php-format
|
1641 |
msgctxt "error_log"
|
1642 |
msgid "%1$s: mla_query_posts_clauses_filter = \"%2$s\"."
|
1643 |
msgstr ""
|
1644 |
|
1645 |
-
#: includes/class-mla-data-query.php:
|
1646 |
#, php-format
|
1647 |
msgctxt "error_log"
|
1648 |
msgid "%1$s: mla_query_posts_clauses_request_filter = \"%2$s\"."
|
@@ -1753,110 +1763,110 @@ msgctxt "error_log"
|
|
1753 |
msgid "mla_parse_xmp_metadata set option failed."
|
1754 |
msgstr ""
|
1755 |
|
1756 |
-
#: includes/class-mla-data.php:
|
1757 |
#: includes/class-mla-settings-custom-fields-tab.php:786
|
1758 |
-
#: includes/class-mla-settings-custom-fields-tab.php:
|
1759 |
#: includes/class-mla-settings-iptc-exif-tab.php:868
|
1760 |
-
#: includes/class-mla-settings-iptc-exif-tab.php:
|
1761 |
-
#: includes/class-mla-settings-iptc-exif-tab.php:
|
1762 |
#: includes/class-mla-settings-view-tab.php:398
|
1763 |
#: includes/class-mla-settings-view-tab.php:799
|
1764 |
#: includes/class-mla-settings-view-tab.php:815
|
1765 |
-
#: includes/class-mla-wpml-support.php:
|
1766 |
msgid "Yes"
|
1767 |
msgstr ""
|
1768 |
|
1769 |
-
#: includes/class-mla-data.php:
|
1770 |
#: includes/class-mla-settings-custom-fields-tab.php:787
|
1771 |
-
#: includes/class-mla-settings-custom-fields-tab.php:
|
1772 |
#: includes/class-mla-settings-iptc-exif-tab.php:869
|
1773 |
-
#: includes/class-mla-settings-iptc-exif-tab.php:
|
1774 |
-
#: includes/class-mla-settings-iptc-exif-tab.php:
|
1775 |
#: includes/class-mla-settings-view-tab.php:397
|
1776 |
#: includes/class-mla-settings-view-tab.php:801
|
1777 |
#: includes/class-mla-settings-view-tab.php:817
|
1778 |
-
#: includes/class-mla-wpml-support.php:
|
1779 |
msgid "No"
|
1780 |
msgstr ""
|
1781 |
|
1782 |
-
#: includes/class-mla-data.php:
|
1783 |
#, php-format
|
1784 |
msgid "Deleting %1$s"
|
1785 |
msgstr ""
|
1786 |
|
1787 |
-
#: includes/class-mla-data.php:
|
1788 |
#, php-format
|
1789 |
msgid "%1$s: meta:%2$s not found"
|
1790 |
msgstr ""
|
1791 |
|
1792 |
-
#: includes/class-mla-data.php:
|
1793 |
-
#: includes/class-mla-data.php:
|
1794 |
#, php-format
|
1795 |
msgid "Adding %1$s = %2$s"
|
1796 |
msgstr ""
|
1797 |
|
1798 |
-
#: includes/class-mla-data.php:
|
1799 |
#, php-format
|
1800 |
msgid "%1$s: Adding meta:%2$s; not found"
|
1801 |
msgstr ""
|
1802 |
|
1803 |
-
#: includes/class-mla-data.php:
|
1804 |
#, php-format
|
1805 |
msgid "Deleting Null meta:%1$s"
|
1806 |
msgstr ""
|
1807 |
|
1808 |
-
#: includes/class-mla-data.php:
|
1809 |
-
#: includes/class-mla-data.php:
|
1810 |
-
#: includes/class-mla-data.php:
|
1811 |
-
#: includes/class-mla-data.php:
|
1812 |
-
#: includes/class-mla-data.php:
|
1813 |
-
#: includes/class-mla-data.php:
|
1814 |
-
#: includes/class-mla-mime-types.php:
|
1815 |
-
#: includes/class-mla-mime-types.php:
|
1816 |
#, php-format
|
1817 |
msgid "Changing %1$s from \"%2$s\" to \"%3$s\""
|
1818 |
msgstr ""
|
1819 |
|
1820 |
-
#: includes/class-mla-data.php:
|
1821 |
#, php-format
|
1822 |
msgid "%1$s: Changing meta:%2$s; not found"
|
1823 |
msgstr ""
|
1824 |
|
1825 |
-
#: includes/class-mla-data.php:
|
1826 |
#, php-format
|
1827 |
msgid "Deleting old %1$s values"
|
1828 |
msgstr ""
|
1829 |
|
1830 |
-
#: includes/class-mla-data.php:
|
1831 |
#, php-format
|
1832 |
msgid "Changing %1$s from \"%2$s\" to \"%3$s\"; %4$d updates"
|
1833 |
msgstr ""
|
1834 |
|
1835 |
-
#: includes/class-mla-data.php:
|
1836 |
msgid "Could not retrieve Attachment."
|
1837 |
msgstr ""
|
1838 |
|
1839 |
-
#: includes/class-mla-data.php:
|
1840 |
#, php-format
|
1841 |
msgid "%1$s: Could not change Name/Slug \"%2$s\"; name already exists"
|
1842 |
msgstr ""
|
1843 |
|
1844 |
-
#: includes/class-mla-data.php:
|
1845 |
#, php-format
|
1846 |
msgid "Deleting ALT Text, was \"%1$s\""
|
1847 |
msgstr ""
|
1848 |
|
1849 |
-
#: includes/class-mla-data.php:
|
1850 |
#, php-format
|
1851 |
msgid "%1$s: Could not delete ALT Text, remains \"%2$s\""
|
1852 |
msgstr ""
|
1853 |
|
1854 |
-
#: includes/class-mla-data.php:
|
1855 |
#, php-format
|
1856 |
msgid "%1$s: Could not change ALT Text from \"%2$s\" to \"%3$s\""
|
1857 |
msgstr ""
|
1858 |
|
1859 |
-
#: includes/class-mla-data.php:
|
1860 |
#: includes/class-mla-list-table.php:1036
|
1861 |
#: includes/class-mla-list-table.php:1039
|
1862 |
#: includes/class-mla-list-table.php:1107 includes/class-mla-options.php:2234
|
@@ -1866,79 +1876,79 @@ msgstr ""
|
|
1866 |
msgid "Parent"
|
1867 |
msgstr ""
|
1868 |
|
1869 |
-
#: includes/class-mla-data.php:
|
1870 |
-
#: includes/class-mla-edit-media.php:864 includes/class-mla-main.php:
|
1871 |
#: includes/class-mla-settings-view-tab.php:130
|
1872 |
#: includes/class-mla-settings-view-tab.php:386
|
1873 |
msgid "Menu Order"
|
1874 |
msgstr ""
|
1875 |
|
1876 |
-
#: includes/class-mla-data.php:
|
1877 |
#: includes/class-mla-list-table.php:1487
|
1878 |
-
#: includes/class-mla-list-table.php:1490 includes/class-mla-main.php:
|
1879 |
-
#: includes/class-mla-main.php:
|
1880 |
msgid "Author"
|
1881 |
msgstr ""
|
1882 |
|
1883 |
-
#: includes/class-mla-data.php:
|
1884 |
-
#: includes/class-mla-main.php:
|
1885 |
msgid "Comments"
|
1886 |
msgstr ""
|
1887 |
|
1888 |
-
#: includes/class-mla-data.php:
|
1889 |
-
#: includes/class-mla-main.php:
|
1890 |
msgid "Pings"
|
1891 |
msgstr ""
|
1892 |
|
1893 |
-
#: includes/class-mla-data.php:
|
1894 |
#, php-format
|
1895 |
msgid "You cannot assign \"%1$s\" terms"
|
1896 |
msgstr ""
|
1897 |
|
1898 |
-
#: includes/class-mla-data.php:
|
1899 |
msgctxt "tag delimiter"
|
1900 |
msgid ","
|
1901 |
msgstr ""
|
1902 |
|
1903 |
-
#: includes/class-mla-data.php:
|
1904 |
msgid "Adding"
|
1905 |
msgstr ""
|
1906 |
|
1907 |
-
#: includes/class-mla-data.php:
|
1908 |
msgid "Removing"
|
1909 |
msgstr ""
|
1910 |
|
1911 |
-
#: includes/class-mla-data.php:
|
1912 |
msgid "Replacing"
|
1913 |
msgstr ""
|
1914 |
|
1915 |
-
#: includes/class-mla-data.php:
|
1916 |
msgid "Ignoring"
|
1917 |
msgstr ""
|
1918 |
|
1919 |
-
#: includes/class-mla-data.php:
|
1920 |
#, php-format
|
1921 |
msgid "%1$s \"%2$s\" terms"
|
1922 |
msgstr ""
|
1923 |
|
1924 |
-
#: includes/class-mla-data.php:
|
1925 |
#, php-format
|
1926 |
msgid "Item %1$d, no changes detected."
|
1927 |
msgstr ""
|
1928 |
|
1929 |
-
#: includes/class-mla-data.php:
|
1930 |
#, php-format
|
1931 |
msgid "Item %1$d updated."
|
1932 |
msgstr ""
|
1933 |
|
1934 |
-
#: includes/class-mla-data.php:
|
1935 |
#, php-format
|
1936 |
msgid "%1$s: Item %2$d update failed."
|
1937 |
msgstr ""
|
1938 |
|
1939 |
#: includes/class-mla-edit-media.php:133 includes/class-mla-edit-media.php:184
|
1940 |
-
#: includes/class-mla-edit-media.php:237 includes/class-mla-main.php:
|
1941 |
-
#: includes/class-mla-main.php:
|
1942 |
#: includes/class-mla-media-modal.php:236 includes/class-mla-options.php:1743
|
1943 |
#: includes/class-mla-polylang-support.php:363
|
1944 |
#: includes/class-mla-settings-custom-fields-tab.php:59
|
@@ -1965,46 +1975,46 @@ msgid "Close Bulk Edit area"
|
|
1965 |
msgstr ""
|
1966 |
|
1967 |
#: includes/class-mla-edit-media.php:185 includes/class-mla-edit-media.php:239
|
1968 |
-
#: includes/class-mla-main.php:
|
1969 |
msgid "An ajax.fail error has occurred. Please reload the page and try again."
|
1970 |
msgstr ""
|
1971 |
|
1972 |
#: includes/class-mla-edit-media.php:186 includes/class-mla-edit-media.php:240
|
1973 |
-
#: includes/class-mla-main.php:
|
1974 |
msgid "An ajax.done error has occurred. Please reload the page and try again."
|
1975 |
msgstr ""
|
1976 |
|
1977 |
-
#: includes/class-mla-edit-media.php:338 includes/class-mla-main.php:
|
1978 |
msgid "more"
|
1979 |
msgstr ""
|
1980 |
|
1981 |
-
#: includes/class-mla-edit-media.php:339 includes/class-mla-main.php:
|
1982 |
msgid "less"
|
1983 |
msgstr ""
|
1984 |
|
1985 |
#: includes/class-mla-edit-media.php:342 includes/class-mla-edit-media.php:373
|
1986 |
-
#: includes/class-mla-main.php:
|
1987 |
msgid "Add"
|
1988 |
msgstr ""
|
1989 |
|
1990 |
#: includes/class-mla-edit-media.php:343 includes/class-mla-edit-media.php:374
|
1991 |
-
#: includes/class-mla-main.php:
|
1992 |
msgid "Remove"
|
1993 |
msgstr ""
|
1994 |
|
1995 |
#: includes/class-mla-edit-media.php:344 includes/class-mla-edit-media.php:375
|
1996 |
-
#: includes/class-mla-main.php:
|
1997 |
#: includes/class-mla-options.php:1239 includes/class-mla-options.php:1338
|
1998 |
#: includes/class-mla-options.php:1382 includes/class-mla-options.php:2500
|
1999 |
#: includes/class-mla-options.php:2554 includes/class-mla-options.php:2674
|
2000 |
#: includes/class-mla-options.php:2769 includes/class-mla-options.php:2815
|
2001 |
#: includes/class-mla-settings-custom-fields-tab.php:475
|
2002 |
#: includes/class-mla-settings-custom-fields-tab.php:757
|
2003 |
-
#: includes/class-mla-settings-custom-fields-tab.php:
|
2004 |
#: includes/class-mla-settings-iptc-exif-tab.php:473
|
2005 |
#: includes/class-mla-settings-iptc-exif-tab.php:835
|
2006 |
-
#: includes/class-mla-settings-iptc-exif-tab.php:
|
2007 |
-
#: includes/class-mla-settings-iptc-exif-tab.php:
|
2008 |
msgid "Replace"
|
2009 |
msgstr ""
|
2010 |
|
@@ -2014,13 +2024,13 @@ msgid ""
|
|
2014 |
"menu for more information."
|
2015 |
msgstr ""
|
2016 |
|
2017 |
-
#: includes/class-mla-edit-media.php:416 includes/class-mla-main.php:
|
2018 |
#: includes/class-mla-settings.php:1398
|
2019 |
msgid "Reset"
|
2020 |
msgstr ""
|
2021 |
|
2022 |
-
#: includes/class-mla-edit-media.php:422 includes/class-mla-main.php:
|
2023 |
-
#: includes/class-mla-main.php:
|
2024 |
#: includes/class-mla-settings-custom-fields-tab.php:785
|
2025 |
#: includes/class-mla-settings-iptc-exif-tab.php:867
|
2026 |
#: includes/class-mla-settings-upload-tab.php:122
|
@@ -2029,22 +2039,22 @@ msgstr ""
|
|
2029 |
msgid "No Change"
|
2030 |
msgstr ""
|
2031 |
|
2032 |
-
#: includes/class-mla-edit-media.php:423 includes/class-mla-main.php:
|
2033 |
msgid "Allow"
|
2034 |
msgstr ""
|
2035 |
|
2036 |
-
#: includes/class-mla-edit-media.php:424 includes/class-mla-main.php:
|
2037 |
msgid "Do not allow"
|
2038 |
msgstr ""
|
2039 |
|
2040 |
#: includes/class-mla-edit-media.php:431 includes/class-mla-list-table.php:1033
|
2041 |
-
#: includes/class-mla-list-table.php:1104 includes/class-mla-main.php:
|
2042 |
msgid "Parent ID"
|
2043 |
msgstr ""
|
2044 |
|
2045 |
#: includes/class-mla-edit-media.php:432 includes/class-mla-edit-media.php:844
|
2046 |
-
#: includes/class-mla-main.php:
|
2047 |
-
#: includes/class-mla-settings-upload-tab.php:
|
2048 |
msgid "Select"
|
2049 |
msgstr ""
|
2050 |
|
@@ -2068,8 +2078,8 @@ msgstr ""
|
|
2068 |
msgid "Map Custom Field metadata for this item"
|
2069 |
msgstr ""
|
2070 |
|
2071 |
-
#: includes/class-mla-edit-media.php:560 includes/class-mla-main.php:
|
2072 |
-
#: includes/class-mla-main.php:
|
2073 |
msgid "Map Custom Field metadata"
|
2074 |
msgstr ""
|
2075 |
|
@@ -2077,8 +2087,8 @@ msgstr ""
|
|
2077 |
msgid "Map IPTC/EXIF metadata for this item"
|
2078 |
msgstr ""
|
2079 |
|
2080 |
-
#: includes/class-mla-edit-media.php:562 includes/class-mla-main.php:
|
2081 |
-
#: includes/class-mla-main.php:
|
2082 |
msgid "Map IPTC/EXIF metadata"
|
2083 |
msgstr ""
|
2084 |
|
@@ -2091,7 +2101,7 @@ msgid "Attachment Metadata"
|
|
2091 |
msgstr ""
|
2092 |
|
2093 |
#: includes/class-mla-edit-media.php:737 includes/class-mla-edit-media.php:777
|
2094 |
-
#: includes/class-mla-main.php:
|
2095 |
#, php-format
|
2096 |
msgctxt "error_log"
|
2097 |
msgid "%1$s: %2$s discarding \"%3$s\"; no title/order"
|
@@ -2106,7 +2116,7 @@ msgstr ""
|
|
2106 |
msgid "Post Parent"
|
2107 |
msgstr ""
|
2108 |
|
2109 |
-
#: includes/class-mla-edit-media.php:844 includes/class-mla-main.php:
|
2110 |
msgid "Select Parent"
|
2111 |
msgstr ""
|
2112 |
|
@@ -2152,18 +2162,18 @@ msgid "Not Supported"
|
|
2152 |
msgstr ""
|
2153 |
|
2154 |
#: includes/class-mla-list-table.php:564
|
2155 |
-
#: includes/class-mla-settings-custom-fields-tab.php:
|
2156 |
-
#: includes/class-mla-settings-documentation-tab.php:
|
2157 |
-
#: includes/class-mla-settings-iptc-exif-tab.php:
|
2158 |
-
#: includes/class-mla-settings-shortcodes-tab.php:
|
2159 |
#: includes/class-mla-settings-upload-tab.php:858
|
2160 |
-
#: includes/class-mla-settings-upload-tab.php:
|
2161 |
#: includes/class-mla-settings-view-tab.php:654
|
2162 |
#, php-format
|
2163 |
msgid "column_default: %1$s, %2$s"
|
2164 |
msgstr ""
|
2165 |
|
2166 |
-
#: includes/class-mla-list-table.php:612 includes/class-mla-list-table.php:
|
2167 |
#: includes/class-mla-list-table.php:987 includes/class-mla-list-table.php:1159
|
2168 |
#: includes/class-mla-list-table.php:1208
|
2169 |
#: includes/class-mla-list-table.php:1254
|
@@ -2171,20 +2181,20 @@ msgstr ""
|
|
2171 |
#: includes/class-mla-list-table.php:1521
|
2172 |
#: includes/class-mla-list-table.php:1847
|
2173 |
#: includes/class-mla-polylang-support.php:362
|
2174 |
-
#: includes/class-mla-settings-custom-fields-tab.php:
|
2175 |
-
#: includes/class-mla-settings-custom-fields-tab.php:
|
2176 |
-
#: includes/class-mla-settings-iptc-exif-tab.php:
|
2177 |
-
#: includes/class-mla-settings-iptc-exif-tab.php:
|
2178 |
-
#: includes/class-mla-settings-shortcodes-tab.php:
|
2179 |
#: includes/class-mla-settings-upload-tab.php:923
|
2180 |
-
#: includes/class-mla-settings-upload-tab.php:
|
2181 |
#: includes/class-mla-settings-view-tab.php:720
|
2182 |
-
#: includes/class-mla-settings-view-tab.php:
|
2183 |
msgid "Edit"
|
2184 |
msgstr ""
|
2185 |
|
2186 |
#: includes/class-mla-list-table.php:637
|
2187 |
-
#: includes/class-mla-thumbnail-generation.php:
|
2188 |
msgid "Trash"
|
2189 |
msgstr ""
|
2190 |
|
@@ -2196,75 +2206,75 @@ msgstr ""
|
|
2196 |
msgid "Restore"
|
2197 |
msgstr ""
|
2198 |
|
2199 |
-
#: includes/class-mla-list-table.php:
|
2200 |
-
#: includes/class-mla-settings-custom-fields-tab.php:
|
2201 |
-
#: includes/class-mla-settings-iptc-exif-tab.php:
|
2202 |
-
#: includes/class-mla-settings-shortcodes-tab.php:
|
2203 |
#: includes/class-mla-settings-upload-tab.php:923
|
2204 |
#: includes/class-mla-settings-view-tab.php:720
|
2205 |
msgid "Edit this item"
|
2206 |
msgstr ""
|
2207 |
|
2208 |
-
#: includes/class-mla-list-table.php:
|
2209 |
-
#: includes/class-mla-settings-custom-fields-tab.php:
|
2210 |
-
#: includes/class-mla-settings-iptc-exif-tab.php:
|
2211 |
#: includes/class-mla-settings-upload-tab.php:925
|
2212 |
#: includes/class-mla-settings-view-tab.php:722
|
2213 |
msgid "Edit this item inline"
|
2214 |
msgstr ""
|
2215 |
|
2216 |
-
#: includes/class-mla-list-table.php:
|
2217 |
#: includes/class-mla-options.php:1114 includes/class-mla-options.php:1418
|
2218 |
#: includes/class-mla-settings-custom-fields-tab.php:466
|
2219 |
#: includes/class-mla-settings-custom-fields-tab.php:748
|
2220 |
-
#: includes/class-mla-settings-custom-fields-tab.php:
|
2221 |
-
#: includes/class-mla-settings-custom-fields-tab.php:
|
2222 |
#: includes/class-mla-settings-iptc-exif-tab.php:814
|
2223 |
-
#: includes/class-mla-settings-iptc-exif-tab.php:
|
2224 |
#: includes/class-mla-settings-upload-tab.php:925
|
2225 |
#: includes/class-mla-settings-view-tab.php:722
|
2226 |
msgid "Quick Edit"
|
2227 |
msgstr ""
|
2228 |
|
2229 |
-
#: includes/class-mla-list-table.php:
|
2230 |
msgid "Move this item to the Trash"
|
2231 |
msgstr ""
|
2232 |
|
2233 |
-
#: includes/class-mla-list-table.php:
|
2234 |
msgid "Move to Trash"
|
2235 |
msgstr ""
|
2236 |
|
2237 |
-
#: includes/class-mla-list-table.php:
|
2238 |
-
#: includes/class-mla-settings-custom-fields-tab.php:
|
2239 |
-
#: includes/class-mla-settings-iptc-exif-tab.php:
|
2240 |
-
#: includes/class-mla-settings-shortcodes-tab.php:
|
2241 |
#: includes/class-mla-settings-upload-tab.php:929
|
2242 |
#: includes/class-mla-settings-view-tab.php:728
|
2243 |
msgid "Delete this item Permanently"
|
2244 |
msgstr ""
|
2245 |
|
2246 |
-
#: includes/class-mla-list-table.php:
|
2247 |
#: includes/class-mla-list-table.php:1852
|
2248 |
-
#: includes/class-mla-settings-custom-fields-tab.php:
|
2249 |
-
#: includes/class-mla-settings-custom-fields-tab.php:
|
2250 |
-
#: includes/class-mla-settings-iptc-exif-tab.php:
|
2251 |
-
#: includes/class-mla-settings-iptc-exif-tab.php:
|
2252 |
-
#: includes/class-mla-settings-shortcodes-tab.php:
|
2253 |
#: includes/class-mla-settings-upload-tab.php:929
|
2254 |
#: includes/class-mla-settings-view-tab.php:728
|
2255 |
-
#: includes/class-mla-settings-view-tab.php:
|
2256 |
msgid "Delete Permanently"
|
2257 |
msgstr ""
|
2258 |
|
2259 |
-
#: includes/class-mla-list-table.php:
|
2260 |
-
#: includes/class-mla-settings-documentation-tab.php:
|
2261 |
#: includes/class-mla-settings.php:1388
|
2262 |
msgid "Download"
|
2263 |
msgstr ""
|
2264 |
|
2265 |
#: includes/class-mla-list-table.php:762
|
2266 |
-
#: includes/class-mla-settings-documentation-tab.php:
|
2267 |
-
#: includes/class-mla-settings-shortcodes-tab.php:
|
2268 |
#: includes/class-mla-settings-view-tab.php:374
|
2269 |
msgid "View"
|
2270 |
msgstr ""
|
@@ -2320,9 +2330,9 @@ msgstr[0] ""
|
|
2320 |
msgstr[1] ""
|
2321 |
|
2322 |
#: includes/class-mla-list-table.php:1944
|
2323 |
-
#: includes/class-mla-settings-custom-fields-tab.php:
|
2324 |
-
#: includes/class-mla-settings-iptc-exif-tab.php:
|
2325 |
-
#: includes/class-mla-settings-shortcodes-tab.php:
|
2326 |
msgid "Filter"
|
2327 |
msgstr ""
|
2328 |
|
@@ -2332,8 +2342,8 @@ msgid "Terms Search"
|
|
2332 |
msgstr ""
|
2333 |
|
2334 |
#: includes/class-mla-list-table.php:1952
|
2335 |
-
#: includes/class-mla-polylang-support.php:
|
2336 |
-
#: includes/class-mla-thumbnail-generation.php:
|
2337 |
msgid "Clear Filter-by"
|
2338 |
msgstr ""
|
2339 |
|
@@ -2341,11 +2351,11 @@ msgstr ""
|
|
2341 |
msgid "Empty Trash"
|
2342 |
msgstr ""
|
2343 |
|
2344 |
-
#: includes/class-mla-main.php:
|
2345 |
msgid "Error while saving the changes."
|
2346 |
msgstr ""
|
2347 |
|
2348 |
-
#: includes/class-mla-main.php:
|
2349 |
#: includes/class-mla-settings-custom-fields-tab.php:57
|
2350 |
#: includes/class-mla-settings-custom-fields-tab.php:92
|
2351 |
#: includes/class-mla-settings-iptc-exif-tab.php:57
|
@@ -2355,74 +2365,74 @@ msgstr ""
|
|
2355 |
msgid "Remove From Bulk Edit"
|
2356 |
msgstr ""
|
2357 |
|
2358 |
-
#: includes/class-mla-main.php:
|
2359 |
msgid "Bulk Edit items"
|
2360 |
msgstr ""
|
2361 |
|
2362 |
-
#: includes/class-mla-main.php:
|
2363 |
#: includes/class-mla-settings-custom-fields-tab.php:63
|
2364 |
#: includes/class-mla-settings-iptc-exif-tab.php:63
|
2365 |
msgid "Waiting"
|
2366 |
msgstr ""
|
2367 |
|
2368 |
-
#: includes/class-mla-main.php:
|
2369 |
#: includes/class-mla-settings-custom-fields-tab.php:65
|
2370 |
#: includes/class-mla-settings-iptc-exif-tab.php:65
|
2371 |
msgid "Complete"
|
2372 |
msgstr ""
|
2373 |
|
2374 |
-
#: includes/class-mla-main.php:
|
2375 |
#: includes/class-mla-settings-custom-fields-tab.php:66
|
2376 |
#: includes/class-mla-settings-iptc-exif-tab.php:66
|
2377 |
msgid "Unchanged"
|
2378 |
msgstr ""
|
2379 |
|
2380 |
-
#: includes/class-mla-main.php:
|
2381 |
#: includes/class-mla-settings-custom-fields-tab.php:67
|
2382 |
#: includes/class-mla-settings-iptc-exif-tab.php:67
|
2383 |
msgid "Succeeded"
|
2384 |
msgstr ""
|
2385 |
|
2386 |
-
#: includes/class-mla-main.php:
|
2387 |
#: includes/class-mla-settings-custom-fields-tab.php:68
|
2388 |
#: includes/class-mla-settings-iptc-exif-tab.php:68
|
2389 |
msgid "Failed"
|
2390 |
msgstr ""
|
2391 |
|
2392 |
-
#: includes/class-mla-main.php:
|
2393 |
msgid "CANCELED"
|
2394 |
msgstr ""
|
2395 |
|
2396 |
-
#: includes/class-mla-main.php:
|
2397 |
#, php-format
|
2398 |
msgid "Item permanently deleted."
|
2399 |
msgid_plural "%d items permanently deleted."
|
2400 |
msgstr[0] ""
|
2401 |
msgstr[1] ""
|
2402 |
|
2403 |
-
#: includes/class-mla-main.php:
|
2404 |
#, php-format
|
2405 |
msgid "Item %1$d moved to Trash."
|
2406 |
msgstr ""
|
2407 |
|
2408 |
-
#: includes/class-mla-main.php:
|
2409 |
msgid "Entries per page"
|
2410 |
msgstr ""
|
2411 |
|
2412 |
-
#: includes/class-mla-main.php:
|
2413 |
msgid "You are not allowed to edit Attachment: "
|
2414 |
msgstr ""
|
2415 |
|
2416 |
-
#: includes/class-mla-main.php:
|
2417 |
#, php-format
|
2418 |
msgid "%1$s: Unknown bulk action %2$s"
|
2419 |
msgstr ""
|
2420 |
|
2421 |
-
#: includes/class-mla-main.php:
|
2422 |
msgid "no changes detected"
|
2423 |
msgstr ""
|
2424 |
|
2425 |
-
#: includes/class-mla-main.php:
|
2426 |
#: includes/class-mla-settings-custom-fields-tab.php:601
|
2427 |
#: includes/class-mla-settings-documentation-tab.php:247
|
2428 |
#: includes/class-mla-settings-iptc-exif-tab.php:681
|
@@ -2433,11 +2443,11 @@ msgstr ""
|
|
2433 |
msgid "Bulk Action %1$s - no items selected."
|
2434 |
msgstr ""
|
2435 |
|
2436 |
-
#: includes/class-mla-main.php:
|
2437 |
msgid "You do not have permission to manage attachments."
|
2438 |
msgstr ""
|
2439 |
|
2440 |
-
#: includes/class-mla-main.php:
|
2441 |
#, php-format
|
2442 |
msgctxt "deleted items"
|
2443 |
msgid "%s item deleted."
|
@@ -2445,15 +2455,15 @@ msgid_plural "%s items deleted."
|
|
2445 |
msgstr[0] ""
|
2446 |
msgstr[1] ""
|
2447 |
|
2448 |
-
#: includes/class-mla-main.php:
|
2449 |
msgid "No items deleted."
|
2450 |
msgstr ""
|
2451 |
|
2452 |
-
#: includes/class-mla-main.php:
|
2453 |
msgid "Empty Terms Search; ignored"
|
2454 |
msgstr ""
|
2455 |
|
2456 |
-
#: includes/class-mla-main.php:
|
2457 |
#: includes/class-mla-settings-custom-fields-tab.php:630
|
2458 |
#: includes/class-mla-settings-documentation-tab.php:281
|
2459 |
#: includes/class-mla-settings-iptc-exif-tab.php:710
|
@@ -2464,24 +2474,24 @@ msgstr ""
|
|
2464 |
msgid "Unknown mla_admin_action - \"%1$s\""
|
2465 |
msgstr ""
|
2466 |
|
2467 |
-
#: includes/class-mla-main.php:
|
2468 |
msgid "term search results for"
|
2469 |
msgstr ""
|
2470 |
|
2471 |
-
#: includes/class-mla-main.php:
|
2472 |
msgid "post/parent results for"
|
2473 |
msgstr ""
|
2474 |
|
2475 |
-
#: includes/class-mla-main.php:
|
2476 |
msgid "search results for"
|
2477 |
msgstr ""
|
2478 |
|
2479 |
-
#: includes/class-mla-main.php:
|
2480 |
-
#: includes/class-mla-main.php:
|
2481 |
#: includes/class-mla-settings-custom-fields-tab.php:505
|
2482 |
#: includes/class-mla-settings-custom-fields-tab.php:789
|
2483 |
-
#: includes/class-mla-settings-documentation-tab.php:
|
2484 |
-
#: includes/class-mla-settings-documentation-tab.php:
|
2485 |
#: includes/class-mla-settings-iptc-exif-tab.php:514
|
2486 |
#: includes/class-mla-settings-iptc-exif-tab.php:871
|
2487 |
#: includes/class-mla-settings-shortcodes-tab.php:479
|
@@ -2492,21 +2502,21 @@ msgstr ""
|
|
2492 |
msgid "Update"
|
2493 |
msgstr ""
|
2494 |
|
2495 |
-
#: includes/class-mla-main.php:
|
2496 |
msgid "All Post Types"
|
2497 |
msgstr ""
|
2498 |
|
2499 |
-
#: includes/class-mla-main.php:
|
2500 |
msgid "For"
|
2501 |
msgstr ""
|
2502 |
|
2503 |
-
#: includes/class-mla-main.php:
|
2504 |
-
#: includes/class-mla-shortcode-support.php:
|
2505 |
msgid "Unattached"
|
2506 |
msgstr ""
|
2507 |
|
2508 |
-
#: includes/class-mla-main.php:
|
2509 |
-
#: includes/class-mla-polylang-support.php:
|
2510 |
#: includes/class-mla-settings-custom-fields-tab.php:503
|
2511 |
#: includes/class-mla-settings-custom-fields-tab.php:706
|
2512 |
#: includes/class-mla-settings-custom-fields-tab.php:788
|
@@ -2521,58 +2531,58 @@ msgstr ""
|
|
2521 |
#: includes/class-mla-settings-upload-tab.php:549
|
2522 |
#: includes/class-mla-settings-view-tab.php:135
|
2523 |
#: includes/class-mla-settings-view-tab.php:393
|
2524 |
-
#: includes/class-mla-thumbnail-generation.php:
|
2525 |
msgid "Cancel"
|
2526 |
msgstr ""
|
2527 |
|
2528 |
-
#: includes/class-mla-main.php:
|
2529 |
#: includes/class-mla-options.php:1419
|
2530 |
#: includes/class-mla-settings-custom-fields-tab.php:469
|
2531 |
#: includes/class-mla-settings-custom-fields-tab.php:751
|
2532 |
-
#: includes/class-mla-settings-custom-fields-tab.php:
|
2533 |
#: includes/class-mla-settings-iptc-exif-tab.php:815
|
2534 |
#: includes/class-mla-settings-upload-tab.php:551
|
2535 |
#: includes/class-mla-settings-view-tab.php:395
|
2536 |
msgid "Bulk Edit"
|
2537 |
msgstr ""
|
2538 |
|
2539 |
-
#: includes/class-mla-main.php:
|
2540 |
msgid "In-process"
|
2541 |
msgstr ""
|
2542 |
|
2543 |
-
#: includes/class-mla-main.php:
|
2544 |
msgid "You are not allowed to delete this item."
|
2545 |
msgstr ""
|
2546 |
|
2547 |
-
#: includes/class-mla-main.php:
|
2548 |
#, php-format
|
2549 |
msgid "%1$s: Item %2$d could NOT be deleted."
|
2550 |
msgstr ""
|
2551 |
|
2552 |
-
#: includes/class-mla-main.php:
|
2553 |
#, php-format
|
2554 |
msgid "Item %1$d permanently deleted."
|
2555 |
msgstr ""
|
2556 |
|
2557 |
-
#: includes/class-mla-main.php:
|
2558 |
msgid "You are not allowed to move this item out of the Trash."
|
2559 |
msgstr ""
|
2560 |
|
2561 |
-
#: includes/class-mla-main.php:
|
2562 |
#, php-format
|
2563 |
msgid "%1$s: Item %2$d could NOT be restored from Trash."
|
2564 |
msgstr ""
|
2565 |
|
2566 |
-
#: includes/class-mla-main.php:
|
2567 |
#, php-format
|
2568 |
msgid "Item %1$d restored from Trash."
|
2569 |
msgstr ""
|
2570 |
|
2571 |
-
#: includes/class-mla-main.php:
|
2572 |
msgid "You are not allowed to move this item to the Trash."
|
2573 |
msgstr ""
|
2574 |
|
2575 |
-
#: includes/class-mla-main.php:
|
2576 |
#, php-format
|
2577 |
msgid "%1$s: Item %2$d could NOT be moved to Trash."
|
2578 |
msgstr ""
|
@@ -2590,7 +2600,7 @@ msgid "Tags"
|
|
2590 |
msgstr ""
|
2591 |
|
2592 |
#: includes/class-mla-media-modal-ajax.php:452
|
2593 |
-
#: includes/class-mla-objects.php:
|
2594 |
#: includes/class-mla-settings-upload-tab.php:532
|
2595 |
#: includes/class-mla-settings-view-tab.php:374
|
2596 |
#, php-format
|
@@ -2652,7 +2662,7 @@ msgctxt "post_mime_types"
|
|
2652 |
msgid "Manage"
|
2653 |
msgstr ""
|
2654 |
|
2655 |
-
#: includes/class-mla-mime-types.php:550 includes/class-mla-mime-types.php:
|
2656 |
msgctxt "list_table_column"
|
2657 |
msgid "Extension"
|
2658 |
msgstr ""
|
@@ -2663,24 +2673,24 @@ msgid "Icon Type"
|
|
2663 |
msgstr ""
|
2664 |
|
2665 |
#: includes/class-mla-mime-types.php:553
|
2666 |
-
#: includes/class-mla-settings-custom-fields-tab.php:
|
2667 |
msgctxt "list_table_column"
|
2668 |
msgid "Source"
|
2669 |
msgstr ""
|
2670 |
|
2671 |
#: includes/class-mla-mime-types.php:554
|
2672 |
-
#: includes/class-mla-settings-custom-fields-tab.php:
|
2673 |
-
#: includes/class-mla-settings-iptc-exif-tab.php:
|
2674 |
msgctxt "list_table_column"
|
2675 |
msgid "Status"
|
2676 |
msgstr ""
|
2677 |
|
2678 |
-
#: includes/class-mla-mime-types.php:555 includes/class-mla-mime-types.php:
|
2679 |
msgctxt "list_table_column"
|
2680 |
msgid "WordPress Type"
|
2681 |
msgstr ""
|
2682 |
|
2683 |
-
#: includes/class-mla-mime-types.php:556 includes/class-mla-mime-types.php:
|
2684 |
msgctxt "list_table_column"
|
2685 |
msgid "MLA Type"
|
2686 |
msgstr ""
|
@@ -2695,343 +2705,347 @@ msgctxt "list_table_column"
|
|
2695 |
msgid "Std. Icon Type"
|
2696 |
msgstr ""
|
2697 |
|
2698 |
-
#: includes/class-mla-mime-types.php:
|
2699 |
msgctxt "list_table_column"
|
2700 |
msgid "Slug"
|
2701 |
msgstr ""
|
2702 |
|
2703 |
-
#: includes/class-mla-mime-types.php:
|
2704 |
msgctxt "list_table_column"
|
2705 |
msgid "Specification"
|
2706 |
msgstr ""
|
2707 |
|
2708 |
-
#: includes/class-mla-mime-types.php:
|
2709 |
msgctxt "list_table_column"
|
2710 |
msgid "Post Mime"
|
2711 |
msgstr ""
|
2712 |
|
2713 |
-
#: includes/class-mla-mime-types.php:
|
2714 |
msgctxt "list_table_column"
|
2715 |
msgid "Table View"
|
2716 |
msgstr ""
|
2717 |
|
2718 |
-
#: includes/class-mla-mime-types.php:
|
2719 |
msgctxt "list_table_column"
|
2720 |
msgid "Singular Name"
|
2721 |
msgstr ""
|
2722 |
|
2723 |
-
#: includes/class-mla-mime-types.php:
|
2724 |
msgctxt "list_table_column"
|
2725 |
msgid "Plural Name"
|
2726 |
msgstr ""
|
2727 |
|
2728 |
-
#: includes/class-mla-mime-types.php:
|
2729 |
msgctxt "list_table_column"
|
2730 |
msgid "Order"
|
2731 |
msgstr ""
|
2732 |
|
2733 |
-
#: includes/class-mla-mime-types.php:
|
2734 |
msgctxt "post_mime_types_description"
|
2735 |
msgid "Copied from previous filter/plugin"
|
2736 |
msgstr ""
|
2737 |
|
2738 |
-
#: includes/class-mla-mime-types.php:
|
2739 |
-
#: includes/class-mla-mime-types.php:
|
2740 |
msgid "Ignoring specification for Post MIME Type; using slug"
|
2741 |
msgstr ""
|
2742 |
|
2743 |
-
#: includes/class-mla-mime-types.php:
|
2744 |
-
#: includes/class-mla-mime-types.php:
|
2745 |
#, php-format
|
2746 |
msgid "<br>Changing %1$s \"%2$s\" to valid value \"%3$s\""
|
2747 |
msgstr ""
|
2748 |
|
2749 |
-
#: includes/class-mla-mime-types.php:
|
2750 |
-
#: includes/class-mla-mime-types.php:
|
2751 |
-
#: includes/class-mla-mime-types.php:
|
2752 |
#: includes/class-mla-settings-view-tab.php:119
|
2753 |
#: includes/class-mla-settings-view-tab.php:375
|
2754 |
msgid "Slug"
|
2755 |
msgstr ""
|
2756 |
|
2757 |
-
#: includes/class-mla-mime-types.php:
|
2758 |
-
#: includes/class-mla-mime-types.php:
|
2759 |
#, php-format
|
2760 |
msgid "%1$s: Could not add Slug \"%2$s\"; value already exists"
|
2761 |
msgstr ""
|
2762 |
|
2763 |
-
#: includes/class-mla-mime-types.php:
|
2764 |
#, php-format
|
2765 |
msgid "Edit view \"%1$s\"; added"
|
2766 |
msgstr ""
|
2767 |
|
2768 |
-
#: includes/class-mla-mime-types.php:
|
2769 |
-
#: includes/class-mla-mime-types.php:
|
2770 |
#, php-format
|
2771 |
msgid "<br>Changing new %1$s \"%2$s\" to valid value \"%3$s\""
|
2772 |
msgstr ""
|
2773 |
|
2774 |
-
#: includes/class-mla-mime-types.php:
|
2775 |
#, php-format
|
2776 |
msgid "Edit view \"%1$s\"; no changes detected"
|
2777 |
msgstr ""
|
2778 |
|
2779 |
-
#: includes/class-mla-mime-types.php:
|
2780 |
#, php-format
|
2781 |
msgid "Edit view \"%1$s\"; updated"
|
2782 |
msgstr ""
|
2783 |
|
2784 |
-
#: includes/class-mla-mime-types.php:
|
2785 |
#, php-format
|
2786 |
msgid "View \"%1$s\" reverted to standard"
|
2787 |
msgstr ""
|
2788 |
|
2789 |
-
#: includes/class-mla-mime-types.php:
|
2790 |
#, php-format
|
2791 |
msgid "View \"%1$s\" deleted"
|
2792 |
msgstr ""
|
2793 |
|
2794 |
-
#: includes/class-mla-mime-types.php:
|
2795 |
#, php-format
|
2796 |
msgid "%1$s: Did not find view \"%2$s\""
|
2797 |
msgstr ""
|
2798 |
|
2799 |
-
#: includes/class-mla-mime-types.php:
|
2800 |
-
#: includes/class-mla-settings-documentation-tab.php:
|
2801 |
msgctxt "table_view_singular"
|
2802 |
msgid "Active"
|
2803 |
msgstr ""
|
2804 |
|
2805 |
-
#: includes/class-mla-mime-types.php:
|
2806 |
-
#: includes/class-mla-settings-documentation-tab.php:
|
2807 |
msgctxt "table_view_plural"
|
2808 |
msgid "Active"
|
2809 |
msgstr ""
|
2810 |
|
2811 |
-
#: includes/class-mla-mime-types.php:
|
2812 |
-
#: includes/class-mla-settings-documentation-tab.php:
|
2813 |
msgctxt "table_view_singular"
|
2814 |
msgid "Inactive"
|
2815 |
msgstr ""
|
2816 |
|
2817 |
-
#: includes/class-mla-mime-types.php:
|
2818 |
-
#: includes/class-mla-settings-documentation-tab.php:
|
2819 |
msgctxt "table_view_plural"
|
2820 |
msgid "Inactive"
|
2821 |
msgstr ""
|
2822 |
|
2823 |
-
#: includes/class-mla-mime-types.php:
|
2824 |
msgctxt "table_view_singular"
|
2825 |
msgid "WordPress"
|
2826 |
msgstr ""
|
2827 |
|
2828 |
-
#: includes/class-mla-mime-types.php:
|
2829 |
msgctxt "table_view_plural"
|
2830 |
msgid "WordPress"
|
2831 |
msgstr ""
|
2832 |
|
2833 |
-
#: includes/class-mla-mime-types.php:
|
2834 |
msgctxt "table_view_singular"
|
2835 |
msgid "MLA"
|
2836 |
msgstr ""
|
2837 |
|
2838 |
-
#: includes/class-mla-mime-types.php:
|
2839 |
msgctxt "table_view_plural"
|
2840 |
msgid "MLA"
|
2841 |
msgstr ""
|
2842 |
|
2843 |
-
#: includes/class-mla-mime-types.php:
|
2844 |
-
#: includes/class-mla-settings-iptc-exif-tab.php:
|
2845 |
msgctxt "table_view_singular"
|
2846 |
msgid "Custom"
|
2847 |
msgstr ""
|
2848 |
|
2849 |
-
#: includes/class-mla-mime-types.php:
|
2850 |
-
#: includes/class-mla-settings-iptc-exif-tab.php:
|
2851 |
msgctxt "table_view_plural"
|
2852 |
msgid "Custom"
|
2853 |
msgstr ""
|
2854 |
|
2855 |
-
#: includes/class-mla-mime-types.php:
|
2856 |
msgid "icon"
|
2857 |
msgstr ""
|
2858 |
|
2859 |
-
#: includes/class-mla-mime-types.php:
|
2860 |
-
#: includes/class-mla-mime-types.php:
|
2861 |
msgid "Cannot load Upload MIME Types"
|
2862 |
msgstr ""
|
2863 |
|
2864 |
-
#: includes/class-mla-mime-types.php:
|
2865 |
msgid "Extension is required"
|
2866 |
msgstr ""
|
2867 |
|
2868 |
-
#: includes/class-mla-mime-types.php:
|
2869 |
-
#: includes/class-mla-mime-types.php:
|
2870 |
-
#: includes/class-mla-mime-types.php:
|
2871 |
#: includes/class-mla-settings-upload-tab.php:165
|
2872 |
#: includes/class-mla-settings-upload-tab.php:534
|
2873 |
msgid "Extension"
|
2874 |
msgstr ""
|
2875 |
|
2876 |
-
#: includes/class-mla-mime-types.php:
|
2877 |
#, php-format
|
2878 |
msgid "%1$s: Could not add extension \"%2$s\"; value already exists"
|
2879 |
msgstr ""
|
2880 |
|
2881 |
-
#: includes/class-mla-mime-types.php:
|
2882 |
msgid "MIME type is required"
|
2883 |
msgstr ""
|
2884 |
|
2885 |
-
#: includes/class-mla-mime-types.php:
|
2886 |
-
#: includes/class-mla-mime-types.php:
|
2887 |
#, php-format
|
2888 |
msgid "%1$s: Bad MIME type; try \"%2$s\""
|
2889 |
msgstr ""
|
2890 |
|
2891 |
-
#: includes/class-mla-mime-types.php:
|
2892 |
#, php-format
|
2893 |
msgid "Upload MIME Type \"%1$s\"; added"
|
2894 |
msgstr ""
|
2895 |
|
2896 |
-
#: includes/class-mla-mime-types.php:
|
2897 |
-
#: includes/class-mla-mime-types.php:
|
2898 |
-
#: includes/class-mla-mime-types.php:
|
2899 |
msgid "Cannot update Upload MIME Types"
|
2900 |
msgstr ""
|
2901 |
|
2902 |
-
#: includes/class-mla-mime-types.php:
|
2903 |
#, php-format
|
2904 |
msgid "%1$s: Could not add new extension \"%2$s\"; value already exists"
|
2905 |
msgstr ""
|
2906 |
|
2907 |
-
#: includes/class-mla-mime-types.php:
|
2908 |
#, php-format
|
2909 |
msgid "Edit type \"%1$s\"; no changes detected"
|
2910 |
msgstr ""
|
2911 |
|
2912 |
-
#: includes/class-mla-mime-types.php:
|
2913 |
#, php-format
|
2914 |
msgid "Edit type \"%1$s\"; updated"
|
2915 |
msgstr ""
|
2916 |
|
2917 |
-
#: includes/class-mla-mime-types.php:
|
2918 |
#, php-format
|
2919 |
msgid "Upload MIME Type \"%1$s\"; reverted to standard"
|
2920 |
msgstr ""
|
2921 |
|
2922 |
-
#: includes/class-mla-mime-types.php:
|
2923 |
#, php-format
|
2924 |
msgid "Upload MIME Type \"%1$s\"; deleted"
|
2925 |
msgstr ""
|
2926 |
|
2927 |
-
#: includes/class-mla-mime-types.php:
|
2928 |
#, php-format
|
2929 |
msgid "%1$s: Did not find Upload type \"%2$s\""
|
2930 |
msgstr ""
|
2931 |
|
2932 |
-
#: includes/class-mla-objects.php:
|
2933 |
msgctxt "taxonomy_name_plural"
|
2934 |
msgid "Att. Categories"
|
2935 |
msgstr ""
|
2936 |
|
2937 |
-
#: includes/class-mla-objects.php:
|
2938 |
msgctxt "taxonomy_name_singular"
|
2939 |
msgid "Att. Category"
|
2940 |
msgstr ""
|
2941 |
|
2942 |
-
#: includes/class-mla-objects.php:
|
2943 |
msgid "Search Att. Categories"
|
2944 |
msgstr ""
|
2945 |
|
2946 |
-
#: includes/class-mla-objects.php:
|
2947 |
msgid "All Att. Categories"
|
2948 |
msgstr ""
|
2949 |
|
2950 |
-
#: includes/class-mla-objects.php:
|
2951 |
msgid "Parent Att. Category"
|
2952 |
msgstr ""
|
2953 |
|
2954 |
-
#: includes/class-mla-objects.php:
|
2955 |
msgid "Edit Att. Category"
|
2956 |
msgstr ""
|
2957 |
|
2958 |
-
#: includes/class-mla-objects.php:
|
2959 |
msgid "Update Att. Category"
|
2960 |
msgstr ""
|
2961 |
|
2962 |
-
#: includes/class-mla-objects.php:
|
2963 |
msgid "Att. Category"
|
2964 |
msgstr ""
|
2965 |
|
2966 |
-
#: includes/class-mla-objects.php:
|
2967 |
msgid "New Att. Category Name"
|
2968 |
msgstr ""
|
2969 |
|
2970 |
-
#: includes/class-mla-objects.php:
|
2971 |
msgctxt "taxonomy_name_plural"
|
2972 |
msgid "Att. Tags"
|
2973 |
msgstr ""
|
2974 |
|
2975 |
-
#: includes/class-mla-objects.php:
|
2976 |
msgctxt "taxonomy_name_singular"
|
2977 |
msgid "Att. Tag"
|
2978 |
msgstr ""
|
2979 |
|
2980 |
-
#: includes/class-mla-objects.php:
|
2981 |
msgid "Search Att. Tags"
|
2982 |
msgstr ""
|
2983 |
|
2984 |
-
#: includes/class-mla-objects.php:
|
2985 |
msgid "All Att. Tags"
|
2986 |
msgstr ""
|
2987 |
|
2988 |
-
#: includes/class-mla-objects.php:
|
2989 |
msgid "Parent Att. Tag"
|
2990 |
msgstr ""
|
2991 |
|
2992 |
-
#: includes/class-mla-objects.php:
|
2993 |
msgid "Edit Att. Tag"
|
2994 |
msgstr ""
|
2995 |
|
2996 |
-
#: includes/class-mla-objects.php:
|
2997 |
msgid "Update Att. Tag"
|
2998 |
msgstr ""
|
2999 |
|
3000 |
-
#: includes/class-mla-objects.php:
|
3001 |
msgid "Att. Tag"
|
3002 |
msgstr ""
|
3003 |
|
3004 |
-
#: includes/class-mla-objects.php:
|
3005 |
msgid "New Att. Tag Name"
|
3006 |
msgstr ""
|
3007 |
|
3008 |
-
#: includes/class-mla-objects.php:
|
3009 |
msgid "Attachments"
|
3010 |
msgstr ""
|
3011 |
|
3012 |
-
#: includes/class-mla-objects.php:
|
3013 |
#, php-format
|
3014 |
msgctxt "error_log"
|
3015 |
msgid ""
|
3016 |
"%1$s: mla_taxonomy_column_filter( \"%2$s\" ) - get_term failed: \"%3$s\""
|
3017 |
msgstr ""
|
3018 |
|
3019 |
-
#: includes/class-mla-objects.php:
|
3020 |
msgid "click to search"
|
3021 |
msgstr ""
|
3022 |
|
3023 |
-
#: includes/class-mla-objects.php:
|
3024 |
msgid "Shortcode(s), HTML and/or Plain Text"
|
3025 |
msgstr ""
|
3026 |
|
3027 |
-
#: includes/class-mla-objects.php:
|
3028 |
msgid "MLA Text"
|
3029 |
msgstr ""
|
3030 |
|
3031 |
-
#: includes/class-mla-objects.php:
|
3032 |
msgid "Automatically add paragraphs"
|
3033 |
msgstr ""
|
3034 |
|
|
|
|
|
|
|
|
|
3035 |
#: includes/class-mla-options.php:64
|
3036 |
msgid "error loading tpls/mla-option-templates.tpl"
|
3037 |
msgstr ""
|
@@ -3260,7 +3274,7 @@ msgstr ""
|
|
3260 |
#: includes/class-mla-options.php:1100 includes/class-mla-options.php:1417
|
3261 |
#: includes/class-mla-settings-custom-fields-tab.php:463
|
3262 |
#: includes/class-mla-settings-custom-fields-tab.php:745
|
3263 |
-
#: includes/class-mla-settings-custom-fields-tab.php:
|
3264 |
msgid "MLA Column"
|
3265 |
msgstr ""
|
3266 |
|
@@ -3297,12 +3311,12 @@ msgstr ""
|
|
3297 |
#: includes/class-mla-options.php:2767 includes/class-mla-options.php:2813
|
3298 |
#: includes/class-mla-settings-custom-fields-tab.php:473
|
3299 |
#: includes/class-mla-settings-custom-fields-tab.php:755
|
3300 |
-
#: includes/class-mla-settings-custom-fields-tab.php:
|
3301 |
#: includes/class-mla-settings-iptc-exif-tab.php:471
|
3302 |
#: includes/class-mla-settings-iptc-exif-tab.php:833
|
3303 |
-
#: includes/class-mla-settings-iptc-exif-tab.php:
|
3304 |
-
#: includes/class-mla-settings-iptc-exif-tab.php:
|
3305 |
-
#: includes/class-mla-thumbnail-generation.php:
|
3306 |
msgid "Keep"
|
3307 |
msgstr ""
|
3308 |
|
@@ -3399,8 +3413,8 @@ msgid "Update Rule"
|
|
3399 |
msgstr ""
|
3400 |
|
3401 |
#: includes/class-mla-options.php:1267 includes/class-mla-options.php:2698
|
3402 |
-
#: includes/class-mla-settings-custom-fields-tab.php:
|
3403 |
-
#: includes/class-mla-settings-iptc-exif-tab.php:
|
3404 |
msgid "Map All Attachments"
|
3405 |
msgstr ""
|
3406 |
|
@@ -3501,7 +3515,7 @@ msgstr ""
|
|
3501 |
#: includes/class-mla-options.php:2809
|
3502 |
#: includes/class-mla-settings-iptc-exif-tab.php:466
|
3503 |
#: includes/class-mla-settings-iptc-exif-tab.php:828
|
3504 |
-
#: includes/class-mla-settings-iptc-exif-tab.php:
|
3505 |
msgid "IPTC"
|
3506 |
msgstr ""
|
3507 |
|
@@ -3510,7 +3524,7 @@ msgstr ""
|
|
3510 |
#: includes/class-mla-options.php:2811
|
3511 |
#: includes/class-mla-settings-iptc-exif-tab.php:468
|
3512 |
#: includes/class-mla-settings-iptc-exif-tab.php:830
|
3513 |
-
#: includes/class-mla-settings-iptc-exif-tab.php:
|
3514 |
msgid "EXIF"
|
3515 |
msgstr ""
|
3516 |
|
@@ -3599,147 +3613,147 @@ msgstr ""
|
|
3599 |
msgid "Add new"
|
3600 |
msgstr ""
|
3601 |
|
3602 |
-
#: includes/class-mla-polylang-support.php:
|
3603 |
-
#: includes/class-mla-polylang-support.php:
|
3604 |
msgid "Bulk Translations"
|
3605 |
msgstr ""
|
3606 |
|
3607 |
-
#: includes/class-mla-polylang-support.php:
|
3608 |
msgid "Translate"
|
3609 |
msgstr ""
|
3610 |
|
3611 |
-
#: includes/class-mla-polylang-support.php:
|
3612 |
msgid "All Languages"
|
3613 |
msgstr ""
|
3614 |
|
3615 |
-
#: includes/class-mla-polylang-support.php:
|
3616 |
-
#: includes/class-mla-polylang-support.php:
|
3617 |
-
#: includes/class-mla-polylang-support.php:
|
3618 |
msgid "Quick Translate"
|
3619 |
msgstr ""
|
3620 |
|
3621 |
-
#: includes/class-mla-polylang-support.php:
|
3622 |
msgid "Set Language"
|
3623 |
msgstr ""
|
3624 |
|
3625 |
-
#: includes/class-mla-polylang-support.php:
|
3626 |
-
#: includes/class-mla-polylang-support.php:
|
3627 |
msgid "Bulk Translate"
|
3628 |
msgstr ""
|
3629 |
|
3630 |
-
#: includes/class-mla-polylang-support.php:
|
3631 |
msgid "Add or Modify Translation"
|
3632 |
msgstr ""
|
3633 |
|
3634 |
-
#: includes/class-mla-polylang-support.php:
|
3635 |
-
#: includes/class-mla-polylang-support.php:
|
3636 |
-
#: includes/class-mla-polylang-support.php:
|
3637 |
-
#: includes/class-mla-polylang-support.php:
|
3638 |
-
#: includes/class-mla-wpml-support.php:
|
3639 |
-
#: includes/class-mla-wpml-support.php:
|
3640 |
-
#: includes/class-mla-wpml-support.php:
|
3641 |
msgid "Language"
|
3642 |
msgstr ""
|
3643 |
|
3644 |
-
#: includes/class-mla-polylang-support.php:
|
3645 |
-
#: includes/class-mla-thumbnail-generation.php:
|
3646 |
msgid "Options"
|
3647 |
msgstr ""
|
3648 |
|
3649 |
-
#: includes/class-mla-polylang-support.php:
|
3650 |
msgid "Translate this item inline"
|
3651 |
msgstr ""
|
3652 |
|
3653 |
-
#: includes/class-mla-polylang-support.php:
|
3654 |
-
#: includes/class-mla-polylang-support.php:
|
3655 |
-
#: includes/class-mla-wpml-support.php:
|
3656 |
-
#: includes/class-mla-wpml-support.php:
|
3657 |
msgid "Media/Assistant submenu table"
|
3658 |
msgstr ""
|
3659 |
|
3660 |
-
#: includes/class-mla-polylang-support.php:
|
3661 |
-
#: includes/class-mla-wpml-support.php:
|
3662 |
msgid "Language Column"
|
3663 |
msgstr ""
|
3664 |
|
3665 |
-
#: includes/class-mla-polylang-support.php:
|
3666 |
-
#: includes/class-mla-wpml-support.php:
|
3667 |
msgid ""
|
3668 |
"Check this option to add a Language column to the Media/Assistant submenu "
|
3669 |
"table."
|
3670 |
msgstr ""
|
3671 |
|
3672 |
-
#: includes/class-mla-polylang-support.php:
|
3673 |
-
#: includes/class-mla-wpml-support.php:
|
3674 |
msgid "Translations Column"
|
3675 |
msgstr ""
|
3676 |
|
3677 |
-
#: includes/class-mla-polylang-support.php:
|
3678 |
-
#: includes/class-mla-wpml-support.php:
|
3679 |
msgid ""
|
3680 |
"Check this option to add a Translation Status column to the Media/Assistant "
|
3681 |
"submenu table."
|
3682 |
msgstr ""
|
3683 |
|
3684 |
-
#: includes/class-mla-polylang-support.php:
|
3685 |
msgid ""
|
3686 |
"Check this option to add a Quick Translate rollover action to the Media/"
|
3687 |
"Assistant submenu table."
|
3688 |
msgstr ""
|
3689 |
|
3690 |
-
#: includes/class-mla-polylang-support.php:
|
3691 |
msgid ""
|
3692 |
"Check this option to add \"Translate\" to the \"Bulk Actions\" control on "
|
3693 |
"the Media/Assistant submenu table."
|
3694 |
msgstr ""
|
3695 |
|
3696 |
-
#: includes/class-mla-polylang-support.php:
|
3697 |
-
#: includes/class-mla-polylang-support.php:
|
3698 |
-
#: includes/class-mla-wpml-support.php:
|
3699 |
-
#: includes/class-mla-wpml-support.php:
|
3700 |
msgid "Term Management"
|
3701 |
msgstr ""
|
3702 |
|
3703 |
-
#: includes/class-mla-polylang-support.php:
|
3704 |
-
#: includes/class-mla-wpml-support.php:
|
3705 |
msgid "Term Assignment"
|
3706 |
msgstr ""
|
3707 |
|
3708 |
-
#: includes/class-mla-polylang-support.php:
|
3709 |
-
#: includes/class-mla-wpml-support.php:
|
3710 |
msgid ""
|
3711 |
"Check this option to assign language-specific terms when items are updated."
|
3712 |
msgstr ""
|
3713 |
|
3714 |
-
#: includes/class-mla-polylang-support.php:
|
3715 |
-
#: includes/class-mla-wpml-support.php:
|
3716 |
msgid "Term Synchronization"
|
3717 |
msgstr ""
|
3718 |
|
3719 |
-
#: includes/class-mla-polylang-support.php:
|
3720 |
-
#: includes/class-mla-wpml-support.php:
|
3721 |
msgid ""
|
3722 |
"Check this option to synchronize common terms among all item translations."
|
3723 |
msgstr ""
|
3724 |
|
3725 |
-
#: includes/class-mla-polylang-support.php:
|
3726 |
-
#: includes/class-mla-wpml-support.php:
|
3727 |
msgid "Term Mapping Replication"
|
3728 |
msgstr ""
|
3729 |
|
3730 |
-
#: includes/class-mla-polylang-support.php:
|
3731 |
-
#: includes/class-mla-wpml-support.php:
|
3732 |
msgid ""
|
3733 |
"When mapping IPTC/EXIF metadata to taxonomy terms, make them available in "
|
3734 |
"all languages."
|
3735 |
msgstr ""
|
3736 |
|
3737 |
-
#: includes/class-mla-polylang-support.php:
|
3738 |
-
#: includes/class-mla-wpml-support.php:
|
3739 |
msgid "Language Options"
|
3740 |
msgstr ""
|
3741 |
|
3742 |
-
#: includes/class-mla-polylang-support.php:
|
3743 |
#, php-format
|
3744 |
msgid ""
|
3745 |
"In this tab you can find a number of options for controlling Polylang-"
|
@@ -3748,25 +3762,25 @@ msgid ""
|
|
3748 |
"make."
|
3749 |
msgstr ""
|
3750 |
|
3751 |
-
#: includes/class-mla-polylang-support.php:
|
3752 |
-
#: includes/class-mla-wpml-support.php:
|
3753 |
#, php-format
|
3754 |
msgid ""
|
3755 |
"You can find more information about multilingual features in the %1$s "
|
3756 |
"section of the Documentation."
|
3757 |
msgstr ""
|
3758 |
|
3759 |
-
#: includes/class-mla-polylang-support.php:
|
3760 |
-
#: includes/class-mla-wpml-support.php:
|
3761 |
msgid "Language Options documentation"
|
3762 |
msgstr ""
|
3763 |
|
3764 |
-
#: includes/class-mla-polylang-support.php:
|
3765 |
-
#: includes/class-mla-wpml-support.php:
|
3766 |
msgid "WPML & Polylang Multilingual Support; the MLA Language Tab"
|
3767 |
msgstr ""
|
3768 |
|
3769 |
-
#: includes/class-mla-polylang-support.php:
|
3770 |
#: includes/class-mla-settings-custom-fields-tab.php:732
|
3771 |
#: includes/class-mla-settings-iptc-exif-tab.php:811
|
3772 |
#: includes/class-mla-settings-shortcodes-tab.php:713
|
@@ -3776,36 +3790,36 @@ msgstr ""
|
|
3776 |
#: includes/class-mla-settings-view-tab.php:372
|
3777 |
#: includes/class-mla-settings.php:1058 includes/class-mla-settings.php:1430
|
3778 |
#: includes/class-mla-settings.php:1432
|
3779 |
-
#: includes/class-mla-wpml-support.php:
|
3780 |
msgid "Save Changes"
|
3781 |
msgstr ""
|
3782 |
|
3783 |
-
#: includes/class-mla-polylang-support.php:
|
3784 |
-
#: includes/class-mla-wpml-support.php:
|
3785 |
msgid "Delete Language options and restore default settings"
|
3786 |
msgstr ""
|
3787 |
|
3788 |
-
#: includes/class-mla-polylang-support.php:
|
3789 |
#: includes/class-mla-settings.php:796 includes/class-mla-settings.php:1063
|
3790 |
-
#: includes/class-mla-wpml-support.php:
|
3791 |
msgid "Go to Top"
|
3792 |
msgstr ""
|
3793 |
|
3794 |
-
#: includes/class-mla-polylang-support.php:
|
3795 |
-
#: includes/class-mla-wpml-support.php:
|
3796 |
msgid "Language settings saved."
|
3797 |
msgstr ""
|
3798 |
|
3799 |
-
#: includes/class-mla-polylang-support.php:
|
3800 |
#: includes/class-mla-settings.php:1648
|
3801 |
-
#: includes/class-mla-wpml-support.php:
|
3802 |
#, php-format
|
3803 |
msgctxt "message_list"
|
3804 |
msgid "delete_option \"%1$s\""
|
3805 |
msgstr ""
|
3806 |
|
3807 |
-
#: includes/class-mla-polylang-support.php:
|
3808 |
-
#: includes/class-mla-wpml-support.php:
|
3809 |
msgid "Language settings reset to default values."
|
3810 |
msgstr ""
|
3811 |
|
@@ -3998,14 +4012,14 @@ msgstr ""
|
|
3998 |
|
3999 |
#: includes/class-mla-settings-custom-fields-tab.php:499
|
4000 |
#: includes/class-mla-settings-custom-fields-tab.php:781
|
4001 |
-
#: includes/class-mla-settings-custom-fields-tab.php:
|
4002 |
-
#: includes/class-mla-settings-custom-fields-tab.php:
|
4003 |
-
#: includes/class-mla-settings-documentation-tab.php:
|
4004 |
#: includes/class-mla-settings-iptc-exif-tab.php:508
|
4005 |
#: includes/class-mla-settings-iptc-exif-tab.php:862
|
4006 |
-
#: includes/class-mla-settings-iptc-exif-tab.php:
|
4007 |
-
#: includes/class-mla-settings-iptc-exif-tab.php:
|
4008 |
-
#: includes/class-mla-settings-iptc-exif-tab.php:
|
4009 |
#: includes/class-mla-settings-upload-tab.php:554
|
4010 |
#: includes/class-mla-settings-upload-tab.php:1036
|
4011 |
msgid "Active"
|
@@ -4013,14 +4027,14 @@ msgstr ""
|
|
4013 |
|
4014 |
#: includes/class-mla-settings-custom-fields-tab.php:501
|
4015 |
#: includes/class-mla-settings-custom-fields-tab.php:783
|
4016 |
-
#: includes/class-mla-settings-custom-fields-tab.php:
|
4017 |
-
#: includes/class-mla-settings-custom-fields-tab.php:
|
4018 |
-
#: includes/class-mla-settings-documentation-tab.php:
|
4019 |
#: includes/class-mla-settings-iptc-exif-tab.php:510
|
4020 |
#: includes/class-mla-settings-iptc-exif-tab.php:864
|
4021 |
-
#: includes/class-mla-settings-iptc-exif-tab.php:
|
4022 |
-
#: includes/class-mla-settings-iptc-exif-tab.php:
|
4023 |
-
#: includes/class-mla-settings-iptc-exif-tab.php:
|
4024 |
#: includes/class-mla-settings-upload-tab.php:172
|
4025 |
#: includes/class-mla-settings-upload-tab.php:540
|
4026 |
#: includes/class-mla-settings-upload-tab.php:1034
|
@@ -4164,116 +4178,116 @@ msgstr ""
|
|
4164 |
msgid "Rule not found"
|
4165 |
msgstr ""
|
4166 |
|
4167 |
-
#: includes/class-mla-settings-custom-fields-tab.php:
|
4168 |
-
#: includes/class-mla-settings-iptc-exif-tab.php:
|
4169 |
msgctxt "list_table_column"
|
4170 |
msgid "Bad Name"
|
4171 |
msgstr ""
|
4172 |
|
4173 |
-
#: includes/class-mla-settings-custom-fields-tab.php:
|
4174 |
msgctxt "list_table_column"
|
4175 |
msgid "Meta/Template"
|
4176 |
msgstr ""
|
4177 |
|
4178 |
-
#: includes/class-mla-settings-custom-fields-tab.php:
|
4179 |
msgctxt "list_table_column"
|
4180 |
msgid "Visibility"
|
4181 |
msgstr ""
|
4182 |
|
4183 |
-
#: includes/class-mla-settings-custom-fields-tab.php:
|
4184 |
-
#: includes/class-mla-settings-iptc-exif-tab.php:
|
4185 |
msgctxt "list_table_column"
|
4186 |
msgid "Existing Text"
|
4187 |
msgstr ""
|
4188 |
|
4189 |
-
#: includes/class-mla-settings-custom-fields-tab.php:
|
4190 |
-
#: includes/class-mla-settings-iptc-exif-tab.php:
|
4191 |
msgctxt "list_table_column"
|
4192 |
msgid "Delete NULL"
|
4193 |
msgstr ""
|
4194 |
|
4195 |
-
#: includes/class-mla-settings-custom-fields-tab.php:
|
4196 |
-
#: includes/class-mla-settings-iptc-exif-tab.php:
|
4197 |
msgctxt "list_table_column"
|
4198 |
msgid "Format"
|
4199 |
msgstr ""
|
4200 |
|
4201 |
-
#: includes/class-mla-settings-custom-fields-tab.php:
|
4202 |
-
#: includes/class-mla-settings-iptc-exif-tab.php:
|
4203 |
msgctxt "list_table_column"
|
4204 |
msgid "Option"
|
4205 |
msgstr ""
|
4206 |
|
4207 |
-
#: includes/class-mla-settings-custom-fields-tab.php:
|
4208 |
-
#: includes/class-mla-settings-custom-fields-tab.php:
|
4209 |
-
#: includes/class-mla-settings-iptc-exif-tab.php:
|
4210 |
-
#: includes/class-mla-settings-iptc-exif-tab.php:
|
4211 |
msgid "Execute"
|
4212 |
msgstr ""
|
4213 |
|
4214 |
-
#: includes/class-mla-settings-custom-fields-tab.php:
|
4215 |
msgid "Purge custom field values"
|
4216 |
msgstr ""
|
4217 |
|
4218 |
-
#: includes/class-mla-settings-custom-fields-tab.php:
|
4219 |
-
#: includes/class-mla-settings-custom-fields-tab.php:
|
4220 |
-
#: includes/class-mla-settings-iptc-exif-tab.php:
|
4221 |
-
#: includes/class-mla-settings-iptc-exif-tab.php:
|
4222 |
msgid "Purge Values"
|
4223 |
msgstr ""
|
4224 |
|
4225 |
-
#: includes/class-mla-settings-custom-fields-tab.php:
|
4226 |
-
#: includes/class-mla-settings-iptc-exif-tab.php:
|
4227 |
-
#: includes/class-mla-settings-shortcodes-tab.php:
|
4228 |
msgid "Any Status"
|
4229 |
msgstr ""
|
4230 |
|
4231 |
-
#: includes/class-mla-settings-custom-fields-tab.php:
|
4232 |
msgctxt "table_view_singular"
|
4233 |
msgid "MLA Column"
|
4234 |
msgstr ""
|
4235 |
|
4236 |
-
#: includes/class-mla-settings-custom-fields-tab.php:
|
4237 |
msgctxt "table_view_plural"
|
4238 |
msgid "MLA Column"
|
4239 |
msgstr ""
|
4240 |
|
4241 |
-
#: includes/class-mla-settings-custom-fields-tab.php:
|
4242 |
msgctxt "table_view_singular"
|
4243 |
msgid "Quick Edit"
|
4244 |
msgstr ""
|
4245 |
|
4246 |
-
#: includes/class-mla-settings-custom-fields-tab.php:
|
4247 |
msgctxt "table_view_plural"
|
4248 |
msgid "Quick Edit"
|
4249 |
msgstr ""
|
4250 |
|
4251 |
-
#: includes/class-mla-settings-custom-fields-tab.php:
|
4252 |
msgctxt "table_view_singular"
|
4253 |
msgid "Bulk Edit"
|
4254 |
msgstr ""
|
4255 |
|
4256 |
-
#: includes/class-mla-settings-custom-fields-tab.php:
|
4257 |
msgctxt "table_view_plural"
|
4258 |
msgid "Bulk Edit"
|
4259 |
msgstr ""
|
4260 |
|
4261 |
-
#: includes/class-mla-settings-custom-fields-tab.php:
|
4262 |
-
#: includes/class-mla-settings-iptc-exif-tab.php:
|
4263 |
msgctxt "table_view_singular"
|
4264 |
msgid "Read Only"
|
4265 |
msgstr ""
|
4266 |
|
4267 |
-
#: includes/class-mla-settings-custom-fields-tab.php:
|
4268 |
-
#: includes/class-mla-settings-iptc-exif-tab.php:
|
4269 |
msgctxt "table_view_plural"
|
4270 |
msgid "Read Only"
|
4271 |
msgstr ""
|
4272 |
|
4273 |
#: includes/class-mla-settings-documentation-tab.php:82
|
4274 |
-
#: includes/class-mla-settings-documentation-tab.php:
|
4275 |
-
#: includes/class-mla-settings-documentation-tab.php:
|
4276 |
-
#: includes/class-mla-settings-documentation-tab.php:
|
4277 |
#, php-format
|
4278 |
msgid "Example plugin \"%1$s\" not found"
|
4279 |
msgstr ""
|
@@ -4344,115 +4358,115 @@ msgstr ""
|
|
4344 |
msgid "Empty mla_item_ID - \"%1$s\""
|
4345 |
msgstr ""
|
4346 |
|
4347 |
-
#: includes/class-mla-settings-documentation-tab.php:
|
4348 |
msgctxt "list_table_column"
|
4349 |
msgid "Current Version"
|
4350 |
msgstr ""
|
4351 |
|
4352 |
-
#: includes/class-mla-settings-documentation-tab.php:
|
4353 |
msgctxt "list_table_column"
|
4354 |
msgid "Installed Version"
|
4355 |
msgstr ""
|
4356 |
|
4357 |
-
#: includes/class-mla-settings-documentation-tab.php:
|
4358 |
msgctxt "list_table_column"
|
4359 |
msgid "File Name"
|
4360 |
msgstr ""
|
4361 |
|
4362 |
-
#: includes/class-mla-settings-documentation-tab.php:
|
4363 |
msgctxt "list_table_column"
|
4364 |
msgid "Tags"
|
4365 |
msgstr ""
|
4366 |
|
4367 |
-
#: includes/class-mla-settings-documentation-tab.php:
|
4368 |
msgid "Install this plugin"
|
4369 |
msgstr ""
|
4370 |
|
4371 |
-
#: includes/class-mla-settings-documentation-tab.php:
|
4372 |
-
#: includes/class-mla-settings-documentation-tab.php:
|
4373 |
msgid "Install"
|
4374 |
msgstr ""
|
4375 |
|
4376 |
-
#: includes/class-mla-settings-documentation-tab.php:
|
4377 |
msgid "Update this plugin"
|
4378 |
msgstr ""
|
4379 |
|
4380 |
-
#: includes/class-mla-settings-documentation-tab.php:
|
4381 |
-
#: includes/class-mla-settings-shortcodes-tab.php:
|
4382 |
msgid "View this item"
|
4383 |
msgstr ""
|
4384 |
|
4385 |
-
#: includes/class-mla-settings-documentation-tab.php:
|
4386 |
#, php-format
|
4387 |
msgid "Example plugin \"%1$s\" fs_connect failed; no action taken. Error: %2$s"
|
4388 |
msgstr ""
|
4389 |
|
4390 |
-
#: includes/class-mla-settings-documentation-tab.php:
|
4391 |
#, php-format
|
4392 |
msgid "Example plugin \"%1$s\" fs_connect failed; no action taken"
|
4393 |
msgstr ""
|
4394 |
|
4395 |
-
#: includes/class-mla-settings-documentation-tab.php:
|
4396 |
#, php-format
|
4397 |
msgid ""
|
4398 |
"Example plugin \"%1$s\" install_package failed; no action taken. Error: %2$s"
|
4399 |
msgstr ""
|
4400 |
|
4401 |
-
#: includes/class-mla-settings-documentation-tab.php:
|
4402 |
#, php-format
|
4403 |
msgid "Example plugin \"%1$s\" remove old single file failed."
|
4404 |
msgstr ""
|
4405 |
|
4406 |
-
#: includes/class-mla-settings-documentation-tab.php:
|
4407 |
#, php-format
|
4408 |
msgid "Example plugin \"%1$s\" already installed; no action taken"
|
4409 |
msgstr ""
|
4410 |
|
4411 |
-
#: includes/class-mla-settings-documentation-tab.php:
|
4412 |
#, php-format
|
4413 |
msgid "Example plugin \"%1$s\" installed"
|
4414 |
msgstr ""
|
4415 |
|
4416 |
-
#: includes/class-mla-settings-documentation-tab.php:
|
4417 |
#, php-format
|
4418 |
msgid "Example plugin \"%1$s\" not installed; no action taken"
|
4419 |
msgstr ""
|
4420 |
|
4421 |
-
#: includes/class-mla-settings-documentation-tab.php:
|
4422 |
#, php-format
|
4423 |
msgid "Example plugin \"%1$s\" updated"
|
4424 |
msgstr ""
|
4425 |
|
4426 |
-
#: includes/class-mla-settings-documentation-tab.php:
|
4427 |
msgid "Network"
|
4428 |
msgstr ""
|
4429 |
|
4430 |
-
#: includes/class-mla-settings-documentation-tab.php:
|
4431 |
msgctxt "table_view_singular"
|
4432 |
msgid "Installed"
|
4433 |
msgstr ""
|
4434 |
|
4435 |
-
#: includes/class-mla-settings-documentation-tab.php:
|
4436 |
msgctxt "table_view_plural"
|
4437 |
msgid "Installed"
|
4438 |
msgstr ""
|
4439 |
|
4440 |
-
#: includes/class-mla-settings-documentation-tab.php:
|
4441 |
msgctxt "table_view_singular"
|
4442 |
msgid "Network"
|
4443 |
msgstr ""
|
4444 |
|
4445 |
-
#: includes/class-mla-settings-documentation-tab.php:
|
4446 |
msgctxt "table_view_plural"
|
4447 |
msgid "Network"
|
4448 |
msgstr ""
|
4449 |
|
4450 |
-
#: includes/class-mla-settings-documentation-tab.php:
|
4451 |
msgctxt "table_view_singular"
|
4452 |
msgid "Uninstalled"
|
4453 |
msgstr ""
|
4454 |
|
4455 |
-
#: includes/class-mla-settings-documentation-tab.php:
|
4456 |
msgctxt "table_view_plural"
|
4457 |
msgid "Uninstalled"
|
4458 |
msgstr ""
|
@@ -4502,51 +4516,51 @@ msgid ""
|
|
4502 |
"WordPress standard attachment fields, taxonomy terms and custom fields."
|
4503 |
msgstr ""
|
4504 |
|
4505 |
-
#: includes/class-mla-settings-iptc-exif-tab.php:
|
4506 |
msgctxt "list_table_column"
|
4507 |
msgid "IPTC Value"
|
4508 |
msgstr ""
|
4509 |
|
4510 |
-
#: includes/class-mla-settings-iptc-exif-tab.php:
|
4511 |
msgctxt "list_table_column"
|
4512 |
msgid "EXIF/Template Value"
|
4513 |
msgstr ""
|
4514 |
|
4515 |
-
#: includes/class-mla-settings-iptc-exif-tab.php:
|
4516 |
msgctxt "list_table_column"
|
4517 |
msgid "Priority "
|
4518 |
msgstr ""
|
4519 |
|
4520 |
-
#: includes/class-mla-settings-iptc-exif-tab.php:
|
4521 |
msgctxt "list_table_column"
|
4522 |
msgid "Delimiter(s)"
|
4523 |
msgstr ""
|
4524 |
|
4525 |
-
#: includes/class-mla-settings-iptc-exif-tab.php:
|
4526 |
msgctxt "list_table_column"
|
4527 |
msgid "Parent"
|
4528 |
msgstr ""
|
4529 |
|
4530 |
-
#: includes/class-mla-settings-iptc-exif-tab.php:
|
4531 |
msgid "Purge IPTC EXIF values"
|
4532 |
msgstr ""
|
4533 |
|
4534 |
-
#: includes/class-mla-settings-iptc-exif-tab.php:
|
4535 |
msgctxt "table_view_singular"
|
4536 |
msgid "Standard"
|
4537 |
msgstr ""
|
4538 |
|
4539 |
-
#: includes/class-mla-settings-iptc-exif-tab.php:
|
4540 |
msgctxt "table_view_plural"
|
4541 |
msgid "Standard"
|
4542 |
msgstr ""
|
4543 |
|
4544 |
-
#: includes/class-mla-settings-iptc-exif-tab.php:
|
4545 |
msgctxt "table_view_singular"
|
4546 |
msgid "Taxonomy"
|
4547 |
msgstr ""
|
4548 |
|
4549 |
-
#: includes/class-mla-settings-iptc-exif-tab.php:
|
4550 |
msgctxt "table_view_plural"
|
4551 |
msgid "Taxonomy"
|
4552 |
msgstr ""
|
@@ -4681,8 +4695,8 @@ msgstr ""
|
|
4681 |
|
4682 |
#: includes/class-mla-settings-shortcodes-tab.php:410
|
4683 |
#: includes/class-mla-settings-shortcodes-tab.php:482
|
4684 |
-
#: includes/class-mla-settings-shortcodes-tab.php:
|
4685 |
-
#: includes/class-mla-settings-shortcodes-tab.php:
|
4686 |
msgid "Copy"
|
4687 |
msgstr ""
|
4688 |
|
@@ -4715,8 +4729,8 @@ msgid "Ghostscript support is not installed."
|
|
4715 |
msgstr ""
|
4716 |
|
4717 |
#: includes/class-mla-settings-shortcodes-tab.php:663
|
4718 |
-
#: includes/class-mla-wpml-support.php:
|
4719 |
-
#: includes/class-mla-wpml-support.php:
|
4720 |
msgid "WARNING:"
|
4721 |
msgstr ""
|
4722 |
|
@@ -4760,91 +4774,91 @@ msgstr ""
|
|
4760 |
msgid "Search Templates"
|
4761 |
msgstr ""
|
4762 |
|
4763 |
-
#: includes/class-mla-settings-shortcodes-tab.php:
|
4764 |
msgctxt "list_table_column"
|
4765 |
msgid "Type"
|
4766 |
msgstr ""
|
4767 |
|
4768 |
-
#: includes/class-mla-settings-shortcodes-tab.php:
|
4769 |
msgctxt "list_table_column"
|
4770 |
msgid "Shortcode"
|
4771 |
msgstr ""
|
4772 |
|
4773 |
-
#: includes/class-mla-settings-shortcodes-tab.php:
|
4774 |
msgid "Make a copy"
|
4775 |
msgstr ""
|
4776 |
|
4777 |
-
#: includes/class-mla-settings-shortcodes-tab.php:
|
4778 |
msgid "default"
|
4779 |
msgstr ""
|
4780 |
|
4781 |
-
#: includes/class-mla-settings-shortcodes-tab.php:
|
4782 |
-
#: includes/class-mla-settings-shortcodes-tab.php:
|
4783 |
msgctxt "table_view_singular"
|
4784 |
msgid "Style"
|
4785 |
msgstr ""
|
4786 |
|
4787 |
-
#: includes/class-mla-settings-shortcodes-tab.php:
|
4788 |
-
#: includes/class-mla-settings-shortcodes-tab.php:
|
4789 |
msgctxt "table_view_singular"
|
4790 |
msgid "Markup"
|
4791 |
msgstr ""
|
4792 |
|
4793 |
-
#: includes/class-mla-settings-shortcodes-tab.php:
|
4794 |
-
#: includes/class-mla-thumbnail-generation.php:
|
4795 |
msgid "Delete"
|
4796 |
msgstr ""
|
4797 |
|
4798 |
-
#: includes/class-mla-settings-shortcodes-tab.php:
|
4799 |
msgid "Default"
|
4800 |
msgstr ""
|
4801 |
|
4802 |
-
#: includes/class-mla-settings-shortcodes-tab.php:
|
4803 |
msgid "Custom"
|
4804 |
msgstr ""
|
4805 |
|
4806 |
-
#: includes/class-mla-settings-shortcodes-tab.php:
|
4807 |
msgctxt "table_view_plural"
|
4808 |
msgid "Style"
|
4809 |
msgstr ""
|
4810 |
|
4811 |
-
#: includes/class-mla-settings-shortcodes-tab.php:
|
4812 |
msgctxt "table_view_plural"
|
4813 |
msgid "Markup"
|
4814 |
msgstr ""
|
4815 |
|
4816 |
-
#: includes/class-mla-settings-shortcodes-tab.php:
|
4817 |
#: includes/class-mla-template-support.php:70
|
4818 |
#: includes/class-mla-template-support.php:126
|
4819 |
msgctxt "table_view_singular"
|
4820 |
msgid "Gallery"
|
4821 |
msgstr ""
|
4822 |
|
4823 |
-
#: includes/class-mla-settings-shortcodes-tab.php:
|
4824 |
msgctxt "table_view_plural"
|
4825 |
msgid "Gallery"
|
4826 |
msgstr ""
|
4827 |
|
4828 |
-
#: includes/class-mla-settings-shortcodes-tab.php:
|
4829 |
#: includes/class-mla-template-support.php:88
|
4830 |
#: includes/class-mla-template-support.php:174
|
4831 |
msgctxt "table_view_singular"
|
4832 |
msgid "Tag Cloud"
|
4833 |
msgstr ""
|
4834 |
|
4835 |
-
#: includes/class-mla-settings-shortcodes-tab.php:
|
4836 |
msgctxt "table_view_plural"
|
4837 |
msgid "Tag Cloud"
|
4838 |
msgstr ""
|
4839 |
|
4840 |
-
#: includes/class-mla-settings-shortcodes-tab.php:
|
4841 |
#: includes/class-mla-template-support.php:106
|
4842 |
#: includes/class-mla-template-support.php:222
|
4843 |
msgctxt "table_view_singular"
|
4844 |
msgid "Term List"
|
4845 |
msgstr ""
|
4846 |
|
4847 |
-
#: includes/class-mla-settings-shortcodes-tab.php:
|
4848 |
msgctxt "table_view_plural"
|
4849 |
msgid "Term List"
|
4850 |
msgstr ""
|
@@ -5001,15 +5015,15 @@ msgstr ""
|
|
5001 |
msgid "Revert to Standard"
|
5002 |
msgstr ""
|
5003 |
|
5004 |
-
#: includes/class-mla-settings-upload-tab.php:
|
5005 |
msgid "Delete/Revert Custom"
|
5006 |
msgstr ""
|
5007 |
|
5008 |
-
#: includes/class-mla-settings-upload-tab.php:
|
5009 |
msgid "Select this entry"
|
5010 |
msgstr ""
|
5011 |
|
5012 |
-
#: includes/class-mla-settings-upload-tab.php:
|
5013 |
msgid "Select these entries"
|
5014 |
msgstr ""
|
5015 |
|
@@ -5445,44 +5459,44 @@ msgid "Settings imported; %1$s updated, %2$s unchanged."
|
|
5445 |
msgstr ""
|
5446 |
|
5447 |
#: includes/class-mla-shortcode-support.php:439
|
5448 |
-
#: includes/class-mla-shortcode-support.php:
|
5449 |
-
#: includes/class-mla-shortcode-support.php:
|
5450 |
-
#: includes/class-mla-shortcode-support.php:
|
5451 |
msgid "Previous"
|
5452 |
msgstr ""
|
5453 |
|
5454 |
#: includes/class-mla-shortcode-support.php:440
|
5455 |
-
#: includes/class-mla-shortcode-support.php:
|
5456 |
-
#: includes/class-mla-shortcode-support.php:
|
5457 |
-
#: includes/class-mla-shortcode-support.php:
|
5458 |
msgid "Next"
|
5459 |
msgstr ""
|
5460 |
|
5461 |
#: includes/class-mla-shortcode-support.php:515
|
5462 |
#: includes/class-mla-shortcode-support.php:521
|
5463 |
-
#: includes/class-mla-shortcode-support.php:
|
5464 |
-
#: includes/class-mla-shortcode-support.php:
|
5465 |
-
#: includes/class-mla-shortcode-support.php:
|
5466 |
-
#: includes/class-mla-shortcode-support.php:
|
5467 |
#: includes/class-mla-template-support.php:598
|
5468 |
msgid "not found"
|
5469 |
msgstr ""
|
5470 |
|
5471 |
#: includes/class-mla-shortcode-support.php:546
|
5472 |
-
#: includes/class-mla-shortcode-support.php:
|
5473 |
-
#: includes/class-mla-shortcode-support.php:
|
5474 |
msgid "mla_debug REQUEST"
|
5475 |
msgstr ""
|
5476 |
|
5477 |
#: includes/class-mla-shortcode-support.php:547
|
5478 |
-
#: includes/class-mla-shortcode-support.php:
|
5479 |
-
#: includes/class-mla-shortcode-support.php:
|
5480 |
msgid "mla_debug attributes"
|
5481 |
msgstr ""
|
5482 |
|
5483 |
#: includes/class-mla-shortcode-support.php:548
|
5484 |
-
#: includes/class-mla-shortcode-support.php:
|
5485 |
-
#: includes/class-mla-shortcode-support.php:
|
5486 |
msgid "mla_debug arguments"
|
5487 |
msgstr ""
|
5488 |
|
@@ -5496,89 +5510,89 @@ msgid ""
|
|
5496 |
"<strong>default</strong>, query = "
|
5497 |
msgstr ""
|
5498 |
|
5499 |
-
#: includes/class-mla-shortcode-support.php:
|
5500 |
msgid "unknown"
|
5501 |
msgstr ""
|
5502 |
|
5503 |
-
#: includes/class-mla-shortcode-support.php:
|
5504 |
msgid "mla_debug empty cloud"
|
5505 |
msgstr ""
|
5506 |
|
5507 |
-
#: includes/class-mla-shortcode-support.php:
|
5508 |
msgid "mla_debug empty list"
|
5509 |
msgstr ""
|
5510 |
|
5511 |
-
#: includes/class-mla-shortcode-support.php:
|
5512 |
msgid "no-terms"
|
5513 |
msgstr ""
|
5514 |
|
5515 |
-
#: includes/class-mla-shortcode-support.php:
|
5516 |
-
#: includes/class-mla-shortcode-support.php:
|
5517 |
-
#: includes/class-mla-shortcode-support.php:
|
5518 |
msgid "Invalid mla_gallery"
|
5519 |
msgstr ""
|
5520 |
|
5521 |
-
#: includes/class-mla-shortcode-support.php:
|
5522 |
msgid "mla_debug query"
|
5523 |
msgstr ""
|
5524 |
|
5525 |
-
#: includes/class-mla-shortcode-support.php:
|
5526 |
msgid "mla_debug request"
|
5527 |
msgstr ""
|
5528 |
|
5529 |
-
#: includes/class-mla-shortcode-support.php:
|
5530 |
msgid "mla_debug query_vars"
|
5531 |
msgstr ""
|
5532 |
|
5533 |
-
#: includes/class-mla-shortcode-support.php:
|
5534 |
msgid "mla_debug post_count"
|
5535 |
msgstr ""
|
5536 |
|
5537 |
-
#: includes/class-mla-shortcode-support.php:
|
5538 |
msgid "mla_debug WHERE filter"
|
5539 |
msgstr ""
|
5540 |
|
5541 |
-
#: includes/class-mla-shortcode-support.php:
|
5542 |
msgid "mla_debug modified WHERE filter"
|
5543 |
msgstr ""
|
5544 |
|
5545 |
-
#: includes/class-mla-shortcode-support.php:
|
5546 |
msgid "mla_debug ORDER BY filter, incoming"
|
5547 |
msgstr ""
|
5548 |
|
5549 |
-
#: includes/class-mla-shortcode-support.php:
|
5550 |
msgid "Replacement ORDER BY clause"
|
5551 |
msgstr ""
|
5552 |
|
5553 |
-
#: includes/class-mla-shortcode-support.php:
|
5554 |
msgid "mla_debug posts_clauses filter"
|
5555 |
msgstr ""
|
5556 |
|
5557 |
-
#: includes/class-mla-shortcode-support.php:
|
5558 |
msgid "mla_debug posts_clauses_request filter"
|
5559 |
msgstr ""
|
5560 |
|
5561 |
-
#: includes/class-mla-shortcode-support.php:
|
5562 |
msgid "Invalid taxonomy"
|
5563 |
msgstr ""
|
5564 |
|
5565 |
-
#: includes/class-mla-shortcode-support.php:
|
5566 |
msgid "mla_debug query arguments"
|
5567 |
msgstr ""
|
5568 |
|
5569 |
-
#: includes/class-mla-shortcode-support.php:
|
5570 |
msgid "mla_debug last_query"
|
5571 |
msgstr ""
|
5572 |
|
5573 |
-
#: includes/class-mla-shortcode-support.php:
|
5574 |
msgid "mla_debug last_error"
|
5575 |
msgstr ""
|
5576 |
|
5577 |
-
#: includes/class-mla-shortcode-support.php:
|
5578 |
msgid "mla_debug num_rows"
|
5579 |
msgstr ""
|
5580 |
|
5581 |
-
#: includes/class-mla-shortcode-support.php:
|
5582 |
msgid "mla_debug found_rows"
|
5583 |
msgstr ""
|
5584 |
|
@@ -5740,7 +5754,7 @@ msgstr ""
|
|
5740 |
|
5741 |
#: includes/class-mla-thumbnail-generation.php:96
|
5742 |
#: includes/class-mla-thumbnail-generation.php:98
|
5743 |
-
#: includes/class-mla-thumbnail-generation.php:
|
5744 |
msgid "Generate Thumbnails"
|
5745 |
msgstr ""
|
5746 |
|
@@ -5788,74 +5802,74 @@ msgid "%1$sthumbnail generated as new item %2$s."
|
|
5788 |
msgstr ""
|
5789 |
|
5790 |
#: includes/class-mla-thumbnail-generation.php:550
|
5791 |
-
#: includes/class-mla-thumbnail-generation.php:
|
5792 |
msgid "Generated Thumbnails"
|
5793 |
msgstr ""
|
5794 |
|
5795 |
-
#: includes/class-mla-thumbnail-generation.php:
|
5796 |
msgid ""
|
5797 |
"Type “WP” generates native WordPress thumbnails without creating "
|
5798 |
"a separate image item."
|
5799 |
msgstr ""
|
5800 |
|
5801 |
-
#: includes/class-mla-thumbnail-generation.php:
|
5802 |
msgid ""
|
5803 |
"Pull down the Help menu and select Thumbnail Generation for setting details"
|
5804 |
msgstr ""
|
5805 |
|
5806 |
-
#: includes/class-mla-thumbnail-generation.php:
|
5807 |
msgid "Width"
|
5808 |
msgstr ""
|
5809 |
|
5810 |
-
#: includes/class-mla-thumbnail-generation.php:
|
5811 |
msgid "Height"
|
5812 |
msgstr ""
|
5813 |
|
5814 |
-
#: includes/class-mla-thumbnail-generation.php:
|
5815 |
msgid "Best Fit"
|
5816 |
msgstr ""
|
5817 |
|
5818 |
-
#: includes/class-mla-thumbnail-generation.php:
|
5819 |
msgid "Page"
|
5820 |
msgstr ""
|
5821 |
|
5822 |
-
#: includes/class-mla-thumbnail-generation.php:
|
5823 |
msgid "Resolution"
|
5824 |
msgstr ""
|
5825 |
|
5826 |
-
#: includes/class-mla-thumbnail-generation.php:
|
5827 |
msgid "Quality"
|
5828 |
msgstr ""
|
5829 |
|
5830 |
-
#: includes/class-mla-thumbnail-generation.php:
|
5831 |
msgid "Existing Items"
|
5832 |
msgstr ""
|
5833 |
|
5834 |
-
#: includes/class-mla-thumbnail-generation.php:
|
5835 |
msgid "Ignore"
|
5836 |
msgstr ""
|
5837 |
|
5838 |
-
#: includes/class-mla-thumbnail-generation.php:
|
5839 |
msgid "Suffix"
|
5840 |
msgstr ""
|
5841 |
|
5842 |
-
#: includes/class-mla-wpml-support.php:
|
5843 |
msgid "Duplicate translation created; update as desired."
|
5844 |
msgstr ""
|
5845 |
|
5846 |
-
#: includes/class-mla-wpml-support.php:
|
5847 |
msgid "Make media available in all languages"
|
5848 |
msgstr ""
|
5849 |
|
5850 |
-
#: includes/class-mla-wpml-support.php:
|
5851 |
msgid " WPML Media is not installed."
|
5852 |
msgstr ""
|
5853 |
|
5854 |
-
#: includes/class-mla-wpml-support.php:
|
5855 |
msgid " WPML Media is not active."
|
5856 |
msgstr ""
|
5857 |
|
5858 |
-
#: includes/class-mla-wpml-support.php:
|
5859 |
#, php-format
|
5860 |
msgid ""
|
5861 |
"In this tab you can find a number of options for controlling WPML-specific "
|
@@ -5863,13 +5877,13 @@ msgid ""
|
|
5863 |
"\"Save Changes\" at the bottom of the tab to save any changes you make."
|
5864 |
msgstr ""
|
5865 |
|
5866 |
-
#: includes/class-mla-wpml-support.php:
|
5867 |
-
#: includes/class-mla-wpml-support.php:
|
5868 |
#, php-format
|
5869 |
msgid "Edit the %s translation"
|
5870 |
msgstr ""
|
5871 |
|
5872 |
-
#: includes/class-mla-wpml-support.php:
|
5873 |
#, php-format
|
5874 |
msgid "Add translation to %s"
|
5875 |
msgstr ""
|
2 |
msgid ""
|
3 |
msgstr ""
|
4 |
"Project-Id-Version: Media Library Assistant\n"
|
5 |
+
"POT-Creation-Date: 2017-10-15 21:53-0700\n"
|
6 |
"PO-Revision-Date: 2015-08-21 21:38-0800\n"
|
7 |
"Last-Translator: David Lingren <david@fairtradejudaica.org>\n"
|
8 |
"Language-Team: David Lingren <david@fairtradejudaica.org>\n"
|
22 |
|
23 |
#: includes/class-mla-admin-columns-support-deprecated.php:33
|
24 |
#: includes/class-mla-admin-columns-support.php:55
|
25 |
+
#: includes/class-mla-core-options.php:543 includes/class-mla-settings.php:426
|
26 |
#: includes/class-mla-settings.php:1450 includes/class-mla-settings.php:1470
|
27 |
#: index.php:48
|
28 |
msgid "Media Library Assistant"
|
30 |
|
31 |
#: includes/class-mla-admin-columns-support-deprecated.php:34
|
32 |
#: includes/class-mla-admin-columns-support.php:56
|
33 |
+
#: includes/class-mla-core-options.php:552
|
34 |
msgid "Assistant"
|
35 |
msgstr ""
|
36 |
|
37 |
+
#: includes/class-mla-ajax.php:181 includes/class-mla-core-options.php:1146
|
38 |
+
#: includes/class-mla-data.php:3747 includes/class-mla-edit-media.php:426
|
39 |
+
#: includes/class-mla-main.php:1832 includes/class-mla-main.php:2032
|
40 |
+
#: includes/class-mla-objects.php:356 includes/class-mla-options.php:451
|
41 |
#: includes/mla-main-search-box-template.php:47
|
42 |
#: includes/mla-media-modal-js-template.php:40
|
43 |
msgid "Title"
|
44 |
msgstr ""
|
45 |
|
46 |
+
#: includes/class-mla-ajax.php:181 includes/class-mla-main.php:1833
|
47 |
+
#: includes/class-mla-thumbnail-generation.php:625
|
48 |
msgid "Type"
|
49 |
msgstr ""
|
50 |
|
51 |
+
#: includes/class-mla-ajax.php:181 includes/class-mla-main.php:1834
|
52 |
msgid "Date"
|
53 |
msgstr ""
|
54 |
|
55 |
+
#: includes/class-mla-ajax.php:181 includes/class-mla-main.php:1835
|
56 |
#: includes/class-mla-settings-custom-fields-tab.php:497
|
57 |
#: includes/class-mla-settings-custom-fields-tab.php:779
|
58 |
#: includes/class-mla-settings-iptc-exif-tab.php:506
|
61 |
msgid "Status"
|
62 |
msgstr ""
|
63 |
|
64 |
+
#: includes/class-mla-ajax.php:185 includes/class-mla-list-table.php:864
|
65 |
+
#: includes/class-mla-list-table.php:1030 includes/class-mla-main.php:391
|
66 |
#: includes/class-mla-polylang-support.php:359
|
67 |
#: includes/class-mla-thumbnail-generation.php:97
|
68 |
msgid "(no title)"
|
69 |
msgstr ""
|
70 |
|
71 |
+
#: includes/class-mla-ajax.php:191
|
72 |
msgid "Published"
|
73 |
msgstr ""
|
74 |
|
75 |
+
#: includes/class-mla-ajax.php:194 includes/class-mla-edit-media.php:823
|
76 |
#: includes/class-mla-list-table.php:631
|
77 |
msgid "Scheduled"
|
78 |
msgstr ""
|
79 |
|
80 |
+
#: includes/class-mla-ajax.php:197
|
81 |
msgid "Pending Review"
|
82 |
msgstr ""
|
83 |
|
84 |
+
#: includes/class-mla-ajax.php:200 includes/class-mla-edit-media.php:829
|
85 |
#: includes/class-mla-list-table.php:628
|
86 |
msgid "Draft"
|
87 |
msgstr ""
|
88 |
|
89 |
+
#: includes/class-mla-ajax.php:210 includes/class-mla-list-table.php:1439
|
90 |
#: includes/class-mla-list-table.php:1468
|
91 |
#: includes/class-mla-list-table.php:1532
|
92 |
msgid "Y/m/d"
|
93 |
msgstr ""
|
94 |
|
95 |
+
#: includes/class-mla-ajax.php:239 includes/class-mla-ajax.php:246
|
96 |
+
#: includes/class-mla-ajax.php:255 includes/class-mla-core.php:771
|
97 |
+
#: includes/class-mla-core.php:789 includes/class-mla-core.php:1193
|
98 |
+
#: includes/class-mla-core.php:1199 includes/class-mla-core.php:1203
|
99 |
#: includes/class-mla-data-pdf.php:216 includes/class-mla-data-pdf.php:517
|
100 |
#: includes/class-mla-data-pdf.php:519 includes/class-mla-data-pdf.php:565
|
101 |
#: includes/class-mla-data-pdf.php:749 includes/class-mla-data-query.php:674
|
105 |
#: includes/class-mla-data.php:563 includes/class-mla-data.php:1261
|
106 |
#: includes/class-mla-data.php:1459 includes/class-mla-data.php:1465
|
107 |
#: includes/class-mla-data.php:1862 includes/class-mla-data.php:1866
|
108 |
+
#: includes/class-mla-data.php:3009 includes/class-mla-data.php:3051
|
109 |
+
#: includes/class-mla-data.php:3095 includes/class-mla-data.php:3475
|
110 |
+
#: includes/class-mla-data.php:3488 includes/class-mla-data.php:3510
|
111 |
+
#: includes/class-mla-data.php:3724 includes/class-mla-data.php:3770
|
112 |
+
#: includes/class-mla-data.php:3803 includes/class-mla-data.php:3819
|
113 |
+
#: includes/class-mla-data.php:4045 includes/class-mla-edit-media.php:316
|
114 |
+
#: includes/class-mla-edit-media.php:737 includes/class-mla-edit-media.php:777
|
115 |
+
#: includes/class-mla-main.php:624 includes/class-mla-main.php:772
|
116 |
+
#: includes/class-mla-main.php:1134 includes/class-mla-main.php:1190
|
117 |
+
#: includes/class-mla-main.php:1215 includes/class-mla-main.php:1342
|
118 |
+
#: includes/class-mla-main.php:1396 includes/class-mla-main.php:1487
|
119 |
+
#: includes/class-mla-main.php:1518 includes/class-mla-main.php:1652
|
120 |
+
#: includes/class-mla-main.php:1659 includes/class-mla-main.php:1818
|
121 |
+
#: includes/class-mla-main.php:1893 includes/class-mla-main.php:2152
|
122 |
+
#: includes/class-mla-main.php:2160 includes/class-mla-main.php:2184
|
123 |
+
#: includes/class-mla-main.php:2192 includes/class-mla-main.php:2224
|
124 |
+
#: includes/class-mla-main.php:2232 includes/class-mla-media-modal.php:575
|
125 |
+
#: includes/class-mla-mime-types.php:749 includes/class-mla-mime-types.php:1141
|
126 |
+
#: includes/class-mla-mime-types.php:1229
|
127 |
+
#: includes/class-mla-mime-types.php:1375
|
128 |
+
#: includes/class-mla-mime-types.php:1398
|
129 |
+
#: includes/class-mla-mime-types.php:2197
|
130 |
+
#: includes/class-mla-mime-types.php:2208
|
131 |
+
#: includes/class-mla-mime-types.php:2221
|
132 |
+
#: includes/class-mla-mime-types.php:2229
|
133 |
+
#: includes/class-mla-mime-types.php:2234
|
134 |
+
#: includes/class-mla-mime-types.php:2277
|
135 |
+
#: includes/class-mla-mime-types.php:2296
|
136 |
+
#: includes/class-mla-mime-types.php:2347
|
137 |
+
#: includes/class-mla-mime-types.php:2381
|
138 |
+
#: includes/class-mla-mime-types.php:2466
|
139 |
+
#: includes/class-mla-mime-types.php:2545
|
140 |
+
#: includes/class-mla-mime-types.php:2554
|
141 |
+
#: includes/class-mla-mime-types.php:2586 includes/class-mla-objects.php:253
|
142 |
#: includes/class-mla-options.php:219 includes/class-mla-options.php:421
|
143 |
#: includes/class-mla-options.php:500 includes/class-mla-options.php:1003
|
144 |
#: includes/class-mla-options.php:1440 includes/class-mla-options.php:1453
|
161 |
#: includes/class-mla-settings-custom-fields-tab.php:904
|
162 |
#: includes/class-mla-settings-custom-fields-tab.php:908
|
163 |
#: includes/class-mla-settings-custom-fields-tab.php:932
|
164 |
+
#: includes/class-mla-settings-custom-fields-tab.php:2005
|
165 |
#: includes/class-mla-settings-documentation-tab.php:97
|
166 |
#: includes/class-mla-settings-documentation-tab.php:297
|
167 |
+
#: includes/class-mla-settings-documentation-tab.php:1269
|
168 |
#: includes/class-mla-settings-iptc-exif-tab.php:169
|
169 |
#: includes/class-mla-settings-iptc-exif-tab.php:235
|
170 |
#: includes/class-mla-settings-iptc-exif-tab.php:239
|
178 |
#: includes/class-mla-settings-iptc-exif-tab.php:975
|
179 |
#: includes/class-mla-settings-iptc-exif-tab.php:979
|
180 |
#: includes/class-mla-settings-iptc-exif-tab.php:1003
|
181 |
+
#: includes/class-mla-settings-iptc-exif-tab.php:2201
|
182 |
#: includes/class-mla-settings-shortcodes-tab.php:79
|
183 |
#: includes/class-mla-settings-shortcodes-tab.php:90
|
184 |
#: includes/class-mla-settings-shortcodes-tab.php:94
|
188 |
#: includes/class-mla-settings-shortcodes-tab.php:210
|
189 |
#: includes/class-mla-settings-shortcodes-tab.php:214
|
190 |
#: includes/class-mla-settings-shortcodes-tab.php:503
|
191 |
+
#: includes/class-mla-settings-shortcodes-tab.php:1627
|
192 |
#: includes/class-mla-settings-upload-tab.php:301
|
193 |
#: includes/class-mla-settings-upload-tab.php:353
|
194 |
#: includes/class-mla-settings-upload-tab.php:432
|
208 |
#: includes/class-mla-settings.php:1798 includes/class-mla-settings.php:1805
|
209 |
#: includes/class-mla-settings.php:1814 includes/class-mla-settings.php:1851
|
210 |
#: includes/class-mla-settings.php:1859 includes/class-mla-settings.php:1868
|
211 |
+
#: includes/class-mla-shortcode-support.php:2045
|
212 |
+
#: includes/class-mla-shortcode-support.php:2136
|
213 |
+
#: includes/class-mla-shortcode-support.php:3402
|
214 |
+
#: includes/class-mla-shortcode-support.php:3529
|
215 |
+
#: includes/class-mla-shortcode-support.php:3561
|
216 |
+
#: includes/class-mla-shortcode-support.php:4595
|
217 |
+
#: includes/class-mla-shortcode-support.php:4999
|
218 |
+
#: includes/class-mla-shortcode-support.php:5036
|
219 |
#: includes/class-mla-thumbnail-generation.php:416
|
220 |
#: includes/class-mla-thumbnail-generation.php:428
|
221 |
#: includes/class-mla-thumbnail-generation.php:440
|
223 |
msgid "ERROR"
|
224 |
msgstr ""
|
225 |
|
226 |
+
#: includes/class-mla-ajax.php:239 includes/class-mla-main.php:1652
|
227 |
msgid "No post ID found"
|
228 |
msgstr ""
|
229 |
|
230 |
+
#: includes/class-mla-ajax.php:246 includes/class-mla-main.php:1659
|
231 |
#: includes/class-mla-polylang-support.php:256
|
232 |
msgid "You are not allowed to edit this Attachment."
|
233 |
msgstr ""
|
234 |
|
235 |
+
#: includes/class-mla-core-options.php:398 includes/class-mla-options.php:255
|
236 |
msgid "Attachment Categories"
|
237 |
msgstr ""
|
238 |
|
239 |
+
#: includes/class-mla-core-options.php:402
|
240 |
msgid "Check this option to add support for Attachment Categories."
|
241 |
msgstr ""
|
242 |
|
243 |
+
#: includes/class-mla-core-options.php:406 includes/class-mla-options.php:270
|
244 |
msgid "Attachment Tags"
|
245 |
msgstr ""
|
246 |
|
247 |
+
#: includes/class-mla-core-options.php:410
|
248 |
msgid "Check this option to add support for Attachment Tags."
|
249 |
msgstr ""
|
250 |
|
251 |
+
#: includes/class-mla-core-options.php:414 includes/class-mla-settings.php:1057
|
252 |
msgid "Where-used Reporting"
|
253 |
msgstr ""
|
254 |
|
255 |
+
#: includes/class-mla-core-options.php:419
|
256 |
msgid "Exclude Revisions"
|
257 |
msgstr ""
|
258 |
|
259 |
+
#: includes/class-mla-core-options.php:423
|
260 |
msgid "Check this option to exclude revisions from where-used reporting."
|
261 |
msgstr ""
|
262 |
|
263 |
+
#: includes/class-mla-core-options.php:427
|
264 |
msgid "Where-used database access tuning"
|
265 |
msgstr ""
|
266 |
|
267 |
+
#: includes/class-mla-core-options.php:432
|
268 |
#: includes/class-mla-edit-media.php:672 includes/class-mla-edit-media.php:922
|
269 |
msgid "Featured in"
|
270 |
msgstr ""
|
271 |
|
272 |
+
#: includes/class-mla-core-options.php:437
|
273 |
+
#: includes/class-mla-core-options.php:447
|
274 |
msgid "Enabled"
|
275 |
msgstr ""
|
276 |
|
277 |
+
#: includes/class-mla-core-options.php:437
|
278 |
+
#: includes/class-mla-core-options.php:447
|
279 |
+
#: includes/class-mla-core-options.php:457
|
280 |
+
#: includes/class-mla-core-options.php:467
|
281 |
#: includes/class-mla-list-table.php:1136
|
282 |
#: includes/class-mla-list-table.php:1181
|
283 |
#: includes/class-mla-list-table.php:1231
|
285 |
msgid "Disabled"
|
286 |
msgstr ""
|
287 |
|
288 |
+
#: includes/class-mla-core-options.php:438
|
289 |
msgid "Search database posts and pages for Featured Image attachments."
|
290 |
msgstr ""
|
291 |
|
292 |
+
#: includes/class-mla-core-options.php:442
|
293 |
#: includes/class-mla-edit-media.php:676 includes/class-mla-edit-media.php:961
|
294 |
msgid "Inserted in"
|
295 |
msgstr ""
|
296 |
|
297 |
+
#: includes/class-mla-core-options.php:447
|
298 |
msgid "Base"
|
299 |
msgstr ""
|
300 |
|
301 |
+
#: includes/class-mla-core-options.php:448
|
302 |
msgid ""
|
303 |
"Search database posts and pages for attachments embedded in content."
|
304 |
"<br> Base = ignore intermediate size suffixes; use path, base "
|
305 |
"name and extension only."
|
306 |
msgstr ""
|
307 |
|
308 |
+
#: includes/class-mla-core-options.php:452
|
309 |
#: includes/class-mla-edit-media.php:680 includes/class-mla-edit-media.php:996
|
310 |
#: includes/class-mla-settings.php:1564
|
311 |
msgid "Gallery in"
|
312 |
msgstr ""
|
313 |
|
314 |
+
#: includes/class-mla-core-options.php:457
|
315 |
+
#: includes/class-mla-core-options.php:467
|
316 |
msgid "Dynamic"
|
317 |
msgstr ""
|
318 |
|
319 |
+
#: includes/class-mla-core-options.php:457
|
320 |
+
#: includes/class-mla-core-options.php:467 includes/class-mla-main.php:2063
|
321 |
#: includes/class-mla-settings-custom-fields-tab.php:709
|
322 |
#: includes/class-mla-settings-iptc-exif-tab.php:789
|
323 |
msgid "Refresh"
|
324 |
msgstr ""
|
325 |
|
326 |
+
#: includes/class-mla-core-options.php:457
|
327 |
+
#: includes/class-mla-core-options.php:467
|
328 |
msgid "Cached"
|
329 |
msgstr ""
|
330 |
|
331 |
+
#: includes/class-mla-core-options.php:458
|
332 |
msgid ""
|
333 |
"Search database posts and pages for [ gallery ] shortcode results.<br> "
|
334 |
" Dynamic = once every page load, Cached = once every login, Disabled = "
|
335 |
"never.<br> Refresh = update references, then set to Cached."
|
336 |
msgstr ""
|
337 |
|
338 |
+
#: includes/class-mla-core-options.php:462
|
339 |
#: includes/class-mla-edit-media.php:684 includes/class-mla-edit-media.php:1031
|
340 |
#: includes/class-mla-settings.php:1574
|
341 |
msgid "MLA Gallery in"
|
342 |
msgstr ""
|
343 |
|
344 |
+
#: includes/class-mla-core-options.php:468
|
345 |
msgid ""
|
346 |
"Search database posts and pages for [mla_gallery] shortcode results."
|
347 |
"<br> Dynamic = once every page load, Cached = once every login, "
|
349 |
"Cached."
|
350 |
msgstr ""
|
351 |
|
352 |
+
#: includes/class-mla-core-options.php:472 includes/class-mla-settings.php:1057
|
353 |
msgid "Taxonomy Support"
|
354 |
msgstr ""
|
355 |
|
356 |
+
#: includes/class-mla-core-options.php:477
|
357 |
msgid "Compute Attachments Column"
|
358 |
msgstr ""
|
359 |
|
360 |
+
#: includes/class-mla-core-options.php:481
|
361 |
msgid ""
|
362 |
"Check this option to calculate attachments per term in the Attachments "
|
363 |
"Column."
|
364 |
msgstr ""
|
365 |
|
366 |
+
#: includes/class-mla-core-options.php:485
|
367 |
msgid "Show Count Column"
|
368 |
msgstr ""
|
369 |
|
370 |
+
#: includes/class-mla-core-options.php:489
|
371 |
msgid ""
|
372 |
"Check this option to display the Count column on Categories and Tags "
|
373 |
"taxonomy edit screens."
|
374 |
msgstr ""
|
375 |
|
376 |
+
#: includes/class-mla-core-options.php:493
|
377 |
msgid ""
|
378 |
"Check the \"<strong>Support</strong>\" box to add the taxonomy to the "
|
379 |
"Assistant and the Edit Media screen."
|
380 |
msgstr ""
|
381 |
|
382 |
+
#: includes/class-mla-core-options.php:494
|
383 |
msgid ""
|
384 |
"Check the \"<strong>Inline Edit</strong>\" box to display the taxonomy in "
|
385 |
"the Quick Edit and Bulk Edit areas."
|
386 |
msgstr ""
|
387 |
|
388 |
+
#: includes/class-mla-core-options.php:495
|
389 |
msgid ""
|
390 |
"Check the \"<strong>Term Search</strong>\" box to add the taxonomy to the "
|
391 |
"\"Search Media/Terms\" list."
|
392 |
msgstr ""
|
393 |
|
394 |
+
#: includes/class-mla-core-options.php:496
|
395 |
+
#: includes/class-mla-core-options.php:719 includes/class-mla-settings.php:1088
|
396 |
#: includes/class-mla-settings.php:1089 includes/class-mla-settings.php:1090
|
397 |
msgid "For complete documentation"
|
398 |
msgstr ""
|
399 |
|
400 |
+
#: includes/class-mla-core-options.php:496
|
401 |
+
#: includes/class-mla-core-options.php:719 includes/class-mla-settings.php:1088
|
402 |
#: includes/class-mla-settings.php:1089 includes/class-mla-settings.php:1090
|
403 |
msgid "click here"
|
404 |
msgstr ""
|
405 |
|
406 |
+
#: includes/class-mla-core-options.php:498
|
407 |
msgid ""
|
408 |
"Check the \"<strong>Checklist</strong>\" box to enable the checklist-style "
|
409 |
"meta box for a flat taxonomy."
|
410 |
msgstr ""
|
411 |
|
412 |
+
#: includes/class-mla-core-options.php:499
|
413 |
msgid ""
|
414 |
"You must also check the <strong>\"Enable enhanced checklist taxonomies\"</"
|
415 |
"strong> box below to enable this feature."
|
416 |
msgstr ""
|
417 |
|
418 |
+
#: includes/class-mla-core-options.php:500
|
419 |
msgid ""
|
420 |
"Check the \"<strong>Checked On Top</strong>\" box to moved checked terms to "
|
421 |
"the top of the checklist-style meta box."
|
422 |
msgstr ""
|
423 |
|
424 |
+
#: includes/class-mla-core-options.php:501
|
425 |
msgid ""
|
426 |
"Use the \"<strong>List Filter</strong>\" option to select the taxonomy (or "
|
427 |
"custom field) on which to filter the Assistant table listing."
|
428 |
msgstr ""
|
429 |
|
430 |
+
#: includes/class-mla-core-options.php:502
|
431 |
msgid ""
|
432 |
"To <strong>filter on a custom field</strong>, enter the field name and "
|
433 |
"select ASC (Ascending) or DESC (Descending) order."
|
434 |
msgstr ""
|
435 |
|
436 |
+
#: includes/class-mla-core-options.php:530
|
437 |
msgid "Media/Assistant Screen Options"
|
438 |
msgstr ""
|
439 |
|
440 |
+
#: includes/class-mla-core-options.php:535
|
441 |
msgid "Admin Menu Options"
|
442 |
msgstr ""
|
443 |
|
444 |
+
#: includes/class-mla-core-options.php:540
|
445 |
msgid "Page Title"
|
446 |
msgstr ""
|
447 |
|
448 |
+
#: includes/class-mla-core-options.php:545
|
449 |
msgid "Enter the title for the Media/Assistant submenu page"
|
450 |
msgstr ""
|
451 |
|
452 |
+
#: includes/class-mla-core-options.php:549
|
453 |
msgid "Menu Title"
|
454 |
msgstr ""
|
455 |
|
456 |
+
#: includes/class-mla-core-options.php:554
|
457 |
msgid "Enter the title for the Media/Assistant submenu entry"
|
458 |
msgstr ""
|
459 |
|
460 |
+
#: includes/class-mla-core-options.php:558
|
461 |
msgid "Submenu Order"
|
462 |
msgstr ""
|
463 |
|
464 |
+
#: includes/class-mla-core-options.php:563
|
465 |
msgid ""
|
466 |
"Enter the position of the Media/Assistant submenu entry.<br> 0 = "
|
467 |
"natural order (at bottom), 1 - 4 = at top<br> "
|
469 |
"\""
|
470 |
msgstr ""
|
471 |
|
472 |
+
#: includes/class-mla-core-options.php:567
|
473 |
msgid "Display Media/Library"
|
474 |
msgstr ""
|
475 |
|
476 |
+
#: includes/class-mla-core-options.php:571
|
477 |
msgid ""
|
478 |
"Check/uncheck this option to display/remove the WordPress Media/Library "
|
479 |
"submenu entry."
|
480 |
msgstr ""
|
481 |
|
482 |
+
#: includes/class-mla-core-options.php:575
|
483 |
msgid "Display Media/Assistant list/grid view switcher"
|
484 |
msgstr ""
|
485 |
|
486 |
+
#: includes/class-mla-core-options.php:579
|
487 |
msgid ""
|
488 |
"Check/uncheck this option to display/remove the \"list/grid\" view switcher "
|
489 |
"on the Media/Assistant submenu."
|
490 |
msgstr ""
|
491 |
|
492 |
+
#: includes/class-mla-core-options.php:583
|
493 |
msgid "Table Defaults"
|
494 |
msgstr ""
|
495 |
|
496 |
+
#: includes/class-mla-core-options.php:588
|
497 |
msgid "Order By"
|
498 |
msgstr ""
|
499 |
|
500 |
+
#: includes/class-mla-core-options.php:593
|
501 |
+
#: includes/class-mla-core-options.php:837
|
502 |
+
#: includes/class-mla-core-options.php:868
|
503 |
+
#: includes/class-mla-core-options.php:882
|
504 |
#: includes/class-mla-list-table.php:486 includes/class-mla-list-table.php:1389
|
505 |
#: includes/class-mla-settings-shortcodes-tab.php:629
|
506 |
msgid "None"
|
507 |
msgstr ""
|
508 |
|
509 |
+
#: includes/class-mla-core-options.php:593
|
510 |
msgid "ID/Parent"
|
511 |
msgstr ""
|
512 |
|
513 |
+
#: includes/class-mla-core-options.php:594
|
514 |
msgid "Select the column for the sort order of the Assistant table listing."
|
515 |
msgstr ""
|
516 |
|
517 |
+
#: includes/class-mla-core-options.php:598
|
518 |
msgid "Order"
|
519 |
msgstr ""
|
520 |
|
521 |
+
#: includes/class-mla-core-options.php:603
|
522 |
msgid "Ascending"
|
523 |
msgstr ""
|
524 |
|
525 |
+
#: includes/class-mla-core-options.php:603
|
526 |
msgid "Descending"
|
527 |
msgstr ""
|
528 |
|
529 |
+
#: includes/class-mla-core-options.php:604
|
530 |
+
#: includes/class-mla-core-options.php:847
|
531 |
msgid "Choose the sort order."
|
532 |
msgstr ""
|
533 |
|
534 |
+
#: includes/class-mla-core-options.php:608
|
535 |
msgid "Views Width"
|
536 |
msgstr ""
|
537 |
|
538 |
+
#: includes/class-mla-core-options.php:613
|
539 |
msgid "Enter the width for the views list, in pixels (px) or percent (%)"
|
540 |
msgstr ""
|
541 |
|
542 |
+
#: includes/class-mla-core-options.php:617
|
543 |
msgid "Icon Size"
|
544 |
msgstr ""
|
545 |
|
546 |
+
#: includes/class-mla-core-options.php:622
|
547 |
msgid "Enter the size of the thumbnail/icon images, in pixels"
|
548 |
msgstr ""
|
549 |
|
550 |
+
#: includes/class-mla-core-options.php:626
|
551 |
msgid "Show Primary Column File Name"
|
552 |
msgstr ""
|
553 |
|
554 |
+
#: includes/class-mla-core-options.php:630
|
555 |
msgid ""
|
556 |
"Check/uncheck this option to show/omit the file name from the primary column."
|
557 |
msgstr ""
|
558 |
|
559 |
+
#: includes/class-mla-core-options.php:634
|
560 |
+
msgid "QuickTags editor for bulk description"
|
561 |
+
msgstr ""
|
562 |
+
|
563 |
+
#: includes/class-mla-core-options.php:638
|
564 |
+
msgid ""
|
565 |
+
"Check this option to use the QuickTags editor for the Description field in "
|
566 |
+
"the Bulk Edit area."
|
567 |
+
msgstr ""
|
568 |
+
|
569 |
+
#: includes/class-mla-core-options.php:642
|
570 |
msgid "Bulk Chunk Size"
|
571 |
msgstr ""
|
572 |
|
573 |
+
#: includes/class-mla-core-options.php:647
|
574 |
msgid "Enter the size of the Bulk Edit and Map All processing chunks"
|
575 |
msgstr ""
|
576 |
|
577 |
+
#: includes/class-mla-core-options.php:651
|
578 |
msgid "Taxonomy Filter parameters"
|
579 |
msgstr ""
|
580 |
|
581 |
+
#: includes/class-mla-core-options.php:656
|
582 |
msgid "Maximum Depth"
|
583 |
msgstr ""
|
584 |
|
585 |
+
#: includes/class-mla-core-options.php:661
|
586 |
msgid ""
|
587 |
"Enter the number of levels displayed for hierarchial taxonomies; enter zero "
|
588 |
"for no limit."
|
589 |
msgstr ""
|
590 |
|
591 |
+
#: includes/class-mla-core-options.php:665
|
592 |
msgid "Include Children"
|
593 |
msgstr ""
|
594 |
|
595 |
+
#: includes/class-mla-core-options.php:669
|
596 |
msgid ""
|
597 |
"Check/uncheck this option to include/exclude children for hierarchical "
|
598 |
"taxonomies."
|
599 |
msgstr ""
|
600 |
|
601 |
+
#: includes/class-mla-core-options.php:673
|
602 |
msgid "Search Media Defaults"
|
603 |
msgstr ""
|
604 |
|
605 |
+
#: includes/class-mla-core-options.php:678
|
606 |
msgid "Display Search Controls"
|
607 |
msgstr ""
|
608 |
|
609 |
+
#: includes/class-mla-core-options.php:682
|
610 |
+
#: includes/class-mla-core-options.php:808
|
611 |
msgid ""
|
612 |
"Check/uncheck this option to display/hide the and/or connector and search "
|
613 |
"fields controls."
|
614 |
msgstr ""
|
615 |
|
616 |
+
#: includes/class-mla-core-options.php:686
|
617 |
msgid ""
|
618 |
"Use these controls to set defaults for the and/or connector and search "
|
619 |
"fields controls.<br>These defaults will be used for the Search Media boxes "
|
620 |
"on both the Media/Assistant submenu<br>and the Media Manager Modal Window."
|
621 |
msgstr ""
|
622 |
|
623 |
+
#: includes/class-mla-core-options.php:700
|
624 |
msgid "Media/Edit Media Enhancements"
|
625 |
msgstr ""
|
626 |
|
627 |
+
#: includes/class-mla-core-options.php:705
|
628 |
msgid "Enable "enhanced checklist" taxonomies"
|
629 |
msgstr ""
|
630 |
|
631 |
+
#: includes/class-mla-core-options.php:709
|
632 |
msgid ""
|
633 |
"Check this option to enable the \"? Search\" feature for hierarchical "
|
634 |
"taxonomies, e.g., Att. Categories.<br> This option also enables "
|
635 |
"the \"checklist-style\" support for flat taxonomies, e.g., Att. Tags."
|
636 |
msgstr ""
|
637 |
|
638 |
+
#: includes/class-mla-core-options.php:713
|
639 |
msgid "Enable Edit Media additional meta boxes"
|
640 |
msgstr ""
|
641 |
|
642 |
+
#: includes/class-mla-core-options.php:717
|
643 |
msgid ""
|
644 |
"Check this option to add \"Parent Info\", \"Menu Order\", \"Attachment "
|
645 |
"Metadata\" and four \"where-used\" meta boxes to the Edit Media screen."
|
646 |
msgstr ""
|
647 |
|
648 |
+
#: includes/class-mla-core-options.php:718
|
649 |
msgid "You can also use Filters to customize the meta boxes."
|
650 |
msgstr ""
|
651 |
|
652 |
+
#: includes/class-mla-core-options.php:723
|
653 |
msgid "Media/Add New Enhancements"
|
654 |
msgstr ""
|
655 |
|
656 |
+
#: includes/class-mla-core-options.php:728
|
657 |
msgid "Enable "bulk edit" area"
|
658 |
msgstr ""
|
659 |
|
660 |
+
#: includes/class-mla-core-options.php:732
|
661 |
msgid ""
|
662 |
"Check this option to enable the \"Bulk Edit area\" feature on the Media/Add "
|
663 |
"New screen."
|
664 |
msgstr ""
|
665 |
|
666 |
+
#: includes/class-mla-core-options.php:736
|
667 |
msgid ""bulk edit" area on top"
|
668 |
msgstr ""
|
669 |
|
670 |
+
#: includes/class-mla-core-options.php:740
|
671 |
msgid ""
|
672 |
"Check this option to move the \"Bulk Edit area\" to the top of the Media/Add "
|
673 |
"New screen."
|
674 |
msgstr ""
|
675 |
|
676 |
+
#: includes/class-mla-core-options.php:744
|
677 |
msgid ""bulk edit" area initially open"
|
678 |
msgstr ""
|
679 |
|
680 |
+
#: includes/class-mla-core-options.php:747
|
681 |
msgid ""
|
682 |
"Check this option to automatically open the \"Bulk Edit area\" when the "
|
683 |
"Media/Add New screen is displayed."
|
684 |
msgstr ""
|
685 |
|
686 |
+
#: includes/class-mla-core-options.php:751
|
687 |
msgid "Media Manager/Media Grid Enhancements"
|
688 |
msgstr ""
|
689 |
|
690 |
+
#: includes/class-mla-core-options.php:756
|
691 |
msgid "Enable Media Grid Enhancements"
|
692 |
msgstr ""
|
693 |
|
694 |
+
#: includes/class-mla-core-options.php:759
|
695 |
msgid ""
|
696 |
"Check/uncheck this option to enable/disable Media Library Grid View "
|
697 |
"Enhancements."
|
698 |
msgstr ""
|
699 |
|
700 |
+
#: includes/class-mla-core-options.php:763
|
701 |
msgid "Enable Media Manager Enhancements"
|
702 |
msgstr ""
|
703 |
|
704 |
+
#: includes/class-mla-core-options.php:766
|
705 |
msgid ""
|
706 |
"Check/uncheck this option to enable/disable Media Manager Modal Window "
|
707 |
"Enhancements."
|
708 |
msgstr ""
|
709 |
|
710 |
+
#: includes/class-mla-core-options.php:770
|
711 |
msgid "Media Manager Enhanced MIME Type filter"
|
712 |
msgstr ""
|
713 |
|
714 |
+
#: includes/class-mla-core-options.php:773
|
715 |
msgid ""
|
716 |
"Check this option to filter by more MIME Types, e.g., text, applications."
|
717 |
msgstr ""
|
718 |
|
719 |
+
#: includes/class-mla-core-options.php:777
|
720 |
msgid "Media Manager Month and Year filter"
|
721 |
msgstr ""
|
722 |
|
723 |
+
#: includes/class-mla-core-options.php:780
|
724 |
msgid "Check this option to filter by month and year uploaded."
|
725 |
msgstr ""
|
726 |
|
727 |
+
#: includes/class-mla-core-options.php:784
|
728 |
msgid "Media Manager Category/Tag filter"
|
729 |
msgstr ""
|
730 |
|
731 |
+
#: includes/class-mla-core-options.php:787
|
732 |
msgid "Check this option to filter by taxonomy terms."
|
733 |
msgstr ""
|
734 |
|
735 |
+
#: includes/class-mla-core-options.php:791
|
736 |
msgid "Media Manager Terms Search popup"
|
737 |
msgstr ""
|
738 |
|
739 |
+
#: includes/class-mla-core-options.php:794
|
740 |
msgid "Check this option to enable the \"Terms Search\" popup window."
|
741 |
msgstr ""
|
742 |
|
743 |
+
#: includes/class-mla-core-options.php:798
|
744 |
msgid "Media Manager Enhanced Search Media box"
|
745 |
msgstr ""
|
746 |
|
747 |
+
#: includes/class-mla-core-options.php:801
|
748 |
msgid "Check this option to enable search box enhancements."
|
749 |
msgstr ""
|
750 |
|
751 |
+
#: includes/class-mla-core-options.php:805
|
752 |
msgid "Media Manager Enhanced Search Media Controls"
|
753 |
msgstr ""
|
754 |
|
755 |
+
#: includes/class-mla-core-options.php:812
|
756 |
msgid "Media Manager Checklist meta boxes"
|
757 |
msgstr ""
|
758 |
|
759 |
+
#: includes/class-mla-core-options.php:815
|
760 |
msgid ""
|
761 |
"Check this option to enable MLA-enhanced meta boxes in the \"ATTACHMENT "
|
762 |
"DETAILS\" pane.<br> This option is for any taxonomy that uses a "
|
763 |
"<strong>\"checklist-style\"</strong> meta box."
|
764 |
msgstr ""
|
765 |
|
766 |
+
#: includes/class-mla-core-options.php:819
|
767 |
msgid "Media Manager Flat meta boxes"
|
768 |
msgstr ""
|
769 |
|
770 |
+
#: includes/class-mla-core-options.php:822
|
771 |
msgid ""
|
772 |
"Check this option to enable MLA-enhanced meta boxes in the \"ATTACHMENT "
|
773 |
"DETAILS\" pane.<br> This option is for <strong>flat taxonomies</"
|
775 |
"style\" meta box."
|
776 |
msgstr ""
|
777 |
|
778 |
+
#: includes/class-mla-core-options.php:826
|
779 |
msgid "Media Manager auto-fill meta boxes"
|
780 |
msgstr ""
|
781 |
|
782 |
+
#: includes/class-mla-core-options.php:829
|
783 |
msgid ""
|
784 |
"Check this option to automatically fill MLA-enhanced meta boxes in the "
|
785 |
"\"ATTACHMENT DETAILS\" pane<br> when the item is selected."
|
786 |
msgstr ""
|
787 |
|
788 |
+
#: includes/class-mla-core-options.php:833
|
789 |
msgid "Media Manager Order By"
|
790 |
msgstr ""
|
791 |
|
792 |
+
#: includes/class-mla-core-options.php:837
|
793 |
+
#: includes/class-mla-core-options.php:846
|
794 |
+
#: includes/class-mla-core-options.php:868
|
795 |
+
#: includes/class-mla-core-options.php:882
|
796 |
+
#: includes/class-mla-core-options.php:896 includes/class-mla-settings.php:1139
|
797 |
msgid "Media Manager Default"
|
798 |
msgstr ""
|
799 |
|
800 |
+
#: includes/class-mla-core-options.php:837
|
801 |
msgid "Title/Name"
|
802 |
msgstr ""
|
803 |
|
804 |
+
#: includes/class-mla-core-options.php:838
|
805 |
msgid ""
|
806 |
"If you want to override the Media Manager default,<br> select a "
|
807 |
"column for the sort order of the Media Library listing."
|
808 |
msgstr ""
|
809 |
|
810 |
+
#: includes/class-mla-core-options.php:842
|
811 |
msgid "Media Manager Order"
|
812 |
msgstr ""
|
813 |
|
814 |
+
#: includes/class-mla-core-options.php:851
|
815 |
msgid "Attachment Display Settings"
|
816 |
msgstr ""
|
817 |
|
818 |
+
#: includes/class-mla-core-options.php:856
|
819 |
msgid "Media Manager Apply Display Settings"
|
820 |
msgstr ""
|
821 |
|
822 |
+
#: includes/class-mla-core-options.php:859
|
823 |
msgid ""
|
824 |
"Check this option to always start with the Attachment Display Settings set "
|
825 |
"here,<br> overriding browser-/cookie-based defaults."
|
826 |
msgstr ""
|
827 |
|
828 |
+
#: includes/class-mla-core-options.php:863
|
829 |
+
#: includes/class-mla-core-options.php:865
|
830 |
msgid "Alignment"
|
831 |
msgstr ""
|
832 |
|
833 |
+
#: includes/class-mla-core-options.php:865
|
834 |
+
#: includes/class-mla-core-options.php:879
|
835 |
+
#: includes/class-mla-core-options.php:893
|
836 |
#, php-format
|
837 |
msgid ""
|
838 |
"Select a value for the default %1$s option in the Attachment Display "
|
839 |
"Settings."
|
840 |
msgstr ""
|
841 |
|
842 |
+
#: includes/class-mla-core-options.php:868
|
843 |
msgid "Left"
|
844 |
msgstr ""
|
845 |
|
846 |
+
#: includes/class-mla-core-options.php:868
|
847 |
msgid "Center"
|
848 |
msgstr ""
|
849 |
|
850 |
+
#: includes/class-mla-core-options.php:868
|
851 |
msgid "Right"
|
852 |
msgstr ""
|
853 |
|
854 |
+
#: includes/class-mla-core-options.php:877
|
855 |
+
#: includes/class-mla-core-options.php:879
|
856 |
msgid "Link To"
|
857 |
msgstr ""
|
858 |
|
859 |
+
#: includes/class-mla-core-options.php:882
|
860 |
msgid "Media File"
|
861 |
msgstr ""
|
862 |
|
863 |
+
#: includes/class-mla-core-options.php:882
|
864 |
msgid "Attachment Page"
|
865 |
msgstr ""
|
866 |
|
867 |
+
#: includes/class-mla-core-options.php:882
|
868 |
msgid "Custom URL"
|
869 |
msgstr ""
|
870 |
|
871 |
+
#: includes/class-mla-core-options.php:891
|
872 |
+
#: includes/class-mla-core-options.php:893
|
873 |
msgid "Size"
|
874 |
msgstr ""
|
875 |
|
876 |
+
#: includes/class-mla-core-options.php:896
|
877 |
+
#: includes/class-mla-thumbnail-generation.php:570
|
878 |
+
#: includes/class-mla-thumbnail-generation.php:636
|
879 |
msgid "Thumbnail"
|
880 |
msgstr ""
|
881 |
|
882 |
+
#: includes/class-mla-core-options.php:896
|
883 |
msgid "Medium"
|
884 |
msgstr ""
|
885 |
|
886 |
+
#: includes/class-mla-core-options.php:896
|
887 |
msgid "Large"
|
888 |
msgstr ""
|
889 |
|
890 |
+
#: includes/class-mla-core-options.php:896
|
891 |
msgid "Full Size"
|
892 |
msgstr ""
|
893 |
|
894 |
+
#: includes/class-mla-core-options.php:905
|
895 |
msgid "Uninstall (Delete) Plugin Settings"
|
896 |
msgstr ""
|
897 |
|
898 |
+
#: includes/class-mla-core-options.php:910
|
899 |
msgid "Delete Option Settings"
|
900 |
msgstr ""
|
901 |
|
902 |
+
#: includes/class-mla-core-options.php:913
|
903 |
msgid ""
|
904 |
"Check this option to remove all MLA option settings from the database when "
|
905 |
"the plugin is deleted.<br> <strong>You can make a backup copy</"
|
906 |
"strong> of your settings below by clicking \""
|
907 |
msgstr ""
|
908 |
|
909 |
+
#: includes/class-mla-core-options.php:913 includes/class-mla-settings.php:1059
|
910 |
msgid "Export ALL Settings"
|
911 |
msgstr ""
|
912 |
|
913 |
+
#: includes/class-mla-core-options.php:917
|
914 |
msgid "Delete Option Settings Backups"
|
915 |
msgstr ""
|
916 |
|
917 |
+
#: includes/class-mla-core-options.php:920
|
918 |
msgid ""
|
919 |
"Check this option to remove the <code>/wp-content/mla-backup</code> "
|
920 |
"directory and its contents when the plugin is deleted."
|
921 |
msgstr ""
|
922 |
|
923 |
+
#: includes/class-mla-core-options.php:924
|
924 |
msgid "Default [mla_gallery] Templates and Settings"
|
925 |
msgstr ""
|
926 |
|
927 |
+
#: includes/class-mla-core-options.php:929
|
928 |
+
#: includes/class-mla-core-options.php:935
|
929 |
+
#: includes/class-mla-core-options.php:973
|
930 |
+
#: includes/class-mla-core-options.php:979
|
931 |
msgid "Style Template"
|
932 |
msgstr ""
|
933 |
|
934 |
+
#: includes/class-mla-core-options.php:935
|
935 |
+
#: includes/class-mla-core-options.php:945
|
936 |
+
#: includes/class-mla-core-options.php:979
|
937 |
+
#: includes/class-mla-core-options.php:989
|
938 |
#, php-format
|
939 |
msgid "Select the default %1$s for your %2$s shortcodes."
|
940 |
msgstr ""
|
941 |
|
942 |
+
#: includes/class-mla-core-options.php:939
|
943 |
+
#: includes/class-mla-core-options.php:983
|
944 |
msgid "Markup Template"
|
945 |
msgstr ""
|
946 |
|
947 |
+
#: includes/class-mla-core-options.php:945
|
948 |
+
#: includes/class-mla-core-options.php:989
|
949 |
#: includes/class-mla-settings-shortcodes-tab.php:85
|
950 |
msgid "markup template"
|
951 |
msgstr ""
|
952 |
|
953 |
+
#: includes/class-mla-core-options.php:949
|
954 |
+
#: includes/class-mla-core-options.php:993
|
955 |
msgid "Default columns"
|
956 |
msgstr ""
|
957 |
|
958 |
+
#: includes/class-mla-core-options.php:953
|
959 |
msgid ""
|
960 |
"Enter the number of [mla_tag_cloud] columns; must be a positive integer."
|
961 |
msgstr ""
|
962 |
|
963 |
+
#: includes/class-mla-core-options.php:957
|
964 |
+
#: includes/class-mla-core-options.php:1001
|
965 |
msgid "Default mla_margin"
|
966 |
msgstr ""
|
967 |
|
968 |
+
#: includes/class-mla-core-options.php:961
|
969 |
+
#: includes/class-mla-core-options.php:1005
|
970 |
msgid ""
|
971 |
"Enter the CSS \"margin\" property value, in length (px, em, pt, etc.), "
|
972 |
"percent (%), \"auto\" or \"inherit\".<br> Enter \"none\" to "
|
973 |
"remove the property entirely."
|
974 |
msgstr ""
|
975 |
|
976 |
+
#: includes/class-mla-core-options.php:965
|
977 |
+
#: includes/class-mla-core-options.php:1009
|
978 |
msgid "Default mla_itemwidth"
|
979 |
msgstr ""
|
980 |
|
981 |
+
#: includes/class-mla-core-options.php:969
|
982 |
+
#: includes/class-mla-core-options.php:1013
|
983 |
msgid ""
|
984 |
"Enter the CSS \"width\" property value, in length (px, em, pt, etc.), "
|
985 |
"percent (%), \"auto\" or \"inherit\".<br> Enter \"calculate"
|
989 |
"the property entirely."
|
990 |
msgstr ""
|
991 |
|
992 |
+
#: includes/class-mla-core-options.php:997
|
993 |
msgid "Enter the number of [mla_gallery] columns; must be a positive integer."
|
994 |
msgstr ""
|
995 |
|
996 |
+
#: includes/class-mla-core-options.php:1017
|
997 |
msgid "Thumbnail Substitution Support, mla_viewer"
|
998 |
msgstr ""
|
999 |
|
1000 |
+
#: includes/class-mla-core-options.php:1022
|
1001 |
msgid "Enable thumbnail substitution"
|
1002 |
msgstr ""
|
1003 |
|
1004 |
+
#: includes/class-mla-core-options.php:1025
|
1005 |
msgid ""
|
1006 |
"Check this option to allow the \"mla_viewer\" to generate thumbnail images "
|
1007 |
"for PDF documents. Thumbnails are generated dynamically, each time the item "
|
1010 |
"strong>"
|
1011 |
msgstr ""
|
1012 |
|
1013 |
+
#: includes/class-mla-core-options.php:1029
|
1014 |
msgid "Enable Featured Images"
|
1015 |
msgstr ""
|
1016 |
|
1017 |
+
#: includes/class-mla-core-options.php:1032
|
1018 |
msgid ""
|
1019 |
"Check this option to extend Featured Image support to all Media Library "
|
1020 |
"items. The Featured Image can be used as a thumbnail image for the item in "
|
1021 |
"an [mla_gallery] display."
|
1022 |
msgstr ""
|
1023 |
|
1024 |
+
#: includes/class-mla-core-options.php:1036
|
1025 |
msgid "Enable Featured Image Generation"
|
1026 |
msgstr ""
|
1027 |
|
1028 |
+
#: includes/class-mla-core-options.php:1039
|
1029 |
msgid ""
|
1030 |
"Check this option to enable the \"Thumbnail\" generation action in the Media/"
|
1031 |
"Assistant submenu Bulk Actions dropdown."
|
1032 |
msgstr ""
|
1033 |
|
1034 |
+
#: includes/class-mla-core-options.php:1043
|
1035 |
msgid "Enable explicit Ghostscript check"
|
1036 |
msgstr ""
|
1037 |
|
1038 |
+
#: includes/class-mla-core-options.php:1046
|
1039 |
msgid ""
|
1040 |
"Check this option to enable the explicit check for Ghostscript support "
|
1041 |
"required for thumbnail generation. If your Ghostscript software is in a non-"
|
1044 |
"leave this option checked unless you know it is safe to turn it off."
|
1045 |
msgstr ""
|
1046 |
|
1047 |
+
#: includes/class-mla-core-options.php:1050
|
1048 |
msgid "Ghostscript path"
|
1049 |
msgstr ""
|
1050 |
|
1051 |
+
#: includes/class-mla-core-options.php:1054
|
1052 |
msgid ""
|
1053 |
"If your “gs” executable is in a non-standard location, enter the "
|
1054 |
"full path and filename here, e.g., “/usr/bin/gs”. It will "
|
1055 |
"override the search for Ghostscript in other places."
|
1056 |
msgstr ""
|
1057 |
|
1058 |
+
#: includes/class-mla-core-options.php:1074
|
1059 |
msgid "Enable custom field mapping when adding new media"
|
1060 |
msgstr ""
|
1061 |
|
1062 |
+
#: includes/class-mla-core-options.php:1077
|
1063 |
+
#: includes/class-mla-core-options.php:1084
|
1064 |
msgid "See Help menu."
|
1065 |
msgstr ""
|
1066 |
|
1067 |
+
#: includes/class-mla-core-options.php:1081
|
1068 |
msgid "Enable custom field mapping when updating media metadata"
|
1069 |
msgstr ""
|
1070 |
|
1071 |
+
#: includes/class-mla-core-options.php:1088
|
1072 |
msgid ""
|
1073 |
"Update the custom field mapping values above, then click Save Changes to "
|
1074 |
"make the updates permanent.<br>You can also make temporary updates and click "
|
1076 |
"saving any rule changes."
|
1077 |
msgstr ""
|
1078 |
|
1079 |
+
#: includes/class-mla-core-options.php:1098
|
1080 |
msgid "Enable IPTC/EXIF Mapping when adding new media"
|
1081 |
msgstr ""
|
1082 |
|
1083 |
+
#: includes/class-mla-core-options.php:1101
|
1084 |
msgid ""
|
1085 |
"Check this option to enable mapping when uploading new media (attachments)."
|
1086 |
"<br> Does NOT affect the operation of the \"Map\" buttons on the "
|
1087 |
"bulk edit, single edit and settings screens."
|
1088 |
msgstr ""
|
1089 |
|
1090 |
+
#: includes/class-mla-core-options.php:1105
|
1091 |
msgid "Enable IPTC/EXIF Mapping when updating media metadata"
|
1092 |
msgstr ""
|
1093 |
|
1094 |
+
#: includes/class-mla-core-options.php:1108
|
1095 |
msgid ""
|
1096 |
"Check this option to enable mapping when media (attachments) metadata is "
|
1097 |
"regenerated,<br> e.g., when the Media/Edit Media \"Edit Image\" "
|
1098 |
"functions are used."
|
1099 |
msgstr ""
|
1100 |
|
1101 |
+
#: includes/class-mla-core-options.php:1112
|
1102 |
msgid ""
|
1103 |
"Update the standard field mapping values above, then click <strong>Save "
|
1104 |
"Changes</strong> to make the updates permanent.<br>You can also make "
|
1107 |
"changes."
|
1108 |
msgstr ""
|
1109 |
|
1110 |
+
#: includes/class-mla-core-options.php:1122
|
1111 |
msgid ""
|
1112 |
"Update the taxonomy term mapping values above, then click <strong>Save "
|
1113 |
"Changes</strong> or <strong>Map All Attachments, Taxonomy Terms Now</strong>."
|
1114 |
msgstr ""
|
1115 |
|
1116 |
+
#: includes/class-mla-core-options.php:1132
|
1117 |
msgid ""
|
1118 |
"<strong>Update</strong> individual custom field mapping values above, or "
|
1119 |
"make several updates and click <strong>Save Changes</strong> below to apply "
|
1124 |
"changes."
|
1125 |
msgstr ""
|
1126 |
|
1127 |
+
#: includes/class-mla-core-options.php:1142
|
1128 |
msgid "IPTC/EXIF Mapping help"
|
1129 |
msgstr ""
|
1130 |
|
1131 |
+
#: includes/class-mla-core-options.php:1153 includes/class-mla-data.php:3773
|
1132 |
+
#: includes/class-mla-edit-media.php:427 includes/class-mla-main.php:2033
|
1133 |
msgid "Name/Slug"
|
1134 |
msgstr ""
|
1135 |
|
1136 |
+
#: includes/class-mla-core-options.php:1160 includes/class-mla-data.php:3816
|
1137 |
#: includes/class-mla-edit-media.php:430 includes/class-mla-list-table.php:1331
|
1138 |
+
#: includes/class-mla-main.php:2037 includes/class-mla-options.php:457
|
1139 |
#: includes/mla-main-search-box-template.php:51
|
1140 |
#: includes/mla-media-modal-js-template.php:48
|
1141 |
msgid "ALT Text"
|
1142 |
msgstr ""
|
1143 |
|
1144 |
+
#: includes/class-mla-core-options.php:1167 includes/class-mla-data.php:3829
|
1145 |
+
#: includes/class-mla-edit-media.php:428 includes/class-mla-main.php:2034
|
1146 |
#: includes/class-mla-options.php:460
|
1147 |
#: includes/mla-main-search-box-template.php:53
|
1148 |
#: includes/mla-media-modal-js-template.php:53
|
1149 |
msgid "Caption"
|
1150 |
msgstr ""
|
1151 |
|
1152 |
+
#: includes/class-mla-core-options.php:1174 includes/class-mla-data.php:3838
|
1153 |
+
#: includes/class-mla-edit-media.php:429 includes/class-mla-main.php:2035
|
1154 |
#: includes/class-mla-options.php:463
|
1155 |
#: includes/class-mla-settings-upload-tab.php:174
|
1156 |
#: includes/class-mla-settings-upload-tab.php:542
|
1167 |
msgid "Description"
|
1168 |
msgstr ""
|
1169 |
|
1170 |
+
#: includes/class-mla-core-options.php:1194
|
1171 |
msgid "Enable View and Post MIME Type Support"
|
1172 |
msgstr ""
|
1173 |
|
1174 |
+
#: includes/class-mla-core-options.php:1197
|
1175 |
msgid ""
|
1176 |
"Check/uncheck this option to enable/disable Post MIME Type Support, then "
|
1177 |
"click <strong>Save Changes</strong> to record the new setting."
|
1178 |
msgstr ""
|
1179 |
|
1180 |
+
#: includes/class-mla-core-options.php:1206
|
1181 |
msgid "Post MIME Types help."
|
1182 |
msgstr ""
|
1183 |
|
1184 |
+
#: includes/class-mla-core-options.php:1209
|
1185 |
+
#: includes/class-mla-mime-types.php:1630
|
1186 |
+
#: includes/class-mla-settings-custom-fields-tab.php:2430
|
1187 |
+
#: includes/class-mla-settings-documentation-tab.php:1544
|
1188 |
+
#: includes/class-mla-settings-iptc-exif-tab.php:2664
|
1189 |
+
#: includes/class-mla-settings-shortcodes-tab.php:1970
|
1190 |
msgctxt "table_view_singular"
|
1191 |
msgid "All"
|
1192 |
msgstr ""
|
1193 |
|
1194 |
+
#: includes/class-mla-core-options.php:1210
|
1195 |
+
#: includes/class-mla-mime-types.php:1631
|
1196 |
+
#: includes/class-mla-settings-custom-fields-tab.php:2431
|
1197 |
+
#: includes/class-mla-settings-documentation-tab.php:1545
|
1198 |
+
#: includes/class-mla-settings-iptc-exif-tab.php:2665
|
1199 |
+
#: includes/class-mla-settings-shortcodes-tab.php:1971
|
1200 |
msgctxt "table_view_plural"
|
1201 |
msgid "All"
|
1202 |
msgstr ""
|
1203 |
|
1204 |
+
#: includes/class-mla-core-options.php:1215
|
1205 |
+
#: includes/class-mla-core-options.php:1269
|
1206 |
+
#: includes/class-mla-core-options.php:1278
|
1207 |
+
#: includes/class-mla-core-options.php:1287
|
1208 |
msgctxt "post_mime_types_description"
|
1209 |
msgid "Built-in view"
|
1210 |
msgstr ""
|
1211 |
|
1212 |
+
#: includes/class-mla-core-options.php:1218
|
1213 |
msgctxt "table_view_singular"
|
1214 |
msgid "Image"
|
1215 |
msgstr ""
|
1216 |
|
1217 |
+
#: includes/class-mla-core-options.php:1219
|
1218 |
msgctxt "table_view_plural"
|
1219 |
msgid "Images"
|
1220 |
msgstr ""
|
1221 |
|
1222 |
+
#: includes/class-mla-core-options.php:1224
|
1223 |
msgctxt "post_mime_types_description"
|
1224 |
msgid "All image subtypes"
|
1225 |
msgstr ""
|
1226 |
|
1227 |
+
#: includes/class-mla-core-options.php:1227
|
1228 |
msgctxt "table_view_singular"
|
1229 |
msgid "Audio"
|
1230 |
msgstr ""
|
1231 |
|
1232 |
+
#: includes/class-mla-core-options.php:1228
|
1233 |
msgctxt "table_view_plural"
|
1234 |
msgid "Audio"
|
1235 |
msgstr ""
|
1236 |
|
1237 |
+
#: includes/class-mla-core-options.php:1233
|
1238 |
msgctxt "post_mime_types_description"
|
1239 |
msgid "All audio subtypes"
|
1240 |
msgstr ""
|
1241 |
|
1242 |
+
#: includes/class-mla-core-options.php:1236
|
1243 |
msgctxt "table_view_singular"
|
1244 |
msgid "Video"
|
1245 |
msgstr ""
|
1246 |
|
1247 |
+
#: includes/class-mla-core-options.php:1237
|
1248 |
msgctxt "table_view_plural"
|
1249 |
msgid "Video"
|
1250 |
msgstr ""
|
1251 |
|
1252 |
+
#: includes/class-mla-core-options.php:1242
|
1253 |
msgctxt "post_mime_types_description"
|
1254 |
msgid "All video subtypes"
|
1255 |
msgstr ""
|
1256 |
|
1257 |
+
#: includes/class-mla-core-options.php:1245
|
1258 |
msgctxt "table_view_singular"
|
1259 |
msgid "Text"
|
1260 |
msgstr ""
|
1261 |
|
1262 |
+
#: includes/class-mla-core-options.php:1246
|
1263 |
msgctxt "table_view_plural"
|
1264 |
msgid "Text"
|
1265 |
msgstr ""
|
1266 |
|
1267 |
+
#: includes/class-mla-core-options.php:1251
|
1268 |
msgctxt "post_mime_types_description"
|
1269 |
msgid "All text subtypes"
|
1270 |
msgstr ""
|
1271 |
|
1272 |
+
#: includes/class-mla-core-options.php:1254
|
1273 |
msgctxt "table_view_singular"
|
1274 |
msgid "Application"
|
1275 |
msgstr ""
|
1276 |
|
1277 |
+
#: includes/class-mla-core-options.php:1255
|
1278 |
msgctxt "table_view_plural"
|
1279 |
msgid "Applications"
|
1280 |
msgstr ""
|
1281 |
|
1282 |
+
#: includes/class-mla-core-options.php:1260
|
1283 |
msgctxt "post_mime_types_description"
|
1284 |
msgid "All application subtypes"
|
1285 |
msgstr ""
|
1286 |
|
1287 |
+
#: includes/class-mla-core-options.php:1263
|
1288 |
#: includes/class-mla-list-table.php:1545
|
1289 |
msgctxt "table_view_singular"
|
1290 |
msgid "Unattached"
|
1291 |
msgstr ""
|
1292 |
|
1293 |
+
#: includes/class-mla-core-options.php:1264
|
1294 |
msgctxt "table_view_plural"
|
1295 |
msgid "Unattached"
|
1296 |
msgstr ""
|
1297 |
|
1298 |
+
#: includes/class-mla-core-options.php:1272
|
1299 |
msgctxt "table_view_singular"
|
1300 |
msgid "Attached"
|
1301 |
msgstr ""
|
1302 |
|
1303 |
+
#: includes/class-mla-core-options.php:1273
|
1304 |
msgctxt "table_view_plural"
|
1305 |
msgid "Attached"
|
1306 |
msgstr ""
|
1307 |
|
1308 |
+
#: includes/class-mla-core-options.php:1281
|
1309 |
msgctxt "table_view_singular"
|
1310 |
msgid "Trash"
|
1311 |
msgstr ""
|
1312 |
|
1313 |
+
#: includes/class-mla-core-options.php:1282
|
1314 |
msgctxt "table_view_plural"
|
1315 |
msgid "Trash"
|
1316 |
msgstr ""
|
1317 |
|
1318 |
+
#: includes/class-mla-core-options.php:1293
|
1319 |
msgid "Enable Upload MIME Type Support"
|
1320 |
msgstr ""
|
1321 |
|
1322 |
+
#: includes/class-mla-core-options.php:1296
|
1323 |
msgid ""
|
1324 |
"Check/uncheck this option to enable/disable Upload MIME Type Support, then "
|
1325 |
"click <strong>Save Changes</strong> to record the new setting."
|
1326 |
msgstr ""
|
1327 |
|
1328 |
+
#: includes/class-mla-core-options.php:1305
|
1329 |
msgid "Upload MIME Types help."
|
1330 |
msgstr ""
|
1331 |
|
1332 |
+
#: includes/class-mla-core-options.php:1310
|
1333 |
msgid "Enable MLA File Type Icons Support"
|
1334 |
msgstr ""
|
1335 |
|
1336 |
+
#: includes/class-mla-core-options.php:1313
|
1337 |
msgid ""
|
1338 |
"Check/uncheck this option to enable/disable MLA File Type Icons Support, "
|
1339 |
"then click <strong>Save Changes</strong> to record the new setting."
|
1340 |
msgstr ""
|
1341 |
|
1342 |
+
#: includes/class-mla-core-options.php:1317
|
1343 |
msgid "Display Limit"
|
1344 |
msgstr ""
|
1345 |
|
1346 |
+
#: includes/class-mla-core-options.php:1321
|
1347 |
msgid ""
|
1348 |
"Enter the maximum number of debug log characters to display; enter zero or "
|
1349 |
"leave blank for no limit."
|
1350 |
msgstr ""
|
1351 |
|
1352 |
+
#: includes/class-mla-core-options.php:1325
|
1353 |
msgid "Debug File"
|
1354 |
msgstr ""
|
1355 |
|
1356 |
+
#: includes/class-mla-core-options.php:1329
|
1357 |
msgid ""
|
1358 |
"Enter the name of an alternate, MLA-specific debug log file; leave blank to "
|
1359 |
"use the PHP error_log."
|
1360 |
msgstr ""
|
1361 |
|
1362 |
+
#: includes/class-mla-core-options.php:1333
|
1363 |
msgid "Replace PHP error_log file"
|
1364 |
msgstr ""
|
1365 |
|
1366 |
+
#: includes/class-mla-core-options.php:1336
|
1367 |
msgid ""
|
1368 |
"Check this option to replace the PHP error_log file with the MLA Debug File."
|
1369 |
"<br> allows capture of PHP messages in the MLA Debug File."
|
1370 |
msgstr ""
|
1371 |
|
1372 |
+
#: includes/class-mla-core-options.php:1340
|
1373 |
msgid "PHP Reporting"
|
1374 |
msgstr ""
|
1375 |
|
1376 |
+
#: includes/class-mla-core-options.php:1344
|
1377 |
msgid ""
|
1378 |
"Enter a numeric error_reporting value, e.g., 0x7FFF or 32767; leave blank to "
|
1379 |
"use the existing PHP error_reporting value."
|
1380 |
msgstr ""
|
1381 |
|
1382 |
+
#: includes/class-mla-core-options.php:1348
|
1383 |
msgid "MLA Reporting"
|
1384 |
msgstr ""
|
1385 |
|
1386 |
+
#: includes/class-mla-core-options.php:1352
|
1387 |
msgid ""
|
1388 |
"Enter a numeric MLA_DEBUG_LEVEL value, e.g., 0x0003 or 3; leave blank to use "
|
1389 |
"the existing MLA_DEBUG_LEVEL value."
|
1390 |
msgstr ""
|
1391 |
|
1392 |
+
#: includes/class-mla-core.php:771
|
1393 |
#, php-format
|
1394 |
msgctxt "error_log"
|
1395 |
msgid "%1$s: mla_load_template file \"%2$s\" not found."
|
1396 |
msgstr ""
|
1397 |
|
1398 |
+
#: includes/class-mla-core.php:789
|
1399 |
#, php-format
|
1400 |
msgctxt "error_log"
|
1401 |
msgid "%1$s: mla_load_template file \"%2$s\" bad source type \"%3$s\"."
|
1402 |
msgstr ""
|
1403 |
|
1404 |
+
#: includes/class-mla-core.php:1193
|
1405 |
#, php-format
|
1406 |
msgid "%1$s: Bad specification part \"%2$s\""
|
1407 |
msgstr ""
|
1408 |
|
1409 |
+
#: includes/class-mla-core.php:1199
|
1410 |
#, php-format
|
1411 |
msgid "%1$s: Bad specification option \"%2$s\""
|
1412 |
msgstr ""
|
1413 |
|
1414 |
+
#: includes/class-mla-core.php:1203
|
1415 |
#, php-format
|
1416 |
msgid "%1$s: Bad specification prefix \"%2$s\""
|
1417 |
msgstr ""
|
1418 |
|
1419 |
+
#: includes/class-mla-core.php:1303
|
1420 |
msgid "Most Used"
|
1421 |
msgstr ""
|
1422 |
|
1423 |
+
#: includes/class-mla-core.php:1332
|
1424 |
#, php-format
|
1425 |
msgid "+ %s"
|
1426 |
msgstr ""
|
1427 |
|
1428 |
+
#: includes/class-mla-core.php:1338 includes/class-mla-main.php:1824
|
1429 |
#: includes/class-mla-media-modal.php:605
|
1430 |
#: includes/mla-media-modal-js-template.php:28
|
1431 |
#: includes/mla-media-modal-js-template.php:75
|
1478 |
msgstr ""
|
1479 |
|
1480 |
#: includes/class-mla-data-query.php:294
|
1481 |
+
#: includes/class-mla-settings-custom-fields-tab.php:1178
|
1482 |
+
#: includes/class-mla-settings-documentation-tab.php:499
|
1483 |
+
#: includes/class-mla-settings-iptc-exif-tab.php:1253
|
1484 |
+
#: includes/class-mla-settings-shortcodes-tab.php:950
|
1485 |
msgctxt "list_table_column"
|
1486 |
msgid "Name"
|
1487 |
msgstr ""
|
1527 |
msgstr ""
|
1528 |
|
1529 |
#: includes/class-mla-data-query.php:303 includes/class-mla-mime-types.php:559
|
1530 |
+
#: includes/class-mla-mime-types.php:632 includes/class-mla-mime-types.php:711
|
1531 |
+
#: includes/class-mla-settings-documentation-tab.php:502
|
1532 |
+
#: includes/class-mla-settings-shortcodes-tab.php:953
|
1533 |
msgctxt "list_table_column"
|
1534 |
msgid "Description"
|
1535 |
msgstr ""
|
1536 |
|
1537 |
#: includes/class-mla-data-query.php:304 includes/class-mla-mime-types.php:551
|
1538 |
+
#: includes/class-mla-mime-types.php:629
|
1539 |
msgctxt "list_table_column"
|
1540 |
msgid "MIME Type"
|
1541 |
msgstr ""
|
1571 |
msgstr ""
|
1572 |
|
1573 |
#: includes/class-mla-data-query.php:674 includes/class-mla-edit-media.php:316
|
1574 |
+
#: includes/class-mla-main.php:1818 includes/class-mla-main.php:1893
|
1575 |
+
#: includes/class-mla-media-modal.php:575 includes/class-mla-mime-types.php:749
|
1576 |
+
#: includes/class-mla-mime-types.php:1398
|
1577 |
+
#: includes/class-mla-mime-types.php:2586
|
1578 |
#: includes/class-mla-settings-custom-fields-tab.php:546
|
1579 |
#: includes/class-mla-settings-custom-fields-tab.php:694
|
1580 |
+
#: includes/class-mla-settings-custom-fields-tab.php:2005
|
1581 |
#: includes/class-mla-settings-documentation-tab.php:297
|
1582 |
+
#: includes/class-mla-settings-documentation-tab.php:1269
|
1583 |
#: includes/class-mla-settings-iptc-exif-tab.php:626
|
1584 |
#: includes/class-mla-settings-iptc-exif-tab.php:774
|
1585 |
+
#: includes/class-mla-settings-iptc-exif-tab.php:2201
|
1586 |
#: includes/class-mla-settings-shortcodes-tab.php:503
|
1587 |
+
#: includes/class-mla-settings-shortcodes-tab.php:1627
|
1588 |
#: includes/class-mla-settings-upload-tab.php:301
|
1589 |
#: includes/class-mla-settings-view-tab.php:166
|
1590 |
#, php-format
|
1601 |
#: includes/class-mla-data-query.php:1137
|
1602 |
#: includes/class-mla-data-query.php:1152
|
1603 |
#: includes/class-mla-data-query.php:1154
|
1604 |
+
#: includes/class-mla-data-query.php:1637
|
1605 |
+
#: includes/class-mla-data-query.php:1709
|
1606 |
+
#: includes/class-mla-data-query.php:1781
|
1607 |
+
#: includes/class-mla-data-query.php:1878
|
1608 |
+
#: includes/class-mla-data-query.php:1970
|
1609 |
+
#: includes/class-mla-data-query.php:1989
|
1610 |
msgid "DEBUG"
|
1611 |
msgstr ""
|
1612 |
|
1622 |
msgid "%1$s: _execute_list_table_query SQL_request = \"%2$s\"."
|
1623 |
msgstr ""
|
1624 |
|
1625 |
+
#: includes/class-mla-data-query.php:1637
|
1626 |
#, php-format
|
1627 |
msgctxt "error_log"
|
1628 |
msgid "%1$s: mla_query_posts_search_filter = \"%2$s\"."
|
1629 |
msgstr ""
|
1630 |
|
1631 |
+
#: includes/class-mla-data-query.php:1709
|
1632 |
#, php-format
|
1633 |
msgctxt "error_log"
|
1634 |
msgid "%1$s: mla_query_posts_where_filter = \"%2$s\"."
|
1635 |
msgstr ""
|
1636 |
|
1637 |
+
#: includes/class-mla-data-query.php:1781
|
1638 |
#, php-format
|
1639 |
msgctxt "error_log"
|
1640 |
msgid "%1$s: mla_query_posts_join_filter = \"%2$s\"."
|
1641 |
msgstr ""
|
1642 |
|
1643 |
+
#: includes/class-mla-data-query.php:1878
|
1644 |
#, php-format
|
1645 |
msgctxt "error_log"
|
1646 |
msgid "%1$s: mla_query_posts_orderby_filter = \"%2$s\"."
|
1647 |
msgstr ""
|
1648 |
|
1649 |
+
#: includes/class-mla-data-query.php:1970
|
1650 |
#, php-format
|
1651 |
msgctxt "error_log"
|
1652 |
msgid "%1$s: mla_query_posts_clauses_filter = \"%2$s\"."
|
1653 |
msgstr ""
|
1654 |
|
1655 |
+
#: includes/class-mla-data-query.php:1989
|
1656 |
#, php-format
|
1657 |
msgctxt "error_log"
|
1658 |
msgid "%1$s: mla_query_posts_clauses_request_filter = \"%2$s\"."
|
1763 |
msgid "mla_parse_xmp_metadata set option failed."
|
1764 |
msgstr ""
|
1765 |
|
1766 |
+
#: includes/class-mla-data.php:3222
|
1767 |
#: includes/class-mla-settings-custom-fields-tab.php:786
|
1768 |
+
#: includes/class-mla-settings-custom-fields-tab.php:1491
|
1769 |
#: includes/class-mla-settings-iptc-exif-tab.php:868
|
1770 |
+
#: includes/class-mla-settings-iptc-exif-tab.php:1596
|
1771 |
+
#: includes/class-mla-settings-iptc-exif-tab.php:2375
|
1772 |
#: includes/class-mla-settings-view-tab.php:398
|
1773 |
#: includes/class-mla-settings-view-tab.php:799
|
1774 |
#: includes/class-mla-settings-view-tab.php:815
|
1775 |
+
#: includes/class-mla-wpml-support.php:1556
|
1776 |
msgid "Yes"
|
1777 |
msgstr ""
|
1778 |
|
1779 |
+
#: includes/class-mla-data.php:3224
|
1780 |
#: includes/class-mla-settings-custom-fields-tab.php:787
|
1781 |
+
#: includes/class-mla-settings-custom-fields-tab.php:1493
|
1782 |
#: includes/class-mla-settings-iptc-exif-tab.php:869
|
1783 |
+
#: includes/class-mla-settings-iptc-exif-tab.php:1598
|
1784 |
+
#: includes/class-mla-settings-iptc-exif-tab.php:2375
|
1785 |
#: includes/class-mla-settings-view-tab.php:397
|
1786 |
#: includes/class-mla-settings-view-tab.php:801
|
1787 |
#: includes/class-mla-settings-view-tab.php:817
|
1788 |
+
#: includes/class-mla-wpml-support.php:1557
|
1789 |
msgid "No"
|
1790 |
msgstr ""
|
1791 |
|
1792 |
+
#: includes/class-mla-data.php:3472 includes/class-mla-data.php:3589
|
1793 |
#, php-format
|
1794 |
msgid "Deleting %1$s"
|
1795 |
msgstr ""
|
1796 |
|
1797 |
+
#: includes/class-mla-data.php:3475
|
1798 |
#, php-format
|
1799 |
msgid "%1$s: meta:%2$s not found"
|
1800 |
msgstr ""
|
1801 |
|
1802 |
+
#: includes/class-mla-data.php:3484 includes/class-mla-data.php:3600
|
1803 |
+
#: includes/class-mla-data.php:3612
|
1804 |
#, php-format
|
1805 |
msgid "Adding %1$s = %2$s"
|
1806 |
msgstr ""
|
1807 |
|
1808 |
+
#: includes/class-mla-data.php:3488
|
1809 |
#, php-format
|
1810 |
msgid "%1$s: Adding meta:%2$s; not found"
|
1811 |
msgstr ""
|
1812 |
|
1813 |
+
#: includes/class-mla-data.php:3495
|
1814 |
#, php-format
|
1815 |
msgid "Deleting Null meta:%1$s"
|
1816 |
msgstr ""
|
1817 |
|
1818 |
+
#: includes/class-mla-data.php:3505 includes/class-mla-data.php:3681
|
1819 |
+
#: includes/class-mla-data.php:3747 includes/class-mla-data.php:3773
|
1820 |
+
#: includes/class-mla-data.php:3816 includes/class-mla-data.php:3829
|
1821 |
+
#: includes/class-mla-data.php:3838 includes/class-mla-data.php:3849
|
1822 |
+
#: includes/class-mla-data.php:3860 includes/class-mla-data.php:3873
|
1823 |
+
#: includes/class-mla-data.php:3882 includes/class-mla-data.php:3891
|
1824 |
+
#: includes/class-mla-mime-types.php:1232
|
1825 |
+
#: includes/class-mla-mime-types.php:2350
|
1826 |
#, php-format
|
1827 |
msgid "Changing %1$s from \"%2$s\" to \"%3$s\""
|
1828 |
msgstr ""
|
1829 |
|
1830 |
+
#: includes/class-mla-data.php:3510
|
1831 |
#, php-format
|
1832 |
msgid "%1$s: Changing meta:%2$s; not found"
|
1833 |
msgstr ""
|
1834 |
|
1835 |
+
#: includes/class-mla-data.php:3636
|
1836 |
#, php-format
|
1837 |
msgid "Deleting old %1$s values"
|
1838 |
msgstr ""
|
1839 |
|
1840 |
+
#: includes/class-mla-data.php:3666
|
1841 |
#, php-format
|
1842 |
msgid "Changing %1$s from \"%2$s\" to \"%3$s\"; %4$d updates"
|
1843 |
msgstr ""
|
1844 |
|
1845 |
+
#: includes/class-mla-data.php:3724
|
1846 |
msgid "Could not retrieve Attachment."
|
1847 |
msgstr ""
|
1848 |
|
1849 |
+
#: includes/class-mla-data.php:3770
|
1850 |
#, php-format
|
1851 |
msgid "%1$s: Could not change Name/Slug \"%2$s\"; name already exists"
|
1852 |
msgstr ""
|
1853 |
|
1854 |
+
#: includes/class-mla-data.php:3800
|
1855 |
#, php-format
|
1856 |
msgid "Deleting ALT Text, was \"%1$s\""
|
1857 |
msgstr ""
|
1858 |
|
1859 |
+
#: includes/class-mla-data.php:3803
|
1860 |
#, php-format
|
1861 |
msgid "%1$s: Could not delete ALT Text, remains \"%2$s\""
|
1862 |
msgstr ""
|
1863 |
|
1864 |
+
#: includes/class-mla-data.php:3819
|
1865 |
#, php-format
|
1866 |
msgid "%1$s: Could not change ALT Text from \"%2$s\" to \"%3$s\""
|
1867 |
msgstr ""
|
1868 |
|
1869 |
+
#: includes/class-mla-data.php:3849 includes/class-mla-list-table.php:1033
|
1870 |
#: includes/class-mla-list-table.php:1036
|
1871 |
#: includes/class-mla-list-table.php:1039
|
1872 |
#: includes/class-mla-list-table.php:1107 includes/class-mla-options.php:2234
|
1876 |
msgid "Parent"
|
1877 |
msgstr ""
|
1878 |
|
1879 |
+
#: includes/class-mla-data.php:3860 includes/class-mla-edit-media.php:661
|
1880 |
+
#: includes/class-mla-edit-media.php:864 includes/class-mla-main.php:2040
|
1881 |
#: includes/class-mla-settings-view-tab.php:130
|
1882 |
#: includes/class-mla-settings-view-tab.php:386
|
1883 |
msgid "Menu Order"
|
1884 |
msgstr ""
|
1885 |
|
1886 |
+
#: includes/class-mla-data.php:3873 includes/class-mla-edit-media.php:395
|
1887 |
#: includes/class-mla-list-table.php:1487
|
1888 |
+
#: includes/class-mla-list-table.php:1490 includes/class-mla-main.php:1899
|
1889 |
+
#: includes/class-mla-main.php:2001
|
1890 |
msgid "Author"
|
1891 |
msgstr ""
|
1892 |
|
1893 |
+
#: includes/class-mla-data.php:3882 includes/class-mla-edit-media.php:420
|
1894 |
+
#: includes/class-mla-main.php:2052
|
1895 |
msgid "Comments"
|
1896 |
msgstr ""
|
1897 |
|
1898 |
+
#: includes/class-mla-data.php:3891 includes/class-mla-edit-media.php:421
|
1899 |
+
#: includes/class-mla-main.php:2053
|
1900 |
msgid "Pings"
|
1901 |
msgstr ""
|
1902 |
|
1903 |
+
#: includes/class-mla-data.php:3918
|
1904 |
#, php-format
|
1905 |
msgid "You cannot assign \"%1$s\" terms"
|
1906 |
msgstr ""
|
1907 |
|
1908 |
+
#: includes/class-mla-data.php:3930
|
1909 |
msgctxt "tag delimiter"
|
1910 |
msgid ","
|
1911 |
msgstr ""
|
1912 |
|
1913 |
+
#: includes/class-mla-data.php:3963
|
1914 |
msgid "Adding"
|
1915 |
msgstr ""
|
1916 |
|
1917 |
+
#: includes/class-mla-data.php:3968
|
1918 |
msgid "Removing"
|
1919 |
msgstr ""
|
1920 |
|
1921 |
+
#: includes/class-mla-data.php:3977
|
1922 |
msgid "Replacing"
|
1923 |
msgstr ""
|
1924 |
|
1925 |
+
#: includes/class-mla-data.php:3985
|
1926 |
msgid "Ignoring"
|
1927 |
msgstr ""
|
1928 |
|
1929 |
+
#: includes/class-mla-data.php:3998
|
1930 |
#, php-format
|
1931 |
msgid "%1$s \"%2$s\" terms"
|
1932 |
msgstr ""
|
1933 |
|
1934 |
+
#: includes/class-mla-data.php:4010 includes/class-mla-main.php:1200
|
1935 |
#, php-format
|
1936 |
msgid "Item %1$d, no changes detected."
|
1937 |
msgstr ""
|
1938 |
|
1939 |
+
#: includes/class-mla-data.php:4031
|
1940 |
#, php-format
|
1941 |
msgid "Item %1$d updated."
|
1942 |
msgstr ""
|
1943 |
|
1944 |
+
#: includes/class-mla-data.php:4045
|
1945 |
#, php-format
|
1946 |
msgid "%1$s: Item %2$d update failed."
|
1947 |
msgstr ""
|
1948 |
|
1949 |
#: includes/class-mla-edit-media.php:133 includes/class-mla-edit-media.php:184
|
1950 |
+
#: includes/class-mla-edit-media.php:237 includes/class-mla-main.php:400
|
1951 |
+
#: includes/class-mla-main.php:959 includes/class-mla-main.php:1709
|
1952 |
#: includes/class-mla-media-modal.php:236 includes/class-mla-options.php:1743
|
1953 |
#: includes/class-mla-polylang-support.php:363
|
1954 |
#: includes/class-mla-settings-custom-fields-tab.php:59
|
1975 |
msgstr ""
|
1976 |
|
1977 |
#: includes/class-mla-edit-media.php:185 includes/class-mla-edit-media.php:239
|
1978 |
+
#: includes/class-mla-main.php:387
|
1979 |
msgid "An ajax.fail error has occurred. Please reload the page and try again."
|
1980 |
msgstr ""
|
1981 |
|
1982 |
#: includes/class-mla-edit-media.php:186 includes/class-mla-edit-media.php:240
|
1983 |
+
#: includes/class-mla-main.php:388
|
1984 |
msgid "An ajax.done error has occurred. Please reload the page and try again."
|
1985 |
msgstr ""
|
1986 |
|
1987 |
+
#: includes/class-mla-edit-media.php:338 includes/class-mla-main.php:1934
|
1988 |
msgid "more"
|
1989 |
msgstr ""
|
1990 |
|
1991 |
+
#: includes/class-mla-edit-media.php:339 includes/class-mla-main.php:1935
|
1992 |
msgid "less"
|
1993 |
msgstr ""
|
1994 |
|
1995 |
#: includes/class-mla-edit-media.php:342 includes/class-mla-edit-media.php:373
|
1996 |
+
#: includes/class-mla-main.php:1938 includes/class-mla-main.php:1976
|
1997 |
msgid "Add"
|
1998 |
msgstr ""
|
1999 |
|
2000 |
#: includes/class-mla-edit-media.php:343 includes/class-mla-edit-media.php:374
|
2001 |
+
#: includes/class-mla-main.php:1939 includes/class-mla-main.php:1977
|
2002 |
msgid "Remove"
|
2003 |
msgstr ""
|
2004 |
|
2005 |
#: includes/class-mla-edit-media.php:344 includes/class-mla-edit-media.php:375
|
2006 |
+
#: includes/class-mla-main.php:1940 includes/class-mla-main.php:1978
|
2007 |
#: includes/class-mla-options.php:1239 includes/class-mla-options.php:1338
|
2008 |
#: includes/class-mla-options.php:1382 includes/class-mla-options.php:2500
|
2009 |
#: includes/class-mla-options.php:2554 includes/class-mla-options.php:2674
|
2010 |
#: includes/class-mla-options.php:2769 includes/class-mla-options.php:2815
|
2011 |
#: includes/class-mla-settings-custom-fields-tab.php:475
|
2012 |
#: includes/class-mla-settings-custom-fields-tab.php:757
|
2013 |
+
#: includes/class-mla-settings-custom-fields-tab.php:1477
|
2014 |
#: includes/class-mla-settings-iptc-exif-tab.php:473
|
2015 |
#: includes/class-mla-settings-iptc-exif-tab.php:835
|
2016 |
+
#: includes/class-mla-settings-iptc-exif-tab.php:1537
|
2017 |
+
#: includes/class-mla-settings-iptc-exif-tab.php:2356
|
2018 |
msgid "Replace"
|
2019 |
msgstr ""
|
2020 |
|
2024 |
"menu for more information."
|
2025 |
msgstr ""
|
2026 |
|
2027 |
+
#: includes/class-mla-edit-media.php:416 includes/class-mla-main.php:2046
|
2028 |
#: includes/class-mla-settings.php:1398
|
2029 |
msgid "Reset"
|
2030 |
msgstr ""
|
2031 |
|
2032 |
+
#: includes/class-mla-edit-media.php:422 includes/class-mla-main.php:2054
|
2033 |
+
#: includes/class-mla-main.php:2100
|
2034 |
#: includes/class-mla-settings-custom-fields-tab.php:785
|
2035 |
#: includes/class-mla-settings-iptc-exif-tab.php:867
|
2036 |
#: includes/class-mla-settings-upload-tab.php:122
|
2039 |
msgid "No Change"
|
2040 |
msgstr ""
|
2041 |
|
2042 |
+
#: includes/class-mla-edit-media.php:423 includes/class-mla-main.php:2055
|
2043 |
msgid "Allow"
|
2044 |
msgstr ""
|
2045 |
|
2046 |
+
#: includes/class-mla-edit-media.php:424 includes/class-mla-main.php:2056
|
2047 |
msgid "Do not allow"
|
2048 |
msgstr ""
|
2049 |
|
2050 |
#: includes/class-mla-edit-media.php:431 includes/class-mla-list-table.php:1033
|
2051 |
+
#: includes/class-mla-list-table.php:1104 includes/class-mla-main.php:2038
|
2052 |
msgid "Parent ID"
|
2053 |
msgstr ""
|
2054 |
|
2055 |
#: includes/class-mla-edit-media.php:432 includes/class-mla-edit-media.php:844
|
2056 |
+
#: includes/class-mla-main.php:2039
|
2057 |
+
#: includes/class-mla-settings-upload-tab.php:1469
|
2058 |
msgid "Select"
|
2059 |
msgstr ""
|
2060 |
|
2078 |
msgid "Map Custom Field metadata for this item"
|
2079 |
msgstr ""
|
2080 |
|
2081 |
+
#: includes/class-mla-edit-media.php:560 includes/class-mla-main.php:1620
|
2082 |
+
#: includes/class-mla-main.php:2059
|
2083 |
msgid "Map Custom Field metadata"
|
2084 |
msgstr ""
|
2085 |
|
2087 |
msgid "Map IPTC/EXIF metadata for this item"
|
2088 |
msgstr ""
|
2089 |
|
2090 |
+
#: includes/class-mla-edit-media.php:562 includes/class-mla-main.php:1623
|
2091 |
+
#: includes/class-mla-main.php:2058
|
2092 |
msgid "Map IPTC/EXIF metadata"
|
2093 |
msgstr ""
|
2094 |
|
2101 |
msgstr ""
|
2102 |
|
2103 |
#: includes/class-mla-edit-media.php:737 includes/class-mla-edit-media.php:777
|
2104 |
+
#: includes/class-mla-main.php:624 includes/class-mla-settings.php:586
|
2105 |
#, php-format
|
2106 |
msgctxt "error_log"
|
2107 |
msgid "%1$s: %2$s discarding \"%3$s\"; no title/order"
|
2116 |
msgid "Post Parent"
|
2117 |
msgstr ""
|
2118 |
|
2119 |
+
#: includes/class-mla-edit-media.php:844 includes/class-mla-main.php:1823
|
2120 |
msgid "Select Parent"
|
2121 |
msgstr ""
|
2122 |
|
2162 |
msgstr ""
|
2163 |
|
2164 |
#: includes/class-mla-list-table.php:564
|
2165 |
+
#: includes/class-mla-settings-custom-fields-tab.php:1267
|
2166 |
+
#: includes/class-mla-settings-documentation-tab.php:584
|
2167 |
+
#: includes/class-mla-settings-iptc-exif-tab.php:1344
|
2168 |
+
#: includes/class-mla-settings-shortcodes-tab.php:1023
|
2169 |
#: includes/class-mla-settings-upload-tab.php:858
|
2170 |
+
#: includes/class-mla-settings-upload-tab.php:1416
|
2171 |
#: includes/class-mla-settings-view-tab.php:654
|
2172 |
#, php-format
|
2173 |
msgid "column_default: %1$s, %2$s"
|
2174 |
msgstr ""
|
2175 |
|
2176 |
+
#: includes/class-mla-list-table.php:612 includes/class-mla-list-table.php:740
|
2177 |
#: includes/class-mla-list-table.php:987 includes/class-mla-list-table.php:1159
|
2178 |
#: includes/class-mla-list-table.php:1208
|
2179 |
#: includes/class-mla-list-table.php:1254
|
2181 |
#: includes/class-mla-list-table.php:1521
|
2182 |
#: includes/class-mla-list-table.php:1847
|
2183 |
#: includes/class-mla-polylang-support.php:362
|
2184 |
+
#: includes/class-mla-settings-custom-fields-tab.php:1320
|
2185 |
+
#: includes/class-mla-settings-custom-fields-tab.php:1659
|
2186 |
+
#: includes/class-mla-settings-iptc-exif-tab.php:1397
|
2187 |
+
#: includes/class-mla-settings-iptc-exif-tab.php:1764
|
2188 |
+
#: includes/class-mla-settings-shortcodes-tab.php:1071
|
2189 |
#: includes/class-mla-settings-upload-tab.php:923
|
2190 |
+
#: includes/class-mla-settings-upload-tab.php:1212
|
2191 |
#: includes/class-mla-settings-view-tab.php:720
|
2192 |
+
#: includes/class-mla-settings-view-tab.php:922
|
2193 |
msgid "Edit"
|
2194 |
msgstr ""
|
2195 |
|
2196 |
#: includes/class-mla-list-table.php:637
|
2197 |
+
#: includes/class-mla-thumbnail-generation.php:633
|
2198 |
msgid "Trash"
|
2199 |
msgstr ""
|
2200 |
|
2206 |
msgid "Restore"
|
2207 |
msgstr ""
|
2208 |
|
2209 |
+
#: includes/class-mla-list-table.php:740
|
2210 |
+
#: includes/class-mla-settings-custom-fields-tab.php:1320
|
2211 |
+
#: includes/class-mla-settings-iptc-exif-tab.php:1397
|
2212 |
+
#: includes/class-mla-settings-shortcodes-tab.php:1071
|
2213 |
#: includes/class-mla-settings-upload-tab.php:923
|
2214 |
#: includes/class-mla-settings-view-tab.php:720
|
2215 |
msgid "Edit this item"
|
2216 |
msgstr ""
|
2217 |
|
2218 |
+
#: includes/class-mla-list-table.php:741
|
2219 |
+
#: includes/class-mla-settings-custom-fields-tab.php:1323
|
2220 |
+
#: includes/class-mla-settings-iptc-exif-tab.php:1400
|
2221 |
#: includes/class-mla-settings-upload-tab.php:925
|
2222 |
#: includes/class-mla-settings-view-tab.php:722
|
2223 |
msgid "Edit this item inline"
|
2224 |
msgstr ""
|
2225 |
|
2226 |
+
#: includes/class-mla-list-table.php:741 includes/class-mla-main.php:2031
|
2227 |
#: includes/class-mla-options.php:1114 includes/class-mla-options.php:1418
|
2228 |
#: includes/class-mla-settings-custom-fields-tab.php:466
|
2229 |
#: includes/class-mla-settings-custom-fields-tab.php:748
|
2230 |
+
#: includes/class-mla-settings-custom-fields-tab.php:1323
|
2231 |
+
#: includes/class-mla-settings-custom-fields-tab.php:1433
|
2232 |
#: includes/class-mla-settings-iptc-exif-tab.php:814
|
2233 |
+
#: includes/class-mla-settings-iptc-exif-tab.php:1400
|
2234 |
#: includes/class-mla-settings-upload-tab.php:925
|
2235 |
#: includes/class-mla-settings-view-tab.php:722
|
2236 |
msgid "Quick Edit"
|
2237 |
msgstr ""
|
2238 |
|
2239 |
+
#: includes/class-mla-list-table.php:747
|
2240 |
msgid "Move this item to the Trash"
|
2241 |
msgstr ""
|
2242 |
|
2243 |
+
#: includes/class-mla-list-table.php:747 includes/class-mla-list-table.php:1850
|
2244 |
msgid "Move to Trash"
|
2245 |
msgstr ""
|
2246 |
|
2247 |
+
#: includes/class-mla-list-table.php:752
|
2248 |
+
#: includes/class-mla-settings-custom-fields-tab.php:1331
|
2249 |
+
#: includes/class-mla-settings-iptc-exif-tab.php:1410
|
2250 |
+
#: includes/class-mla-settings-shortcodes-tab.php:1077
|
2251 |
#: includes/class-mla-settings-upload-tab.php:929
|
2252 |
#: includes/class-mla-settings-view-tab.php:728
|
2253 |
msgid "Delete this item Permanently"
|
2254 |
msgstr ""
|
2255 |
|
2256 |
+
#: includes/class-mla-list-table.php:752 includes/class-mla-list-table.php:1845
|
2257 |
#: includes/class-mla-list-table.php:1852
|
2258 |
+
#: includes/class-mla-settings-custom-fields-tab.php:1331
|
2259 |
+
#: includes/class-mla-settings-custom-fields-tab.php:1660
|
2260 |
+
#: includes/class-mla-settings-iptc-exif-tab.php:1410
|
2261 |
+
#: includes/class-mla-settings-iptc-exif-tab.php:1765
|
2262 |
+
#: includes/class-mla-settings-shortcodes-tab.php:1077
|
2263 |
#: includes/class-mla-settings-upload-tab.php:929
|
2264 |
#: includes/class-mla-settings-view-tab.php:728
|
2265 |
+
#: includes/class-mla-settings-view-tab.php:923
|
2266 |
msgid "Delete Permanently"
|
2267 |
msgstr ""
|
2268 |
|
2269 |
+
#: includes/class-mla-list-table.php:760
|
2270 |
+
#: includes/class-mla-settings-documentation-tab.php:654
|
2271 |
#: includes/class-mla-settings.php:1388
|
2272 |
msgid "Download"
|
2273 |
msgstr ""
|
2274 |
|
2275 |
#: includes/class-mla-list-table.php:762
|
2276 |
+
#: includes/class-mla-settings-documentation-tab.php:657
|
2277 |
+
#: includes/class-mla-settings-shortcodes-tab.php:1069
|
2278 |
#: includes/class-mla-settings-view-tab.php:374
|
2279 |
msgid "View"
|
2280 |
msgstr ""
|
2330 |
msgstr[1] ""
|
2331 |
|
2332 |
#: includes/class-mla-list-table.php:1944
|
2333 |
+
#: includes/class-mla-settings-custom-fields-tab.php:1725
|
2334 |
+
#: includes/class-mla-settings-iptc-exif-tab.php:1830
|
2335 |
+
#: includes/class-mla-settings-shortcodes-tab.php:1345
|
2336 |
msgid "Filter"
|
2337 |
msgstr ""
|
2338 |
|
2342 |
msgstr ""
|
2343 |
|
2344 |
#: includes/class-mla-list-table.php:1952
|
2345 |
+
#: includes/class-mla-polylang-support.php:1985
|
2346 |
+
#: includes/class-mla-thumbnail-generation.php:638
|
2347 |
msgid "Clear Filter-by"
|
2348 |
msgstr ""
|
2349 |
|
2351 |
msgid "Empty Trash"
|
2352 |
msgstr ""
|
2353 |
|
2354 |
+
#: includes/class-mla-main.php:389
|
2355 |
msgid "Error while saving the changes."
|
2356 |
msgstr ""
|
2357 |
|
2358 |
+
#: includes/class-mla-main.php:390
|
2359 |
#: includes/class-mla-settings-custom-fields-tab.php:57
|
2360 |
#: includes/class-mla-settings-custom-fields-tab.php:92
|
2361 |
#: includes/class-mla-settings-iptc-exif-tab.php:57
|
2365 |
msgid "Remove From Bulk Edit"
|
2366 |
msgstr ""
|
2367 |
|
2368 |
+
#: includes/class-mla-main.php:392
|
2369 |
msgid "Bulk Edit items"
|
2370 |
msgstr ""
|
2371 |
|
2372 |
+
#: includes/class-mla-main.php:393 includes/class-mla-main.php:2060
|
2373 |
#: includes/class-mla-settings-custom-fields-tab.php:63
|
2374 |
#: includes/class-mla-settings-iptc-exif-tab.php:63
|
2375 |
msgid "Waiting"
|
2376 |
msgstr ""
|
2377 |
|
2378 |
+
#: includes/class-mla-main.php:394 includes/class-mla-main.php:2062
|
2379 |
#: includes/class-mla-settings-custom-fields-tab.php:65
|
2380 |
#: includes/class-mla-settings-iptc-exif-tab.php:65
|
2381 |
msgid "Complete"
|
2382 |
msgstr ""
|
2383 |
|
2384 |
+
#: includes/class-mla-main.php:395
|
2385 |
#: includes/class-mla-settings-custom-fields-tab.php:66
|
2386 |
#: includes/class-mla-settings-iptc-exif-tab.php:66
|
2387 |
msgid "Unchanged"
|
2388 |
msgstr ""
|
2389 |
|
2390 |
+
#: includes/class-mla-main.php:396
|
2391 |
#: includes/class-mla-settings-custom-fields-tab.php:67
|
2392 |
#: includes/class-mla-settings-iptc-exif-tab.php:67
|
2393 |
msgid "Succeeded"
|
2394 |
msgstr ""
|
2395 |
|
2396 |
+
#: includes/class-mla-main.php:397
|
2397 |
#: includes/class-mla-settings-custom-fields-tab.php:68
|
2398 |
#: includes/class-mla-settings-iptc-exif-tab.php:68
|
2399 |
msgid "Failed"
|
2400 |
msgstr ""
|
2401 |
|
2402 |
+
#: includes/class-mla-main.php:398
|
2403 |
msgid "CANCELED"
|
2404 |
msgstr ""
|
2405 |
|
2406 |
+
#: includes/class-mla-main.php:513
|
2407 |
#, php-format
|
2408 |
msgid "Item permanently deleted."
|
2409 |
msgid_plural "%d items permanently deleted."
|
2410 |
msgstr[0] ""
|
2411 |
msgstr[1] ""
|
2412 |
|
2413 |
+
#: includes/class-mla-main.php:518 includes/class-mla-main.php:2239
|
2414 |
#, php-format
|
2415 |
msgid "Item %1$d moved to Trash."
|
2416 |
msgstr ""
|
2417 |
|
2418 |
+
#: includes/class-mla-main.php:537
|
2419 |
msgid "Entries per page"
|
2420 |
msgstr ""
|
2421 |
|
2422 |
+
#: includes/class-mla-main.php:1134
|
2423 |
msgid "You are not allowed to edit Attachment: "
|
2424 |
msgstr ""
|
2425 |
|
2426 |
+
#: includes/class-mla-main.php:1190
|
2427 |
#, php-format
|
2428 |
msgid "%1$s: Unknown bulk action %2$s"
|
2429 |
msgstr ""
|
2430 |
|
2431 |
+
#: includes/class-mla-main.php:1212
|
2432 |
msgid "no changes detected"
|
2433 |
msgstr ""
|
2434 |
|
2435 |
+
#: includes/class-mla-main.php:1259
|
2436 |
#: includes/class-mla-settings-custom-fields-tab.php:601
|
2437 |
#: includes/class-mla-settings-documentation-tab.php:247
|
2438 |
#: includes/class-mla-settings-iptc-exif-tab.php:681
|
2443 |
msgid "Bulk Action %1$s - no items selected."
|
2444 |
msgstr ""
|
2445 |
|
2446 |
+
#: includes/class-mla-main.php:1343
|
2447 |
msgid "You do not have permission to manage attachments."
|
2448 |
msgstr ""
|
2449 |
|
2450 |
+
#: includes/class-mla-main.php:1405
|
2451 |
#, php-format
|
2452 |
msgctxt "deleted items"
|
2453 |
msgid "%s item deleted."
|
2455 |
msgstr[0] ""
|
2456 |
msgstr[1] ""
|
2457 |
|
2458 |
+
#: includes/class-mla-main.php:1407
|
2459 |
msgid "No items deleted."
|
2460 |
msgstr ""
|
2461 |
|
2462 |
+
#: includes/class-mla-main.php:1461
|
2463 |
msgid "Empty Terms Search; ignored"
|
2464 |
msgstr ""
|
2465 |
|
2466 |
+
#: includes/class-mla-main.php:1473
|
2467 |
#: includes/class-mla-settings-custom-fields-tab.php:630
|
2468 |
#: includes/class-mla-settings-documentation-tab.php:281
|
2469 |
#: includes/class-mla-settings-iptc-exif-tab.php:710
|
2474 |
msgid "Unknown mla_admin_action - \"%1$s\""
|
2475 |
msgstr ""
|
2476 |
|
2477 |
+
#: includes/class-mla-main.php:1506
|
2478 |
msgid "term search results for"
|
2479 |
msgstr ""
|
2480 |
|
2481 |
+
#: includes/class-mla-main.php:1509
|
2482 |
msgid "post/parent results for"
|
2483 |
msgstr ""
|
2484 |
|
2485 |
+
#: includes/class-mla-main.php:1511
|
2486 |
msgid "search results for"
|
2487 |
msgstr ""
|
2488 |
|
2489 |
+
#: includes/class-mla-main.php:1626 includes/class-mla-main.php:1845
|
2490 |
+
#: includes/class-mla-main.php:2047
|
2491 |
#: includes/class-mla-settings-custom-fields-tab.php:505
|
2492 |
#: includes/class-mla-settings-custom-fields-tab.php:789
|
2493 |
+
#: includes/class-mla-settings-documentation-tab.php:644
|
2494 |
+
#: includes/class-mla-settings-documentation-tab.php:852
|
2495 |
#: includes/class-mla-settings-iptc-exif-tab.php:514
|
2496 |
#: includes/class-mla-settings-iptc-exif-tab.php:871
|
2497 |
#: includes/class-mla-settings-shortcodes-tab.php:479
|
2502 |
msgid "Update"
|
2503 |
msgstr ""
|
2504 |
|
2505 |
+
#: includes/class-mla-main.php:1780
|
2506 |
msgid "All Post Types"
|
2507 |
msgstr ""
|
2508 |
|
2509 |
+
#: includes/class-mla-main.php:1826
|
2510 |
msgid "For"
|
2511 |
msgstr ""
|
2512 |
|
2513 |
+
#: includes/class-mla-main.php:1836
|
2514 |
+
#: includes/class-mla-shortcode-support.php:1034
|
2515 |
msgid "Unattached"
|
2516 |
msgstr ""
|
2517 |
|
2518 |
+
#: includes/class-mla-main.php:1841 includes/class-mla-main.php:2045
|
2519 |
+
#: includes/class-mla-polylang-support.php:1978
|
2520 |
#: includes/class-mla-settings-custom-fields-tab.php:503
|
2521 |
#: includes/class-mla-settings-custom-fields-tab.php:706
|
2522 |
#: includes/class-mla-settings-custom-fields-tab.php:788
|
2531 |
#: includes/class-mla-settings-upload-tab.php:549
|
2532 |
#: includes/class-mla-settings-view-tab.php:135
|
2533 |
#: includes/class-mla-settings-view-tab.php:393
|
2534 |
+
#: includes/class-mla-thumbnail-generation.php:639
|
2535 |
msgid "Cancel"
|
2536 |
msgstr ""
|
2537 |
|
2538 |
+
#: includes/class-mla-main.php:2048 includes/class-mla-options.php:1128
|
2539 |
#: includes/class-mla-options.php:1419
|
2540 |
#: includes/class-mla-settings-custom-fields-tab.php:469
|
2541 |
#: includes/class-mla-settings-custom-fields-tab.php:751
|
2542 |
+
#: includes/class-mla-settings-custom-fields-tab.php:1437
|
2543 |
#: includes/class-mla-settings-iptc-exif-tab.php:815
|
2544 |
#: includes/class-mla-settings-upload-tab.php:551
|
2545 |
#: includes/class-mla-settings-view-tab.php:395
|
2546 |
msgid "Bulk Edit"
|
2547 |
msgstr ""
|
2548 |
|
2549 |
+
#: includes/class-mla-main.php:2061
|
2550 |
msgid "In-process"
|
2551 |
msgstr ""
|
2552 |
|
2553 |
+
#: includes/class-mla-main.php:2152
|
2554 |
msgid "You are not allowed to delete this item."
|
2555 |
msgstr ""
|
2556 |
|
2557 |
+
#: includes/class-mla-main.php:2160
|
2558 |
#, php-format
|
2559 |
msgid "%1$s: Item %2$d could NOT be deleted."
|
2560 |
msgstr ""
|
2561 |
|
2562 |
+
#: includes/class-mla-main.php:2167
|
2563 |
#, php-format
|
2564 |
msgid "Item %1$d permanently deleted."
|
2565 |
msgstr ""
|
2566 |
|
2567 |
+
#: includes/class-mla-main.php:2184
|
2568 |
msgid "You are not allowed to move this item out of the Trash."
|
2569 |
msgstr ""
|
2570 |
|
2571 |
+
#: includes/class-mla-main.php:2192
|
2572 |
#, php-format
|
2573 |
msgid "%1$s: Item %2$d could NOT be restored from Trash."
|
2574 |
msgstr ""
|
2575 |
|
2576 |
+
#: includes/class-mla-main.php:2207
|
2577 |
#, php-format
|
2578 |
msgid "Item %1$d restored from Trash."
|
2579 |
msgstr ""
|
2580 |
|
2581 |
+
#: includes/class-mla-main.php:2224
|
2582 |
msgid "You are not allowed to move this item to the Trash."
|
2583 |
msgstr ""
|
2584 |
|
2585 |
+
#: includes/class-mla-main.php:2232
|
2586 |
#, php-format
|
2587 |
msgid "%1$s: Item %2$d could NOT be moved to Trash."
|
2588 |
msgstr ""
|
2600 |
msgstr ""
|
2601 |
|
2602 |
#: includes/class-mla-media-modal-ajax.php:452
|
2603 |
+
#: includes/class-mla-objects.php:50 includes/class-mla-objects.php:82
|
2604 |
#: includes/class-mla-settings-upload-tab.php:532
|
2605 |
#: includes/class-mla-settings-view-tab.php:374
|
2606 |
#, php-format
|
2662 |
msgid "Manage"
|
2663 |
msgstr ""
|
2664 |
|
2665 |
+
#: includes/class-mla-mime-types.php:550 includes/class-mla-mime-types.php:628
|
2666 |
msgctxt "list_table_column"
|
2667 |
msgid "Extension"
|
2668 |
msgstr ""
|
2673 |
msgstr ""
|
2674 |
|
2675 |
#: includes/class-mla-mime-types.php:553
|
2676 |
+
#: includes/class-mla-settings-custom-fields-tab.php:1180
|
2677 |
msgctxt "list_table_column"
|
2678 |
msgid "Source"
|
2679 |
msgstr ""
|
2680 |
|
2681 |
#: includes/class-mla-mime-types.php:554
|
2682 |
+
#: includes/class-mla-settings-custom-fields-tab.php:1183
|
2683 |
+
#: includes/class-mla-settings-iptc-exif-tab.php:1259
|
2684 |
msgctxt "list_table_column"
|
2685 |
msgid "Status"
|
2686 |
msgstr ""
|
2687 |
|
2688 |
+
#: includes/class-mla-mime-types.php:555 includes/class-mla-mime-types.php:630
|
2689 |
msgctxt "list_table_column"
|
2690 |
msgid "WordPress Type"
|
2691 |
msgstr ""
|
2692 |
|
2693 |
+
#: includes/class-mla-mime-types.php:556 includes/class-mla-mime-types.php:631
|
2694 |
msgctxt "list_table_column"
|
2695 |
msgid "MLA Type"
|
2696 |
msgstr ""
|
2705 |
msgid "Std. Icon Type"
|
2706 |
msgstr ""
|
2707 |
|
2708 |
+
#: includes/class-mla-mime-types.php:704
|
2709 |
msgctxt "list_table_column"
|
2710 |
msgid "Slug"
|
2711 |
msgstr ""
|
2712 |
|
2713 |
+
#: includes/class-mla-mime-types.php:705
|
2714 |
msgctxt "list_table_column"
|
2715 |
msgid "Specification"
|
2716 |
msgstr ""
|
2717 |
|
2718 |
+
#: includes/class-mla-mime-types.php:706
|
2719 |
msgctxt "list_table_column"
|
2720 |
msgid "Post Mime"
|
2721 |
msgstr ""
|
2722 |
|
2723 |
+
#: includes/class-mla-mime-types.php:707
|
2724 |
msgctxt "list_table_column"
|
2725 |
msgid "Table View"
|
2726 |
msgstr ""
|
2727 |
|
2728 |
+
#: includes/class-mla-mime-types.php:708
|
2729 |
msgctxt "list_table_column"
|
2730 |
msgid "Singular Name"
|
2731 |
msgstr ""
|
2732 |
|
2733 |
+
#: includes/class-mla-mime-types.php:709
|
2734 |
msgctxt "list_table_column"
|
2735 |
msgid "Plural Name"
|
2736 |
msgstr ""
|
2737 |
|
2738 |
+
#: includes/class-mla-mime-types.php:710
|
2739 |
msgctxt "list_table_column"
|
2740 |
msgid "Order"
|
2741 |
msgstr ""
|
2742 |
|
2743 |
+
#: includes/class-mla-mime-types.php:1026
|
2744 |
msgctxt "post_mime_types_description"
|
2745 |
msgid "Copied from previous filter/plugin"
|
2746 |
msgstr ""
|
2747 |
|
2748 |
+
#: includes/class-mla-mime-types.php:1127
|
2749 |
+
#: includes/class-mla-mime-types.php:1244
|
2750 |
msgid "Ignoring specification for Post MIME Type; using slug"
|
2751 |
msgstr ""
|
2752 |
|
2753 |
+
#: includes/class-mla-mime-types.php:1133
|
2754 |
+
#: includes/class-mla-mime-types.php:2213
|
2755 |
#, php-format
|
2756 |
msgid "<br>Changing %1$s \"%2$s\" to valid value \"%3$s\""
|
2757 |
msgstr ""
|
2758 |
|
2759 |
+
#: includes/class-mla-mime-types.php:1133
|
2760 |
+
#: includes/class-mla-mime-types.php:1221
|
2761 |
+
#: includes/class-mla-mime-types.php:1232
|
2762 |
#: includes/class-mla-settings-view-tab.php:119
|
2763 |
#: includes/class-mla-settings-view-tab.php:375
|
2764 |
msgid "Slug"
|
2765 |
msgstr ""
|
2766 |
|
2767 |
+
#: includes/class-mla-mime-types.php:1141
|
2768 |
+
#: includes/class-mla-mime-types.php:1229
|
2769 |
#, php-format
|
2770 |
msgid "%1$s: Could not add Slug \"%2$s\"; value already exists"
|
2771 |
msgstr ""
|
2772 |
|
2773 |
+
#: includes/class-mla-mime-types.php:1176
|
2774 |
#, php-format
|
2775 |
msgid "Edit view \"%1$s\"; added"
|
2776 |
msgstr ""
|
2777 |
|
2778 |
+
#: includes/class-mla-mime-types.php:1221
|
2779 |
+
#: includes/class-mla-mime-types.php:2339
|
2780 |
#, php-format
|
2781 |
msgid "<br>Changing new %1$s \"%2$s\" to valid value \"%3$s\""
|
2782 |
msgstr ""
|
2783 |
|
2784 |
+
#: includes/class-mla-mime-types.php:1274
|
2785 |
#, php-format
|
2786 |
msgid "Edit view \"%1$s\"; no changes detected"
|
2787 |
msgstr ""
|
2788 |
|
2789 |
+
#: includes/class-mla-mime-types.php:1288
|
2790 |
#, php-format
|
2791 |
msgid "Edit view \"%1$s\"; updated"
|
2792 |
msgstr ""
|
2793 |
|
2794 |
+
#: includes/class-mla-mime-types.php:1361
|
2795 |
#, php-format
|
2796 |
msgid "View \"%1$s\" reverted to standard"
|
2797 |
msgstr ""
|
2798 |
|
2799 |
+
#: includes/class-mla-mime-types.php:1367
|
2800 |
#, php-format
|
2801 |
msgid "View \"%1$s\" deleted"
|
2802 |
msgstr ""
|
2803 |
|
2804 |
+
#: includes/class-mla-mime-types.php:1375
|
2805 |
#, php-format
|
2806 |
msgid "%1$s: Did not find view \"%2$s\""
|
2807 |
msgstr ""
|
2808 |
|
2809 |
+
#: includes/class-mla-mime-types.php:1634
|
2810 |
+
#: includes/class-mla-settings-documentation-tab.php:1552
|
2811 |
msgctxt "table_view_singular"
|
2812 |
msgid "Active"
|
2813 |
msgstr ""
|
2814 |
|
2815 |
+
#: includes/class-mla-mime-types.php:1635
|
2816 |
+
#: includes/class-mla-settings-documentation-tab.php:1553
|
2817 |
msgctxt "table_view_plural"
|
2818 |
msgid "Active"
|
2819 |
msgstr ""
|
2820 |
|
2821 |
+
#: includes/class-mla-mime-types.php:1638
|
2822 |
+
#: includes/class-mla-settings-documentation-tab.php:1556
|
2823 |
msgctxt "table_view_singular"
|
2824 |
msgid "Inactive"
|
2825 |
msgstr ""
|
2826 |
|
2827 |
+
#: includes/class-mla-mime-types.php:1639
|
2828 |
+
#: includes/class-mla-settings-documentation-tab.php:1557
|
2829 |
msgctxt "table_view_plural"
|
2830 |
msgid "Inactive"
|
2831 |
msgstr ""
|
2832 |
|
2833 |
+
#: includes/class-mla-mime-types.php:1642
|
2834 |
msgctxt "table_view_singular"
|
2835 |
msgid "WordPress"
|
2836 |
msgstr ""
|
2837 |
|
2838 |
+
#: includes/class-mla-mime-types.php:1643
|
2839 |
msgctxt "table_view_plural"
|
2840 |
msgid "WordPress"
|
2841 |
msgstr ""
|
2842 |
|
2843 |
+
#: includes/class-mla-mime-types.php:1646
|
2844 |
msgctxt "table_view_singular"
|
2845 |
msgid "MLA"
|
2846 |
msgstr ""
|
2847 |
|
2848 |
+
#: includes/class-mla-mime-types.php:1647
|
2849 |
msgctxt "table_view_plural"
|
2850 |
msgid "MLA"
|
2851 |
msgstr ""
|
2852 |
|
2853 |
+
#: includes/class-mla-mime-types.php:1650
|
2854 |
+
#: includes/class-mla-settings-iptc-exif-tab.php:2676
|
2855 |
msgctxt "table_view_singular"
|
2856 |
msgid "Custom"
|
2857 |
msgstr ""
|
2858 |
|
2859 |
+
#: includes/class-mla-mime-types.php:1651
|
2860 |
+
#: includes/class-mla-settings-iptc-exif-tab.php:2677
|
2861 |
msgctxt "table_view_plural"
|
2862 |
msgid "Custom"
|
2863 |
msgstr ""
|
2864 |
|
2865 |
+
#: includes/class-mla-mime-types.php:1906
|
2866 |
msgid "icon"
|
2867 |
msgstr ""
|
2868 |
|
2869 |
+
#: includes/class-mla-mime-types.php:2197
|
2870 |
+
#: includes/class-mla-mime-types.php:2296
|
2871 |
msgid "Cannot load Upload MIME Types"
|
2872 |
msgstr ""
|
2873 |
|
2874 |
+
#: includes/class-mla-mime-types.php:2208
|
2875 |
msgid "Extension is required"
|
2876 |
msgstr ""
|
2877 |
|
2878 |
+
#: includes/class-mla-mime-types.php:2213
|
2879 |
+
#: includes/class-mla-mime-types.php:2339
|
2880 |
+
#: includes/class-mla-mime-types.php:2350
|
2881 |
#: includes/class-mla-settings-upload-tab.php:165
|
2882 |
#: includes/class-mla-settings-upload-tab.php:534
|
2883 |
msgid "Extension"
|
2884 |
msgstr ""
|
2885 |
|
2886 |
+
#: includes/class-mla-mime-types.php:2221
|
2887 |
#, php-format
|
2888 |
msgid "%1$s: Could not add extension \"%2$s\"; value already exists"
|
2889 |
msgstr ""
|
2890 |
|
2891 |
+
#: includes/class-mla-mime-types.php:2229
|
2892 |
msgid "MIME type is required"
|
2893 |
msgstr ""
|
2894 |
|
2895 |
+
#: includes/class-mla-mime-types.php:2234
|
2896 |
+
#: includes/class-mla-mime-types.php:2381
|
2897 |
#, php-format
|
2898 |
msgid "%1$s: Bad MIME type; try \"%2$s\""
|
2899 |
msgstr ""
|
2900 |
|
2901 |
+
#: includes/class-mla-mime-types.php:2271
|
2902 |
#, php-format
|
2903 |
msgid "Upload MIME Type \"%1$s\"; added"
|
2904 |
msgstr ""
|
2905 |
|
2906 |
+
#: includes/class-mla-mime-types.php:2277
|
2907 |
+
#: includes/class-mla-mime-types.php:2466
|
2908 |
+
#: includes/class-mla-mime-types.php:2545
|
2909 |
msgid "Cannot update Upload MIME Types"
|
2910 |
msgstr ""
|
2911 |
|
2912 |
+
#: includes/class-mla-mime-types.php:2347
|
2913 |
#, php-format
|
2914 |
msgid "%1$s: Could not add new extension \"%2$s\"; value already exists"
|
2915 |
msgstr ""
|
2916 |
|
2917 |
+
#: includes/class-mla-mime-types.php:2446
|
2918 |
#, php-format
|
2919 |
msgid "Edit type \"%1$s\"; no changes detected"
|
2920 |
msgstr ""
|
2921 |
|
2922 |
+
#: includes/class-mla-mime-types.php:2460
|
2923 |
#, php-format
|
2924 |
msgid "Edit type \"%1$s\"; updated"
|
2925 |
msgstr ""
|
2926 |
|
2927 |
+
#: includes/class-mla-mime-types.php:2533
|
2928 |
#, php-format
|
2929 |
msgid "Upload MIME Type \"%1$s\"; reverted to standard"
|
2930 |
msgstr ""
|
2931 |
|
2932 |
+
#: includes/class-mla-mime-types.php:2539
|
2933 |
#, php-format
|
2934 |
msgid "Upload MIME Type \"%1$s\"; deleted"
|
2935 |
msgstr ""
|
2936 |
|
2937 |
+
#: includes/class-mla-mime-types.php:2554
|
2938 |
#, php-format
|
2939 |
msgid "%1$s: Did not find Upload type \"%2$s\""
|
2940 |
msgstr ""
|
2941 |
|
2942 |
+
#: includes/class-mla-objects.php:41
|
2943 |
msgctxt "taxonomy_name_plural"
|
2944 |
msgid "Att. Categories"
|
2945 |
msgstr ""
|
2946 |
|
2947 |
+
#: includes/class-mla-objects.php:42
|
2948 |
msgctxt "taxonomy_name_singular"
|
2949 |
msgid "Att. Category"
|
2950 |
msgstr ""
|
2951 |
|
2952 |
+
#: includes/class-mla-objects.php:43
|
2953 |
msgid "Search Att. Categories"
|
2954 |
msgstr ""
|
2955 |
|
2956 |
+
#: includes/class-mla-objects.php:44
|
2957 |
msgid "All Att. Categories"
|
2958 |
msgstr ""
|
2959 |
|
2960 |
+
#: includes/class-mla-objects.php:45 includes/class-mla-objects.php:46
|
2961 |
msgid "Parent Att. Category"
|
2962 |
msgstr ""
|
2963 |
|
2964 |
+
#: includes/class-mla-objects.php:47
|
2965 |
msgid "Edit Att. Category"
|
2966 |
msgstr ""
|
2967 |
|
2968 |
+
#: includes/class-mla-objects.php:48
|
2969 |
msgid "Update Att. Category"
|
2970 |
msgstr ""
|
2971 |
|
2972 |
+
#: includes/class-mla-objects.php:50 includes/class-mla-objects.php:52
|
2973 |
msgid "Att. Category"
|
2974 |
msgstr ""
|
2975 |
|
2976 |
+
#: includes/class-mla-objects.php:51
|
2977 |
msgid "New Att. Category Name"
|
2978 |
msgstr ""
|
2979 |
|
2980 |
+
#: includes/class-mla-objects.php:73
|
2981 |
msgctxt "taxonomy_name_plural"
|
2982 |
msgid "Att. Tags"
|
2983 |
msgstr ""
|
2984 |
|
2985 |
+
#: includes/class-mla-objects.php:74
|
2986 |
msgctxt "taxonomy_name_singular"
|
2987 |
msgid "Att. Tag"
|
2988 |
msgstr ""
|
2989 |
|
2990 |
+
#: includes/class-mla-objects.php:75
|
2991 |
msgid "Search Att. Tags"
|
2992 |
msgstr ""
|
2993 |
|
2994 |
+
#: includes/class-mla-objects.php:76
|
2995 |
msgid "All Att. Tags"
|
2996 |
msgstr ""
|
2997 |
|
2998 |
+
#: includes/class-mla-objects.php:77 includes/class-mla-objects.php:78
|
2999 |
msgid "Parent Att. Tag"
|
3000 |
msgstr ""
|
3001 |
|
3002 |
+
#: includes/class-mla-objects.php:79
|
3003 |
msgid "Edit Att. Tag"
|
3004 |
msgstr ""
|
3005 |
|
3006 |
+
#: includes/class-mla-objects.php:80
|
3007 |
msgid "Update Att. Tag"
|
3008 |
msgstr ""
|
3009 |
|
3010 |
+
#: includes/class-mla-objects.php:82 includes/class-mla-objects.php:84
|
3011 |
msgid "Att. Tag"
|
3012 |
msgstr ""
|
3013 |
|
3014 |
+
#: includes/class-mla-objects.php:83
|
3015 |
msgid "New Att. Tag Name"
|
3016 |
msgstr ""
|
3017 |
|
3018 |
+
#: includes/class-mla-objects.php:155
|
3019 |
msgid "Attachments"
|
3020 |
msgstr ""
|
3021 |
|
3022 |
+
#: includes/class-mla-objects.php:253
|
3023 |
#, php-format
|
3024 |
msgctxt "error_log"
|
3025 |
msgid ""
|
3026 |
"%1$s: mla_taxonomy_column_filter( \"%2$s\" ) - get_term failed: \"%3$s\""
|
3027 |
msgstr ""
|
3028 |
|
3029 |
+
#: includes/class-mla-objects.php:277
|
3030 |
msgid "click to search"
|
3031 |
msgstr ""
|
3032 |
|
3033 |
+
#: includes/class-mla-objects.php:309
|
3034 |
msgid "Shortcode(s), HTML and/or Plain Text"
|
3035 |
msgstr ""
|
3036 |
|
3037 |
+
#: includes/class-mla-objects.php:317
|
3038 |
msgid "MLA Text"
|
3039 |
msgstr ""
|
3040 |
|
3041 |
+
#: includes/class-mla-objects.php:361
|
3042 |
msgid "Automatically add paragraphs"
|
3043 |
msgstr ""
|
3044 |
|
3045 |
+
#: includes/class-mla-objects.php:362
|
3046 |
+
msgid "Add .textwidget div tags"
|
3047 |
+
msgstr ""
|
3048 |
+
|
3049 |
#: includes/class-mla-options.php:64
|
3050 |
msgid "error loading tpls/mla-option-templates.tpl"
|
3051 |
msgstr ""
|
3274 |
#: includes/class-mla-options.php:1100 includes/class-mla-options.php:1417
|
3275 |
#: includes/class-mla-settings-custom-fields-tab.php:463
|
3276 |
#: includes/class-mla-settings-custom-fields-tab.php:745
|
3277 |
+
#: includes/class-mla-settings-custom-fields-tab.php:1429
|
3278 |
msgid "MLA Column"
|
3279 |
msgstr ""
|
3280 |
|
3311 |
#: includes/class-mla-options.php:2767 includes/class-mla-options.php:2813
|
3312 |
#: includes/class-mla-settings-custom-fields-tab.php:473
|
3313 |
#: includes/class-mla-settings-custom-fields-tab.php:755
|
3314 |
+
#: includes/class-mla-settings-custom-fields-tab.php:1475
|
3315 |
#: includes/class-mla-settings-iptc-exif-tab.php:471
|
3316 |
#: includes/class-mla-settings-iptc-exif-tab.php:833
|
3317 |
+
#: includes/class-mla-settings-iptc-exif-tab.php:1535
|
3318 |
+
#: includes/class-mla-settings-iptc-exif-tab.php:2356
|
3319 |
+
#: includes/class-mla-thumbnail-generation.php:631
|
3320 |
msgid "Keep"
|
3321 |
msgstr ""
|
3322 |
|
3413 |
msgstr ""
|
3414 |
|
3415 |
#: includes/class-mla-options.php:1267 includes/class-mla-options.php:2698
|
3416 |
+
#: includes/class-mla-settings-custom-fields-tab.php:1326
|
3417 |
+
#: includes/class-mla-settings-iptc-exif-tab.php:1403
|
3418 |
msgid "Map All Attachments"
|
3419 |
msgstr ""
|
3420 |
|
3515 |
#: includes/class-mla-options.php:2809
|
3516 |
#: includes/class-mla-settings-iptc-exif-tab.php:466
|
3517 |
#: includes/class-mla-settings-iptc-exif-tab.php:828
|
3518 |
+
#: includes/class-mla-settings-iptc-exif-tab.php:1519
|
3519 |
msgid "IPTC"
|
3520 |
msgstr ""
|
3521 |
|
3524 |
#: includes/class-mla-options.php:2811
|
3525 |
#: includes/class-mla-settings-iptc-exif-tab.php:468
|
3526 |
#: includes/class-mla-settings-iptc-exif-tab.php:830
|
3527 |
+
#: includes/class-mla-settings-iptc-exif-tab.php:1522
|
3528 |
msgid "EXIF"
|
3529 |
msgstr ""
|
3530 |
|
3613 |
msgid "Add new"
|
3614 |
msgstr ""
|
3615 |
|
3616 |
+
#: includes/class-mla-polylang-support.php:1816
|
3617 |
+
#: includes/class-mla-polylang-support.php:2183
|
3618 |
msgid "Bulk Translations"
|
3619 |
msgstr ""
|
3620 |
|
3621 |
+
#: includes/class-mla-polylang-support.php:1840
|
3622 |
msgid "Translate"
|
3623 |
msgstr ""
|
3624 |
|
3625 |
+
#: includes/class-mla-polylang-support.php:1968
|
3626 |
msgid "All Languages"
|
3627 |
msgstr ""
|
3628 |
|
3629 |
+
#: includes/class-mla-polylang-support.php:1975
|
3630 |
+
#: includes/class-mla-polylang-support.php:2248
|
3631 |
+
#: includes/class-mla-polylang-support.php:2408
|
3632 |
msgid "Quick Translate"
|
3633 |
msgstr ""
|
3634 |
|
3635 |
+
#: includes/class-mla-polylang-support.php:1979
|
3636 |
msgid "Set Language"
|
3637 |
msgstr ""
|
3638 |
|
3639 |
+
#: includes/class-mla-polylang-support.php:1980
|
3640 |
+
#: includes/class-mla-polylang-support.php:2415
|
3641 |
msgid "Bulk Translate"
|
3642 |
msgstr ""
|
3643 |
|
3644 |
+
#: includes/class-mla-polylang-support.php:1981
|
3645 |
msgid "Add or Modify Translation"
|
3646 |
msgstr ""
|
3647 |
|
3648 |
+
#: includes/class-mla-polylang-support.php:1982
|
3649 |
+
#: includes/class-mla-polylang-support.php:2039
|
3650 |
+
#: includes/class-mla-polylang-support.php:2352
|
3651 |
+
#: includes/class-mla-polylang-support.php:2467
|
3652 |
+
#: includes/class-mla-wpml-support.php:1578
|
3653 |
+
#: includes/class-mla-wpml-support.php:1668
|
3654 |
+
#: includes/class-mla-wpml-support.php:2128
|
3655 |
msgid "Language"
|
3656 |
msgstr ""
|
3657 |
|
3658 |
+
#: includes/class-mla-polylang-support.php:1984
|
3659 |
+
#: includes/class-mla-thumbnail-generation.php:637
|
3660 |
msgid "Options"
|
3661 |
msgstr ""
|
3662 |
|
3663 |
+
#: includes/class-mla-polylang-support.php:2248
|
3664 |
msgid "Translate this item inline"
|
3665 |
msgstr ""
|
3666 |
|
3667 |
+
#: includes/class-mla-polylang-support.php:2389
|
3668 |
+
#: includes/class-mla-polylang-support.php:2494
|
3669 |
+
#: includes/class-mla-wpml-support.php:1613
|
3670 |
+
#: includes/class-mla-wpml-support.php:1716
|
3671 |
msgid "Media/Assistant submenu table"
|
3672 |
msgstr ""
|
3673 |
|
3674 |
+
#: includes/class-mla-polylang-support.php:2394
|
3675 |
+
#: includes/class-mla-wpml-support.php:1618
|
3676 |
msgid "Language Column"
|
3677 |
msgstr ""
|
3678 |
|
3679 |
+
#: includes/class-mla-polylang-support.php:2397
|
3680 |
+
#: includes/class-mla-wpml-support.php:1621
|
3681 |
msgid ""
|
3682 |
"Check this option to add a Language column to the Media/Assistant submenu "
|
3683 |
"table."
|
3684 |
msgstr ""
|
3685 |
|
3686 |
+
#: includes/class-mla-polylang-support.php:2401
|
3687 |
+
#: includes/class-mla-wpml-support.php:1625
|
3688 |
msgid "Translations Column"
|
3689 |
msgstr ""
|
3690 |
|
3691 |
+
#: includes/class-mla-polylang-support.php:2404
|
3692 |
+
#: includes/class-mla-wpml-support.php:1628
|
3693 |
msgid ""
|
3694 |
"Check this option to add a Translation Status column to the Media/Assistant "
|
3695 |
"submenu table."
|
3696 |
msgstr ""
|
3697 |
|
3698 |
+
#: includes/class-mla-polylang-support.php:2411
|
3699 |
msgid ""
|
3700 |
"Check this option to add a Quick Translate rollover action to the Media/"
|
3701 |
"Assistant submenu table."
|
3702 |
msgstr ""
|
3703 |
|
3704 |
+
#: includes/class-mla-polylang-support.php:2418
|
3705 |
msgid ""
|
3706 |
"Check this option to add \"Translate\" to the \"Bulk Actions\" control on "
|
3707 |
"the Media/Assistant submenu table."
|
3708 |
msgstr ""
|
3709 |
|
3710 |
+
#: includes/class-mla-polylang-support.php:2422
|
3711 |
+
#: includes/class-mla-polylang-support.php:2494
|
3712 |
+
#: includes/class-mla-wpml-support.php:1632
|
3713 |
+
#: includes/class-mla-wpml-support.php:1716
|
3714 |
msgid "Term Management"
|
3715 |
msgstr ""
|
3716 |
|
3717 |
+
#: includes/class-mla-polylang-support.php:2427
|
3718 |
+
#: includes/class-mla-wpml-support.php:1637
|
3719 |
msgid "Term Assignment"
|
3720 |
msgstr ""
|
3721 |
|
3722 |
+
#: includes/class-mla-polylang-support.php:2430
|
3723 |
+
#: includes/class-mla-wpml-support.php:1640
|
3724 |
msgid ""
|
3725 |
"Check this option to assign language-specific terms when items are updated."
|
3726 |
msgstr ""
|
3727 |
|
3728 |
+
#: includes/class-mla-polylang-support.php:2434
|
3729 |
+
#: includes/class-mla-wpml-support.php:1644
|
3730 |
msgid "Term Synchronization"
|
3731 |
msgstr ""
|
3732 |
|
3733 |
+
#: includes/class-mla-polylang-support.php:2437
|
3734 |
+
#: includes/class-mla-wpml-support.php:1647
|
3735 |
msgid ""
|
3736 |
"Check this option to synchronize common terms among all item translations."
|
3737 |
msgstr ""
|
3738 |
|
3739 |
+
#: includes/class-mla-polylang-support.php:2441
|
3740 |
+
#: includes/class-mla-wpml-support.php:1651
|
3741 |
msgid "Term Mapping Replication"
|
3742 |
msgstr ""
|
3743 |
|
3744 |
+
#: includes/class-mla-polylang-support.php:2444
|
3745 |
+
#: includes/class-mla-wpml-support.php:1654
|
3746 |
msgid ""
|
3747 |
"When mapping IPTC/EXIF metadata to taxonomy terms, make them available in "
|
3748 |
"all languages."
|
3749 |
msgstr ""
|
3750 |
|
3751 |
+
#: includes/class-mla-polylang-support.php:2492
|
3752 |
+
#: includes/class-mla-wpml-support.php:1714
|
3753 |
msgid "Language Options"
|
3754 |
msgstr ""
|
3755 |
|
3756 |
+
#: includes/class-mla-polylang-support.php:2494
|
3757 |
#, php-format
|
3758 |
msgid ""
|
3759 |
"In this tab you can find a number of options for controlling Polylang-"
|
3762 |
"make."
|
3763 |
msgstr ""
|
3764 |
|
3765 |
+
#: includes/class-mla-polylang-support.php:2496
|
3766 |
+
#: includes/class-mla-wpml-support.php:1718
|
3767 |
#, php-format
|
3768 |
msgid ""
|
3769 |
"You can find more information about multilingual features in the %1$s "
|
3770 |
"section of the Documentation."
|
3771 |
msgstr ""
|
3772 |
|
3773 |
+
#: includes/class-mla-polylang-support.php:2496
|
3774 |
+
#: includes/class-mla-wpml-support.php:1718
|
3775 |
msgid "Language Options documentation"
|
3776 |
msgstr ""
|
3777 |
|
3778 |
+
#: includes/class-mla-polylang-support.php:2496
|
3779 |
+
#: includes/class-mla-wpml-support.php:1718
|
3780 |
msgid "WPML & Polylang Multilingual Support; the MLA Language Tab"
|
3781 |
msgstr ""
|
3782 |
|
3783 |
+
#: includes/class-mla-polylang-support.php:2499
|
3784 |
#: includes/class-mla-settings-custom-fields-tab.php:732
|
3785 |
#: includes/class-mla-settings-iptc-exif-tab.php:811
|
3786 |
#: includes/class-mla-settings-shortcodes-tab.php:713
|
3790 |
#: includes/class-mla-settings-view-tab.php:372
|
3791 |
#: includes/class-mla-settings.php:1058 includes/class-mla-settings.php:1430
|
3792 |
#: includes/class-mla-settings.php:1432
|
3793 |
+
#: includes/class-mla-wpml-support.php:1721
|
3794 |
msgid "Save Changes"
|
3795 |
msgstr ""
|
3796 |
|
3797 |
+
#: includes/class-mla-polylang-support.php:2500
|
3798 |
+
#: includes/class-mla-wpml-support.php:1722
|
3799 |
msgid "Delete Language options and restore default settings"
|
3800 |
msgstr ""
|
3801 |
|
3802 |
+
#: includes/class-mla-polylang-support.php:2503
|
3803 |
#: includes/class-mla-settings.php:796 includes/class-mla-settings.php:1063
|
3804 |
+
#: includes/class-mla-wpml-support.php:1725
|
3805 |
msgid "Go to Top"
|
3806 |
msgstr ""
|
3807 |
|
3808 |
+
#: includes/class-mla-polylang-support.php:2540
|
3809 |
+
#: includes/class-mla-wpml-support.php:1762
|
3810 |
msgid "Language settings saved."
|
3811 |
msgstr ""
|
3812 |
|
3813 |
+
#: includes/class-mla-polylang-support.php:2571
|
3814 |
#: includes/class-mla-settings.php:1648
|
3815 |
+
#: includes/class-mla-wpml-support.php:1793
|
3816 |
#, php-format
|
3817 |
msgctxt "message_list"
|
3818 |
msgid "delete_option \"%1$s\""
|
3819 |
msgstr ""
|
3820 |
|
3821 |
+
#: includes/class-mla-polylang-support.php:2579
|
3822 |
+
#: includes/class-mla-wpml-support.php:1801
|
3823 |
msgid "Language settings reset to default values."
|
3824 |
msgstr ""
|
3825 |
|
4012 |
|
4013 |
#: includes/class-mla-settings-custom-fields-tab.php:499
|
4014 |
#: includes/class-mla-settings-custom-fields-tab.php:781
|
4015 |
+
#: includes/class-mla-settings-custom-fields-tab.php:1459
|
4016 |
+
#: includes/class-mla-settings-custom-fields-tab.php:1682
|
4017 |
+
#: includes/class-mla-settings-documentation-tab.php:1217
|
4018 |
#: includes/class-mla-settings-iptc-exif-tab.php:508
|
4019 |
#: includes/class-mla-settings-iptc-exif-tab.php:862
|
4020 |
+
#: includes/class-mla-settings-iptc-exif-tab.php:1551
|
4021 |
+
#: includes/class-mla-settings-iptc-exif-tab.php:1787
|
4022 |
+
#: includes/class-mla-settings-iptc-exif-tab.php:2359
|
4023 |
#: includes/class-mla-settings-upload-tab.php:554
|
4024 |
#: includes/class-mla-settings-upload-tab.php:1036
|
4025 |
msgid "Active"
|
4027 |
|
4028 |
#: includes/class-mla-settings-custom-fields-tab.php:501
|
4029 |
#: includes/class-mla-settings-custom-fields-tab.php:783
|
4030 |
+
#: includes/class-mla-settings-custom-fields-tab.php:1461
|
4031 |
+
#: includes/class-mla-settings-custom-fields-tab.php:1685
|
4032 |
+
#: includes/class-mla-settings-documentation-tab.php:1219
|
4033 |
#: includes/class-mla-settings-iptc-exif-tab.php:510
|
4034 |
#: includes/class-mla-settings-iptc-exif-tab.php:864
|
4035 |
+
#: includes/class-mla-settings-iptc-exif-tab.php:1553
|
4036 |
+
#: includes/class-mla-settings-iptc-exif-tab.php:1790
|
4037 |
+
#: includes/class-mla-settings-iptc-exif-tab.php:2359
|
4038 |
#: includes/class-mla-settings-upload-tab.php:172
|
4039 |
#: includes/class-mla-settings-upload-tab.php:540
|
4040 |
#: includes/class-mla-settings-upload-tab.php:1034
|
4178 |
msgid "Rule not found"
|
4179 |
msgstr ""
|
4180 |
|
4181 |
+
#: includes/class-mla-settings-custom-fields-tab.php:1179
|
4182 |
+
#: includes/class-mla-settings-iptc-exif-tab.php:1254
|
4183 |
msgctxt "list_table_column"
|
4184 |
msgid "Bad Name"
|
4185 |
msgstr ""
|
4186 |
|
4187 |
+
#: includes/class-mla-settings-custom-fields-tab.php:1181
|
4188 |
msgctxt "list_table_column"
|
4189 |
msgid "Meta/Template"
|
4190 |
msgstr ""
|
4191 |
|
4192 |
+
#: includes/class-mla-settings-custom-fields-tab.php:1182
|
4193 |
msgctxt "list_table_column"
|
4194 |
msgid "Visibility"
|
4195 |
msgstr ""
|
4196 |
|
4197 |
+
#: includes/class-mla-settings-custom-fields-tab.php:1184
|
4198 |
+
#: includes/class-mla-settings-iptc-exif-tab.php:1258
|
4199 |
msgctxt "list_table_column"
|
4200 |
msgid "Existing Text"
|
4201 |
msgstr ""
|
4202 |
|
4203 |
+
#: includes/class-mla-settings-custom-fields-tab.php:1185
|
4204 |
+
#: includes/class-mla-settings-iptc-exif-tab.php:1262
|
4205 |
msgctxt "list_table_column"
|
4206 |
msgid "Delete NULL"
|
4207 |
msgstr ""
|
4208 |
|
4209 |
+
#: includes/class-mla-settings-custom-fields-tab.php:1186
|
4210 |
+
#: includes/class-mla-settings-iptc-exif-tab.php:1263
|
4211 |
msgctxt "list_table_column"
|
4212 |
msgid "Format"
|
4213 |
msgstr ""
|
4214 |
|
4215 |
+
#: includes/class-mla-settings-custom-fields-tab.php:1187
|
4216 |
+
#: includes/class-mla-settings-iptc-exif-tab.php:1264
|
4217 |
msgctxt "list_table_column"
|
4218 |
msgid "Option"
|
4219 |
msgstr ""
|
4220 |
|
4221 |
+
#: includes/class-mla-settings-custom-fields-tab.php:1326
|
4222 |
+
#: includes/class-mla-settings-custom-fields-tab.php:1661
|
4223 |
+
#: includes/class-mla-settings-iptc-exif-tab.php:1403
|
4224 |
+
#: includes/class-mla-settings-iptc-exif-tab.php:1766
|
4225 |
msgid "Execute"
|
4226 |
msgstr ""
|
4227 |
|
4228 |
+
#: includes/class-mla-settings-custom-fields-tab.php:1328
|
4229 |
msgid "Purge custom field values"
|
4230 |
msgstr ""
|
4231 |
|
4232 |
+
#: includes/class-mla-settings-custom-fields-tab.php:1328
|
4233 |
+
#: includes/class-mla-settings-custom-fields-tab.php:1662
|
4234 |
+
#: includes/class-mla-settings-iptc-exif-tab.php:1406
|
4235 |
+
#: includes/class-mla-settings-iptc-exif-tab.php:1767
|
4236 |
msgid "Purge Values"
|
4237 |
msgstr ""
|
4238 |
|
4239 |
+
#: includes/class-mla-settings-custom-fields-tab.php:1679
|
4240 |
+
#: includes/class-mla-settings-iptc-exif-tab.php:1784
|
4241 |
+
#: includes/class-mla-settings-shortcodes-tab.php:1299
|
4242 |
msgid "Any Status"
|
4243 |
msgstr ""
|
4244 |
|
4245 |
+
#: includes/class-mla-settings-custom-fields-tab.php:2434
|
4246 |
msgctxt "table_view_singular"
|
4247 |
msgid "MLA Column"
|
4248 |
msgstr ""
|
4249 |
|
4250 |
+
#: includes/class-mla-settings-custom-fields-tab.php:2435
|
4251 |
msgctxt "table_view_plural"
|
4252 |
msgid "MLA Column"
|
4253 |
msgstr ""
|
4254 |
|
4255 |
+
#: includes/class-mla-settings-custom-fields-tab.php:2438
|
4256 |
msgctxt "table_view_singular"
|
4257 |
msgid "Quick Edit"
|
4258 |
msgstr ""
|
4259 |
|
4260 |
+
#: includes/class-mla-settings-custom-fields-tab.php:2439
|
4261 |
msgctxt "table_view_plural"
|
4262 |
msgid "Quick Edit"
|
4263 |
msgstr ""
|
4264 |
|
4265 |
+
#: includes/class-mla-settings-custom-fields-tab.php:2442
|
4266 |
msgctxt "table_view_singular"
|
4267 |
msgid "Bulk Edit"
|
4268 |
msgstr ""
|
4269 |
|
4270 |
+
#: includes/class-mla-settings-custom-fields-tab.php:2443
|
4271 |
msgctxt "table_view_plural"
|
4272 |
msgid "Bulk Edit"
|
4273 |
msgstr ""
|
4274 |
|
4275 |
+
#: includes/class-mla-settings-custom-fields-tab.php:2446
|
4276 |
+
#: includes/class-mla-settings-iptc-exif-tab.php:2680
|
4277 |
msgctxt "table_view_singular"
|
4278 |
msgid "Read Only"
|
4279 |
msgstr ""
|
4280 |
|
4281 |
+
#: includes/class-mla-settings-custom-fields-tab.php:2447
|
4282 |
+
#: includes/class-mla-settings-iptc-exif-tab.php:2681
|
4283 |
msgctxt "table_view_plural"
|
4284 |
msgid "Read Only"
|
4285 |
msgstr ""
|
4286 |
|
4287 |
#: includes/class-mla-settings-documentation-tab.php:82
|
4288 |
+
#: includes/class-mla-settings-documentation-tab.php:944
|
4289 |
+
#: includes/class-mla-settings-documentation-tab.php:1029
|
4290 |
+
#: includes/class-mla-settings-documentation-tab.php:1059
|
4291 |
#, php-format
|
4292 |
msgid "Example plugin \"%1$s\" not found"
|
4293 |
msgstr ""
|
4358 |
msgid "Empty mla_item_ID - \"%1$s\""
|
4359 |
msgstr ""
|
4360 |
|
4361 |
+
#: includes/class-mla-settings-documentation-tab.php:500
|
4362 |
msgctxt "list_table_column"
|
4363 |
msgid "Current Version"
|
4364 |
msgstr ""
|
4365 |
|
4366 |
+
#: includes/class-mla-settings-documentation-tab.php:501
|
4367 |
msgctxt "list_table_column"
|
4368 |
msgid "Installed Version"
|
4369 |
msgstr ""
|
4370 |
|
4371 |
+
#: includes/class-mla-settings-documentation-tab.php:503
|
4372 |
msgctxt "list_table_column"
|
4373 |
msgid "File Name"
|
4374 |
msgstr ""
|
4375 |
|
4376 |
+
#: includes/class-mla-settings-documentation-tab.php:504
|
4377 |
msgctxt "list_table_column"
|
4378 |
msgid "Tags"
|
4379 |
msgstr ""
|
4380 |
|
4381 |
+
#: includes/class-mla-settings-documentation-tab.php:640
|
4382 |
msgid "Install this plugin"
|
4383 |
msgstr ""
|
4384 |
|
4385 |
+
#: includes/class-mla-settings-documentation-tab.php:640
|
4386 |
+
#: includes/class-mla-settings-documentation-tab.php:851
|
4387 |
msgid "Install"
|
4388 |
msgstr ""
|
4389 |
|
4390 |
+
#: includes/class-mla-settings-documentation-tab.php:644
|
4391 |
msgid "Update this plugin"
|
4392 |
msgstr ""
|
4393 |
|
4394 |
+
#: includes/class-mla-settings-documentation-tab.php:657
|
4395 |
+
#: includes/class-mla-settings-shortcodes-tab.php:1069
|
4396 |
msgid "View this item"
|
4397 |
msgstr ""
|
4398 |
|
4399 |
+
#: includes/class-mla-settings-documentation-tab.php:967
|
4400 |
#, php-format
|
4401 |
msgid "Example plugin \"%1$s\" fs_connect failed; no action taken. Error: %2$s"
|
4402 |
msgstr ""
|
4403 |
|
4404 |
+
#: includes/class-mla-settings-documentation-tab.php:972
|
4405 |
#, php-format
|
4406 |
msgid "Example plugin \"%1$s\" fs_connect failed; no action taken"
|
4407 |
msgstr ""
|
4408 |
|
4409 |
+
#: includes/class-mla-settings-documentation-tab.php:997
|
4410 |
#, php-format
|
4411 |
msgid ""
|
4412 |
"Example plugin \"%1$s\" install_package failed; no action taken. Error: %2$s"
|
4413 |
msgstr ""
|
4414 |
|
4415 |
+
#: includes/class-mla-settings-documentation-tab.php:1008
|
4416 |
#, php-format
|
4417 |
msgid "Example plugin \"%1$s\" remove old single file failed."
|
4418 |
msgstr ""
|
4419 |
|
4420 |
+
#: includes/class-mla-settings-documentation-tab.php:1034
|
4421 |
#, php-format
|
4422 |
msgid "Example plugin \"%1$s\" already installed; no action taken"
|
4423 |
msgstr ""
|
4424 |
|
4425 |
+
#: includes/class-mla-settings-documentation-tab.php:1040
|
4426 |
#, php-format
|
4427 |
msgid "Example plugin \"%1$s\" installed"
|
4428 |
msgstr ""
|
4429 |
|
4430 |
+
#: includes/class-mla-settings-documentation-tab.php:1064
|
4431 |
#, php-format
|
4432 |
msgid "Example plugin \"%1$s\" not installed; no action taken"
|
4433 |
msgstr ""
|
4434 |
|
4435 |
+
#: includes/class-mla-settings-documentation-tab.php:1070
|
4436 |
#, php-format
|
4437 |
msgid "Example plugin \"%1$s\" updated"
|
4438 |
msgstr ""
|
4439 |
|
4440 |
+
#: includes/class-mla-settings-documentation-tab.php:1215
|
4441 |
msgid "Network"
|
4442 |
msgstr ""
|
4443 |
|
4444 |
+
#: includes/class-mla-settings-documentation-tab.php:1548
|
4445 |
msgctxt "table_view_singular"
|
4446 |
msgid "Installed"
|
4447 |
msgstr ""
|
4448 |
|
4449 |
+
#: includes/class-mla-settings-documentation-tab.php:1549
|
4450 |
msgctxt "table_view_plural"
|
4451 |
msgid "Installed"
|
4452 |
msgstr ""
|
4453 |
|
4454 |
+
#: includes/class-mla-settings-documentation-tab.php:1560
|
4455 |
msgctxt "table_view_singular"
|
4456 |
msgid "Network"
|
4457 |
msgstr ""
|
4458 |
|
4459 |
+
#: includes/class-mla-settings-documentation-tab.php:1561
|
4460 |
msgctxt "table_view_plural"
|
4461 |
msgid "Network"
|
4462 |
msgstr ""
|
4463 |
|
4464 |
+
#: includes/class-mla-settings-documentation-tab.php:1564
|
4465 |
msgctxt "table_view_singular"
|
4466 |
msgid "Uninstalled"
|
4467 |
msgstr ""
|
4468 |
|
4469 |
+
#: includes/class-mla-settings-documentation-tab.php:1565
|
4470 |
msgctxt "table_view_plural"
|
4471 |
msgid "Uninstalled"
|
4472 |
msgstr ""
|
4516 |
"WordPress standard attachment fields, taxonomy terms and custom fields."
|
4517 |
msgstr ""
|
4518 |
|
4519 |
+
#: includes/class-mla-settings-iptc-exif-tab.php:1255
|
4520 |
msgctxt "list_table_column"
|
4521 |
msgid "IPTC Value"
|
4522 |
msgstr ""
|
4523 |
|
4524 |
+
#: includes/class-mla-settings-iptc-exif-tab.php:1256
|
4525 |
msgctxt "list_table_column"
|
4526 |
msgid "EXIF/Template Value"
|
4527 |
msgstr ""
|
4528 |
|
4529 |
+
#: includes/class-mla-settings-iptc-exif-tab.php:1257
|
4530 |
msgctxt "list_table_column"
|
4531 |
msgid "Priority "
|
4532 |
msgstr ""
|
4533 |
|
4534 |
+
#: includes/class-mla-settings-iptc-exif-tab.php:1260
|
4535 |
msgctxt "list_table_column"
|
4536 |
msgid "Delimiter(s)"
|
4537 |
msgstr ""
|
4538 |
|
4539 |
+
#: includes/class-mla-settings-iptc-exif-tab.php:1261
|
4540 |
msgctxt "list_table_column"
|
4541 |
msgid "Parent"
|
4542 |
msgstr ""
|
4543 |
|
4544 |
+
#: includes/class-mla-settings-iptc-exif-tab.php:1406
|
4545 |
msgid "Purge IPTC EXIF values"
|
4546 |
msgstr ""
|
4547 |
|
4548 |
+
#: includes/class-mla-settings-iptc-exif-tab.php:2668
|
4549 |
msgctxt "table_view_singular"
|
4550 |
msgid "Standard"
|
4551 |
msgstr ""
|
4552 |
|
4553 |
+
#: includes/class-mla-settings-iptc-exif-tab.php:2669
|
4554 |
msgctxt "table_view_plural"
|
4555 |
msgid "Standard"
|
4556 |
msgstr ""
|
4557 |
|
4558 |
+
#: includes/class-mla-settings-iptc-exif-tab.php:2672
|
4559 |
msgctxt "table_view_singular"
|
4560 |
msgid "Taxonomy"
|
4561 |
msgstr ""
|
4562 |
|
4563 |
+
#: includes/class-mla-settings-iptc-exif-tab.php:2673
|
4564 |
msgctxt "table_view_plural"
|
4565 |
msgid "Taxonomy"
|
4566 |
msgstr ""
|
4695 |
|
4696 |
#: includes/class-mla-settings-shortcodes-tab.php:410
|
4697 |
#: includes/class-mla-settings-shortcodes-tab.php:482
|
4698 |
+
#: includes/class-mla-settings-shortcodes-tab.php:1074
|
4699 |
+
#: includes/class-mla-settings-shortcodes-tab.php:1283
|
4700 |
msgid "Copy"
|
4701 |
msgstr ""
|
4702 |
|
4729 |
msgstr ""
|
4730 |
|
4731 |
#: includes/class-mla-settings-shortcodes-tab.php:663
|
4732 |
+
#: includes/class-mla-wpml-support.php:1708
|
4733 |
+
#: includes/class-mla-wpml-support.php:1710
|
4734 |
msgid "WARNING:"
|
4735 |
msgstr ""
|
4736 |
|
4774 |
msgid "Search Templates"
|
4775 |
msgstr ""
|
4776 |
|
4777 |
+
#: includes/class-mla-settings-shortcodes-tab.php:951
|
4778 |
msgctxt "list_table_column"
|
4779 |
msgid "Type"
|
4780 |
msgstr ""
|
4781 |
|
4782 |
+
#: includes/class-mla-settings-shortcodes-tab.php:952
|
4783 |
msgctxt "list_table_column"
|
4784 |
msgid "Shortcode"
|
4785 |
msgstr ""
|
4786 |
|
4787 |
+
#: includes/class-mla-settings-shortcodes-tab.php:1074
|
4788 |
msgid "Make a copy"
|
4789 |
msgstr ""
|
4790 |
|
4791 |
+
#: includes/class-mla-settings-shortcodes-tab.php:1094
|
4792 |
msgid "default"
|
4793 |
msgstr ""
|
4794 |
|
4795 |
+
#: includes/class-mla-settings-shortcodes-tab.php:1107
|
4796 |
+
#: includes/class-mla-settings-shortcodes-tab.php:1974
|
4797 |
msgctxt "table_view_singular"
|
4798 |
msgid "Style"
|
4799 |
msgstr ""
|
4800 |
|
4801 |
+
#: includes/class-mla-settings-shortcodes-tab.php:1107
|
4802 |
+
#: includes/class-mla-settings-shortcodes-tab.php:1978
|
4803 |
msgctxt "table_view_singular"
|
4804 |
msgid "Markup"
|
4805 |
msgstr ""
|
4806 |
|
4807 |
+
#: includes/class-mla-settings-shortcodes-tab.php:1282
|
4808 |
+
#: includes/class-mla-thumbnail-generation.php:634
|
4809 |
msgid "Delete"
|
4810 |
msgstr ""
|
4811 |
|
4812 |
+
#: includes/class-mla-settings-shortcodes-tab.php:1302
|
4813 |
msgid "Default"
|
4814 |
msgstr ""
|
4815 |
|
4816 |
+
#: includes/class-mla-settings-shortcodes-tab.php:1305
|
4817 |
msgid "Custom"
|
4818 |
msgstr ""
|
4819 |
|
4820 |
+
#: includes/class-mla-settings-shortcodes-tab.php:1975
|
4821 |
msgctxt "table_view_plural"
|
4822 |
msgid "Style"
|
4823 |
msgstr ""
|
4824 |
|
4825 |
+
#: includes/class-mla-settings-shortcodes-tab.php:1979
|
4826 |
msgctxt "table_view_plural"
|
4827 |
msgid "Markup"
|
4828 |
msgstr ""
|
4829 |
|
4830 |
+
#: includes/class-mla-settings-shortcodes-tab.php:1982
|
4831 |
#: includes/class-mla-template-support.php:70
|
4832 |
#: includes/class-mla-template-support.php:126
|
4833 |
msgctxt "table_view_singular"
|
4834 |
msgid "Gallery"
|
4835 |
msgstr ""
|
4836 |
|
4837 |
+
#: includes/class-mla-settings-shortcodes-tab.php:1983
|
4838 |
msgctxt "table_view_plural"
|
4839 |
msgid "Gallery"
|
4840 |
msgstr ""
|
4841 |
|
4842 |
+
#: includes/class-mla-settings-shortcodes-tab.php:1986
|
4843 |
#: includes/class-mla-template-support.php:88
|
4844 |
#: includes/class-mla-template-support.php:174
|
4845 |
msgctxt "table_view_singular"
|
4846 |
msgid "Tag Cloud"
|
4847 |
msgstr ""
|
4848 |
|
4849 |
+
#: includes/class-mla-settings-shortcodes-tab.php:1987
|
4850 |
msgctxt "table_view_plural"
|
4851 |
msgid "Tag Cloud"
|
4852 |
msgstr ""
|
4853 |
|
4854 |
+
#: includes/class-mla-settings-shortcodes-tab.php:1990
|
4855 |
#: includes/class-mla-template-support.php:106
|
4856 |
#: includes/class-mla-template-support.php:222
|
4857 |
msgctxt "table_view_singular"
|
4858 |
msgid "Term List"
|
4859 |
msgstr ""
|
4860 |
|
4861 |
+
#: includes/class-mla-settings-shortcodes-tab.php:1991
|
4862 |
msgctxt "table_view_plural"
|
4863 |
msgid "Term List"
|
4864 |
msgstr ""
|
5015 |
msgid "Revert to Standard"
|
5016 |
msgstr ""
|
5017 |
|
5018 |
+
#: includes/class-mla-settings-upload-tab.php:1213
|
5019 |
msgid "Delete/Revert Custom"
|
5020 |
msgstr ""
|
5021 |
|
5022 |
+
#: includes/class-mla-settings-upload-tab.php:1469
|
5023 |
msgid "Select this entry"
|
5024 |
msgstr ""
|
5025 |
|
5026 |
+
#: includes/class-mla-settings-upload-tab.php:1589
|
5027 |
msgid "Select these entries"
|
5028 |
msgstr ""
|
5029 |
|
5459 |
msgstr ""
|
5460 |
|
5461 |
#: includes/class-mla-shortcode-support.php:439
|
5462 |
+
#: includes/class-mla-shortcode-support.php:1795
|
5463 |
+
#: includes/class-mla-shortcode-support.php:3879
|
5464 |
+
#: includes/class-mla-shortcode-support.php:4166
|
5465 |
msgid "Previous"
|
5466 |
msgstr ""
|
5467 |
|
5468 |
#: includes/class-mla-shortcode-support.php:440
|
5469 |
+
#: includes/class-mla-shortcode-support.php:1796
|
5470 |
+
#: includes/class-mla-shortcode-support.php:3928
|
5471 |
+
#: includes/class-mla-shortcode-support.php:4172
|
5472 |
msgid "Next"
|
5473 |
msgstr ""
|
5474 |
|
5475 |
#: includes/class-mla-shortcode-support.php:515
|
5476 |
#: includes/class-mla-shortcode-support.php:521
|
5477 |
+
#: includes/class-mla-shortcode-support.php:1940
|
5478 |
+
#: includes/class-mla-shortcode-support.php:1947
|
5479 |
+
#: includes/class-mla-shortcode-support.php:3299
|
5480 |
+
#: includes/class-mla-shortcode-support.php:3306
|
5481 |
#: includes/class-mla-template-support.php:598
|
5482 |
msgid "not found"
|
5483 |
msgstr ""
|
5484 |
|
5485 |
#: includes/class-mla-shortcode-support.php:546
|
5486 |
+
#: includes/class-mla-shortcode-support.php:1930
|
5487 |
+
#: includes/class-mla-shortcode-support.php:3291
|
5488 |
msgid "mla_debug REQUEST"
|
5489 |
msgstr ""
|
5490 |
|
5491 |
#: includes/class-mla-shortcode-support.php:547
|
5492 |
+
#: includes/class-mla-shortcode-support.php:1931
|
5493 |
+
#: includes/class-mla-shortcode-support.php:3292
|
5494 |
msgid "mla_debug attributes"
|
5495 |
msgstr ""
|
5496 |
|
5497 |
#: includes/class-mla-shortcode-support.php:548
|
5498 |
+
#: includes/class-mla-shortcode-support.php:1932
|
5499 |
+
#: includes/class-mla-shortcode-support.php:3293
|
5500 |
msgid "mla_debug arguments"
|
5501 |
msgstr ""
|
5502 |
|
5510 |
"<strong>default</strong>, query = "
|
5511 |
msgstr ""
|
5512 |
|
5513 |
+
#: includes/class-mla-shortcode-support.php:1058
|
5514 |
msgid "unknown"
|
5515 |
msgstr ""
|
5516 |
|
5517 |
+
#: includes/class-mla-shortcode-support.php:2071
|
5518 |
msgid "mla_debug empty cloud"
|
5519 |
msgstr ""
|
5520 |
|
5521 |
+
#: includes/class-mla-shortcode-support.php:3427
|
5522 |
msgid "mla_debug empty list"
|
5523 |
msgstr ""
|
5524 |
|
5525 |
+
#: includes/class-mla-shortcode-support.php:3450
|
5526 |
msgid "no-terms"
|
5527 |
msgstr ""
|
5528 |
|
5529 |
+
#: includes/class-mla-shortcode-support.php:4595
|
5530 |
+
#: includes/class-mla-shortcode-support.php:4999
|
5531 |
+
#: includes/class-mla-shortcode-support.php:5036
|
5532 |
msgid "Invalid mla_gallery"
|
5533 |
msgstr ""
|
5534 |
|
5535 |
+
#: includes/class-mla-shortcode-support.php:5324
|
5536 |
msgid "mla_debug query"
|
5537 |
msgstr ""
|
5538 |
|
5539 |
+
#: includes/class-mla-shortcode-support.php:5325
|
5540 |
msgid "mla_debug request"
|
5541 |
msgstr ""
|
5542 |
|
5543 |
+
#: includes/class-mla-shortcode-support.php:5326
|
5544 |
msgid "mla_debug query_vars"
|
5545 |
msgstr ""
|
5546 |
|
5547 |
+
#: includes/class-mla-shortcode-support.php:5327
|
5548 |
msgid "mla_debug post_count"
|
5549 |
msgstr ""
|
5550 |
|
5551 |
+
#: includes/class-mla-shortcode-support.php:5395
|
5552 |
msgid "mla_debug WHERE filter"
|
5553 |
msgstr ""
|
5554 |
|
5555 |
+
#: includes/class-mla-shortcode-support.php:5419
|
5556 |
msgid "mla_debug modified WHERE filter"
|
5557 |
msgstr ""
|
5558 |
|
5559 |
+
#: includes/class-mla-shortcode-support.php:5442
|
5560 |
msgid "mla_debug ORDER BY filter, incoming"
|
5561 |
msgstr ""
|
5562 |
|
5563 |
+
#: includes/class-mla-shortcode-support.php:5442
|
5564 |
msgid "Replacement ORDER BY clause"
|
5565 |
msgstr ""
|
5566 |
|
5567 |
+
#: includes/class-mla-shortcode-support.php:5465
|
5568 |
msgid "mla_debug posts_clauses filter"
|
5569 |
msgstr ""
|
5570 |
|
5571 |
+
#: includes/class-mla-shortcode-support.php:5483
|
5572 |
msgid "mla_debug posts_clauses_request filter"
|
5573 |
msgstr ""
|
5574 |
|
5575 |
+
#: includes/class-mla-shortcode-support.php:5672
|
5576 |
msgid "Invalid taxonomy"
|
5577 |
msgstr ""
|
5578 |
|
5579 |
+
#: includes/class-mla-shortcode-support.php:5852
|
5580 |
msgid "mla_debug query arguments"
|
5581 |
msgstr ""
|
5582 |
|
5583 |
+
#: includes/class-mla-shortcode-support.php:5853
|
5584 |
msgid "mla_debug last_query"
|
5585 |
msgstr ""
|
5586 |
|
5587 |
+
#: includes/class-mla-shortcode-support.php:5854
|
5588 |
msgid "mla_debug last_error"
|
5589 |
msgstr ""
|
5590 |
|
5591 |
+
#: includes/class-mla-shortcode-support.php:5855
|
5592 |
msgid "mla_debug num_rows"
|
5593 |
msgstr ""
|
5594 |
|
5595 |
+
#: includes/class-mla-shortcode-support.php:5856
|
5596 |
msgid "mla_debug found_rows"
|
5597 |
msgstr ""
|
5598 |
|
5754 |
|
5755 |
#: includes/class-mla-thumbnail-generation.php:96
|
5756 |
#: includes/class-mla-thumbnail-generation.php:98
|
5757 |
+
#: includes/class-mla-thumbnail-generation.php:617
|
5758 |
msgid "Generate Thumbnails"
|
5759 |
msgstr ""
|
5760 |
|
5802 |
msgstr ""
|
5803 |
|
5804 |
#: includes/class-mla-thumbnail-generation.php:550
|
5805 |
+
#: includes/class-mla-thumbnail-generation.php:661
|
5806 |
msgid "Generated Thumbnails"
|
5807 |
msgstr ""
|
5808 |
|
5809 |
+
#: includes/class-mla-thumbnail-generation.php:607
|
5810 |
msgid ""
|
5811 |
"Type “WP” generates native WordPress thumbnails without creating "
|
5812 |
"a separate image item."
|
5813 |
msgstr ""
|
5814 |
|
5815 |
+
#: includes/class-mla-thumbnail-generation.php:618
|
5816 |
msgid ""
|
5817 |
"Pull down the Help menu and select Thumbnail Generation for setting details"
|
5818 |
msgstr ""
|
5819 |
|
5820 |
+
#: includes/class-mla-thumbnail-generation.php:619
|
5821 |
msgid "Width"
|
5822 |
msgstr ""
|
5823 |
|
5824 |
+
#: includes/class-mla-thumbnail-generation.php:620
|
5825 |
msgid "Height"
|
5826 |
msgstr ""
|
5827 |
|
5828 |
+
#: includes/class-mla-thumbnail-generation.php:621
|
5829 |
msgid "Best Fit"
|
5830 |
msgstr ""
|
5831 |
|
5832 |
+
#: includes/class-mla-thumbnail-generation.php:622
|
5833 |
msgid "Page"
|
5834 |
msgstr ""
|
5835 |
|
5836 |
+
#: includes/class-mla-thumbnail-generation.php:623
|
5837 |
msgid "Resolution"
|
5838 |
msgstr ""
|
5839 |
|
5840 |
+
#: includes/class-mla-thumbnail-generation.php:624
|
5841 |
msgid "Quality"
|
5842 |
msgstr ""
|
5843 |
|
5844 |
+
#: includes/class-mla-thumbnail-generation.php:630
|
5845 |
msgid "Existing Items"
|
5846 |
msgstr ""
|
5847 |
|
5848 |
+
#: includes/class-mla-thumbnail-generation.php:632
|
5849 |
msgid "Ignore"
|
5850 |
msgstr ""
|
5851 |
|
5852 |
+
#: includes/class-mla-thumbnail-generation.php:635
|
5853 |
msgid "Suffix"
|
5854 |
msgstr ""
|
5855 |
|
5856 |
+
#: includes/class-mla-wpml-support.php:418
|
5857 |
msgid "Duplicate translation created; update as desired."
|
5858 |
msgstr ""
|
5859 |
|
5860 |
+
#: includes/class-mla-wpml-support.php:1558
|
5861 |
msgid "Make media available in all languages"
|
5862 |
msgstr ""
|
5863 |
|
5864 |
+
#: includes/class-mla-wpml-support.php:1708
|
5865 |
msgid " WPML Media is not installed."
|
5866 |
msgstr ""
|
5867 |
|
5868 |
+
#: includes/class-mla-wpml-support.php:1710
|
5869 |
msgid " WPML Media is not active."
|
5870 |
msgstr ""
|
5871 |
|
5872 |
+
#: includes/class-mla-wpml-support.php:1716
|
5873 |
#, php-format
|
5874 |
msgid ""
|
5875 |
"In this tab you can find a number of options for controlling WPML-specific "
|
5877 |
"\"Save Changes\" at the bottom of the tab to save any changes you make."
|
5878 |
msgstr ""
|
5879 |
|
5880 |
+
#: includes/class-mla-wpml-support.php:2250
|
5881 |
+
#: includes/class-mla-wpml-support.php:2256
|
5882 |
#, php-format
|
5883 |
msgid "Edit the %s translation"
|
5884 |
msgstr ""
|
5885 |
|
5886 |
+
#: includes/class-mla-wpml-support.php:2262
|
5887 |
#, php-format
|
5888 |
msgid "Add translation to %s"
|
5889 |
msgstr ""
|
languages/media-library-assistant-en_US.po
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Media Library Assistant\n"
|
4 |
-
"POT-Creation-Date: 2017-
|
5 |
-
"PO-Revision-Date: 2017-
|
6 |
"Language-Team: David Lingren <david@fairtradejudaica.org>\n"
|
7 |
"MIME-Version: 1.0\n"
|
8 |
"Content-Type: text/plain; charset=UTF-8\n"
|
@@ -295,6 +295,14 @@ msgid ""
|
|
295 |
"Check/uncheck this option to show/omit the file name from the primary column."
|
296 |
msgstr ""
|
297 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
298 |
msgid "Bulk Chunk Size"
|
299 |
msgstr ""
|
300 |
|
@@ -1954,6 +1962,9 @@ msgstr ""
|
|
1954 |
msgid "Automatically add paragraphs"
|
1955 |
msgstr ""
|
1956 |
|
|
|
|
|
|
|
1957 |
msgid "error loading tpls/mla-option-templates.tpl"
|
1958 |
msgstr ""
|
1959 |
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Media Library Assistant\n"
|
4 |
+
"POT-Creation-Date: 2017-10-15 21:54-0700\n"
|
5 |
+
"PO-Revision-Date: 2017-10-15 21:55-0700\n"
|
6 |
"Language-Team: David Lingren <david@fairtradejudaica.org>\n"
|
7 |
"MIME-Version: 1.0\n"
|
8 |
"Content-Type: text/plain; charset=UTF-8\n"
|
295 |
"Check/uncheck this option to show/omit the file name from the primary column."
|
296 |
msgstr ""
|
297 |
|
298 |
+
msgid "QuickTags editor for bulk description"
|
299 |
+
msgstr ""
|
300 |
+
|
301 |
+
msgid ""
|
302 |
+
"Check this option to use the QuickTags editor for the Description field in "
|
303 |
+
"the Bulk Edit area."
|
304 |
+
msgstr ""
|
305 |
+
|
306 |
msgid "Bulk Chunk Size"
|
307 |
msgstr ""
|
308 |
|
1962 |
msgid "Automatically add paragraphs"
|
1963 |
msgstr ""
|
1964 |
|
1965 |
+
msgid "Add .textwidget div tags"
|
1966 |
+
msgstr ""
|
1967 |
+
|
1968 |
msgid "error loading tpls/mla-option-templates.tpl"
|
1969 |
msgstr ""
|
1970 |
|
languages/media-library-assistant-en_US.pot
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
msgid ""
|
3 |
msgstr ""
|
4 |
"Project-Id-Version: Media Library Assistant\n"
|
5 |
-
"POT-Creation-Date: 2017-
|
6 |
"PO-Revision-Date: 2015-08-21 21:38-0800\n"
|
7 |
"Last-Translator: David Lingren <david@fairtradejudaica.org>\n"
|
8 |
"Language-Team: David Lingren <david@fairtradejudaica.org>\n"
|
@@ -296,6 +296,14 @@ msgid ""
|
|
296 |
"Check/uncheck this option to show/omit the file name from the primary column."
|
297 |
msgstr ""
|
298 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
299 |
msgid "Bulk Chunk Size"
|
300 |
msgstr ""
|
301 |
|
@@ -1955,6 +1963,9 @@ msgstr ""
|
|
1955 |
msgid "Automatically add paragraphs"
|
1956 |
msgstr ""
|
1957 |
|
|
|
|
|
|
|
1958 |
msgid "error loading tpls/mla-option-templates.tpl"
|
1959 |
msgstr ""
|
1960 |
|
2 |
msgid ""
|
3 |
msgstr ""
|
4 |
"Project-Id-Version: Media Library Assistant\n"
|
5 |
+
"POT-Creation-Date: 2017-10-15 21:54-0700\n"
|
6 |
"PO-Revision-Date: 2015-08-21 21:38-0800\n"
|
7 |
"Last-Translator: David Lingren <david@fairtradejudaica.org>\n"
|
8 |
"Language-Team: David Lingren <david@fairtradejudaica.org>\n"
|
296 |
"Check/uncheck this option to show/omit the file name from the primary column."
|
297 |
msgstr ""
|
298 |
|
299 |
+
msgid "QuickTags editor for bulk description"
|
300 |
+
msgstr ""
|
301 |
+
|
302 |
+
msgid ""
|
303 |
+
"Check this option to use the QuickTags editor for the Description field in "
|
304 |
+
"the Bulk Edit area."
|
305 |
+
msgstr ""
|
306 |
+
|
307 |
msgid "Bulk Chunk Size"
|
308 |
msgstr ""
|
309 |
|
1963 |
msgid "Automatically add paragraphs"
|
1964 |
msgstr ""
|
1965 |
|
1966 |
+
msgid "Add .textwidget div tags"
|
1967 |
+
msgstr ""
|
1968 |
+
|
1969 |
msgid "error loading tpls/mla-option-templates.tpl"
|
1970 |
msgstr ""
|
1971 |
|
phpDocs/classes.svg
DELETED
@@ -1,586 +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.38.0 (20140413.2041)
|
5 |
-
-->
|
6 |
-
<!-- Title: G Pages: 1 -->
|
7 |
-
<svg width="882pt" height="4458pt"
|
8 |
-
viewBox="0.00 0.00 882.16 4458.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
9 |
-
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 4454)">
|
10 |
-
<title>G</title>
|
11 |
-
<polygon fill="white" stroke="none" points="-4,4 -4,-4454 878.161,-4454 878.161,4 -4,4"/>
|
12 |
-
<g id="clust1" class="cluster"><title>cluster_Global</title>
|
13 |
-
<path fill="none" stroke="gray" d="M309.074,-1022C309.074,-1022 854.161,-1022 854.161,-1022 860.161,-1022 866.161,-1028 866.161,-1034 866.161,-1034 866.161,-4430 866.161,-4430 866.161,-4436 860.161,-4442 854.161,-4442 854.161,-4442 309.074,-4442 309.074,-4442 303.074,-4442 297.074,-4436 297.074,-4430 297.074,-4430 297.074,-1034 297.074,-1034 297.074,-1028 303.074,-1022 309.074,-1022"/>
|
14 |
-
<text text-anchor="middle" x="581.618" y="-4429.2" font-family="Times New Roman,serif" font-size="11.00" fill="gray">Global</text>
|
15 |
-
</g>
|
16 |
-
<!-- \\MLATest -->
|
17 |
-
<g id="node1" class="node"><title>\\MLATest</title>
|
18 |
-
<polygon fill="none" stroke="black" points="750.161,-4414 686.161,-4414 686.161,-4378 750.161,-4378 750.161,-4414"/>
|
19 |
-
<text text-anchor="middle" x="718.161" y="-4393.2" font-family="Courier,monospace" font-size="11.00">MLATest</text>
|
20 |
-
</g>
|
21 |
-
<!-- \\MLASettings_View -->
|
22 |
-
<g id="node2" class="node"><title>\\MLASettings_View</title>
|
23 |
-
<polygon fill="none" stroke="black" points="780.661,-4360 655.661,-4360 655.661,-4324 780.661,-4324 780.661,-4360"/>
|
24 |
-
<text text-anchor="middle" x="718.161" y="-4339.2" font-family="Courier,monospace" font-size="11.00">MLASettings_View</text>
|
25 |
-
</g>
|
26 |
-
<!-- \\MLA_View_List_Table -->
|
27 |
-
<g id="node3" class="node"><title>\\MLA_View_List_Table</title>
|
28 |
-
<polygon fill="none" stroke="black" points="790.661,-4198 645.661,-4198 645.661,-4162 790.661,-4162 790.661,-4198"/>
|
29 |
-
<text text-anchor="middle" x="718.161" y="-4177.2" font-family="Courier,monospace" font-size="11.00">MLA_View_List_Table</text>
|
30 |
-
</g>
|
31 |
-
<!-- \\WP_List_Table -->
|
32 |
-
<g id="node65" class="node"><title>\\WP_List_Table</title>
|
33 |
-
<ellipse fill="none" stroke="black" cx="71.4937" cy="-302" rx="71.4873" ry="18"/>
|
34 |
-
<text text-anchor="middle" x="71.4937" y="-298.3" font-family="Times New Roman,serif" font-size="14.00" fill="gray">\WP_List_Table</text>
|
35 |
-
</g>
|
36 |
-
<!-- \\MLA_View_List_Table->\\WP_List_Table -->
|
37 |
-
<g id="edge1" class="edge"><title>\\MLA_View_List_Table->\\WP_List_Table</title>
|
38 |
-
<path fill="none" stroke="black" d="M645.442,-4187.96C567.677,-4192.66 443.698,-4188.21 361.574,-4126"/>
|
39 |
-
</g>
|
40 |
-
<!-- \\MLASettings_Upload -->
|
41 |
-
<g id="node4" class="node"><title>\\MLASettings_Upload</title>
|
42 |
-
<polygon fill="none" stroke="black" points="787.161,-4252 649.161,-4252 649.161,-4216 787.161,-4216 787.161,-4252"/>
|
43 |
-
<text text-anchor="middle" x="718.161" y="-4231.2" font-family="Courier,monospace" font-size="11.00">MLASettings_Upload</text>
|
44 |
-
</g>
|
45 |
-
<!-- \\MLA_Upload_List_Table -->
|
46 |
-
<g id="node5" class="node"><title>\\MLA_Upload_List_Table</title>
|
47 |
-
<polygon fill="none" stroke="black" points="797.161,-4144 639.161,-4144 639.161,-4108 797.161,-4108 797.161,-4144"/>
|
48 |
-
<text text-anchor="middle" x="718.161" y="-4123.2" font-family="Courier,monospace" font-size="11.00">MLA_Upload_List_Table</text>
|
49 |
-
</g>
|
50 |
-
<!-- \\MLA_Upload_List_Table->\\WP_List_Table -->
|
51 |
-
<g id="edge2" class="edge"><title>\\MLA_Upload_List_Table->\\WP_List_Table</title>
|
52 |
-
<path fill="none" stroke="black" d="M639.103,-4136.59C547.748,-4147.2 403.586,-4157.83 361.574,-4126"/>
|
53 |
-
</g>
|
54 |
-
<!-- \\MLA_Upload_Optional_List_Table -->
|
55 |
-
<g id="node6" class="node"><title>\\MLA_Upload_Optional_List_Table</title>
|
56 |
-
<polygon fill="none" stroke="black" points="827.661,-3874 608.661,-3874 608.661,-3838 827.661,-3838 827.661,-3874"/>
|
57 |
-
<text text-anchor="middle" x="718.161" y="-3853.2" font-family="Courier,monospace" font-size="11.00">MLA_Upload_Optional_List_Table</text>
|
58 |
-
</g>
|
59 |
-
<!-- \\MLA_Upload_Optional_List_Table->\\WP_List_Table -->
|
60 |
-
<g id="edge3" class="edge"><title>\\MLA_Upload_Optional_List_Table->\\WP_List_Table</title>
|
61 |
-
<path fill="none" stroke="black" d="M608.41,-3869.88C597.838,-3873.34 587.563,-3877.65 578.161,-3883 452.42,-3954.55 476.892,-4213.36 361.574,-4126"/>
|
62 |
-
<path fill="none" stroke="black" d="M359.574,-4126C198.474,-4003.96 84.6675,-671.878 73.4114,-330.213"/>
|
63 |
-
<polygon fill="none" stroke="black" points="76.9073,-330.029 73.081,-320.149 69.911,-330.258 76.9073,-330.029"/>
|
64 |
-
</g>
|
65 |
-
<!-- \\MLAData -->
|
66 |
-
<g id="node7" class="node"><title>\\MLAData</title>
|
67 |
-
<polygon fill="none" stroke="black" points="750.161,-4090 686.161,-4090 686.161,-4054 750.161,-4054 750.161,-4090"/>
|
68 |
-
<text text-anchor="middle" x="718.161" y="-4069.2" font-family="Courier,monospace" font-size="11.00">MLAData</text>
|
69 |
-
</g>
|
70 |
-
<!-- \\MLAShortcodes -->
|
71 |
-
<g id="node8" class="node"><title>\\MLAShortcodes</title>
|
72 |
-
<polygon fill="none" stroke="black" points="770.161,-4036 666.161,-4036 666.161,-4000 770.161,-4000 770.161,-4036"/>
|
73 |
-
<text text-anchor="middle" x="718.161" y="-4015.2" font-family="Courier,monospace" font-size="11.00">MLAShortcodes</text>
|
74 |
-
</g>
|
75 |
-
<!-- \\MLA_Ajax -->
|
76 |
-
<g id="node9" class="node"><title>\\MLA_Ajax</title>
|
77 |
-
<polygon fill="none" stroke="black" points="753.661,-3982 682.661,-3982 682.661,-3946 753.661,-3946 753.661,-3982"/>
|
78 |
-
<text text-anchor="middle" x="718.161" y="-3961.2" font-family="Courier,monospace" font-size="11.00">MLA_Ajax</text>
|
79 |
-
</g>
|
80 |
-
<!-- \\MLAOptions -->
|
81 |
-
<g id="node10" class="node"><title>\\MLAOptions</title>
|
82 |
-
<polygon fill="none" stroke="black" points="760.161,-3928 676.161,-3928 676.161,-3892 760.161,-3892 760.161,-3928"/>
|
83 |
-
<text text-anchor="middle" x="718.161" y="-3907.2" font-family="Courier,monospace" font-size="11.00">MLAOptions</text>
|
84 |
-
</g>
|
85 |
-
<!-- \\ACP_Addon_MLA_Editing_Strategy -->
|
86 |
-
<g id="node11" class="node"><title>\\ACP_Addon_MLA_Editing_Strategy</title>
|
87 |
-
<polygon fill="none" stroke="black" points="827.661,-3820 608.661,-3820 608.661,-3784 827.661,-3784 827.661,-3820"/>
|
88 |
-
<text text-anchor="middle" x="718.161" y="-3799.2" font-family="Courier,monospace" font-size="11.00">ACP_Addon_MLA_Editing_Strategy</text>
|
89 |
-
</g>
|
90 |
-
<!-- \\ACP_Editing_Strategy_Post -->
|
91 |
-
<g id="node66" class="node"><title>\\ACP_Editing_Strategy_Post</title>
|
92 |
-
<ellipse fill="none" stroke="black" cx="360.574" cy="-996" rx="117.779" ry="18"/>
|
93 |
-
<text text-anchor="middle" x="360.574" y="-992.3" font-family="Times New Roman,serif" font-size="14.00" fill="gray">\ACP_Editing_Strategy_Post</text>
|
94 |
-
</g>
|
95 |
-
<!-- \\ACP_Addon_MLA_Editing_Strategy->\\ACP_Editing_Strategy_Post -->
|
96 |
-
<g id="edge4" class="edge"><title>\\ACP_Addon_MLA_Editing_Strategy->\\ACP_Editing_Strategy_Post</title>
|
97 |
-
<path fill="none" stroke="black" d="M608.435,-3796.34C596.856,-3791.53 586.342,-3784.66 578.161,-3775 380.158,-3541.12 708.901,-1247.78 506.161,-1018 500.61,-1011.71 494.082,-1006.67 486.923,-1002.68"/>
|
98 |
-
<polygon fill="none" stroke="black" points="488.071,-999.345 477.543,-998.155 485.03,-1005.65 488.071,-999.345"/>
|
99 |
-
</g>
|
100 |
-
<!-- \\AC_Addon_MLA_ListScreen -->
|
101 |
-
<g id="node12" class="node"><title>\\AC_Addon_MLA_ListScreen</title>
|
102 |
-
<polygon fill="none" stroke="black" points="804.161,-3766 632.161,-3766 632.161,-3730 804.161,-3730 804.161,-3766"/>
|
103 |
-
<text text-anchor="middle" x="718.161" y="-3745.2" font-family="Courier,monospace" font-size="11.00">AC_Addon_MLA_ListScreen</text>
|
104 |
-
</g>
|
105 |
-
<!-- \\AC_ListScreen_Media -->
|
106 |
-
<g id="node67" class="node"><title>\\AC_ListScreen_Media</title>
|
107 |
-
<ellipse fill="none" stroke="black" cx="360.574" cy="-942" rx="96.6831" ry="18"/>
|
108 |
-
<text text-anchor="middle" x="360.574" y="-938.3" font-family="Times New Roman,serif" font-size="14.00" fill="gray">\AC_ListScreen_Media</text>
|
109 |
-
</g>
|
110 |
-
<!-- \\AC_Addon_MLA_ListScreen->\\AC_ListScreen_Media -->
|
111 |
-
<g id="edge5" class="edge"><title>\\AC_Addon_MLA_ListScreen->\\AC_ListScreen_Media</title>
|
112 |
-
<path fill="none" stroke="black" d="M632.03,-3749.3C611.523,-3745.28 591.663,-3736.95 578.161,-3721 380.511,-3487.55 704.656,-1201.73 506.161,-969 495.967,-957.047 482.321,-949.279 467.472,-944.376"/>
|
113 |
-
<polygon fill="none" stroke="black" points="468.141,-940.928 457.565,-941.553 466.222,-947.659 468.141,-940.928"/>
|
114 |
-
</g>
|
115 |
-
<!-- \\ACP_Addon_MLA_Editing_Model_Media_Title -->
|
116 |
-
<g id="node13" class="node"><title>\\ACP_Addon_MLA_Editing_Model_Media_Title</title>
|
117 |
-
<polygon fill="none" stroke="black" points="858.161,-3712 578.161,-3712 578.161,-3676 858.161,-3676 858.161,-3712"/>
|
118 |
-
<text text-anchor="middle" x="718.161" y="-3691.2" font-family="Courier,monospace" font-size="11.00">ACP_Addon_MLA_Editing_Model_Media_Title</text>
|
119 |
-
</g>
|
120 |
-
<!-- \\ACP_Editing_Model_Media_Title -->
|
121 |
-
<g id="node68" class="node"><title>\\ACP_Editing_Model_Media_Title</title>
|
122 |
-
<ellipse fill="none" stroke="black" cx="360.574" cy="-888" rx="137.576" ry="18"/>
|
123 |
-
<text text-anchor="middle" x="360.574" y="-884.3" font-family="Times New Roman,serif" font-size="14.00" fill="gray">\ACP_Editing_Model_Media_Title</text>
|
124 |
-
</g>
|
125 |
-
<!-- \\ACP_Addon_MLA_Editing_Model_Media_Title->\\ACP_Editing_Model_Media_Title -->
|
126 |
-
<g id="edge6" class="edge"><title>\\ACP_Addon_MLA_Editing_Model_Media_Title->\\ACP_Editing_Model_Media_Title</title>
|
127 |
-
<path fill="none" stroke="black" d="M587.26,-3675.91C583.991,-3673.24 580.941,-3670.28 578.161,-3667 380.511,-3433.55 704.656,-1147.73 506.161,-915 501.812,-909.9 496.834,-905.562 491.402,-901.883"/>
|
128 |
-
<polygon fill="none" stroke="black" points="492.908,-898.707 482.518,-896.63 489.345,-904.733 492.908,-898.707"/>
|
129 |
-
</g>
|
130 |
-
<!-- \\ACP_Addon_MLA_Column_Title -->
|
131 |
-
<g id="node14" class="node"><title>\\ACP_Addon_MLA_Column_Title</title>
|
132 |
-
<polygon fill="none" stroke="black" points="814.161,-3604 622.161,-3604 622.161,-3568 814.161,-3568 814.161,-3604"/>
|
133 |
-
<text text-anchor="middle" x="718.161" y="-3583.2" font-family="Courier,monospace" font-size="11.00">ACP_Addon_MLA_Column_Title</text>
|
134 |
-
</g>
|
135 |
-
<!-- \\AC_Column_Media_Title -->
|
136 |
-
<g id="node69" class="node"><title>\\AC_Column_Media_Title</title>
|
137 |
-
<ellipse fill="none" stroke="black" cx="360.574" cy="-780" rx="107.781" ry="18"/>
|
138 |
-
<text text-anchor="middle" x="360.574" y="-776.3" font-family="Times New Roman,serif" font-size="14.00" fill="gray">\AC_Column_Media_Title</text>
|
139 |
-
</g>
|
140 |
-
<!-- \\ACP_Addon_MLA_Column_Title->\\AC_Column_Media_Title -->
|
141 |
-
<g id="edge7" class="edge"><title>\\ACP_Addon_MLA_Column_Title->\\AC_Column_Media_Title</title>
|
142 |
-
<path fill="none" stroke="black" d="M621.976,-3584.95C605.154,-3580.33 589.44,-3572.32 578.161,-3559 380.511,-3325.55 704.656,-1039.73 506.161,-807 498.264,-797.741 488.297,-790.993 477.304,-786.143"/>
|
143 |
-
<polygon fill="none" stroke="black" points="478.441,-782.831 467.851,-782.502 475.924,-789.363 478.441,-782.831"/>
|
144 |
-
</g>
|
145 |
-
<!-- \\ACP_Column_EditingInterface -->
|
146 |
-
<g id="node70" class="node"><title>\\ACP_Column_EditingInterface</title>
|
147 |
-
<ellipse fill="none" stroke="black" cx="360.574" cy="-618" rx="126.978" ry="18"/>
|
148 |
-
<text text-anchor="middle" x="360.574" y="-614.3" font-family="Times New Roman,serif" font-size="14.00" fill="gray">\ACP_Column_EditingInterface</text>
|
149 |
-
</g>
|
150 |
-
<!-- \\ACP_Addon_MLA_Column_Title->\\ACP_Column_EditingInterface -->
|
151 |
-
<g id="edge8" class="edge"><title>\\ACP_Addon_MLA_Column_Title->\\ACP_Column_EditingInterface</title>
|
152 |
-
<path fill="none" stroke="black" stroke-dasharray="1,5" d="M621.961,-3584.96C605.14,-3580.34 589.43,-3572.33 578.161,-3559 369.063,-3311.67 716.154,-891.575 506.161,-645 500.806,-638.712 494.497,-633.582 487.559,-629.418"/>
|
153 |
-
<polygon fill="none" stroke="black" points="488.941,-626.19 478.459,-624.645 485.689,-632.389 488.941,-626.19"/>
|
154 |
-
</g>
|
155 |
-
<!-- \\ACP_Addon_MLA_Column_Parent -->
|
156 |
-
<g id="node15" class="node"><title>\\ACP_Addon_MLA_Column_Parent</title>
|
157 |
-
<polygon fill="none" stroke="black" points="817.661,-3658 618.661,-3658 618.661,-3622 817.661,-3622 817.661,-3658"/>
|
158 |
-
<text text-anchor="middle" x="718.161" y="-3637.2" font-family="Courier,monospace" font-size="11.00">ACP_Addon_MLA_Column_Parent</text>
|
159 |
-
</g>
|
160 |
-
<!-- \\AC_Column_Media_Parent -->
|
161 |
-
<g id="node71" class="node"><title>\\AC_Column_Media_Parent</title>
|
162 |
-
<ellipse fill="none" stroke="black" cx="360.574" cy="-834" rx="114.28" ry="18"/>
|
163 |
-
<text text-anchor="middle" x="360.574" y="-830.3" font-family="Times New Roman,serif" font-size="14.00" fill="gray">\AC_Column_Media_Parent</text>
|
164 |
-
</g>
|
165 |
-
<!-- \\ACP_Addon_MLA_Column_Parent->\\AC_Column_Media_Parent -->
|
166 |
-
<g id="edge9" class="edge"><title>\\ACP_Addon_MLA_Column_Parent->\\AC_Column_Media_Parent</title>
|
167 |
-
<path fill="none" stroke="black" d="M618.439,-3637.92C602.962,-3633.18 588.645,-3625.38 578.161,-3613 380.511,-3379.55 704.656,-1093.73 506.161,-861 499.255,-852.902 490.764,-846.725 481.389,-842.059"/>
|
168 |
-
<polygon fill="none" stroke="black" points="482.718,-838.82 472.152,-838.034 479.922,-845.237 482.718,-838.82"/>
|
169 |
-
</g>
|
170 |
-
<!-- \\ACP_Addon_MLA_Column_MenuOrder -->
|
171 |
-
<g id="node16" class="node"><title>\\ACP_Addon_MLA_Column_MenuOrder</title>
|
172 |
-
<polygon fill="none" stroke="black" points="827.661,-3550 608.661,-3550 608.661,-3514 827.661,-3514 827.661,-3550"/>
|
173 |
-
<text text-anchor="middle" x="718.161" y="-3529.2" font-family="Courier,monospace" font-size="11.00">ACP_Addon_MLA_Column_MenuOrder</text>
|
174 |
-
</g>
|
175 |
-
<!-- \\ACP_Addon_MLA_Column_MenuOrder->\\ACP_Column_EditingInterface -->
|
176 |
-
<g id="edge11" class="edge"><title>\\ACP_Addon_MLA_Column_MenuOrder->\\ACP_Column_EditingInterface</title>
|
177 |
-
<path fill="none" stroke="black" stroke-dasharray="1,5" d="M608.426,-3526.34C596.849,-3521.54 586.337,-3514.67 578.161,-3505 372.879,-3262.29 712.321,-886.96 506.161,-645 500.805,-638.713 494.494,-633.584 487.555,-629.42"/>
|
178 |
-
<polygon fill="none" stroke="black" points="488.937,-626.193 478.455,-624.648 485.686,-632.392 488.937,-626.193"/>
|
179 |
-
</g>
|
180 |
-
<!-- \\AC_Column -->
|
181 |
-
<g id="node72" class="node"><title>\\AC_Column</title>
|
182 |
-
<ellipse fill="none" stroke="black" cx="360.574" cy="-726" rx="59.5901" ry="18"/>
|
183 |
-
<text text-anchor="middle" x="360.574" y="-722.3" font-family="Times New Roman,serif" font-size="14.00" fill="gray">\AC_Column</text>
|
184 |
-
</g>
|
185 |
-
<!-- \\ACP_Addon_MLA_Column_MenuOrder->\\AC_Column -->
|
186 |
-
<g id="edge10" class="edge"><title>\\ACP_Addon_MLA_Column_MenuOrder->\\AC_Column</title>
|
187 |
-
<path fill="none" stroke="black" d="M608.435,-3526.34C596.857,-3521.53 586.342,-3514.66 578.161,-3505 380.511,-3271.55 704.656,-985.731 506.161,-753 487.271,-730.851 456.532,-723.074 428.244,-721.262"/>
|
188 |
-
<polygon fill="none" stroke="black" points="428.092,-717.753 417.96,-720.848 427.811,-724.747 428.092,-717.753"/>
|
189 |
-
</g>
|
190 |
-
<!-- \\ACP_Addon_MLA_Column_AltText -->
|
191 |
-
<g id="node17" class="node"><title>\\ACP_Addon_MLA_Column_AltText</title>
|
192 |
-
<polygon fill="none" stroke="black" points="821.161,-3496 615.161,-3496 615.161,-3460 821.161,-3460 821.161,-3496"/>
|
193 |
-
<text text-anchor="middle" x="718.161" y="-3475.2" font-family="Courier,monospace" font-size="11.00">ACP_Addon_MLA_Column_AltText</text>
|
194 |
-
</g>
|
195 |
-
<!-- \\ACP_Addon_MLA_Column_AltText->\\ACP_Column_EditingInterface -->
|
196 |
-
<g id="edge13" class="edge"><title>\\ACP_Addon_MLA_Column_AltText->\\ACP_Column_EditingInterface</title>
|
197 |
-
<path fill="none" stroke="black" stroke-dasharray="1,5" d="M614.938,-3474.79C600.811,-3469.97 587.848,-3462.45 578.161,-3451 376.695,-3212.92 708.489,-882.346 506.161,-645 500.803,-638.715 494.491,-633.586 487.552,-629.423"/>
|
198 |
-
<polygon fill="none" stroke="black" points="488.932,-626.195 478.451,-624.652 485.682,-632.395 488.932,-626.195"/>
|
199 |
-
</g>
|
200 |
-
<!-- \\ACP_Column_Media_AlternateText -->
|
201 |
-
<g id="node73" class="node"><title>\\ACP_Column_Media_AlternateText</title>
|
202 |
-
<ellipse fill="none" stroke="black" cx="360.574" cy="-672" rx="145.674" ry="18"/>
|
203 |
-
<text text-anchor="middle" x="360.574" y="-668.3" font-family="Times New Roman,serif" font-size="14.00" fill="gray">\ACP_Column_Media_AlternateText</text>
|
204 |
-
</g>
|
205 |
-
<!-- \\ACP_Addon_MLA_Column_AltText->\\ACP_Column_Media_AlternateText -->
|
206 |
-
<g id="edge12" class="edge"><title>\\ACP_Addon_MLA_Column_AltText->\\ACP_Column_Media_AlternateText</title>
|
207 |
-
<path fill="none" stroke="black" d="M614.943,-3474.79C600.815,-3469.97 587.851,-3462.44 578.161,-3451 380.511,-3217.55 704.656,-931.731 506.161,-699 502.329,-694.507 498.01,-690.605 493.322,-687.225"/>
|
208 |
-
<polygon fill="none" stroke="black" points="494.842,-684.046 484.513,-681.688 491.117,-689.973 494.842,-684.046"/>
|
209 |
-
</g>
|
210 |
-
<!-- \\ACP_Addon_MLA_Column_Caption -->
|
211 |
-
<g id="node18" class="node"><title>\\ACP_Addon_MLA_Column_Caption</title>
|
212 |
-
<polygon fill="none" stroke="black" points="821.161,-3442 615.161,-3442 615.161,-3406 821.161,-3406 821.161,-3442"/>
|
213 |
-
<text text-anchor="middle" x="718.161" y="-3421.2" font-family="Courier,monospace" font-size="11.00">ACP_Addon_MLA_Column_Caption</text>
|
214 |
-
</g>
|
215 |
-
<!-- \\ACP_Addon_MLA_Column_Caption->\\ACP_Column_EditingInterface -->
|
216 |
-
<g id="edge15" class="edge"><title>\\ACP_Addon_MLA_Column_Caption->\\ACP_Column_EditingInterface</title>
|
217 |
-
<path fill="none" stroke="black" stroke-dasharray="1,5" d="M614.943,-3420.79C600.815,-3415.97 587.851,-3408.44 578.161,-3397 380.511,-3163.55 704.656,-877.731 506.161,-645 500.802,-638.716 494.489,-633.589 487.548,-629.426"/>
|
218 |
-
<polygon fill="none" stroke="black" points="488.928,-626.198 478.446,-624.656 485.678,-632.398 488.928,-626.198"/>
|
219 |
-
</g>
|
220 |
-
<!-- \\ACP_Column_Media_Caption -->
|
221 |
-
<g id="node74" class="node"><title>\\ACP_Column_Media_Caption</title>
|
222 |
-
<ellipse fill="none" stroke="black" cx="360.574" cy="-564" rx="126.178" ry="18"/>
|
223 |
-
<text text-anchor="middle" x="360.574" y="-560.3" font-family="Times New Roman,serif" font-size="14.00" fill="gray">\ACP_Column_Media_Caption</text>
|
224 |
-
</g>
|
225 |
-
<!-- \\ACP_Addon_MLA_Column_Caption->\\ACP_Column_Media_Caption -->
|
226 |
-
<g id="edge14" class="edge"><title>\\ACP_Addon_MLA_Column_Caption->\\ACP_Column_Media_Caption</title>
|
227 |
-
<path fill="none" stroke="black" d="M614.938,-3420.79C600.811,-3415.97 587.848,-3408.45 578.161,-3397 376.695,-3158.92 708.489,-828.346 506.161,-591 500.803,-584.715 494.491,-579.586 487.552,-575.423"/>
|
228 |
-
<polygon fill="none" stroke="black" points="488.932,-572.195 478.451,-570.652 485.682,-578.395 488.932,-572.195"/>
|
229 |
-
</g>
|
230 |
-
<!-- \\ACP_Addon_MLA_Column_Description -->
|
231 |
-
<g id="node19" class="node"><title>\\ACP_Addon_MLA_Column_Description</title>
|
232 |
-
<polygon fill="none" stroke="black" points="834.661,-3388 601.661,-3388 601.661,-3352 834.661,-3352 834.661,-3388"/>
|
233 |
-
<text text-anchor="middle" x="718.161" y="-3367.2" font-family="Courier,monospace" font-size="11.00">ACP_Addon_MLA_Column_Description</text>
|
234 |
-
</g>
|
235 |
-
<!-- \\ACP_Addon_MLA_Column_Description->\\ACP_Column_EditingInterface -->
|
236 |
-
<g id="edge17" class="edge"><title>\\ACP_Addon_MLA_Column_Description->\\ACP_Column_EditingInterface</title>
|
237 |
-
<path fill="none" stroke="black" stroke-dasharray="1,5" d="M601.501,-3361.13C592.67,-3356.61 584.676,-3350.69 578.161,-3343 384.327,-3114.18 700.824,-873.117 506.161,-645 500.8,-638.717 494.486,-633.591 487.544,-629.43"/>
|
238 |
-
<polygon fill="none" stroke="black" points="488.923,-626.201 478.441,-624.66 485.675,-632.401 488.923,-626.201"/>
|
239 |
-
</g>
|
240 |
-
<!-- \\AC_Column_Media_Description -->
|
241 |
-
<g id="node75" class="node"><title>\\AC_Column_Media_Description</title>
|
242 |
-
<ellipse fill="none" stroke="black" cx="360.574" cy="-510" rx="133.776" ry="18"/>
|
243 |
-
<text text-anchor="middle" x="360.574" y="-506.3" font-family="Times New Roman,serif" font-size="14.00" fill="gray">\AC_Column_Media_Description</text>
|
244 |
-
</g>
|
245 |
-
<!-- \\ACP_Addon_MLA_Column_Description->\\AC_Column_Media_Description -->
|
246 |
-
<g id="edge16" class="edge"><title>\\ACP_Addon_MLA_Column_Description->\\AC_Column_Media_Description</title>
|
247 |
-
<path fill="none" stroke="black" d="M601.492,-3361.14C592.663,-3356.62 584.672,-3350.69 578.161,-3343 376.695,-3104.92 708.489,-774.346 506.161,-537 501.487,-531.516 496.086,-526.913 490.176,-523.064"/>
|
248 |
-
<polygon fill="none" stroke="black" points="491.6,-519.848 481.177,-517.948 488.141,-525.933 491.6,-519.848"/>
|
249 |
-
</g>
|
250 |
-
<!-- \\ACP_Addon_MLA_Column_MimeType -->
|
251 |
-
<g id="node20" class="node"><title>\\ACP_Addon_MLA_Column_MimeType</title>
|
252 |
-
<polygon fill="none" stroke="black" points="824.161,-3334 612.161,-3334 612.161,-3298 824.161,-3298 824.161,-3334"/>
|
253 |
-
<text text-anchor="middle" x="718.161" y="-3313.2" font-family="Courier,monospace" font-size="11.00">ACP_Addon_MLA_Column_MimeType</text>
|
254 |
-
</g>
|
255 |
-
<!-- \\ACP_Addon_MLA_Column_MimeType->\\ACP_Column_EditingInterface -->
|
256 |
-
<g id="edge19" class="edge"><title>\\ACP_Addon_MLA_Column_MimeType->\\ACP_Column_EditingInterface</title>
|
257 |
-
<path fill="none" stroke="black" stroke-dasharray="1,5" d="M611.847,-3311.67C598.929,-3306.83 587.142,-3299.6 578.161,-3289 388.142,-3064.81 696.991,-868.503 506.161,-645 500.798,-638.719 494.483,-633.594 487.54,-629.433"/>
|
258 |
-
<polygon fill="none" stroke="black" points="488.919,-626.204 478.436,-624.664 485.671,-632.405 488.919,-626.204"/>
|
259 |
-
</g>
|
260 |
-
<!-- \\AC_Column_Media_MimeType -->
|
261 |
-
<g id="node76" class="node"><title>\\AC_Column_Media_MimeType</title>
|
262 |
-
<ellipse fill="none" stroke="black" cx="360.574" cy="-456" rx="131.077" ry="18"/>
|
263 |
-
<text text-anchor="middle" x="360.574" y="-452.3" font-family="Times New Roman,serif" font-size="14.00" fill="gray">\AC_Column_Media_MimeType</text>
|
264 |
-
</g>
|
265 |
-
<!-- \\ACP_Addon_MLA_Column_MimeType->\\AC_Column_Media_MimeType -->
|
266 |
-
<g id="edge18" class="edge"><title>\\ACP_Addon_MLA_Column_MimeType->\\AC_Column_Media_MimeType</title>
|
267 |
-
<path fill="none" stroke="black" d="M611.831,-3311.68C598.916,-3306.84 587.134,-3299.6 578.161,-3289 376.695,-3050.92 708.489,-720.346 506.161,-483 501.207,-477.188 495.437,-472.366 489.11,-468.381"/>
|
268 |
-
<polygon fill="none" stroke="black" points="490.608,-465.211 480.16,-463.452 487.231,-471.342 490.608,-465.211"/>
|
269 |
-
</g>
|
270 |
-
<!-- \\ACP_Addon_MLA_Column_Date -->
|
271 |
-
<g id="node21" class="node"><title>\\ACP_Addon_MLA_Column_Date</title>
|
272 |
-
<polygon fill="none" stroke="black" points="810.661,-3172 625.661,-3172 625.661,-3136 810.661,-3136 810.661,-3172"/>
|
273 |
-
<text text-anchor="middle" x="718.161" y="-3151.2" font-family="Courier,monospace" font-size="11.00">ACP_Addon_MLA_Column_Date</text>
|
274 |
-
</g>
|
275 |
-
<!-- \\ACP_Column_Media_Date -->
|
276 |
-
<g id="node77" class="node"><title>\\ACP_Column_Media_Date</title>
|
277 |
-
<ellipse fill="none" stroke="black" cx="360.574" cy="-348" rx="113.98" ry="18"/>
|
278 |
-
<text text-anchor="middle" x="360.574" y="-344.3" font-family="Times New Roman,serif" font-size="14.00" fill="gray">\ACP_Column_Media_Date</text>
|
279 |
-
</g>
|
280 |
-
<!-- \\ACP_Addon_MLA_Column_Date->\\ACP_Column_Media_Date -->
|
281 |
-
<g id="edge20" class="edge"><title>\\ACP_Addon_MLA_Column_Date->\\ACP_Column_Media_Date</title>
|
282 |
-
<path fill="none" stroke="black" d="M625.545,-3153.87C607.389,-3149.43 590.234,-3141.26 578.161,-3127 380.511,-2893.55 704.656,-607.731 506.161,-375 499.192,-366.828 490.61,-360.613 481.133,-355.932"/>
|
283 |
-
<polygon fill="none" stroke="black" points="482.365,-352.651 471.797,-351.9 479.59,-359.078 482.365,-352.651"/>
|
284 |
-
</g>
|
285 |
-
<!-- \\ACP_Addon_MLA_Column_Author -->
|
286 |
-
<g id="node22" class="node"><title>\\ACP_Addon_MLA_Column_Author</title>
|
287 |
-
<polygon fill="none" stroke="black" points="817.661,-3280 618.661,-3280 618.661,-3244 817.661,-3244 817.661,-3280"/>
|
288 |
-
<text text-anchor="middle" x="718.161" y="-3259.2" font-family="Courier,monospace" font-size="11.00">ACP_Addon_MLA_Column_Author</text>
|
289 |
-
</g>
|
290 |
-
<!-- \\ACP_Addon_MLA_Column_Author->\\ACP_Column_EditingInterface -->
|
291 |
-
<g id="edge22" class="edge"><title>\\ACP_Addon_MLA_Column_Author->\\ACP_Column_EditingInterface</title>
|
292 |
-
<path fill="none" stroke="black" stroke-dasharray="1,5" d="M618.456,-3259.91C602.977,-3255.16 588.655,-3247.37 578.161,-3235 391.958,-3015.44 693.159,-863.888 506.161,-645 500.797,-638.72 494.48,-633.596 487.536,-629.437"/>
|
293 |
-
<polygon fill="none" stroke="black" points="488.914,-626.207 478.431,-624.668 485.666,-632.408 488.914,-626.207"/>
|
294 |
-
</g>
|
295 |
-
<!-- \\AC_Column_Media_Author -->
|
296 |
-
<g id="node78" class="node"><title>\\AC_Column_Media_Author</title>
|
297 |
-
<ellipse fill="none" stroke="black" cx="360.574" cy="-402" rx="116.979" ry="18"/>
|
298 |
-
<text text-anchor="middle" x="360.574" y="-398.3" font-family="Times New Roman,serif" font-size="14.00" fill="gray">\AC_Column_Media_Author</text>
|
299 |
-
</g>
|
300 |
-
<!-- \\ACP_Addon_MLA_Column_Author->\\AC_Column_Media_Author -->
|
301 |
-
<g id="edge21" class="edge"><title>\\ACP_Addon_MLA_Column_Author->\\AC_Column_Media_Author</title>
|
302 |
-
<path fill="none" stroke="black" d="M618.434,-3259.93C602.958,-3255.18 588.642,-3247.39 578.161,-3235 376.695,-2996.92 708.489,-666.346 506.161,-429 499.707,-421.428 491.867,-415.535 483.214,-410.986"/>
|
303 |
-
<polygon fill="none" stroke="black" points="484.474,-407.714 473.926,-406.718 481.551,-414.074 484.474,-407.714"/>
|
304 |
-
</g>
|
305 |
-
<!-- \\MLASettings_CustomFields -->
|
306 |
-
<g id="node23" class="node"><title>\\MLASettings_CustomFields</title>
|
307 |
-
<polygon fill="none" stroke="black" points="807.661,-3226 628.661,-3226 628.661,-3190 807.661,-3190 807.661,-3226"/>
|
308 |
-
<text text-anchor="middle" x="718.161" y="-3205.2" font-family="Courier,monospace" font-size="11.00">MLASettings_CustomFields</text>
|
309 |
-
</g>
|
310 |
-
<!-- \\MLA_Custom_Fields_List_Table -->
|
311 |
-
<g id="node24" class="node"><title>\\MLA_Custom_Fields_List_Table</title>
|
312 |
-
<polygon fill="none" stroke="black" points="821.161,-3010 615.161,-3010 615.161,-2974 821.161,-2974 821.161,-3010"/>
|
313 |
-
<text text-anchor="middle" x="718.161" y="-2989.2" font-family="Courier,monospace" font-size="11.00">MLA_Custom_Fields_List_Table</text>
|
314 |
-
</g>
|
315 |
-
<!-- \\MLA_Custom_Fields_List_Table->\\WP_List_Table -->
|
316 |
-
<g id="edge23" class="edge"><title>\\MLA_Custom_Fields_List_Table->\\WP_List_Table</title>
|
317 |
-
<path fill="none" stroke="black" d="M614.954,-2988.78C600.824,-2983.96 587.857,-2976.44 578.161,-2965 388.142,-2740.81 702.95,-539.274 506.161,-321 462.762,-272.862 410.417,-344.605 361.574,-302"/>
|
318 |
-
</g>
|
319 |
-
<!-- \\MLA_Custom_Field_Query -->
|
320 |
-
<g id="node25" class="node"><title>\\MLA_Custom_Field_Query</title>
|
321 |
-
<polygon fill="none" stroke="black" points="800.661,-3118 635.661,-3118 635.661,-3082 800.661,-3082 800.661,-3118"/>
|
322 |
-
<text text-anchor="middle" x="718.161" y="-3097.2" font-family="Courier,monospace" font-size="11.00">MLA_Custom_Field_Query</text>
|
323 |
-
</g>
|
324 |
-
<!-- \\MLASettings_Shortcodes -->
|
325 |
-
<g id="node26" class="node"><title>\\MLASettings_Shortcodes</title>
|
326 |
-
<polygon fill="none" stroke="black" points="800.661,-3064 635.661,-3064 635.661,-3028 800.661,-3028 800.661,-3064"/>
|
327 |
-
<text text-anchor="middle" x="718.161" y="-3043.2" font-family="Courier,monospace" font-size="11.00">MLASettings_Shortcodes</text>
|
328 |
-
</g>
|
329 |
-
<!-- \\MLA_Template_List_Table -->
|
330 |
-
<g id="node27" class="node"><title>\\MLA_Template_List_Table</title>
|
331 |
-
<polygon fill="none" stroke="black" points="804.161,-2848 632.161,-2848 632.161,-2812 804.161,-2812 804.161,-2848"/>
|
332 |
-
<text text-anchor="middle" x="718.161" y="-2827.2" font-family="Courier,monospace" font-size="11.00">MLA_Template_List_Table</text>
|
333 |
-
</g>
|
334 |
-
<!-- \\MLA_Template_List_Table->\\WP_List_Table -->
|
335 |
-
<g id="edge24" class="edge"><title>\\MLA_Template_List_Table->\\WP_List_Table</title>
|
336 |
-
<path fill="none" stroke="black" d="M359.574,-302C328.59,-274.973 218.3,-282.783 143.797,-291.752"/>
|
337 |
-
<polygon fill="none" stroke="black" points="143.029,-288.321 133.534,-293.022 143.888,-295.268 143.029,-288.321"/>
|
338 |
-
<path fill="none" stroke="black" d="M632.061,-2831.27C611.554,-2827.26 591.686,-2818.93 578.161,-2803 399.589,-2592.69 691.084,-525.746 506.161,-321 462.719,-272.901 410.417,-344.605 361.574,-302"/>
|
339 |
-
</g>
|
340 |
-
<!-- \\MLA_Template_Query -->
|
341 |
-
<g id="node28" class="node"><title>\\MLA_Template_Query</title>
|
342 |
-
<polygon fill="none" stroke="black" points="787.161,-2956 649.161,-2956 649.161,-2920 787.161,-2920 787.161,-2956"/>
|
343 |
-
<text text-anchor="middle" x="718.161" y="-2935.2" font-family="Courier,monospace" font-size="11.00">MLA_Template_Query</text>
|
344 |
-
</g>
|
345 |
-
<!-- \\MLACore -->
|
346 |
-
<g id="node29" class="node"><title>\\MLACore</title>
|
347 |
-
<polygon fill="none" stroke="black" points="750.161,-2902 686.161,-2902 686.161,-2866 750.161,-2866 750.161,-2902"/>
|
348 |
-
<text text-anchor="middle" x="718.161" y="-2881.2" font-family="Courier,monospace" font-size="11.00">MLACore</text>
|
349 |
-
</g>
|
350 |
-
<!-- \\MLA_Checklist_Walker -->
|
351 |
-
<g id="node30" class="node"><title>\\MLA_Checklist_Walker</title>
|
352 |
-
<polygon fill="none" stroke="black" points="794.161,-2740 642.161,-2740 642.161,-2704 794.161,-2704 794.161,-2740"/>
|
353 |
-
<text text-anchor="middle" x="718.161" y="-2719.2" font-family="Courier,monospace" font-size="11.00">MLA_Checklist_Walker</text>
|
354 |
-
</g>
|
355 |
-
<!-- \\Walker_Category -->
|
356 |
-
<g id="node79" class="node"><title>\\Walker_Category</title>
|
357 |
-
<ellipse fill="none" stroke="black" cx="360.574" cy="-256" rx="77.1866" ry="18"/>
|
358 |
-
<text text-anchor="middle" x="360.574" y="-252.3" font-family="Times New Roman,serif" font-size="14.00" fill="gray">\Walker_Category</text>
|
359 |
-
</g>
|
360 |
-
<!-- \\MLA_Checklist_Walker->\\Walker_Category -->
|
361 |
-
<g id="edge25" class="edge"><title>\\MLA_Checklist_Walker->\\Walker_Category</title>
|
362 |
-
<path fill="none" stroke="black" d="M641.867,-2724.87C618.035,-2721.7 593.842,-2713.45 578.161,-2695 404.889,-2491.12 676.774,-494.111 506.161,-288 491.667,-270.49 469.938,-261.257 447.7,-256.674"/>
|
363 |
-
<polygon fill="none" stroke="black" points="448.271,-253.221 437.816,-254.933 447.057,-260.115 448.271,-253.221"/>
|
364 |
-
</g>
|
365 |
-
<!-- \\MLASettings_Documentation -->
|
366 |
-
<g id="node31" class="node"><title>\\MLASettings_Documentation</title>
|
367 |
-
<polygon fill="none" stroke="black" points="810.661,-2794 625.661,-2794 625.661,-2758 810.661,-2758 810.661,-2794"/>
|
368 |
-
<text text-anchor="middle" x="718.161" y="-2773.2" font-family="Courier,monospace" font-size="11.00">MLASettings_Documentation</text>
|
369 |
-
</g>
|
370 |
-
<!-- \\MLA_Example_List_Table -->
|
371 |
-
<g id="node32" class="node"><title>\\MLA_Example_List_Table</title>
|
372 |
-
<polygon fill="none" stroke="black" points="800.661,-2686 635.661,-2686 635.661,-2650 800.661,-2650 800.661,-2686"/>
|
373 |
-
<text text-anchor="middle" x="718.161" y="-2665.2" font-family="Courier,monospace" font-size="11.00">MLA_Example_List_Table</text>
|
374 |
-
</g>
|
375 |
-
<!-- \\MLA_Example_List_Table->\\WP_List_Table -->
|
376 |
-
<g id="edge26" class="edge"><title>\\MLA_Example_List_Table->\\WP_List_Table</title>
|
377 |
-
<path fill="none" stroke="black" d="M635.331,-2669.87C613.684,-2666.11 592.409,-2657.77 578.161,-2641 404.535,-2436.69 698.558,-415.739 506.161,-229 459.73,-183.934 277.888,-213.826 214.987,-229 174.757,-238.705 133.124,-261.814 105.327,-279.452"/>
|
378 |
-
<polygon fill="none" stroke="black" points="103.304,-276.593 96.808,-284.963 107.105,-282.47 103.304,-276.593"/>
|
379 |
-
</g>
|
380 |
-
<!-- \\MLA_Upgrader_Skin -->
|
381 |
-
<g id="node33" class="node"><title>\\MLA_Upgrader_Skin</title>
|
382 |
-
<polygon fill="none" stroke="black" points="783.661,-2470 652.661,-2470 652.661,-2434 783.661,-2434 783.661,-2470"/>
|
383 |
-
<text text-anchor="middle" x="718.161" y="-2449.2" font-family="Courier,monospace" font-size="11.00">MLA_Upgrader_Skin</text>
|
384 |
-
</g>
|
385 |
-
<!-- \\WP_Upgrader_Skin -->
|
386 |
-
<g id="node80" class="node"><title>\\WP_Upgrader_Skin</title>
|
387 |
-
<ellipse fill="none" stroke="black" cx="360.574" cy="-164" rx="87.1846" ry="18"/>
|
388 |
-
<text text-anchor="middle" x="360.574" y="-160.3" font-family="Times New Roman,serif" font-size="14.00" fill="gray">\WP_Upgrader_Skin</text>
|
389 |
-
</g>
|
390 |
-
<!-- \\MLA_Upgrader_Skin->\\WP_Upgrader_Skin -->
|
391 |
-
<g id="edge27" class="edge"><title>\\MLA_Upgrader_Skin->\\WP_Upgrader_Skin</title>
|
392 |
-
<path fill="none" stroke="black" d="M652.364,-2455.93C625.37,-2453.88 596.176,-2446.15 578.161,-2425 417.465,-2236.37 664.397,-386.695 506.161,-196 493.789,-181.089 476.17,-172.185 457.467,-167.042"/>
|
393 |
-
<polygon fill="none" stroke="black" points="458.15,-163.606 447.61,-164.683 456.521,-170.414 458.15,-163.606"/>
|
394 |
-
</g>
|
395 |
-
<!-- \\MLAPDF -->
|
396 |
-
<g id="node34" class="node"><title>\\MLAPDF</title>
|
397 |
-
<polygon fill="none" stroke="black" points="746.661,-2632 689.661,-2632 689.661,-2596 746.661,-2596 746.661,-2632"/>
|
398 |
-
<text text-anchor="middle" x="718.161" y="-2611.2" font-family="Courier,monospace" font-size="11.00">MLAPDF</text>
|
399 |
-
</g>
|
400 |
-
<!-- \\MLAUninstall -->
|
401 |
-
<g id="node35" class="node"><title>\\MLAUninstall</title>
|
402 |
-
<polygon fill="none" stroke="black" points="767.161,-2578 669.161,-2578 669.161,-2542 767.161,-2542 767.161,-2578"/>
|
403 |
-
<text text-anchor="middle" x="718.161" y="-2557.2" font-family="Courier,monospace" font-size="11.00">MLAUninstall</text>
|
404 |
-
</g>
|
405 |
-
<!-- \\MLA_Thumbnail -->
|
406 |
-
<g id="node36" class="node"><title>\\MLA_Thumbnail</title>
|
407 |
-
<polygon fill="none" stroke="black" points="770.161,-2524 666.161,-2524 666.161,-2488 770.161,-2488 770.161,-2524"/>
|
408 |
-
<text text-anchor="middle" x="718.161" y="-2503.2" font-family="Courier,monospace" font-size="11.00">MLA_Thumbnail</text>
|
409 |
-
</g>
|
410 |
-
<!-- \\CPAC_Deprecated_Storage_Model_MLA -->
|
411 |
-
<g id="node37" class="node"><title>\\CPAC_Deprecated_Storage_Model_MLA</title>
|
412 |
-
<polygon fill="none" stroke="black" points="837.661,-2308 598.661,-2308 598.661,-2272 837.661,-2272 837.661,-2308"/>
|
413 |
-
<text text-anchor="middle" x="718.161" y="-2287.2" font-family="Courier,monospace" font-size="11.00">CPAC_Deprecated_Storage_Model_MLA</text>
|
414 |
-
</g>
|
415 |
-
<!-- \\CPAC_Storage_Model -->
|
416 |
-
<g id="node81" class="node"><title>\\CPAC_Storage_Model</title>
|
417 |
-
<ellipse fill="none" stroke="black" cx="360.574" cy="-110" rx="98.5829" ry="18"/>
|
418 |
-
<text text-anchor="middle" x="360.574" y="-106.3" font-family="Times New Roman,serif" font-size="14.00" fill="gray">\CPAC_Storage_Model</text>
|
419 |
-
</g>
|
420 |
-
<!-- \\CPAC_Deprecated_Storage_Model_MLA->\\CPAC_Storage_Model -->
|
421 |
-
<g id="edge28" class="edge"><title>\\CPAC_Deprecated_Storage_Model_MLA->\\CPAC_Storage_Model</title>
|
422 |
-
<path fill="none" stroke="black" d="M598.362,-2279.37C590.783,-2275.1 583.906,-2269.73 578.161,-2263 424.742,-2083.2 660.231,-316.242 506.161,-137 496.424,-125.671 483.586,-118.11 469.574,-113.187"/>
|
423 |
-
<polygon fill="none" stroke="black" points="470.295,-109.748 459.71,-110.185 468.258,-116.445 470.295,-109.748"/>
|
424 |
-
</g>
|
425 |
-
<!-- \\MLAReferences -->
|
426 |
-
<g id="node38" class="node"><title>\\MLAReferences</title>
|
427 |
-
<polygon fill="none" stroke="black" points="770.161,-2416 666.161,-2416 666.161,-2380 770.161,-2380 770.161,-2416"/>
|
428 |
-
<text text-anchor="middle" x="718.161" y="-2395.2" font-family="Courier,monospace" font-size="11.00">MLAReferences</text>
|
429 |
-
</g>
|
430 |
-
<!-- \\MLA_WPML -->
|
431 |
-
<g id="node39" class="node"><title>\\MLA_WPML</title>
|
432 |
-
<polygon fill="none" stroke="black" points="753.661,-2362 682.661,-2362 682.661,-2326 753.661,-2326 753.661,-2362"/>
|
433 |
-
<text text-anchor="middle" x="718.161" y="-2341.2" font-family="Courier,monospace" font-size="11.00">MLA_WPML</text>
|
434 |
-
</g>
|
435 |
-
<!-- \\MLA_WPML_List_Table -->
|
436 |
-
<g id="node40" class="node"><title>\\MLA_WPML_List_Table</title>
|
437 |
-
<polygon fill="none" stroke="black" points="790.661,-4306 645.661,-4306 645.661,-4270 790.661,-4270 790.661,-4306"/>
|
438 |
-
<text text-anchor="middle" x="718.161" y="-4285.2" font-family="Courier,monospace" font-size="11.00">MLA_WPML_List_Table</text>
|
439 |
-
</g>
|
440 |
-
<!-- \\MLA_List_Table -->
|
441 |
-
<g id="node43" class="node"><title>\\MLA_List_Table</title>
|
442 |
-
<polygon fill="none" stroke="black" points="416.074,-4248 305.074,-4248 305.074,-4212 416.074,-4212 416.074,-4248"/>
|
443 |
-
<text text-anchor="middle" x="360.574" y="-4227.2" font-family="Courier,monospace" font-size="11.00">MLA_List_Table</text>
|
444 |
-
</g>
|
445 |
-
<!-- \\MLA_WPML_List_Table->\\MLA_List_Table -->
|
446 |
-
<g id="edge29" class="edge"><title>\\MLA_WPML_List_Table->\\MLA_List_Table</title>
|
447 |
-
<path fill="none" stroke="black" d="M645.631,-4276.33C581.465,-4265.87 488.133,-4250.64 426.183,-4240.54"/>
|
448 |
-
<polygon fill="none" stroke="black" points="426.572,-4237.06 416.139,-4238.9 425.445,-4243.96 426.572,-4237.06"/>
|
449 |
-
</g>
|
450 |
-
<!-- \\MLA_WPML_Table -->
|
451 |
-
<g id="node41" class="node"><title>\\MLA_WPML_Table</title>
|
452 |
-
<polygon fill="none" stroke="black" points="773.661,-2254 662.661,-2254 662.661,-2218 773.661,-2218 773.661,-2254"/>
|
453 |
-
<text text-anchor="middle" x="718.161" y="-2233.2" font-family="Courier,monospace" font-size="11.00">MLA_WPML_Table</text>
|
454 |
-
</g>
|
455 |
-
<!-- \\MLA -->
|
456 |
-
<g id="node42" class="node"><title>\\MLA</title>
|
457 |
-
<polygon fill="none" stroke="black" points="745.161,-2200 691.161,-2200 691.161,-2164 745.161,-2164 745.161,-2200"/>
|
458 |
-
<text text-anchor="middle" x="718.161" y="-2179.2" font-family="Courier,monospace" font-size="11.00">MLA</text>
|
459 |
-
</g>
|
460 |
-
<!-- \\MLA_List_Table->\\WP_List_Table -->
|
461 |
-
<g id="edge30" class="edge"><title>\\MLA_List_Table->\\WP_List_Table</title>
|
462 |
-
<path fill="none" stroke="black" d="M306.988,-4211.99C274.417,-4197.84 235.088,-4174.66 214.987,-4140 113.484,-3964.99 76.358,-671.189 72.784,-330.419"/>
|
463 |
-
<polygon fill="none" stroke="black" points="76.2834,-330.334 72.6794,-320.371 69.2838,-330.407 76.2834,-330.334"/>
|
464 |
-
</g>
|
465 |
-
<!-- \\MLAModal_Ajax -->
|
466 |
-
<g id="node44" class="node"><title>\\MLAModal_Ajax</title>
|
467 |
-
<polygon fill="none" stroke="black" points="770.161,-2146 666.161,-2146 666.161,-2110 770.161,-2110 770.161,-2146"/>
|
468 |
-
<text text-anchor="middle" x="718.161" y="-2125.2" font-family="Courier,monospace" font-size="11.00">MLAModal_Ajax</text>
|
469 |
-
</g>
|
470 |
-
<!-- \\MLAModal -->
|
471 |
-
<g id="node45" class="node"><title>\\MLAModal</title>
|
472 |
-
<polygon fill="none" stroke="black" points="753.661,-2092 682.661,-2092 682.661,-2056 753.661,-2056 753.661,-2092"/>
|
473 |
-
<text text-anchor="middle" x="718.161" y="-2071.2" font-family="Courier,monospace" font-size="11.00">MLAModal</text>
|
474 |
-
</g>
|
475 |
-
<!-- \\MLACoreOptions -->
|
476 |
-
<g id="node46" class="node"><title>\\MLACoreOptions</title>
|
477 |
-
<polygon fill="none" stroke="black" points="773.661,-2038 662.661,-2038 662.661,-2002 773.661,-2002 773.661,-2038"/>
|
478 |
-
<text text-anchor="middle" x="718.161" y="-2017.2" font-family="Courier,monospace" font-size="11.00">MLACoreOptions</text>
|
479 |
-
</g>
|
480 |
-
<!-- \\MLA_Polylang -->
|
481 |
-
<g id="node47" class="node"><title>\\MLA_Polylang</title>
|
482 |
-
<polygon fill="none" stroke="black" points="767.161,-1984 669.161,-1984 669.161,-1948 767.161,-1948 767.161,-1984"/>
|
483 |
-
<text text-anchor="middle" x="718.161" y="-1963.2" font-family="Courier,monospace" font-size="11.00">MLA_Polylang</text>
|
484 |
-
</g>
|
485 |
-
<!-- \\MLAMime -->
|
486 |
-
<g id="node48" class="node"><title>\\MLAMime</title>
|
487 |
-
<polygon fill="none" stroke="black" points="750.161,-1930 686.161,-1930 686.161,-1894 750.161,-1894 750.161,-1930"/>
|
488 |
-
<text text-anchor="middle" x="718.161" y="-1909.2" font-family="Courier,monospace" font-size="11.00">MLAMime</text>
|
489 |
-
</g>
|
490 |
-
<!-- \\MLAFileDownloader -->
|
491 |
-
<g id="node49" class="node"><title>\\MLAFileDownloader</title>
|
492 |
-
<polygon fill="none" stroke="black" points="783.661,-1876 652.661,-1876 652.661,-1840 783.661,-1840 783.661,-1876"/>
|
493 |
-
<text text-anchor="middle" x="718.161" y="-1855.2" font-family="Courier,monospace" font-size="11.00">MLAFileDownloader</text>
|
494 |
-
</g>
|
495 |
-
<!-- \\MLAQuery -->
|
496 |
-
<g id="node50" class="node"><title>\\MLAQuery</title>
|
497 |
-
<polygon fill="none" stroke="black" points="753.661,-1822 682.661,-1822 682.661,-1786 753.661,-1786 753.661,-1822"/>
|
498 |
-
<text text-anchor="middle" x="718.161" y="-1801.2" font-family="Courier,monospace" font-size="11.00">MLAQuery</text>
|
499 |
-
</g>
|
500 |
-
<!-- \\MLAImageProcessor -->
|
501 |
-
<g id="node51" class="node"><title>\\MLAImageProcessor</title>
|
502 |
-
<polygon fill="none" stroke="black" points="783.661,-1768 652.661,-1768 652.661,-1732 783.661,-1732 783.661,-1768"/>
|
503 |
-
<text text-anchor="middle" x="718.161" y="-1747.2" font-family="Courier,monospace" font-size="11.00">MLAImageProcessor</text>
|
504 |
-
</g>
|
505 |
-
<!-- \\MLAMutex -->
|
506 |
-
<g id="node52" class="node"><title>\\MLAMutex</title>
|
507 |
-
<polygon fill="none" stroke="black" points="753.661,-1714 682.661,-1714 682.661,-1678 753.661,-1678 753.661,-1714"/>
|
508 |
-
<text text-anchor="middle" x="718.161" y="-1693.2" font-family="Courier,monospace" font-size="11.00">MLAMutex</text>
|
509 |
-
</g>
|
510 |
-
<!-- \\MLA_WPML_Shortcodes -->
|
511 |
-
<g id="node53" class="node"><title>\\MLA_WPML_Shortcodes</title>
|
512 |
-
<polygon fill="none" stroke="black" points="790.661,-1660 645.661,-1660 645.661,-1624 790.661,-1624 790.661,-1660"/>
|
513 |
-
<text text-anchor="middle" x="718.161" y="-1639.2" font-family="Courier,monospace" font-size="11.00">MLA_WPML_Shortcodes</text>
|
514 |
-
</g>
|
515 |
-
<!-- \\MLAEdit -->
|
516 |
-
<g id="node54" class="node"><title>\\MLAEdit</title>
|
517 |
-
<polygon fill="none" stroke="black" points="750.161,-1606 686.161,-1606 686.161,-1570 750.161,-1570 750.161,-1606"/>
|
518 |
-
<text text-anchor="middle" x="718.161" y="-1585.2" font-family="Courier,monospace" font-size="11.00">MLAEdit</text>
|
519 |
-
</g>
|
520 |
-
<!-- \\MLAData_Source -->
|
521 |
-
<g id="node55" class="node"><title>\\MLAData_Source</title>
|
522 |
-
<polygon fill="none" stroke="black" points="773.661,-1552 662.661,-1552 662.661,-1516 773.661,-1516 773.661,-1552"/>
|
523 |
-
<text text-anchor="middle" x="718.161" y="-1531.2" font-family="Courier,monospace" font-size="11.00">MLAData_Source</text>
|
524 |
-
</g>
|
525 |
-
<!-- \\MLA_Polylang_Shortcodes -->
|
526 |
-
<g id="node56" class="node"><title>\\MLA_Polylang_Shortcodes</title>
|
527 |
-
<polygon fill="none" stroke="black" points="804.161,-1498 632.161,-1498 632.161,-1462 804.161,-1462 804.161,-1498"/>
|
528 |
-
<text text-anchor="middle" x="718.161" y="-1477.2" font-family="Courier,monospace" font-size="11.00">MLA_Polylang_Shortcodes</text>
|
529 |
-
</g>
|
530 |
-
<!-- \\MLASettings -->
|
531 |
-
<g id="node57" class="node"><title>\\MLASettings</title>
|
532 |
-
<polygon fill="none" stroke="black" points="763.661,-1444 672.661,-1444 672.661,-1408 763.661,-1408 763.661,-1444"/>
|
533 |
-
<text text-anchor="middle" x="718.161" y="-1423.2" font-family="Courier,monospace" font-size="11.00">MLASettings</text>
|
534 |
-
</g>
|
535 |
-
<!-- \\MLAShortcode_Support -->
|
536 |
-
<g id="node58" class="node"><title>\\MLAShortcode_Support</title>
|
537 |
-
<polygon fill="none" stroke="black" points="794.161,-1390 642.161,-1390 642.161,-1354 794.161,-1354 794.161,-1390"/>
|
538 |
-
<text text-anchor="middle" x="718.161" y="-1369.2" font-family="Courier,monospace" font-size="11.00">MLAShortcode_Support</text>
|
539 |
-
</g>
|
540 |
-
<!-- \\MLASettings_IPTCEXIF -->
|
541 |
-
<g id="node59" class="node"><title>\\MLASettings_IPTCEXIF</title>
|
542 |
-
<polygon fill="none" stroke="black" points="794.161,-1336 642.161,-1336 642.161,-1300 794.161,-1300 794.161,-1336"/>
|
543 |
-
<text text-anchor="middle" x="718.161" y="-1315.2" font-family="Courier,monospace" font-size="11.00">MLASettings_IPTCEXIF</text>
|
544 |
-
</g>
|
545 |
-
<!-- \\MLA_IPTC_EXIF_List_Table -->
|
546 |
-
<g id="node60" class="node"><title>\\MLA_IPTC_EXIF_List_Table</title>
|
547 |
-
<polygon fill="none" stroke="black" points="807.661,-1282 628.661,-1282 628.661,-1246 807.661,-1246 807.661,-1282"/>
|
548 |
-
<text text-anchor="middle" x="718.161" y="-1261.2" font-family="Courier,monospace" font-size="11.00">MLA_IPTC_EXIF_List_Table</text>
|
549 |
-
</g>
|
550 |
-
<!-- \\MLA_IPTC_EXIF_List_Table->\\WP_List_Table -->
|
551 |
-
<g id="edge31" class="edge"><title>\\MLA_IPTC_EXIF_List_Table->\\WP_List_Table</title>
|
552 |
-
<path fill="none" stroke="black" d="M628.441,-1264.14C609.349,-1259.85 591.057,-1251.68 578.161,-1237 408.616,-1043.93 693.419,-258.938 506.161,-83 459.005,-38.6938 271.865,-52.1502 214.987,-83 139.048,-124.189 97.2335,-225.303 80.7994,-274.381"/>
|
553 |
-
<polygon fill="none" stroke="black" points="77.4279,-273.432 77.6746,-284.024 84.087,-275.59 77.4279,-273.432"/>
|
554 |
-
</g>
|
555 |
-
<!-- \\MLA_IPTC_EXIF_Query -->
|
556 |
-
<g id="node61" class="node"><title>\\MLA_IPTC_EXIF_Query</title>
|
557 |
-
<polygon fill="none" stroke="black" points="790.661,-1228 645.661,-1228 645.661,-1192 790.661,-1192 790.661,-1228"/>
|
558 |
-
<text text-anchor="middle" x="718.161" y="-1207.2" font-family="Courier,monospace" font-size="11.00">MLA_IPTC_EXIF_Query</text>
|
559 |
-
</g>
|
560 |
-
<!-- \\MLATemplate_Support -->
|
561 |
-
<g id="node62" class="node"><title>\\MLATemplate_Support</title>
|
562 |
-
<polygon fill="none" stroke="black" points="790.661,-1174 645.661,-1174 645.661,-1138 790.661,-1138 790.661,-1174"/>
|
563 |
-
<text text-anchor="middle" x="718.161" y="-1153.2" font-family="Courier,monospace" font-size="11.00">MLATemplate_Support</text>
|
564 |
-
</g>
|
565 |
-
<!-- \\MLAObjects -->
|
566 |
-
<g id="node63" class="node"><title>\\MLAObjects</title>
|
567 |
-
<polygon fill="none" stroke="black" points="760.161,-1120 676.161,-1120 676.161,-1084 760.161,-1084 760.161,-1120"/>
|
568 |
-
<text text-anchor="middle" x="718.161" y="-1099.2" font-family="Courier,monospace" font-size="11.00">MLAObjects</text>
|
569 |
-
</g>
|
570 |
-
<!-- \\MLATextWidget -->
|
571 |
-
<g id="node64" class="node"><title>\\MLATextWidget</title>
|
572 |
-
<polygon fill="none" stroke="black" points="770.161,-1066 666.161,-1066 666.161,-1030 770.161,-1030 770.161,-1066"/>
|
573 |
-
<text text-anchor="middle" x="718.161" y="-1045.2" font-family="Courier,monospace" font-size="11.00">MLATextWidget</text>
|
574 |
-
</g>
|
575 |
-
<!-- \\WP_Widget -->
|
576 |
-
<g id="node82" class="node"><title>\\WP_Widget</title>
|
577 |
-
<ellipse fill="none" stroke="black" cx="360.574" cy="-18" rx="58.4896" ry="18"/>
|
578 |
-
<text text-anchor="middle" x="360.574" y="-14.3" font-family="Times New Roman,serif" font-size="14.00" fill="gray">\WP_Widget</text>
|
579 |
-
</g>
|
580 |
-
<!-- \\MLATextWidget->\\WP_Widget -->
|
581 |
-
<g id="edge32" class="edge"><title>\\MLATextWidget->\\WP_Widget</title>
|
582 |
-
<path fill="none" stroke="black" d="M715.93,-1029.63C707.279,-906.1 651.668,-196.889 506.161,-50 486.187,-29.8361 456.552,-21.1121 429.303,-17.7113"/>
|
583 |
-
<polygon fill="none" stroke="black" points="429.306,-14.1933 419.001,-16.6557 428.592,-21.1569 429.306,-14.1933"/>
|
584 |
-
</g>
|
585 |
-
</g>
|
586 |
-
</svg>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
phpDocs/classes/ACP_Addon_MLA_Column_AltText.html
DELETED
@@ -1,239 +0,0 @@
|
|
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 » \ACP_Addon_MLA_Column_AltText
|
7 |
-
</title>
|
8 |
-
<meta name="author" content=""/>
|
9 |
-
<meta name="description" content=""/>
|
10 |
-
|
11 |
-
<link href="../css/template.css" rel="stylesheet" media="all"/>
|
12 |
-
|
13 |
-
<!--[if lt IE 9]>
|
14 |
-
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
|
15 |
-
<![endif]-->
|
16 |
-
<script src="../js/jquery-1.7.1.min.js" type="text/javascript"></script>
|
17 |
-
<script src="../js/jquery-ui-1.8.2.custom.min.js" type="text/javascript"></script>
|
18 |
-
<script src="../js/jquery.mousewheel.min.js" type="text/javascript"></script>
|
19 |
-
<script src="../js/bootstrap.js" type="text/javascript"></script>
|
20 |
-
<script src="../js/template.js" type="text/javascript"></script>
|
21 |
-
<script src="../js/prettify/prettify.min.js" type="text/javascript"></script>
|
22 |
-
|
23 |
-
<link rel="shortcut icon" href="../img/favicon.ico"/>
|
24 |
-
<link rel="apple-touch-icon" href="../img/apple-touch-icon.png"/>
|
25 |
-
<link rel="apple-touch-icon" sizes="72x72" href="../img/apple-touch-icon-72x72.png"/>
|
26 |
-
<link rel="apple-touch-icon" sizes="114x114" href="../img/apple-touch-icon-114x114.png"/>
|
27 |
-
</head>
|
28 |
-
<body>
|
29 |
-
|
30 |
-
<div class="navbar navbar-fixed-top">
|
31 |
-
<div class="navbar-inner">
|
32 |
-
<div class="container">
|
33 |
-
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
|
34 |
-
<span class="icon-bar"></span> <span class="icon-bar"></span>
|
35 |
-
<span class="icon-bar"></span> </a>
|
36 |
-
<a class="brand" href="../index.html">Media Library Assistant</a>
|
37 |
-
|
38 |
-
<div class="nav-collapse">
|
39 |
-
<ul class="nav">
|
40 |
-
<li class="dropdown">
|
41 |
-
<a href="#api" class="dropdown-toggle" data-toggle="dropdown">
|
42 |
-
API Documentation <b class="caret"></b>
|
43 |
-
</a>
|
44 |
-
<ul class="dropdown-menu">
|
45 |
-
</ul>
|
46 |
-
</li>
|
47 |
-
<li class="dropdown" id="charts-menu">
|
48 |
-
<a href="#charts" class="dropdown-toggle" data-toggle="dropdown">
|
49 |
-
Charts <b class="caret"></b>
|
50 |
-
</a>
|
51 |
-
<ul class="dropdown-menu">
|
52 |
-
<li>
|
53 |
-
<a href="../graph_class.html">
|
54 |
-
<i class="icon-list-alt"></i> Class hierarchy diagram
|
55 |
-
</a>
|
56 |
-
</li>
|
57 |
-
</ul>
|
58 |
-
</li>
|
59 |
-
<li class="dropdown" id="reports-menu">
|
60 |
-
<a href="#reports" class="dropdown-toggle" data-toggle="dropdown">
|
61 |
-
Reports <b class="caret"></b>
|
62 |
-
</a>
|
63 |
-
<ul class="dropdown-menu">
|
64 |
-
<li>
|
65 |
-
<a href="../errors.html">
|
66 |
-
<i class="icon-list-alt"></i> Errors
|
67 |
-
</a>
|
68 |
-
</li>
|
69 |
-
<li>
|
70 |
-
<a href="../markers.html">
|
71 |
-
<i class="icon-list-alt"></i> Markers
|
72 |
-
</a>
|
73 |
-
</li>
|
74 |
-
<li>
|
75 |
-
<a href="../deprecated.html">
|
76 |
-
<i class="icon-list-alt"></i> Deprecated
|
77 |
-
</a>
|
78 |
-
</li>
|
79 |
-
</ul>
|
80 |
-
</li>
|
81 |
-
</ul>
|
82 |
-
</div>
|
83 |
-
</div>
|
84 |
-
</div>
|
85 |
-
<div class="go_to_top">
|
86 |
-
<a href="#___" style="color: inherit">Back to top  <i class="icon-upload icon-white"></i></a>
|
87 |
-
</div>
|
88 |
-
</div>
|
89 |
-
|
90 |
-
<div id="___" class="container">
|
91 |
-
<noscript>
|
92 |
-
<div class="alert alert-warning">
|
93 |
-
Javascript is disabled; several features are only available if Javascript is enabled.
|
94 |
-
</div>
|
95 |
-
</noscript>
|
96 |
-
|
97 |
-
|
98 |
-
<style>
|
99 |
-
.deprecated h2 {
|
100 |
-
text-decoration: line-through;
|
101 |
-
}
|
102 |
-
</style>
|
103 |
-
<div class="row">
|
104 |
-
<div class="span4">
|
105 |
-
<div class="btn-group view pull-right" data-toggle="buttons-radio">
|
106 |
-
<button class="btn details" title="Show descriptions and method names"><i class="icon-list"></i></button>
|
107 |
-
<button class="btn simple" title="Show only method names"><i class="icon-align-justify"></i></button>
|
108 |
-
</div>
|
109 |
-
<div class="btn-group visibility" data-toggle="buttons-checkbox">
|
110 |
-
<button class="btn public active" title="Show public elements">Public</button>
|
111 |
-
<button class="btn protected" title="Show protected elements">Protected</button>
|
112 |
-
<button class="btn private" title="Show private elements">Private</button>
|
113 |
-
<button class="btn inherited active" title="Show inherited elements">Inherited</button>
|
114 |
-
</div>
|
115 |
-
|
116 |
-
<ul class="side-nav nav nav-list">
|
117 |
-
<li class="nav-header">
|
118 |
-
<i class="icon-custom icon-method"></i> Methods
|
119 |
-
<ul>
|
120 |
-
<li class="method public">
|
121 |
-
<a href="#method___construct" title="__construct :: Define column properties">
|
122 |
-
<span class="description">Define column properties</span><pre>__construct</pre>
|
123 |
-
</a>
|
124 |
-
</li>
|
125 |
-
|
126 |
-
</ul>
|
127 |
-
</li>
|
128 |
-
<li class="nav-header protected">» Protected
|
129 |
-
<ul>
|
130 |
-
</ul>
|
131 |
-
</li>
|
132 |
-
<li class="nav-header private">» Private
|
133 |
-
<ul>
|
134 |
-
</ul>
|
135 |
-
</li>
|
136 |
-
<li class="nav-header">
|
137 |
-
<i class="icon-custom icon-constant"></i> Constants
|
138 |
-
<ul>
|
139 |
-
</ul>
|
140 |
-
</li>
|
141 |
-
</ul>
|
142 |
-
|
143 |
-
|
144 |
-
</div>
|
145 |
-
|
146 |
-
<div class="span8">
|
147 |
-
<div class="element class">
|
148 |
-
<h1>ACP_Addon_MLA_Column_AltText</h1>
|
149 |
-
<small style="display: block; text-align: right">
|
150 |
-
Extends \ACP_Column_Media_AlternateText
|
151 |
-
Implements \ACP_Column_EditingInterface
|
152 |
-
</small>
|
153 |
-
<p class="short_description">Provides inline-editing for alt_text</p>
|
154 |
-
<div class="details">
|
155 |
-
<div class="long_description">
|
156 |
-
|
157 |
-
</div>
|
158 |
-
<table class="table table-bordered">
|
159 |
-
<tr>
|
160 |
-
<th>
|
161 |
-
package
|
162 |
-
</th>
|
163 |
-
<td>
|
164 |
-
|
165 |
-
<p>Media Library Assistant</p>
|
166 |
-
</td>
|
167 |
-
</tr>
|
168 |
-
<tr>
|
169 |
-
<th>
|
170 |
-
since
|
171 |
-
</th>
|
172 |
-
<td>
|
173 |
-
2.52
|
174 |
-
|
175 |
-
</td>
|
176 |
-
</tr>
|
177 |
-
</table>
|
178 |
-
|
179 |
-
<h3><i class="icon-custom icon-method"></i> Methods</h3>
|
180 |
-
<a id="method___construct"></a>
|
181 |
-
<div class="element clickable method public method___construct" data-toggle="collapse" data-target=".method___construct .collapse">
|
182 |
-
<h2>Define column properties</h2>
|
183 |
-
<pre>__construct() </pre>
|
184 |
-
<div class="labels">
|
185 |
-
</div>
|
186 |
-
|
187 |
-
|
188 |
-
<div class="row collapse">
|
189 |
-
<div class="detail-description">
|
190 |
-
<div class="long_description"></div>
|
191 |
-
|
192 |
-
<table class="table">
|
193 |
-
<tr>
|
194 |
-
<th>
|
195 |
-
|
196 |
-
</th>
|
197 |
-
<td>
|
198 |
-
</td>
|
199 |
-
</tr>
|
200 |
-
<tr>
|
201 |
-
<th>
|
202 |
-
|
203 |
-
</th>
|
204 |
-
<td>
|
205 |
-
</td>
|
206 |
-
</tr>
|
207 |
-
</table>
|
208 |
-
|
209 |
-
|
210 |
-
</div>
|
211 |
-
</div>
|
212 |
-
|
213 |
-
</div>
|
214 |
-
|
215 |
-
|
216 |
-
</div>
|
217 |
-
</div>
|
218 |
-
<a id="\ACP_Addon_MLA_Column_AltText"></a>
|
219 |
-
<ul class="breadcrumb">
|
220 |
-
<li><a href="../index.html"><i class="icon-custom icon-class"></i></a></li>
|
221 |
-
|
222 |
-
|
223 |
-
<li><span class="divider">\</span><a href="../namespaces/default.html">\</a></li>
|
224 |
-
|
225 |
-
<li class="active"><span class="divider">\</span><a href="../classes/ACP_Addon_MLA_Column_AltText.html">ACP_Addon_MLA_Column_AltText</a></li>
|
226 |
-
</ul>
|
227 |
-
</div>
|
228 |
-
</div>
|
229 |
-
|
230 |
-
</div>
|
231 |
-
|
232 |
-
<footer class="span12">
|
233 |
-
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by
|
234 |
-
<a href="http://glyphicons.com/">Glyphicons</a>.<br/>
|
235 |
-
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and<br/>
|
236 |
-
generated on Tue, 11 Jul 2017 20:25:48 -0700.<br/>
|
237 |
-
</footer>
|
238 |
-
</body>
|
239 |
-
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
phpDocs/classes/ACP_Addon_MLA_Column_Author.html
DELETED
@@ -1,274 +0,0 @@
|
|
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 » \ACP_Addon_MLA_Column_Author
|
7 |
-
</title>
|
8 |
-
<meta name="author" content=""/>
|
9 |
-
<meta name="description" content=""/>
|
10 |
-
|
11 |
-
<link href="../css/template.css" rel="stylesheet" media="all"/>
|
12 |
-
|
13 |
-
<!--[if lt IE 9]>
|
14 |
-
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
|
15 |
-
<![endif]-->
|
16 |
-
<script src="../js/jquery-1.7.1.min.js" type="text/javascript"></script>
|
17 |
-
<script src="../js/jquery-ui-1.8.2.custom.min.js" type="text/javascript"></script>
|
18 |
-
<script src="../js/jquery.mousewheel.min.js" type="text/javascript"></script>
|
19 |
-
<script src="../js/bootstrap.js" type="text/javascript"></script>
|
20 |
-
<script src="../js/template.js" type="text/javascript"></script>
|
21 |
-
<script src="../js/prettify/prettify.min.js" type="text/javascript"></script>
|
22 |
-
|
23 |
-
<link rel="shortcut icon" href="../img/favicon.ico"/>
|
24 |
-
<link rel="apple-touch-icon" href="../img/apple-touch-icon.png"/>
|
25 |
-
<link rel="apple-touch-icon" sizes="72x72" href="../img/apple-touch-icon-72x72.png"/>
|
26 |
-
<link rel="apple-touch-icon" sizes="114x114" href="../img/apple-touch-icon-114x114.png"/>
|
27 |
-
</head>
|
28 |
-
<body>
|
29 |
-
|
30 |
-
<div class="navbar navbar-fixed-top">
|
31 |
-
<div class="navbar-inner">
|
32 |
-
<div class="container">
|
33 |
-
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
|
34 |
-
<span class="icon-bar"></span> <span class="icon-bar"></span>
|
35 |
-
<span class="icon-bar"></span> </a>
|
36 |
-
<a class="brand" href="../index.html">Media Library Assistant</a>
|
37 |
-
|
38 |
-
<div class="nav-collapse">
|
39 |
-
<ul class="nav">
|
40 |
-
<li class="dropdown">
|
41 |
-
<a href="#api" class="dropdown-toggle" data-toggle="dropdown">
|
42 |
-
API Documentation <b class="caret"></b>
|
43 |
-
</a>
|
44 |
-
<ul class="dropdown-menu">
|
45 |
-
</ul>
|
46 |
-
</li>
|
47 |
-
<li class="dropdown" id="charts-menu">
|
48 |
-
<a href="#charts" class="dropdown-toggle" data-toggle="dropdown">
|
49 |
-
Charts <b class="caret"></b>
|
50 |
-
</a>
|
51 |
-
<ul class="dropdown-menu">
|
52 |
-
<li>
|
53 |
-
<a href="../graph_class.html">
|
54 |
-
<i class="icon-list-alt"></i> Class hierarchy diagram
|
55 |
-
</a>
|
56 |
-
</li>
|
57 |
-
</ul>
|
58 |
-
</li>
|
59 |
-
<li class="dropdown" id="reports-menu">
|
60 |
-
<a href="#reports" class="dropdown-toggle" data-toggle="dropdown">
|
61 |
-
Reports <b class="caret"></b>
|
62 |
-
</a>
|
63 |
-
<ul class="dropdown-menu">
|
64 |
-
<li>
|
65 |
-
<a href="../errors.html">
|
66 |
-
<i class="icon-list-alt"></i> Errors
|
67 |
-
</a>
|
68 |
-
</li>
|
69 |
-
<li>
|
70 |
-
<a href="../markers.html">
|
71 |
-
<i class="icon-list-alt"></i> Markers
|
72 |
-
</a>
|
73 |
-
</li>
|
74 |
-
<li>
|
75 |
-
<a href="../deprecated.html">
|
76 |
-
<i class="icon-list-alt"></i> Deprecated
|
77 |
-
</a>
|
78 |
-
</li>
|
79 |
-
</ul>
|
80 |
-
</li>
|
81 |
-
</ul>
|
82 |
-
</div>
|
83 |
-
</div>
|
84 |
-
</div>
|
85 |
-
<div class="go_to_top">
|
86 |
-
<a href="#___" style="color: inherit">Back to top  <i class="icon-upload icon-white"></i></a>
|
87 |
-
</div>
|
88 |
-
</div>
|
89 |
-
|
90 |
-
<div id="___" class="container">
|
91 |
-
<noscript>
|
92 |
-
<div class="alert alert-warning">
|
93 |
-
Javascript is disabled; several features are only available if Javascript is enabled.
|
94 |
-
</div>
|
95 |
-
</noscript>
|
96 |
-
|
97 |
-
|
98 |
-
<style>
|
99 |
-
.deprecated h2 {
|
100 |
-
text-decoration: line-through;
|
101 |
-
}
|
102 |
-
</style>
|
103 |
-
<div class="row">
|
104 |
-
<div class="span4">
|
105 |
-
<div class="btn-group view pull-right" data-toggle="buttons-radio">
|
106 |
-
<button class="btn details" title="Show descriptions and method names"><i class="icon-list"></i></button>
|
107 |
-
<button class="btn simple" title="Show only method names"><i class="icon-align-justify"></i></button>
|
108 |
-
</div>
|
109 |
-
<div class="btn-group visibility" data-toggle="buttons-checkbox">
|
110 |
-
<button class="btn public active" title="Show public elements">Public</button>
|
111 |
-
<button class="btn protected" title="Show protected elements">Protected</button>
|
112 |
-
<button class="btn private" title="Show private elements">Private</button>
|
113 |
-
<button class="btn inherited active" title="Show inherited elements">Inherited</button>
|
114 |
-
</div>
|
115 |
-
|
116 |
-
<ul class="side-nav nav nav-list">
|
117 |
-
<li class="nav-header">
|
118 |
-
<i class="icon-custom icon-method"></i> Methods
|
119 |
-
<ul>
|
120 |
-
<li class="method public">
|
121 |
-
<a href="#method_editing" title="editing :: Add inline editing support">
|
122 |
-
<span class="description">Add inline editing support</span><pre>editing</pre>
|
123 |
-
</a>
|
124 |
-
</li>
|
125 |
-
|
126 |
-
<li class="method public">
|
127 |
-
<a href="#method_register_settings" title="register_settings :: Remove default column width">
|
128 |
-
<span class="description">Remove default column width</span><pre>register_settings</pre>
|
129 |
-
</a>
|
130 |
-
</li>
|
131 |
-
|
132 |
-
</ul>
|
133 |
-
</li>
|
134 |
-
<li class="nav-header protected">» Protected
|
135 |
-
<ul>
|
136 |
-
</ul>
|
137 |
-
</li>
|
138 |
-
<li class="nav-header private">» Private
|
139 |
-
<ul>
|
140 |
-
</ul>
|
141 |
-
</li>
|
142 |
-
<li class="nav-header">
|
143 |
-
<i class="icon-custom icon-constant"></i> Constants
|
144 |
-
<ul>
|
145 |
-
</ul>
|
146 |
-
</li>
|
147 |
-
</ul>
|
148 |
-
|
149 |
-
|
150 |
-
</div>
|
151 |
-
|
152 |
-
<div class="span8">
|
153 |
-
<div class="element class">
|
154 |
-
<h1>ACP_Addon_MLA_Column_Author</h1>
|
155 |
-
<small style="display: block; text-align: right">
|
156 |
-
Extends \AC_Column_Media_Author
|
157 |
-
Implements \ACP_Column_EditingInterface
|
158 |
-
</small>
|
159 |
-
<p class="short_description">Removes ACP defaults & provides inline-editing for caption</p>
|
160 |
-
<div class="details">
|
161 |
-
<div class="long_description">
|
162 |
-
|
163 |
-
</div>
|
164 |
-
<table class="table table-bordered">
|
165 |
-
<tr>
|
166 |
-
<th>
|
167 |
-
package
|
168 |
-
</th>
|
169 |
-
<td>
|
170 |
-
|
171 |
-
<p>Media Library Assistant</p>
|
172 |
-
</td>
|
173 |
-
</tr>
|
174 |
-
<tr>
|
175 |
-
<th>
|
176 |
-
since
|
177 |
-
</th>
|
178 |
-
<td>
|
179 |
-
2.52
|
180 |
-
|
181 |
-
</td>
|
182 |
-
</tr>
|
183 |
-
</table>
|
184 |
-
|
185 |
-
<h3><i class="icon-custom icon-method"></i> Methods</h3>
|
186 |
-
<a id="method_editing"></a>
|
187 |
-
<div class="element clickable method public method_editing" data-toggle="collapse" data-target=".method_editing .collapse">
|
188 |
-
<h2>Add inline editing support</h2>
|
189 |
-
<pre>editing() : \ACP_Editing_Model_Post_Content</pre>
|
190 |
-
<div class="labels">
|
191 |
-
</div>
|
192 |
-
|
193 |
-
|
194 |
-
<div class="row collapse">
|
195 |
-
<div class="detail-description">
|
196 |
-
<div class="long_description"></div>
|
197 |
-
|
198 |
-
<table class="table">
|
199 |
-
<tr>
|
200 |
-
<th>
|
201 |
-
|
202 |
-
</th>
|
203 |
-
<td>
|
204 |
-
</td>
|
205 |
-
</tr>
|
206 |
-
</table>
|
207 |
-
|
208 |
-
|
209 |
-
<h3>Response</h3>
|
210 |
-
<code>\ACP_Editing_Model_Post_Content</code><p></p>
|
211 |
-
</div>
|
212 |
-
</div>
|
213 |
-
|
214 |
-
</div>
|
215 |
-
<a id="method_register_settings"></a>
|
216 |
-
<div class="element clickable method public method_register_settings" data-toggle="collapse" data-target=".method_register_settings .collapse">
|
217 |
-
<h2>Remove default column width</h2>
|
218 |
-
<pre>register_settings() </pre>
|
219 |
-
<div class="labels">
|
220 |
-
</div>
|
221 |
-
|
222 |
-
|
223 |
-
<div class="row collapse">
|
224 |
-
<div class="detail-description">
|
225 |
-
<div class="long_description"></div>
|
226 |
-
|
227 |
-
<table class="table">
|
228 |
-
<tr>
|
229 |
-
<th>
|
230 |
-
|
231 |
-
</th>
|
232 |
-
<td>
|
233 |
-
</td>
|
234 |
-
</tr>
|
235 |
-
<tr>
|
236 |
-
<th>
|
237 |
-
|
238 |
-
</th>
|
239 |
-
<td>
|
240 |
-
</td>
|
241 |
-
</tr>
|
242 |
-
</table>
|
243 |
-
|
244 |
-
|
245 |
-
</div>
|
246 |
-
</div>
|
247 |
-
|
248 |
-
</div>
|
249 |
-
|
250 |
-
|
251 |
-
</div>
|
252 |
-
</div>
|
253 |
-
<a id="\ACP_Addon_MLA_Column_Author"></a>
|
254 |
-
<ul class="breadcrumb">
|
255 |
-
<li><a href="../index.html"><i class="icon-custom icon-class"></i></a></li>
|
256 |
-
|
257 |
-
|
258 |
-
<li><span class="divider">\</span><a href="../namespaces/default.html">\</a></li>
|
259 |
-
|
260 |
-
<li class="active"><span class="divider">\</span><a href="../classes/ACP_Addon_MLA_Column_Author.html">ACP_Addon_MLA_Column_Author</a></li>
|
261 |
-
</ul>
|
262 |
-
</div>
|
263 |
-
</div>
|
264 |
-
|
265 |
-
</div>
|
266 |
-
|
267 |
-
<footer class="span12">
|
268 |
-
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by
|
269 |
-
<a href="http://glyphicons.com/">Glyphicons</a>.<br/>
|
270 |
-
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and<br/>
|
271 |
-
generated on Tue, 11 Jul 2017 20:25:48 -0700.<br/>
|
272 |
-
</footer>
|
273 |
-
</body>
|
274 |
-
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
phpDocs/classes/ACP_Addon_MLA_Column_Caption.html
DELETED
@@ -1,239 +0,0 @@
|
|
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 » \ACP_Addon_MLA_Column_Caption
|
7 |
-
</title>
|
8 |
-
<meta name="author" content=""/>
|
9 |
-
<meta name="description" content=""/>
|
10 |
-
|
11 |
-
<link href="../css/template.css" rel="stylesheet" media="all"/>
|
12 |
-
|
13 |
-
<!--[if lt IE 9]>
|
14 |
-
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
|
15 |
-
<![endif]-->
|
16 |
-
<script src="../js/jquery-1.7.1.min.js" type="text/javascript"></script>
|
17 |
-
<script src="../js/jquery-ui-1.8.2.custom.min.js" type="text/javascript"></script>
|
18 |
-
<script src="../js/jquery.mousewheel.min.js" type="text/javascript"></script>
|
19 |
-
<script src="../js/bootstrap.js" type="text/javascript"></script>
|
20 |
-
<script src="../js/template.js" type="text/javascript"></script>
|
21 |
-
<script src="../js/prettify/prettify.min.js" type="text/javascript"></script>
|
22 |
-
|
23 |
-
<link rel="shortcut icon" href="../img/favicon.ico"/>
|
24 |
-
<link rel="apple-touch-icon" href="../img/apple-touch-icon.png"/>
|
25 |
-
<link rel="apple-touch-icon" sizes="72x72" href="../img/apple-touch-icon-72x72.png"/>
|
26 |
-
<link rel="apple-touch-icon" sizes="114x114" href="../img/apple-touch-icon-114x114.png"/>
|
27 |
-
</head>
|
28 |
-
<body>
|
29 |
-
|
30 |
-
<div class="navbar navbar-fixed-top">
|
31 |
-
<div class="navbar-inner">
|
32 |
-
<div class="container">
|
33 |
-
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
|
34 |
-
<span class="icon-bar"></span> <span class="icon-bar"></span>
|
35 |
-
<span class="icon-bar"></span> </a>
|
36 |
-
<a class="brand" href="../index.html">Media Library Assistant</a>
|
37 |
-
|
38 |
-
<div class="nav-collapse">
|
39 |
-
<ul class="nav">
|
40 |
-
<li class="dropdown">
|
41 |
-
<a href="#api" class="dropdown-toggle" data-toggle="dropdown">
|
42 |
-
API Documentation <b class="caret"></b>
|
43 |
-
</a>
|
44 |
-
<ul class="dropdown-menu">
|
45 |
-
</ul>
|
46 |
-
</li>
|
47 |
-
<li class="dropdown" id="charts-menu">
|
48 |
-
<a href="#charts" class="dropdown-toggle" data-toggle="dropdown">
|
49 |
-
Charts <b class="caret"></b>
|
50 |
-
</a>
|
51 |
-
<ul class="dropdown-menu">
|
52 |
-
<li>
|
53 |
-
<a href="../graph_class.html">
|
54 |
-
<i class="icon-list-alt"></i> Class hierarchy diagram
|
55 |
-
</a>
|
56 |
-
</li>
|
57 |
-
</ul>
|
58 |
-
</li>
|
59 |
-
<li class="dropdown" id="reports-menu">
|
60 |
-
<a href="#reports" class="dropdown-toggle" data-toggle="dropdown">
|
61 |
-
Reports <b class="caret"></b>
|
62 |
-
</a>
|
63 |
-
<ul class="dropdown-menu">
|
64 |
-
<li>
|
65 |
-
<a href="../errors.html">
|
66 |
-
<i class="icon-list-alt"></i> Errors
|
67 |
-
</a>
|
68 |
-
</li>
|
69 |
-
<li>
|
70 |
-
<a href="../markers.html">
|
71 |
-
<i class="icon-list-alt"></i> Markers
|
72 |
-
</a>
|
73 |
-
</li>
|
74 |
-
<li>
|
75 |
-
<a href="../deprecated.html">
|
76 |
-
<i class="icon-list-alt"></i> Deprecated
|
77 |
-
</a>
|
78 |
-
</li>
|
79 |
-
</ul>
|
80 |
-
</li>
|
81 |
-
</ul>
|
82 |
-
</div>
|
83 |
-
</div>
|
84 |
-
</div>
|
85 |
-
<div class="go_to_top">
|
86 |
-
<a href="#___" style="color: inherit">Back to top  <i class="icon-upload icon-white"></i></a>
|
87 |
-
</div>
|
88 |
-
</div>
|
89 |
-
|
90 |
-
<div id="___" class="container">
|
91 |
-
<noscript>
|
92 |
-
<div class="alert alert-warning">
|
93 |
-
Javascript is disabled; several features are only available if Javascript is enabled.
|
94 |
-
</div>
|
95 |
-
</noscript>
|
96 |
-
|
97 |
-
|
98 |
-
<style>
|
99 |
-
.deprecated h2 {
|
100 |
-
text-decoration: line-through;
|
101 |
-
}
|
102 |
-
</style>
|
103 |
-
<div class="row">
|
104 |
-
<div class="span4">
|
105 |
-
<div class="btn-group view pull-right" data-toggle="buttons-radio">
|
106 |
-
<button class="btn details" title="Show descriptions and method names"><i class="icon-list"></i></button>
|
107 |
-
<button class="btn simple" title="Show only method names"><i class="icon-align-justify"></i></button>
|
108 |
-
</div>
|
109 |
-
<div class="btn-group visibility" data-toggle="buttons-checkbox">
|
110 |
-
<button class="btn public active" title="Show public elements">Public</button>
|
111 |
-
<button class="btn protected" title="Show protected elements">Protected</button>
|
112 |
-
<button class="btn private" title="Show private elements">Private</button>
|
113 |
-
<button class="btn inherited active" title="Show inherited elements">Inherited</button>
|
114 |
-
</div>
|
115 |
-
|
116 |
-
<ul class="side-nav nav nav-list">
|
117 |
-
<li class="nav-header">
|
118 |
-
<i class="icon-custom icon-method"></i> Methods
|
119 |
-
<ul>
|
120 |
-
<li class="method public">
|
121 |
-
<a href="#method___construct" title="__construct :: Define column properties">
|
122 |
-
<span class="description">Define column properties</span><pre>__construct</pre>
|
123 |
-
</a>
|
124 |
-
</li>
|
125 |
-
|
126 |
-
</ul>
|
127 |
-
</li>
|
128 |
-
<li class="nav-header protected">» Protected
|
129 |
-
<ul>
|
130 |
-
</ul>
|
131 |
-
</li>
|
132 |
-
<li class="nav-header private">» Private
|
133 |
-
<ul>
|
134 |
-
</ul>
|
135 |
-
</li>
|
136 |
-
<li class="nav-header">
|
137 |
-
<i class="icon-custom icon-constant"></i> Constants
|
138 |
-
<ul>
|
139 |
-
</ul>
|
140 |
-
</li>
|
141 |
-
</ul>
|
142 |
-
|
143 |
-
|
144 |
-
</div>
|
145 |
-
|
146 |
-
<div class="span8">
|
147 |
-
<div class="element class">
|
148 |
-
<h1>ACP_Addon_MLA_Column_Caption</h1>
|
149 |
-
<small style="display: block; text-align: right">
|
150 |
-
Extends \ACP_Column_Media_Caption
|
151 |
-
Implements \ACP_Column_EditingInterface
|
152 |
-
</small>
|
153 |
-
<p class="short_description">Provides inline-editing for caption</p>
|
154 |
-
<div class="details">
|
155 |
-
<div class="long_description">
|
156 |
-
|
157 |
-
</div>
|
158 |
-
<table class="table table-bordered">
|
159 |
-
<tr>
|
160 |
-
<th>
|
161 |
-
package
|
162 |
-
</th>
|
163 |
-
<td>
|
164 |
-
|
165 |
-
<p>Media Library Assistant</p>
|
166 |
-
</td>
|
167 |
-
</tr>
|
168 |
-
<tr>
|
169 |
-
<th>
|
170 |
-
since
|
171 |
-
</th>
|
172 |
-
<td>
|
173 |
-
2.52
|
174 |
-
|
175 |
-
</td>
|
176 |
-
</tr>
|
177 |
-
</table>
|
178 |
-
|
179 |
-
<h3><i class="icon-custom icon-method"></i> Methods</h3>
|
180 |
-
<a id="method___construct"></a>
|
181 |
-
<div class="element clickable method public method___construct" data-toggle="collapse" data-target=".method___construct .collapse">
|
182 |
-
<h2>Define column properties</h2>
|
183 |
-
<pre>__construct() </pre>
|
184 |
-
<div class="labels">
|
185 |
-
</div>
|
186 |
-
|
187 |
-
|
188 |
-
<div class="row collapse">
|
189 |
-
<div class="detail-description">
|
190 |
-
<div class="long_description"></div>
|
191 |
-
|
192 |
-
<table class="table">
|
193 |
-
<tr>
|
194 |
-
<th>
|
195 |
-
|
196 |
-
</th>
|
197 |
-
<td>
|
198 |
-
</td>
|
199 |
-
</tr>
|
200 |
-
<tr>
|
201 |
-
<th>
|
202 |
-
|
203 |
-
</th>
|
204 |
-
<td>
|
205 |
-
</td>
|
206 |
-
</tr>
|
207 |
-
</table>
|
208 |
-
|
209 |
-
|
210 |
-
</div>
|
211 |
-
</div>
|
212 |
-
|
213 |
-
</div>
|
214 |
-
|
215 |
-
|
216 |
-
</div>
|
217 |
-
</div>
|
218 |
-
<a id="\ACP_Addon_MLA_Column_Caption"></a>
|
219 |
-
<ul class="breadcrumb">
|
220 |
-
<li><a href="../index.html"><i class="icon-custom icon-class"></i></a></li>
|
221 |
-
|
222 |
-
|
223 |
-
<li><span class="divider">\</span><a href="../namespaces/default.html">\</a></li>
|
224 |
-
|
225 |
-
<li class="active"><span class="divider">\</span><a href="../classes/ACP_Addon_MLA_Column_Caption.html">ACP_Addon_MLA_Column_Caption</a></li>
|
226 |
-
</ul>
|
227 |
-
</div>
|
228 |
-
</div>
|
229 |
-
|
230 |
-
</div>
|
231 |
-
|
232 |
-
<footer class="span12">
|
233 |
-
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by
|
234 |
-
<a href="http://glyphicons.com/">Glyphicons</a>.<br/>
|
235 |
-
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and<br/>
|
236 |
-
generated on Tue, 11 Jul 2017 20:25:48 -0700.<br/>
|
237 |
-
</footer>
|
238 |
-
</body>
|
239 |
-
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
phpDocs/classes/ACP_Addon_MLA_Column_Date.html
DELETED
@@ -1,238 +0,0 @@
|
|
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 » \ACP_Addon_MLA_Column_Date
|
7 |
-
</title>
|
8 |
-
<meta name="author" content=""/>
|
9 |
-
<meta name="description" content=""/>
|
10 |
-
|
11 |
-
<link href="../css/template.css" rel="stylesheet" media="all"/>
|
12 |
-
|
13 |
-
<!--[if lt IE 9]>
|
14 |
-
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
|
15 |
-
<![endif]-->
|
16 |
-
<script src="../js/jquery-1.7.1.min.js" type="text/javascript"></script>
|
17 |
-
<script src="../js/jquery-ui-1.8.2.custom.min.js" type="text/javascript"></script>
|
18 |
-
<script src="../js/jquery.mousewheel.min.js" type="text/javascript"></script>
|
19 |
-
<script src="../js/bootstrap.js" type="text/javascript"></script>
|
20 |
-
<script src="../js/template.js" type="text/javascript"></script>
|
21 |
-
<script src="../js/prettify/prettify.min.js" type="text/javascript"></script>
|
22 |
-
|
23 |
-
<link rel="shortcut icon" href="../img/favicon.ico"/>
|
24 |
-
<link rel="apple-touch-icon" href="../img/apple-touch-icon.png"/>
|
25 |
-
<link rel="apple-touch-icon" sizes="72x72" href="../img/apple-touch-icon-72x72.png"/>
|
26 |
-
<link rel="apple-touch-icon" sizes="114x114" href="../img/apple-touch-icon-114x114.png"/>
|
27 |
-
</head>
|
28 |
-
<body>
|
29 |
-
|
30 |
-
<div class="navbar navbar-fixed-top">
|
31 |
-
<div class="navbar-inner">
|
32 |
-
<div class="container">
|
33 |
-
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
|
34 |
-
<span class="icon-bar"></span> <span class="icon-bar"></span>
|
35 |
-
<span class="icon-bar"></span> </a>
|
36 |
-
<a class="brand" href="../index.html">Media Library Assistant</a>
|
37 |
-
|
38 |
-
<div class="nav-collapse">
|
39 |
-
<ul class="nav">
|
40 |
-
<li class="dropdown">
|
41 |
-
<a href="#api" class="dropdown-toggle" data-toggle="dropdown">
|
42 |
-
API Documentation <b class="caret"></b>
|
43 |
-
</a>
|
44 |
-
<ul class="dropdown-menu">
|
45 |
-
</ul>
|
46 |
-
</li>
|
47 |
-
<li class="dropdown" id="charts-menu">
|
48 |
-
<a href="#charts" class="dropdown-toggle" data-toggle="dropdown">
|
49 |
-
Charts <b class="caret"></b>
|
50 |
-
</a>
|
51 |
-
<ul class="dropdown-menu">
|
52 |
-
<li>
|
53 |
-
<a href="../graph_class.html">
|
54 |
-
<i class="icon-list-alt"></i> Class hierarchy diagram
|
55 |
-
</a>
|
56 |
-
</li>
|
57 |
-
</ul>
|
58 |
-
</li>
|
59 |
-
<li class="dropdown" id="reports-menu">
|
60 |
-
<a href="#reports" class="dropdown-toggle" data-toggle="dropdown">
|
61 |
-
Reports <b class="caret"></b>
|
62 |
-
</a>
|
63 |
-
<ul class="dropdown-menu">
|
64 |
-
<li>
|
65 |
-
<a href="../errors.html">
|
66 |
-
<i class="icon-list-alt"></i> Errors
|
67 |
-
</a>
|
68 |
-
</li>
|
69 |
-
<li>
|
70 |
-
<a href="../markers.html">
|
71 |
-
<i class="icon-list-alt"></i> Markers
|
72 |
-
</a>
|
73 |
-
</li>
|
74 |
-
<li>
|
75 |
-
<a href="../deprecated.html">
|
76 |
-
<i class="icon-list-alt"></i> Deprecated
|
77 |
-
</a>
|
78 |
-
</li>
|
79 |
-
</ul>
|
80 |
-
</li>
|
81 |
-
</ul>
|
82 |
-
</div>
|
83 |
-
</div>
|
84 |
-
</div>
|
85 |
-
<div class="go_to_top">
|
86 |
-
<a href="#___" style="color: inherit">Back to top  <i class="icon-upload icon-white"></i></a>
|
87 |
-
</div>
|
88 |
-
</div>
|
89 |
-
|
90 |
-
<div id="___" class="container">
|
91 |
-
<noscript>
|
92 |
-
<div class="alert alert-warning">
|
93 |
-
Javascript is disabled; several features are only available if Javascript is enabled.
|
94 |
-
</div>
|
95 |
-
</noscript>
|
96 |
-
|
97 |
-
|
98 |
-
<style>
|
99 |
-
.deprecated h2 {
|
100 |
-
text-decoration: line-through;
|
101 |
-
}
|
102 |
-
</style>
|
103 |
-
<div class="row">
|
104 |
-
<div class="span4">
|
105 |
-
<div class="btn-group view pull-right" data-toggle="buttons-radio">
|
106 |
-
<button class="btn details" title="Show descriptions and method names"><i class="icon-list"></i></button>
|
107 |
-
<button class="btn simple" title="Show only method names"><i class="icon-align-justify"></i></button>
|
108 |
-
</div>
|
109 |
-
<div class="btn-group visibility" data-toggle="buttons-checkbox">
|
110 |
-
<button class="btn public active" title="Show public elements">Public</button>
|
111 |
-
<button class="btn protected" title="Show protected elements">Protected</button>
|
112 |
-
<button class="btn private" title="Show private elements">Private</button>
|
113 |
-
<button class="btn inherited active" title="Show inherited elements">Inherited</button>
|
114 |
-
</div>
|
115 |
-
|
116 |
-
<ul class="side-nav nav nav-list">
|
117 |
-
<li class="nav-header">
|
118 |
-
<i class="icon-custom icon-method"></i> Methods
|
119 |
-
<ul>
|
120 |
-
<li class="method public">
|
121 |
-
<a href="#method_register_settings" title="register_settings :: Remove default column width">
|
122 |
-
<span class="description">Remove default column width</span><pre>register_settings</pre>
|
123 |
-
</a>
|
124 |
-
</li>
|
125 |
-
|
126 |
-
</ul>
|
127 |
-
</li>
|
128 |
-
<li class="nav-header protected">» Protected
|
129 |
-
<ul>
|
130 |
-
</ul>
|
131 |
-
</li>
|
132 |
-
<li class="nav-header private">» Private
|
133 |
-
<ul>
|
134 |
-
</ul>
|
135 |
-
</li>
|
136 |
-
<li class="nav-header">
|
137 |
-
<i class="icon-custom icon-constant"></i> Constants
|
138 |
-
<ul>
|
139 |
-
</ul>
|
140 |
-
</li>
|
141 |
-
</ul>
|
142 |
-
|
143 |
-
|
144 |
-
</div>
|
145 |
-
|
146 |
-
<div class="span8">
|
147 |
-
<div class="element class">
|
148 |
-
<h1>ACP_Addon_MLA_Column_Date</h1>
|
149 |
-
<small style="display: block; text-align: right">
|
150 |
-
Extends \ACP_Column_Media_Date
|
151 |
-
</small>
|
152 |
-
<p class="short_description">Removes ACP defaults for date</p>
|
153 |
-
<div class="details">
|
154 |
-
<div class="long_description">
|
155 |
-
|
156 |
-
</div>
|
157 |
-
<table class="table table-bordered">
|
158 |
-
<tr>
|
159 |
-
<th>
|
160 |
-
package
|
161 |
-
</th>
|
162 |
-
<td>
|
163 |
-
|
164 |
-
<p>Media Library Assistant</p>
|
165 |
-
</td>
|
166 |
-
</tr>
|
167 |
-
<tr>
|
168 |
-
<th>
|
169 |
-
since
|
170 |
-
</th>
|
171 |
-
<td>
|
172 |
-
2.52
|
173 |
-
|
174 |
-
</td>
|
175 |
-
</tr>
|
176 |
-
</table>
|
177 |
-
|
178 |
-
<h3><i class="icon-custom icon-method"></i> Methods</h3>
|
179 |
-
<a id="method_register_settings"></a>
|
180 |
-
<div class="element clickable method public method_register_settings" data-toggle="collapse" data-target=".method_register_settings .collapse">
|
181 |
-
<h2>Remove default column width</h2>
|
182 |
-
<pre>register_settings() </pre>
|
183 |
-
<div class="labels">
|
184 |
-
</div>
|
185 |
-
|
186 |
-
|
187 |
-
<div class="row collapse">
|
188 |
-
<div class="detail-description">
|
189 |
-
<div class="long_description"></div>
|
190 |
-
|
191 |
-
<table class="table">
|
192 |
-
<tr>
|
193 |
-
<th>
|
194 |
-
|
195 |
-
</th>
|
196 |
-
<td>
|
197 |
-
</td>
|
198 |
-
</tr>
|
199 |
-
<tr>
|
200 |
-
<th>
|
201 |
-
|
202 |
-
</th>
|
203 |
-
<td>
|
204 |
-
</td>
|
205 |
-
</tr>
|
206 |
-
</table>
|
207 |
-
|
208 |
-
|
209 |
-
</div>
|
210 |
-
</div>
|
211 |
-
|
212 |
-
</div>
|
213 |
-
|
214 |
-
|
215 |
-
</div>
|
216 |
-
</div>
|
217 |
-
<a id="\ACP_Addon_MLA_Column_Date"></a>
|
218 |
-
<ul class="breadcrumb">
|
219 |
-
<li><a href="../index.html"><i class="icon-custom icon-class"></i></a></li>
|
220 |
-
|
221 |
-
|
222 |
-
<li><span class="divider">\</span><a href="../namespaces/default.html">\</a></li>
|
223 |
-
|
224 |
-
<li class="active"><span class="divider">\</span><a href="../classes/ACP_Addon_MLA_Column_Date.html">ACP_Addon_MLA_Column_Date</a></li>
|
225 |
-
</ul>
|
226 |
-
</div>
|
227 |
-
</div>
|
228 |
-
|
229 |
-
</div>
|
230 |
-
|
231 |
-
<footer class="span12">
|
232 |
-
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by
|
233 |
-
<a href="http://glyphicons.com/">Glyphicons</a>.<br/>
|
234 |
-
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and<br/>
|
235 |
-
generated on Tue, 11 Jul 2017 20:25:48 -0700.<br/>
|
236 |
-
</footer>
|
237 |
-
</body>
|
238 |
-
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
phpDocs/classes/ACP_Addon_MLA_Column_Description.html
DELETED
@@ -1,274 +0,0 @@
|
|
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 » \ACP_Addon_MLA_Column_Description
|
7 |
-
</title>
|
8 |
-
<meta name="author" content=""/>
|
9 |
-
<meta name="description" content=""/>
|
10 |
-
|
11 |
-
<link href="../css/template.css" rel="stylesheet" media="all"/>
|
12 |
-
|
13 |
-
<!--[if lt IE 9]>
|
14 |
-
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
|
15 |
-
<![endif]-->
|
16 |
-
<script src="../js/jquery-1.7.1.min.js" type="text/javascript"></script>
|
17 |
-
<script src="../js/jquery-ui-1.8.2.custom.min.js" type="text/javascript"></script>
|
18 |
-
<script src="../js/jquery.mousewheel.min.js" type="text/javascript"></script>
|
19 |
-
<script src="../js/bootstrap.js" type="text/javascript"></script>
|
20 |
-
<script src="../js/template.js" type="text/javascript"></script>
|
21 |
-
<script src="../js/prettify/prettify.min.js" type="text/javascript"></script>
|
22 |
-
|
23 |
-
<link rel="shortcut icon" href="../img/favicon.ico"/>
|
24 |
-
<link rel="apple-touch-icon" href="../img/apple-touch-icon.png"/>
|
25 |
-
<link rel="apple-touch-icon" sizes="72x72" href="../img/apple-touch-icon-72x72.png"/>
|
26 |
-
<link rel="apple-touch-icon" sizes="114x114" href="../img/apple-touch-icon-114x114.png"/>
|
27 |
-
</head>
|
28 |
-
<body>
|
29 |
-
|
30 |
-
<div class="navbar navbar-fixed-top">
|
31 |
-
<div class="navbar-inner">
|
32 |
-
<div class="container">
|
33 |
-
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
|
34 |
-
<span class="icon-bar"></span> <span class="icon-bar"></span>
|
35 |
-
<span class="icon-bar"></span> </a>
|
36 |
-
<a class="brand" href="../index.html">Media Library Assistant</a>
|
37 |
-
|
38 |
-
<div class="nav-collapse">
|
39 |
-
<ul class="nav">
|
40 |
-
<li class="dropdown">
|
41 |
-
<a href="#api" class="dropdown-toggle" data-toggle="dropdown">
|
42 |
-
API Documentation <b class="caret"></b>
|
43 |
-
</a>
|
44 |
-
<ul class="dropdown-menu">
|
45 |
-
</ul>
|
46 |
-
</li>
|
47 |
-
<li class="dropdown" id="charts-menu">
|
48 |
-
<a href="#charts" class="dropdown-toggle" data-toggle="dropdown">
|
49 |
-
Charts <b class="caret"></b>
|
50 |
-
</a>
|
51 |
-
<ul class="dropdown-menu">
|
52 |
-
<li>
|
53 |
-
<a href="../graph_class.html">
|
54 |
-
<i class="icon-list-alt"></i> Class hierarchy diagram
|
55 |
-
</a>
|
56 |
-
</li>
|
57 |
-
</ul>
|
58 |
-
</li>
|
59 |
-
<li class="dropdown" id="reports-menu">
|
60 |
-
<a href="#reports" class="dropdown-toggle" data-toggle="dropdown">
|
61 |
-
Reports <b class="caret"></b>
|
62 |
-
</a>
|
63 |
-
<ul class="dropdown-menu">
|
64 |
-
<li>
|
65 |
-
<a href="../errors.html">
|
66 |
-
<i class="icon-list-alt"></i> Errors
|
67 |
-
</a>
|
68 |
-
</li>
|
69 |
-
<li>
|
70 |
-
<a href="../markers.html">
|
71 |
-
<i class="icon-list-alt"></i> Markers
|
72 |
-
</a>
|
73 |
-
</li>
|
74 |
-
<li>
|
75 |
-
<a href="../deprecated.html">
|
76 |
-
<i class="icon-list-alt"></i> Deprecated
|
77 |
-
</a>
|
78 |
-
</li>
|
79 |
-
</ul>
|
80 |
-
</li>
|
81 |
-
</ul>
|
82 |
-
</div>
|
83 |
-
</div>
|
84 |
-
</div>
|
85 |
-
<div class="go_to_top">
|
86 |
-
<a href="#___" style="color: inherit">Back to top  <i class="icon-upload icon-white"></i></a>
|
87 |
-
</div>
|
88 |
-
</div>
|
89 |
-
|
90 |
-
<div id="___" class="container">
|
91 |
-
<noscript>
|
92 |
-
<div class="alert alert-warning">
|
93 |
-
Javascript is disabled; several features are only available if Javascript is enabled.
|
94 |
-
</div>
|
95 |
-
</noscript>
|
96 |
-
|
97 |
-
|
98 |
-
<style>
|
99 |
-
.deprecated h2 {
|
100 |
-
text-decoration: line-through;
|
101 |
-
}
|
102 |
-
</style>
|
103 |
-
<div class="row">
|
104 |
-
<div class="span4">
|
105 |
-
<div class="btn-group view pull-right" data-toggle="buttons-radio">
|
106 |
-
<button class="btn details" title="Show descriptions and method names"><i class="icon-list"></i></button>
|
107 |
-
<button class="btn simple" title="Show only method names"><i class="icon-align-justify"></i></button>
|
108 |
-
</div>
|
109 |
-
<div class="btn-group visibility" data-toggle="buttons-checkbox">
|
110 |
-
<button class="btn public active" title="Show public elements">Public</button>
|
111 |
-
<button class="btn protected" title="Show protected elements">Protected</button>
|
112 |
-
<button class="btn private" title="Show private elements">Private</button>
|
113 |
-
<button class="btn inherited active" title="Show inherited elements">Inherited</button>
|
114 |
-
</div>
|
115 |
-
|
116 |
-
<ul class="side-nav nav nav-list">
|
117 |
-
<li class="nav-header">
|
118 |
-
<i class="icon-custom icon-method"></i> Methods
|
119 |
-
<ul>
|
120 |
-
<li class="method public">
|
121 |
-
<a href="#method___construct" title="__construct :: Define column properties">
|
122 |
-
<span class="description">Define column properties</span><pre>__construct</pre>
|
123 |
-
</a>
|
124 |
-
</li>
|
125 |
-
|
126 |
-
<li class="method public">
|
127 |
-
<a href="#method_editing" title="editing :: Add inline editing support">
|
128 |
-
<span class="description">Add inline editing support</span><pre>editing</pre>
|
129 |
-
</a>
|
130 |
-
</li>
|
131 |
-
|
132 |
-
</ul>
|
133 |
-
</li>
|
134 |
-
<li class="nav-header protected">» Protected
|
135 |
-
<ul>
|
136 |
-
</ul>
|
137 |
-
</li>
|
138 |
-
<li class="nav-header private">» Private
|
139 |
-
<ul>
|
140 |
-
</ul>
|
141 |
-
</li>
|
142 |
-
<li class="nav-header">
|
143 |
-
<i class="icon-custom icon-constant"></i> Constants
|
144 |
-
<ul>
|
145 |
-
</ul>
|
146 |
-
</li>
|
147 |
-
</ul>
|
148 |
-
|
149 |
-
|
150 |
-
</div>
|
151 |
-
|
152 |
-
<div class="span8">
|
153 |
-
<div class="element class">
|
154 |
-
<h1>ACP_Addon_MLA_Column_Description</h1>
|
155 |
-
<small style="display: block; text-align: right">
|
156 |
-
Extends \AC_Column_Media_Description
|
157 |
-
Implements \ACP_Column_EditingInterface
|
158 |
-
</small>
|
159 |
-
<p class="short_description">Provides inline-editing for caption</p>
|
160 |
-
<div class="details">
|
161 |
-
<div class="long_description">
|
162 |
-
|
163 |
-
</div>
|
164 |
-
<table class="table table-bordered">
|
165 |
-
<tr>
|
166 |
-
<th>
|
167 |
-
package
|
168 |
-
</th>
|
169 |
-
<td>
|
170 |
-
|
171 |
-
<p>Media Library Assistant</p>
|
172 |
-
</td>
|
173 |
-
</tr>
|
174 |
-
<tr>
|
175 |
-
<th>
|
176 |
-
since
|
177 |
-
</th>
|
178 |
-
<td>
|
179 |
-
2.52
|
180 |
-
|
181 |
-
</td>
|
182 |
-
</tr>
|
183 |
-
</table>
|
184 |
-
|
185 |
-
<h3><i class="icon-custom icon-method"></i> Methods</h3>
|
186 |
-
<a id="method___construct"></a>
|
187 |
-
<div class="element clickable method public method___construct" data-toggle="collapse" data-target=".method___construct .collapse">
|
188 |
-
<h2>Define column properties</h2>
|
189 |
-
<pre>__construct() </pre>
|
190 |
-
<div class="labels">
|
191 |
-
</div>
|
192 |
-
|
193 |
-
|
194 |
-
<div class="row collapse">
|
195 |
-
<div class="detail-description">
|
196 |
-
<div class="long_description"></div>
|
197 |
-
|
198 |
-
<table class="table">
|
199 |
-
<tr>
|
200 |
-
<th>
|
201 |
-
|
202 |
-
</th>
|
203 |
-
<td>
|
204 |
-
</td>
|
205 |
-
</tr>
|
206 |
-
<tr>
|
207 |
-
<th>
|
208 |
-
|
209 |
-
</th>
|
210 |
-
<td>
|
211 |
-
</td>
|
212 |
-
</tr>
|
213 |
-
</table>
|
214 |
-
|
215 |
-
|
216 |
-
</div>
|
217 |
-
</div>
|
218 |
-
|
219 |
-
</div>
|
220 |
-
<a id="method_editing"></a>
|
221 |
-
<div class="element clickable method public method_editing" data-toggle="collapse" data-target=".method_editing .collapse">
|
222 |
-
<h2>Add inline editing support</h2>
|
223 |
-
<pre>editing() : \ACP_Editing_Model_Post_Content</pre>
|
224 |
-
<div class="labels">
|
225 |
-
</div>
|
226 |
-
|
227 |
-
|
228 |
-
<div class="row collapse">
|
229 |
-
<div class="detail-description">
|
230 |
-
<div class="long_description"></div>
|
231 |
-
|
232 |
-
<table class="table">
|
233 |
-
<tr>
|
234 |
-
<th>
|
235 |
-
|
236 |
-
</th>
|
237 |
-
<td>
|
238 |
-
</td>
|
239 |
-
</tr>
|
240 |
-
</table>
|
241 |
-
|
242 |
-
|
243 |
-
<h3>Response</h3>
|
244 |
-
<code>\ACP_Editing_Model_Post_Content</code><p></p>
|
245 |
-
</div>
|
246 |
-
</div>
|
247 |
-
|
248 |
-
</div>
|
249 |
-
|
250 |
-
|
251 |
-
</div>
|
252 |
-
</div>
|
253 |
-
<a id="\ACP_Addon_MLA_Column_Description"></a>
|
254 |
-
<ul class="breadcrumb">
|
255 |
-
<li><a href="../index.html"><i class="icon-custom icon-class"></i></a></li>
|
256 |
-
|
257 |
-
|
258 |
-
<li><span class="divider">\</span><a href="../namespaces/default.html">\</a></li>
|
259 |
-
|
260 |
-
<li class="active"><span class="divider">\</span><a href="../classes/ACP_Addon_MLA_Column_Description.html">ACP_Addon_MLA_Column_Description</a></li>
|
261 |
-
</ul>
|
262 |
-
</div>
|
263 |
-
</div>
|
264 |
-
|
265 |
-
</div>
|
266 |
-
|
267 |
-
<footer class="span12">
|
268 |
-
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by
|
269 |
-
<a href="http://glyphicons.com/">Glyphicons</a>.<br/>
|
270 |
-
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and<br/>
|
271 |
-
generated on Tue, 11 Jul 2017 20:25:48 -0700.<br/>
|
272 |
-
</footer>
|
273 |
-
</body>
|
274 |
-
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
phpDocs/classes/ACP_Addon_MLA_Column_MenuOrder.html
DELETED
@@ -1,274 +0,0 @@
|
|
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 » \ACP_Addon_MLA_Column_MenuOrder
|
7 |
-
</title>
|
8 |
-
<meta name="author" content=""/>
|
9 |
-
<meta name="description" content=""/>
|
10 |
-
|
11 |
-
<link href="../css/template.css" rel="stylesheet" media="all"/>
|
12 |
-
|
13 |
-
<!--[if lt IE 9]>
|
14 |
-
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
|
15 |
-
<![endif]-->
|
16 |
-
<script src="../js/jquery-1.7.1.min.js" type="text/javascript"></script>
|
17 |
-
<script src="../js/jquery-ui-1.8.2.custom.min.js" type="text/javascript"></script>
|
18 |
-
<script src="../js/jquery.mousewheel.min.js" type="text/javascript"></script>
|
19 |
-
<script src="../js/bootstrap.js" type="text/javascript"></script>
|
20 |
-
<script src="../js/template.js" type="text/javascript"></script>
|
21 |
-
<script src="../js/prettify/prettify.min.js" type="text/javascript"></script>
|
22 |
-
|
23 |
-
<link rel="shortcut icon" href="../img/favicon.ico"/>
|
24 |
-
<link rel="apple-touch-icon" href="../img/apple-touch-icon.png"/>
|
25 |
-
<link rel="apple-touch-icon" sizes="72x72" href="../img/apple-touch-icon-72x72.png"/>
|
26 |
-
<link rel="apple-touch-icon" sizes="114x114" href="../img/apple-touch-icon-114x114.png"/>
|
27 |
-
</head>
|
28 |
-
<body>
|
29 |
-
|
30 |
-
<div class="navbar navbar-fixed-top">
|
31 |
-
<div class="navbar-inner">
|
32 |
-
<div class="container">
|
33 |
-
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
|
34 |
-
<span class="icon-bar"></span> <span class="icon-bar"></span>
|
35 |
-
<span class="icon-bar"></span> </a>
|
36 |
-
<a class="brand" href="../index.html">Media Library Assistant</a>
|
37 |
-
|
38 |
-
<div class="nav-collapse">
|
39 |
-
<ul class="nav">
|
40 |
-
<li class="dropdown">
|
41 |
-
<a href="#api" class="dropdown-toggle" data-toggle="dropdown">
|
42 |
-
API Documentation <b class="caret"></b>
|
43 |
-
</a>
|
44 |
-
<ul class="dropdown-menu">
|
45 |
-
</ul>
|
46 |
-
</li>
|
47 |
-
<li class="dropdown" id="charts-menu">
|
48 |
-
<a href="#charts" class="dropdown-toggle" data-toggle="dropdown">
|
49 |
-
Charts <b class="caret"></b>
|
50 |
-
</a>
|
51 |
-
<ul class="dropdown-menu">
|
52 |
-
<li>
|
53 |
-
<a href="../graph_class.html">
|
54 |
-
<i class="icon-list-alt"></i> Class hierarchy diagram
|
55 |
-
</a>
|
56 |
-
</li>
|
57 |
-
</ul>
|
58 |
-
</li>
|
59 |
-
<li class="dropdown" id="reports-menu">
|
60 |
-
<a href="#reports" class="dropdown-toggle" data-toggle="dropdown">
|
61 |
-
Reports <b class="caret"></b>
|
62 |
-
</a>
|
63 |
-
<ul class="dropdown-menu">
|
64 |
-
<li>
|
65 |
-
<a href="../errors.html">
|
66 |
-
<i class="icon-list-alt"></i> Errors
|
67 |
-
</a>
|
68 |
-
</li>
|
69 |
-
<li>
|
70 |
-
<a href="../markers.html">
|
71 |
-
<i class="icon-list-alt"></i> Markers
|
72 |
-
</a>
|
73 |
-
</li>
|
74 |
-
<li>
|
75 |
-
<a href="../deprecated.html">
|
76 |
-
<i class="icon-list-alt"></i> Deprecated
|
77 |
-
</a>
|
78 |
-
</li>
|
79 |
-
</ul>
|
80 |
-
</li>
|
81 |
-
</ul>
|
82 |
-
</div>
|
83 |
-
</div>
|
84 |
-
</div>
|
85 |
-
<div class="go_to_top">
|
86 |
-
<a href="#___" style="color: inherit">Back to top  <i class="icon-upload icon-white"></i></a>
|
87 |
-
</div>
|
88 |
-
</div>
|
89 |
-
|
90 |
-
<div id="___" class="container">
|
91 |
-
<noscript>
|
92 |
-
<div class="alert alert-warning">
|
93 |
-
Javascript is disabled; several features are only available if Javascript is enabled.
|
94 |
-
</div>
|
95 |
-
</noscript>
|
96 |
-
|
97 |
-
|
98 |
-
<style>
|
99 |
-
.deprecated h2 {
|
100 |
-
text-decoration: line-through;
|
101 |
-
}
|
102 |
-
</style>
|
103 |
-
<div class="row">
|
104 |
-
<div class="span4">
|
105 |
-
<div class="btn-group view pull-right" data-toggle="buttons-radio">
|
106 |
-
<button class="btn details" title="Show descriptions and method names"><i class="icon-list"></i></button>
|
107 |
-
<button class="btn simple" title="Show only method names"><i class="icon-align-justify"></i></button>
|
108 |
-
</div>
|
109 |
-
<div class="btn-group visibility" data-toggle="buttons-checkbox">
|
110 |
-
<button class="btn public active" title="Show public elements">Public</button>
|
111 |
-
<button class="btn protected" title="Show protected elements">Protected</button>
|
112 |
-
<button class="btn private" title="Show private elements">Private</button>
|
113 |
-
<button class="btn inherited active" title="Show inherited elements">Inherited</button>
|
114 |
-
</div>
|
115 |
-
|
116 |
-
<ul class="side-nav nav nav-list">
|
117 |
-
<li class="nav-header">
|
118 |
-
<i class="icon-custom icon-method"></i> Methods
|
119 |
-
<ul>
|
120 |
-
<li class="method public">
|
121 |
-
<a href="#method___construct" title="__construct :: Define column properties">
|
122 |
-
<span class="description">Define column properties</span><pre>__construct</pre>
|
123 |
-
</a>
|
124 |
-
</li>
|
125 |
-
|
126 |
-
<li class="method public">
|
127 |
-
<a href="#method_editing" title="editing :: Add inline editing support">
|
128 |
-
<span class="description">Add inline editing support</span><pre>editing</pre>
|
129 |
-
</a>
|
130 |
-
</li>
|
131 |
-
|
132 |
-
</ul>
|
133 |
-
</li>
|
134 |
-
<li class="nav-header protected">» Protected
|
135 |
-
<ul>
|
136 |
-
</ul>
|
137 |
-
</li>
|
138 |
-
<li class="nav-header private">» Private
|
139 |
-
<ul>
|
140 |
-
</ul>
|
141 |
-
</li>
|
142 |
-
<li class="nav-header">
|
143 |
-
<i class="icon-custom icon-constant"></i> Constants
|
144 |
-
<ul>
|
145 |
-
</ul>
|
146 |
-
</li>
|
147 |
-
</ul>
|
148 |
-
|
149 |
-
|
150 |
-
</div>
|
151 |
-
|
152 |
-
<div class="span8">
|
153 |
-
<div class="element class">
|
154 |
-
<h1>ACP_Addon_MLA_Column_MenuOrder</h1>
|
155 |
-
<small style="display: block; text-align: right">
|
156 |
-
Extends \AC_Column
|
157 |
-
Implements \ACP_Column_EditingInterface
|
158 |
-
</small>
|
159 |
-
<p class="short_description">Provides inline-editing for menu_order</p>
|
160 |
-
<div class="details">
|
161 |
-
<div class="long_description">
|
162 |
-
|
163 |
-
</div>
|
164 |
-
<table class="table table-bordered">
|
165 |
-
<tr>
|
166 |
-
<th>
|
167 |
-
package
|
168 |
-
</th>
|
169 |
-
<td>
|
170 |
-
|
171 |
-
<p>Media Library Assistant</p>
|
172 |
-
</td>
|
173 |
-
</tr>
|
174 |
-
<tr>
|
175 |
-
<th>
|
176 |
-
since
|
177 |
-
</th>
|
178 |
-
<td>
|
179 |
-
2.52
|
180 |
-
|
181 |
-
</td>
|
182 |
-
</tr>
|
183 |
-
</table>
|
184 |
-
|
185 |
-
<h3><i class="icon-custom icon-method"></i> Methods</h3>
|
186 |
-
<a id="method___construct"></a>
|
187 |
-
<div class="element clickable method public method___construct" data-toggle="collapse" data-target=".method___construct .collapse">
|
188 |
-
<h2>Define column properties</h2>
|
189 |
-
<pre>__construct() </pre>
|
190 |
-
<div class="labels">
|
191 |
-
</div>
|
192 |
-
|
193 |
-
|
194 |
-
<div class="row collapse">
|
195 |
-
<div class="detail-description">
|
196 |
-
<div class="long_description"></div>
|
197 |
-
|
198 |
-
<table class="table">
|
199 |
-
<tr>
|
200 |
-
<th>
|
201 |
-
|
202 |
-
</th>
|
203 |
-
<td>
|
204 |
-
</td>
|
205 |
-
</tr>
|
206 |
-
<tr>
|
207 |
-
<th>
|
208 |
-
|
209 |
-
</th>
|
210 |
-
<td>
|
211 |
-
</td>
|
212 |
-
</tr>
|
213 |
-
</table>
|
214 |
-
|
215 |
-
|
216 |
-
</div>
|
217 |
-
</div>
|
218 |
-
|
219 |
-
</div>
|
220 |
-
<a id="method_editing"></a>
|
221 |
-
<div class="element clickable method public method_editing" data-toggle="collapse" data-target=".method_editing .collapse">
|
222 |
-
<h2>Add inline editing support</h2>
|
223 |
-
<pre>editing() : \ACP_Editing_Model_Post_Order</pre>
|
224 |
-
<div class="labels">
|
225 |
-
</div>
|
226 |
-
|
227 |
-
|
228 |
-
<div class="row collapse">
|
229 |
-
<div class="detail-description">
|
230 |
-
<div class="long_description"></div>
|
231 |
-
|
232 |
-
<table class="table">
|
233 |
-
<tr>
|
234 |
-
<th>
|
235 |
-
|
236 |
-
</th>
|
237 |
-
<td>
|
238 |
-
</td>
|
239 |
-
</tr>
|
240 |
-
</table>
|
241 |
-
|
242 |
-
|
243 |
-
<h3>Response</h3>
|
244 |
-
<code>\ACP_Editing_Model_Post_Order</code><p></p>
|
245 |
-
</div>
|
246 |
-
</div>
|
247 |
-
|
248 |
-
</div>
|
249 |
-
|
250 |
-
|
251 |
-
</div>
|
252 |
-
</div>
|
253 |
-
<a id="\ACP_Addon_MLA_Column_MenuOrder"></a>
|
254 |
-
<ul class="breadcrumb">
|
255 |
-
<li><a href="../index.html"><i class="icon-custom icon-class"></i></a></li>
|
256 |
-
|
257 |
-
|
258 |
-
<li><span class="divider">\</span><a href="../namespaces/default.html">\</a></li>
|
259 |
-
|
260 |
-
<li class="active"><span class="divider">\</span><a href="../classes/ACP_Addon_MLA_Column_MenuOrder.html">ACP_Addon_MLA_Column_MenuOrder</a></li>
|
261 |
-
</ul>
|
262 |
-
</div>
|
263 |
-
</div>
|
264 |
-
|
265 |
-
</div>
|
266 |
-
|
267 |
-
<footer class="span12">
|
268 |
-
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by
|
269 |
-
<a href="http://glyphicons.com/">Glyphicons</a>.<br/>
|
270 |
-
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and<br/>
|
271 |
-
generated on Tue, 11 Jul 2017 20:25:48 -0700.<br/>
|
272 |
-
</footer>
|
273 |
-
</body>
|
274 |
-
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
phpDocs/classes/ACP_Addon_MLA_Column_MimeType.html
DELETED
@@ -1,274 +0,0 @@
|
|
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 » \ACP_Addon_MLA_Column_MimeType
|
7 |
-
</title>
|
8 |
-
<meta name="author" content=""/>
|
9 |
-
<meta name="description" content=""/>
|
10 |
-
|
11 |
-
<link href="../css/template.css" rel="stylesheet" media="all"/>
|
12 |
-
|
13 |
-
<!--[if lt IE 9]>
|
14 |
-
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
|
15 |
-
<![endif]-->
|
16 |
-
<script src="../js/jquery-1.7.1.min.js" type="text/javascript"></script>
|
17 |
-
<script src="../js/jquery-ui-1.8.2.custom.min.js" type="text/javascript"></script>
|
18 |
-
<script src="../js/jquery.mousewheel.min.js" type="text/javascript"></script>
|
19 |
-
<script src="../js/bootstrap.js" type="text/javascript"></script>
|
20 |
-
<script src="../js/template.js" type="text/javascript"></script>
|
21 |
-
<script src="../js/prettify/prettify.min.js" type="text/javascript"></script>
|
22 |
-
|
23 |
-
<link rel="shortcut icon" href="../img/favicon.ico"/>
|
24 |
-
<link rel="apple-touch-icon" href="../img/apple-touch-icon.png"/>
|
25 |
-
<link rel="apple-touch-icon" sizes="72x72" href="../img/apple-touch-icon-72x72.png"/>
|
26 |
-
<link rel="apple-touch-icon" sizes="114x114" href="../img/apple-touch-icon-114x114.png"/>
|
27 |
-
</head>
|
28 |
-
<body>
|
29 |
-
|
30 |
-
<div class="navbar navbar-fixed-top">
|
31 |
-
<div class="navbar-inner">
|
32 |
-
<div class="container">
|
33 |
-
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
|
34 |
-
<span class="icon-bar"></span> <span class="icon-bar"></span>
|
35 |
-
<span class="icon-bar"></span> </a>
|
36 |
-
<a class="brand" href="../index.html">Media Library Assistant</a>
|
37 |
-
|
38 |
-
<div class="nav-collapse">
|
39 |
-
<ul class="nav">
|
40 |
-
<li class="dropdown">
|
41 |
-
<a href="#api" class="dropdown-toggle" data-toggle="dropdown">
|
42 |
-
API Documentation <b class="caret"></b>
|
43 |
-
</a>
|
44 |
-
<ul class="dropdown-menu">
|
45 |
-
</ul>
|
46 |
-
</li>
|
47 |
-
<li class="dropdown" id="charts-menu">
|
48 |
-
<a href="#charts" class="dropdown-toggle" data-toggle="dropdown">
|
49 |
-
Charts <b class="caret"></b>
|
50 |
-
</a>
|
51 |
-
<ul class="dropdown-menu">
|
52 |
-
<li>
|
53 |
-
<a href="../graph_class.html">
|
54 |
-
<i class="icon-list-alt"></i> Class hierarchy diagram
|
55 |
-
</a>
|
56 |
-
</li>
|
57 |
-
</ul>
|
58 |
-
</li>
|
59 |
-
<li class="dropdown" id="reports-menu">
|
60 |
-
<a href="#reports" class="dropdown-toggle" data-toggle="dropdown">
|
61 |
-
Reports <b class="caret"></b>
|
62 |
-
</a>
|
63 |
-
<ul class="dropdown-menu">
|
64 |
-
<li>
|
65 |
-
<a href="../errors.html">
|
66 |
-
<i class="icon-list-alt"></i> Errors
|
67 |
-
</a>
|
68 |
-
</li>
|
69 |
-
<li>
|
70 |
-
<a href="../markers.html">
|
71 |
-
<i class="icon-list-alt"></i> Markers
|
72 |
-
</a>
|
73 |
-
</li>
|
74 |
-
<li>
|
75 |
-
<a href="../deprecated.html">
|
76 |
-
<i class="icon-list-alt"></i> Deprecated
|
77 |
-
</a>
|
78 |
-
</li>
|
79 |
-
</ul>
|
80 |
-
</li>
|
81 |
-
</ul>
|
82 |
-
</div>
|
83 |
-
</div>
|
84 |
-
</div>
|
85 |
-
<div class="go_to_top">
|
86 |
-
<a href="#___" style="color: inherit">Back to top  <i class="icon-upload icon-white"></i></a>
|
87 |
-
</div>
|
88 |
-
</div>
|
89 |
-
|
90 |
-
<div id="___" class="container">
|
91 |
-
<noscript>
|
92 |
-
<div class="alert alert-warning">
|
93 |
-
Javascript is disabled; several features are only available if Javascript is enabled.
|
94 |
-
</div>
|
95 |
-
</noscript>
|
96 |
-
|
97 |
-
|
98 |
-
<style>
|
99 |
-
.deprecated h2 {
|
100 |
-
text-decoration: line-through;
|
101 |
-
}
|
102 |
-
</style>
|
103 |
-
<div class="row">
|
104 |
-
<div class="span4">
|
105 |
-
<div class="btn-group view pull-right" data-toggle="buttons-radio">
|
106 |
-
<button class="btn details" title="Show descriptions and method names"><i class="icon-list"></i></button>
|
107 |
-
<button class="btn simple" title="Show only method names"><i class="icon-align-justify"></i></button>
|
108 |
-
</div>
|
109 |
-
<div class="btn-group visibility" data-toggle="buttons-checkbox">
|
110 |
-
<button class="btn public active" title="Show public elements">Public</button>
|
111 |
-
<button class="btn protected" title="Show protected elements">Protected</button>
|
112 |
-
<button class="btn private" title="Show private elements">Private</button>
|
113 |
-
<button class="btn inherited active" title="Show inherited elements">Inherited</button>
|
114 |
-
</div>
|
115 |
-
|
116 |
-
<ul class="side-nav nav nav-list">
|
117 |
-
<li class="nav-header">
|
118 |
-
<i class="icon-custom icon-method"></i> Methods
|
119 |
-
<ul>
|
120 |
-
<li class="method public">
|
121 |
-
<a href="#method___construct" title="__construct :: Define column properties">
|
122 |
-
<span class="description">Define column properties</span><pre>__construct</pre>
|
123 |
-
</a>
|
124 |
-
</li>
|
125 |
-
|
126 |
-
<li class="method public">
|
127 |
-
<a href="#method_editing" title="editing :: Add inline editing support">
|
128 |
-
<span class="description">Add inline editing support</span><pre>editing</pre>
|
129 |
-
</a>
|
130 |
-
</li>
|
131 |
-
|
132 |
-
</ul>
|
133 |
-
</li>
|
134 |
-
<li class="nav-header protected">» Protected
|
135 |
-
<ul>
|
136 |
-
</ul>
|
137 |
-
</li>
|
138 |
-
<li class="nav-header private">» Private
|
139 |
-
<ul>
|
140 |
-
</ul>
|
141 |
-
</li>
|
142 |
-
<li class="nav-header">
|
143 |
-
<i class="icon-custom icon-constant"></i> Constants
|
144 |
-
<ul>
|
145 |
-
</ul>
|
146 |
-
</li>
|
147 |
-
</ul>
|
148 |
-
|
149 |
-
|
150 |
-
</div>
|
151 |
-
|
152 |
-
<div class="span8">
|
153 |
-
<div class="element class">
|
154 |
-
<h1>ACP_Addon_MLA_Column_MimeType</h1>
|
155 |
-
<small style="display: block; text-align: right">
|
156 |
-
Extends \AC_Column_Media_MimeType
|
157 |
-
Implements \ACP_Column_EditingInterface
|
158 |
-
</small>
|
159 |
-
<p class="short_description">Provides inline-editing for caption</p>
|
160 |
-
<div class="details">
|
161 |
-
<div class="long_description">
|
162 |
-
|
163 |
-
</div>
|
164 |
-
<table class="table table-bordered">
|
165 |
-
<tr>
|
166 |
-
<th>
|
167 |
-
package
|
168 |
-
</th>
|
169 |
-
<td>
|
170 |
-
|
171 |
-
<p>Media Library Assistant</p>
|
172 |
-
</td>
|
173 |
-
</tr>
|
174 |
-
<tr>
|
175 |
-
<th>
|
176 |
-
since
|
177 |
-
</th>
|
178 |
-
<td>
|
179 |
-
2.52
|
180 |
-
|
181 |
-
</td>
|
182 |
-
</tr>
|
183 |
-
</table>
|
184 |
-
|
185 |
-
<h3><i class="icon-custom icon-method"></i> Methods</h3>
|
186 |
-
<a id="method___construct"></a>
|
187 |
-
<div class="element clickable method public method___construct" data-toggle="collapse" data-target=".method___construct .collapse">
|
188 |
-
<h2>Define column properties</h2>
|
189 |
-
<pre>__construct() </pre>
|
190 |
-
<div class="labels">
|
191 |
-
</div>
|
192 |
-
|
193 |
-
|
194 |
-
<div class="row collapse">
|
195 |
-
<div class="detail-description">
|
196 |
-
<div class="long_description"></div>
|
197 |
-
|
198 |
-
<table class="table">
|
199 |
-
<tr>
|
200 |
-
<th>
|
201 |
-
|
202 |
-
</th>
|
203 |
-
<td>
|
204 |
-
</td>
|
205 |
-
</tr>
|
206 |
-
<tr>
|
207 |
-
<th>
|
208 |
-
|
209 |
-
</th>
|
210 |
-
<td>
|
211 |
-
</td>
|
212 |
-
</tr>
|
213 |
-
</table>
|
214 |
-
|
215 |
-
|
216 |
-
</div>
|
217 |
-
</div>
|
218 |
-
|
219 |
-
</div>
|
220 |
-
<a id="method_editing"></a>
|
221 |
-
<div class="element clickable method public method_editing" data-toggle="collapse" data-target=".method_editing .collapse">
|
222 |
-
<h2>Add inline editing support</h2>
|
223 |
-
<pre>editing() : \ACP_Editing_Model_Post_Content</pre>
|
224 |
-
<div class="labels">
|
225 |
-
</div>
|
226 |
-
|
227 |
-
|
228 |
-
<div class="row collapse">
|
229 |
-
<div class="detail-description">
|
230 |
-
<div class="long_description"></div>
|
231 |
-
|
232 |
-
<table class="table">
|
233 |
-
<tr>
|
234 |
-
<th>
|
235 |
-
|
236 |
-
</th>
|
237 |
-
<td>
|
238 |
-
</td>
|
239 |
-
</tr>
|
240 |
-
</table>
|
241 |
-
|
242 |
-
|
243 |
-
<h3>Response</h3>
|
244 |
-
<code>\ACP_Editing_Model_Post_Content</code><p></p>
|
245 |
-
</div>
|
246 |
-
</div>
|
247 |
-
|
248 |
-
</div>
|
249 |
-
|
250 |
-
|
251 |
-
</div>
|
252 |
-
</div>
|
253 |
-
<a id="\ACP_Addon_MLA_Column_MimeType"></a>
|
254 |
-
<ul class="breadcrumb">
|
255 |
-
<li><a href="../index.html"><i class="icon-custom icon-class"></i></a></li>
|
256 |
-
|
257 |
-
|
258 |
-
<li><span class="divider">\</span><a href="../namespaces/default.html">\</a></li>
|
259 |
-
|
260 |
-
<li class="active"><span class="divider">\</span><a href="../classes/ACP_Addon_MLA_Column_MimeType.html">ACP_Addon_MLA_Column_MimeType</a></li>
|
261 |
-
</ul>
|
262 |
-
</div>
|
263 |
-
</div>
|
264 |
-
|
265 |
-
</div>
|
266 |
-
|
267 |
-
<footer class="span12">
|
268 |
-
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by
|
269 |
-
<a href="http://glyphicons.com/">Glyphicons</a>.<br/>
|
270 |
-
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and<br/>
|
271 |
-
generated on Tue, 11 Jul 2017 20:25:48 -0700.<br/>
|
272 |
-
</footer>
|
273 |
-
</body>
|
274 |
-
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
phpDocs/classes/ACP_Addon_MLA_Column_Parent.html
DELETED
@@ -1,238 +0,0 @@
|
|
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 » \ACP_Addon_MLA_Column_Parent
|
7 |
-
</title>
|
8 |
-
<meta name="author" content=""/>
|
9 |
-
<meta name="description" content=""/>
|
10 |
-
|
11 |
-
<link href="../css/template.css" rel="stylesheet" media="all"/>
|
12 |
-
|
13 |
-
<!--[if lt IE 9]>
|
14 |
-
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
|
15 |
-
<![endif]-->
|
16 |
-
<script src="../js/jquery-1.7.1.min.js" type="text/javascript"></script>
|
17 |
-
<script src="../js/jquery-ui-1.8.2.custom.min.js" type="text/javascript"></script>
|
18 |
-
<script src="../js/jquery.mousewheel.min.js" type="text/javascript"></script>
|
19 |
-
<script src="../js/bootstrap.js" type="text/javascript"></script>
|
20 |
-
<script src="../js/template.js" type="text/javascript"></script>
|
21 |
-
<script src="../js/prettify/prettify.min.js" type="text/javascript"></script>
|
22 |
-
|
23 |
-
<link rel="shortcut icon" href="../img/favicon.ico"/>
|
24 |
-
<link rel="apple-touch-icon" href="../img/apple-touch-icon.png"/>
|
25 |
-
<link rel="apple-touch-icon" sizes="72x72" href="../img/apple-touch-icon-72x72.png"/>
|
26 |
-
<link rel="apple-touch-icon" sizes="114x114" href="../img/apple-touch-icon-114x114.png"/>
|
27 |
-
</head>
|
28 |
-
<body>
|
29 |
-
|
30 |
-
<div class="navbar navbar-fixed-top">
|
31 |
-
<div class="navbar-inner">
|
32 |
-
<div class="container">
|
33 |
-
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
|
34 |
-
<span class="icon-bar"></span> <span class="icon-bar"></span>
|
35 |
-
<span class="icon-bar"></span> </a>
|
36 |
-
<a class="brand" href="../index.html">Media Library Assistant</a>
|
37 |
-
|
38 |
-
<div class="nav-collapse">
|
39 |
-
<ul class="nav">
|
40 |
-
<li class="dropdown">
|
41 |
-
<a href="#api" class="dropdown-toggle" data-toggle="dropdown">
|
42 |
-
API Documentation <b class="caret"></b>
|
43 |
-
</a>
|
44 |
-
<ul class="dropdown-menu">
|
45 |
-
</ul>
|
46 |
-
</li>
|
47 |
-
<li class="dropdown" id="charts-menu">
|
48 |
-
<a href="#charts" class="dropdown-toggle" data-toggle="dropdown">
|
49 |
-
Charts <b class="caret"></b>
|
50 |
-
</a>
|
51 |
-
<ul class="dropdown-menu">
|
52 |
-
<li>
|
53 |
-
<a href="../graph_class.html">
|
54 |
-
<i class="icon-list-alt"></i> Class hierarchy diagram
|
55 |
-
</a>
|
56 |
-
</li>
|
57 |
-
</ul>
|
58 |
-
</li>
|
59 |
-
<li class="dropdown" id="reports-menu">
|
60 |
-
<a href="#reports" class="dropdown-toggle" data-toggle="dropdown">
|
61 |
-
Reports <b class="caret"></b>
|
62 |
-
</a>
|
63 |
-
<ul class="dropdown-menu">
|
64 |
-
<li>
|
65 |
-
<a href="../errors.html">
|
66 |
-
<i class="icon-list-alt"></i> Errors
|
67 |
-
</a>
|
68 |
-
</li>
|
69 |
-
<li>
|
70 |
-
<a href="../markers.html">
|
71 |
-
<i class="icon-list-alt"></i> Markers
|
72 |
-
</a>
|
73 |
-
</li>
|
74 |
-
<li>
|
75 |
-
<a href="../deprecated.html">
|
76 |
-
<i class="icon-list-alt"></i> Deprecated
|
77 |
-
</a>
|
78 |
-
</li>
|
79 |
-
</ul>
|
80 |
-
</li>
|
81 |
-
</ul>
|
82 |
-
</div>
|
83 |
-
</div>
|
84 |
-
</div>
|
85 |
-
<div class="go_to_top">
|
86 |
-
<a href="#___" style="color: inherit">Back to top  <i class="icon-upload icon-white"></i></a>
|
87 |
-
</div>
|
88 |
-
</div>
|
89 |
-
|
90 |
-
<div id="___" class="container">
|
91 |
-
<noscript>
|
92 |
-
<div class="alert alert-warning">
|
93 |
-
Javascript is disabled; several features are only available if Javascript is enabled.
|
94 |
-
</div>
|
95 |
-
</noscript>
|
96 |
-
|
97 |
-
|
98 |
-
<style>
|
99 |
-
.deprecated h2 {
|
100 |
-
text-decoration: line-through;
|
101 |
-
}
|
102 |
-
</style>
|
103 |
-
<div class="row">
|
104 |
-
<div class="span4">
|
105 |
-
<div class="btn-group view pull-right" data-toggle="buttons-radio">
|
106 |
-
<button class="btn details" title="Show descriptions and method names"><i class="icon-list"></i></button>
|
107 |
-
<button class="btn simple" title="Show only method names"><i class="icon-align-justify"></i></button>
|
108 |
-
</div>
|
109 |
-
<div class="btn-group visibility" data-toggle="buttons-checkbox">
|
110 |
-
<button class="btn public active" title="Show public elements">Public</button>
|
111 |
-
<button class="btn protected" title="Show protected elements">Protected</button>
|
112 |
-
<button class="btn private" title="Show private elements">Private</button>
|
113 |
-
<button class="btn inherited active" title="Show inherited elements">Inherited</button>
|
114 |
-
</div>
|
115 |
-
|
116 |
-
<ul class="side-nav nav nav-list">
|
117 |
-
<li class="nav-header">
|
118 |
-
<i class="icon-custom icon-method"></i> Methods
|
119 |
-
<ul>
|
120 |
-
<li class="method public">
|
121 |
-
<a href="#method_register_settings" title="register_settings :: Remove default column width">
|
122 |
-
<span class="description">Remove default column width</span><pre>register_settings</pre>
|
123 |
-
</a>
|
124 |
-
</li>
|
125 |
-
|
126 |
-
</ul>
|
127 |
-
</li>
|
128 |
-
<li class="nav-header protected">» Protected
|
129 |
-
<ul>
|
130 |
-
</ul>
|
131 |
-
</li>
|
132 |
-
<li class="nav-header private">» Private
|
133 |
-
<ul>
|
134 |
-
</ul>
|
135 |
-
</li>
|
136 |
-
<li class="nav-header">
|
137 |
-
<i class="icon-custom icon-constant"></i> Constants
|
138 |
-
<ul>
|
139 |
-
</ul>
|
140 |
-
</li>
|
141 |
-
</ul>
|
142 |
-
|
143 |
-
|
144 |
-
</div>
|
145 |
-
|
146 |
-
<div class="span8">
|
147 |
-
<div class="element class">
|
148 |
-
<h1>ACP_Addon_MLA_Column_Parent</h1>
|
149 |
-
<small style="display: block; text-align: right">
|
150 |
-
Extends \AC_Column_Media_Parent
|
151 |
-
</small>
|
152 |
-
<p class="short_description">Removes ACP defaults for parent</p>
|
153 |
-
<div class="details">
|
154 |
-
<div class="long_description">
|
155 |
-
|
156 |
-
</div>
|
157 |
-
<table class="table table-bordered">
|
158 |
-
<tr>
|
159 |
-
<th>
|
160 |
-
package
|
161 |
-
</th>
|
162 |
-
<td>
|
163 |
-
|
164 |
-
<p>Media Library Assistant</p>
|
165 |
-
</td>
|
166 |
-
</tr>
|
167 |
-
<tr>
|
168 |
-
<th>
|
169 |
-
since
|
170 |
-
</th>
|
171 |
-
<td>
|
172 |
-
2.52
|
173 |
-
|
174 |
-
</td>
|
175 |
-
</tr>
|
176 |
-
</table>
|
177 |
-
|
178 |
-
<h3><i class="icon-custom icon-method"></i> Methods</h3>
|
179 |
-
<a id="method_register_settings"></a>
|
180 |
-
<div class="element clickable method public method_register_settings" data-toggle="collapse" data-target=".method_register_settings .collapse">
|
181 |
-
<h2>Remove default column width</h2>
|
182 |
-
<pre>register_settings() </pre>
|
183 |
-
<div class="labels">
|
184 |
-
</div>
|
185 |
-
|
186 |
-
|
187 |
-
<div class="row collapse">
|
188 |
-
<div class="detail-description">
|
189 |
-
<div class="long_description"></div>
|
190 |
-
|
191 |
-
<table class="table">
|
192 |
-
<tr>
|
193 |
-
<th>
|
194 |
-
|
195 |
-
</th>
|
196 |
-
<td>
|
197 |
-
</td>
|
198 |
-
</tr>
|
199 |
-
<tr>
|
200 |
-
<th>
|
201 |
-
|
202 |
-
</th>
|
203 |
-
<td>
|
204 |
-
</td>
|
205 |
-
</tr>
|
206 |
-
</table>
|
207 |
-
|
208 |
-
|
209 |
-
</div>
|
210 |
-
</div>
|
211 |
-
|
212 |
-
</div>
|
213 |
-
|
214 |
-
|
215 |
-
</div>
|
216 |
-
</div>
|
217 |
-
<a id="\ACP_Addon_MLA_Column_Parent"></a>
|
218 |
-
<ul class="breadcrumb">
|
219 |
-
<li><a href="../index.html"><i class="icon-custom icon-class"></i></a></li>
|
220 |
-
|
221 |
-
|
222 |
-
<li><span class="divider">\</span><a href="../namespaces/default.html">\</a></li>
|
223 |
-
|
224 |
-
<li class="active"><span class="divider">\</span><a href="../classes/ACP_Addon_MLA_Column_Parent.html">ACP_Addon_MLA_Column_Parent</a></li>
|
225 |
-
</ul>
|
226 |
-
</div>
|
227 |
-
</div>
|
228 |
-
|
229 |
-
</div>
|
230 |
-
|
231 |
-
<footer class="span12">
|
232 |
-
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by
|
233 |
-
<a href="http://glyphicons.com/">Glyphicons</a>.<br/>
|
234 |
-
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and<br/>
|
235 |
-
generated on Tue, 11 Jul 2017 20:25:48 -0700.<br/>
|
236 |
-
</footer>
|
237 |
-
</body>
|
238 |
-
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
phpDocs/classes/ACP_Addon_MLA_Column_Title.html
DELETED
@@ -1,274 +0,0 @@
|
|
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 » \ACP_Addon_MLA_Column_Title
|
7 |
-
</title>
|
8 |
-
<meta name="author" content=""/>
|
9 |
-
<meta name="description" content=""/>
|
10 |
-
|
11 |
-
<link href="../css/template.css" rel="stylesheet" media="all"/>
|
12 |
-
|
13 |
-
<!--[if lt IE 9]>
|
14 |
-
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
|
15 |
-
<![endif]-->
|
16 |
-
<script src="../js/jquery-1.7.1.min.js" type="text/javascript"></script>
|
17 |
-
<script src="../js/jquery-ui-1.8.2.custom.min.js" type="text/javascript"></script>
|
18 |
-
<script src="../js/jquery.mousewheel.min.js" type="text/javascript"></script>
|
19 |
-
<script src="../js/bootstrap.js" type="text/javascript"></script>
|
20 |
-
<script src="../js/template.js" type="text/javascript"></script>
|
21 |
-
<script src="../js/prettify/prettify.min.js" type="text/javascript"></script>
|
22 |
-
|
23 |
-
<link rel="shortcut icon" href="../img/favicon.ico"/>
|
24 |
-
<link rel="apple-touch-icon" href="../img/apple-touch-icon.png"/>
|
25 |
-
<link rel="apple-touch-icon" sizes="72x72" href="../img/apple-touch-icon-72x72.png"/>
|
26 |
-
<link rel="apple-touch-icon" sizes="114x114" href="../img/apple-touch-icon-114x114.png"/>
|
27 |
-
</head>
|
28 |
-
<body>
|
29 |
-
|
30 |
-
<div class="navbar navbar-fixed-top">
|
31 |
-
<div class="navbar-inner">
|
32 |
-
<div class="container">
|
33 |
-
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
|
34 |
-
<span class="icon-bar"></span> <span class="icon-bar"></span>
|
35 |
-
<span class="icon-bar"></span> </a>
|
36 |
-
<a class="brand" href="../index.html">Media Library Assistant</a>
|
37 |
-
|
38 |
-
<div class="nav-collapse">
|
39 |
-
<ul class="nav">
|
40 |
-
<li class="dropdown">
|
41 |
-
<a href="#api" class="dropdown-toggle" data-toggle="dropdown">
|
42 |
-
API Documentation <b class="caret"></b>
|
43 |
-
</a>
|
44 |
-
<ul class="dropdown-menu">
|
45 |
-
</ul>
|
46 |
-
</li>
|
47 |
-
<li class="dropdown" id="charts-menu">
|
48 |
-
<a href="#charts" class="dropdown-toggle" data-toggle="dropdown">
|
49 |
-
Charts <b class="caret"></b>
|
50 |
-
</a>
|
51 |
-
<ul class="dropdown-menu">
|
52 |
-
<li>
|
53 |
-
<a href="../graph_class.html">
|
54 |
-
<i class="icon-list-alt"></i> Class hierarchy diagram
|
55 |
-
</a>
|
56 |
-
</li>
|
57 |
-
</ul>
|
58 |
-
</li>
|
59 |
-
<li class="dropdown" id="reports-menu">
|
60 |
-
<a href="#reports" class="dropdown-toggle" data-toggle="dropdown">
|
61 |
-
Reports <b class="caret"></b>
|
62 |
-
</a>
|
63 |
-
<ul class="dropdown-menu">
|
64 |
-
<li>
|
65 |
-
<a href="../errors.html">
|
66 |
-
<i class="icon-list-alt"></i> Errors
|
67 |
-
</a>
|
68 |
-
</li>
|
69 |
-
<li>
|
70 |
-
<a href="../markers.html">
|
71 |
-
<i class="icon-list-alt"></i> Markers
|
72 |
-
</a>
|
73 |
-
</li>
|
74 |
-
<li>
|
75 |
-
<a href="../deprecated.html">
|
76 |
-
<i class="icon-list-alt"></i> Deprecated
|
77 |
-
</a>
|
78 |
-
</li>
|
79 |
-
</ul>
|
80 |
-
</li>
|
81 |
-
</ul>
|
82 |
-
</div>
|
83 |
-
</div>
|
84 |
-
</div>
|
85 |
-
<div class="go_to_top">
|
86 |
-
<a href="#___" style="color: inherit">Back to top  <i class="icon-upload icon-white"></i></a>
|
87 |
-
</div>
|
88 |
-
</div>
|
89 |
-
|
90 |
-
<div id="___" class="container">
|
91 |
-
<noscript>
|
92 |
-
<div class="alert alert-warning">
|
93 |
-
Javascript is disabled; several features are only available if Javascript is enabled.
|
94 |
-
</div>
|
95 |
-
</noscript>
|
96 |
-
|
97 |
-
|
98 |
-
<style>
|
99 |
-
.deprecated h2 {
|
100 |
-
text-decoration: line-through;
|
101 |
-
}
|
102 |
-
</style>
|
103 |
-
<div class="row">
|
104 |
-
<div class="span4">
|
105 |
-
<div class="btn-group view pull-right" data-toggle="buttons-radio">
|
106 |
-
<button class="btn details" title="Show descriptions and method names"><i class="icon-list"></i></button>
|
107 |
-
<button class="btn simple" title="Show only method names"><i class="icon-align-justify"></i></button>
|
108 |
-
</div>
|
109 |
-
<div class="btn-group visibility" data-toggle="buttons-checkbox">
|
110 |
-
<button class="btn public active" title="Show public elements">Public</button>
|
111 |
-
<button class="btn protected" title="Show protected elements">Protected</button>
|
112 |
-
<button class="btn private" title="Show private elements">Private</button>
|
113 |
-
<button class="btn inherited active" title="Show inherited elements">Inherited</button>
|
114 |
-
</div>
|
115 |
-
|
116 |
-
<ul class="side-nav nav nav-list">
|
117 |
-
<li class="nav-header">
|
118 |
-
<i class="icon-custom icon-method"></i> Methods
|
119 |
-
<ul>
|
120 |
-
<li class="method public">
|
121 |
-
<a href="#method___construct" title="__construct :: Define column properties">
|
122 |
-
<span class="description">Define column properties</span><pre>__construct</pre>
|
123 |
-
</a>
|
124 |
-
</li>
|
125 |
-
|
126 |
-
<li class="method public">
|
127 |
-
<a href="#method_editing" title="editing :: Add inline editing support">
|
128 |
-
<span class="description">Add inline editing support</span><pre>editing</pre>
|
129 |
-
</a>
|
130 |
-
</li>
|
131 |
-
|
132 |
-
</ul>
|
133 |
-
</li>
|
134 |
-
<li class="nav-header protected">» Protected
|
135 |
-
<ul>
|
136 |
-
</ul>
|
137 |
-
</li>
|
138 |
-
<li class="nav-header private">» Private
|
139 |
-
<ul>
|
140 |
-
</ul>
|
141 |
-
</li>
|
142 |
-
<li class="nav-header">
|
143 |
-
<i class="icon-custom icon-constant"></i> Constants
|
144 |
-
<ul>
|
145 |
-
</ul>
|
146 |
-
</li>
|
147 |
-
</ul>
|
148 |
-
|
149 |
-
|
150 |
-
</div>
|
151 |
-
|
152 |
-
<div class="span8">
|
153 |
-
<div class="element class">
|
154 |
-
<h1>ACP_Addon_MLA_Column_Title</h1>
|
155 |
-
<small style="display: block; text-align: right">
|
156 |
-
Extends \AC_Column_Media_Title
|
157 |
-
Implements \ACP_Column_EditingInterface
|
158 |
-
</small>
|
159 |
-
<p class="short_description">Provides inline-editing for post_title</p>
|
160 |
-
<div class="details">
|
161 |
-
<div class="long_description">
|
162 |
-
|
163 |
-
</div>
|
164 |
-
<table class="table table-bordered">
|
165 |
-
<tr>
|
166 |
-
<th>
|
167 |
-
package
|
168 |
-
</th>
|
169 |
-
<td>
|
170 |
-
|
171 |
-
<p>Media Library Assistant</p>
|
172 |
-
</td>
|
173 |
-
</tr>
|
174 |
-
<tr>
|
175 |
-
<th>
|
176 |
-
since
|
177 |
-
</th>
|
178 |
-
<td>
|
179 |
-
2.52
|
180 |
-
|
181 |
-
</td>
|
182 |
-
</tr>
|
183 |
-
</table>
|
184 |
-
|
185 |
-
<h3><i class="icon-custom icon-method"></i> Methods</h3>
|
186 |
-
<a id="method___construct"></a>
|
187 |
-
<div class="element clickable method public method___construct" data-toggle="collapse" data-target=".method___construct .collapse">
|
188 |
-
<h2>Define column properties</h2>
|
189 |
-
<pre>__construct() </pre>
|
190 |
-
<div class="labels">
|
191 |
-
</div>
|
192 |
-
|
193 |
-
|
194 |
-
<div class="row collapse">
|
195 |
-
<div class="detail-description">
|
196 |
-
<div class="long_description"></div>
|
197 |
-
|
198 |
-
<table class="table">
|
199 |
-
<tr>
|
200 |
-
<th>
|
201 |
-
|
202 |
-
</th>
|
203 |
-
<td>
|
204 |
-
</td>
|
205 |
-
</tr>
|
206 |
-
<tr>
|
207 |
-
<th>
|
208 |
-
|
209 |
-
</th>
|
210 |
-
<td>
|
211 |
-
</td>
|
212 |
-
</tr>
|
213 |
-
</table>
|
214 |
-
|
215 |
-
|
216 |
-
</div>
|
217 |
-
</div>
|
218 |
-
|
219 |
-
</div>
|
220 |
-
<a id="method_editing"></a>
|
221 |
-
<div class="element clickable method public method_editing" data-toggle="collapse" data-target=".method_editing .collapse">
|
222 |
-
<h2>Add inline editing support</h2>
|
223 |
-
<pre>editing() : \ACP_Editing_Model_Media_Title</pre>
|
224 |
-
<div class="labels">
|
225 |
-
</div>
|
226 |
-
|
227 |
-
|
228 |
-
<div class="row collapse">
|
229 |
-
<div class="detail-description">
|
230 |
-
<div class="long_description"></div>
|
231 |
-
|
232 |
-
<table class="table">
|
233 |
-
<tr>
|
234 |
-
<th>
|
235 |
-
|
236 |
-
</th>
|
237 |
-
<td>
|
238 |
-
</td>
|
239 |
-
</tr>
|
240 |
-
</table>
|
241 |
-
|
242 |
-
|
243 |
-
<h3>Response</h3>
|
244 |
-
<code>\ACP_Editing_Model_Media_Title</code><p></p>
|
245 |
-
</div>
|
246 |
-
</div>
|
247 |
-
|
248 |
-
</div>
|
249 |
-
|
250 |
-
|
251 |
-
</div>
|
252 |
-
</div>
|
253 |
-
<a id="\ACP_Addon_MLA_Column_Title"></a>
|
254 |
-
<ul class="breadcrumb">
|
255 |
-
<li><a href="../index.html"><i class="icon-custom icon-class"></i></a></li>
|
256 |
-
|
257 |
-
|
258 |
-
<li><span class="divider">\</span><a href="../namespaces/default.html">\</a></li>
|
259 |
-
|
260 |
-
<li class="active"><span class="divider">\</span><a href="../classes/ACP_Addon_MLA_Column_Title.html">ACP_Addon_MLA_Column_Title</a></li>
|
261 |
-
</ul>
|
262 |
-
</div>
|
263 |
-
</div>
|
264 |
-
|
265 |
-
</div>
|
266 |
-
|
267 |
-
<footer class="span12">
|
268 |
-
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by
|
269 |
-
<a href="http://glyphicons.com/">Glyphicons</a>.<br/>
|
270 |
-
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and<br/>
|
271 |
-
generated on Tue, 11 Jul 2017 20:25:48 -0700.<br/>
|
272 |
-
</footer>
|
273 |
-
</body>
|
274 |
-
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
phpDocs/classes/ACP_Addon_MLA_Editing_Model_Media_Title.html
DELETED
@@ -1,238 +0,0 @@
|
|
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 » \ACP_Addon_MLA_Editing_Model_Media_Title
|
7 |
-
</title>
|
8 |
-
<meta name="author" content=""/>
|
9 |
-
<meta name="description" content=""/>
|
10 |
-
|
11 |
-
<link href="../css/template.css" rel="stylesheet" media="all"/>
|
12 |
-
|
13 |
-
<!--[if lt IE 9]>
|
14 |
-
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
|
15 |
-
<![endif]-->
|
16 |
-
<script src="../js/jquery-1.7.1.min.js" type="text/javascript"></script>
|
17 |
-
<script src="../js/jquery-ui-1.8.2.custom.min.js" type="text/javascript"></script>
|
18 |
-
<script src="../js/jquery.mousewheel.min.js" type="text/javascript"></script>
|
19 |
-
<script src="../js/bootstrap.js" type="text/javascript"></script>
|
20 |
-
<script src="../js/template.js" type="text/javascript"></script>
|
21 |
-
<script src="../js/prettify/prettify.min.js" type="text/javascript"></script>
|
22 |
-
|
23 |
-
<link rel="shortcut icon" href="../img/favicon.ico"/>
|
24 |
-
<link rel="apple-touch-icon" href="../img/apple-touch-icon.png"/>
|
25 |
-
<link rel="apple-touch-icon" sizes="72x72" href="../img/apple-touch-icon-72x72.png"/>
|
26 |
-
<link rel="apple-touch-icon" sizes="114x114" href="../img/apple-touch-icon-114x114.png"/>
|
27 |
-
</head>
|
28 |
-
<body>
|
29 |
-
|
30 |
-
<div class="navbar navbar-fixed-top">
|
31 |
-
<div class="navbar-inner">
|
32 |
-
<div class="container">
|
33 |
-
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
|
34 |
-
<span class="icon-bar"></span> <span class="icon-bar"></span>
|
35 |
-
<span class="icon-bar"></span> </a>
|
36 |
-
<a class="brand" href="../index.html">Media Library Assistant</a>
|
37 |
-
|
38 |
-
<div class="nav-collapse">
|
39 |
-
<ul class="nav">
|
40 |
-
<li class="dropdown">
|
41 |
-
<a href="#api" class="dropdown-toggle" data-toggle="dropdown">
|
42 |
-
API Documentation <b class="caret"></b>
|
43 |
-
</a>
|
44 |
-
<ul class="dropdown-menu">
|
45 |
-
</ul>
|
46 |
-
</li>
|
47 |
-
<li class="dropdown" id="charts-menu">
|
48 |
-
<a href="#charts" class="dropdown-toggle" data-toggle="dropdown">
|
49 |
-
Charts <b class="caret"></b>
|
50 |
-
</a>
|
51 |
-
<ul class="dropdown-menu">
|
52 |
-
<li>
|
53 |
-
<a href="../graph_class.html">
|
54 |
-
<i class="icon-list-alt"></i> Class hierarchy diagram
|
55 |
-
</a>
|
56 |
-
</li>
|
57 |
-
</ul>
|
58 |
-
</li>
|
59 |
-
<li class="dropdown" id="reports-menu">
|
60 |
-
<a href="#reports" class="dropdown-toggle" data-toggle="dropdown">
|
61 |
-
Reports <b class="caret"></b>
|
62 |
-
</a>
|
63 |
-
<ul class="dropdown-menu">
|
64 |
-
<li>
|
65 |
-
<a href="../errors.html">
|
66 |
-
<i class="icon-list-alt"></i> Errors
|
67 |
-
</a>
|
68 |
-
</li>
|
69 |
-
<li>
|
70 |
-
<a href="../markers.html">
|
71 |
-
<i class="icon-list-alt"></i> Markers
|
72 |
-
</a>
|
73 |
-
</li>
|
74 |
-
<li>
|
75 |
-
<a href="../deprecated.html">
|
76 |
-
<i class="icon-list-alt"></i> Deprecated
|
77 |
-
</a>
|
78 |
-
</li>
|
79 |
-
</ul>
|
80 |
-
</li>
|
81 |
-
</ul>
|
82 |
-
</div>
|
83 |
-
</div>
|
84 |
-
</div>
|
85 |
-
<div class="go_to_top">
|
86 |
-
<a href="#___" style="color: inherit">Back to top  <i class="icon-upload icon-white"></i></a>
|
87 |
-
</div>
|
88 |
-
</div>
|
89 |
-
|
90 |
-
<div id="___" class="container">
|
91 |
-
<noscript>
|
92 |
-
<div class="alert alert-warning">
|
93 |
-
Javascript is disabled; several features are only available if Javascript is enabled.
|
94 |
-
</div>
|
95 |
-
</noscript>
|
96 |
-
|
97 |
-
|
98 |
-
<style>
|
99 |
-
.deprecated h2 {
|
100 |
-
text-decoration: line-through;
|
101 |
-
}
|
102 |
-
</style>
|
103 |
-
<div class="row">
|
104 |
-
<div class="span4">
|
105 |
-
<div class="btn-group view pull-right" data-toggle="buttons-radio">
|
106 |
-
<button class="btn details" title="Show descriptions and method names"><i class="icon-list"></i></button>
|
107 |
-
<button class="btn simple" title="Show only method names"><i class="icon-align-justify"></i></button>
|
108 |
-
</div>
|
109 |
-
<div class="btn-group visibility" data-toggle="buttons-checkbox">
|
110 |
-
<button class="btn public active" title="Show public elements">Public</button>
|
111 |
-
<button class="btn protected" title="Show protected elements">Protected</button>
|
112 |
-
<button class="btn private" title="Show private elements">Private</button>
|
113 |
-
<button class="btn inherited active" title="Show inherited elements">Inherited</button>
|
114 |
-
</div>
|
115 |
-
|
116 |
-
<ul class="side-nav nav nav-list">
|
117 |
-
<li class="nav-header">
|
118 |
-
<i class="icon-custom icon-method"></i> Methods
|
119 |
-
<ul>
|
120 |
-
<li class="method public">
|
121 |
-
<a href="#method_get_view_settings" title="get_view_settings :: Remove JavaScript selector settings">
|
122 |
-
<span class="description">Remove JavaScript selector settings</span><pre>get_view_settings</pre>
|
123 |
-
</a>
|
124 |
-
</li>
|
125 |
-
|
126 |
-
</ul>
|
127 |
-
</li>
|
128 |
-
<li class="nav-header protected">» Protected
|
129 |
-
<ul>
|
130 |
-
</ul>
|
131 |
-
</li>
|
132 |
-
<li class="nav-header private">» Private
|
133 |
-
<ul>
|
134 |
-
</ul>
|
135 |
-
</li>
|
136 |
-
<li class="nav-header">
|
137 |
-
<i class="icon-custom icon-constant"></i> Constants
|
138 |
-
<ul>
|
139 |
-
</ul>
|
140 |
-
</li>
|
141 |
-
</ul>
|
142 |
-
|
143 |
-
|
144 |
-
</div>
|
145 |
-
|
146 |
-
<div class="span8">
|
147 |
-
<div class="element class">
|
148 |
-
<h1>ACP_Addon_MLA_Editing_Model_Media_Title</h1>
|
149 |
-
<small style="display: block; text-align: right">
|
150 |
-
Extends \ACP_Editing_Model_Media_Title
|
151 |
-
</small>
|
152 |
-
<p class="short_description">Provides view_settings for MLA's post_title</p>
|
153 |
-
<div class="details">
|
154 |
-
<div class="long_description">
|
155 |
-
|
156 |
-
</div>
|
157 |
-
<table class="table table-bordered">
|
158 |
-
<tr>
|
159 |
-
<th>
|
160 |
-
package
|
161 |
-
</th>
|
162 |
-
<td>
|
163 |
-
|
164 |
-
<p>Media Library Assistant</p>
|
165 |
-
</td>
|
166 |
-
</tr>
|
167 |
-
<tr>
|
168 |
-
<th>
|
169 |
-
since
|
170 |
-
</th>
|
171 |
-
<td>
|
172 |
-
2.52
|
173 |
-
|
174 |
-
</td>
|
175 |
-
</tr>
|
176 |
-
</table>
|
177 |
-
|
178 |
-
<h3><i class="icon-custom icon-method"></i> Methods</h3>
|
179 |
-
<a id="method_get_view_settings"></a>
|
180 |
-
<div class="element clickable method public method_get_view_settings" data-toggle="collapse" data-target=".method_get_view_settings .collapse">
|
181 |
-
<h2>Remove JavaScript selector settings</h2>
|
182 |
-
<pre>get_view_settings() </pre>
|
183 |
-
<div class="labels">
|
184 |
-
</div>
|
185 |
-
|
186 |
-
|
187 |
-
<div class="row collapse">
|
188 |
-
<div class="detail-description">
|
189 |
-
<div class="long_description"></div>
|
190 |
-
|
191 |
-
<table class="table">
|
192 |
-
<tr>
|
193 |
-
<th>
|
194 |
-
|
195 |
-
</th>
|
196 |
-
<td>
|
197 |
-
</td>
|
198 |
-
</tr>
|
199 |
-
<tr>
|
200 |
-
<th>
|
201 |
-
|
202 |
-
</th>
|
203 |
-
<td>
|
204 |
-
</td>
|
205 |
-
</tr>
|
206 |
-
</table>
|
207 |
-
|
208 |
-
|
209 |
-
</div>
|
210 |
-
</div>
|
211 |
-
|
212 |
-
</div>
|
213 |
-
|
214 |
-
|
215 |
-
</div>
|
216 |
-
</div>
|
217 |
-
<a id="\ACP_Addon_MLA_Editing_Model_Media_Title"></a>
|
218 |
-
<ul class="breadcrumb">
|
219 |
-
<li><a href="../index.html"><i class="icon-custom icon-class"></i></a></li>
|
220 |
-
|
221 |
-
|
222 |
-
<li><span class="divider">\</span><a href="../namespaces/default.html">\</a></li>
|
223 |
-
|
224 |
-
<li class="active"><span class="divider">\</span><a href="../classes/ACP_Addon_MLA_Editing_Model_Media_Title.html">ACP_Addon_MLA_Editing_Model_Media_Title</a></li>
|
225 |
-
</ul>
|
226 |
-
</div>
|
227 |
-
</div>
|
228 |
-
|
229 |
-
</div>
|
230 |
-
|
231 |
-
<footer class="span12">
|
232 |
-
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by
|
233 |
-
<a href="http://glyphicons.com/">Glyphicons</a>.<br/>
|
234 |
-
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and<br/>
|
235 |
-
generated on Tue, 11 Jul 2017 20:25:48 -0700.<br/>
|
236 |
-
</footer>
|
237 |
-
</body>
|
238 |
-
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
phpDocs/classes/ACP_Addon_MLA_Editing_Strategy.html
DELETED
@@ -1,242 +0,0 @@
|
|
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 » \ACP_Addon_MLA_Editing_Strategy
|
7 |
-
</title>
|
8 |
-
<meta name="author" content=""/>
|
9 |
-
<meta name="description" content=""/>
|
10 |
-
|
11 |
-
<link href="../css/template.css" rel="stylesheet" media="all"/>
|
12 |
-
|
13 |
-
<!--[if lt IE 9]>
|
14 |
-
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
|
15 |
-
<![endif]-->
|
16 |
-
<script src="../js/jquery-1.7.1.min.js" type="text/javascript"></script>
|
17 |
-
<script src="../js/jquery-ui-1.8.2.custom.min.js" type="text/javascript"></script>
|
18 |
-
<script src="../js/jquery.mousewheel.min.js" type="text/javascript"></script>
|
19 |
-
<script src="../js/bootstrap.js" type="text/javascript"></script>
|
20 |
-
<script src="../js/template.js" type="text/javascript"></script>
|
21 |
-
<script src="../js/prettify/prettify.min.js" type="text/javascript"></script>
|
22 |
-
|
23 |
-
<link rel="shortcut icon" href="../img/favicon.ico"/>
|
24 |
-
<link rel="apple-touch-icon" href="../img/apple-touch-icon.png"/>
|
25 |
-
<link rel="apple-touch-icon" sizes="72x72" href="../img/apple-touch-icon-72x72.png"/>
|
26 |
-
<link rel="apple-touch-icon" sizes="114x114" href="../img/apple-touch-icon-114x114.png"/>
|
27 |
-
</head>
|
28 |
-
<body>
|
29 |
-
|
30 |
-
<div class="navbar navbar-fixed-top">
|
31 |
-
<div class="navbar-inner">
|
32 |
-
<div class="container">
|
33 |
-
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
|
34 |
-
<span class="icon-bar"></span> <span class="icon-bar"></span>
|
35 |
-
<span class="icon-bar"></span> </a>
|
36 |
-
<a class="brand" href="../index.html">Media Library Assistant</a>
|
37 |
-
|
38 |
-
<div class="nav-collapse">
|
39 |
-
<ul class="nav">
|
40 |
-
<li class="dropdown">
|
41 |
-
<a href="#api" class="dropdown-toggle" data-toggle="dropdown">
|
42 |
-
API Documentation <b class="caret"></b>
|
43 |
-
</a>
|
44 |
-
<ul class="dropdown-menu">
|
45 |
-
</ul>
|
46 |
-
</li>
|
47 |
-
<li class="dropdown" id="charts-menu">
|
48 |
-
<a href="#charts" class="dropdown-toggle" data-toggle="dropdown">
|
49 |
-
Charts <b class="caret"></b>
|
50 |
-
</a>
|
51 |
-
<ul class="dropdown-menu">
|
52 |
-
<li>
|
53 |
-
<a href="../graph_class.html">
|
54 |
-
<i class="icon-list-alt"></i> Class hierarchy diagram
|
55 |
-
</a>
|
56 |
-
</li>
|
57 |
-
</ul>
|
58 |
-
</li>
|
59 |
-
<li class="dropdown" id="reports-menu">
|
60 |
-
<a href="#reports" class="dropdown-toggle" data-toggle="dropdown">
|
61 |
-
Reports <b class="caret"></b>
|
62 |
-
</a>
|
63 |
-
<ul class="dropdown-menu">
|
64 |
-
<li>
|
65 |
-
<a href="../errors.html">
|
66 |
-
<i class="icon-list-alt"></i> Errors
|
67 |
-
</a>
|
68 |
-
</li>
|
69 |
-
<li>
|
70 |
-
<a href="../markers.html">
|
71 |
-
<i class="icon-list-alt"></i> Markers
|
72 |
-
</a>
|
73 |
-
</li>
|
74 |
-
<li>
|
75 |
-
<a href="../deprecated.html">
|
76 |
-
<i class="icon-list-alt"></i> Deprecated
|
77 |
-
</a>
|
78 |
-
</li>
|
79 |
-
</ul>
|
80 |
-
</li>
|
81 |
-
</ul>
|
82 |
-
</div>
|
83 |
-
</div>
|
84 |
-
</div>
|
85 |
-
<div class="go_to_top">
|
86 |
-
<a href="#___" style="color: inherit">Back to top  <i class="icon-upload icon-white"></i></a>
|
87 |
-
</div>
|
88 |
-
</div>
|
89 |
-
|
90 |
-
<div id="___" class="container">
|
91 |
-
<noscript>
|
92 |
-
<div class="alert alert-warning">
|
93 |
-
Javascript is disabled; several features are only available if Javascript is enabled.
|
94 |
-
</div>
|
95 |
-
</noscript>
|
96 |
-
|
97 |
-
|
98 |
-
<style>
|
99 |
-
.deprecated h2 {
|
100 |
-
text-decoration: line-through;
|
101 |
-
}
|
102 |
-
</style>
|
103 |
-
<div class="row">
|
104 |
-
<div class="span4">
|
105 |
-
<div class="btn-group view pull-right" data-toggle="buttons-radio">
|
106 |
-
<button class="btn details" title="Show descriptions and method names"><i class="icon-list"></i></button>
|
107 |
-
<button class="btn simple" title="Show only method names"><i class="icon-align-justify"></i></button>
|
108 |
-
</div>
|
109 |
-
<div class="btn-group visibility" data-toggle="buttons-checkbox">
|
110 |
-
<button class="btn public active" title="Show public elements">Public</button>
|
111 |
-
<button class="btn protected" title="Show protected elements">Protected</button>
|
112 |
-
<button class="btn private" title="Show private elements">Private</button>
|
113 |
-
<button class="btn inherited active" title="Show inherited elements">Inherited</button>
|
114 |
-
</div>
|
115 |
-
|
116 |
-
<ul class="side-nav nav nav-list">
|
117 |
-
<li class="nav-header">
|
118 |
-
<i class="icon-custom icon-method"></i> Methods
|
119 |
-
<ul>
|
120 |
-
<li class="method public">
|
121 |
-
<a href="#method_get_rows" title="get_rows :: Get the available items on the current page for passing them to JS">
|
122 |
-
<span class="description">Get the available items on the current page for passing them to JS</span><pre>get_rows</pre>
|
123 |
-
</a>
|
124 |
-
</li>
|
125 |
-
|
126 |
-
</ul>
|
127 |
-
</li>
|
128 |
-
<li class="nav-header protected">» Protected
|
129 |
-
<ul>
|
130 |
-
</ul>
|
131 |
-
</li>
|
132 |
-
<li class="nav-header private">» Private
|
133 |
-
<ul>
|
134 |
-
</ul>
|
135 |
-
</li>
|
136 |
-
<li class="nav-header">
|
137 |
-
<i class="icon-custom icon-constant"></i> Constants
|
138 |
-
<ul>
|
139 |
-
</ul>
|
140 |
-
</li>
|
141 |
-
</ul>
|
142 |
-
|
143 |
-
|
144 |
-
</div>
|
145 |
-
|
146 |
-
<div class="span8">
|
147 |
-
<div class="element class">
|
148 |
-
<h1>ACP_Addon_MLA_Editing_Strategy</h1>
|
149 |
-
<small style="display: block; text-align: right">
|
150 |
-
Extends \ACP_Editing_Strategy_Post
|
151 |
-
</small>
|
152 |
-
<p class="short_description">Class Admin Columns Addon MLA (Media Library Assistant) Editing Strategy supports the Admin Columns plugin</p>
|
153 |
-
<div class="details">
|
154 |
-
<div class="long_description">
|
155 |
-
|
156 |
-
</div>
|
157 |
-
<table class="table table-bordered">
|
158 |
-
<tr>
|
159 |
-
<th>
|
160 |
-
package
|
161 |
-
</th>
|
162 |
-
<td>
|
163 |
-
|
164 |
-
<p>Media Library Assistant</p>
|
165 |
-
</td>
|
166 |
-
</tr>
|
167 |
-
<tr>
|
168 |
-
<th>
|
169 |
-
since
|
170 |
-
</th>
|
171 |
-
<td>
|
172 |
-
2.50
|
173 |
-
|
174 |
-
</td>
|
175 |
-
</tr>
|
176 |
-
</table>
|
177 |
-
|
178 |
-
<h3><i class="icon-custom icon-method"></i> Methods</h3>
|
179 |
-
<a id="method_get_rows"></a>
|
180 |
-
<div class="element clickable method public method_get_rows" data-toggle="collapse" data-target=".method_get_rows .collapse">
|
181 |
-
<h2>Get the available items on the current page for passing them to JS</h2>
|
182 |
-
<pre>get_rows() : array</pre>
|
183 |
-
<div class="labels">
|
184 |
-
</div>
|
185 |
-
|
186 |
-
|
187 |
-
<div class="row collapse">
|
188 |
-
<div class="detail-description">
|
189 |
-
<div class="long_description"></div>
|
190 |
-
|
191 |
-
<table class="table">
|
192 |
-
<tr>
|
193 |
-
<th>
|
194 |
-
since
|
195 |
-
</th>
|
196 |
-
<td>
|
197 |
-
2.50
|
198 |
-
|
199 |
-
</td>
|
200 |
-
</tr>
|
201 |
-
<tr>
|
202 |
-
<th>
|
203 |
-
|
204 |
-
</th>
|
205 |
-
<td>
|
206 |
-
</td>
|
207 |
-
</tr>
|
208 |
-
</table>
|
209 |
-
|
210 |
-
|
211 |
-
<h3>Response</h3>
|
212 |
-
<code>array</code><p><p>Items on the current page ([entry_id] => (array) [entry_data])</p></p>
|
213 |
-
</div>
|
214 |
-
</div>
|
215 |
-
|
216 |
-
</div>
|
217 |
-
|
218 |
-
|
219 |
-
</div>
|
220 |
-
</div>
|
221 |
-
<a id="\ACP_Addon_MLA_Editing_Strategy"></a>
|
222 |
-
<ul class="breadcrumb">
|
223 |
-
<li><a href="../index.html"><i class="icon-custom icon-class"></i></a></li>
|
224 |
-
|
225 |
-
|
226 |
-
<li><span class="divider">\</span><a href="../namespaces/default.html">\</a></li>
|
227 |
-
|
228 |
-
<li class="active"><span class="divider">\</span><a href="../classes/ACP_Addon_MLA_Editing_Strategy.html">ACP_Addon_MLA_Editing_Strategy</a></li>
|
229 |
-
</ul>
|
230 |
-
</div>
|
231 |
-
</div>
|
232 |
-
|
233 |
-
</div>
|
234 |
-
|
235 |
-
<footer class="span12">
|
236 |
-
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by
|
237 |
-
<a href="http://glyphicons.com/">Glyphicons</a>.<br/>
|
238 |
-
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and<br/>
|
239 |
-
generated on Tue, 11 Jul 2017 20:25:48 -0700.<br/>
|
240 |
-
</footer>
|
241 |
-
</body>
|
242 |
-
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
phpDocs/classes/AC_Addon_MLA_ListScreen.html
DELETED
@@ -1,648 +0,0 @@
|
|
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 » \AC_Addon_MLA_ListScreen
|
7 |
-
</title>
|
8 |
-
<meta name="author" content=""/>
|
9 |
-
<meta name="description" content=""/>
|
10 |
-
|
11 |
-
<link href="../css/template.css" rel="stylesheet" media="all"/>
|
12 |
-
|
13 |
-
<!--[if lt IE 9]>
|
14 |
-
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
|
15 |
-
<![endif]-->
|
16 |
-
<script src="../js/jquery-1.7.1.min.js" type="text/javascript"></script>
|
17 |
-
<script src="../js/jquery-ui-1.8.2.custom.min.js" type="text/javascript"></script>
|
18 |
-
<script src="../js/jquery.mousewheel.min.js" type="text/javascript"></script>
|
19 |
-
<script src="../js/bootstrap.js" type="text/javascript"></script>
|
20 |
-
<script src="../js/template.js" type="text/javascript"></script>
|
21 |
-
<script src="../js/prettify/prettify.min.js" type="text/javascript"></script>
|
22 |
-
|
23 |
-
<link rel="shortcut icon" href="../img/favicon.ico"/>
|
24 |
-
<link rel="apple-touch-icon" href="../img/apple-touch-icon.png"/>
|
25 |
-
<link rel="apple-touch-icon" sizes="72x72" href="../img/apple-touch-icon-72x72.png"/>
|
26 |
-
<link rel="apple-touch-icon" sizes="114x114" href="../img/apple-touch-icon-114x114.png"/>
|
27 |
-
</head>
|
28 |
-
<body>
|
29 |
-
|
30 |
-
<div class="navbar navbar-fixed-top">
|
31 |
-
<div class="navbar-inner">
|
32 |
-
<div class="container">
|
33 |
-
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
|
34 |
-
<span class="icon-bar"></span> <span class="icon-bar"></span>
|
35 |
-
<span class="icon-bar"></span> </a>
|
36 |
-
<a class="brand" href="../index.html">Media Library Assistant</a>
|
37 |
-
|
38 |
-
<div class="nav-collapse">
|
39 |
-
<ul class="nav">
|
40 |
-
<li class="dropdown">
|
41 |
-
<a href="#api" class="dropdown-toggle" data-toggle="dropdown">
|
42 |
-
API Documentation <b class="caret"></b>
|
43 |
-
</a>
|
44 |
-
<ul class="dropdown-menu">
|
45 |
-
</ul>
|
46 |
-
</li>
|
47 |
-
<li class="dropdown" id="charts-menu">
|
48 |
-
<a href="#charts" class="dropdown-toggle" data-toggle="dropdown">
|
49 |
-
Charts <b class="caret"></b>
|
50 |
-
</a>
|
51 |
-
<ul class="dropdown-menu">
|
52 |
-
<li>
|
53 |
-
<a href="../graph_class.html">
|
54 |
-
<i class="icon-list-alt"></i> Class hierarchy diagram
|
55 |
-
</a>
|
56 |
-
</li>
|
57 |
-
</ul>
|
58 |
-
</li>
|
59 |
-
<li class="dropdown" id="reports-menu">
|
60 |
-
<a href="#reports" class="dropdown-toggle" data-toggle="dropdown">
|
61 |
-
Reports <b class="caret"></b>
|
62 |
-
</a>
|
63 |
-
<ul class="dropdown-menu">
|
64 |
-
<li>
|
65 |
-
<a href="../errors.html">
|
66 |
-
<i class="icon-list-alt"></i> Errors
|
67 |
-
</a>
|
68 |
-
</li>
|
69 |
-
<li>
|
70 |
-
<a href="../markers.html">
|
71 |
-
<i class="icon-list-alt"></i> Markers
|
72 |
-
</a>
|
73 |
-
</li>
|
74 |
-
<li>
|
75 |
-
<a href="../deprecated.html">
|
76 |
-
<i class="icon-list-alt"></i> Deprecated
|
77 |
-
</a>
|
78 |
-
</li>
|
79 |
-
</ul>
|
80 |
-
</li>
|
81 |
-
</ul>
|
82 |
-
</div>
|
83 |
-
</div>
|
84 |
-
</div>
|
85 |
-
<div class="go_to_top">
|
86 |
-
<a href="#___" style="color: inherit">Back to top  <i class="icon-upload icon-white"></i></a>
|
87 |
-
</div>
|
88 |
-
</div>
|
89 |
-
|
90 |
-
<div id="___" class="container">
|
91 |
-
<noscript>
|
92 |
-
<div class="alert alert-warning">
|
93 |
-
Javascript is disabled; several features are only available if Javascript is enabled.
|
94 |
-
</div>
|
95 |
-
</noscript>
|
96 |
-
|
97 |
-
|
98 |
-
<style>
|
99 |
-
.deprecated h2 {
|
100 |
-
text-decoration: line-through;
|
101 |
-
}
|
102 |
-
</style>
|
103 |
-
<div class="row">
|
104 |
-
<div class="span4">
|
105 |
-
<div class="btn-group view pull-right" data-toggle="buttons-radio">
|
106 |
-
<button class="btn details" title="Show descriptions and method names"><i class="icon-list"></i></button>
|
107 |
-
<button class="btn simple" title="Show only method names"><i class="icon-align-justify"></i></button>
|
108 |
-
</div>
|
109 |
-
<div class="btn-group visibility" data-toggle="buttons-checkbox">
|
110 |
-
<button class="btn public active" title="Show public elements">Public</button>
|
111 |
-
<button class="btn protected" title="Show protected elements">Protected</button>
|
112 |
-
<button class="btn private" title="Show private elements">Private</button>
|
113 |
-
<button class="btn inherited active" title="Show inherited elements">Inherited</button>
|
114 |
-
</div>
|
115 |
-
|
116 |
-
<ul class="side-nav nav nav-list">
|
117 |
-
<li class="nav-header">
|
118 |
-
<i class="icon-custom icon-method"></i> Methods
|
119 |
-
<ul>
|
120 |
-
<li class="method public">
|
121 |
-
<a href="#method___construct" title="__construct :: Initializes some properties, installs filters and then
|
122 |
-
calls the parent constructor to set some default configs.">
|
123 |
-
<span class="description">Initializes some properties, installs filters and then
|
124 |
-
calls the parent constructor to set some default configs.</span><pre>__construct</pre>
|
125 |
-
</a>
|
126 |
-
</li>
|
127 |
-
|
128 |
-
<li class="method public">
|
129 |
-
<a href="#method_column_default_value" title="column_default_value :: Return the column value">
|
130 |
-
<span class="description">Return the column value</span><pre>column_default_value</pre>
|
131 |
-
</a>
|
132 |
-
</li>
|
133 |
-
|
134 |
-
<li class="method public">
|
135 |
-
<a href="#method_get_column_headers" title="get_column_headers :: Default column headers">
|
136 |
-
<span class="description">Default column headers</span><pre>get_column_headers</pre>
|
137 |
-
</a>
|
138 |
-
</li>
|
139 |
-
|
140 |
-
<li class="method public">
|
141 |
-
<a href="#method_get_list_table" title="get_list_table :: Create and return a new MLA List Table object">
|
142 |
-
<span class="description">Create and return a new MLA List Table object</span><pre>get_list_table</pre>
|
143 |
-
</a>
|
144 |
-
</li>
|
145 |
-
|
146 |
-
<li class="method public">
|
147 |
-
<a href="#method_inline_column_types" title="inline_column_types :: Add inline editing columns to Media/Assistant submenu table">
|
148 |
-
<span class="description">Add inline editing columns to Media/Assistant submenu table</span><pre>inline_column_types</pre>
|
149 |
-
</a>
|
150 |
-
</li>
|
151 |
-
|
152 |
-
<li class="method public">
|
153 |
-
<a href="#method_is_current_screen" title="is_current_screen :: Test for current screen = the Media/Assistant submenu screen,
|
154 |
-
For Admin Columns 2.4.9+">
|
155 |
-
<span class="description">Test for current screen = the Media/Assistant submenu screen,
|
156 |
-
For Admin Columns 2.4.9+</span><pre>is_current_screen</pre>
|
157 |
-
</a>
|
158 |
-
</li>
|
159 |
-
|
160 |
-
<li class="method public">
|
161 |
-
<a href="#method_remove_column_types" title="remove_column_types :: Remove duplicate columns from the Admin Columns "Custom" section">
|
162 |
-
<span class="description">Remove duplicate columns from the Admin Columns "Custom" section</span><pre>remove_column_types</pre>
|
163 |
-
</a>
|
164 |
-
</li>
|
165 |
-
|
166 |
-
<li class="method public">
|
167 |
-
<a href="#method_remove_custom_columns" title="remove_custom_columns :: Remove duplicate columns from the Admin Columns "Custom" section">
|
168 |
-
<span class="description">Remove duplicate columns from the Admin Columns "Custom" section</span><pre>remove_custom_columns</pre>
|
169 |
-
</a>
|
170 |
-
</li>
|
171 |
-
|
172 |
-
<li class="method public">
|
173 |
-
<a href="#method_set_manage_value_callback" title="set_manage_value_callback :: Contains the hook that contains the manage_value callback">
|
174 |
-
<span class="description">Contains the hook that contains the manage_value callback</span><pre>set_manage_value_callback</pre>
|
175 |
-
</a>
|
176 |
-
</li>
|
177 |
-
|
178 |
-
</ul>
|
179 |
-
</li>
|
180 |
-
<li class="nav-header protected">» Protected
|
181 |
-
<ul>
|
182 |
-
<li class="method protected">
|
183 |
-
<a href="#method_get_object_by_id" title="get_object_by_id :: Return">
|
184 |
-
<span class="description">Return</span><pre>get_object_by_id</pre>
|
185 |
-
</a>
|
186 |
-
</li>
|
187 |
-
</ul>
|
188 |
-
</li>
|
189 |
-
<li class="nav-header private">» Private
|
190 |
-
<ul>
|
191 |
-
</ul>
|
192 |
-
</li>
|
193 |
-
<li class="nav-header">
|
194 |
-
<i class="icon-custom icon-constant"></i> Constants
|
195 |
-
<ul>
|
196 |
-
</ul>
|
197 |
-
</li>
|
198 |
-
</ul>
|
199 |
-
|
200 |
-
|
201 |
-
</div>
|
202 |
-
|
203 |
-
<div class="span8">
|
204 |
-
<div class="element class">
|
205 |
-
<h1>AC_Addon_MLA_ListScreen</h1>
|
206 |
-
<small style="display: block; text-align: right">
|
207 |
-
Extends \AC_ListScreen_Media
|
208 |
-
</small>
|
209 |
-
<p class="short_description">Class Admin Columns Addon MLA (Media Library Assistant) List Screen supports the Admin Columns plugin</p>
|
210 |
-
<div class="details">
|
211 |
-
<div class="long_description">
|
212 |
-
|
213 |
-
</div>
|
214 |
-
<table class="table table-bordered">
|
215 |
-
<tr>
|
216 |
-
<th>
|
217 |
-
package
|
218 |
-
</th>
|
219 |
-
<td>
|
220 |
-
|
221 |
-
<p>Media Library Assistant</p>
|
222 |
-
</td>
|
223 |
-
</tr>
|
224 |
-
<tr>
|
225 |
-
<th>
|
226 |
-
since
|
227 |
-
</th>
|
228 |
-
<td>
|
229 |
-
2.50
|
230 |
-
|
231 |
-
</td>
|
232 |
-
</tr>
|
233 |
-
</table>
|
234 |
-
|
235 |
-
<h3><i class="icon-custom icon-method"></i> Methods</h3>
|
236 |
-
<a id="method___construct"></a>
|
237 |
-
<div class="element clickable method public method___construct" data-toggle="collapse" data-target=".method___construct .collapse">
|
238 |
-
<h2>Initializes some properties, installs filters and then
|
239 |
-
calls the parent constructor to set some default configs.</h2>
|
240 |
-
<pre>__construct() </pre>
|
241 |
-
<div class="labels">
|
242 |
-
</div>
|
243 |
-
|
244 |
-
|
245 |
-
<div class="row collapse">
|
246 |
-
<div class="detail-description">
|
247 |
-
<div class="long_description"></div>
|
248 |
-
|
249 |
-
<table class="table">
|
250 |
-
<tr>
|
251 |
-
<th>
|
252 |
-
since
|
253 |
-
</th>
|
254 |
-
<td>
|
255 |
-
2.50
|
256 |
-
|
257 |
-
</td>
|
258 |
-
</tr>
|
259 |
-
<tr>
|
260 |
-
<th>
|
261 |
-
|
262 |
-
</th>
|
263 |
-
<td>
|
264 |
-
</td>
|
265 |
-
</tr>
|
266 |
-
<tr>
|
267 |
-
<th>
|
268 |
-
|
269 |
-
</th>
|
270 |
-
<td>
|
271 |
-
</td>
|
272 |
-
</tr>
|
273 |
-
</table>
|
274 |
-
|
275 |
-
|
276 |
-
</div>
|
277 |
-
</div>
|
278 |
-
|
279 |
-
</div>
|
280 |
-
<a id="method_column_default_value"></a>
|
281 |
-
<div class="element clickable method public method_column_default_value" data-toggle="collapse" data-target=".method_column_default_value .collapse">
|
282 |
-
<h2>Return the column value</h2>
|
283 |
-
<pre>column_default_value(string|null $content, \WP_Post $post, string $column_name) : string|false</pre>
|
284 |
-
<div class="labels">
|
285 |
-
</div>
|
286 |
-
|
287 |
-
|
288 |
-
<div class="row collapse">
|
289 |
-
<div class="detail-description">
|
290 |
-
<div class="long_description"></div>
|
291 |
-
|
292 |
-
<table class="table">
|
293 |
-
</table>
|
294 |
-
|
295 |
-
<h3>Arguments</h3>
|
296 |
-
<div class="subelement argument">
|
297 |
-
<h4>$content</h4>
|
298 |
-
<code>string|null</code><p></p>
|
299 |
-
</div>
|
300 |
-
<div class="subelement argument">
|
301 |
-
<h4>$post</h4>
|
302 |
-
<code>\WP_Post</code><p></p>
|
303 |
-
</div>
|
304 |
-
<div class="subelement argument">
|
305 |
-
<h4>$column_name</h4>
|
306 |
-
<code>string</code><p></p>
|
307 |
-
</div>
|
308 |
-
|
309 |
-
<h3>Response</h3>
|
310 |
-
<code>string|false</code><p></p>
|
311 |
-
</div>
|
312 |
-
</div>
|
313 |
-
|
314 |
-
</div>
|
315 |
-
<a id="method_get_column_headers"></a>
|
316 |
-
<div class="element clickable method public method_get_column_headers" data-toggle="collapse" data-target=".method_get_column_headers .collapse">
|
317 |
-
<h2>Default column headers</h2>
|
318 |
-
<pre>get_column_headers() : array</pre>
|
319 |
-
<div class="labels">
|
320 |
-
</div>
|
321 |
-
|
322 |
-
|
323 |
-
<div class="row collapse">
|
324 |
-
<div class="detail-description">
|
325 |
-
<div class="long_description"></div>
|
326 |
-
|
327 |
-
<table class="table">
|
328 |
-
<tr>
|
329 |
-
<th>
|
330 |
-
since
|
331 |
-
</th>
|
332 |
-
<td>
|
333 |
-
2.50
|
334 |
-
|
335 |
-
</td>
|
336 |
-
</tr>
|
337 |
-
<tr>
|
338 |
-
<th>
|
339 |
-
|
340 |
-
</th>
|
341 |
-
<td>
|
342 |
-
</td>
|
343 |
-
</tr>
|
344 |
-
</table>
|
345 |
-
|
346 |
-
|
347 |
-
<h3>Response</h3>
|
348 |
-
<code>array</code><p></p>
|
349 |
-
</div>
|
350 |
-
</div>
|
351 |
-
|
352 |
-
</div>
|
353 |
-
<a id="method_get_list_table"></a>
|
354 |
-
<div class="element clickable method public method_get_list_table" data-toggle="collapse" data-target=".method_get_list_table .collapse">
|
355 |
-
<h2>Create and return a new MLA List Table object</h2>
|
356 |
-
<pre>get_list_table(array $args = array()) : \WP_List_Table|false</pre>
|
357 |
-
<div class="labels">
|
358 |
-
</div>
|
359 |
-
|
360 |
-
|
361 |
-
<div class="row collapse">
|
362 |
-
<div class="detail-description">
|
363 |
-
<div class="long_description"></div>
|
364 |
-
|
365 |
-
<table class="table">
|
366 |
-
</table>
|
367 |
-
|
368 |
-
<h3>Arguments</h3>
|
369 |
-
<div class="subelement argument">
|
370 |
-
<h4>$args</h4>
|
371 |
-
<code>array</code><p></p>
|
372 |
-
</div>
|
373 |
-
|
374 |
-
<h3>Response</h3>
|
375 |
-
<code>\WP_List_Table|false</code><p></p>
|
376 |
-
</div>
|
377 |
-
</div>
|
378 |
-
|
379 |
-
</div>
|
380 |
-
<a id="method_get_object_by_id"></a>
|
381 |
-
<div class="element clickable method protected method_get_object_by_id" data-toggle="collapse" data-target=".method_get_object_by_id .collapse">
|
382 |
-
<h2>Return</h2>
|
383 |
-
<pre>get_object_by_id(integer $post_id) : object</pre>
|
384 |
-
<div class="labels">
|
385 |
-
</div>
|
386 |
-
|
387 |
-
|
388 |
-
<div class="row collapse">
|
389 |
-
<div class="detail-description">
|
390 |
-
<div class="long_description"></div>
|
391 |
-
|
392 |
-
<table class="table">
|
393 |
-
<tr>
|
394 |
-
<th>
|
395 |
-
since
|
396 |
-
</th>
|
397 |
-
<td>
|
398 |
-
2.52
|
399 |
-
|
400 |
-
</td>
|
401 |
-
</tr>
|
402 |
-
</table>
|
403 |
-
|
404 |
-
<h3>Arguments</h3>
|
405 |
-
<div class="subelement argument">
|
406 |
-
<h4>$post_id</h4>
|
407 |
-
<code>integer</code><p></p>
|
408 |
-
</div>
|
409 |
-
|
410 |
-
<h3>Response</h3>
|
411 |
-
<code>object</code><p><p>attachment object</p></p>
|
412 |
-
</div>
|
413 |
-
</div>
|
414 |
-
|
415 |
-
</div>
|
416 |
-
<a id="method_inline_column_types"></a>
|
417 |
-
<div class="element clickable method public method_inline_column_types" data-toggle="collapse" data-target=".method_inline_column_types .collapse">
|
418 |
-
<h2>Add inline editing columns to Media/Assistant submenu table</h2>
|
419 |
-
<pre>inline_column_types(\AC_ListScreen $listscreen) </pre>
|
420 |
-
<div class="labels">
|
421 |
-
<span class="label">static</span> </div>
|
422 |
-
|
423 |
-
|
424 |
-
<div class="row collapse">
|
425 |
-
<div class="detail-description">
|
426 |
-
<div class="long_description"></div>
|
427 |
-
|
428 |
-
<table class="table">
|
429 |
-
<tr>
|
430 |
-
<th>
|
431 |
-
since
|
432 |
-
</th>
|
433 |
-
<td>
|
434 |
-
2.52
|
435 |
-
|
436 |
-
</td>
|
437 |
-
</tr>
|
438 |
-
<tr>
|
439 |
-
<th>
|
440 |
-
|
441 |
-
</th>
|
442 |
-
<td>
|
443 |
-
</td>
|
444 |
-
</tr>
|
445 |
-
</table>
|
446 |
-
|
447 |
-
<h3>Arguments</h3>
|
448 |
-
<div class="subelement argument">
|
449 |
-
<h4>$listscreen</h4>
|
450 |
-
<code>\AC_ListScreen</code><p></p>
|
451 |
-
</div>
|
452 |
-
|
453 |
-
</div>
|
454 |
-
</div>
|
455 |
-
|
456 |
-
</div>
|
457 |
-
<a id="method_is_current_screen"></a>
|
458 |
-
<div class="element clickable method public method_is_current_screen" data-toggle="collapse" data-target=".method_is_current_screen .collapse">
|
459 |
-
<h2>Test for current screen = the Media/Assistant submenu screen,
|
460 |
-
For Admin Columns 2.4.9+</h2>
|
461 |
-
<pre>is_current_screen(object $wp_screen) : boolean</pre>
|
462 |
-
<div class="labels">
|
463 |
-
</div>
|
464 |
-
|
465 |
-
|
466 |
-
<div class="row collapse">
|
467 |
-
<div class="detail-description">
|
468 |
-
<div class="long_description"></div>
|
469 |
-
|
470 |
-
<table class="table">
|
471 |
-
<tr>
|
472 |
-
<th>
|
473 |
-
since
|
474 |
-
</th>
|
475 |
-
<td>
|
476 |
-
2.23
|
477 |
-
|
478 |
-
</td>
|
479 |
-
</tr>
|
480 |
-
</table>
|
481 |
-
|
482 |
-
<h3>Arguments</h3>
|
483 |
-
<div class="subelement argument">
|
484 |
-
<h4>$wp_screen</h4>
|
485 |
-
<code>object</code><p></p>
|
486 |
-
</div>
|
487 |
-
|
488 |
-
<h3>Response</h3>
|
489 |
-
<code>boolean</code><p><p>true if the Media/Assistant submenu is the current screen</p></p>
|
490 |
-
</div>
|
491 |
-
</div>
|
492 |
-
|
493 |
-
</div>
|
494 |
-
<a id="method_remove_column_types"></a>
|
495 |
-
<div class="element clickable method public method_remove_column_types" data-toggle="collapse" data-target=".method_remove_column_types .collapse">
|
496 |
-
<h2>Remove duplicate columns from the Admin Columns "Custom" section</h2>
|
497 |
-
<pre>remove_column_types(\AC_ListScreen $listscreen) </pre>
|
498 |
-
<div class="labels">
|
499 |
-
<span class="label">static</span> </div>
|
500 |
-
|
501 |
-
|
502 |
-
<div class="row collapse">
|
503 |
-
<div class="detail-description">
|
504 |
-
<div class="long_description"></div>
|
505 |
-
|
506 |
-
<table class="table">
|
507 |
-
<tr>
|
508 |
-
<th>
|
509 |
-
since
|
510 |
-
</th>
|
511 |
-
<td>
|
512 |
-
2.50
|
513 |
-
|
514 |
-
</td>
|
515 |
-
</tr>
|
516 |
-
<tr>
|
517 |
-
<th>
|
518 |
-
|
519 |
-
</th>
|
520 |
-
<td>
|
521 |
-
</td>
|
522 |
-
</tr>
|
523 |
-
</table>
|
524 |
-
|
525 |
-
<h3>Arguments</h3>
|
526 |
-
<div class="subelement argument">
|
527 |
-
<h4>$listscreen</h4>
|
528 |
-
<code>\AC_ListScreen</code><p></p>
|
529 |
-
</div>
|
530 |
-
|
531 |
-
</div>
|
532 |
-
</div>
|
533 |
-
|
534 |
-
</div>
|
535 |
-
<a id="method_remove_custom_columns"></a>
|
536 |
-
<div class="element clickable method public method_remove_custom_columns" data-toggle="collapse" data-target=".method_remove_custom_columns .collapse">
|
537 |
-
<h2>Remove duplicate columns from the Admin Columns "Custom" section</h2>
|
538 |
-
<pre>remove_custom_columns(array $keys, \AC_Settings_Column_CustomField $this_customfield) </pre>
|
539 |
-
<div class="labels">
|
540 |
-
<span class="label">static</span> </div>
|
541 |
-
|
542 |
-
|
543 |
-
<div class="row collapse">
|
544 |
-
<div class="detail-description">
|
545 |
-
<div class="long_description"></div>
|
546 |
-
|
547 |
-
<table class="table">
|
548 |
-
<tr>
|
549 |
-
<th>
|
550 |
-
since
|
551 |
-
</th>
|
552 |
-
<td>
|
553 |
-
2.52
|
554 |
-
|
555 |
-
</td>
|
556 |
-
</tr>
|
557 |
-
<tr>
|
558 |
-
<th>
|
559 |
-
|
560 |
-
</th>
|
561 |
-
<td>
|
562 |
-
</td>
|
563 |
-
</tr>
|
564 |
-
</table>
|
565 |
-
|
566 |
-
<h3>Arguments</h3>
|
567 |
-
<div class="subelement argument">
|
568 |
-
<h4>$keys</h4>
|
569 |
-
<code>array</code><p><p>Distinct meta keys from DB</p></p>
|
570 |
-
</div>
|
571 |
-
<div class="subelement argument">
|
572 |
-
<h4>$this_customfield</h4>
|
573 |
-
<code>\AC_Settings_Column_CustomField</code><p></p>
|
574 |
-
</div>
|
575 |
-
|
576 |
-
</div>
|
577 |
-
</div>
|
578 |
-
|
579 |
-
</div>
|
580 |
-
<a id="method_set_manage_value_callback"></a>
|
581 |
-
<div class="element clickable method public method_set_manage_value_callback" data-toggle="collapse" data-target=".method_set_manage_value_callback .collapse">
|
582 |
-
<h2>Contains the hook that contains the manage_value callback</h2>
|
583 |
-
<pre>set_manage_value_callback() </pre>
|
584 |
-
<div class="labels">
|
585 |
-
</div>
|
586 |
-
|
587 |
-
|
588 |
-
<div class="row collapse">
|
589 |
-
<div class="detail-description">
|
590 |
-
<div class="long_description"></div>
|
591 |
-
|
592 |
-
<table class="table">
|
593 |
-
<tr>
|
594 |
-
<th>
|
595 |
-
since
|
596 |
-
</th>
|
597 |
-
<td>
|
598 |
-
2.50
|
599 |
-
|
600 |
-
</td>
|
601 |
-
</tr>
|
602 |
-
<tr>
|
603 |
-
<th>
|
604 |
-
|
605 |
-
</th>
|
606 |
-
<td>
|
607 |
-
</td>
|
608 |
-
</tr>
|
609 |
-
<tr>
|
610 |
-
<th>
|
611 |
-
|
612 |
-
</th>
|
613 |
-
<td>
|
614 |
-
</td>
|
615 |
-
</tr>
|
616 |
-
</table>
|
617 |
-
|
618 |
-
|
619 |
-
</div>
|
620 |
-
</div>
|
621 |
-
|
622 |
-
</div>
|
623 |
-
|
624 |
-
|
625 |
-
</div>
|
626 |
-
</div>
|
627 |
-
<a id="\AC_Addon_MLA_ListScreen"></a>
|
628 |
-
<ul class="breadcrumb">
|
629 |
-
<li><a href="../index.html"><i class="icon-custom icon-class"></i></a></li>
|
630 |
-
|
631 |
-
|
632 |
-
<li><span class="divider">\</span><a href="../namespaces/default.html">\</a></li>
|
633 |
-
|
634 |
-
<li class="active"><span class="divider">\</span><a href="../classes/AC_Addon_MLA_ListScreen.html">AC_Addon_MLA_ListScreen</a></li>
|
635 |
-
</ul>
|
636 |
-
</div>
|
637 |
-
</div>
|
638 |
-
|
639 |
-
</div>
|
640 |
-
|
641 |
-
<footer class="span12">
|
642 |
-
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by
|
643 |
-
<a href="http://glyphicons.com/">Glyphicons</a>.<br/>
|
644 |
-
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and<br/>
|
645 |
-
generated on Tue, 11 Jul 2017 20:25:48 -0700.<br/>
|
646 |
-
</footer>
|
647 |
-
</body>
|
648 |
-
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
phpDocs/classes/CPAC_Deprecated_Storage_Model_MLA.html
DELETED
@@ -1,697 +0,0 @@
|
|
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 » \CPAC_Deprecated_Storage_Model_MLA
|
7 |
-
</title>
|
8 |
-
<meta name="author" content=""/>
|
9 |
-
<meta name="description" content=""/>
|
10 |
-
|
11 |
-
<link href="../css/template.css" rel="stylesheet" media="all"/>
|
12 |
-
|
13 |
-
<!--[if lt IE 9]>
|
14 |
-
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
|
15 |
-
<![endif]-->
|
16 |
-
<script src="../js/jquery-1.7.1.min.js" type="text/javascript"></script>
|
17 |
-
<script src="../js/jquery-ui-1.8.2.custom.min.js" type="text/javascript"></script>
|
18 |
-
<script src="../js/jquery.mousewheel.min.js" type="text/javascript"></script>
|
19 |
-
<script src="../js/bootstrap.js" type="text/javascript"></script>
|
20 |
-
<script src="../js/template.js" type="text/javascript"></script>
|
21 |
-
<script src="../js/prettify/prettify.min.js" type="text/javascript"></script>
|
22 |
-
|
23 |
-
<link rel="shortcut icon" href="../img/favicon.ico"/>
|
24 |
-
<link rel="apple-touch-icon" href="../img/apple-touch-icon.png"/>
|
25 |
-
<link rel="apple-touch-icon" sizes="72x72" href="../img/apple-touch-icon-72x72.png"/>
|
26 |
-
<link rel="apple-touch-icon" sizes="114x114" href="../img/apple-touch-icon-114x114.png"/>
|
27 |
-
</head>
|
28 |
-
<body>
|
29 |
-
|
30 |
-
<div class="navbar navbar-fixed-top">
|
31 |
-
<div class="navbar-inner">
|
32 |
-
<div class="container">
|
33 |
-
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
|
34 |
-
<span class="icon-bar"></span> <span class="icon-bar"></span>
|
35 |
-
<span class="icon-bar"></span> </a>
|
36 |
-
<a class="brand" href="../index.html">Media Library Assistant</a>
|
37 |
-
|
38 |
-
<div class="nav-collapse">
|
39 |
-
<ul class="nav">
|
40 |
-
<li class="dropdown">
|
41 |
-
<a href="#api" class="dropdown-toggle" data-toggle="dropdown">
|
42 |
-
API Documentation <b class="caret"></b>
|
43 |
-
</a>
|
44 |
-
<ul class="dropdown-menu">
|
45 |
-
</ul>
|
46 |
-
</li>
|
47 |
-
<li class="dropdown" id="charts-menu">
|
48 |
-
<a href="#charts" class="dropdown-toggle" data-toggle="dropdown">
|
49 |
-
Charts <b class="caret"></b>
|
50 |
-
</a>
|
51 |
-
<ul class="dropdown-menu">
|
52 |
-
<li>
|
53 |
-
<a href="../graph_class.html">
|
54 |
-
<i class="icon-list-alt"></i> Class hierarchy diagram
|
55 |
-
</a>
|
56 |
-
</li>
|
57 |
-
</ul>
|
58 |
-
</li>
|
59 |
-
<li class="dropdown" id="reports-menu">
|
60 |
-
<a href="#reports" class="dropdown-toggle" data-toggle="dropdown">
|
61 |
-
Reports <b class="caret"></b>
|
62 |
-
</a>
|
63 |
-
<ul class="dropdown-menu">
|
64 |
-
<li>
|
65 |
-
<a href="../errors.html">
|
66 |
-
<i class="icon-list-alt"></i> Errors
|
67 |
-
</a>
|
68 |
-
</li>
|
69 |
-
<li>
|
70 |
-
<a href="../markers.html">
|
71 |
-
<i class="icon-list-alt"></i> Markers
|
72 |
-
</a>
|
73 |
-
</li>
|
74 |
-
<li>
|
75 |
-
<a href="../deprecated.html">
|
76 |
-
<i class="icon-list-alt"></i> Deprecated
|
77 |
-
</a>
|
78 |
-
</li>
|
79 |
-
</ul>
|
80 |
-
</li>
|
81 |
-
</ul>
|
82 |
-
</div>
|
83 |
-
</div>
|
84 |
-
</div>
|
85 |
-
<div class="go_to_top">
|
86 |
-
<a href="#___" style="color: inherit">Back to top  <i class="icon-upload icon-white"></i></a>
|
87 |
-
</div>
|
88 |
-
</div>
|
89 |
-
|
90 |
-
<div id="___" class="container">
|
91 |
-
<noscript>
|
92 |
-
<div class="alert alert-warning">
|
93 |
-
Javascript is disabled; several features are only available if Javascript is enabled.
|
94 |
-
</div>
|
95 |
-
</noscript>
|
96 |
-
|
97 |
-
|
98 |
-
<style>
|
99 |
-
.deprecated h2 {
|
100 |
-
text-decoration: line-through;
|
101 |
-
}
|
102 |
-
</style>
|
103 |
-
<div class="row">
|
104 |
-
<div class="span4">
|
105 |
-
<div class="btn-group view pull-right" data-toggle="buttons-radio">
|
106 |
-
<button class="btn details" title="Show descriptions and method names"><i class="icon-list"></i></button>
|
107 |
-
<button class="btn simple" title="Show only method names"><i class="icon-align-justify"></i></button>
|
108 |
-
</div>
|
109 |
-
<div class="btn-group visibility" data-toggle="buttons-checkbox">
|
110 |
-
<button class="btn public active" title="Show public elements">Public</button>
|
111 |
-
<button class="btn protected" title="Show protected elements">Protected</button>
|
112 |
-
<button class="btn private" title="Show private elements">Private</button>
|
113 |
-
<button class="btn inherited active" title="Show inherited elements">Inherited</button>
|
114 |
-
</div>
|
115 |
-
|
116 |
-
<ul class="side-nav nav nav-list">
|
117 |
-
<li class="nav-header">
|
118 |
-
<i class="icon-custom icon-method"></i> Methods
|
119 |
-
<ul>
|
120 |
-
<li class="method public">
|
121 |
-
<a href="#method___construct" title="__construct :: Initializes some properties, installs filters and then
|
122 |
-
calls the parent constructor to set some default configs.">
|
123 |
-
<span class="description">Initializes some properties, installs filters and then
|
124 |
-
calls the parent constructor to set some default configs.</span><pre>__construct</pre>
|
125 |
-
</a>
|
126 |
-
</li>
|
127 |
-
|
128 |
-
<li class="method public">
|
129 |
-
<a href="#method_get_default_column_names" title="get_default_column_names :: Returns the Media/Assistant submenu table column slugs/keys">
|
130 |
-
<span class="description">Returns the Media/Assistant submenu table column slugs/keys</span><pre>get_default_column_names</pre>
|
131 |
-
</a>
|
132 |
-
</li>
|
133 |
-
|
134 |
-
<li class="method public">
|
135 |
-
<a href="#method_get_default_columns" title="get_default_columns :: Returns the Media/Assistant submenu table column definitions">
|
136 |
-
<span class="description">Returns the Media/Assistant submenu table column definitions</span><pre>get_default_columns</pre>
|
137 |
-
</a>
|
138 |
-
</li>
|
139 |
-
|
140 |
-
<li class="method public">
|
141 |
-
<a href="#method_get_edit_link" title="get_edit_link :: Return a link to the Media/Assistant submenu Edit columns screen">
|
142 |
-
<span class="description">Return a link to the Media/Assistant submenu Edit columns screen</span><pre>get_edit_link</pre>
|
143 |
-
</a>
|
144 |
-
</li>
|
145 |
-
|
146 |
-
<li class="method public">
|
147 |
-
<a href="#method_get_meta" title="get_meta :: Returns the custom fields assigned to Media Library items, removing those already present
|
148 |
-
in the Media/Assistant submenu table">
|
149 |
-
<span class="description">Returns the custom fields assigned to Media Library items, removing those already present
|
150 |
-
in the Media/Assistant submenu table</span><pre>get_meta</pre>
|
151 |
-
</a>
|
152 |
-
</li>
|
153 |
-
|
154 |
-
<li class="method public">
|
155 |
-
<a href="#method_init_manage_columns" title="init_manage_columns :: Added in Admin Columns update to v2.4.9">
|
156 |
-
<span class="description">Added in Admin Columns update to v2.4.9</span><pre>init_manage_columns</pre>
|
157 |
-
</a>
|
158 |
-
</li>
|
159 |
-
|
160 |
-
<li class="method public">
|
161 |
-
<a href="#method_is_columns_screen" title="is_columns_screen :: Test for current screen = the Media/Assistant submenu screen">
|
162 |
-
<span class="description">Test for current screen = the Media/Assistant submenu screen</span><pre>is_columns_screen</pre>
|
163 |
-
</a>
|
164 |
-
</li>
|
165 |
-
|
166 |
-
<li class="method public">
|
167 |
-
<a href="#method_is_current_screen" title="is_current_screen :: Test for current screen = the Media/Assistant submenu screen,
|
168 |
-
For Admin Columns 2.4.9+">
|
169 |
-
<span class="description">Test for current screen = the Media/Assistant submenu screen,
|
170 |
-
For Admin Columns 2.4.9+</span><pre>is_current_screen</pre>
|
171 |
-
</a>
|
172 |
-
</li>
|
173 |
-
|
174 |
-
<li class="method public">
|
175 |
-
<a href="#method_mla_manage_value" title="mla_manage_value :: Return the content of an Admin Columns custom column">
|
176 |
-
<span class="description">Return the content of an Admin Columns custom column</span><pre>mla_manage_value</pre>
|
177 |
-
</a>
|
178 |
-
</li>
|
179 |
-
|
180 |
-
</ul>
|
181 |
-
</li>
|
182 |
-
<li class="nav-header protected">» Protected
|
183 |
-
<ul>
|
184 |
-
<li class="method protected">
|
185 |
-
<a href="#method_get_screen_link" title="get_screen_link :: Return a link to the Media/Assistant submenu screen">
|
186 |
-
<span class="description">Return a link to the Media/Assistant submenu screen</span><pre>get_screen_link</pre>
|
187 |
-
</a>
|
188 |
-
</li>
|
189 |
-
</ul>
|
190 |
-
</li>
|
191 |
-
<li class="nav-header private">» Private
|
192 |
-
<ul>
|
193 |
-
</ul>
|
194 |
-
</li>
|
195 |
-
<li class="nav-header">
|
196 |
-
<i class="icon-custom icon-constant"></i> Constants
|
197 |
-
<ul>
|
198 |
-
</ul>
|
199 |
-
</li>
|
200 |
-
</ul>
|
201 |
-
|
202 |
-
|
203 |
-
</div>
|
204 |
-
|
205 |
-
<div class="span8">
|
206 |
-
<div class="element class">
|
207 |
-
<h1>CPAC_Deprecated_Storage_Model_MLA</h1>
|
208 |
-
<small style="display: block; text-align: right">
|
209 |
-
Extends \CPAC_Storage_Model
|
210 |
-
</small>
|
211 |
-
<p class="short_description">Class CPAC Storage Model MLA (Media Library Assistant) supports the Admin Columns plugin</p>
|
212 |
-
<div class="details">
|
213 |
-
<div class="long_description">
|
214 |
-
|
215 |
-
</div>
|
216 |
-
<table class="table table-bordered">
|
217 |
-
<tr>
|
218 |
-
<th>
|
219 |
-
package
|
220 |
-
</th>
|
221 |
-
<td>
|
222 |
-
|
223 |
-
<p>Media Library Assistant</p>
|
224 |
-
</td>
|
225 |
-
</tr>
|
226 |
-
<tr>
|
227 |
-
<th>
|
228 |
-
since
|
229 |
-
</th>
|
230 |
-
<td>
|
231 |
-
2.22
|
232 |
-
|
233 |
-
</td>
|
234 |
-
</tr>
|
235 |
-
</table>
|
236 |
-
|
237 |
-
<h3><i class="icon-custom icon-method"></i> Methods</h3>
|
238 |
-
<a id="method___construct"></a>
|
239 |
-
<div class="element clickable method public method___construct" data-toggle="collapse" data-target=".method___construct .collapse">
|
240 |
-
<h2>Initializes some properties, installs filters and then
|
241 |
-
calls the parent constructor to set some default configs.</h2>
|
242 |
-
<pre>__construct() </pre>
|
243 |
-
<div class="labels">
|
244 |
-
</div>
|
245 |
-
|
246 |
-
|
247 |
-
<div class="row collapse">
|
248 |
-
<div class="detail-description">
|
249 |
-
<div class="long_description"></div>
|
250 |
-
|
251 |
-
<table class="table">
|
252 |
-
<tr>
|
253 |
-
<th>
|
254 |
-
since
|
255 |
-
</th>
|
256 |
-
<td>
|
257 |
-
2.22
|
258 |
-
|
259 |
-
</td>
|
260 |
-
</tr>
|
261 |
-
<tr>
|
262 |
-
<th>
|
263 |
-
|
264 |
-
</th>
|
265 |
-
<td>
|
266 |
-
</td>
|
267 |
-
</tr>
|
268 |
-
<tr>
|
269 |
-
<th>
|
270 |
-
|
271 |
-
</th>
|
272 |
-
<td>
|
273 |
-
</td>
|
274 |
-
</tr>
|
275 |
-
</table>
|
276 |
-
|
277 |
-
|
278 |
-
</div>
|
279 |
-
</div>
|
280 |
-
|
281 |
-
</div>
|
282 |
-
<a id="method_get_default_column_names"></a>
|
283 |
-
<div class="element clickable method public method_get_default_column_names" data-toggle="collapse" data-target=".method_get_default_column_names .collapse">
|
284 |
-
<h2>Returns the Media/Assistant submenu table column slugs/keys</h2>
|
285 |
-
<pre>get_default_column_names() : array</pre>
|
286 |
-
<div class="labels">
|
287 |
-
</div>
|
288 |
-
|
289 |
-
|
290 |
-
<div class="row collapse">
|
291 |
-
<div class="detail-description">
|
292 |
-
<div class="long_description"></div>
|
293 |
-
|
294 |
-
<table class="table">
|
295 |
-
<tr>
|
296 |
-
<th>
|
297 |
-
since
|
298 |
-
</th>
|
299 |
-
<td>
|
300 |
-
2.22
|
301 |
-
|
302 |
-
</td>
|
303 |
-
</tr>
|
304 |
-
<tr>
|
305 |
-
<th>
|
306 |
-
|
307 |
-
</th>
|
308 |
-
<td>
|
309 |
-
</td>
|
310 |
-
</tr>
|
311 |
-
</table>
|
312 |
-
|
313 |
-
|
314 |
-
<h3>Response</h3>
|
315 |
-
<code>array</code><p><p>( index => 'column_slug' )</p></p>
|
316 |
-
</div>
|
317 |
-
</div>
|
318 |
-
|
319 |
-
</div>
|
320 |
-
<a id="method_get_default_columns"></a>
|
321 |
-
<div class="element clickable method public method_get_default_columns" data-toggle="collapse" data-target=".method_get_default_columns .collapse">
|
322 |
-
<h2>Returns the Media/Assistant submenu table column definitions</h2>
|
323 |
-
<pre>get_default_columns() : array</pre>
|
324 |
-
<div class="labels">
|
325 |
-
</div>
|
326 |
-
|
327 |
-
|
328 |
-
<div class="row collapse">
|
329 |
-
<div class="detail-description">
|
330 |
-
<div class="long_description"></div>
|
331 |
-
|
332 |
-
<table class="table">
|
333 |
-
<tr>
|
334 |
-
<th>
|
335 |
-
since
|
336 |
-
</th>
|
337 |
-
<td>
|
338 |
-
2.22
|
339 |
-
|
340 |
-
</td>
|
341 |
-
</tr>
|
342 |
-
<tr>
|
343 |
-
<th>
|
344 |
-
|
345 |
-
</th>
|
346 |
-
<td>
|
347 |
-
</td>
|
348 |
-
</tr>
|
349 |
-
</table>
|
350 |
-
|
351 |
-
|
352 |
-
<h3>Response</h3>
|
353 |
-
<code>array</code><p><p>( 'column_slug' => 'column_heading' )</p></p>
|
354 |
-
</div>
|
355 |
-
</div>
|
356 |
-
|
357 |
-
</div>
|
358 |
-
<a id="method_get_edit_link"></a>
|
359 |
-
<div class="element clickable method public method_get_edit_link" data-toggle="collapse" data-target=".method_get_edit_link .collapse">
|
360 |
-
<h2>Return a link to the Media/Assistant submenu Edit columns screen</h2>
|
361 |
-
<pre>get_edit_link() : string</pre>
|
362 |
-
<div class="labels">
|
363 |
-
</div>
|
364 |
-
|
365 |
-
|
366 |
-
<div class="row collapse">
|
367 |
-
<div class="detail-description">
|
368 |
-
<div class="long_description"></div>
|
369 |
-
|
370 |
-
<table class="table">
|
371 |
-
<tr>
|
372 |
-
<th>
|
373 |
-
since
|
374 |
-
</th>
|
375 |
-
<td>
|
376 |
-
2.22
|
377 |
-
|
378 |
-
</td>
|
379 |
-
</tr>
|
380 |
-
<tr>
|
381 |
-
<th>
|
382 |
-
|
383 |
-
</th>
|
384 |
-
<td>
|
385 |
-
</td>
|
386 |
-
</tr>
|
387 |
-
</table>
|
388 |
-
|
389 |
-
|
390 |
-
<h3>Response</h3>
|
391 |
-
<code>string</code><p><p>Link to the Media/Assistant submenu Edit columns screen</p></p>
|
392 |
-
</div>
|
393 |
-
</div>
|
394 |
-
|
395 |
-
</div>
|
396 |
-
<a id="method_get_meta"></a>
|
397 |
-
<div class="element clickable method public method_get_meta" data-toggle="collapse" data-target=".method_get_meta .collapse">
|
398 |
-
<h2>Returns the custom fields assigned to Media Library items, removing those already present
|
399 |
-
in the Media/Assistant submenu table</h2>
|
400 |
-
<pre>get_meta() : array</pre>
|
401 |
-
<div class="labels">
|
402 |
-
</div>
|
403 |
-
|
404 |
-
|
405 |
-
<div class="row collapse">
|
406 |
-
<div class="detail-description">
|
407 |
-
<div class="long_description"></div>
|
408 |
-
|
409 |
-
<table class="table">
|
410 |
-
<tr>
|
411 |
-
<th>
|
412 |
-
since
|
413 |
-
</th>
|
414 |
-
<td>
|
415 |
-
2.22
|
416 |
-
|
417 |
-
</td>
|
418 |
-
</tr>
|
419 |
-
<tr>
|
420 |
-
<th>
|
421 |
-
|
422 |
-
</th>
|
423 |
-
<td>
|
424 |
-
</td>
|
425 |
-
</tr>
|
426 |
-
</table>
|
427 |
-
|
428 |
-
|
429 |
-
<h3>Response</h3>
|
430 |
-
<code>array</code><p><p>( index => array( 0 => 'custom field name' ) )</p></p>
|
431 |
-
</div>
|
432 |
-
</div>
|
433 |
-
|
434 |
-
</div>
|
435 |
-
<a id="method_get_screen_link"></a>
|
436 |
-
<div class="element clickable method protected method_get_screen_link" data-toggle="collapse" data-target=".method_get_screen_link .collapse">
|
437 |
-
<h2>Return a link to the Media/Assistant submenu screen</h2>
|
438 |
-
<pre>get_screen_link() : string</pre>
|
439 |
-
<div class="labels">
|
440 |
-
</div>
|
441 |
-
|
442 |
-
|
443 |
-
<div class="row collapse">
|
444 |
-
<div class="detail-description">
|
445 |
-
<div class="long_description"></div>
|
446 |
-
|
447 |
-
<table class="table">
|
448 |
-
<tr>
|
449 |
-
<th>
|
450 |
-
since
|
451 |
-
</th>
|
452 |
-
<td>
|
453 |
-
2.22
|
454 |
-
|
455 |
-
</td>
|
456 |
-
</tr>
|
457 |
-
<tr>
|
458 |
-
<th>
|
459 |
-
|
460 |
-
</th>
|
461 |
-
<td>
|
462 |
-
</td>
|
463 |
-
</tr>
|
464 |
-
</table>
|
465 |
-
|
466 |
-
|
467 |
-
<h3>Response</h3>
|
468 |
-
<code>string</code><p><p>Link to the Media/Assistant submenu screen</p></p>
|
469 |
-
</div>
|
470 |
-
</div>
|
471 |
-
|
472 |
-
</div>
|
473 |
-
<a id="method_init_manage_columns"></a>
|
474 |
-
<div class="element clickable method public method_init_manage_columns" data-toggle="collapse" data-target=".method_init_manage_columns .collapse">
|
475 |
-
<h2>Added in Admin Columns update to v2.4.9</h2>
|
476 |
-
<pre>init_manage_columns() </pre>
|
477 |
-
<div class="labels">
|
478 |
-
</div>
|
479 |
-
|
480 |
-
|
481 |
-
<div class="row collapse">
|
482 |
-
<div class="detail-description">
|
483 |
-
<div class="long_description"></div>
|
484 |
-
|
485 |
-
<table class="table">
|
486 |
-
<tr>
|
487 |
-
<th>
|
488 |
-
since
|
489 |
-
</th>
|
490 |
-
<td>
|
491 |
-
2.23
|
492 |
-
|
493 |
-
</td>
|
494 |
-
</tr>
|
495 |
-
<tr>
|
496 |
-
<th>
|
497 |
-
|
498 |
-
</th>
|
499 |
-
<td>
|
500 |
-
</td>
|
501 |
-
</tr>
|
502 |
-
<tr>
|
503 |
-
<th>
|
504 |
-
|
505 |
-
</th>
|
506 |
-
<td>
|
507 |
-
</td>
|
508 |
-
</tr>
|
509 |
-
</table>
|
510 |
-
|
511 |
-
|
512 |
-
</div>
|
513 |
-
</div>
|
514 |
-
|
515 |
-
</div>
|
516 |
-
<a id="method_is_columns_screen"></a>
|
517 |
-
<div class="element clickable method public method_is_columns_screen" data-toggle="collapse" data-target=".method_is_columns_screen .collapse">
|
518 |
-
<h2>Test for current screen = the Media/Assistant submenu screen</h2>
|
519 |
-
<pre>is_columns_screen() : boolean</pre>
|
520 |
-
<div class="labels">
|
521 |
-
</div>
|
522 |
-
|
523 |
-
|
524 |
-
<div class="row collapse">
|
525 |
-
<div class="detail-description">
|
526 |
-
<div class="long_description"></div>
|
527 |
-
|
528 |
-
<table class="table">
|
529 |
-
<tr>
|
530 |
-
<th>
|
531 |
-
since
|
532 |
-
</th>
|
533 |
-
<td>
|
534 |
-
2.22
|
535 |
-
|
536 |
-
</td>
|
537 |
-
</tr>
|
538 |
-
<tr>
|
539 |
-
<th>
|
540 |
-
|
541 |
-
</th>
|
542 |
-
<td>
|
543 |
-
</td>
|
544 |
-
</tr>
|
545 |
-
</table>
|
546 |
-
|
547 |
-
|
548 |
-
<h3>Response</h3>
|
549 |
-
<code>boolean</code><p><p>true if the Media/Assistant submenu is the current screen</p></p>
|
550 |
-
</div>
|
551 |
-
</div>
|
552 |
-
|
553 |
-
</div>
|
554 |
-
<a id="method_is_current_screen"></a>
|
555 |
-
<div class="element clickable method public method_is_current_screen" data-toggle="collapse" data-target=".method_is_current_screen .collapse">
|
556 |
-
<h2>Test for current screen = the Media/Assistant submenu screen,
|
557 |
-
For Admin Columns 2.4.9+</h2>
|
558 |
-
<pre>is_current_screen() : boolean</pre>
|
559 |
-
<div class="labels">
|
560 |
-
</div>
|
561 |
-
|
562 |
-
|
563 |
-
<div class="row collapse">
|
564 |
-
<div class="detail-description">
|
565 |
-
<div class="long_description"></div>
|
566 |
-
|
567 |
-
<table class="table">
|
568 |
-
<tr>
|
569 |
-
<th>
|
570 |
-
since
|
571 |
-
</th>
|
572 |
-
<td>
|
573 |
-
2.23
|
574 |
-
|
575 |
-
</td>
|
576 |
-
</tr>
|
577 |
-
<tr>
|
578 |
-
<th>
|
579 |
-
|
580 |
-
</th>
|
581 |
-
<td>
|
582 |
-
</td>
|
583 |
-
</tr>
|
584 |
-
</table>
|
585 |
-
|
586 |
-
|
587 |
-
<h3>Response</h3>
|
588 |
-
<code>boolean</code><p><p>true if the Media/Assistant submenu is the current screen</p></p>
|
589 |
-
</div>
|
590 |
-
</div>
|
591 |
-
|
592 |
-
</div>
|
593 |
-
<a id="method_mla_manage_value"></a>
|
594 |
-
<div class="element clickable method public method_mla_manage_value" data-toggle="collapse" data-target=".method_mla_manage_value .collapse">
|
595 |
-
<h2>Return the content of an Admin Columns custom column</h2>
|
596 |
-
<pre>mla_manage_value(string $content, object $item, string $column_name) : string</pre>
|
597 |
-
<div class="labels">
|
598 |
-
</div>
|
599 |
-
|
600 |
-
|
601 |
-
<div class="row collapse">
|
602 |
-
<div class="detail-description">
|
603 |
-
<div class="long_description"></div>
|
604 |
-
|
605 |
-
<table class="table">
|
606 |
-
<tr>
|
607 |
-
<th>
|
608 |
-
since
|
609 |
-
</th>
|
610 |
-
<td>
|
611 |
-
2.22
|
612 |
-
|
613 |
-
</td>
|
614 |
-
</tr>
|
615 |
-
</table>
|
616 |
-
|
617 |
-
<h3>Arguments</h3>
|
618 |
-
<div class="subelement argument">
|
619 |
-
<h4>$content</h4>
|
620 |
-
<code>string</code><p><p>Current column content (empty string)</p></p>
|
621 |
-
</div>
|
622 |
-
<div class="subelement argument">
|
623 |
-
<h4>$item</h4>
|
624 |
-
<code>object</code><p><p>Current Media Library item</p></p>
|
625 |
-
</div>
|
626 |
-
<div class="subelement argument">
|
627 |
-
<h4>$column_name</h4>
|
628 |
-
<code>string</code><p><p>Current column slug</p></p>
|
629 |
-
</div>
|
630 |
-
|
631 |
-
<h3>Response</h3>
|
632 |
-
<code>string</code><p><p>Column value or NULL if not an Admin Columns custom column</p></p>
|
633 |
-
</div>
|
634 |
-
</div>
|
635 |
-
|
636 |
-
</div>
|
637 |
-
|
638 |
-
|
639 |
-
<h3><i class="icon-custom icon-property"></i> Properties</h3>
|
640 |
-
<a id="property_subpage"> </a>
|
641 |
-
<div class="element clickable property public property_subpage" data-toggle="collapse" data-target=".property_subpage .collapse">
|
642 |
-
<h2>Identifies submenu entry in the Admin sidebar, e.g., Media/Assistant in Media</h2>
|
643 |
-
<pre>subpage : string</pre>
|
644 |
-
<div class="labels">
|
645 |
-
</div>
|
646 |
-
<div class="row collapse">
|
647 |
-
<div class="detail-description">
|
648 |
-
<div class="long_description"></div>
|
649 |
-
|
650 |
-
<table class="table">
|
651 |
-
<tr>
|
652 |
-
<th>
|
653 |
-
since
|
654 |
-
</th>
|
655 |
-
<td>
|
656 |
-
|
657 |
-
</td>
|
658 |
-
</tr>
|
659 |
-
<tr>
|
660 |
-
<th>
|
661 |
-
var
|
662 |
-
</th>
|
663 |
-
<td>
|
664 |
-
|
665 |
-
</td>
|
666 |
-
</tr>
|
667 |
-
</table>
|
668 |
-
|
669 |
-
<h3>Type(s)</h3>
|
670 |
-
<code>string</code>
|
671 |
-
</div>
|
672 |
-
</div>
|
673 |
-
</div>
|
674 |
-
</div>
|
675 |
-
</div>
|
676 |
-
<a id="\CPAC_Deprecated_Storage_Model_MLA"></a>
|
677 |
-
<ul class="breadcrumb">
|
678 |
-
<li><a href="../index.html"><i class="icon-custom icon-class"></i></a></li>
|
679 |
-
|
680 |
-
|
681 |
-
<li><span class="divider">\</span><a href="../namespaces/default.html">\</a></li>
|
682 |
-
|
683 |
-
<li class="active"><span class="divider">\</span><a href="../classes/CPAC_Deprecated_Storage_Model_MLA.html">CPAC_Deprecated_Storage_Model_MLA</a></li>
|
684 |
-
</ul>
|
685 |
-
</div>
|
686 |
-
</div>
|
687 |
-
|
688 |
-
</div>
|
689 |
-
|
690 |
-
<footer class="span12">
|
691 |
-
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by
|
692 |
-
<a href="http://glyphicons.com/">Glyphicons</a>.<br/>
|
693 |
-
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and<br/>
|
694 |
-
generated on Tue, 11 Jul 2017 20:25:48 -0700.<br/>
|
695 |
-
</footer>
|
696 |
-
</body>
|
697 |
-
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
phpDocs/classes/MLA.html
DELETED
@@ -1,1597 +0,0 @@
|
|
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 » \MLA
|
7 |
-
</title>
|
8 |
-
<meta name="author" content=""/>
|
9 |
-
<meta name="description" content=""/>
|
10 |
-
|
11 |
-
<link href="../css/template.css" rel="stylesheet" media="all"/>
|
12 |
-
|
13 |
-
<!--[if lt IE 9]>
|
14 |
-
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
|
15 |
-
<![endif]-->
|
16 |
-
<script src="../js/jquery-1.7.1.min.js" type="text/javascript"></script>
|
17 |
-
<script src="../js/jquery-ui-1.8.2.custom.min.js" type="text/javascript"></script>
|
18 |
-
<script src="../js/jquery.mousewheel.min.js" type="text/javascript"></script>
|
19 |
-
<script src="../js/bootstrap.js" type="text/javascript"></script>
|
20 |
-
<script src="../js/template.js" type="text/javascript"></script>
|
21 |
-
<script src="../js/prettify/prettify.min.js" type="text/javascript"></script>
|
22 |
-
|
23 |
-
<link rel="shortcut icon" href="../img/favicon.ico"/>
|
24 |
-
<link rel="apple-touch-icon" href="../img/apple-touch-icon.png"/>
|
25 |
-
<link rel="apple-touch-icon" sizes="72x72" href="../img/apple-touch-icon-72x72.png"/>
|
26 |
-
<link rel="apple-touch-icon" sizes="114x114" href="../img/apple-touch-icon-114x114.png"/>
|
27 |
-
</head>
|
28 |
-
<body>
|
29 |
-
|
30 |
-
<div class="navbar navbar-fixed-top">
|
31 |
-
<div class="navbar-inner">
|
32 |
-
<div class="container">
|
33 |
-
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
|
34 |
-
<span class="icon-bar"></span> <span class="icon-bar"></span>
|
35 |
-
<span class="icon-bar"></span> </a>
|
36 |
-
<a class="brand" href="../index.html">Media Library Assistant</a>
|
37 |
-
|
38 |
-
<div class="nav-collapse">
|
39 |
-
<ul class="nav">
|
40 |
-
<li class="dropdown">
|
41 |
-
<a href="#api" class="dropdown-toggle" data-toggle="dropdown">
|
42 |
-
API Documentation <b class="caret"></b>
|
43 |
-
</a>
|
44 |
-
<ul class="dropdown-menu">
|
45 |
-
</ul>
|
46 |
-
</li>
|
47 |
-
<li class="dropdown" id="charts-menu">
|
48 |
-
<a href="#charts" class="dropdown-toggle" data-toggle="dropdown">
|
49 |
-
Charts <b class="caret"></b>
|
50 |
-
</a>
|
51 |
-
<ul class="dropdown-menu">
|
52 |
-
<li>
|
53 |
-
<a href="../graph_class.html">
|
54 |
-
<i class="icon-list-alt"></i> Class hierarchy diagram
|
55 |
-
</a>
|
56 |
-
</li>
|
57 |
-
</ul>
|
58 |
-
</li>
|
59 |
-
<li class="dropdown" id="reports-menu">
|
60 |
-
<a href="#reports" class="dropdown-toggle" data-toggle="dropdown">
|
61 |
-
Reports <b class="caret"></b>
|
62 |
-
</a>
|
63 |
-
<ul class="dropdown-menu">
|
64 |
-
<li>
|
65 |
-
<a href="../errors.html">
|
66 |
-
<i class="icon-list-alt"></i> Errors
|
67 |
-
</a>
|
68 |
-
</li>
|
69 |
-
<li>
|
70 |
-
<a href="../markers.html">
|
71 |
-
<i class="icon-list-alt"></i> Markers
|
72 |
-
</a>
|
73 |
-
</li>
|
74 |
-
<li>
|
75 |
-
<a href="../deprecated.html">
|
76 |
-
<i class="icon-list-alt"></i> Deprecated
|
77 |
-
</a>
|
78 |
-
</li>
|
79 |
-
</ul>
|
80 |
-
</li>
|
81 |
-
</ul>
|
82 |
-
</div>
|
83 |
-
</div>
|
84 |
-
</div>
|
85 |
-
<div class="go_to_top">
|
86 |
-
<a href="#___" style="color: inherit">Back to top  <i class="icon-upload icon-white"></i></a>
|
87 |
-
</div>
|
88 |
-
</div>
|
89 |
-
|
90 |
-
<div id="___" class="container">
|
91 |
-
<noscript>
|
92 |
-
<div class="alert alert-warning">
|
93 |
-
Javascript is disabled; several features are only available if Javascript is enabled.
|
94 |
-
</div>
|
95 |
-
</noscript>
|
96 |
-
|
97 |
-
|
98 |
-
<style>
|
99 |
-
.deprecated h2 {
|
100 |
-
text-decoration: line-through;
|
101 |
-
}
|
102 |
-
</style>
|
103 |
-
<div class="row">
|
104 |
-
<div class="span4">
|
105 |
-
<div class="btn-group view pull-right" data-toggle="buttons-radio">
|
106 |
-
<button class="btn details" title="Show descriptions and method names"><i class="icon-list"></i></button>
|
107 |
-
<button class="btn simple" title="Show only method names"><i class="icon-align-justify"></i></button>
|
108 |
-
</div>
|
109 |
-
<div class="btn-group visibility" data-toggle="buttons-checkbox">
|
110 |
-
<button class="btn public active" title="Show public elements">Public</button>
|
111 |
-
<button class="btn protected" title="Show protected elements">Protected</button>
|
112 |
-
<button class="btn private" title="Show private elements">Private</button>
|
113 |
-
<button class="btn inherited active" title="Show inherited elements">Inherited</button>
|
114 |
-
</div>
|
115 |
-
|
116 |
-
<ul class="side-nav nav nav-list">
|
117 |
-
<li class="nav-header">
|
118 |
-
<i class="icon-custom icon-method"></i> Methods
|
119 |
-
<ul>
|
120 |
-
<li class="method public">
|
121 |
-
<a href="#method_initialize" title="initialize :: Initialization function, similar to __construct()">
|
122 |
-
<span class="description">Initialization function, similar to __construct()</span><pre>initialize</pre>
|
123 |
-
</a>
|
124 |
-
</li>
|
125 |
-
|
126 |
-
<li class="method public">
|
127 |
-
<a href="#method_mla_add_help_tab" title="mla_add_help_tab :: Add contextual help tabs to all the MLA pages">
|
128 |
-
<span class="description">Add contextual help tabs to all the MLA pages</span><pre>mla_add_help_tab</pre>
|
129 |
-
</a>
|
130 |
-
</li>
|
131 |
-
|
132 |
-
<li class="method public">
|
133 |
-
<a href="#method_mla_add_menu_options" title="mla_add_menu_options :: Add the "XX Entries per page" filter to the Screen Options tab">
|
134 |
-
<span class="description">Add the "XX Entries per page" filter to the Screen Options tab</span><pre>mla_add_menu_options</pre>
|
135 |
-
</a>
|
136 |
-
</li>
|
137 |
-
|
138 |
-
<li class="method public">
|
139 |
-
<a href="#method_mla_admin_enqueue_scripts_action" title="mla_admin_enqueue_scripts_action :: Load the plugin's Style Sheet and Javascript files">
|
140 |
-
<span class="description">Load the plugin's Style Sheet and Javascript files</span><pre>mla_admin_enqueue_scripts_action</pre>
|
141 |
-
</a>
|
142 |
-
</li>
|
143 |
-
|
144 |
-
<li class="method public">
|
145 |
-
<a href="#method_mla_admin_init_action" title="mla_admin_init_action :: Load the plugin's Ajax handler or process Edit Media update actions">
|
146 |
-
<span class="description">Load the plugin's Ajax handler or process Edit Media update actions</span><pre>mla_admin_init_action</pre>
|
147 |
-
</a>
|
148 |
-
</li>
|
149 |
-
|
150 |
-
<li class="method public">
|
151 |
-
<a href="#method_mla_admin_menu_action" title="mla_admin_menu_action :: Add the submenu pages">
|
152 |
-
<span class="description">Add the submenu pages</span><pre>mla_admin_menu_action</pre>
|
153 |
-
</a>
|
154 |
-
</li>
|
155 |
-
|
156 |
-
<li class="method public">
|
157 |
-
<a href="#method_mla_admin_print_styles_action" title="mla_admin_print_styles_action :: Print optional in-lne styles for Media/Assistant submenu table">
|
158 |
-
<span class="description">Print optional in-lne styles for Media/Assistant submenu table</span><pre>mla_admin_print_styles_action</pre>
|
159 |
-
</a>
|
160 |
-
</li>
|
161 |
-
|
162 |
-
<li class="method public">
|
163 |
-
<a href="#method_mla_authors_dropdown" title="mla_authors_dropdown :: Get the edit Authors dropdown box, if user has suitable permissions">
|
164 |
-
<span class="description">Get the edit Authors dropdown box, if user has suitable permissions</span><pre>mla_authors_dropdown</pre>
|
165 |
-
</a>
|
166 |
-
</li>
|
167 |
-
|
168 |
-
<li class="method public">
|
169 |
-
<a href="#method_mla_clear_filter_by" title="mla_clear_filter_by :: Clear the Media/Assistant submenu Filter-by variables">
|
170 |
-
<span class="description">Clear the Media/Assistant submenu Filter-by variables</span><pre>mla_clear_filter_by</pre>
|
171 |
-
</a>
|
172 |
-
</li>
|
173 |
-
|
174 |
-
<li class="method public">
|
175 |
-
<a href="#method_mla_inline_edit_ajax_action" title="mla_inline_edit_ajax_action :: Ajax handler for inline editing">
|
176 |
-
<span class="description">Ajax handler for inline editing</span><pre>mla_inline_edit_ajax_action</pre>
|
177 |
-
</a>
|
178 |
-
</li>
|
179 |
-
|
180 |
-
<li class="method public">
|
181 |
-
<a href="#method_mla_load_media_action" title="mla_load_media_action :: Redirect to Media/Assistant if Media/Library is hidden or a trash/delete
|
182 |
-
returns from Media/Edit Media initiated from Media/Assistant">
|
183 |
-
<span class="description">Redirect to Media/Assistant if Media/Library is hidden or a trash/delete
|
184 |
-
returns from Media/Edit Media initiated from Media/Assistant</span><pre>mla_load_media_action</pre>
|
185 |
-
</a>
|
186 |
-
</li>
|
187 |
-
|
188 |
-
<li class="method public">
|
189 |
-
<a href="#method_mla_name_conflict_reporting_action" title="mla_name_conflict_reporting_action :: Displays name conflict error messages at the top of the Dashboard">
|
190 |
-
<span class="description">Displays name conflict error messages at the top of the Dashboard</span><pre>mla_name_conflict_reporting_action</pre>
|
191 |
-
</a>
|
192 |
-
</li>
|
193 |
-
|
194 |
-
<li class="method public">
|
195 |
-
<a href="#method_mla_parent_file_filter" title="mla_parent_file_filter :: Cleanup menus for Edit Tags/Categories page">
|
196 |
-
<span class="description">Cleanup menus for Edit Tags/Categories page</span><pre>mla_parent_file_filter</pre>
|
197 |
-
</a>
|
198 |
-
</li>
|
199 |
-
|
200 |
-
<li class="method public">
|
201 |
-
<a href="#method_mla_prepare_bulk_edits" title="mla_prepare_bulk_edits :: Prepare Bulk Edit field-level updates">
|
202 |
-
<span class="description">Prepare Bulk Edit field-level updates</span><pre>mla_prepare_bulk_edits</pre>
|
203 |
-
</a>
|
204 |
-
</li>
|
205 |
-
|
206 |
-
<li class="method public">
|
207 |
-
<a href="#method_mla_process_bulk_action" title="mla_process_bulk_action :: Process bulk action for one or more attachments">
|
208 |
-
<span class="description">Process bulk action for one or more attachments</span><pre>mla_process_bulk_action</pre>
|
209 |
-
</a>
|
210 |
-
</li>
|
211 |
-
|
212 |
-
<li class="method public">
|
213 |
-
<a href="#method_mla_render_admin_page" title="mla_render_admin_page :: Render the "Assistant" subpage in the Media section, using the list_table package">
|
214 |
-
<span class="description">Render the "Assistant" subpage in the Media section, using the list_table package</span><pre>mla_render_admin_page</pre>
|
215 |
-
</a>
|
216 |
-
</li>
|
217 |
-
|
218 |
-
<li class="method public">
|
219 |
-
<a href="#method_mla_screen_options_show_screen_filter" title="mla_screen_options_show_screen_filter :: Only show screen options on the table-list screen">
|
220 |
-
<span class="description">Only show screen options on the table-list screen</span><pre>mla_screen_options_show_screen_filter</pre>
|
221 |
-
</a>
|
222 |
-
</li>
|
223 |
-
|
224 |
-
<li class="method public">
|
225 |
-
<a href="#method_mla_set_parent_form" title="mla_set_parent_form :: Build the hidden form for the "Set Parent" popup modal window">
|
226 |
-
<span class="description">Build the hidden form for the "Set Parent" popup modal window</span><pre>mla_set_parent_form</pre>
|
227 |
-
</a>
|
228 |
-
</li>
|
229 |
-
|
230 |
-
<li class="method public">
|
231 |
-
<a href="#method_mla_set_screen_option_filter" title="mla_set_screen_option_filter :: Save the "Entries per page" option set by this user">
|
232 |
-
<span class="description">Save the "Entries per page" option set by this user</span><pre>mla_set_screen_option_filter</pre>
|
233 |
-
</a>
|
234 |
-
</li>
|
235 |
-
|
236 |
-
</ul>
|
237 |
-
</li>
|
238 |
-
<li class="nav-header protected">» Protected
|
239 |
-
<ul>
|
240 |
-
</ul>
|
241 |
-
</li>
|
242 |
-
<li class="nav-header private">» Private
|
243 |
-
<ul>
|
244 |
-
<li class="method private">
|
245 |
-
<a href="#method__build_inline_edit_form" title="_build_inline_edit_form :: Build the hidden row templates for inline editing (quick and bulk edit)">
|
246 |
-
<span class="description">Build the hidden row templates for inline editing (quick and bulk edit)</span><pre>_build_inline_edit_form</pre>
|
247 |
-
</a>
|
248 |
-
</li>
|
249 |
-
<li class="method private">
|
250 |
-
<a href="#method__bulk_edit_ajax_handler" title="_bulk_edit_ajax_handler :: Ajax handler for bulk editing and mapping">
|
251 |
-
<span class="description">Ajax handler for bulk editing and mapping</span><pre>_bulk_edit_ajax_handler</pre>
|
252 |
-
</a>
|
253 |
-
</li>
|
254 |
-
<li class="method private">
|
255 |
-
<a href="#method__compose_post_type_select" title="_compose_post_type_select :: Compose a Post Type Options list with current selection">
|
256 |
-
<span class="description">Compose a Post Type Options list with current selection</span><pre>_compose_post_type_select</pre>
|
257 |
-
</a>
|
258 |
-
</li>
|
259 |
-
<li class="method private">
|
260 |
-
<a href="#method__current_bulk_action" title="_current_bulk_action :: Get the current action selected from the bulk actions dropdown">
|
261 |
-
<span class="description">Get the current action selected from the bulk actions dropdown</span><pre>_current_bulk_action</pre>
|
262 |
-
</a>
|
263 |
-
</li>
|
264 |
-
<li class="method private">
|
265 |
-
<a href="#method__delete_single_item" title="_delete_single_item :: Delete a single item permanently">
|
266 |
-
<span class="description">Delete a single item permanently</span><pre>_delete_single_item</pre>
|
267 |
-
</a>
|
268 |
-
</li>
|
269 |
-
<li class="method private">
|
270 |
-
<a href="#method__process_bulk_value" title="_process_bulk_value :: Process bulk edit area fields, which may contain a Content Template">
|
271 |
-
<span class="description">Process bulk edit area fields, which may contain a Content Template</span><pre>_process_bulk_value</pre>
|
272 |
-
</a>
|
273 |
-
</li>
|
274 |
-
<li class="method private">
|
275 |
-
<a href="#method__process_mla_download_file" title="_process_mla_download_file :: Process secure file download">
|
276 |
-
<span class="description">Process secure file download</span><pre>_process_mla_download_file</pre>
|
277 |
-
</a>
|
278 |
-
</li>
|
279 |
-
<li class="method private">
|
280 |
-
<a href="#method__restore_single_item" title="_restore_single_item :: Restore a single item from the Trash">
|
281 |
-
<span class="description">Restore a single item from the Trash</span><pre>_restore_single_item</pre>
|
282 |
-
</a>
|
283 |
-
</li>
|
284 |
-
<li class="method private">
|
285 |
-
<a href="#method__trash_single_item" title="_trash_single_item :: Move a single item to Trash">
|
286 |
-
<span class="description">Move a single item to Trash</span><pre>_trash_single_item</pre>
|
287 |
-
</a>
|
288 |
-
</li>
|
289 |
-
</ul>
|
290 |
-
</li>
|
291 |
-
<li class="nav-header">
|
292 |
-
<i class="icon-custom icon-constant"></i> Constants
|
293 |
-
<ul>
|
294 |
-
<li class="constant ">
|
295 |
-
<a href="#constant_JAVASCRIPT_INLINE_EDIT_OBJECT" title="JAVASCRIPT_INLINE_EDIT_OBJECT :: Object name for localizing JavaScript - MLA List Table">
|
296 |
-
<span class="description">Object name for localizing JavaScript - MLA List Table</span><pre>JAVASCRIPT_INLINE_EDIT_OBJECT</pre>
|
297 |
-
</a>
|
298 |
-
</li>
|
299 |
-
<li class="constant ">
|
300 |
-
<a href="#constant_MLA_DEVELOPMENT_VERSION" title="MLA_DEVELOPMENT_VERSION :: Current date for Development Version, empty for production versions">
|
301 |
-
<span class="description">Current date for Development Version, empty for production versions</span><pre>MLA_DEVELOPMENT_VERSION</pre>
|
302 |
-
</a>
|
303 |
-
</li>
|
304 |
-
</ul>
|
305 |
-
</li>
|
306 |
-
</ul>
|
307 |
-
|
308 |
-
|
309 |
-
</div>
|
310 |
-
|
311 |
-
<div class="span8">
|
312 |
-
<div class="element class">
|
313 |
-
<h1>MLA</h1>
|
314 |
-
<small style="display: block; text-align: right">
|
315 |
-
</small>
|
316 |
-
<p class="short_description">Class MLA (Media Library Assistant) provides several enhancements to the handling
|
317 |
-
of images and files held in the WordPress Media Library.</p>
|
318 |
-
<div class="details">
|
319 |
-
<div class="long_description">
|
320 |
-
|
321 |
-
</div>
|
322 |
-
<table class="table table-bordered">
|
323 |
-
<tr>
|
324 |
-
<th>
|
325 |
-
package
|
326 |
-
</th>
|
327 |
-
<td>
|
328 |
-
|
329 |
-
<p>Media Library Assistant</p>
|
330 |
-
</td>
|
331 |
-
</tr>
|
332 |
-
<tr>
|
333 |
-
<th>
|
334 |
-
since
|
335 |
-
</th>
|
336 |
-
<td>
|
337 |
-
0.1
|
338 |
-
|
339 |
-
</td>
|
340 |
-
</tr>
|
341 |
-
</table>
|
342 |
-
|
343 |
-
<h3><i class="icon-custom icon-method"></i> Methods</h3>
|
344 |
-
<a id="method__build_inline_edit_form"></a>
|
345 |
-
<div class="element clickable method private method__build_inline_edit_form" data-toggle="collapse" data-target=".method__build_inline_edit_form .collapse">
|
346 |
-
<h2>Build the hidden row templates for inline editing (quick and bulk edit)</h2>
|
347 |
-
<pre>_build_inline_edit_form( $MLAListTable) : string</pre>
|
348 |
-
<div class="labels">
|
349 |
-
<span class="label">static</span> </div>
|
350 |
-
|
351 |
-
|
352 |
-
<div class="row collapse">
|
353 |
-
<div class="detail-description">
|
354 |
-
<div class="long_description"><p>inspired by inline_edit() in wp-admin\includes\class-wp-posts-list-table.php.</p></div>
|
355 |
-
|
356 |
-
<table class="table">
|
357 |
-
<tr>
|
358 |
-
<th>
|
359 |
-
since
|
360 |
-
</th>
|
361 |
-
<td>
|
362 |
-
0.20
|
363 |
-
|
364 |
-
</td>
|
365 |
-
</tr>
|
366 |
-
</table>
|
367 |
-
|
368 |
-
<h3>Arguments</h3>
|
369 |
-
<div class="subelement argument">
|
370 |
-
<h4>$MLAListTable</h4>
|
371 |
-
<code></code><p></p>
|
372 |
-
</div>
|
373 |
-
|
374 |
-
<h3>Response</h3>
|
375 |
-
<code>string</code><p><p>HTML <form> markup for hidden rows</p></p>
|
376 |
-
</div>
|
377 |
-
</div>
|
378 |
-
|
379 |
-
</div>
|
380 |
-
<a id="method__bulk_edit_ajax_handler"></a>
|
381 |
-
<div class="element clickable method private method__bulk_edit_ajax_handler" data-toggle="collapse" data-target=".method__bulk_edit_ajax_handler .collapse">
|
382 |
-
<h2>Ajax handler for bulk editing and mapping</h2>
|
383 |
-
<pre>_bulk_edit_ajax_handler() : void</pre>
|
384 |
-
<div class="labels">
|
385 |
-
<span class="label">static</span> </div>
|
386 |
-
|
387 |
-
|
388 |
-
<div class="row collapse">
|
389 |
-
<div class="detail-description">
|
390 |
-
<div class="long_description"></div>
|
391 |
-
|
392 |
-
<table class="table">
|
393 |
-
<tr>
|
394 |
-
<th>
|
395 |
-
since
|
396 |
-
</th>
|
397 |
-
<td>
|
398 |
-
2.00
|
399 |
-
|
400 |
-
</td>
|
401 |
-
</tr>
|
402 |
-
<tr>
|
403 |
-
<th>
|
404 |
-
|
405 |
-
</th>
|
406 |
-
<td>
|
407 |
-
</td>
|
408 |
-
</tr>
|
409 |
-
</table>
|
410 |
-
|
411 |
-
|
412 |
-
</div>
|
413 |
-
</div>
|
414 |
-
|
415 |
-
</div>
|
416 |
-
<a id="method__compose_post_type_select"></a>
|
417 |
-
<div class="element clickable method private method__compose_post_type_select" data-toggle="collapse" data-target=".method__compose_post_type_select .collapse">
|
418 |
-
<h2>Compose a Post Type Options list with current selection</h2>
|
419 |
-
<pre>_compose_post_type_select( &$templates, $selection = 'all') : string</pre>
|
420 |
-
<div class="labels">
|
421 |
-
<span class="label">static</span> </div>
|
422 |
-
|
423 |
-
|
424 |
-
<div class="row collapse">
|
425 |
-
<div class="detail-description">
|
426 |
-
<div class="long_description"></div>
|
427 |
-
|
428 |
-
<table class="table">
|
429 |
-
<tr>
|
430 |
-
<th>
|
431 |
-
since
|
432 |
-
</th>
|
433 |
-
<td>
|
434 |
-
1.90
|
435 |
-
|
436 |
-
</td>
|
437 |
-
</tr>
|
438 |
-
</table>
|
439 |
-
|
440 |
-
<h3>Arguments</h3>
|
441 |
-
<div class="subelement argument">
|
442 |
-
<h4>$templates</h4>
|
443 |
-
<code></code><p></p>
|
444 |
-
</div>
|
445 |
-
<div class="subelement argument">
|
446 |
-
<h4>$selection</h4>
|
447 |
-
<code></code><p></p>
|
448 |
-
</div>
|
449 |
-
|
450 |
-
<h3>Response</h3>
|
451 |
-
<code>string</code><p><p>HTML markup with select field options</p></p>
|
452 |
-
</div>
|
453 |
-
</div>
|
454 |
-
|
455 |
-
</div>
|
456 |
-
<a id="method__current_bulk_action"></a>
|
457 |
-
<div class="element clickable method private method__current_bulk_action" data-toggle="collapse" data-target=".method__current_bulk_action .collapse">
|
458 |
-
<h2>Get the current action selected from the bulk actions dropdown</h2>
|
459 |
-
<pre>_current_bulk_action() : string|false</pre>
|
460 |
-
<div class="labels">
|
461 |
-
<span class="label">static</span> </div>
|
462 |
-
|
463 |
-
|
464 |
-
<div class="row collapse">
|
465 |
-
<div class="detail-description">
|
466 |
-
<div class="long_description"></div>
|
467 |
-
|
468 |
-
<table class="table">
|
469 |
-
<tr>
|
470 |
-
<th>
|
471 |
-
since
|
472 |
-
</th>
|
473 |
-
<td>
|
474 |
-
0.1
|
475 |
-
|
476 |
-
</td>
|
477 |
-
</tr>
|
478 |
-
<tr>
|
479 |
-
<th>
|
480 |
-
|
481 |
-
</th>
|
482 |
-
<td>
|
483 |
-
</td>
|
484 |
-
</tr>
|
485 |
-
</table>
|
486 |
-
|
487 |
-
|
488 |
-
<h3>Response</h3>
|
489 |
-
<code>string|false</code><p><p>The action name or False if no action was selected</p></p>
|
490 |
-
</div>
|
491 |
-
</div>
|
492 |
-
|
493 |
-
</div>
|
494 |
-
<a id="method__delete_single_item"></a>
|
495 |
-
<div class="element clickable method private method__delete_single_item" data-toggle="collapse" data-target=".method__delete_single_item .collapse">
|
496 |
-
<h2>Delete a single item permanently</h2>
|
497 |
-
<pre>_delete_single_item( $post_id) : array</pre>
|
498 |
-
<div class="labels">
|
499 |
-
<span class="label">static</span> </div>
|
500 |
-
|
501 |
-
|
502 |
-
<div class="row collapse">
|
503 |
-
<div class="detail-description">
|
504 |
-
<div class="long_description"></div>
|
505 |
-
|
506 |
-
<table class="table">
|
507 |
-
<tr>
|
508 |
-
<th>
|
509 |
-
since
|
510 |
-
</th>
|
511 |
-
<td>
|
512 |
-
0.1
|
513 |
-
|
514 |
-
</td>
|
515 |
-
</tr>
|
516 |
-
</table>
|
517 |
-
|
518 |
-
<h3>Arguments</h3>
|
519 |
-
<div class="subelement argument">
|
520 |
-
<h4>$post_id</h4>
|
521 |
-
<code></code><p></p>
|
522 |
-
</div>
|
523 |
-
|
524 |
-
<h3>Response</h3>
|
525 |
-
<code>array</code><p><p>success/failure message and NULL content</p></p>
|
526 |
-
</div>
|
527 |
-
</div>
|
528 |
-
|
529 |
-
</div>
|
530 |
-
<a id="method__process_bulk_value"></a>
|
531 |
-
<div class="element clickable method private method__process_bulk_value" data-toggle="collapse" data-target=".method__process_bulk_value .collapse">
|
532 |
-
<h2>Process bulk edit area fields, which may contain a Content Template</h2>
|
533 |
-
<pre>_process_bulk_value( $post_id, $bulk_value) : string</pre>
|
534 |
-
<div class="labels">
|
535 |
-
<span class="label">static</span> </div>
|
536 |
-
|
537 |
-
|
538 |
-
<div class="row collapse">
|
539 |
-
<div class="detail-description">
|
540 |
-
<div class="long_description"></div>
|
541 |
-
|
542 |
-
<table class="table">
|
543 |
-
<tr>
|
544 |
-
<th>
|
545 |
-
since
|
546 |
-
</th>
|
547 |
-
<td>
|
548 |
-
1.80
|
549 |
-
|
550 |
-
</td>
|
551 |
-
</tr>
|
552 |
-
</table>
|
553 |
-
|
554 |
-
<h3>Arguments</h3>
|
555 |
-
<div class="subelement argument">
|
556 |
-
<h4>$post_id</h4>
|
557 |
-
<code></code><p></p>
|
558 |
-
</div>
|
559 |
-
<div class="subelement argument">
|
560 |
-
<h4>$bulk_value</h4>
|
561 |
-
<code></code><p></p>
|
562 |
-
</div>
|
563 |
-
|
564 |
-
<h3>Response</h3>
|
565 |
-
<code>string</code><p><p>Empty, or new value for the field</p></p>
|
566 |
-
</div>
|
567 |
-
</div>
|
568 |
-
|
569 |
-
</div>
|
570 |
-
<a id="method__process_mla_download_file"></a>
|
571 |
-
<div class="element clickable method private method__process_mla_download_file" data-toggle="collapse" data-target=".method__process_mla_download_file .collapse">
|
572 |
-
<h2>Process secure file download</h2>
|
573 |
-
<pre>_process_mla_download_file() : void</pre>
|
574 |
-
<div class="labels">
|
575 |
-
<span class="label">static</span> </div>
|
576 |
-
|
577 |
-
|
578 |
-
<div class="row collapse">
|
579 |
-
<div class="detail-description">
|
580 |
-
<div class="long_description"><p>Requires _wpnonce, mla_download_file and mla_download_type in $_REQUEST; mla_download_disposition is optional.</p></div>
|
581 |
-
|
582 |
-
<table class="table">
|
583 |
-
<tr>
|
584 |
-
<th>
|
585 |
-
since
|
586 |
-
</th>
|
587 |
-
<td>
|
588 |
-
2.00
|
589 |
-
|
590 |
-
</td>
|
591 |
-
</tr>
|
592 |
-
<tr>
|
593 |
-
<th>
|
594 |
-
|
595 |
-
</th>
|
596 |
-
<td>
|
597 |
-
</td>
|
598 |
-
</tr>
|
599 |
-
</table>
|
600 |
-
|
601 |
-
|
602 |
-
</div>
|
603 |
-
</div>
|
604 |
-
|
605 |
-
</div>
|
606 |
-
<a id="method__restore_single_item"></a>
|
607 |
-
<div class="element clickable method private method__restore_single_item" data-toggle="collapse" data-target=".method__restore_single_item .collapse">
|
608 |
-
<h2>Restore a single item from the Trash</h2>
|
609 |
-
<pre>_restore_single_item( $post_id) : array</pre>
|
610 |
-
<div class="labels">
|
611 |
-
<span class="label">static</span> </div>
|
612 |
-
|
613 |
-
|
614 |
-
<div class="row collapse">
|
615 |
-
<div class="detail-description">
|
616 |
-
<div class="long_description"></div>
|
617 |
-
|
618 |
-
<table class="table">
|
619 |
-
<tr>
|
620 |
-
<th>
|
621 |
-
since
|
622 |
-
</th>
|
623 |
-
<td>
|
624 |
-
0.1
|
625 |
-
|
626 |
-
</td>
|
627 |
-
</tr>
|
628 |
-
</table>
|
629 |
-
|
630 |
-
<h3>Arguments</h3>
|
631 |
-
<div class="subelement argument">
|
632 |
-
<h4>$post_id</h4>
|
633 |
-
<code></code><p></p>
|
634 |
-
</div>
|
635 |
-
|
636 |
-
<h3>Response</h3>
|
637 |
-
<code>array</code><p><p>success/failure message and NULL content</p></p>
|
638 |
-
</div>
|
639 |
-
</div>
|
640 |
-
|
641 |
-
</div>
|
642 |
-
<a id="method__trash_single_item"></a>
|
643 |
-
<div class="element clickable method private method__trash_single_item" data-toggle="collapse" data-target=".method__trash_single_item .collapse">
|
644 |
-
<h2>Move a single item to Trash</h2>
|
645 |
-
<pre>_trash_single_item( $post_id) : array</pre>
|
646 |
-
<div class="labels">
|
647 |
-
<span class="label">static</span> </div>
|
648 |
-
|
649 |
-
|
650 |
-
<div class="row collapse">
|
651 |
-
<div class="detail-description">
|
652 |
-
<div class="long_description"></div>
|
653 |
-
|
654 |
-
<table class="table">
|
655 |
-
<tr>
|
656 |
-
<th>
|
657 |
-
since
|
658 |
-
</th>
|
659 |
-
<td>
|
660 |
-
0.1
|
661 |
-
|
662 |
-
</td>
|
663 |
-
</tr>
|
664 |
-
</table>
|
665 |
-
|
666 |
-
<h3>Arguments</h3>
|
667 |
-
<div class="subelement argument">
|
668 |
-
<h4>$post_id</h4>
|
669 |
-
<code></code><p></p>
|
670 |
-
</div>
|
671 |
-
|
672 |
-
<h3>Response</h3>
|
673 |
-
<code>array</code><p><p>success/failure message and NULL content</p></p>
|
674 |
-
</div>
|
675 |
-
</div>
|
676 |
-
|
677 |
-
</div>
|
678 |
-
<a id="method_initialize"></a>
|
679 |
-
<div class="element clickable method public method_initialize" data-toggle="collapse" data-target=".method_initialize .collapse">
|
680 |
-
<h2>Initialization function, similar to __construct()</h2>
|
681 |
-
<pre>initialize() : void</pre>
|
682 |
-
<div class="labels">
|
683 |
-
<span class="label">static</span> </div>
|
684 |
-
|
685 |
-
|
686 |
-
<div class="row collapse">
|
687 |
-
<div class="detail-description">
|
688 |
-
<div class="long_description"><p>This function contains add_action and add_filter calls
|
689 |
-
to set up the Ajax handlers, enqueue JavaScript and CSS files, and
|
690 |
-
set up the Assistant submenu.</p></div>
|
691 |
-
|
692 |
-
<table class="table">
|
693 |
-
<tr>
|
694 |
-
<th>
|
695 |
-
since
|
696 |
-
</th>
|
697 |
-
<td>
|
698 |
-
0.1
|
699 |
-
|
700 |
-
</td>
|
701 |
-
</tr>
|
702 |
-
<tr>
|
703 |
-
<th>
|
704 |
-
|
705 |
-
</th>
|
706 |
-
<td>
|
707 |
-
</td>
|
708 |
-
</tr>
|
709 |
-
</table>
|
710 |
-
|
711 |
-
|
712 |
-
</div>
|
713 |
-
</div>
|
714 |
-
|
715 |
-
</div>
|
716 |
-
<a id="method_mla_add_help_tab"></a>
|
717 |
-
<div class="element clickable method public method_mla_add_help_tab" data-toggle="collapse" data-target=".method_mla_add_help_tab .collapse">
|
718 |
-
<h2>Add contextual help tabs to all the MLA pages</h2>
|
719 |
-
<pre>mla_add_help_tab() : void</pre>
|
720 |
-
<div class="labels">
|
721 |
-
<span class="label">static</span> </div>
|
722 |
-
|
723 |
-
|
724 |
-
<div class="row collapse">
|
725 |
-
<div class="detail-description">
|
726 |
-
<div class="long_description"></div>
|
727 |
-
|
728 |
-
<table class="table">
|
729 |
-
<tr>
|
730 |
-
<th>
|
731 |
-
since
|
732 |
-
</th>
|
733 |
-
<td>
|
734 |
-
0.1
|
735 |
-
|
736 |
-
</td>
|
737 |
-
</tr>
|
738 |
-
<tr>
|
739 |
-
<th>
|
740 |
-
|
741 |
-
</th>
|
742 |
-
<td>
|
743 |
-
</td>
|
744 |
-
</tr>
|
745 |
-
</table>
|
746 |
-
|
747 |
-
|
748 |
-
</div>
|
749 |
-
</div>
|
750 |
-
|
751 |
-
</div>
|
752 |
-
<a id="method_mla_add_menu_options"></a>
|
753 |
-
<div class="element clickable method public method_mla_add_menu_options" data-toggle="collapse" data-target=".method_mla_add_menu_options .collapse">
|
754 |
-
<h2>Add the "XX Entries per page" filter to the Screen Options tab</h2>
|
755 |
-
<pre>mla_add_menu_options() : void</pre>
|
756 |
-
<div class="labels">
|
757 |
-
<span class="label">static</span> </div>
|
758 |
-
|
759 |
-
|
760 |
-
<div class="row collapse">
|
761 |
-
<div class="detail-description">
|
762 |
-
<div class="long_description"></div>
|
763 |
-
|
764 |
-
<table class="table">
|
765 |
-
<tr>
|
766 |
-
<th>
|
767 |
-
since
|
768 |
-
</th>
|
769 |
-
<td>
|
770 |
-
0.1
|
771 |
-
|
772 |
-
</td>
|
773 |
-
</tr>
|
774 |
-
<tr>
|
775 |
-
<th>
|
776 |
-
|
777 |
-
</th>
|
778 |
-
<td>
|
779 |
-
</td>
|
780 |
-
</tr>
|
781 |
-
</table>
|
782 |
-
|
783 |
-
|
784 |
-
</div>
|
785 |
-
</div>
|
786 |
-
|
787 |
-
</div>
|
788 |
-
<a id="method_mla_admin_enqueue_scripts_action"></a>
|
789 |
-
<div class="element clickable method public method_mla_admin_enqueue_scripts_action" data-toggle="collapse" data-target=".method_mla_admin_enqueue_scripts_action .collapse">
|
790 |
-
<h2>Load the plugin's Style Sheet and Javascript files</h2>
|
791 |
-
<pre>mla_admin_enqueue_scripts_action( $page_hook) : void</pre>
|
792 |
-
<div class="labels">
|
793 |
-
<span class="label">static</span> </div>
|
794 |
-
|
795 |
-
|
796 |
-
<div class="row collapse">
|
797 |
-
<div class="detail-description">
|
798 |
-
<div class="long_description"></div>
|
799 |
-
|
800 |
-
<table class="table">
|
801 |
-
<tr>
|
802 |
-
<th>
|
803 |
-
since
|
804 |
-
</th>
|
805 |
-
<td>
|
806 |
-
0.1
|
807 |
-
|
808 |
-
</td>
|
809 |
-
</tr>
|
810 |
-
</table>
|
811 |
-
|
812 |
-
<h3>Arguments</h3>
|
813 |
-
<div class="subelement argument">
|
814 |
-
<h4>$page_hook</h4>
|
815 |
-
<code></code><p></p>
|
816 |
-
</div>
|
817 |
-
|
818 |
-
</div>
|
819 |
-
</div>
|
820 |
-
|
821 |
-
</div>
|
822 |
-
<a id="method_mla_admin_init_action"></a>
|
823 |
-
<div class="element clickable method public method_mla_admin_init_action" data-toggle="collapse" data-target=".method_mla_admin_init_action .collapse">
|
824 |
-
<h2>Load the plugin's Ajax handler or process Edit Media update actions</h2>
|
825 |
-
<pre>mla_admin_init_action() : void</pre>
|
826 |
-
<div class="labels">
|
827 |
-
<span class="label">static</span> </div>
|
828 |
-
|
829 |
-
|
830 |
-
<div class="row collapse">
|
831 |
-
<div class="detail-description">
|
832 |
-
<div class="long_description"></div>
|
833 |
-
|
834 |
-
<table class="table">
|
835 |
-
<tr>
|
836 |
-
<th>
|
837 |
-
since
|
838 |
-
</th>
|
839 |
-
<td>
|
840 |
-
0.20
|
841 |
-
|
842 |
-
</td>
|
843 |
-
</tr>
|
844 |
-
<tr>
|
845 |
-
<th>
|
846 |
-
|
847 |
-
</th>
|
848 |
-
<td>
|
849 |
-
</td>
|
850 |
-
</tr>
|
851 |
-
</table>
|
852 |
-
|
853 |
-
|
854 |
-
</div>
|
855 |
-
</div>
|
856 |
-
|
857 |
-
</div>
|
858 |
-
<a id="method_mla_admin_menu_action"></a>
|
859 |
-
<div class="element clickable method public method_mla_admin_menu_action" data-toggle="collapse" data-target=".method_mla_admin_menu_action .collapse">
|
860 |
-
<h2>Add the submenu pages</h2>
|
861 |
-
<pre>mla_admin_menu_action() : void</pre>
|
862 |
-
<div class="labels">
|
863 |
-
<span class="label">static</span> </div>
|
864 |
-
|
865 |
-
|
866 |
-
<div class="row collapse">
|
867 |
-
<div class="detail-description">
|
868 |
-
<div class="long_description"><p>Add a submenu page in the "Media" section,
|
869 |
-
add settings page in the "Settings" section.
|
870 |
-
add settings link in the Plugins section entry for MLA.</p></div>
|
871 |
-
|
872 |
-
<table class="table">
|
873 |
-
<tr>
|
874 |
-
<th>
|
875 |
-
since
|
876 |
-
</th>
|
877 |
-
<td>
|
878 |
-
0.1
|
879 |
-
|
880 |
-
</td>
|
881 |
-
</tr>
|
882 |
-
<tr>
|
883 |
-
<th>
|
884 |
-
|
885 |
-
</th>
|
886 |
-
<td>
|
887 |
-
</td>
|
888 |
-
</tr>
|
889 |
-
</table>
|
890 |
-
|
891 |
-
|
892 |
-
</div>
|
893 |
-
</div>
|
894 |
-
|
895 |
-
</div>
|
896 |
-
<a id="method_mla_admin_print_styles_action"></a>
|
897 |
-
<div class="element clickable method public method_mla_admin_print_styles_action" data-toggle="collapse" data-target=".method_mla_admin_print_styles_action .collapse">
|
898 |
-
<h2>Print optional in-lne styles for Media/Assistant submenu table</h
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|