Version Description
Release Date - December 15, 2015
Download this release
Release Info
Developer | webbistro |
Plugin | Enhanced Media Library |
Version | 2.1 |
Comparing to | |
See all releases |
Code changes from version 2.0.4.8 to 2.1
- core/class-eml-media-list-table.php +23 -22
- core/{eml-upload-4.2.php → eml-upload-4.4.php} +26 -18
- core/gallery.php +408 -0
- core/mime-types.php +82 -78
- core/options-pages.php +561 -239
- core/taxonomies.php +312 -319
- css/eml-admin.css +28 -15
- enhanced-media-library.php +248 -180
- js/eml-media-editor.js +269 -0
- js/eml-media-models.js +22 -21
- js/eml-media-views.js +403 -210
- languages/eml-ko_KR.mo +0 -0
- languages/eml-ko_KR.po +791 -0
- languages/eml.pot +482 -215
- readme.txt +85 -40
core/class-eml-media-list-table.php
CHANGED
@@ -1,40 +1,42 @@
|
|
1 |
<?php
|
2 |
|
|
|
|
|
3 |
/**
|
4 |
* EML custom media table
|
5 |
*
|
6 |
* Extends wp-admin/includes/class-wp-media-list-table.php
|
7 |
-
*
|
8 |
* Features added:
|
9 |
* All Uncategorized
|
10 |
*
|
11 |
* @since 2.0.4
|
12 |
* @created 21/02/15
|
13 |
*/
|
14 |
-
|
15 |
class WPUXSS_EML_Media_List_Table extends WP_Media_List_Table {
|
16 |
-
|
17 |
protected $detached;
|
18 |
-
|
19 |
protected $uncategorized;
|
20 |
-
|
21 |
protected $is_trash;
|
22 |
-
|
23 |
|
24 |
-
|
25 |
-
|
|
|
26 |
$this->detached = ( isset( $_REQUEST['attachment-filter'] ) && 'detached' === $_REQUEST['attachment-filter'] );
|
27 |
-
|
28 |
$this->uncategorized = ( isset( $_REQUEST['attachment-filter'] ) && 'uncategorized' === $_REQUEST['attachment-filter'] );
|
29 |
-
|
30 |
$this->is_trash = isset( $_REQUEST['attachment-filter'] ) && 'trash' == $_REQUEST['attachment-filter'];
|
31 |
|
32 |
parent::__construct();
|
33 |
}
|
34 |
-
|
35 |
-
|
36 |
-
protected function get_views() {
|
37 |
-
|
38 |
global $wpdb, $post_mime_types, $avail_post_mime_types;
|
39 |
|
40 |
$type_links = array();
|
@@ -59,7 +61,7 @@ class WPUXSS_EML_Media_List_Table extends WP_Media_List_Table {
|
|
59 |
$type_links[$mime_type] = '<option value="post_mime_type:' . esc_attr( $mime_type ) . '"' . $selected . '>' . sprintf( translate_nooped_plural( $label[2], $num_posts[$mime_type] ), number_format_i18n( $num_posts[$mime_type] )) . '</option>';
|
60 |
}
|
61 |
$type_links['detached'] = '<option value="detached"' . ( $this->detached ? ' selected="selected"' : '' ) . '>' . sprintf( _nx( 'Unattached (%s)', 'Unattached (%s)', $total_orphans, 'detached files' ), number_format_i18n( $total_orphans ) ) . '</option>';
|
62 |
-
|
63 |
$type_links['uncategorized'] = '<option value="uncategorized"' . ( $this->uncategorized ? ' selected="selected"' : '' ) . '>' . __( 'All Uncategorized', 'eml' ) . '</option>';
|
64 |
|
65 |
if ( !empty($_num_posts['trash']) )
|
@@ -67,9 +69,9 @@ class WPUXSS_EML_Media_List_Table extends WP_Media_List_Table {
|
|
67 |
|
68 |
return $type_links;
|
69 |
}
|
70 |
-
|
71 |
-
protected function extra_tablenav( $which )
|
72 |
-
|
73 |
if ( 'bar' !== $which ) {
|
74 |
return;
|
75 |
}
|
@@ -84,18 +86,17 @@ class WPUXSS_EML_Media_List_Table extends WP_Media_List_Table {
|
|
84 |
/** This action is documented in wp-admin/includes/class-wp-posts-list-table.php */
|
85 |
do_action( 'restrict_manage_posts' );
|
86 |
submit_button( __( 'Filter' ), 'button', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
|
87 |
-
|
88 |
submit_button( __( 'Reset All Filters' ), 'button', 'filter_action', false, array( 'id' => 'eml-reset-filters-query-submit', 'disabled' => 'disabled' ) );
|
89 |
}
|
90 |
|
91 |
if ( $this->is_trash && current_user_can( 'edit_others_posts' ) ) {
|
92 |
submit_button( __( 'Empty Trash' ), 'apply', 'delete_all', false );
|
93 |
-
}
|
94 |
?>
|
95 |
</div>
|
96 |
<?php
|
97 |
}
|
98 |
-
|
99 |
}
|
100 |
|
101 |
-
?>
|
1 |
<?php
|
2 |
|
3 |
+
|
4 |
+
|
5 |
/**
|
6 |
* EML custom media table
|
7 |
*
|
8 |
* Extends wp-admin/includes/class-wp-media-list-table.php
|
9 |
+
*
|
10 |
* Features added:
|
11 |
* All Uncategorized
|
12 |
*
|
13 |
* @since 2.0.4
|
14 |
* @created 21/02/15
|
15 |
*/
|
16 |
+
|
17 |
class WPUXSS_EML_Media_List_Table extends WP_Media_List_Table {
|
18 |
+
|
19 |
protected $detached;
|
20 |
+
|
21 |
protected $uncategorized;
|
22 |
+
|
23 |
protected $is_trash;
|
|
|
24 |
|
25 |
+
|
26 |
+
public function __construct( $args = array() ) {
|
27 |
+
|
28 |
$this->detached = ( isset( $_REQUEST['attachment-filter'] ) && 'detached' === $_REQUEST['attachment-filter'] );
|
29 |
+
|
30 |
$this->uncategorized = ( isset( $_REQUEST['attachment-filter'] ) && 'uncategorized' === $_REQUEST['attachment-filter'] );
|
31 |
+
|
32 |
$this->is_trash = isset( $_REQUEST['attachment-filter'] ) && 'trash' == $_REQUEST['attachment-filter'];
|
33 |
|
34 |
parent::__construct();
|
35 |
}
|
36 |
+
|
37 |
+
|
38 |
+
protected function get_views() {
|
39 |
+
|
40 |
global $wpdb, $post_mime_types, $avail_post_mime_types;
|
41 |
|
42 |
$type_links = array();
|
61 |
$type_links[$mime_type] = '<option value="post_mime_type:' . esc_attr( $mime_type ) . '"' . $selected . '>' . sprintf( translate_nooped_plural( $label[2], $num_posts[$mime_type] ), number_format_i18n( $num_posts[$mime_type] )) . '</option>';
|
62 |
}
|
63 |
$type_links['detached'] = '<option value="detached"' . ( $this->detached ? ' selected="selected"' : '' ) . '>' . sprintf( _nx( 'Unattached (%s)', 'Unattached (%s)', $total_orphans, 'detached files' ), number_format_i18n( $total_orphans ) ) . '</option>';
|
64 |
+
|
65 |
$type_links['uncategorized'] = '<option value="uncategorized"' . ( $this->uncategorized ? ' selected="selected"' : '' ) . '>' . __( 'All Uncategorized', 'eml' ) . '</option>';
|
66 |
|
67 |
if ( !empty($_num_posts['trash']) )
|
69 |
|
70 |
return $type_links;
|
71 |
}
|
72 |
+
|
73 |
+
protected function extra_tablenav( $which ) {
|
74 |
+
|
75 |
if ( 'bar' !== $which ) {
|
76 |
return;
|
77 |
}
|
86 |
/** This action is documented in wp-admin/includes/class-wp-posts-list-table.php */
|
87 |
do_action( 'restrict_manage_posts' );
|
88 |
submit_button( __( 'Filter' ), 'button', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
|
89 |
+
|
90 |
submit_button( __( 'Reset All Filters' ), 'button', 'filter_action', false, array( 'id' => 'eml-reset-filters-query-submit', 'disabled' => 'disabled' ) );
|
91 |
}
|
92 |
|
93 |
if ( $this->is_trash && current_user_can( 'edit_others_posts' ) ) {
|
94 |
submit_button( __( 'Empty Trash' ), 'apply', 'delete_all', false );
|
95 |
+
}
|
96 |
?>
|
97 |
</div>
|
98 |
<?php
|
99 |
}
|
|
|
100 |
}
|
101 |
|
102 |
+
?>
|
core/{eml-upload-4.2.php → eml-upload-4.4.php}
RENAMED
@@ -4,13 +4,13 @@
|
|
4 |
* EML custom upload.php
|
5 |
*
|
6 |
* Based on wp-admin/upload.php (4.2.2)
|
7 |
-
*
|
8 |
* Uses custom media table class WPUXSS_EML_Media_List_Table
|
9 |
*
|
10 |
* @since 2.0.4
|
11 |
* @created 21/02/15
|
12 |
*/
|
13 |
-
|
14 |
// EML customization here
|
15 |
require_once( ABSPATH . 'wp-admin/admin.php' );
|
16 |
require_once( ABSPATH . 'wp-includes/pluggable.php' );
|
@@ -32,6 +32,8 @@ if ( 'grid' === $mode ) {
|
|
32 |
wp_enqueue_script( 'media-grid' );
|
33 |
wp_enqueue_script( 'media' );
|
34 |
|
|
|
|
|
35 |
$q = $_GET;
|
36 |
// let JS handle this
|
37 |
unset( $q['s'] );
|
@@ -78,14 +80,14 @@ if ( 'grid' === $mode ) {
|
|
78 |
require_once( ABSPATH . 'wp-admin/admin-header.php' );
|
79 |
?>
|
80 |
<div class="wrap" id="wp-media-grid" data-search="<?php _admin_search_query() ?>">
|
81 |
-
<
|
82 |
<?php
|
83 |
echo esc_html( $title );
|
84 |
if ( current_user_can( 'upload_files' ) ) { ?>
|
85 |
-
<a href="media-new.php" class="
|
86 |
}
|
87 |
?>
|
88 |
-
|
89 |
<div class="error hide-if-js">
|
90 |
<p><?php _e( 'The grid view for the Media Library requires JavaScript. <a href="upload.php?mode=list">Switch to the list view</a>.' ); ?></p>
|
91 |
</div>
|
@@ -95,12 +97,12 @@ if ( 'grid' === $mode ) {
|
|
95 |
exit;
|
96 |
}
|
97 |
|
98 |
-
// EML customization here
|
99 |
if ( isset( $GLOBALS['hook_suffix'] ) )
|
100 |
$args['screen'] = get_current_screen();
|
101 |
else
|
102 |
$args['screen'] = null;
|
103 |
-
|
104 |
$wp_list_table = new WPUXSS_EML_Media_List_Table( $args );
|
105 |
// EML customization end
|
106 |
|
@@ -141,7 +143,7 @@ if ( $doaction ) {
|
|
141 |
break;
|
142 |
foreach ( (array) $post_ids as $post_id ) {
|
143 |
if ( !current_user_can( 'delete_post', $post_id ) )
|
144 |
-
wp_die( __( 'You are not allowed to move this
|
145 |
|
146 |
if ( !wp_trash_post( $post_id ) )
|
147 |
wp_die( __( 'Error in moving to trash.' ) );
|
@@ -153,7 +155,7 @@ if ( $doaction ) {
|
|
153 |
break;
|
154 |
foreach ( (array) $post_ids as $post_id ) {
|
155 |
if ( !current_user_can( 'delete_post', $post_id ) )
|
156 |
-
wp_die( __( 'You are not allowed to move this
|
157 |
|
158 |
if ( !wp_untrash_post( $post_id ) )
|
159 |
wp_die( __( 'Error in restoring from trash.' ) );
|
@@ -165,7 +167,7 @@ if ( $doaction ) {
|
|
165 |
break;
|
166 |
foreach ( (array) $post_ids as $post_id_del ) {
|
167 |
if ( !current_user_can( 'delete_post', $post_id_del ) )
|
168 |
-
wp_die( __( 'You are not allowed to delete this
|
169 |
|
170 |
if ( !wp_delete_attachment( $post_id_del ) )
|
171 |
wp_die( __( 'Error in deleting.' ) );
|
@@ -217,19 +219,25 @@ get_current_screen()->set_help_sidebar(
|
|
217 |
'<p>' . __( '<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>' ) . '</p>'
|
218 |
);
|
219 |
|
|
|
|
|
|
|
|
|
|
|
|
|
220 |
require_once( ABSPATH . 'wp-admin/admin-header.php' );
|
221 |
?>
|
222 |
|
223 |
<div class="wrap">
|
224 |
-
<
|
225 |
<?php
|
226 |
echo esc_html( $title );
|
227 |
if ( current_user_can( 'upload_files' ) ) { ?>
|
228 |
-
<a href="media-new.php" class="
|
229 |
}
|
230 |
if ( ! empty( $_REQUEST['s'] ) )
|
231 |
printf( '<span class="subtitle">' . __('Search results for “%s”') . '</span>', get_search_query() ); ?>
|
232 |
-
</
|
233 |
|
234 |
<?php
|
235 |
$message = '';
|
@@ -279,11 +287,11 @@ if ( ! empty( $_GET['untrashed'] ) && $untrashed = absint( $_GET['untrashed'] )
|
|
279 |
$_SERVER['REQUEST_URI'] = remove_query_arg(array('untrashed'), $_SERVER['REQUEST_URI']);
|
280 |
}
|
281 |
|
282 |
-
$messages[1] = __('Media attachment updated.');
|
283 |
-
$messages[2] = __('Media permanently deleted.');
|
284 |
-
$messages[3] = __('Error saving media attachment.');
|
285 |
-
$messages[4] = __('Media moved to the trash.') . ' <a href="' . esc_url( wp_nonce_url( 'upload.php?doaction=undo&action=untrash&ids='.(isset($_GET['ids']) ? $_GET['ids'] : ''), "bulk-media" ) ) . '">' . __('Undo') . '</a>';
|
286 |
-
$messages[5] = __('Media restored from the trash.');
|
287 |
|
288 |
if ( ! empty( $_GET['message'] ) && isset( $messages[ $_GET['message'] ] ) ) {
|
289 |
$message = $messages[ $_GET['message'] ];
|
4 |
* EML custom upload.php
|
5 |
*
|
6 |
* Based on wp-admin/upload.php (4.2.2)
|
7 |
+
*
|
8 |
* Uses custom media table class WPUXSS_EML_Media_List_Table
|
9 |
*
|
10 |
* @since 2.0.4
|
11 |
* @created 21/02/15
|
12 |
*/
|
13 |
+
|
14 |
// EML customization here
|
15 |
require_once( ABSPATH . 'wp-admin/admin.php' );
|
16 |
require_once( ABSPATH . 'wp-includes/pluggable.php' );
|
32 |
wp_enqueue_script( 'media-grid' );
|
33 |
wp_enqueue_script( 'media' );
|
34 |
|
35 |
+
remove_action( 'admin_head', 'wp_admin_canonical_url' );
|
36 |
+
|
37 |
$q = $_GET;
|
38 |
// let JS handle this
|
39 |
unset( $q['s'] );
|
80 |
require_once( ABSPATH . 'wp-admin/admin-header.php' );
|
81 |
?>
|
82 |
<div class="wrap" id="wp-media-grid" data-search="<?php _admin_search_query() ?>">
|
83 |
+
<h1>
|
84 |
<?php
|
85 |
echo esc_html( $title );
|
86 |
if ( current_user_can( 'upload_files' ) ) { ?>
|
87 |
+
<a href="media-new.php" class="page-title-action"><?php echo esc_html_x( 'Add New', 'file' ); ?></a><?php
|
88 |
}
|
89 |
?>
|
90 |
+
</h1>
|
91 |
<div class="error hide-if-js">
|
92 |
<p><?php _e( 'The grid view for the Media Library requires JavaScript. <a href="upload.php?mode=list">Switch to the list view</a>.' ); ?></p>
|
93 |
</div>
|
97 |
exit;
|
98 |
}
|
99 |
|
100 |
+
// EML customization here
|
101 |
if ( isset( $GLOBALS['hook_suffix'] ) )
|
102 |
$args['screen'] = get_current_screen();
|
103 |
else
|
104 |
$args['screen'] = null;
|
105 |
+
|
106 |
$wp_list_table = new WPUXSS_EML_Media_List_Table( $args );
|
107 |
// EML customization end
|
108 |
|
143 |
break;
|
144 |
foreach ( (array) $post_ids as $post_id ) {
|
145 |
if ( !current_user_can( 'delete_post', $post_id ) )
|
146 |
+
wp_die( __( 'You are not allowed to move this item to the Trash.' ) );
|
147 |
|
148 |
if ( !wp_trash_post( $post_id ) )
|
149 |
wp_die( __( 'Error in moving to trash.' ) );
|
155 |
break;
|
156 |
foreach ( (array) $post_ids as $post_id ) {
|
157 |
if ( !current_user_can( 'delete_post', $post_id ) )
|
158 |
+
wp_die( __( 'You are not allowed to move this item out of the Trash.' ) );
|
159 |
|
160 |
if ( !wp_untrash_post( $post_id ) )
|
161 |
wp_die( __( 'Error in restoring from trash.' ) );
|
167 |
break;
|
168 |
foreach ( (array) $post_ids as $post_id_del ) {
|
169 |
if ( !current_user_can( 'delete_post', $post_id_del ) )
|
170 |
+
wp_die( __( 'You are not allowed to delete this item.' ) );
|
171 |
|
172 |
if ( !wp_delete_attachment( $post_id_del ) )
|
173 |
wp_die( __( 'Error in deleting.' ) );
|
219 |
'<p>' . __( '<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>' ) . '</p>'
|
220 |
);
|
221 |
|
222 |
+
get_current_screen()->set_screen_reader_content( array(
|
223 |
+
'heading_views' => __( 'Filter media items list' ),
|
224 |
+
'heading_pagination' => __( 'Media items list navigation' ),
|
225 |
+
'heading_list' => __( 'Media items list' ),
|
226 |
+
) );
|
227 |
+
|
228 |
require_once( ABSPATH . 'wp-admin/admin-header.php' );
|
229 |
?>
|
230 |
|
231 |
<div class="wrap">
|
232 |
+
<h1>
|
233 |
<?php
|
234 |
echo esc_html( $title );
|
235 |
if ( current_user_can( 'upload_files' ) ) { ?>
|
236 |
+
<a href="media-new.php" class="page-title-action"><?php echo esc_html_x('Add New', 'file'); ?></a><?php
|
237 |
}
|
238 |
if ( ! empty( $_REQUEST['s'] ) )
|
239 |
printf( '<span class="subtitle">' . __('Search results for “%s”') . '</span>', get_search_query() ); ?>
|
240 |
+
</h1>
|
241 |
|
242 |
<?php
|
243 |
$message = '';
|
287 |
$_SERVER['REQUEST_URI'] = remove_query_arg(array('untrashed'), $_SERVER['REQUEST_URI']);
|
288 |
}
|
289 |
|
290 |
+
$messages[1] = __( 'Media attachment updated.' );
|
291 |
+
$messages[2] = __( 'Media attachment permanently deleted.' );
|
292 |
+
$messages[3] = __( 'Error saving media attachment.' );
|
293 |
+
$messages[4] = __( 'Media attachment moved to the trash.' ) . ' <a href="' . esc_url( wp_nonce_url( 'upload.php?doaction=undo&action=untrash&ids='.(isset($_GET['ids']) ? $_GET['ids'] : ''), "bulk-media" ) ) . '">' . __( 'Undo' ) . '</a>';
|
294 |
+
$messages[5] = __( 'Media attachment restored from the trash.' );
|
295 |
|
296 |
if ( ! empty( $_GET['message'] ) && isset( $messages[ $_GET['message'] ] ) ) {
|
297 |
$message = $messages[ $_GET['message'] ];
|
core/gallery.php
ADDED
@@ -0,0 +1,408 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
|
4 |
+
|
5 |
+
/**
|
6 |
+
* wpuxss_eml_gallery_shortcode
|
7 |
+
*
|
8 |
+
* @since 2.1
|
9 |
+
* @created 24/11/15
|
10 |
+
*/
|
11 |
+
|
12 |
+
add_filter( 'post_gallery', 'wpuxss_eml_gallery_shortcode', 12, 3 );
|
13 |
+
|
14 |
+
if( ! function_exists('wpuxss_eml_gallery_shortcode') ) {
|
15 |
+
|
16 |
+
function wpuxss_eml_gallery_shortcode( $output, $attr, $instance ) {
|
17 |
+
|
18 |
+
$post = get_post();
|
19 |
+
|
20 |
+
$is_filter_based = false;
|
21 |
+
|
22 |
+
|
23 |
+
$html5 = current_theme_supports( 'html5', 'gallery' );
|
24 |
+
$atts = shortcode_atts( array(
|
25 |
+
'ids' => '',
|
26 |
+
'order' => 'ASC',
|
27 |
+
'orderby' => 'menu_order ID',
|
28 |
+
'itemtag' => $html5 ? 'figure' : 'dl',
|
29 |
+
'icontag' => $html5 ? 'div' : 'dt',
|
30 |
+
'captiontag' => $html5 ? 'figcaption' : 'dd',
|
31 |
+
'columns' => 3,
|
32 |
+
'size' => 'thumbnail',
|
33 |
+
'include' => '',
|
34 |
+
'exclude' => '',
|
35 |
+
'link' => '',
|
36 |
+
'unattached' => ''
|
37 |
+
), $attr, 'gallery' );
|
38 |
+
|
39 |
+
|
40 |
+
$query = array(
|
41 |
+
'post_status' => 'inherit',
|
42 |
+
'post_type' => 'attachment',
|
43 |
+
'post_mime_type' => 'image',
|
44 |
+
'order' => $atts['order'],
|
45 |
+
'orderby' => $atts['orderby'],
|
46 |
+
'posts_per_page' => -1, //TODO: add limit and pagination
|
47 |
+
);
|
48 |
+
|
49 |
+
|
50 |
+
if ( isset( $attr['monthnum'] ) && isset( $attr['year'] ) ) {
|
51 |
+
|
52 |
+
$query['monthnum'] = $attr['monthnum'];
|
53 |
+
$query['year'] = $attr['year'];
|
54 |
+
|
55 |
+
$is_filter_based = true;
|
56 |
+
}
|
57 |
+
|
58 |
+
|
59 |
+
$tax_query = array();
|
60 |
+
|
61 |
+
foreach ( get_object_taxonomies( 'attachment', 'names' ) as $taxonomy ) {
|
62 |
+
|
63 |
+
if ( isset( $attr[$taxonomy] ) ) {
|
64 |
+
|
65 |
+
$terms = explode( ',', $attr[$taxonomy] );
|
66 |
+
|
67 |
+
$tax_query[] = array(
|
68 |
+
'taxonomy' => $taxonomy,
|
69 |
+
'field' => 'term_id',
|
70 |
+
'terms' => $terms,
|
71 |
+
'operator' => 'IN',
|
72 |
+
);
|
73 |
+
|
74 |
+
$is_filter_based = true;
|
75 |
+
}
|
76 |
+
}
|
77 |
+
|
78 |
+
|
79 |
+
if ( isset( $attr['id'] ) ) {
|
80 |
+
$atts['id'] = intval( $attr['id'] );
|
81 |
+
$is_filter_based = true;
|
82 |
+
}
|
83 |
+
elseif ( /*! isset( $attr['ids'] ) &&*/ ! $is_filter_based ) {
|
84 |
+
$atts['id'] = $post ? intval( $post->ID ) : 0;
|
85 |
+
}
|
86 |
+
|
87 |
+
// we need a value for gallery tag attributes
|
88 |
+
$id = isset( $attr['id'] ) ? $atts['id'] : 0;
|
89 |
+
|
90 |
+
|
91 |
+
if ( $is_filter_based ) {
|
92 |
+
|
93 |
+
if ( 'post__in' === $atts['orderby'] ) {
|
94 |
+
$query['orderby'] = 'menu_order ID';
|
95 |
+
}
|
96 |
+
|
97 |
+
if ( ! empty( $tax_query ) ) {
|
98 |
+
|
99 |
+
$tax_query['relation'] = 'AND';
|
100 |
+
$query['tax_query'] = $tax_query;
|
101 |
+
}
|
102 |
+
|
103 |
+
if ( isset( $atts['id'] ) ) {
|
104 |
+
$query['post_parent'] = intval( $atts['id'] );
|
105 |
+
}
|
106 |
+
|
107 |
+
$_attachments = get_posts( $query );
|
108 |
+
|
109 |
+
$attachments = array();
|
110 |
+
foreach ( $_attachments as $key => $val )
|
111 |
+
$attachments[$val->ID] = $_attachments[$key];
|
112 |
+
}
|
113 |
+
elseif ( ! empty( $atts['include'] ) ) {
|
114 |
+
|
115 |
+
$query['include'] = $atts['include'];
|
116 |
+
|
117 |
+
$_attachments = get_posts( $query );
|
118 |
+
|
119 |
+
$attachments = array();
|
120 |
+
foreach ( $_attachments as $key => $val )
|
121 |
+
$attachments[$val->ID] = $_attachments[$key];
|
122 |
+
}
|
123 |
+
elseif ( ! empty( $atts['exclude'] ) ) {
|
124 |
+
|
125 |
+
$query['exclude'] = $atts['exclude'];
|
126 |
+
$query['post_parent'] = isset( $atts['id'] ) ? $atts['id'] : 0;
|
127 |
+
|
128 |
+
$attachments = get_children( $query );
|
129 |
+
}
|
130 |
+
else {
|
131 |
+
|
132 |
+
$query['post_parent'] = isset( $atts['id'] ) ? $atts['id'] : 0;
|
133 |
+
|
134 |
+
$attachments = get_children( $query );
|
135 |
+
}
|
136 |
+
|
137 |
+
if ( empty( $attachments ) ) {
|
138 |
+
return '';
|
139 |
+
}
|
140 |
+
|
141 |
+
if ( is_feed() ) {
|
142 |
+
$output = "\n";
|
143 |
+
foreach ( $attachments as $att_id => $attachment ) {
|
144 |
+
$output .= wp_get_attachment_link( $att_id, $atts['size'], true ) . "\n";
|
145 |
+
}
|
146 |
+
return $output;
|
147 |
+
}
|
148 |
+
|
149 |
+
$itemtag = tag_escape( $atts['itemtag'] );
|
150 |
+
$captiontag = tag_escape( $atts['captiontag'] );
|
151 |
+
$icontag = tag_escape( $atts['icontag'] );
|
152 |
+
$valid_tags = wp_kses_allowed_html( 'post' );
|
153 |
+
if ( ! isset( $valid_tags[ $itemtag ] ) ) {
|
154 |
+
$itemtag = 'dl';
|
155 |
+
}
|
156 |
+
if ( ! isset( $valid_tags[ $captiontag ] ) ) {
|
157 |
+
$captiontag = 'dd';
|
158 |
+
}
|
159 |
+
if ( ! isset( $valid_tags[ $icontag ] ) ) {
|
160 |
+
$icontag = 'dt';
|
161 |
+
}
|
162 |
+
|
163 |
+
$columns = intval( $atts['columns'] );
|
164 |
+
$itemwidth = $columns > 0 ? floor(100/$columns) : 100;
|
165 |
+
$float = is_rtl() ? 'right' : 'left';
|
166 |
+
|
167 |
+
$selector = "gallery-{$instance}";
|
168 |
+
|
169 |
+
$gallery_style = '';
|
170 |
+
|
171 |
+
/**
|
172 |
+
* Filter whether to print default gallery styles.
|
173 |
+
*
|
174 |
+
* @since 3.1.0
|
175 |
+
*
|
176 |
+
* @param bool $print Whether to print default gallery styles.
|
177 |
+
* Defaults to false if the theme supports HTML5 galleries.
|
178 |
+
* Otherwise, defaults to true.
|
179 |
+
*/
|
180 |
+
if ( apply_filters( 'use_default_gallery_style', ! $html5 ) ) {
|
181 |
+
$gallery_style = "
|
182 |
+
<style type='text/css'>
|
183 |
+
#{$selector} {
|
184 |
+
margin: auto;
|
185 |
+
}
|
186 |
+
#{$selector} .gallery-item {
|
187 |
+
float: {$float};
|
188 |
+
margin-top: 10px;
|
189 |
+
text-align: center;
|
190 |
+
width: {$itemwidth}%;
|
191 |
+
}
|
192 |
+
#{$selector} img {
|
193 |
+
border: 2px solid #cfcfcf;
|
194 |
+
}
|
195 |
+
#{$selector} .gallery-caption {
|
196 |
+
margin-left: 0;
|
197 |
+
}
|
198 |
+
/* see gallery_shortcode() in wp-includes/media.php */
|
199 |
+
</style>\n\t\t";
|
200 |
+
}
|
201 |
+
|
202 |
+
$size_class = sanitize_html_class( $atts['size'] );
|
203 |
+
$gallery_div = "<div id='$selector' class='gallery galleryid-{$id} gallery-columns-{$columns} gallery-size-{$size_class}'>";
|
204 |
+
|
205 |
+
/**
|
206 |
+
* Filter the default gallery shortcode CSS styles.
|
207 |
+
*
|
208 |
+
* @since 2.5.0
|
209 |
+
*
|
210 |
+
* @param string $gallery_style Default CSS styles and opening HTML div container
|
211 |
+
* for the gallery shortcode output.
|
212 |
+
*/
|
213 |
+
$output = apply_filters( 'gallery_style', $gallery_style . $gallery_div );
|
214 |
+
|
215 |
+
$i = 0;
|
216 |
+
foreach ( $attachments as $id => $attachment ) {
|
217 |
+
|
218 |
+
$attr = ( trim( $attachment->post_excerpt ) ) ? array( 'aria-describedby' => "$selector-$id" ) : '';
|
219 |
+
if ( ! empty( $atts['link'] ) && 'file' === $atts['link'] ) {
|
220 |
+
$image_output = wp_get_attachment_link( $id, $atts['size'], false, false, false, $attr );
|
221 |
+
} elseif ( ! empty( $atts['link'] ) && 'none' === $atts['link'] ) {
|
222 |
+
$image_output = wp_get_attachment_image( $id, $atts['size'], false, $attr );
|
223 |
+
} else {
|
224 |
+
$image_output = wp_get_attachment_link( $id, $atts['size'], true, false, false, $attr );
|
225 |
+
}
|
226 |
+
$image_meta = wp_get_attachment_metadata( $id );
|
227 |
+
|
228 |
+
$orientation = '';
|
229 |
+
if ( isset( $image_meta['height'], $image_meta['width'] ) ) {
|
230 |
+
$orientation = ( $image_meta['height'] > $image_meta['width'] ) ? 'portrait' : 'landscape';
|
231 |
+
}
|
232 |
+
$output .= "<{$itemtag} class='gallery-item'>";
|
233 |
+
$output .= "
|
234 |
+
<{$icontag} class='gallery-icon {$orientation}'>
|
235 |
+
$image_output
|
236 |
+
</{$icontag}>";
|
237 |
+
if ( $captiontag && trim($attachment->post_excerpt) ) {
|
238 |
+
$output .= "
|
239 |
+
<{$captiontag} class='wp-caption-text gallery-caption' id='$selector-$id'>
|
240 |
+
" . wptexturize($attachment->post_excerpt) . "
|
241 |
+
</{$captiontag}>";
|
242 |
+
}
|
243 |
+
$output .= "</{$itemtag}>";
|
244 |
+
if ( ! $html5 && $columns > 0 && ++$i % $columns == 0 ) {
|
245 |
+
$output .= '<br style="clear: both" />';
|
246 |
+
}
|
247 |
+
}
|
248 |
+
|
249 |
+
if ( ! $html5 && $columns > 0 && $i % $columns !== 0 ) {
|
250 |
+
$output .= "
|
251 |
+
<br style='clear: both' />";
|
252 |
+
}
|
253 |
+
|
254 |
+
$output .= "
|
255 |
+
</div>\n";
|
256 |
+
|
257 |
+
return $output;
|
258 |
+
}
|
259 |
+
}
|
260 |
+
|
261 |
+
|
262 |
+
|
263 |
+
/**
|
264 |
+
* wpuxss_eml_print_media_gallery_templates
|
265 |
+
*
|
266 |
+
* @since 2.1
|
267 |
+
* @created 10/12/15
|
268 |
+
*/
|
269 |
+
|
270 |
+
add_action( 'print_media_templates', 'wpuxss_eml_print_media_gallery_templates' );
|
271 |
+
|
272 |
+
if ( ! function_exists( 'wpuxss_eml_print_media_gallery_templates' ) ) {
|
273 |
+
|
274 |
+
function wpuxss_eml_print_media_gallery_templates() { ?>
|
275 |
+
|
276 |
+
<script type="text/html" id="tmpl-eml-gallery-settings">
|
277 |
+
|
278 |
+
<div class="eml-info-box">
|
279 |
+
|
280 |
+
<h3><?php _e('Gallery Settings'); ?></h3>
|
281 |
+
|
282 |
+
<label class="setting">
|
283 |
+
<span><?php _e('Link To'); ?></span>
|
284 |
+
<select class="link-to"
|
285 |
+
data-setting="link"
|
286 |
+
<# if ( data.userSettings ) { #>
|
287 |
+
data-user-setting="urlbutton"
|
288 |
+
<# } #>>
|
289 |
+
|
290 |
+
<option value="post" <# if ( ! wp.media.galleryDefaults.link || 'post' == wp.media.galleryDefaults.link ) {
|
291 |
+
#>selected="selected"<# }
|
292 |
+
#>>
|
293 |
+
<?php esc_attr_e('Attachment Page'); ?>
|
294 |
+
</option>
|
295 |
+
<option value="file" <# if ( 'file' == wp.media.galleryDefaults.link ) { #>selected="selected"<# } #>>
|
296 |
+
<?php esc_attr_e('Media File'); ?>
|
297 |
+
</option>
|
298 |
+
<option value="none" <# if ( 'none' == wp.media.galleryDefaults.link ) { #>selected="selected"<# } #>>
|
299 |
+
<?php esc_attr_e('None'); ?>
|
300 |
+
</option>
|
301 |
+
</select>
|
302 |
+
</label>
|
303 |
+
|
304 |
+
<label class="setting">
|
305 |
+
<span><?php _e('Columns'); ?></span>
|
306 |
+
<select class="columns" name="columns"
|
307 |
+
data-setting="columns">
|
308 |
+
<?php for ( $i = 1; $i <= 9; $i++ ) : ?>
|
309 |
+
<option value="<?php echo esc_attr( $i ); ?>" <#
|
310 |
+
if ( <?php echo $i ?> == wp.media.galleryDefaults.columns ) { #>selected="selected"<# }
|
311 |
+
#>>
|
312 |
+
<?php echo esc_html( $i ); ?>
|
313 |
+
</option>
|
314 |
+
<?php endfor; ?>
|
315 |
+
</select>
|
316 |
+
</label>
|
317 |
+
|
318 |
+
<label class="setting _orderbyRandom">
|
319 |
+
<span><?php _e( 'Random Order' ); ?></span>
|
320 |
+
<input type="checkbox" data-setting="_orderbyRandom" />
|
321 |
+
</label>
|
322 |
+
|
323 |
+
<label class="setting size">
|
324 |
+
<span><?php _e( 'Size' ); ?></span>
|
325 |
+
<select class="size" name="size"
|
326 |
+
data-setting="size"
|
327 |
+
<# if ( data.userSettings ) { #>
|
328 |
+
data-user-setting="imgsize"
|
329 |
+
<# } #>
|
330 |
+
>
|
331 |
+
<?php
|
332 |
+
// This filter is documented in wp-admin/includes/media.php
|
333 |
+
$size_names = apply_filters( 'image_size_names_choose', array(
|
334 |
+
'thumbnail' => __( 'Thumbnail' ),
|
335 |
+
'medium' => __( 'Medium' ),
|
336 |
+
'large' => __( 'Large' ),
|
337 |
+
'full' => __( 'Full Size' ),
|
338 |
+
) );
|
339 |
+
|
340 |
+
foreach ( $size_names as $size => $label ) : ?>
|
341 |
+
<option value="<?php echo esc_attr( $size ); ?>">
|
342 |
+
<?php echo esc_html( $label ); ?>
|
343 |
+
</option>
|
344 |
+
<?php endforeach; ?>
|
345 |
+
</select>
|
346 |
+
</label>
|
347 |
+
|
348 |
+
</div>
|
349 |
+
|
350 |
+
<#
|
351 |
+
var library = data.controller.frame.state().get( 'library' ),
|
352 |
+
isFilterBased = emlIsGalleryFilterBased( library.props.toJSON() );
|
353 |
+
|
354 |
+
if ( isFilterBased ) { #>
|
355 |
+
|
356 |
+
<div class="eml-info-box">
|
357 |
+
|
358 |
+
<h3><?php _e( 'Based On', 'eml' ); ?></h3>
|
359 |
+
<label class="setting filter-based">
|
360 |
+
|
361 |
+
<ul class="eml-filter-based">
|
362 |
+
|
363 |
+
<#
|
364 |
+
_.each( eml.l10n.all_taxonomies, function( attrs, taxonomy ) {
|
365 |
+
|
366 |
+
var ids = library.props.get( taxonomy ),
|
367 |
+
taxonomy_string;
|
368 |
+
|
369 |
+
if ( ids ) {
|
370 |
+
|
371 |
+
taxonomy_string = attrs.singular_name + ': ' + _.values( _.pick( attrs.terms, ids ) ).join(', ');
|
372 |
+
|
373 |
+
#><li>{{taxonomy_string}}</li><#
|
374 |
+
}
|
375 |
+
});
|
376 |
+
|
377 |
+
var months = wp.media.view.settings.months,
|
378 |
+
monthnum = library.props.get( 'monthnum' ),
|
379 |
+
year = library.props.get( 'year' ),
|
380 |
+
uploadedTo = library.props.get( 'uploadedTo' );
|
381 |
+
|
382 |
+
if ( monthnum && year ) {
|
383 |
+
date = _.first( _.where( months, { month: monthnum, year: year } ) ).text;
|
384 |
+
#><li>{{date}}</li><#
|
385 |
+
}
|
386 |
+
|
387 |
+
if ( ! _.isUndefined( uploadedTo ) ) {
|
388 |
+
|
389 |
+
if ( uploadedTo == wp.media.view.settings.post.id ) {
|
390 |
+
#><li>{{wp.media.view.l10n.uploadedToThisPost}}</li><#
|
391 |
+
}
|
392 |
+
else if ( parseInt( uploadedTo ) ) {
|
393 |
+
#><li>{{window.eml.l10n.uploaded_to}}{{uploadedTo}}</li><#
|
394 |
+
}
|
395 |
+
else {
|
396 |
+
#><li>{{wp.media.view.l10n.unattached}}</li><#
|
397 |
+
}
|
398 |
+
}
|
399 |
+
#>
|
400 |
+
</ul>
|
401 |
+
</label>
|
402 |
+
</div>
|
403 |
+
<# } #>
|
404 |
+
</script>
|
405 |
+
<?php }
|
406 |
+
}
|
407 |
+
|
408 |
+
?>
|
core/mime-types.php
CHANGED
@@ -2,7 +2,6 @@
|
|
2 |
|
3 |
|
4 |
|
5 |
-
|
6 |
/**
|
7 |
* wpuxss_eml_mimes_validate
|
8 |
*
|
@@ -12,52 +11,58 @@
|
|
12 |
*/
|
13 |
|
14 |
if ( ! function_exists( 'wpuxss_eml_mimes_validate' ) ) {
|
15 |
-
|
16 |
function wpuxss_eml_mimes_validate($input) {
|
17 |
-
|
18 |
-
if (
|
19 |
-
|
20 |
-
if ( isset($
|
21 |
-
|
22 |
-
$_REQUEST['_wp_http_referer'] .= '&settings-restored=true';
|
23 |
$wpuxss_eml_mimes_backup = get_option('wpuxss_eml_mimes_backup');
|
24 |
$input = $wpuxss_eml_mimes_backup;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
}
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
$input[$type]['filter'] = intval($input[$type]['filter']);
|
46 |
-
$input[$type]['upload'] = intval($input[$type]['upload']);
|
47 |
-
|
48 |
-
$input[$type]['mime'] = sanitize_mime_type($mime['mime']);
|
49 |
-
$input[$type]['singular'] = sanitize_text_field($mime['singular']);
|
50 |
-
$input[$type]['plural'] = sanitize_text_field($mime['plural']);
|
51 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
}
|
53 |
-
|
54 |
return $input;
|
55 |
}
|
56 |
}
|
57 |
|
58 |
|
59 |
|
60 |
-
|
61 |
/**
|
62 |
* wpuxss_eml_sanitize_extension
|
63 |
*
|
@@ -68,9 +73,9 @@ if ( ! function_exists( 'wpuxss_eml_mimes_validate' ) ) {
|
|
68 |
*/
|
69 |
|
70 |
if ( ! function_exists( 'wpuxss_eml_sanitize_extension' ) ) {
|
71 |
-
|
72 |
function wpuxss_eml_sanitize_extension( $key ) {
|
73 |
-
|
74 |
$raw_key = $key;
|
75 |
$key = strtolower( $key );
|
76 |
$key = preg_replace( '/[^a-z0-9|]/', '', $key );
|
@@ -80,42 +85,42 @@ if ( ! function_exists( 'wpuxss_eml_sanitize_extension' ) ) {
|
|
80 |
|
81 |
|
82 |
|
83 |
-
|
84 |
/**
|
85 |
* wpuxss_eml_post_mime_types
|
86 |
*
|
87 |
* @since 1.0
|
88 |
* @created 03/08/13
|
89 |
*/
|
90 |
-
|
91 |
add_filter('post_mime_types', 'wpuxss_eml_post_mime_types');
|
92 |
|
93 |
if ( ! function_exists( 'wpuxss_eml_post_mime_types' ) ) {
|
94 |
-
|
95 |
function wpuxss_eml_post_mime_types( $post_mime_types ) {
|
96 |
-
|
97 |
$wpuxss_eml_mimes = get_option('wpuxss_eml_mimes');
|
98 |
-
|
99 |
-
if ( !empty($wpuxss_eml_mimes) )
|
100 |
-
|
101 |
-
foreach ( $wpuxss_eml_mimes as $type => $mime )
|
102 |
-
|
103 |
-
if ( $mime['filter'] == 1 )
|
|
|
104 |
$post_mime_types[$mime['mime']] = array(
|
105 |
$mime['singular'],
|
106 |
'Manage ' . $mime['singular'],
|
107 |
_n_noop($mime['singular'] . ' <span class="count">(%s)</span>', $mime['plural'] . ' <span class="count">(%s)</span>')
|
108 |
);
|
|
|
109 |
}
|
110 |
}
|
111 |
-
|
112 |
return $post_mime_types;
|
113 |
}
|
114 |
}
|
115 |
|
116 |
|
117 |
|
118 |
-
|
119 |
/**
|
120 |
* wpuxss_eml_upload_mimes
|
121 |
*
|
@@ -126,35 +131,34 @@ if ( ! function_exists( 'wpuxss_eml_post_mime_types' ) ) {
|
|
126 |
add_filter('upload_mimes', 'wpuxss_eml_upload_mimes');
|
127 |
|
128 |
if ( ! function_exists( 'wpuxss_eml_upload_mimes' ) ) {
|
129 |
-
|
130 |
-
function wpuxss_eml_upload_mimes ( $existing_mimes=array() ) {
|
131 |
-
|
132 |
$wpuxss_eml_mimes = get_option('wpuxss_eml_mimes');
|
133 |
-
|
134 |
-
if ( !empty($wpuxss_eml_mimes) )
|
135 |
-
|
136 |
-
foreach ( $wpuxss_eml_mimes as $type => $mime )
|
137 |
-
|
138 |
-
if ( $mime['upload'] == 1 )
|
139 |
-
|
140 |
if ( !isset($existing_mimes[$type]) )
|
141 |
$existing_mimes[$type] = $mime['mime'];
|
142 |
}
|
143 |
-
else
|
144 |
-
|
145 |
if ( isset($existing_mimes[$type]) )
|
146 |
unset($existing_mimes[$type]);
|
147 |
-
}
|
148 |
}
|
149 |
}
|
150 |
-
|
151 |
return $existing_mimes;
|
152 |
}
|
153 |
}
|
154 |
|
155 |
|
156 |
|
157 |
-
|
158 |
/**
|
159 |
* wpuxss_eml_mime_types
|
160 |
*
|
@@ -165,28 +169,28 @@ if ( ! function_exists( 'wpuxss_eml_upload_mimes' ) ) {
|
|
165 |
add_filter( 'mime_types', 'wpuxss_eml_mime_types' );
|
166 |
|
167 |
if ( ! function_exists( 'wpuxss_eml_mime_types' ) ) {
|
168 |
-
|
169 |
function wpuxss_eml_mime_types( $existing_mimes ) {
|
170 |
-
|
171 |
$wpuxss_eml_mimes = get_option('wpuxss_eml_mimes');
|
172 |
-
|
173 |
-
if ( !empty($wpuxss_eml_mimes) )
|
174 |
-
|
175 |
-
foreach ( $wpuxss_eml_mimes as $type => $mime )
|
176 |
-
|
177 |
if ( !isset($existing_mimes[$type]) )
|
178 |
$existing_mimes[$type] = $mime['mime'];
|
179 |
}
|
180 |
-
|
181 |
-
foreach ( $existing_mimes as $type => $mime )
|
182 |
-
|
183 |
-
if ( !isset($wpuxss_eml_mimes[$type]) && isset($existing_mimes[$type]) )
|
184 |
-
unset($existing_mimes[$type]);
|
185 |
}
|
186 |
}
|
187 |
-
|
188 |
return $existing_mimes;
|
189 |
}
|
190 |
}
|
191 |
|
192 |
-
?>
|
2 |
|
3 |
|
4 |
|
|
|
5 |
/**
|
6 |
* wpuxss_eml_mimes_validate
|
7 |
*
|
11 |
*/
|
12 |
|
13 |
if ( ! function_exists( 'wpuxss_eml_mimes_validate' ) ) {
|
14 |
+
|
15 |
function wpuxss_eml_mimes_validate($input) {
|
16 |
+
|
17 |
+
if ( ! $input ) $input = array();
|
18 |
+
|
19 |
+
if ( isset( $_POST['eml-restore-mime-types-settings'] ) ) {
|
20 |
+
|
|
|
21 |
$wpuxss_eml_mimes_backup = get_option('wpuxss_eml_mimes_backup');
|
22 |
$input = $wpuxss_eml_mimes_backup;
|
23 |
+
|
24 |
+
add_settings_error(
|
25 |
+
'wpuxss_eml_mimes',
|
26 |
+
'eml_mime_types_restored',
|
27 |
+
__('MIME type settings restored.', 'eml'),
|
28 |
+
'updated'
|
29 |
+
);
|
30 |
}
|
31 |
+
elseif ( ! isset( $_POST['eml-settings-import'] ) && ! isset( $_POST['eml-settings-restore'] ) ) {
|
32 |
+
|
33 |
+
add_settings_error(
|
34 |
+
'wpuxss_eml_mimes',
|
35 |
+
'eml_mime_types_saved',
|
36 |
+
__('MIME type settings saved.', 'eml'),
|
37 |
+
'updated'
|
38 |
+
);
|
39 |
+
}
|
40 |
+
|
41 |
+
foreach ( $input as $type => $mime ) {
|
42 |
+
|
43 |
+
$sanitized_type = wpuxss_eml_sanitize_extension($type);
|
44 |
+
|
45 |
+
if ( $sanitized_type !== $type ) {
|
46 |
+
|
47 |
+
$input[$sanitized_type] = $input[$type];
|
48 |
+
unset($input[$type]);
|
49 |
+
$type = $sanitized_type;
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
}
|
51 |
+
|
52 |
+
$input[$type]['filter'] = isset( $mime['filter'] ) && !! $mime['filter'] ? 1 : 0;
|
53 |
+
$input[$type]['upload'] = isset( $mime['upload'] ) && !! $mime['upload'] ? 1 : 0;
|
54 |
+
|
55 |
+
$input[$type]['mime'] = sanitize_mime_type($mime['mime']);
|
56 |
+
$input[$type]['singular'] = sanitize_text_field($mime['singular']);
|
57 |
+
$input[$type]['plural'] = sanitize_text_field($mime['plural']);
|
58 |
}
|
59 |
+
|
60 |
return $input;
|
61 |
}
|
62 |
}
|
63 |
|
64 |
|
65 |
|
|
|
66 |
/**
|
67 |
* wpuxss_eml_sanitize_extension
|
68 |
*
|
73 |
*/
|
74 |
|
75 |
if ( ! function_exists( 'wpuxss_eml_sanitize_extension' ) ) {
|
76 |
+
|
77 |
function wpuxss_eml_sanitize_extension( $key ) {
|
78 |
+
|
79 |
$raw_key = $key;
|
80 |
$key = strtolower( $key );
|
81 |
$key = preg_replace( '/[^a-z0-9|]/', '', $key );
|
85 |
|
86 |
|
87 |
|
|
|
88 |
/**
|
89 |
* wpuxss_eml_post_mime_types
|
90 |
*
|
91 |
* @since 1.0
|
92 |
* @created 03/08/13
|
93 |
*/
|
94 |
+
|
95 |
add_filter('post_mime_types', 'wpuxss_eml_post_mime_types');
|
96 |
|
97 |
if ( ! function_exists( 'wpuxss_eml_post_mime_types' ) ) {
|
98 |
+
|
99 |
function wpuxss_eml_post_mime_types( $post_mime_types ) {
|
100 |
+
|
101 |
$wpuxss_eml_mimes = get_option('wpuxss_eml_mimes');
|
102 |
+
|
103 |
+
if ( !empty($wpuxss_eml_mimes) ) {
|
104 |
+
|
105 |
+
foreach ( $wpuxss_eml_mimes as $type => $mime ) {
|
106 |
+
|
107 |
+
if ( $mime['filter'] == 1 ) {
|
108 |
+
|
109 |
$post_mime_types[$mime['mime']] = array(
|
110 |
$mime['singular'],
|
111 |
'Manage ' . $mime['singular'],
|
112 |
_n_noop($mime['singular'] . ' <span class="count">(%s)</span>', $mime['plural'] . ' <span class="count">(%s)</span>')
|
113 |
);
|
114 |
+
}
|
115 |
}
|
116 |
}
|
117 |
+
|
118 |
return $post_mime_types;
|
119 |
}
|
120 |
}
|
121 |
|
122 |
|
123 |
|
|
|
124 |
/**
|
125 |
* wpuxss_eml_upload_mimes
|
126 |
*
|
131 |
add_filter('upload_mimes', 'wpuxss_eml_upload_mimes');
|
132 |
|
133 |
if ( ! function_exists( 'wpuxss_eml_upload_mimes' ) ) {
|
134 |
+
|
135 |
+
function wpuxss_eml_upload_mimes ( $existing_mimes=array() ) {
|
136 |
+
|
137 |
$wpuxss_eml_mimes = get_option('wpuxss_eml_mimes');
|
138 |
+
|
139 |
+
if ( ! empty( $wpuxss_eml_mimes ) ) {
|
140 |
+
|
141 |
+
foreach ( $wpuxss_eml_mimes as $type => $mime ) {
|
142 |
+
|
143 |
+
if ( $mime['upload'] == 1 ) {
|
144 |
+
|
145 |
if ( !isset($existing_mimes[$type]) )
|
146 |
$existing_mimes[$type] = $mime['mime'];
|
147 |
}
|
148 |
+
else {
|
149 |
+
|
150 |
if ( isset($existing_mimes[$type]) )
|
151 |
unset($existing_mimes[$type]);
|
152 |
+
}
|
153 |
}
|
154 |
}
|
155 |
+
|
156 |
return $existing_mimes;
|
157 |
}
|
158 |
}
|
159 |
|
160 |
|
161 |
|
|
|
162 |
/**
|
163 |
* wpuxss_eml_mime_types
|
164 |
*
|
169 |
add_filter( 'mime_types', 'wpuxss_eml_mime_types' );
|
170 |
|
171 |
if ( ! function_exists( 'wpuxss_eml_mime_types' ) ) {
|
172 |
+
|
173 |
function wpuxss_eml_mime_types( $existing_mimes ) {
|
174 |
+
|
175 |
$wpuxss_eml_mimes = get_option('wpuxss_eml_mimes');
|
176 |
+
|
177 |
+
if ( ! empty( $wpuxss_eml_mimes ) ) {
|
178 |
+
|
179 |
+
foreach ( $wpuxss_eml_mimes as $type => $mime ) {
|
180 |
+
|
181 |
if ( !isset($existing_mimes[$type]) )
|
182 |
$existing_mimes[$type] = $mime['mime'];
|
183 |
}
|
184 |
+
|
185 |
+
foreach ( $existing_mimes as $type => $mime ) {
|
186 |
+
|
187 |
+
if ( ! isset( $wpuxss_eml_mimes[$type] ) && isset( $existing_mimes[$type] ) )
|
188 |
+
unset( $existing_mimes[$type] );
|
189 |
}
|
190 |
}
|
191 |
+
|
192 |
return $existing_mimes;
|
193 |
}
|
194 |
}
|
195 |
|
196 |
+
?>
|
core/options-pages.php
CHANGED
@@ -2,52 +2,56 @@
|
|
2 |
|
3 |
|
4 |
|
5 |
-
|
6 |
/**
|
7 |
-
*
|
8 |
*
|
9 |
* @since 1.0
|
10 |
* @created 03/08/13
|
11 |
*/
|
12 |
-
|
13 |
-
add_action( 'admin_init', 'wpuxss_eml_on_admin_init' );
|
14 |
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
|
|
|
|
19 |
// plugin settings: taxonomies
|
20 |
-
register_setting(
|
21 |
'wpuxss_eml_taxonomies', //option_group
|
22 |
'wpuxss_eml_taxonomies', //option_name
|
23 |
'wpuxss_eml_taxonomies_validate' //sanitize_callback
|
24 |
);
|
25 |
-
|
26 |
// plugin settings: common options
|
27 |
-
register_setting(
|
28 |
'wpuxss_eml_taxonomies', //option_group
|
29 |
'wpuxss_eml_tax_options', //option_name
|
30 |
'wpuxss_eml_tax_options_validate' //sanitize_callback
|
31 |
);
|
32 |
-
|
33 |
// plugin settings: mime types
|
34 |
-
register_setting(
|
35 |
'wpuxss_eml_mimes', //option_group
|
36 |
'wpuxss_eml_mimes', //option_name
|
37 |
'wpuxss_eml_mimes_validate' //sanitize_callback
|
38 |
);
|
39 |
-
|
40 |
// plugin settings: mime types backup
|
41 |
-
register_setting(
|
42 |
'wpuxss_eml_mimes_backup', //option_group
|
43 |
'wpuxss_eml_mimes_backup' //option_name
|
44 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
}
|
46 |
}
|
47 |
|
48 |
|
49 |
|
50 |
-
|
51 |
/**
|
52 |
* wpuxss_eml_admin_menu
|
53 |
*
|
@@ -58,11 +62,19 @@ if( ! function_exists('wpuxss_eml_on_admin_init') ) {
|
|
58 |
add_action('admin_menu', 'wpuxss_eml_admin_menu');
|
59 |
|
60 |
if( ! function_exists('wpuxss_eml_admin_menu') ) {
|
61 |
-
|
62 |
function wpuxss_eml_admin_menu() {
|
63 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
remove_submenu_page( 'options-general.php', 'options-media.php' );
|
65 |
-
|
66 |
add_utility_page(
|
67 |
__('Media Settings','eml'), //page_title
|
68 |
__('Media Settings','eml'), //menu_title
|
@@ -71,33 +83,33 @@ if( ! function_exists('wpuxss_eml_admin_menu') ) {
|
|
71 |
'', //callback
|
72 |
'dashicons-admin-media'
|
73 |
);
|
74 |
-
|
75 |
add_submenu_page(
|
76 |
-
'options-media.php',
|
77 |
-
__('Media Settings','eml'),
|
78 |
-
__('Settings','eml'),
|
79 |
-
'manage_options',
|
80 |
'options-media.php'
|
81 |
);
|
82 |
-
|
83 |
$eml_taxonomies_options_suffix = add_submenu_page(
|
84 |
-
'options-media.php',
|
85 |
-
__('Taxonomies','eml'),
|
86 |
-
__('Taxonomies','eml'),
|
87 |
-
'manage_options',
|
88 |
'eml-taxonomies-options',
|
89 |
'wpuxss_eml_print_taxonomies_options'
|
90 |
);
|
91 |
-
|
92 |
$eml_mimetype_options_suffix = add_submenu_page(
|
93 |
-
'options-media.php',
|
94 |
-
__('MIME Types','eml'),
|
95 |
-
__('MIME Types','eml'),
|
96 |
-
'manage_options',
|
97 |
'eml-mimetype-options',
|
98 |
-
'wpuxss_eml_print_mimetypes_options'
|
99 |
);
|
100 |
-
|
101 |
add_action('admin_print_scripts-' . $eml_taxonomies_options_suffix, 'wpuxss_eml_admin_settings_pages_scripts');
|
102 |
add_action('admin_print_scripts-' . $eml_mimetype_options_suffix, 'wpuxss_eml_admin_settings_pages_scripts');
|
103 |
}
|
@@ -105,7 +117,6 @@ if( ! function_exists('wpuxss_eml_admin_menu') ) {
|
|
105 |
|
106 |
|
107 |
|
108 |
-
|
109 |
/**
|
110 |
* wpuxss_eml_admin_settings_pages_scripts
|
111 |
*
|
@@ -114,12 +125,12 @@ if( ! function_exists('wpuxss_eml_admin_menu') ) {
|
|
114 |
*/
|
115 |
|
116 |
if( ! function_exists('wpuxss_eml_admin_settings_pages_scripts') ) {
|
117 |
-
|
118 |
function wpuxss_eml_admin_settings_pages_scripts() {
|
119 |
-
|
120 |
global $wpuxss_eml_version,
|
121 |
$wpuxss_eml_dir;
|
122 |
-
|
123 |
wp_enqueue_script(
|
124 |
'wpuxss-eml-options-script',
|
125 |
$wpuxss_eml_dir . 'js/eml-options.js',
|
@@ -127,7 +138,7 @@ if( ! function_exists('wpuxss_eml_admin_settings_pages_scripts') ) {
|
|
127 |
$wpuxss_eml_version,
|
128 |
true
|
129 |
);
|
130 |
-
|
131 |
$i18n_data = array(
|
132 |
'edit' => __( 'Edit', 'eml' ),
|
133 |
'close' => __( 'Close', 'eml' ),
|
@@ -139,22 +150,22 @@ if( ! function_exists('wpuxss_eml_admin_settings_pages_scripts') ) {
|
|
139 |
'parent' => __( 'Parent', 'eml' ),
|
140 |
'all' => __( 'All', 'eml' ),
|
141 |
'search' => __( 'Search', 'eml' ),
|
142 |
-
|
143 |
'tax_deletion_confirm' => __( 'Taxonomy will be deleted permanently! Your media files will remain intacted, but all the connections with this taxonomy and its terms will be lost.', 'eml' ),
|
144 |
'tax_error_duplicate' => __( 'There is already a taxonomy with the same name. Please chose other one.', 'eml' ),
|
145 |
'tax_new' => __( 'New Taxonomy', 'eml' ),
|
146 |
'tax_error_empty_both' => __( 'Please choose Singular and Plural names for all your new taxomonies.', 'eml' ),
|
147 |
'tax_error_empty_singular' => __( 'Please choose Singilar name for all your new taxomonies.', 'eml' ),
|
148 |
'tax_error_empty_plural' => __( 'Please choose Plural Name for all your new taxomonies.', 'eml' ),
|
149 |
-
|
150 |
'mime_deletion_confirm' => __( 'Warning! All your custom MIME Types will be deleted by this operation.', 'eml' ),
|
151 |
'mime_error_empty_fields' => __( 'Please fill into all fields.', 'eml' ),
|
152 |
'mime_error_duplicate' => __( 'Duplicate extensions or MIME types. Please chose other one.', 'eml' )
|
153 |
);
|
154 |
-
|
155 |
// TODO: revise l10n
|
156 |
-
wp_localize_script(
|
157 |
-
'wpuxss-eml-options-script',
|
158 |
'wpuxss_eml_i18n_data',
|
159 |
$i18n_data
|
160 |
);
|
@@ -163,6 +174,301 @@ if( ! function_exists('wpuxss_eml_admin_settings_pages_scripts') ) {
|
|
163 |
|
164 |
|
165 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
166 |
|
167 |
/**
|
168 |
* wpuxss_eml_print_taxonomies_options
|
@@ -173,66 +479,67 @@ if( ! function_exists('wpuxss_eml_admin_settings_pages_scripts') ) {
|
|
173 |
*/
|
174 |
|
175 |
if( ! function_exists('wpuxss_eml_print_taxonomies_options') ) {
|
176 |
-
|
177 |
function wpuxss_eml_print_taxonomies_options() {
|
178 |
-
|
179 |
-
if (!current_user_can('manage_options'))
|
180 |
-
wp_die( __('You do not have sufficient permissions to access this page.','eml') );
|
181 |
-
|
182 |
$wpuxss_eml_taxonomies = get_option( 'wpuxss_eml_taxonomies' );
|
183 |
$taxonomies = get_taxonomies( array(),'names' );
|
184 |
?>
|
185 |
-
|
186 |
-
<div id="wpuxss-eml-global-options-wrap" class="wrap">
|
187 |
-
|
188 |
<h2><?php _e('Taxonomies','eml'); ?></h2>
|
189 |
-
|
190 |
-
<?php settings_errors(); ?>
|
191 |
-
|
192 |
<div id="poststuff">
|
193 |
-
|
194 |
-
<div id="post-body" class="metabox-holder
|
195 |
-
|
196 |
<div id="postbox-container-2" class="postbox-container">
|
197 |
-
|
198 |
<form id="wpuxss-eml-form-taxonomies" method="post" action="options.php">
|
199 |
-
|
200 |
-
<?php settings_fields( 'wpuxss_eml_taxonomies' ); ?>
|
201 |
-
|
202 |
<div class="postbox">
|
203 |
-
|
204 |
<h3 class="hndle"><?php _e('Media Taxonomies','eml'); ?></h3>
|
205 |
-
|
206 |
<div class="inside">
|
207 |
-
|
208 |
<p><?php _e('Assign following taxonomies to Media Library:','eml'); ?></p>
|
209 |
-
|
210 |
<?php $html = '';
|
211 |
-
|
212 |
-
foreach ( get_taxonomies(array(),'object') as $taxonomy )
|
213 |
-
|
214 |
-
if ( (in_array('attachment',$taxonomy->object_type) && count($taxonomy->object_type) == 1) || empty($taxonomy->object_type) )
|
215 |
-
|
216 |
$assigned = intval($wpuxss_eml_taxonomies[$taxonomy->name]['assigned']);
|
217 |
$eml_media = intval($wpuxss_eml_taxonomies[$taxonomy->name]['eml_media']);
|
218 |
-
|
219 |
if ( $eml_media )
|
220 |
$li_class = 'wpuxss-eml-taxonomy';
|
221 |
-
else
|
222 |
$li_class = 'wpuxss-non-eml-taxonomy';
|
223 |
-
|
224 |
$html .= '<li class="' . $li_class . '" id="' . $taxonomy->name . '">';
|
225 |
-
|
226 |
$html .= '<input class="wpuxss-eml-assigned" name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][assigned]" type="checkbox" value="1" ' . checked( true, $assigned, false ) . ' title="' . __('Assign Taxonomy','eml') . '" />';
|
227 |
$html .= '<input name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][eml_media]" type="hidden" value="' . $eml_media . '" />';
|
228 |
$html .= ' <label>' . $taxonomy->label . '</label>';
|
229 |
$html .= '<a class="wpuxss-eml-button-edit" title="' . __('Edit Taxonomy','eml') . '" href="javascript:;">' . __('Edit','eml') . ' ↓</a>';
|
230 |
-
|
231 |
-
{
|
|
|
232 |
$html .= '<a class="wpuxss-eml-button-remove" title="' . __('Delete Taxonomy','eml') . '" href="javascript:;">–</a>';
|
233 |
-
|
234 |
$html .= '<div class="wpuxss-eml-taxonomy-edit" style="display:none;">';
|
235 |
-
|
236 |
$html .= '<div class="wpuxss-eml-labels-edit">';
|
237 |
$html .= '<h4>' . __('Labels','eml') . '</h4>';
|
238 |
$html .= '<ul>';
|
@@ -249,7 +556,7 @@ if( ! function_exists('wpuxss_eml_print_taxonomies_options') ) {
|
|
249 |
$html .= '<li><label>' . __('Search','eml') . '</label><input type="text" class="wpuxss-eml-search_items" name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][labels][search_items]" value="' . esc_html($taxonomy->labels->search_items) . '" /></li>';
|
250 |
$html .= '</ul>';
|
251 |
$html .= '</div>';
|
252 |
-
|
253 |
$html .= '<div class="wpuxss-eml-settings-edit">';
|
254 |
$html .= '<h4>' . __('Settings','eml') . '</h4>';
|
255 |
$html .= '<ul>';
|
@@ -260,47 +567,47 @@ if( ! function_exists('wpuxss_eml_print_taxonomies_options') ) {
|
|
260 |
$html .= '<li><label>' . __('Filter in Grid View / Media Popup','eml') . '</label><input type="checkbox" class="wpuxss-eml-media_uploader_filter" name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][media_uploader_filter]" value="1" ' . checked( 1, $wpuxss_eml_taxonomies[$taxonomy->name]['media_uploader_filter'], false ) . ' /></li>';
|
261 |
$html .= '<li><label>' . __('Edit in Media Popup','eml') . '</label><input type="checkbox" class="wpuxss-eml-media_popup_taxonomy_edit" name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][media_popup_taxonomy_edit]" value="1" ' . checked( 1, $wpuxss_eml_taxonomies[$taxonomy->name]['media_popup_taxonomy_edit'], false ) . ' /></li>';
|
262 |
$html .= '<li><label>' . __('Show in Nav Menu','eml') . '</label><input type="checkbox" class="wpuxss-eml-show_in_nav_menus" name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][show_in_nav_menus]" value="1" ' . checked( 1, $taxonomy->show_in_nav_menus, false ) . ' /></li>';
|
263 |
-
$html .= '<li><label>' . __('Remember
|
264 |
$html .= '<li><label>' . __('Rewrite Slug','eml') . '</label><input type="text" class="wpuxss-eml-slug" name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][rewrite][slug]" value="' . esc_attr($taxonomy->rewrite['slug']) . '" /></li>';
|
265 |
$html .= '<li><label>' . __('Slug with Front','eml') . '</label><input type="checkbox" class="wpuxss-eml-rewrite-with-front" name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][rewrite][with_front]" value="1" ' . checked( 1, $taxonomy->rewrite['with_front'], false ) . ' /></li>';
|
266 |
$html .= '</ul>';
|
267 |
-
$html .= '</div>';
|
268 |
-
|
269 |
$html .= '</div>';
|
270 |
}
|
271 |
-
else
|
272 |
-
|
273 |
$html .= '<div class="wpuxss-eml-taxonomy-edit" style="display:none;">';
|
274 |
-
|
275 |
$html .= '<div class="wpuxss-eml-settings-edit">';
|
276 |
$html .= '<h4>' . __('Settings','eml') . '</h4>';
|
277 |
$html .= '<ul>';
|
278 |
$html .= '<li><label>' . __('Filter in List View','eml') . '</label><input type="checkbox" class="wpuxss-eml-admin_filter" name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][admin_filter]" value="1" ' . checked( 1, $wpuxss_eml_taxonomies[$taxonomy->name]['admin_filter'], false ) . ' /></li>';
|
279 |
$html .= '<li><label>' . __('Filter in Grid View / Media Popup','eml') . '</label><input type="checkbox" class="wpuxss-eml-media_uploader_filter" name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][media_uploader_filter]" value="1" ' . checked( 1, $wpuxss_eml_taxonomies[$taxonomy->name]['media_uploader_filter'], false ) . ' /></li>';
|
280 |
$html .= '<li><label>' . __('Edit in Media Popup','eml') . '</label><input type="checkbox" class="wpuxss-eml-media_popup_taxonomy_edit" name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][media_popup_taxonomy_edit]" value="1" ' . checked( 1, $wpuxss_eml_taxonomies[$taxonomy->name]['media_popup_taxonomy_edit'], false ) . ' /></li>';
|
281 |
-
$html .= '</ul>';
|
282 |
-
|
283 |
$html .= '<input name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][show_admin_column]" type="hidden" value="' . $wpuxss_eml_taxonomies[$taxonomy->name]['show_admin_column'] . '" />';
|
284 |
$html .= '<input name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][show_in_nav_menus]" type="hidden" value="' . $wpuxss_eml_taxonomies[$taxonomy->name]['show_in_nav_menus'] . '" />';
|
285 |
$html .= '<input name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][hierarchical]" type="hidden" value="' . $wpuxss_eml_taxonomies[$taxonomy->name]['hierarchical'] . '" />';
|
286 |
-
$html .= '<input name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][sort]" type="hidden" value="' . $wpuxss_eml_taxonomies[$taxonomy->name]['sort'] . '" />';
|
287 |
$html .= '</div>';
|
288 |
-
|
289 |
$html .= '</div>';
|
290 |
}
|
291 |
-
$html .= '</li>';
|
292 |
}
|
293 |
}
|
294 |
-
|
295 |
$html .= '<li class="wpuxss-eml-clone" style="display:none">';
|
296 |
$html .= '<input class="wpuxss-eml-assigned" name="" type="checkbox" class="wpuxss-eml-assigned" value="1" checked="checked" title="' . __('Assign Taxonomy','eml') . '" />';
|
297 |
$html .= '<input name="" type="hidden" class="wpuxss-eml-eml_media" value="1" />';
|
298 |
$html .= ' <label class="wpuxss-eml-taxonomy-label">' . __('New Taxonomy','eml') . '</label>';
|
299 |
-
|
300 |
$html .= '<a class="wpuxss-eml-button-remove" title="' . __('Delete Taxonomy','eml') . '" href="javascript:;">–</a>';
|
301 |
-
|
302 |
$html .= '<div class="wpuxss-eml-taxonomy-edit">';
|
303 |
-
|
304 |
$html .= '<div class="wpuxss-eml-labels-edit">';
|
305 |
$html .= '<h4>' . __('Labels','eml') . '</h4>';
|
306 |
$html .= '<ul>';
|
@@ -317,7 +624,7 @@ if( ! function_exists('wpuxss_eml_print_taxonomies_options') ) {
|
|
317 |
$html .= '<li><label>' . __('Search','eml') . '</label><input type="text" class="wpuxss-eml-search_items" name="" value="" /></li>';
|
318 |
$html .= '</ul>';
|
319 |
$html .= '</div>';
|
320 |
-
|
321 |
$html .= '<div class="wpuxss-eml-settings-edit">';
|
322 |
$html .= '<h4>' . __('Settings','eml') . '</h4>';
|
323 |
$html .= '<ul>';
|
@@ -328,102 +635,105 @@ if( ! function_exists('wpuxss_eml_print_taxonomies_options') ) {
|
|
328 |
$html .= '<li><label>' . __('Filter in Grid View / Media Popup','eml') . '</label><input class="wpuxss-eml-media_uploader_filter" type="checkbox" name="" value="1" /></li>';
|
329 |
$html .= '<li><label>' . __('Edit in Media Popup','eml') . '</label><input class="wpuxss-eml-media_popup_taxonomy_edit" type="checkbox" name="" value="1" /></li>';
|
330 |
$html .= '<li><label>' . __('Show in Nav Menu','eml') . '</label><input type="checkbox" class="wpuxss-eml-show_in_nav_menus" name="" value="1" /></li>';
|
331 |
-
$html .= '<li><label>' . __('Remember
|
332 |
$html .= '<li><label>' . __('Rewrite Slug','eml') . '</label><input type="text" class="wpuxss-eml-slug" name="" value="" /></li>';
|
333 |
$html .= '<li><label>' . __('Slug with Front','eml') . '</label><input type="checkbox" class="wpuxss-eml-rewrite-with-front" name="" value="1" checked="checked" /></li>';
|
334 |
-
$html .= '</ul>';
|
335 |
$html .= '</div>';
|
336 |
-
|
337 |
$html .= '</div>';
|
338 |
-
$html .= '</li>';
|
339 |
-
|
340 |
-
if ( !empty($html) )
|
341 |
-
|
342 |
-
|
343 |
<?php echo $html; ?>
|
344 |
</ul>
|
345 |
-
<div class="wpuxss-eml-button-container-right"><a class="add-new-h2 wpuxss-eml-button-create-taxonomy" href="javascript:;">+ <?php _e('Add New Taxonomy','eml'); ?></a></div>
|
346 |
-
|
347 |
-
|
348 |
-
submit_button();
|
349 |
-
?>
|
350 |
</div>
|
351 |
-
|
352 |
</div>
|
353 |
-
|
354 |
<div class="postbox">
|
355 |
-
|
356 |
<h3 class="hndle"><?php _e('Non-Media Taxonomies','eml'); ?></h3>
|
357 |
-
|
358 |
<div class="inside">
|
359 |
-
|
360 |
<p><?php _e('Assign following taxonomies to Media Library:','eml'); ?></p>
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
{
|
365 |
-
|
366 |
-
{
|
|
|
367 |
$taxonomies = get_object_taxonomies($post_type->name,'object');
|
368 |
-
if ( !empty($taxonomies) )
|
369 |
-
|
370 |
$html = '';
|
371 |
-
|
372 |
-
{
|
373 |
-
|
374 |
-
{
|
|
|
375 |
$html .= '<li>';
|
376 |
$html .= '<input class="wpuxss-eml-assigned" name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][assigned]" type="checkbox" value="1" ' . checked( 1, $wpuxss_eml_taxonomies[$taxonomy->name]['assigned'], false ) . ' title="' . __('Assign Taxonomy','eml') . '" />';
|
377 |
$html .= '<input name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][eml_media]" type="hidden" value="' . $wpuxss_eml_taxonomies[$taxonomy->name]['eml_media'] . '" />';
|
378 |
$html .= '<input name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][show_admin_column]" type="hidden" value="' . $wpuxss_eml_taxonomies[$taxonomy->name]['show_admin_column'] . '" />';
|
379 |
$html .= '<input name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][show_in_nav_menus]" type="hidden" value="' . $wpuxss_eml_taxonomies[$taxonomy->name]['show_in_nav_menus'] . '" />';
|
380 |
$html .= '<input name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][hierarchical]" type="hidden" value="' . $wpuxss_eml_taxonomies[$taxonomy->name]['hierarchical'] . '" />';
|
381 |
-
$html .= '<input name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][sort]" type="hidden" value="' . $wpuxss_eml_taxonomies[$taxonomy->name]['sort'] . '" />';
|
382 |
$html .= ' <label>' . $taxonomy->label . '</label>';
|
383 |
$html .= '<a class="wpuxss-eml-button-edit" title="' . __('Edit Taxonomy','eml') . '" href="javascript:;">' . __('Edit','eml') . ' ↓</a>';
|
384 |
$html .= '<div class="wpuxss-eml-taxonomy-edit" style="display:none;">';
|
385 |
-
|
386 |
$html .= '<h4>' . __('Settings','eml') . '</h4>';
|
387 |
$html .= '<ul>';
|
388 |
$html .= '<li><label>' . __('Filter in List View','eml') . '</label><input type="checkbox" class="wpuxss-eml-admin_filter" name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][admin_filter]" value="1" ' . checked( 1, $wpuxss_eml_taxonomies[$taxonomy->name]['admin_filter'], false ) . ' /></li>';
|
389 |
$html .= '<li><label>' . __('Filter in Grid View / Media Popup','eml') . '</label><input type="checkbox" class="wpuxss-eml-media_uploader_filter" name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][media_uploader_filter]" value="1" ' . checked( 1, $wpuxss_eml_taxonomies[$taxonomy->name]['media_uploader_filter'], false ) . ' /></li>';
|
390 |
$html .= '<li><label>' . __('Edit in Media Popup','eml') . '</label><input type="checkbox" class="wpuxss-eml-media_popup_taxonomy_edit" name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][media_popup_taxonomy_edit]" value="1" ' . checked( 1, $wpuxss_eml_taxonomies[$taxonomy->name]['media_popup_taxonomy_edit'], false ) . ' /></li>';
|
391 |
-
$html .= '</ul>';
|
392 |
-
|
393 |
$html .= '</div>';
|
394 |
$html .= '</li>';
|
395 |
-
|
396 |
-
}
|
397 |
-
}
|
398 |
-
|
399 |
-
|
400 |
-
|
|
|
401 |
<ul class="wpuxss-eml-settings-list wpuxss-eml-non-media-taxonomy-list">
|
402 |
<?php echo $html; ?>
|
403 |
</ul>
|
404 |
-
|
|
|
405 |
}
|
406 |
}
|
407 |
}
|
408 |
-
|
409 |
-
submit_button();
|
410 |
-
|
411 |
</div>
|
412 |
-
|
413 |
</div>
|
414 |
-
|
415 |
<h2><?php _e('Options','eml'); ?></h2>
|
416 |
-
|
417 |
<div class="postbox">
|
418 |
-
|
419 |
<div class="inside">
|
420 |
-
|
421 |
<?php $wpuxss_eml_tax_options = get_option( 'wpuxss_eml_tax_options' ); ?>
|
422 |
-
|
423 |
<table class="form-table">
|
424 |
<tr>
|
425 |
<th scope="row"><?php _e('Taxonomy archive pages','eml'); ?></th>
|
426 |
-
<td>
|
427 |
<fieldset>
|
428 |
<legend class="screen-reader-text"><span><?php _e('Taxonomy archive pages','eml'); ?></span></legend>
|
429 |
<label for="wpuxss_eml_tax_options[tax_archives]"><input name="wpuxss_eml_tax_options[tax_archives]" type="hidden" value="0" /><input name="wpuxss_eml_tax_options[tax_archives]" type="checkbox" value="1" <?php checked( true, $wpuxss_eml_tax_options['tax_archives'], true ); ?> /> <?php _e('Turn on media taxonomy archive pages on the front-end','eml'); ?></label>
|
@@ -431,20 +741,20 @@ if( ! function_exists('wpuxss_eml_print_taxonomies_options') ) {
|
|
431 |
</fieldset>
|
432 |
</td>
|
433 |
</tr>
|
434 |
-
|
435 |
<tr>
|
436 |
<th scope="row"><?php _e('Assign all like hierarchical','eml'); ?></th>
|
437 |
-
<td>
|
438 |
<fieldset>
|
439 |
<legend class="screen-reader-text"><span><?php _e('Show non-hierarchical taxonomies like hierarchical in Grid View / Media Popup','eml'); ?></span></legend>
|
440 |
<label for="wpuxss_eml_tax_options[edit_all_as_hierarchical]"><input name="wpuxss_eml_tax_options[edit_all_as_hierarchical]" type="hidden" value="0" /><input name="wpuxss_eml_tax_options[edit_all_as_hierarchical]" type="checkbox" value="1" <?php checked( true, $wpuxss_eml_tax_options['edit_all_as_hierarchical'], true ); ?> /> <?php _e('Show non-hierarchical taxonomies like hierarchical in Grid View / Media Popup','eml'); ?></label>
|
441 |
</fieldset>
|
442 |
</td>
|
443 |
</tr>
|
444 |
-
|
445 |
<tr>
|
446 |
<th scope="row"><?php _e('Force filters','eml'); ?></th>
|
447 |
-
<td>
|
448 |
<fieldset>
|
449 |
<legend class="screen-reader-text"><span><?php _e('Force filters','eml'); ?></span></legend>
|
450 |
<label for="wpuxss_eml_tax_options[force_filters]"><input name="wpuxss_eml_tax_options[force_filters]" type="hidden" value="0" /><input name="wpuxss_eml_tax_options[force_filters]" type="checkbox" value="1" <?php checked( true, $wpuxss_eml_tax_options['force_filters'], true ); ?> /> <?php _e('Show media filters for ANY Media Popup.','eml'); ?></label>
|
@@ -453,38 +763,31 @@ if( ! function_exists('wpuxss_eml_print_taxonomies_options') ) {
|
|
453 |
</td>
|
454 |
</tr>
|
455 |
</table>
|
456 |
-
|
457 |
<?php submit_button(); ?>
|
458 |
-
|
459 |
</div>
|
460 |
-
|
461 |
</div>
|
462 |
-
|
463 |
<?php do_action( 'wpuxss_eml_extend_taxonomies_option_page' ); ?>
|
464 |
-
|
465 |
</form>
|
466 |
-
|
467 |
-
</div>
|
468 |
-
|
469 |
-
<div id="postbox-container-1" class="postbox-container">
|
470 |
-
|
471 |
-
<?php wpuxss_eml_print_credits(); ?>
|
472 |
-
|
473 |
</div>
|
474 |
-
|
475 |
</div>
|
476 |
-
|
477 |
</div>
|
478 |
-
|
479 |
</div>
|
480 |
-
|
481 |
<?php
|
482 |
}
|
483 |
}
|
484 |
|
485 |
|
486 |
|
487 |
-
|
488 |
/**
|
489 |
* wpuxss_eml_print_mimetypes_options
|
490 |
*
|
@@ -494,35 +797,34 @@ if( ! function_exists('wpuxss_eml_print_taxonomies_options') ) {
|
|
494 |
*/
|
495 |
|
496 |
if( ! function_exists('wpuxss_eml_print_mimetypes_options') ) {
|
497 |
-
|
498 |
function wpuxss_eml_print_mimetypes_options() {
|
499 |
-
|
500 |
-
if (!current_user_can('manage_options'))
|
501 |
-
wp_die( __('You do not have sufficient permissions to access this page.','eml') );
|
502 |
-
|
503 |
$wpuxss_eml_mimes = get_option('wpuxss_eml_mimes');
|
504 |
-
$wpuxss_eml_mimes_backup = get_option('wpuxss_eml_mimes_backup');
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
<?php screen_icon('options-general'); ?>
|
509 |
<h2>
|
510 |
<?php _e('MIME Types','eml'); ?>
|
511 |
<a class="add-new-h2 wpuxss-eml-button-create-mime" href="javascript:;">+ <?php _e('Add New MIME Type','eml'); ?></a>
|
512 |
</h2>
|
513 |
-
|
514 |
-
<?php settings_errors(); ?>
|
515 |
-
|
516 |
<div id="poststuff">
|
517 |
-
|
518 |
-
<div id="post-body" class="metabox-holder
|
519 |
-
|
520 |
<div id="postbox-container-2" class="postbox-container">
|
521 |
-
|
522 |
<form method="post" action="options.php" id="wpuxss-eml-form-mimetypes">
|
523 |
-
|
524 |
<?php settings_fields( 'wpuxss_eml_mimes' ); ?>
|
525 |
-
|
526 |
<table class="wpuxss-eml-mime-type-list wp-list-table widefat" cellspacing="0">
|
527 |
<thead>
|
528 |
<tr>
|
@@ -535,24 +837,26 @@ if( ! function_exists('wpuxss_eml_print_mimetypes_options') ) {
|
|
535 |
<th scope="col" class="manage-column wpuxss-eml-column-delete"></th>
|
536 |
</tr>
|
537 |
</thead>
|
538 |
-
|
539 |
-
|
540 |
<tbody>
|
541 |
-
|
542 |
-
|
|
|
543 |
$all_mimes = wp_get_mime_types();
|
544 |
ksort( $all_mimes, SORT_STRING );
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
|
|
550 |
$label = '<code>'. str_replace( '|', '</code>, <code>', $type ) .'</code>';
|
551 |
-
|
552 |
$allowed = false;
|
553 |
if ( array_key_exists( $type,$allowed_mimes ) )
|
554 |
-
$allowed = true;
|
555 |
-
|
556 |
<tr>
|
557 |
<td id="<?php echo $type; ?>"><?php echo $label; ?></td>
|
558 |
<td><code><?php echo $mime; ?></code><input type="hidden" class="wpuxss-eml-mime" name="wpuxss_eml_mimes[<?php echo $type; ?>][mime]" value="<?php echo $wpuxss_eml_mimes[$type]['mime']; ?>" /></td>
|
@@ -562,10 +866,10 @@ if( ! function_exists('wpuxss_eml_print_mimetypes_options') ) {
|
|
562 |
<td class="checkbox_td"><input type="checkbox" name="wpuxss_eml_mimes[<?php echo $type; ?>][upload]" title="<?php _e('Allow Upload','eml'); ?>" value="1" <?php checked(true, $allowed); ?> /></td>
|
563 |
<td><a class="wpuxss-eml-button-remove" title="Delete MIME Type" href="javascript:;">–</a></td>
|
564 |
</tr>
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
<tr class="wpuxss-eml-clone" style="display:none;">
|
570 |
<td><input type="text" class="wpuxss-eml-type" placeholder="jpg|jpeg|jpe" /></td>
|
571 |
<td><input type="text" class="wpuxss-eml-mime" placeholder="image/jpeg" /></td>
|
@@ -575,7 +879,7 @@ if( ! function_exists('wpuxss_eml_print_mimetypes_options') ) {
|
|
575 |
<td class="checkbox_td"><input type="checkbox" class="wpuxss-eml-upload" title="<?php _e('Allow Upload','eml'); ?>" value="1" /></td>
|
576 |
<td><a class="wpuxss-eml-button-remove" title="<?php _e('Delete MIME Type','eml'); ?>" href="javascript:;">–</a></td>
|
577 |
</tr>
|
578 |
-
|
579 |
</tbody>
|
580 |
<tfoot>
|
581 |
<tr>
|
@@ -589,35 +893,27 @@ if( ! function_exists('wpuxss_eml_print_mimetypes_options') ) {
|
|
589 |
</tr>
|
590 |
</tfoot>
|
591 |
</table>
|
592 |
-
|
593 |
-
<?php submit_button(__('Restore default MIME Types','eml'),'secondary','
|
594 |
-
|
595 |
-
<?php submit_button(); ?>
|
596 |
-
|
597 |
</form>
|
598 |
-
|
599 |
-
</div>
|
600 |
-
|
601 |
-
<div id="postbox-container-1" class="postbox-container">
|
602 |
-
|
603 |
-
<?php wpuxss_eml_print_credits(); ?>
|
604 |
-
|
605 |
</div>
|
606 |
-
|
607 |
</div>
|
608 |
-
|
609 |
</div>
|
610 |
-
|
611 |
</div>
|
612 |
-
|
613 |
<?php
|
614 |
}
|
615 |
}
|
616 |
|
617 |
|
618 |
|
619 |
-
|
620 |
-
|
621 |
/**
|
622 |
* wpuxss_eml_print_credits
|
623 |
*
|
@@ -626,44 +922,70 @@ if( ! function_exists('wpuxss_eml_print_mimetypes_options') ) {
|
|
626 |
*/
|
627 |
|
628 |
if( ! function_exists('wpuxss_eml_print_credits') ) {
|
629 |
-
|
630 |
function wpuxss_eml_print_credits() {
|
631 |
-
|
632 |
global $wpuxss_eml_version; ?>
|
633 |
-
|
634 |
<div class="postbox" id="wpuxss-credits">
|
635 |
-
|
636 |
<h3 class="hndle">Enhanced Media Library <?php echo $wpuxss_eml_version; ?></h3>
|
637 |
-
|
638 |
<div class="inside">
|
639 |
-
|
640 |
<h4>Changelog</h4>
|
641 |
<p>What's new in <a href="http://wordpress.org/plugins/enhanced-media-library/changelog/">version <?php echo $wpuxss_eml_version; ?></a>.</p>
|
642 |
-
|
643 |
<h4>Enhanced Media Library PRO</h4>
|
644 |
<p>More features under the hood <a href="http://www.wpuxsolutions.com/plugins/enhanced-media-library/">www.wpuxsolutions.com</a>.</p>
|
645 |
-
|
646 |
<h4>Support</h4>
|
647 |
<p>Feel free to ask for help on <a href="http://www.wpuxsolutions.com/support/">www.wpuxsolutions.com</a>. Support is free for both versions of the plugin.</p>
|
648 |
-
|
649 |
<h4>Plugin rating</h4>
|
650 |
<p>Please <a href="http://wordpress.org/support/view/plugin-reviews/enhanced-media-library">vote for the plugin</a>. Thanks!</p>
|
651 |
-
|
652 |
<h4>Other plugins you may find useful</h4>
|
653 |
<ul>
|
654 |
<li><a href="http://wordpress.org/plugins/toolbar-publish-button/">Toolbar Publish Button</a></li>
|
655 |
</ul>
|
656 |
-
|
657 |
<div class="author">
|
658 |
<span><a href="http://www.wpuxsolutions.com/">wpUXsolutions</a> by <a class="logo-webbistro" href="http://twitter.com/webbistro"><span class="icon-webbistro">@</span>webbistro</a></span>
|
659 |
</div>
|
660 |
-
|
661 |
</div>
|
662 |
-
|
663 |
</div>
|
664 |
-
|
665 |
<?php
|
666 |
}
|
667 |
}
|
668 |
|
669 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
|
4 |
|
|
|
5 |
/**
|
6 |
+
* wpuxss_eml_register_setting
|
7 |
*
|
8 |
* @since 1.0
|
9 |
* @created 03/08/13
|
10 |
*/
|
|
|
|
|
11 |
|
12 |
+
add_action( 'admin_init', 'wpuxss_eml_register_setting' );
|
13 |
+
|
14 |
+
if( ! function_exists('wpuxss_eml_register_setting') ) {
|
15 |
+
|
16 |
+
function wpuxss_eml_register_setting() {
|
17 |
+
|
18 |
// plugin settings: taxonomies
|
19 |
+
register_setting(
|
20 |
'wpuxss_eml_taxonomies', //option_group
|
21 |
'wpuxss_eml_taxonomies', //option_name
|
22 |
'wpuxss_eml_taxonomies_validate' //sanitize_callback
|
23 |
);
|
24 |
+
|
25 |
// plugin settings: common options
|
26 |
+
register_setting(
|
27 |
'wpuxss_eml_taxonomies', //option_group
|
28 |
'wpuxss_eml_tax_options', //option_name
|
29 |
'wpuxss_eml_tax_options_validate' //sanitize_callback
|
30 |
);
|
31 |
+
|
32 |
// plugin settings: mime types
|
33 |
+
register_setting(
|
34 |
'wpuxss_eml_mimes', //option_group
|
35 |
'wpuxss_eml_mimes', //option_name
|
36 |
'wpuxss_eml_mimes_validate' //sanitize_callback
|
37 |
);
|
38 |
+
|
39 |
// plugin settings: mime types backup
|
40 |
+
register_setting(
|
41 |
'wpuxss_eml_mimes_backup', //option_group
|
42 |
'wpuxss_eml_mimes_backup' //option_name
|
43 |
);
|
44 |
+
|
45 |
+
// plugin settings: all settings backup before import
|
46 |
+
register_setting(
|
47 |
+
'wpuxss_eml_backup', //option_group
|
48 |
+
'wpuxss_eml_backup' //option_name
|
49 |
+
);
|
50 |
}
|
51 |
}
|
52 |
|
53 |
|
54 |
|
|
|
55 |
/**
|
56 |
* wpuxss_eml_admin_menu
|
57 |
*
|
62 |
add_action('admin_menu', 'wpuxss_eml_admin_menu');
|
63 |
|
64 |
if( ! function_exists('wpuxss_eml_admin_menu') ) {
|
65 |
+
|
66 |
function wpuxss_eml_admin_menu() {
|
67 |
+
|
68 |
+
add_options_page(
|
69 |
+
__('Enhanced Media Library','eml'),
|
70 |
+
__('Enhanced Media Library','eml'),
|
71 |
+
'manage_options',
|
72 |
+
'eml-settings',
|
73 |
+
'wpuxss_eml_print_settings'
|
74 |
+
);
|
75 |
+
|
76 |
remove_submenu_page( 'options-general.php', 'options-media.php' );
|
77 |
+
|
78 |
add_utility_page(
|
79 |
__('Media Settings','eml'), //page_title
|
80 |
__('Media Settings','eml'), //menu_title
|
83 |
'', //callback
|
84 |
'dashicons-admin-media'
|
85 |
);
|
86 |
+
|
87 |
add_submenu_page(
|
88 |
+
'options-media.php',
|
89 |
+
__('Media Settings','eml'),
|
90 |
+
__('Settings','eml'),
|
91 |
+
'manage_options',
|
92 |
'options-media.php'
|
93 |
);
|
94 |
+
|
95 |
$eml_taxonomies_options_suffix = add_submenu_page(
|
96 |
+
'options-media.php',
|
97 |
+
__('Taxonomies','eml'),
|
98 |
+
__('Taxonomies','eml'),
|
99 |
+
'manage_options',
|
100 |
'eml-taxonomies-options',
|
101 |
'wpuxss_eml_print_taxonomies_options'
|
102 |
);
|
103 |
+
|
104 |
$eml_mimetype_options_suffix = add_submenu_page(
|
105 |
+
'options-media.php',
|
106 |
+
__('MIME Types','eml'),
|
107 |
+
__('MIME Types','eml'),
|
108 |
+
'manage_options',
|
109 |
'eml-mimetype-options',
|
110 |
+
'wpuxss_eml_print_mimetypes_options'
|
111 |
);
|
112 |
+
|
113 |
add_action('admin_print_scripts-' . $eml_taxonomies_options_suffix, 'wpuxss_eml_admin_settings_pages_scripts');
|
114 |
add_action('admin_print_scripts-' . $eml_mimetype_options_suffix, 'wpuxss_eml_admin_settings_pages_scripts');
|
115 |
}
|
117 |
|
118 |
|
119 |
|
|
|
120 |
/**
|
121 |
* wpuxss_eml_admin_settings_pages_scripts
|
122 |
*
|
125 |
*/
|
126 |
|
127 |
if( ! function_exists('wpuxss_eml_admin_settings_pages_scripts') ) {
|
128 |
+
|
129 |
function wpuxss_eml_admin_settings_pages_scripts() {
|
130 |
+
|
131 |
global $wpuxss_eml_version,
|
132 |
$wpuxss_eml_dir;
|
133 |
+
|
134 |
wp_enqueue_script(
|
135 |
'wpuxss-eml-options-script',
|
136 |
$wpuxss_eml_dir . 'js/eml-options.js',
|
138 |
$wpuxss_eml_version,
|
139 |
true
|
140 |
);
|
141 |
+
|
142 |
$i18n_data = array(
|
143 |
'edit' => __( 'Edit', 'eml' ),
|
144 |
'close' => __( 'Close', 'eml' ),
|
150 |
'parent' => __( 'Parent', 'eml' ),
|
151 |
'all' => __( 'All', 'eml' ),
|
152 |
'search' => __( 'Search', 'eml' ),
|
153 |
+
|
154 |
'tax_deletion_confirm' => __( 'Taxonomy will be deleted permanently! Your media files will remain intacted, but all the connections with this taxonomy and its terms will be lost.', 'eml' ),
|
155 |
'tax_error_duplicate' => __( 'There is already a taxonomy with the same name. Please chose other one.', 'eml' ),
|
156 |
'tax_new' => __( 'New Taxonomy', 'eml' ),
|
157 |
'tax_error_empty_both' => __( 'Please choose Singular and Plural names for all your new taxomonies.', 'eml' ),
|
158 |
'tax_error_empty_singular' => __( 'Please choose Singilar name for all your new taxomonies.', 'eml' ),
|
159 |
'tax_error_empty_plural' => __( 'Please choose Plural Name for all your new taxomonies.', 'eml' ),
|
160 |
+
|
161 |
'mime_deletion_confirm' => __( 'Warning! All your custom MIME Types will be deleted by this operation.', 'eml' ),
|
162 |
'mime_error_empty_fields' => __( 'Please fill into all fields.', 'eml' ),
|
163 |
'mime_error_duplicate' => __( 'Duplicate extensions or MIME types. Please chose other one.', 'eml' )
|
164 |
);
|
165 |
+
|
166 |
// TODO: revise l10n
|
167 |
+
wp_localize_script(
|
168 |
+
'wpuxss-eml-options-script',
|
169 |
'wpuxss_eml_i18n_data',
|
170 |
$i18n_data
|
171 |
);
|
174 |
|
175 |
|
176 |
|
177 |
+
/**
|
178 |
+
* wpuxss_eml_print_settings
|
179 |
+
*
|
180 |
+
* @since 2.1
|
181 |
+
* @created 25/10/15
|
182 |
+
*/
|
183 |
+
|
184 |
+
if( ! function_exists('wpuxss_eml_print_settings') ) {
|
185 |
+
|
186 |
+
function wpuxss_eml_print_settings() {
|
187 |
+
|
188 |
+
if ( ! current_user_can( 'manage_options' ) )
|
189 |
+
wp_die( __('You do not have sufficient permissions to access this page.','eml') );
|
190 |
+
?>
|
191 |
+
|
192 |
+
<div id="wpuxss-eml-global-options-wrap" class="wrap">
|
193 |
+
|
194 |
+
<h2><?php _e( 'Enhanced Media Library Settings', 'eml' ); ?></h2>
|
195 |
+
<?php //settings_errors( 'wpuxss_eml_pro_updates' ); ?>
|
196 |
+
|
197 |
+
<div id="poststuff">
|
198 |
+
|
199 |
+
<div id="post-body" class="metabox-holder columns-2">
|
200 |
+
|
201 |
+
<div id="postbox-container-2" class="postbox-container">
|
202 |
+
|
203 |
+
<div class="postbox">
|
204 |
+
|
205 |
+
<h3 class="hndle"><?php _e( 'Export', 'eml' ); ?></h3>
|
206 |
+
|
207 |
+
<div class="inside">
|
208 |
+
|
209 |
+
<p><?php _e( 'The plugin settings <strong>Media Settings > Taxonomies</strong> and <strong>Media Settings > MIME Types</strong> will be exported to a configuration file. It allows you to easily import the configuration into another website.', 'eml' ); ?></p>
|
210 |
+
|
211 |
+
<form method="post">
|
212 |
+
|
213 |
+
<?php wp_nonce_field( 'eml_settings_export_nonce', 'eml-settings-export-nonce' ); ?>
|
214 |
+
<?php submit_button( __( 'Export Plugin Settings', 'eml' ), 'primary', 'eml-settings-export' ); ?>
|
215 |
+
</form>
|
216 |
+
|
217 |
+
</div>
|
218 |
+
|
219 |
+
</div>
|
220 |
+
|
221 |
+
|
222 |
+
<div class="postbox">
|
223 |
+
|
224 |
+
<h3 class="hndle"><?php _e( 'Import', 'eml' ); ?></h3>
|
225 |
+
|
226 |
+
<div class="inside">
|
227 |
+
|
228 |
+
<p><?php _e( 'The plugin settings <strong>Media Settings > Taxonomies</strong> and <strong>Media Settings > MIME Types</strong> will be imported from a configuration file which can be obtained by exporting the settings on another website using the export button above.', 'eml' ); ?></p>
|
229 |
+
<p><?php _e( 'All plugin settings will be overriden by the import. You will have a chance to restore current data from an automatic backup in case you are not satisfied with the result of the import.', 'eml' ); ?></p>
|
230 |
+
|
231 |
+
<form method="post" enctype="multipart/form-data">
|
232 |
+
|
233 |
+
<p><input type="file" name="import_file"/></p>
|
234 |
+
|
235 |
+
<?php wp_nonce_field( 'eml_settings_import_nonce', 'eml-settings-import-nonce' ); ?>
|
236 |
+
<?php submit_button( __( 'Import Plugin Settings', 'eml' ), 'primary', 'eml-settings-import' ); ?>
|
237 |
+
</form>
|
238 |
+
|
239 |
+
</div>
|
240 |
+
|
241 |
+
</div>
|
242 |
+
|
243 |
+
|
244 |
+
<?php $wpuxss_eml_backup = get_option( 'wpuxss_eml_backup' ); ?>
|
245 |
+
|
246 |
+
<div class="postbox">
|
247 |
+
|
248 |
+
<h3 class="hndle"><?php _e( 'Restore', 'eml' ); ?></h3>
|
249 |
+
|
250 |
+
<div class="inside">
|
251 |
+
|
252 |
+
<?php if ( empty( $wpuxss_eml_backup ) ) : ?>
|
253 |
+
|
254 |
+
<p><?php _e( 'No backup available at the moment.', 'eml' ); ?></p>
|
255 |
+
|
256 |
+
<p><?php _e( 'Backup will be created automatically before any import operation.', 'eml' ); ?></p>
|
257 |
+
|
258 |
+
<?php else : ?>
|
259 |
+
|
260 |
+
<p><?php _e( 'The backup had been automatically created before the latest import opetarion.', 'eml' ); ?></p>
|
261 |
+
<form method="post">
|
262 |
+
|
263 |
+
<?php wp_nonce_field( 'eml_settings_restore_nonce', 'eml-settings-restore-nonce' ); ?>
|
264 |
+
<?php submit_button( __( 'Restore Settings from the Backup', 'eml' ), 'primary', 'eml-settings-restore' ); ?>
|
265 |
+
</form>
|
266 |
+
|
267 |
+
<?php endif; ?>
|
268 |
+
|
269 |
+
|
270 |
+
</div>
|
271 |
+
|
272 |
+
</div>
|
273 |
+
|
274 |
+
<?php do_action( 'wpuxss_eml_extend_settings_page' ); ?>
|
275 |
+
|
276 |
+
</div>
|
277 |
+
|
278 |
+
<div id="postbox-container-1" class="postbox-container">
|
279 |
+
|
280 |
+
<?php wpuxss_eml_print_credits(); ?>
|
281 |
+
|
282 |
+
</div>
|
283 |
+
|
284 |
+
</div>
|
285 |
+
|
286 |
+
</div>
|
287 |
+
|
288 |
+
</div>
|
289 |
+
|
290 |
+
<?php
|
291 |
+
}
|
292 |
+
}
|
293 |
+
|
294 |
+
|
295 |
+
|
296 |
+
/**
|
297 |
+
* wpuxss_eml_settings_export
|
298 |
+
*
|
299 |
+
* @since 2.1
|
300 |
+
* @created 25/10/15
|
301 |
+
*/
|
302 |
+
|
303 |
+
add_action( 'admin_init', 'wpuxss_eml_settings_export' );
|
304 |
+
|
305 |
+
if( ! function_exists('wpuxss_eml_settings_export') ) {
|
306 |
+
|
307 |
+
function wpuxss_eml_settings_export() {
|
308 |
+
|
309 |
+
if( ! isset( $_POST['eml-settings-export'] ) )
|
310 |
+
return;
|
311 |
+
|
312 |
+
if( ! wp_verify_nonce( $_POST['eml-settings-export-nonce'], 'eml_settings_export_nonce' ) )
|
313 |
+
return;
|
314 |
+
|
315 |
+
if( ! current_user_can( 'manage_options' ) )
|
316 |
+
return;
|
317 |
+
|
318 |
+
|
319 |
+
$settings = wpuxss_eml_get_settings();
|
320 |
+
|
321 |
+
ignore_user_abort( true );
|
322 |
+
|
323 |
+
nocache_headers();
|
324 |
+
header( 'Content-Type: application/json; charset=utf-8' );
|
325 |
+
header( 'Content-Disposition: attachment; filename=eml-settings-' . date('m-d-Y_hia') . '.json' );
|
326 |
+
header( "Expires: 0" );
|
327 |
+
|
328 |
+
echo json_encode( $settings );
|
329 |
+
|
330 |
+
exit;
|
331 |
+
}
|
332 |
+
}
|
333 |
+
|
334 |
+
|
335 |
+
|
336 |
+
/**
|
337 |
+
* wpuxss_eml_settings_import
|
338 |
+
*
|
339 |
+
* @since 2.1
|
340 |
+
* @created 25/10/15
|
341 |
+
*/
|
342 |
+
|
343 |
+
add_action( 'admin_init', 'wpuxss_eml_settings_import' );
|
344 |
+
|
345 |
+
if( ! function_exists('wpuxss_eml_settings_import') ) {
|
346 |
+
|
347 |
+
function wpuxss_eml_settings_import() {
|
348 |
+
|
349 |
+
if( ! isset( $_POST['eml-settings-import'] ) )
|
350 |
+
return;
|
351 |
+
|
352 |
+
if( ! wp_verify_nonce( $_POST['eml-settings-import-nonce'], 'eml_settings_import_nonce' ) )
|
353 |
+
return;
|
354 |
+
|
355 |
+
if( ! current_user_can( 'manage_options' ) )
|
356 |
+
return;
|
357 |
+
|
358 |
+
|
359 |
+
// backup settings
|
360 |
+
$settings = wpuxss_eml_get_settings();
|
361 |
+
update_option( 'wpuxss_eml_backup', $settings );
|
362 |
+
|
363 |
+
|
364 |
+
$import_file = $_FILES['import_file'];
|
365 |
+
|
366 |
+
if( empty( $import_file['tmp_name'] ) ) {
|
367 |
+
|
368 |
+
add_settings_error(
|
369 |
+
'wpuxss_eml_tax_options',
|
370 |
+
'eml_settings_file_absent',
|
371 |
+
__('Please upload a file to import settings.', 'eml'),
|
372 |
+
'error'
|
373 |
+
);
|
374 |
+
|
375 |
+
return;
|
376 |
+
}
|
377 |
+
|
378 |
+
$json_data = file_get_contents( $import_file['tmp_name'] );
|
379 |
+
$settings = json_decode( $json_data, true );
|
380 |
+
|
381 |
+
update_option( 'wpuxss_eml_taxonomies', $settings['taxonomies'] );
|
382 |
+
update_option( 'wpuxss_eml_tax_options', $settings['tax_options'] );
|
383 |
+
update_option( 'wpuxss_eml_mimes', $settings['mimes'] );
|
384 |
+
|
385 |
+
do_action( 'wpuxss_eml_pro_import_settings', $settings );
|
386 |
+
|
387 |
+
add_settings_error(
|
388 |
+
'wpuxss_eml_settings',
|
389 |
+
'eml_settings_imported',
|
390 |
+
__('Plugin settings imported.', 'eml'),
|
391 |
+
'updated'
|
392 |
+
);
|
393 |
+
|
394 |
+
// TODO: not sure if we actually need this
|
395 |
+
//wp_safe_redirect( admin_url( 'options-general.php?page=eml-settings' ) );
|
396 |
+
//exit;
|
397 |
+
}
|
398 |
+
}
|
399 |
+
|
400 |
+
|
401 |
+
|
402 |
+
/**
|
403 |
+
* wpuxss_eml_settings_restoring
|
404 |
+
*
|
405 |
+
* @since 2.1
|
406 |
+
* @created 25/10/15
|
407 |
+
*/
|
408 |
+
|
409 |
+
add_action( 'admin_init', 'wpuxss_eml_settings_restoring' );
|
410 |
+
|
411 |
+
if( ! function_exists('wpuxss_eml_settings_restoring') ) {
|
412 |
+
|
413 |
+
function wpuxss_eml_settings_restoring() {
|
414 |
+
|
415 |
+
if( ! isset( $_POST['eml-settings-restore'] ) )
|
416 |
+
return;
|
417 |
+
|
418 |
+
if( ! wp_verify_nonce( $_POST['eml-settings-restore-nonce'], 'eml_settings_restore_nonce' ) )
|
419 |
+
return;
|
420 |
+
|
421 |
+
if( ! current_user_can( 'manage_options' ) )
|
422 |
+
return;
|
423 |
+
|
424 |
+
|
425 |
+
$wpuxss_eml_backup = get_option( 'wpuxss_eml_backup' );
|
426 |
+
|
427 |
+
update_option( 'wpuxss_eml_taxonomies', $wpuxss_eml_backup['taxonomies'] );
|
428 |
+
update_option( 'wpuxss_eml_tax_options', $wpuxss_eml_backup['tax_options'] );
|
429 |
+
update_option( 'wpuxss_eml_mimes', $wpuxss_eml_backup['mimes'] );
|
430 |
+
|
431 |
+
update_option( 'wpuxss_eml_backup', '' );
|
432 |
+
|
433 |
+
add_settings_error(
|
434 |
+
'wpuxss_eml_settings',
|
435 |
+
'eml_settings_restored',
|
436 |
+
__('Plugin settings restored from the backup.', 'eml'),
|
437 |
+
'updated'
|
438 |
+
);
|
439 |
+
}
|
440 |
+
}
|
441 |
+
|
442 |
+
|
443 |
+
|
444 |
+
/**
|
445 |
+
* wpuxss_eml_get_settings
|
446 |
+
*
|
447 |
+
* @since 2.1
|
448 |
+
* @created 25/10/15
|
449 |
+
*/
|
450 |
+
|
451 |
+
if( ! function_exists('wpuxss_eml_get_settings') ) {
|
452 |
+
|
453 |
+
function wpuxss_eml_get_settings() {
|
454 |
+
|
455 |
+
$wpuxss_eml_taxonomies = get_option( 'wpuxss_eml_taxonomies' );
|
456 |
+
$wpuxss_eml_tax_options = get_option( 'wpuxss_eml_tax_options' );
|
457 |
+
$wpuxss_eml_mimes = get_option( 'wpuxss_eml_mimes' );
|
458 |
+
|
459 |
+
$settings = array (
|
460 |
+
'taxonomies' => $wpuxss_eml_taxonomies,
|
461 |
+
'tax_options' => $wpuxss_eml_tax_options,
|
462 |
+
'mimes' => $wpuxss_eml_mimes,
|
463 |
+
);
|
464 |
+
|
465 |
+
$settings = apply_filters( 'wpuxss_eml_pro_get_settings', $settings );
|
466 |
+
|
467 |
+
return $settings;
|
468 |
+
}
|
469 |
+
}
|
470 |
+
|
471 |
+
|
472 |
|
473 |
/**
|
474 |
* wpuxss_eml_print_taxonomies_options
|
479 |
*/
|
480 |
|
481 |
if( ! function_exists('wpuxss_eml_print_taxonomies_options') ) {
|
482 |
+
|
483 |
function wpuxss_eml_print_taxonomies_options() {
|
484 |
+
|
485 |
+
if ( ! current_user_can( 'manage_options' ) )
|
486 |
+
wp_die( __('You do not have sufficient permissions to access this page.','eml') );
|
487 |
+
|
488 |
$wpuxss_eml_taxonomies = get_option( 'wpuxss_eml_taxonomies' );
|
489 |
$taxonomies = get_taxonomies( array(),'names' );
|
490 |
?>
|
491 |
+
|
492 |
+
<div id="wpuxss-eml-global-options-wrap" class="wrap">
|
493 |
+
|
494 |
<h2><?php _e('Taxonomies','eml'); ?></h2>
|
495 |
+
|
496 |
+
<?php settings_errors( 'wpuxss_eml_taxonomies' ); ?>
|
497 |
+
|
498 |
<div id="poststuff">
|
499 |
+
|
500 |
+
<div id="post-body" class="metabox-holder">
|
501 |
+
|
502 |
<div id="postbox-container-2" class="postbox-container">
|
503 |
+
|
504 |
<form id="wpuxss-eml-form-taxonomies" method="post" action="options.php">
|
505 |
+
|
506 |
+
<?php settings_fields( 'wpuxss_eml_taxonomies' ); ?>
|
507 |
+
|
508 |
<div class="postbox">
|
509 |
+
|
510 |
<h3 class="hndle"><?php _e('Media Taxonomies','eml'); ?></h3>
|
511 |
+
|
512 |
<div class="inside">
|
513 |
+
|
514 |
<p><?php _e('Assign following taxonomies to Media Library:','eml'); ?></p>
|
515 |
+
|
516 |
<?php $html = '';
|
517 |
+
|
518 |
+
foreach ( get_taxonomies(array(),'object') as $taxonomy ) {
|
519 |
+
|
520 |
+
if ( (in_array('attachment',$taxonomy->object_type) && count($taxonomy->object_type) == 1) || empty($taxonomy->object_type) ) {
|
521 |
+
|
522 |
$assigned = intval($wpuxss_eml_taxonomies[$taxonomy->name]['assigned']);
|
523 |
$eml_media = intval($wpuxss_eml_taxonomies[$taxonomy->name]['eml_media']);
|
524 |
+
|
525 |
if ( $eml_media )
|
526 |
$li_class = 'wpuxss-eml-taxonomy';
|
527 |
+
else
|
528 |
$li_class = 'wpuxss-non-eml-taxonomy';
|
529 |
+
|
530 |
$html .= '<li class="' . $li_class . '" id="' . $taxonomy->name . '">';
|
531 |
+
|
532 |
$html .= '<input class="wpuxss-eml-assigned" name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][assigned]" type="checkbox" value="1" ' . checked( true, $assigned, false ) . ' title="' . __('Assign Taxonomy','eml') . '" />';
|
533 |
$html .= '<input name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][eml_media]" type="hidden" value="' . $eml_media . '" />';
|
534 |
$html .= ' <label>' . $taxonomy->label . '</label>';
|
535 |
$html .= '<a class="wpuxss-eml-button-edit" title="' . __('Edit Taxonomy','eml') . '" href="javascript:;">' . __('Edit','eml') . ' ↓</a>';
|
536 |
+
|
537 |
+
if ( $eml_media ) {
|
538 |
+
|
539 |
$html .= '<a class="wpuxss-eml-button-remove" title="' . __('Delete Taxonomy','eml') . '" href="javascript:;">–</a>';
|
540 |
+
|
541 |
$html .= '<div class="wpuxss-eml-taxonomy-edit" style="display:none;">';
|
542 |
+
|
543 |
$html .= '<div class="wpuxss-eml-labels-edit">';
|
544 |
$html .= '<h4>' . __('Labels','eml') . '</h4>';
|
545 |
$html .= '<ul>';
|
556 |
$html .= '<li><label>' . __('Search','eml') . '</label><input type="text" class="wpuxss-eml-search_items" name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][labels][search_items]" value="' . esc_html($taxonomy->labels->search_items) . '" /></li>';
|
557 |
$html .= '</ul>';
|
558 |
$html .= '</div>';
|
559 |
+
|
560 |
$html .= '<div class="wpuxss-eml-settings-edit">';
|
561 |
$html .= '<h4>' . __('Settings','eml') . '</h4>';
|
562 |
$html .= '<ul>';
|
567 |
$html .= '<li><label>' . __('Filter in Grid View / Media Popup','eml') . '</label><input type="checkbox" class="wpuxss-eml-media_uploader_filter" name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][media_uploader_filter]" value="1" ' . checked( 1, $wpuxss_eml_taxonomies[$taxonomy->name]['media_uploader_filter'], false ) . ' /></li>';
|
568 |
$html .= '<li><label>' . __('Edit in Media Popup','eml') . '</label><input type="checkbox" class="wpuxss-eml-media_popup_taxonomy_edit" name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][media_popup_taxonomy_edit]" value="1" ' . checked( 1, $wpuxss_eml_taxonomies[$taxonomy->name]['media_popup_taxonomy_edit'], false ) . ' /></li>';
|
569 |
$html .= '<li><label>' . __('Show in Nav Menu','eml') . '</label><input type="checkbox" class="wpuxss-eml-show_in_nav_menus" name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][show_in_nav_menus]" value="1" ' . checked( 1, $taxonomy->show_in_nav_menus, false ) . ' /></li>';
|
570 |
+
$html .= '<li><label>' . __('Remember Terms Order (sort)','eml') . '</label><input type="checkbox" class="wpuxss-eml-sort" name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][sort]" value="1" ' . checked( 1, $taxonomy->sort, false ) . ' /></li>';
|
571 |
$html .= '<li><label>' . __('Rewrite Slug','eml') . '</label><input type="text" class="wpuxss-eml-slug" name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][rewrite][slug]" value="' . esc_attr($taxonomy->rewrite['slug']) . '" /></li>';
|
572 |
$html .= '<li><label>' . __('Slug with Front','eml') . '</label><input type="checkbox" class="wpuxss-eml-rewrite-with-front" name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][rewrite][with_front]" value="1" ' . checked( 1, $taxonomy->rewrite['with_front'], false ) . ' /></li>';
|
573 |
$html .= '</ul>';
|
574 |
+
$html .= '</div>';
|
575 |
+
|
576 |
$html .= '</div>';
|
577 |
}
|
578 |
+
else {
|
579 |
+
|
580 |
$html .= '<div class="wpuxss-eml-taxonomy-edit" style="display:none;">';
|
581 |
+
|
582 |
$html .= '<div class="wpuxss-eml-settings-edit">';
|
583 |
$html .= '<h4>' . __('Settings','eml') . '</h4>';
|
584 |
$html .= '<ul>';
|
585 |
$html .= '<li><label>' . __('Filter in List View','eml') . '</label><input type="checkbox" class="wpuxss-eml-admin_filter" name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][admin_filter]" value="1" ' . checked( 1, $wpuxss_eml_taxonomies[$taxonomy->name]['admin_filter'], false ) . ' /></li>';
|
586 |
$html .= '<li><label>' . __('Filter in Grid View / Media Popup','eml') . '</label><input type="checkbox" class="wpuxss-eml-media_uploader_filter" name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][media_uploader_filter]" value="1" ' . checked( 1, $wpuxss_eml_taxonomies[$taxonomy->name]['media_uploader_filter'], false ) . ' /></li>';
|
587 |
$html .= '<li><label>' . __('Edit in Media Popup','eml') . '</label><input type="checkbox" class="wpuxss-eml-media_popup_taxonomy_edit" name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][media_popup_taxonomy_edit]" value="1" ' . checked( 1, $wpuxss_eml_taxonomies[$taxonomy->name]['media_popup_taxonomy_edit'], false ) . ' /></li>';
|
588 |
+
$html .= '</ul>';
|
589 |
+
|
590 |
$html .= '<input name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][show_admin_column]" type="hidden" value="' . $wpuxss_eml_taxonomies[$taxonomy->name]['show_admin_column'] . '" />';
|
591 |
$html .= '<input name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][show_in_nav_menus]" type="hidden" value="' . $wpuxss_eml_taxonomies[$taxonomy->name]['show_in_nav_menus'] . '" />';
|
592 |
$html .= '<input name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][hierarchical]" type="hidden" value="' . $wpuxss_eml_taxonomies[$taxonomy->name]['hierarchical'] . '" />';
|
593 |
+
$html .= '<input name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][sort]" type="hidden" value="' . $wpuxss_eml_taxonomies[$taxonomy->name]['sort'] . '" />';
|
594 |
$html .= '</div>';
|
595 |
+
|
596 |
$html .= '</div>';
|
597 |
}
|
598 |
+
$html .= '</li>';
|
599 |
}
|
600 |
}
|
601 |
+
|
602 |
$html .= '<li class="wpuxss-eml-clone" style="display:none">';
|
603 |
$html .= '<input class="wpuxss-eml-assigned" name="" type="checkbox" class="wpuxss-eml-assigned" value="1" checked="checked" title="' . __('Assign Taxonomy','eml') . '" />';
|
604 |
$html .= '<input name="" type="hidden" class="wpuxss-eml-eml_media" value="1" />';
|
605 |
$html .= ' <label class="wpuxss-eml-taxonomy-label">' . __('New Taxonomy','eml') . '</label>';
|
606 |
+
|
607 |
$html .= '<a class="wpuxss-eml-button-remove" title="' . __('Delete Taxonomy','eml') . '" href="javascript:;">–</a>';
|
608 |
+
|
609 |
$html .= '<div class="wpuxss-eml-taxonomy-edit">';
|
610 |
+
|
611 |
$html .= '<div class="wpuxss-eml-labels-edit">';
|
612 |
$html .= '<h4>' . __('Labels','eml') . '</h4>';
|
613 |
$html .= '<ul>';
|
624 |
$html .= '<li><label>' . __('Search','eml') . '</label><input type="text" class="wpuxss-eml-search_items" name="" value="" /></li>';
|
625 |
$html .= '</ul>';
|
626 |
$html .= '</div>';
|
627 |
+
|
628 |
$html .= '<div class="wpuxss-eml-settings-edit">';
|
629 |
$html .= '<h4>' . __('Settings','eml') . '</h4>';
|
630 |
$html .= '<ul>';
|
635 |
$html .= '<li><label>' . __('Filter in Grid View / Media Popup','eml') . '</label><input class="wpuxss-eml-media_uploader_filter" type="checkbox" name="" value="1" /></li>';
|
636 |
$html .= '<li><label>' . __('Edit in Media Popup','eml') . '</label><input class="wpuxss-eml-media_popup_taxonomy_edit" type="checkbox" name="" value="1" /></li>';
|
637 |
$html .= '<li><label>' . __('Show in Nav Menu','eml') . '</label><input type="checkbox" class="wpuxss-eml-show_in_nav_menus" name="" value="1" /></li>';
|
638 |
+
$html .= '<li><label>' . __('Remember Terms Order (sort)','eml') . '</label><input type="checkbox" class="wpuxss-eml-sort" name="" value="1" /></li>';
|
639 |
$html .= '<li><label>' . __('Rewrite Slug','eml') . '</label><input type="text" class="wpuxss-eml-slug" name="" value="" /></li>';
|
640 |
$html .= '<li><label>' . __('Slug with Front','eml') . '</label><input type="checkbox" class="wpuxss-eml-rewrite-with-front" name="" value="1" checked="checked" /></li>';
|
641 |
+
$html .= '</ul>';
|
642 |
$html .= '</div>';
|
643 |
+
|
644 |
$html .= '</div>';
|
645 |
+
$html .= '</li>'; ?>
|
646 |
+
|
647 |
+
<?php if ( ! empty( $html ) ) : ?>
|
648 |
+
|
649 |
+
<ul class="wpuxss-eml-settings-list wpuxss-eml-media-taxonomy-list">
|
650 |
<?php echo $html; ?>
|
651 |
</ul>
|
652 |
+
<div class="wpuxss-eml-button-container-right"><a class="add-new-h2 wpuxss-eml-button-create-taxonomy" href="javascript:;">+ <?php _e( 'Add New Taxonomy', 'eml' ); ?></a></div>
|
653 |
+
<?php endif; ?>
|
654 |
+
|
655 |
+
<?php submit_button(); ?>
|
|
|
656 |
</div>
|
657 |
+
|
658 |
</div>
|
659 |
+
|
660 |
<div class="postbox">
|
661 |
+
|
662 |
<h3 class="hndle"><?php _e('Non-Media Taxonomies','eml'); ?></h3>
|
663 |
+
|
664 |
<div class="inside">
|
665 |
+
|
666 |
<p><?php _e('Assign following taxonomies to Media Library:','eml'); ?></p>
|
667 |
+
|
668 |
+
<?php $unuse = array('revision','nav_menu_item','attachment');
|
669 |
+
|
670 |
+
foreach ( get_post_types(array(),'object') as $post_type ) {
|
671 |
+
|
672 |
+
if ( ! in_array( $post_type->name, $unuse ) ) {
|
673 |
+
|
674 |
$taxonomies = get_object_taxonomies($post_type->name,'object');
|
675 |
+
if ( ! empty( $taxonomies ) ) {
|
676 |
+
|
677 |
$html = '';
|
678 |
+
|
679 |
+
foreach ( $taxonomies as $taxonomy ) {
|
680 |
+
|
681 |
+
if ( $taxonomy->name != 'post_format' ) {
|
682 |
+
|
683 |
$html .= '<li>';
|
684 |
$html .= '<input class="wpuxss-eml-assigned" name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][assigned]" type="checkbox" value="1" ' . checked( 1, $wpuxss_eml_taxonomies[$taxonomy->name]['assigned'], false ) . ' title="' . __('Assign Taxonomy','eml') . '" />';
|
685 |
$html .= '<input name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][eml_media]" type="hidden" value="' . $wpuxss_eml_taxonomies[$taxonomy->name]['eml_media'] . '" />';
|
686 |
$html .= '<input name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][show_admin_column]" type="hidden" value="' . $wpuxss_eml_taxonomies[$taxonomy->name]['show_admin_column'] . '" />';
|
687 |
$html .= '<input name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][show_in_nav_menus]" type="hidden" value="' . $wpuxss_eml_taxonomies[$taxonomy->name]['show_in_nav_menus'] . '" />';
|
688 |
$html .= '<input name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][hierarchical]" type="hidden" value="' . $wpuxss_eml_taxonomies[$taxonomy->name]['hierarchical'] . '" />';
|
689 |
+
$html .= '<input name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][sort]" type="hidden" value="' . $wpuxss_eml_taxonomies[$taxonomy->name]['sort'] . '" />';
|
690 |
$html .= ' <label>' . $taxonomy->label . '</label>';
|
691 |
$html .= '<a class="wpuxss-eml-button-edit" title="' . __('Edit Taxonomy','eml') . '" href="javascript:;">' . __('Edit','eml') . ' ↓</a>';
|
692 |
$html .= '<div class="wpuxss-eml-taxonomy-edit" style="display:none;">';
|
693 |
+
|
694 |
$html .= '<h4>' . __('Settings','eml') . '</h4>';
|
695 |
$html .= '<ul>';
|
696 |
$html .= '<li><label>' . __('Filter in List View','eml') . '</label><input type="checkbox" class="wpuxss-eml-admin_filter" name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][admin_filter]" value="1" ' . checked( 1, $wpuxss_eml_taxonomies[$taxonomy->name]['admin_filter'], false ) . ' /></li>';
|
697 |
$html .= '<li><label>' . __('Filter in Grid View / Media Popup','eml') . '</label><input type="checkbox" class="wpuxss-eml-media_uploader_filter" name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][media_uploader_filter]" value="1" ' . checked( 1, $wpuxss_eml_taxonomies[$taxonomy->name]['media_uploader_filter'], false ) . ' /></li>';
|
698 |
$html .= '<li><label>' . __('Edit in Media Popup','eml') . '</label><input type="checkbox" class="wpuxss-eml-media_popup_taxonomy_edit" name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][media_popup_taxonomy_edit]" value="1" ' . checked( 1, $wpuxss_eml_taxonomies[$taxonomy->name]['media_popup_taxonomy_edit'], false ) . ' /></li>';
|
699 |
+
$html .= '</ul>';
|
700 |
+
|
701 |
$html .= '</div>';
|
702 |
$html .= '</li>';
|
703 |
+
|
704 |
+
}
|
705 |
+
} ?>
|
706 |
+
|
707 |
+
<?php if ( ! empty( $html ) ) : ?>
|
708 |
+
|
709 |
+
<h4><?php echo $post_type->label; ?></h4>
|
710 |
<ul class="wpuxss-eml-settings-list wpuxss-eml-non-media-taxonomy-list">
|
711 |
<?php echo $html; ?>
|
712 |
</ul>
|
713 |
+
|
714 |
+
<?php endif;
|
715 |
}
|
716 |
}
|
717 |
}
|
718 |
+
|
719 |
+
submit_button(); ?>
|
720 |
+
|
721 |
</div>
|
722 |
+
|
723 |
</div>
|
724 |
+
|
725 |
<h2><?php _e('Options','eml'); ?></h2>
|
726 |
+
|
727 |
<div class="postbox">
|
728 |
+
|
729 |
<div class="inside">
|
730 |
+
|
731 |
<?php $wpuxss_eml_tax_options = get_option( 'wpuxss_eml_tax_options' ); ?>
|
732 |
+
|
733 |
<table class="form-table">
|
734 |
<tr>
|
735 |
<th scope="row"><?php _e('Taxonomy archive pages','eml'); ?></th>
|
736 |
+
<td>
|
737 |
<fieldset>
|
738 |
<legend class="screen-reader-text"><span><?php _e('Taxonomy archive pages','eml'); ?></span></legend>
|
739 |
<label for="wpuxss_eml_tax_options[tax_archives]"><input name="wpuxss_eml_tax_options[tax_archives]" type="hidden" value="0" /><input name="wpuxss_eml_tax_options[tax_archives]" type="checkbox" value="1" <?php checked( true, $wpuxss_eml_tax_options['tax_archives'], true ); ?> /> <?php _e('Turn on media taxonomy archive pages on the front-end','eml'); ?></label>
|
741 |
</fieldset>
|
742 |
</td>
|
743 |
</tr>
|
744 |
+
|
745 |
<tr>
|
746 |
<th scope="row"><?php _e('Assign all like hierarchical','eml'); ?></th>
|
747 |
+
<td>
|
748 |
<fieldset>
|
749 |
<legend class="screen-reader-text"><span><?php _e('Show non-hierarchical taxonomies like hierarchical in Grid View / Media Popup','eml'); ?></span></legend>
|
750 |
<label for="wpuxss_eml_tax_options[edit_all_as_hierarchical]"><input name="wpuxss_eml_tax_options[edit_all_as_hierarchical]" type="hidden" value="0" /><input name="wpuxss_eml_tax_options[edit_all_as_hierarchical]" type="checkbox" value="1" <?php checked( true, $wpuxss_eml_tax_options['edit_all_as_hierarchical'], true ); ?> /> <?php _e('Show non-hierarchical taxonomies like hierarchical in Grid View / Media Popup','eml'); ?></label>
|
751 |
</fieldset>
|
752 |
</td>
|
753 |
</tr>
|
754 |
+
|
755 |
<tr>
|
756 |
<th scope="row"><?php _e('Force filters','eml'); ?></th>
|
757 |
+
<td>
|
758 |
<fieldset>
|
759 |
<legend class="screen-reader-text"><span><?php _e('Force filters','eml'); ?></span></legend>
|
760 |
<label for="wpuxss_eml_tax_options[force_filters]"><input name="wpuxss_eml_tax_options[force_filters]" type="hidden" value="0" /><input name="wpuxss_eml_tax_options[force_filters]" type="checkbox" value="1" <?php checked( true, $wpuxss_eml_tax_options['force_filters'], true ); ?> /> <?php _e('Show media filters for ANY Media Popup.','eml'); ?></label>
|
763 |
</td>
|
764 |
</tr>
|
765 |
</table>
|
766 |
+
|
767 |
<?php submit_button(); ?>
|
768 |
+
|
769 |
</div>
|
770 |
+
|
771 |
</div>
|
772 |
+
|
773 |
<?php do_action( 'wpuxss_eml_extend_taxonomies_option_page' ); ?>
|
774 |
+
|
775 |
</form>
|
776 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
777 |
</div>
|
778 |
+
|
779 |
</div>
|
780 |
+
|
781 |
</div>
|
782 |
+
|
783 |
</div>
|
784 |
+
|
785 |
<?php
|
786 |
}
|
787 |
}
|
788 |
|
789 |
|
790 |
|
|
|
791 |
/**
|
792 |
* wpuxss_eml_print_mimetypes_options
|
793 |
*
|
797 |
*/
|
798 |
|
799 |
if( ! function_exists('wpuxss_eml_print_mimetypes_options') ) {
|
800 |
+
|
801 |
function wpuxss_eml_print_mimetypes_options() {
|
802 |
+
|
803 |
+
if ( ! current_user_can('manage_options' ) )
|
804 |
+
wp_die( __('You do not have sufficient permissions to access this page.','eml') );
|
805 |
+
|
806 |
$wpuxss_eml_mimes = get_option('wpuxss_eml_mimes');
|
807 |
+
$wpuxss_eml_mimes_backup = get_option('wpuxss_eml_mimes_backup'); ?>
|
808 |
+
|
809 |
+
<div id="wpuxss-eml-global-options-wrap" class="wrap">
|
810 |
+
|
|
|
811 |
<h2>
|
812 |
<?php _e('MIME Types','eml'); ?>
|
813 |
<a class="add-new-h2 wpuxss-eml-button-create-mime" href="javascript:;">+ <?php _e('Add New MIME Type','eml'); ?></a>
|
814 |
</h2>
|
815 |
+
|
816 |
+
<?php settings_errors( 'wpuxss_eml_mimes' ); ?>
|
817 |
+
|
818 |
<div id="poststuff">
|
819 |
+
|
820 |
+
<div id="post-body" class="metabox-holder">
|
821 |
+
|
822 |
<div id="postbox-container-2" class="postbox-container">
|
823 |
+
|
824 |
<form method="post" action="options.php" id="wpuxss-eml-form-mimetypes">
|
825 |
+
|
826 |
<?php settings_fields( 'wpuxss_eml_mimes' ); ?>
|
827 |
+
|
828 |
<table class="wpuxss-eml-mime-type-list wp-list-table widefat" cellspacing="0">
|
829 |
<thead>
|
830 |
<tr>
|
837 |
<th scope="col" class="manage-column wpuxss-eml-column-delete"></th>
|
838 |
</tr>
|
839 |
</thead>
|
840 |
+
|
841 |
+
|
842 |
<tbody>
|
843 |
+
|
844 |
+
<?php
|
845 |
+
$allowed_mimes = get_allowed_mime_types();
|
846 |
$all_mimes = wp_get_mime_types();
|
847 |
ksort( $all_mimes, SORT_STRING );
|
848 |
+
?>
|
849 |
+
|
850 |
+
<?php foreach ( $all_mimes as $type => $mime ) :
|
851 |
+
|
852 |
+
if ( isset( $wpuxss_eml_mimes[$type] ) ) :
|
853 |
+
|
854 |
$label = '<code>'. str_replace( '|', '</code>, <code>', $type ) .'</code>';
|
855 |
+
|
856 |
$allowed = false;
|
857 |
if ( array_key_exists( $type,$allowed_mimes ) )
|
858 |
+
$allowed = true; ?>
|
859 |
+
|
860 |
<tr>
|
861 |
<td id="<?php echo $type; ?>"><?php echo $label; ?></td>
|
862 |
<td><code><?php echo $mime; ?></code><input type="hidden" class="wpuxss-eml-mime" name="wpuxss_eml_mimes[<?php echo $type; ?>][mime]" value="<?php echo $wpuxss_eml_mimes[$type]['mime']; ?>" /></td>
|
866 |
<td class="checkbox_td"><input type="checkbox" name="wpuxss_eml_mimes[<?php echo $type; ?>][upload]" title="<?php _e('Allow Upload','eml'); ?>" value="1" <?php checked(true, $allowed); ?> /></td>
|
867 |
<td><a class="wpuxss-eml-button-remove" title="Delete MIME Type" href="javascript:;">–</a></td>
|
868 |
</tr>
|
869 |
+
|
870 |
+
<?php endif; ?>
|
871 |
+
<?php endforeach; ?>
|
872 |
+
|
873 |
<tr class="wpuxss-eml-clone" style="display:none;">
|
874 |
<td><input type="text" class="wpuxss-eml-type" placeholder="jpg|jpeg|jpe" /></td>
|
875 |
<td><input type="text" class="wpuxss-eml-mime" placeholder="image/jpeg" /></td>
|
879 |
<td class="checkbox_td"><input type="checkbox" class="wpuxss-eml-upload" title="<?php _e('Allow Upload','eml'); ?>" value="1" /></td>
|
880 |
<td><a class="wpuxss-eml-button-remove" title="<?php _e('Delete MIME Type','eml'); ?>" href="javascript:;">–</a></td>
|
881 |
</tr>
|
882 |
+
|
883 |
</tbody>
|
884 |
<tfoot>
|
885 |
<tr>
|
893 |
</tr>
|
894 |
</tfoot>
|
895 |
</table>
|
896 |
+
|
897 |
+
<?php submit_button(__('Restore WordPress default MIME Types','eml'),'secondary','eml-restore-mime-types-settings'); ?>
|
898 |
+
|
899 |
+
<?php submit_button( __( 'Save Changes', 'eml' ), 'primary', 'eml-save-mime-types-settings' ); ?>
|
900 |
+
|
901 |
</form>
|
902 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
903 |
</div>
|
904 |
+
|
905 |
</div>
|
906 |
+
|
907 |
</div>
|
908 |
+
|
909 |
</div>
|
910 |
+
|
911 |
<?php
|
912 |
}
|
913 |
}
|
914 |
|
915 |
|
916 |
|
|
|
|
|
917 |
/**
|
918 |
* wpuxss_eml_print_credits
|
919 |
*
|
922 |
*/
|
923 |
|
924 |
if( ! function_exists('wpuxss_eml_print_credits') ) {
|
925 |
+
|
926 |
function wpuxss_eml_print_credits() {
|
927 |
+
|
928 |
global $wpuxss_eml_version; ?>
|
929 |
+
|
930 |
<div class="postbox" id="wpuxss-credits">
|
931 |
+
|
932 |
<h3 class="hndle">Enhanced Media Library <?php echo $wpuxss_eml_version; ?></h3>
|
933 |
+
|
934 |
<div class="inside">
|
935 |
+
|
936 |
<h4>Changelog</h4>
|
937 |
<p>What's new in <a href="http://wordpress.org/plugins/enhanced-media-library/changelog/">version <?php echo $wpuxss_eml_version; ?></a>.</p>
|
938 |
+
|
939 |
<h4>Enhanced Media Library PRO</h4>
|
940 |
<p>More features under the hood <a href="http://www.wpuxsolutions.com/plugins/enhanced-media-library/">www.wpuxsolutions.com</a>.</p>
|
941 |
+
|
942 |
<h4>Support</h4>
|
943 |
<p>Feel free to ask for help on <a href="http://www.wpuxsolutions.com/support/">www.wpuxsolutions.com</a>. Support is free for both versions of the plugin.</p>
|
944 |
+
|
945 |
<h4>Plugin rating</h4>
|
946 |
<p>Please <a href="http://wordpress.org/support/view/plugin-reviews/enhanced-media-library">vote for the plugin</a>. Thanks!</p>
|
947 |
+
|
948 |
<h4>Other plugins you may find useful</h4>
|
949 |
<ul>
|
950 |
<li><a href="http://wordpress.org/plugins/toolbar-publish-button/">Toolbar Publish Button</a></li>
|
951 |
</ul>
|
952 |
+
|
953 |
<div class="author">
|
954 |
<span><a href="http://www.wpuxsolutions.com/">wpUXsolutions</a> by <a class="logo-webbistro" href="http://twitter.com/webbistro"><span class="icon-webbistro">@</span>webbistro</a></span>
|
955 |
</div>
|
956 |
+
|
957 |
</div>
|
958 |
+
|
959 |
</div>
|
960 |
+
|
961 |
<?php
|
962 |
}
|
963 |
}
|
964 |
|
965 |
+
|
966 |
+
|
967 |
+
/**
|
968 |
+
* wpuxss_eml_settings_link
|
969 |
+
*
|
970 |
+
* Add settings link to the plugin action links
|
971 |
+
*
|
972 |
+
* @since 2.1
|
973 |
+
* @created 27/10/15
|
974 |
+
*/
|
975 |
+
|
976 |
+
add_filter( 'plugin_action_links_' . wpuxss_get_eml_basename(), 'wpuxss_eml_settings_link' );
|
977 |
+
|
978 |
+
if ( ! function_exists( 'wpuxss_eml_settings_link' ) ) {
|
979 |
+
|
980 |
+
function wpuxss_eml_settings_link( $links ) {
|
981 |
+
|
982 |
+
return array_merge(
|
983 |
+
array(
|
984 |
+
'settings' => '<a href="' . admin_url('options-general.php?page=eml-settings') . '">' . __( 'Settings', 'eml' ) . '</a>'
|
985 |
+
),
|
986 |
+
$links
|
987 |
+
);
|
988 |
+
}
|
989 |
+
}
|
990 |
+
|
991 |
+
?>
|
core/taxonomies.php
CHANGED
@@ -2,7 +2,6 @@
|
|
2 |
|
3 |
|
4 |
|
5 |
-
|
6 |
/**
|
7 |
* unregister_taxonomy_for_object_type
|
8 |
*
|
@@ -13,153 +12,155 @@
|
|
13 |
* @created 05/08/14
|
14 |
*/
|
15 |
|
16 |
-
if( ! function_exists( 'unregister_taxonomy_for_object_type' ) ) {
|
17 |
|
18 |
function unregister_taxonomy_for_object_type( $taxonomy, $object_type ) {
|
19 |
-
|
20 |
global $wp_taxonomies;
|
21 |
-
|
22 |
if ( ! isset( $wp_taxonomies[ $taxonomy ] ) )
|
23 |
return false;
|
24 |
-
|
25 |
if ( ! get_post_type_object( $object_type ) )
|
26 |
return false;
|
27 |
-
|
28 |
$key = array_search( $object_type, $wp_taxonomies[ $taxonomy ]->object_type, true );
|
29 |
if ( false === $key )
|
30 |
return false;
|
31 |
-
|
32 |
unset( $wp_taxonomies[ $taxonomy ]->object_type[ $key ] );
|
|
|
33 |
return true;
|
34 |
}
|
35 |
}
|
36 |
|
37 |
|
38 |
|
39 |
-
|
40 |
/**
|
41 |
* wpuxss_eml_taxonomies_validate
|
42 |
*
|
43 |
* @type callback function
|
44 |
* @since 1.0
|
45 |
* @created 28/09/13
|
46 |
-
*/
|
47 |
|
48 |
-
if( ! function_exists( 'wpuxss_eml_taxonomies_validate' ) ) {
|
49 |
|
50 |
function wpuxss_eml_taxonomies_validate($input) {
|
51 |
-
|
52 |
-
if (
|
53 |
-
|
54 |
-
foreach ( $input as $taxonomy => $params )
|
55 |
-
|
56 |
$sanitized_taxonomy = sanitize_key($taxonomy);
|
57 |
-
|
58 |
-
if ( $sanitized_taxonomy !== $taxonomy )
|
59 |
-
|
60 |
$input[$sanitized_taxonomy] = $input[$taxonomy];
|
61 |
unset($input[$taxonomy]);
|
62 |
$taxonomy = $sanitized_taxonomy;
|
63 |
}
|
64 |
-
|
65 |
-
$input[$taxonomy]['hierarchical'] = isset($params['hierarchical']) ? 1: 0;
|
66 |
-
$input[$taxonomy]['sort'] = isset($params['sort']) ? 1: 0;
|
67 |
-
$input[$taxonomy]['show_admin_column'] = isset($params['show_admin_column']) ? 1: 0;
|
68 |
-
$input[$taxonomy]['show_in_nav_menus'] = isset($params['show_in_nav_menus']) ? 1: 0;
|
69 |
-
$input[$taxonomy]['assigned'] = isset($params['assigned']) ? 1: 0;
|
70 |
-
$input[$taxonomy]['admin_filter'] = isset($params['admin_filter']) ? 1: 0;
|
71 |
-
$input[$taxonomy]['media_uploader_filter'] = isset($params['media_uploader_filter']) ? 1: 0;
|
72 |
-
$input[$taxonomy]['media_popup_taxonomy_edit'] = isset($params['media_popup_taxonomy_edit']) ? 1: 0;
|
73 |
-
$input[$taxonomy]['rewrite']['with_front'] = isset($params['rewrite']['with_front']) ? 1: 0;
|
74 |
$input[$taxonomy]['rewrite']['slug'] = isset($params['rewrite']['slug']) ? wpuxss_eml_sanitize_slug( $params['rewrite']['slug'], $taxonomy ) : '';
|
75 |
-
|
76 |
-
if ( isset($params['labels']) )
|
77 |
-
|
78 |
$default_labels = array(
|
79 |
'menu_name' => $params['labels']['name'],
|
80 |
'all_items' => 'All ' . $params['labels']['name'],
|
81 |
'edit_item' => 'Edit ' . $params['labels']['singular_name'],
|
82 |
-
'view_item' => 'View ' . $params['labels']['singular_name'],
|
83 |
'update_item' => 'Update ' . $params['labels']['singular_name'],
|
84 |
'add_new_item' => 'Add New ' . $params['labels']['singular_name'],
|
85 |
'new_item_name' => 'New ' . $params['labels']['singular_name'] . ' Name',
|
86 |
'parent_item' => 'Parent ' . $params['labels']['singular_name'],
|
87 |
'search_items' => 'Search ' . $params['labels']['name']
|
88 |
);
|
89 |
-
|
90 |
-
foreach ( $params['labels'] as $label => $value )
|
91 |
-
|
92 |
$input[$taxonomy]['labels'][$label] = sanitize_text_field($value);
|
93 |
-
|
94 |
-
if ( empty($value) && isset($default_labels[$label]) )
|
95 |
-
{
|
96 |
$input[$taxonomy]['labels'][$label] = sanitize_text_field($default_labels[$label]);
|
97 |
-
}
|
98 |
}
|
99 |
}
|
100 |
}
|
101 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
return $input;
|
103 |
}
|
104 |
}
|
105 |
|
106 |
|
107 |
|
108 |
-
|
109 |
-
|
110 |
/**
|
111 |
* wpuxss_eml_sanitize_slug
|
112 |
*
|
113 |
* @since 2.0.4
|
114 |
* @created 07/02/15
|
115 |
-
*/
|
116 |
|
117 |
-
if( ! function_exists( 'wpuxss_eml_sanitize_slug' ) ) {
|
118 |
|
119 |
function wpuxss_eml_sanitize_slug( $slug, $fallback_slug = '' ) {
|
120 |
-
|
121 |
$slug_array = explode ( '/', $slug );
|
122 |
$slug_array = array_filter( $slug_array );
|
123 |
$slug_array = array_map ( 'remove_accents', $slug_array );
|
124 |
$slug_array = array_map ( 'sanitize_title_with_dashes', $slug_array );
|
125 |
-
|
126 |
$slug = implode ( '/', $slug_array );
|
127 |
-
|
128 |
if ( '' === $slug || false === $slug )
|
129 |
$slug = $fallback_slug;
|
130 |
-
|
131 |
return $slug;
|
132 |
}
|
133 |
}
|
134 |
|
135 |
|
136 |
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
/**
|
141 |
* wpuxss_eml_tax_options_validate
|
142 |
*
|
143 |
* @type callback function
|
144 |
* @since 2.0.4
|
145 |
* @created 28/01/15
|
146 |
-
*/
|
147 |
|
148 |
if( ! function_exists( 'wpuxss_eml_tax_options_validate' ) ) {
|
149 |
-
|
150 |
function wpuxss_eml_tax_options_validate( $input ) {
|
151 |
-
|
152 |
foreach ( (array)$input as $key => $option ) {
|
153 |
$input[$key] = intval( $option );
|
154 |
}
|
155 |
-
|
156 |
return $input;
|
157 |
}
|
158 |
}
|
159 |
|
160 |
|
161 |
|
162 |
-
|
163 |
/**
|
164 |
* wpuxss_eml_ajax_query_attachments
|
165 |
*
|
@@ -172,124 +173,128 @@ if( ! function_exists( 'wpuxss_eml_tax_options_validate' ) ) {
|
|
172 |
add_action( 'wp_ajax_query-attachments', 'wpuxss_eml_ajax_query_attachments', 0 );
|
173 |
|
174 |
if( ! function_exists( 'wpuxss_eml_ajax_query_attachments' ) ) {
|
175 |
-
|
176 |
function wpuxss_eml_ajax_query_attachments() {
|
177 |
-
|
178 |
global $wp_version;
|
179 |
-
|
180 |
if ( ! current_user_can( 'upload_files' ) )
|
181 |
wp_send_json_error();
|
182 |
-
|
183 |
$query = isset( $_REQUEST['query'] ) ? (array) $_REQUEST['query'] : array();
|
184 |
-
|
185 |
$uncategorized = ( isset( $query['uncategorized'] ) && $query['uncategorized'] ) ? 1 : 0;
|
186 |
-
|
187 |
if ( version_compare( $wp_version, '4.1', '<' ) ) {
|
188 |
-
|
189 |
-
if ( isset( $query['year'] ) && $query['year'] &&
|
190 |
isset( $query['monthnum'] ) && $query['monthnum'] ) {
|
191 |
-
|
192 |
$query['m'] = $query['year'] . $query['monthnum'];
|
193 |
-
}
|
194 |
-
|
|
|
195 |
$query['m'] = '';
|
196 |
}
|
197 |
-
|
198 |
$query = array_intersect_key( $query, array_flip( array(
|
199 |
's', 'order', 'orderby', 'posts_per_page', 'paged', 'post_mime_type',
|
200 |
'post_parent', 'post__in', 'post__not_in', 'm'
|
201 |
) ) );
|
202 |
-
}
|
203 |
-
|
|
|
204 |
$query = array_intersect_key( $query, array_flip( array(
|
205 |
's', 'order', 'orderby', 'posts_per_page', 'paged', 'post_mime_type',
|
206 |
'post_parent', 'post__in', 'post__not_in', 'year', 'monthnum'
|
207 |
) ) );
|
208 |
}
|
209 |
-
|
210 |
-
foreach ( get_object_taxonomies( 'attachment', 'names' ) as $taxonomy )
|
211 |
-
|
212 |
-
if ( $uncategorized )
|
213 |
-
|
214 |
$terms = get_terms( $taxonomy, array('fields'=>'ids','get'=>'all') );
|
215 |
-
|
216 |
$tax_query[] = array(
|
217 |
'taxonomy' => $taxonomy,
|
218 |
'field' => 'term_id',
|
219 |
'terms' => $terms,
|
220 |
'operator' => 'NOT IN',
|
221 |
-
);
|
222 |
-
}
|
223 |
-
else
|
224 |
-
|
225 |
-
if ( isset( $_REQUEST['query'][$taxonomy] ) && $_REQUEST['query'][$taxonomy] )
|
226 |
-
|
227 |
-
if( is_numeric( $_REQUEST['query'][$taxonomy] )
|
228 |
-
|
|
|
229 |
$tax_query[] = array(
|
230 |
'taxonomy' => $taxonomy,
|
231 |
'field' => 'term_id',
|
232 |
-
'terms' => array
|
233 |
-
);
|
234 |
}
|
235 |
-
elseif ( 'not_in' === $_REQUEST['query'][$taxonomy] )
|
236 |
-
|
237 |
$terms = get_terms( $taxonomy, array('fields'=>'ids','get'=>'all') );
|
238 |
-
|
239 |
$tax_query[] = array(
|
240 |
'taxonomy' => $taxonomy,
|
241 |
'field' => 'term_id',
|
242 |
'terms' => $terms,
|
243 |
'operator' => 'NOT IN',
|
244 |
-
);
|
245 |
}
|
246 |
-
elseif ( 'in' === $_REQUEST['query'][$taxonomy] )
|
247 |
-
|
248 |
$terms = get_terms( $taxonomy, array('fields'=>'ids','get'=>'all') );
|
249 |
-
|
250 |
$tax_query[] = array(
|
251 |
'taxonomy' => $taxonomy,
|
252 |
'field' => 'term_id',
|
253 |
'terms' => $terms,
|
254 |
'operator' => 'IN',
|
255 |
-
);
|
256 |
}
|
257 |
}
|
258 |
}
|
259 |
} // endforeach
|
260 |
-
|
261 |
-
if ( ! empty( $tax_query ) )
|
262 |
-
|
263 |
$query['tax_query'] = $tax_query;
|
264 |
}
|
265 |
|
266 |
$query['post_type'] = 'attachment';
|
267 |
-
|
268 |
if ( MEDIA_TRASH
|
269 |
&& ! empty( $_REQUEST['query']['post_status'] )
|
270 |
&& 'trash' === $_REQUEST['query']['post_status'] ) {
|
|
|
271 |
$query['post_status'] = 'trash';
|
272 |
-
}
|
|
|
|
|
273 |
$query['post_status'] = 'inherit';
|
274 |
}
|
275 |
-
|
276 |
if ( current_user_can( get_post_type_object( 'attachment' )->cap->read_private_posts ) )
|
277 |
$query['post_status'] .= ',private';
|
278 |
-
|
279 |
$query = apply_filters( 'ajax_query_attachments_args', $query );
|
280 |
$query = new WP_Query( $query );
|
281 |
-
|
282 |
$posts = array_map( 'wp_prepare_attachment_for_js', $query->posts );
|
283 |
$posts = array_filter( $posts );
|
284 |
-
|
285 |
wp_send_json_success( $posts );
|
286 |
}
|
287 |
}
|
288 |
|
289 |
|
290 |
|
291 |
-
|
292 |
-
|
293 |
/**
|
294 |
* wpuxss_eml_restrict_manage_posts
|
295 |
*
|
@@ -302,30 +307,30 @@ if( ! function_exists( 'wpuxss_eml_ajax_query_attachments' ) ) {
|
|
302 |
add_action('restrict_manage_posts','wpuxss_eml_restrict_manage_posts');
|
303 |
|
304 |
if( ! function_exists( 'wpuxss_eml_restrict_manage_posts' ) ) {
|
305 |
-
|
306 |
function wpuxss_eml_restrict_manage_posts() {
|
307 |
-
|
308 |
global $current_screen,
|
309 |
$wp_query;
|
310 |
-
|
311 |
-
|
312 |
$media_library_mode = get_user_option( 'media_library_mode' ) ? get_user_option( 'media_library_mode' ) : 'grid';
|
313 |
-
|
314 |
-
|
315 |
-
if ( isset( $current_screen ) && 'upload' === $current_screen->base && 'list' === $media_library_mode )
|
316 |
-
|
317 |
$wpuxss_eml_taxonomies = get_option('wpuxss_eml_taxonomies');
|
318 |
-
|
319 |
$uncategorized = ( isset( $_REQUEST['attachment-filter'] ) && 'uncategorized' === $_REQUEST['attachment-filter'] ) ? 1 : 0;
|
320 |
-
|
321 |
-
foreach ( get_object_taxonomies( 'attachment', 'object' ) as $taxonomy )
|
322 |
-
|
323 |
-
if ( $wpuxss_eml_taxonomies[$taxonomy->name]['admin_filter'] )
|
324 |
-
|
325 |
echo "<label for='{$taxonomy->name}' class='screen-reader-text'>" . __('Filter by ','eml') . "{$taxonomy->labels->singular_name}</label>";
|
326 |
-
|
327 |
$selected = ( ! $uncategorized && isset( $wp_query->query[$taxonomy->name] ) ) ? $wp_query->query[$taxonomy->name] : 0;
|
328 |
-
|
329 |
wp_dropdown_categories(
|
330 |
array(
|
331 |
'show_option_all' => __( 'Filter by ', 'eml' ) . $taxonomy->labels->singular_name,
|
@@ -350,8 +355,6 @@ if( ! function_exists( 'wpuxss_eml_restrict_manage_posts' ) ) {
|
|
350 |
|
351 |
|
352 |
|
353 |
-
|
354 |
-
|
355 |
/**
|
356 |
* wpuxss_eml_dropdown_cats
|
357 |
*
|
@@ -360,122 +363,123 @@ if( ! function_exists( 'wpuxss_eml_restrict_manage_posts' ) ) {
|
|
360 |
* @since 2.0.4.5
|
361 |
* @created 19/04/15
|
362 |
*/
|
363 |
-
|
364 |
add_filter( 'wp_dropdown_cats', 'wpuxss_eml_dropdown_cats', 10, 2 );
|
365 |
|
366 |
if( ! function_exists( 'wpuxss_eml_dropdown_cats' ) ) {
|
367 |
|
368 |
function wpuxss_eml_dropdown_cats( $output, $r ) {
|
369 |
-
|
370 |
-
global $current_screen;
|
371 |
-
|
372 |
-
if ( ! is_admin() || empty( $output ) )
|
373 |
return $output;
|
374 |
-
|
375 |
-
|
376 |
$media_library_mode = get_user_option( 'media_library_mode' ) ? get_user_option( 'media_library_mode' ) : 'grid';
|
377 |
-
|
378 |
-
|
|
|
379 |
return $output;
|
380 |
-
|
381 |
-
|
382 |
$whole_select = $output;
|
383 |
$options_array = array();
|
384 |
-
|
385 |
-
while ( strlen( $whole_select ) >= 7 && false !== ( $option_pos = strpos( $whole_select, '<option', 7 ) ) )
|
386 |
-
|
387 |
$options_array[] = substr($whole_select, 0, $option_pos);
|
388 |
$whole_select = substr($whole_select, $option_pos);
|
389 |
}
|
390 |
$options_array[] = $whole_select;
|
391 |
-
|
392 |
-
$
|
393 |
-
|
394 |
-
|
395 |
-
|
|
|
|
|
|
|
396 |
$show_option_in = $r['show_option_in'];
|
397 |
$selected = ( 'in' === strval($r['selected']) ) ? " selected='selected'" : '';
|
398 |
$new_output .= "\t<option value='in'$selected>$show_option_in</option>\n";
|
399 |
}
|
400 |
-
|
401 |
-
if ( isset( $r['show_option_not_in'] ) && $r['show_option_not_in'] )
|
402 |
-
|
403 |
$show_option_not_in = $r['show_option_not_in'];
|
404 |
$selected = ( 'not_in' === strval($r['selected']) ) ? " selected='selected'" : '';
|
405 |
$new_output .= "\t<option value='not_in'$selected>$show_option_not_in</option>\n";
|
406 |
}
|
407 |
-
|
408 |
array_splice( $options_array, 2, 0, $new_output );
|
409 |
-
|
410 |
$output = implode('', $options_array);
|
411 |
-
|
412 |
return $output;
|
413 |
}
|
414 |
}
|
415 |
|
416 |
|
417 |
|
418 |
-
|
419 |
-
|
420 |
/**
|
421 |
* wpuxss_eml_custom_media
|
422 |
*
|
423 |
* Replaces upload.php with the custom one
|
424 |
-
*
|
425 |
* @since 2.0.4
|
426 |
* @created 21/02/15
|
427 |
*/
|
428 |
-
|
429 |
add_action( 'load-upload.php', 'wpuxss_eml_custom_media', 999 );
|
430 |
|
431 |
if( ! function_exists( 'wpuxss_eml_custom_media' ) ) {
|
432 |
-
|
433 |
function wpuxss_eml_custom_media() {
|
434 |
-
|
435 |
global $wpdb,
|
436 |
$wp_version;
|
437 |
-
|
438 |
|
439 |
require_once( ABSPATH . 'wp-admin/includes/class-wp-media-list-table.php' );
|
440 |
require_once( 'class-eml-media-list-table.php' );
|
441 |
-
|
442 |
-
if ( version_compare( $wp_version, '4.
|
443 |
require_once( 'eml-upload-4.1.php' );
|
444 |
else
|
445 |
-
require_once( 'eml-upload-4.
|
446 |
-
|
447 |
exit();
|
448 |
}
|
449 |
}
|
450 |
|
451 |
|
452 |
|
453 |
-
|
454 |
-
|
455 |
/**
|
456 |
* wpuxss_eml_parse_tax_query
|
457 |
*
|
458 |
* @since 2.0.4
|
459 |
* @created 19/02/15
|
460 |
*/
|
461 |
-
|
462 |
add_action( 'parse_tax_query', 'wpuxss_eml_parse_tax_query' );
|
463 |
|
464 |
if( ! function_exists( 'wpuxss_eml_parse_tax_query' ) ) {
|
465 |
-
|
466 |
function wpuxss_eml_parse_tax_query( $query ) {
|
467 |
-
|
468 |
-
global $current_screen;
|
469 |
-
|
470 |
-
|
471 |
if ( ! is_admin() ) {
|
472 |
return;
|
473 |
}
|
474 |
-
|
|
|
475 |
/**
|
476 |
-
* actually just the fix for
|
477 |
*
|
478 |
-
* Fatal error: Call to undefined function get_userdata()
|
479 |
* in /wp-includes/user.php on line 360
|
480 |
*
|
481 |
* caused by, in particular, "Woocommerce Product Tabs" plugin
|
@@ -486,129 +490,121 @@ if( ! function_exists( 'wpuxss_eml_parse_tax_query' ) ) {
|
|
486 |
* very strange error! test it more carefully!
|
487 |
*/
|
488 |
require_once( ABSPATH . 'wp-includes/pluggable.php' );
|
489 |
-
|
490 |
-
|
491 |
-
$media_library_mode = get_user_option( 'media_library_mode' ) ? get_user_option( 'media_library_mode' ) : 'grid';
|
492 |
-
|
493 |
-
|
494 |
-
if ( isset( $current_screen ) && 'upload' === $current_screen->base && 'list' === $media_library_mode )
|
495 |
-
|
496 |
$uncategorized = ( isset( $_REQUEST['attachment-filter'] ) && 'uncategorized' === $_REQUEST['attachment-filter'] ) ? 1 : 0;
|
497 |
-
|
498 |
if ( isset( $_REQUEST['category'] ) )
|
499 |
-
{
|
500 |
$query->query['category'] = $query->query_vars['category'] = $_REQUEST['category'];
|
501 |
-
|
502 |
-
|
503 |
if ( isset( $_REQUEST['post_tag'] ) )
|
504 |
-
{
|
505 |
$query->query['post_tag'] = $query->query_vars['post_tag'] = $_REQUEST['post_tag'];
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
{
|
510 |
$tax = $query->query_vars['taxonomy'];
|
511 |
$term = get_term_by( 'slug', $query->query_vars['term'], $tax );
|
512 |
-
|
513 |
-
if ( $term )
|
514 |
-
|
515 |
$query->query_vars[$tax] = $term->term_id;
|
516 |
$query->query[$tax] = $term->term_id;
|
517 |
-
|
518 |
unset( $query->query_vars['taxonomy'] );
|
519 |
unset( $query->query_vars['term'] );
|
520 |
-
|
521 |
unset( $query->query['taxonomy'] );
|
522 |
unset( $query->query['term'] );
|
523 |
}
|
524 |
}
|
525 |
-
|
526 |
-
foreach ( get_object_taxonomies( 'attachment','names' ) as $taxonomy )
|
527 |
-
|
528 |
-
if ( $uncategorized )
|
529 |
-
|
530 |
$terms = get_terms( $taxonomy, array('fields'=>'ids','get'=>'all') );
|
531 |
-
|
532 |
$tax_query[] = array(
|
533 |
'taxonomy' => $taxonomy,
|
534 |
'field' => 'term_id',
|
535 |
'terms' => $terms,
|
536 |
'operator' => 'NOT IN',
|
537 |
-
);
|
538 |
-
|
539 |
if ( isset( $query->query[$taxonomy] ) ) unset( $query->query[$taxonomy] );
|
540 |
if ( isset( $query->query_vars[$taxonomy] ) ) unset( $query->query_vars[$taxonomy] );
|
541 |
}
|
542 |
-
else
|
543 |
-
|
544 |
-
if ( isset( $query->query[$taxonomy] ) && $query->query[$taxonomy] )
|
545 |
-
|
546 |
-
if( is_numeric( $query->query[$taxonomy] ) )
|
547 |
-
|
548 |
$tax_query[] = array(
|
549 |
'taxonomy' => $taxonomy,
|
550 |
'field' => 'term_id',
|
551 |
'terms' => array( $query->query[$taxonomy] )
|
552 |
-
);
|
553 |
}
|
554 |
-
elseif ( 'not_in' === $query->query[$taxonomy] )
|
555 |
-
|
556 |
$terms = get_terms( $taxonomy, array('fields'=>'ids','get'=>'all') );
|
557 |
-
|
558 |
$tax_query[] = array(
|
559 |
'taxonomy' => $taxonomy,
|
560 |
'field' => 'term_id',
|
561 |
'terms' => $terms,
|
562 |
'operator' => 'NOT IN',
|
563 |
-
);
|
564 |
}
|
565 |
-
elseif ( 'in' === $query->query[$taxonomy] )
|
566 |
-
|
567 |
$terms = get_terms( $taxonomy, array('fields'=>'ids','get'=>'all') );
|
568 |
-
|
569 |
$tax_query[] = array(
|
570 |
'taxonomy' => $taxonomy,
|
571 |
'field' => 'term_id',
|
572 |
'terms' => $terms,
|
573 |
'operator' => 'IN',
|
574 |
-
);
|
575 |
}
|
576 |
}
|
577 |
}
|
578 |
} // endforeach
|
579 |
-
|
580 |
if ( ! empty( $tax_query ) )
|
581 |
-
{
|
582 |
$query->tax_query = new WP_Tax_Query( $tax_query );
|
583 |
-
|
584 |
-
|
585 |
} // endif
|
586 |
}
|
587 |
}
|
588 |
|
589 |
|
590 |
|
591 |
-
|
592 |
-
|
593 |
/**
|
594 |
* wpuxss_eml_attachment_fields_to_edit
|
595 |
*
|
596 |
* Based on /wp-admin/includes/media.php
|
597 |
-
*
|
598 |
* @since 1.0
|
599 |
* @created 14/08/13
|
600 |
*/
|
601 |
-
|
602 |
add_filter( 'attachment_fields_to_edit', 'wpuxss_eml_attachment_fields_to_edit', 10, 2 );
|
603 |
|
604 |
if( ! function_exists( 'wpuxss_eml_attachment_fields_to_edit' ) ) {
|
605 |
-
|
606 |
function wpuxss_eml_attachment_fields_to_edit( $form_fields, $post ) {
|
607 |
-
|
608 |
$wpuxss_eml_tax_options = get_option('wpuxss_eml_tax_options');
|
609 |
-
|
610 |
foreach ( get_attachment_taxonomies($post) as $taxonomy ) {
|
611 |
-
|
612 |
$t = (array) get_taxonomy($taxonomy);
|
613 |
if ( ! $t['show_ui'] )
|
614 |
continue;
|
@@ -616,49 +612,48 @@ if( ! function_exists( 'wpuxss_eml_attachment_fields_to_edit' ) ) {
|
|
616 |
$t['label'] = $taxonomy;
|
617 |
if ( empty($t['args']) )
|
618 |
$t['args'] = array();
|
619 |
-
|
620 |
$terms = get_object_term_cache($post->ID, $taxonomy);
|
621 |
if ( false === $terms )
|
622 |
$terms = wp_get_object_terms($post->ID, $taxonomy, $t['args']);
|
623 |
-
|
624 |
$values = array();
|
625 |
-
|
626 |
-
foreach ( $terms as $term )
|
627 |
$values[] = $term->slug;
|
628 |
-
|
|
|
629 |
$t['value'] = join(', ', $values);
|
630 |
$t['show_in_edit'] = false;
|
631 |
-
|
632 |
-
if ( ( $wpuxss_eml_tax_options['edit_all_as_hierarchical'] || $t['hierarchical'] ) && function_exists( 'wp_terms_checklist' ) )
|
633 |
-
|
634 |
ob_start();
|
635 |
-
|
636 |
wp_terms_checklist( $post->ID, array( 'taxonomy' => $taxonomy, 'checked_ontop' => false, 'walker' => new Walker_Media_Taxonomy_Checklist() ) );
|
637 |
-
|
638 |
if ( ob_get_contents() != false )
|
639 |
$html = '<ul class="term-list">' . ob_get_contents() . '</ul>';
|
640 |
else
|
641 |
$html = '<ul class="term-list"><li>No ' . $t['label'] . ' found.</li></ul>';
|
642 |
-
|
643 |
ob_end_clean();
|
644 |
-
|
645 |
unset( $t['value'] );
|
646 |
-
|
647 |
$t['input'] = 'html';
|
648 |
-
$t['html'] = $html;
|
649 |
}
|
650 |
-
|
651 |
$form_fields[$taxonomy] = $t;
|
652 |
}
|
653 |
-
|
654 |
return $form_fields;
|
655 |
}
|
656 |
}
|
657 |
|
658 |
|
659 |
|
660 |
-
|
661 |
-
|
662 |
/**
|
663 |
* Walker_Media_Taxonomy_Checklist
|
664 |
*
|
@@ -669,37 +664,37 @@ if( ! function_exists( 'wpuxss_eml_attachment_fields_to_edit' ) ) {
|
|
669 |
*/
|
670 |
|
671 |
if( ! class_exists('Walker_Media_Taxonomy_Checklist') ) {
|
672 |
-
|
673 |
class Walker_Media_Taxonomy_Checklist extends Walker {
|
674 |
-
|
675 |
var $tree_type = 'category';
|
676 |
-
var $db_fields = array ('parent' => 'parent', 'id' => 'term_id');
|
677 |
-
|
678 |
-
function start_lvl( &$output, $depth = 0, $args = array() )
|
679 |
-
|
680 |
$indent = str_repeat("\t", $depth);
|
681 |
$output .= "$indent<ul class='children'>\n";
|
682 |
}
|
683 |
-
|
684 |
-
function end_lvl( &$output, $depth = 0, $args = array() )
|
685 |
-
|
686 |
$indent = str_repeat("\t", $depth);
|
687 |
$output .= "$indent</ul>\n";
|
688 |
}
|
689 |
-
|
690 |
-
function start_el( &$output, $category, $depth = 0, $args = array(), $id = 0 )
|
691 |
-
|
692 |
extract($args);
|
693 |
-
|
694 |
if ( empty($taxonomy) )
|
695 |
$taxonomy = 'category';
|
696 |
-
|
697 |
$class = in_array( $category->term_id, $popular_cats ) ? ' class="popular-category"' : '';
|
698 |
$output .= "\n<li id='{$taxonomy}-{$category->term_id}'$class>" . "<label class='selectit'><input value='0' type='hidden' name='tax_input[{$taxonomy}][{$category->term_id}]' /><input value='1' type='checkbox' name='tax_input[{$taxonomy}][{$category->term_id}]' id='in-{$taxonomy}-{$category->term_id}'" . checked( in_array( $category->term_id, $selected_cats ), true, false ) . disabled( empty( $args['disabled'] ), false, false ) . " />" . esc_html( apply_filters('the_category', $category->name )) . "</label>";
|
699 |
}
|
700 |
-
|
701 |
-
function end_el( &$output, $category, $depth = 0, $args = array() )
|
702 |
-
|
703 |
$output .= "</li>\n";
|
704 |
}
|
705 |
}
|
@@ -707,7 +702,6 @@ if( ! class_exists('Walker_Media_Taxonomy_Checklist') ) {
|
|
707 |
|
708 |
|
709 |
|
710 |
-
|
711 |
/**
|
712 |
* Walker_Media_Taxonomy_Uploader_Filter
|
713 |
*
|
@@ -718,32 +712,32 @@ if( ! class_exists('Walker_Media_Taxonomy_Checklist') ) {
|
|
718 |
*/
|
719 |
|
720 |
if( ! class_exists('Walker_Media_Taxonomy_Uploader_Filter') ) {
|
721 |
-
|
722 |
class Walker_Media_Taxonomy_Uploader_Filter extends Walker {
|
723 |
-
|
724 |
var $tree_type = 'category';
|
725 |
-
var $db_fields = array ('parent' => 'parent', 'id' => 'term_id');
|
726 |
-
|
727 |
-
function start_lvl( &$output, $depth = 0, $args = array() )
|
728 |
-
|
729 |
$output .= "";
|
730 |
}
|
731 |
-
|
732 |
-
function end_lvl( &$output, $depth = 0, $args = array() )
|
733 |
-
|
734 |
$output .= "";
|
735 |
}
|
736 |
-
|
737 |
-
function start_el( &$output, $category, $depth = 0, $args = array(), $id = 0 )
|
738 |
-
|
739 |
extract($args);
|
740 |
-
|
741 |
-
$indent = str_repeat(' ', $depth);
|
742 |
$output .= $category->term_id . '>' . $indent . esc_html( apply_filters('the_category', $category->name )) . '|';
|
743 |
}
|
744 |
-
|
745 |
-
function end_el( &$output, $category, $depth = 0, $args = array() )
|
746 |
-
|
747 |
$output .= "";
|
748 |
}
|
749 |
}
|
@@ -751,9 +745,7 @@ if( ! class_exists('Walker_Media_Taxonomy_Uploader_Filter') ) {
|
|
751 |
|
752 |
|
753 |
|
754 |
-
|
755 |
-
|
756 |
-
/**
|
757 |
* wpuxss_eml_save_attachment_compat
|
758 |
*
|
759 |
* Based on /wp-admin/includes/ajax-actions.php
|
@@ -765,65 +757,66 @@ if( ! class_exists('Walker_Media_Taxonomy_Uploader_Filter') ) {
|
|
765 |
add_action( 'wp_ajax_save-attachment-compat', 'wpuxss_eml_save_attachment_compat', 0 );
|
766 |
|
767 |
if( ! function_exists('wpuxss_eml_save_attachment_compat') ) {
|
768 |
-
|
769 |
-
function wpuxss_eml_save_attachment_compat() {
|
770 |
-
|
771 |
if ( ! isset( $_REQUEST['id'] ) )
|
772 |
wp_send_json_error();
|
773 |
-
|
774 |
if ( ! $id = absint( $_REQUEST['id'] ) )
|
775 |
wp_send_json_error();
|
776 |
-
|
777 |
if ( empty( $_REQUEST['attachments'] ) || empty( $_REQUEST['attachments'][ $id ] ) )
|
778 |
wp_send_json_error();
|
|
|
|
|
779 |
$attachment_data = $_REQUEST['attachments'][ $id ];
|
780 |
-
|
781 |
check_ajax_referer( 'update-post_' . $id, 'nonce' );
|
782 |
-
|
783 |
if ( ! current_user_can( 'edit_post', $id ) )
|
784 |
wp_send_json_error();
|
785 |
-
|
786 |
$post = get_post( $id, ARRAY_A );
|
787 |
-
|
788 |
if ( 'attachment' != $post['post_type'] )
|
789 |
wp_send_json_error();
|
790 |
-
|
791 |
/** This filter is documented in wp-admin/includes/media.php */
|
792 |
$post = apply_filters( 'attachment_fields_to_save', $post, $attachment_data );
|
793 |
-
|
794 |
if ( isset( $post['errors'] ) ) {
|
|
|
795 |
$errors = $post['errors']; // @todo return me and display me!
|
796 |
unset( $post['errors'] );
|
797 |
}
|
798 |
-
|
799 |
wp_update_post( $post );
|
800 |
-
|
801 |
-
foreach ( get_attachment_taxonomies( $post ) as $taxonomy )
|
802 |
-
|
803 |
-
if ( isset( $attachment_data[ $taxonomy ] ) )
|
804 |
-
|
805 |
wp_set_object_terms( $id, array_map( 'trim', preg_split( '/,+/', $attachment_data[ $taxonomy ] ) ), $taxonomy, false );
|
806 |
}
|
807 |
-
elseif ( isset( $_REQUEST['tax_input'] ) && isset( $_REQUEST['tax_input'][ $taxonomy ] ) )
|
808 |
-
|
809 |
$term_ids = array_keys( $_REQUEST['tax_input'][ $taxonomy ], 1 );
|
810 |
$term_ids = array_map( 'intval', $term_ids );
|
811 |
-
|
812 |
wp_set_object_terms( $id, $term_ids, $taxonomy, false );
|
813 |
}
|
814 |
}
|
815 |
-
|
816 |
if ( ! $attachment = wp_prepare_attachment_for_js( $id ) )
|
817 |
wp_send_json_error();
|
818 |
-
|
819 |
wp_send_json_success( $attachment );
|
820 |
}
|
821 |
}
|
822 |
|
823 |
|
824 |
|
825 |
-
|
826 |
-
|
827 |
/**
|
828 |
* wpuxss_eml_pre_get_posts
|
829 |
*
|
@@ -836,25 +829,25 @@ if( ! function_exists('wpuxss_eml_save_attachment_compat') ) {
|
|
836 |
add_action( 'pre_get_posts', 'wpuxss_eml_pre_get_posts', 99 );
|
837 |
|
838 |
if( ! function_exists('wpuxss_eml_pre_get_posts') ) {
|
839 |
-
|
840 |
-
function wpuxss_eml_pre_get_posts( $query ) {
|
841 |
-
|
842 |
$wpuxss_eml_tax_options = get_option('wpuxss_eml_tax_options');
|
843 |
-
|
844 |
-
if ( $wpuxss_eml_tax_options['tax_archives'] )
|
845 |
-
|
846 |
$wpuxss_eml_taxonomies = get_option('wpuxss_eml_taxonomies');
|
847 |
-
|
848 |
-
foreach ( (array) $wpuxss_eml_taxonomies as $taxonomy => $params )
|
849 |
-
|
850 |
-
if ( $params['assigned'] && $params['eml_media'] && $query->is_main_query() && is_tax($taxonomy) && !is_admin() )
|
851 |
-
|
852 |
$query->set( 'post_type', 'attachment' );
|
853 |
$query->set( 'post_status', 'inherit' );
|
854 |
-
}
|
855 |
}
|
856 |
}
|
857 |
}
|
858 |
}
|
859 |
|
860 |
-
?>
|
2 |
|
3 |
|
4 |
|
|
|
5 |
/**
|
6 |
* unregister_taxonomy_for_object_type
|
7 |
*
|
12 |
* @created 05/08/14
|
13 |
*/
|
14 |
|
15 |
+
if( ! function_exists( 'unregister_taxonomy_for_object_type' ) ) {
|
16 |
|
17 |
function unregister_taxonomy_for_object_type( $taxonomy, $object_type ) {
|
18 |
+
|
19 |
global $wp_taxonomies;
|
20 |
+
|
21 |
if ( ! isset( $wp_taxonomies[ $taxonomy ] ) )
|
22 |
return false;
|
23 |
+
|
24 |
if ( ! get_post_type_object( $object_type ) )
|
25 |
return false;
|
26 |
+
|
27 |
$key = array_search( $object_type, $wp_taxonomies[ $taxonomy ]->object_type, true );
|
28 |
if ( false === $key )
|
29 |
return false;
|
30 |
+
|
31 |
unset( $wp_taxonomies[ $taxonomy ]->object_type[ $key ] );
|
32 |
+
|
33 |
return true;
|
34 |
}
|
35 |
}
|
36 |
|
37 |
|
38 |
|
|
|
39 |
/**
|
40 |
* wpuxss_eml_taxonomies_validate
|
41 |
*
|
42 |
* @type callback function
|
43 |
* @since 1.0
|
44 |
* @created 28/09/13
|
45 |
+
*/
|
46 |
|
47 |
+
if( ! function_exists( 'wpuxss_eml_taxonomies_validate' ) ) {
|
48 |
|
49 |
function wpuxss_eml_taxonomies_validate($input) {
|
50 |
+
|
51 |
+
if ( ! $input ) $input = array();
|
52 |
+
|
53 |
+
foreach ( $input as $taxonomy => $params ) {
|
54 |
+
|
55 |
$sanitized_taxonomy = sanitize_key($taxonomy);
|
56 |
+
|
57 |
+
if ( $sanitized_taxonomy !== $taxonomy ) {
|
58 |
+
|
59 |
$input[$sanitized_taxonomy] = $input[$taxonomy];
|
60 |
unset($input[$taxonomy]);
|
61 |
$taxonomy = $sanitized_taxonomy;
|
62 |
}
|
63 |
+
|
64 |
+
$input[$taxonomy]['hierarchical'] = isset($params['hierarchical']) && !! $params['hierarchical'] ? 1: 0;
|
65 |
+
$input[$taxonomy]['sort'] = isset($params['sort']) && !! $params['sort'] ? 1: 0;
|
66 |
+
$input[$taxonomy]['show_admin_column'] = isset($params['show_admin_column']) && !! $params['show_admin_column'] ? 1: 0;
|
67 |
+
$input[$taxonomy]['show_in_nav_menus'] = isset($params['show_in_nav_menus']) && !! $params['show_in_nav_menus'] ? 1: 0;
|
68 |
+
$input[$taxonomy]['assigned'] = isset($params['assigned']) && !! $params['assigned'] ? 1: 0;
|
69 |
+
$input[$taxonomy]['admin_filter'] = isset($params['admin_filter']) && !! $params['admin_filter'] ? 1: 0;
|
70 |
+
$input[$taxonomy]['media_uploader_filter'] = isset($params['media_uploader_filter']) && !! $params['media_uploader_filter'] ? 1: 0;
|
71 |
+
$input[$taxonomy]['media_popup_taxonomy_edit'] = isset($params['media_popup_taxonomy_edit']) && !! $params['media_popup_taxonomy_edit'] ? 1: 0;
|
72 |
+
$input[$taxonomy]['rewrite']['with_front'] = isset($params['rewrite']['with_front']) && !! $params['rewrite']['with_front'] ? 1: 0;
|
73 |
$input[$taxonomy]['rewrite']['slug'] = isset($params['rewrite']['slug']) ? wpuxss_eml_sanitize_slug( $params['rewrite']['slug'], $taxonomy ) : '';
|
74 |
+
|
75 |
+
if ( isset( $params['labels'] ) ) {
|
76 |
+
|
77 |
$default_labels = array(
|
78 |
'menu_name' => $params['labels']['name'],
|
79 |
'all_items' => 'All ' . $params['labels']['name'],
|
80 |
'edit_item' => 'Edit ' . $params['labels']['singular_name'],
|
81 |
+
'view_item' => 'View ' . $params['labels']['singular_name'],
|
82 |
'update_item' => 'Update ' . $params['labels']['singular_name'],
|
83 |
'add_new_item' => 'Add New ' . $params['labels']['singular_name'],
|
84 |
'new_item_name' => 'New ' . $params['labels']['singular_name'] . ' Name',
|
85 |
'parent_item' => 'Parent ' . $params['labels']['singular_name'],
|
86 |
'search_items' => 'Search ' . $params['labels']['name']
|
87 |
);
|
88 |
+
|
89 |
+
foreach ( $params['labels'] as $label => $value ) {
|
90 |
+
|
91 |
$input[$taxonomy]['labels'][$label] = sanitize_text_field($value);
|
92 |
+
|
93 |
+
if ( empty($value) && isset($default_labels[$label]) )
|
|
|
94 |
$input[$taxonomy]['labels'][$label] = sanitize_text_field($default_labels[$label]);
|
|
|
95 |
}
|
96 |
}
|
97 |
}
|
98 |
+
|
99 |
+
if ( ! isset( $_POST['eml-settings-import'] ) && ! isset( $_POST['eml-settings-restore'] ) ) {
|
100 |
+
|
101 |
+
add_settings_error(
|
102 |
+
'wpuxss_eml_taxonomies',
|
103 |
+
'eml_taxonomy_settings_saved',
|
104 |
+
__('Taxonomy settings saved.', 'eml'),
|
105 |
+
'updated'
|
106 |
+
);
|
107 |
+
}
|
108 |
+
|
109 |
return $input;
|
110 |
}
|
111 |
}
|
112 |
|
113 |
|
114 |
|
|
|
|
|
115 |
/**
|
116 |
* wpuxss_eml_sanitize_slug
|
117 |
*
|
118 |
* @since 2.0.4
|
119 |
* @created 07/02/15
|
120 |
+
*/
|
121 |
|
122 |
+
if( ! function_exists( 'wpuxss_eml_sanitize_slug' ) ) {
|
123 |
|
124 |
function wpuxss_eml_sanitize_slug( $slug, $fallback_slug = '' ) {
|
125 |
+
|
126 |
$slug_array = explode ( '/', $slug );
|
127 |
$slug_array = array_filter( $slug_array );
|
128 |
$slug_array = array_map ( 'remove_accents', $slug_array );
|
129 |
$slug_array = array_map ( 'sanitize_title_with_dashes', $slug_array );
|
130 |
+
|
131 |
$slug = implode ( '/', $slug_array );
|
132 |
+
|
133 |
if ( '' === $slug || false === $slug )
|
134 |
$slug = $fallback_slug;
|
135 |
+
|
136 |
return $slug;
|
137 |
}
|
138 |
}
|
139 |
|
140 |
|
141 |
|
|
|
|
|
|
|
142 |
/**
|
143 |
* wpuxss_eml_tax_options_validate
|
144 |
*
|
145 |
* @type callback function
|
146 |
* @since 2.0.4
|
147 |
* @created 28/01/15
|
148 |
+
*/
|
149 |
|
150 |
if( ! function_exists( 'wpuxss_eml_tax_options_validate' ) ) {
|
151 |
+
|
152 |
function wpuxss_eml_tax_options_validate( $input ) {
|
153 |
+
|
154 |
foreach ( (array)$input as $key => $option ) {
|
155 |
$input[$key] = intval( $option );
|
156 |
}
|
157 |
+
|
158 |
return $input;
|
159 |
}
|
160 |
}
|
161 |
|
162 |
|
163 |
|
|
|
164 |
/**
|
165 |
* wpuxss_eml_ajax_query_attachments
|
166 |
*
|
173 |
add_action( 'wp_ajax_query-attachments', 'wpuxss_eml_ajax_query_attachments', 0 );
|
174 |
|
175 |
if( ! function_exists( 'wpuxss_eml_ajax_query_attachments' ) ) {
|
176 |
+
|
177 |
function wpuxss_eml_ajax_query_attachments() {
|
178 |
+
|
179 |
global $wp_version;
|
180 |
+
|
181 |
if ( ! current_user_can( 'upload_files' ) )
|
182 |
wp_send_json_error();
|
183 |
+
|
184 |
$query = isset( $_REQUEST['query'] ) ? (array) $_REQUEST['query'] : array();
|
185 |
+
|
186 |
$uncategorized = ( isset( $query['uncategorized'] ) && $query['uncategorized'] ) ? 1 : 0;
|
187 |
+
|
188 |
if ( version_compare( $wp_version, '4.1', '<' ) ) {
|
189 |
+
|
190 |
+
if ( isset( $query['year'] ) && $query['year'] &&
|
191 |
isset( $query['monthnum'] ) && $query['monthnum'] ) {
|
192 |
+
|
193 |
$query['m'] = $query['year'] . $query['monthnum'];
|
194 |
+
}
|
195 |
+
else {
|
196 |
+
|
197 |
$query['m'] = '';
|
198 |
}
|
199 |
+
|
200 |
$query = array_intersect_key( $query, array_flip( array(
|
201 |
's', 'order', 'orderby', 'posts_per_page', 'paged', 'post_mime_type',
|
202 |
'post_parent', 'post__in', 'post__not_in', 'm'
|
203 |
) ) );
|
204 |
+
}
|
205 |
+
else {
|
206 |
+
|
207 |
$query = array_intersect_key( $query, array_flip( array(
|
208 |
's', 'order', 'orderby', 'posts_per_page', 'paged', 'post_mime_type',
|
209 |
'post_parent', 'post__in', 'post__not_in', 'year', 'monthnum'
|
210 |
) ) );
|
211 |
}
|
212 |
+
|
213 |
+
foreach ( get_object_taxonomies( 'attachment', 'names' ) as $taxonomy ) {
|
214 |
+
|
215 |
+
if ( $uncategorized ) {
|
216 |
+
|
217 |
$terms = get_terms( $taxonomy, array('fields'=>'ids','get'=>'all') );
|
218 |
+
|
219 |
$tax_query[] = array(
|
220 |
'taxonomy' => $taxonomy,
|
221 |
'field' => 'term_id',
|
222 |
'terms' => $terms,
|
223 |
'operator' => 'NOT IN',
|
224 |
+
);
|
225 |
+
}
|
226 |
+
else {
|
227 |
+
|
228 |
+
if ( isset( $_REQUEST['query'][$taxonomy] ) && $_REQUEST['query'][$taxonomy] ) {
|
229 |
+
|
230 |
+
if( is_numeric( $_REQUEST['query'][$taxonomy] ) ||
|
231 |
+
is_array( $_REQUEST['query'][$taxonomy] ) ) {
|
232 |
+
|
233 |
$tax_query[] = array(
|
234 |
'taxonomy' => $taxonomy,
|
235 |
'field' => 'term_id',
|
236 |
+
'terms' => (array) $_REQUEST['query'][$taxonomy]
|
237 |
+
);
|
238 |
}
|
239 |
+
elseif ( 'not_in' === $_REQUEST['query'][$taxonomy] ) {
|
240 |
+
|
241 |
$terms = get_terms( $taxonomy, array('fields'=>'ids','get'=>'all') );
|
242 |
+
|
243 |
$tax_query[] = array(
|
244 |
'taxonomy' => $taxonomy,
|
245 |
'field' => 'term_id',
|
246 |
'terms' => $terms,
|
247 |
'operator' => 'NOT IN',
|
248 |
+
);
|
249 |
}
|
250 |
+
elseif ( 'in' === $_REQUEST['query'][$taxonomy] ) {
|
251 |
+
|
252 |
$terms = get_terms( $taxonomy, array('fields'=>'ids','get'=>'all') );
|
253 |
+
|
254 |
$tax_query[] = array(
|
255 |
'taxonomy' => $taxonomy,
|
256 |
'field' => 'term_id',
|
257 |
'terms' => $terms,
|
258 |
'operator' => 'IN',
|
259 |
+
);
|
260 |
}
|
261 |
}
|
262 |
}
|
263 |
} // endforeach
|
264 |
+
|
265 |
+
if ( ! empty( $tax_query ) ) {
|
266 |
+
$tax_query['relation'] = 'AND';
|
267 |
$query['tax_query'] = $tax_query;
|
268 |
}
|
269 |
|
270 |
$query['post_type'] = 'attachment';
|
271 |
+
|
272 |
if ( MEDIA_TRASH
|
273 |
&& ! empty( $_REQUEST['query']['post_status'] )
|
274 |
&& 'trash' === $_REQUEST['query']['post_status'] ) {
|
275 |
+
|
276 |
$query['post_status'] = 'trash';
|
277 |
+
}
|
278 |
+
else {
|
279 |
+
|
280 |
$query['post_status'] = 'inherit';
|
281 |
}
|
282 |
+
|
283 |
if ( current_user_can( get_post_type_object( 'attachment' )->cap->read_private_posts ) )
|
284 |
$query['post_status'] .= ',private';
|
285 |
+
|
286 |
$query = apply_filters( 'ajax_query_attachments_args', $query );
|
287 |
$query = new WP_Query( $query );
|
288 |
+
|
289 |
$posts = array_map( 'wp_prepare_attachment_for_js', $query->posts );
|
290 |
$posts = array_filter( $posts );
|
291 |
+
|
292 |
wp_send_json_success( $posts );
|
293 |
}
|
294 |
}
|
295 |
|
296 |
|
297 |
|
|
|
|
|
298 |
/**
|
299 |
* wpuxss_eml_restrict_manage_posts
|
300 |
*
|
307 |
add_action('restrict_manage_posts','wpuxss_eml_restrict_manage_posts');
|
308 |
|
309 |
if( ! function_exists( 'wpuxss_eml_restrict_manage_posts' ) ) {
|
310 |
+
|
311 |
function wpuxss_eml_restrict_manage_posts() {
|
312 |
+
|
313 |
global $current_screen,
|
314 |
$wp_query;
|
315 |
+
|
316 |
+
|
317 |
$media_library_mode = get_user_option( 'media_library_mode' ) ? get_user_option( 'media_library_mode' ) : 'grid';
|
318 |
+
|
319 |
+
|
320 |
+
if ( isset( $current_screen ) && 'upload' === $current_screen->base && 'list' === $media_library_mode ) {
|
321 |
+
|
322 |
$wpuxss_eml_taxonomies = get_option('wpuxss_eml_taxonomies');
|
323 |
+
|
324 |
$uncategorized = ( isset( $_REQUEST['attachment-filter'] ) && 'uncategorized' === $_REQUEST['attachment-filter'] ) ? 1 : 0;
|
325 |
+
|
326 |
+
foreach ( get_object_taxonomies( 'attachment', 'object' ) as $taxonomy ) {
|
327 |
+
|
328 |
+
if ( $wpuxss_eml_taxonomies[$taxonomy->name]['admin_filter'] ) {
|
329 |
+
|
330 |
echo "<label for='{$taxonomy->name}' class='screen-reader-text'>" . __('Filter by ','eml') . "{$taxonomy->labels->singular_name}</label>";
|
331 |
+
|
332 |
$selected = ( ! $uncategorized && isset( $wp_query->query[$taxonomy->name] ) ) ? $wp_query->query[$taxonomy->name] : 0;
|
333 |
+
|
334 |
wp_dropdown_categories(
|
335 |
array(
|
336 |
'show_option_all' => __( 'Filter by ', 'eml' ) . $taxonomy->labels->singular_name,
|
355 |
|
356 |
|
357 |
|
|
|
|
|
358 |
/**
|
359 |
* wpuxss_eml_dropdown_cats
|
360 |
*
|
363 |
* @since 2.0.4.5
|
364 |
* @created 19/04/15
|
365 |
*/
|
366 |
+
|
367 |
add_filter( 'wp_dropdown_cats', 'wpuxss_eml_dropdown_cats', 10, 2 );
|
368 |
|
369 |
if( ! function_exists( 'wpuxss_eml_dropdown_cats' ) ) {
|
370 |
|
371 |
function wpuxss_eml_dropdown_cats( $output, $r ) {
|
372 |
+
|
373 |
+
global $current_screen;
|
374 |
+
|
375 |
+
if ( ! is_admin() || empty( $output ) )
|
376 |
return $output;
|
377 |
+
|
378 |
+
|
379 |
$media_library_mode = get_user_option( 'media_library_mode' ) ? get_user_option( 'media_library_mode' ) : 'grid';
|
380 |
+
|
381 |
+
|
382 |
+
if ( ! isset( $current_screen ) || 'upload' !== $current_screen->base || 'list' !== $media_library_mode )
|
383 |
return $output;
|
384 |
+
|
385 |
+
|
386 |
$whole_select = $output;
|
387 |
$options_array = array();
|
388 |
+
|
389 |
+
while ( strlen( $whole_select ) >= 7 && false !== ( $option_pos = strpos( $whole_select, '<option', 7 ) ) ) {
|
390 |
+
|
391 |
$options_array[] = substr($whole_select, 0, $option_pos);
|
392 |
$whole_select = substr($whole_select, $option_pos);
|
393 |
}
|
394 |
$options_array[] = $whole_select;
|
395 |
+
|
396 |
+
if ( empty( $options_array ) )
|
397 |
+
return $output;
|
398 |
+
|
399 |
+
$new_output = '';
|
400 |
+
|
401 |
+
if ( isset( $r['show_option_in'] ) && $r['show_option_in'] ) {
|
402 |
+
|
403 |
$show_option_in = $r['show_option_in'];
|
404 |
$selected = ( 'in' === strval($r['selected']) ) ? " selected='selected'" : '';
|
405 |
$new_output .= "\t<option value='in'$selected>$show_option_in</option>\n";
|
406 |
}
|
407 |
+
|
408 |
+
if ( isset( $r['show_option_not_in'] ) && $r['show_option_not_in'] ) {
|
409 |
+
|
410 |
$show_option_not_in = $r['show_option_not_in'];
|
411 |
$selected = ( 'not_in' === strval($r['selected']) ) ? " selected='selected'" : '';
|
412 |
$new_output .= "\t<option value='not_in'$selected>$show_option_not_in</option>\n";
|
413 |
}
|
414 |
+
|
415 |
array_splice( $options_array, 2, 0, $new_output );
|
416 |
+
|
417 |
$output = implode('', $options_array);
|
418 |
+
|
419 |
return $output;
|
420 |
}
|
421 |
}
|
422 |
|
423 |
|
424 |
|
|
|
|
|
425 |
/**
|
426 |
* wpuxss_eml_custom_media
|
427 |
*
|
428 |
* Replaces upload.php with the custom one
|
429 |
+
*
|
430 |
* @since 2.0.4
|
431 |
* @created 21/02/15
|
432 |
*/
|
433 |
+
|
434 |
add_action( 'load-upload.php', 'wpuxss_eml_custom_media', 999 );
|
435 |
|
436 |
if( ! function_exists( 'wpuxss_eml_custom_media' ) ) {
|
437 |
+
|
438 |
function wpuxss_eml_custom_media() {
|
439 |
+
|
440 |
global $wpdb,
|
441 |
$wp_version;
|
442 |
+
|
443 |
|
444 |
require_once( ABSPATH . 'wp-admin/includes/class-wp-media-list-table.php' );
|
445 |
require_once( 'class-eml-media-list-table.php' );
|
446 |
+
|
447 |
+
if ( version_compare( $wp_version, '4.1', '<=' ) )
|
448 |
require_once( 'eml-upload-4.1.php' );
|
449 |
else
|
450 |
+
require_once( 'eml-upload-4.4.php' );
|
451 |
+
|
452 |
exit();
|
453 |
}
|
454 |
}
|
455 |
|
456 |
|
457 |
|
|
|
|
|
458 |
/**
|
459 |
* wpuxss_eml_parse_tax_query
|
460 |
*
|
461 |
* @since 2.0.4
|
462 |
* @created 19/02/15
|
463 |
*/
|
464 |
+
|
465 |
add_action( 'parse_tax_query', 'wpuxss_eml_parse_tax_query' );
|
466 |
|
467 |
if( ! function_exists( 'wpuxss_eml_parse_tax_query' ) ) {
|
468 |
+
|
469 |
function wpuxss_eml_parse_tax_query( $query ) {
|
470 |
+
|
471 |
+
global $current_screen;
|
472 |
+
|
473 |
+
|
474 |
if ( ! is_admin() ) {
|
475 |
return;
|
476 |
}
|
477 |
+
|
478 |
+
|
479 |
/**
|
480 |
+
* actually just the fix for
|
481 |
*
|
482 |
+
* Fatal error: Call to undefined function get_userdata()
|
483 |
* in /wp-includes/user.php on line 360
|
484 |
*
|
485 |
* caused by, in particular, "Woocommerce Product Tabs" plugin
|
490 |
* very strange error! test it more carefully!
|
491 |
*/
|
492 |
require_once( ABSPATH . 'wp-includes/pluggable.php' );
|
493 |
+
|
494 |
+
|
495 |
+
$media_library_mode = get_user_option( 'media_library_mode' ) ? get_user_option( 'media_library_mode' ) : 'grid';
|
496 |
+
|
497 |
+
|
498 |
+
if ( isset( $current_screen ) && 'upload' === $current_screen->base && 'list' === $media_library_mode ) {
|
499 |
+
|
500 |
$uncategorized = ( isset( $_REQUEST['attachment-filter'] ) && 'uncategorized' === $_REQUEST['attachment-filter'] ) ? 1 : 0;
|
501 |
+
|
502 |
if ( isset( $_REQUEST['category'] ) )
|
|
|
503 |
$query->query['category'] = $query->query_vars['category'] = $_REQUEST['category'];
|
504 |
+
|
|
|
505 |
if ( isset( $_REQUEST['post_tag'] ) )
|
|
|
506 |
$query->query['post_tag'] = $query->query_vars['post_tag'] = $_REQUEST['post_tag'];
|
507 |
+
|
508 |
+
if ( isset( $query->query_vars['taxonomy'] ) && isset( $query->query_vars['term'] ) ) {
|
509 |
+
|
|
|
510 |
$tax = $query->query_vars['taxonomy'];
|
511 |
$term = get_term_by( 'slug', $query->query_vars['term'], $tax );
|
512 |
+
|
513 |
+
if ( $term ) {
|
514 |
+
|
515 |
$query->query_vars[$tax] = $term->term_id;
|
516 |
$query->query[$tax] = $term->term_id;
|
517 |
+
|
518 |
unset( $query->query_vars['taxonomy'] );
|
519 |
unset( $query->query_vars['term'] );
|
520 |
+
|
521 |
unset( $query->query['taxonomy'] );
|
522 |
unset( $query->query['term'] );
|
523 |
}
|
524 |
}
|
525 |
+
|
526 |
+
foreach ( get_object_taxonomies( 'attachment','names' ) as $taxonomy ) {
|
527 |
+
|
528 |
+
if ( $uncategorized ) {
|
529 |
+
|
530 |
$terms = get_terms( $taxonomy, array('fields'=>'ids','get'=>'all') );
|
531 |
+
|
532 |
$tax_query[] = array(
|
533 |
'taxonomy' => $taxonomy,
|
534 |
'field' => 'term_id',
|
535 |
'terms' => $terms,
|
536 |
'operator' => 'NOT IN',
|
537 |
+
);
|
538 |
+
|
539 |
if ( isset( $query->query[$taxonomy] ) ) unset( $query->query[$taxonomy] );
|
540 |
if ( isset( $query->query_vars[$taxonomy] ) ) unset( $query->query_vars[$taxonomy] );
|
541 |
}
|
542 |
+
else {
|
543 |
+
|
544 |
+
if ( isset( $query->query[$taxonomy] ) && $query->query[$taxonomy] ) {
|
545 |
+
|
546 |
+
if( is_numeric( $query->query[$taxonomy] ) ) {
|
547 |
+
|
548 |
$tax_query[] = array(
|
549 |
'taxonomy' => $taxonomy,
|
550 |
'field' => 'term_id',
|
551 |
'terms' => array( $query->query[$taxonomy] )
|
552 |
+
);
|
553 |
}
|
554 |
+
elseif ( 'not_in' === $query->query[$taxonomy] ) {
|
555 |
+
|
556 |
$terms = get_terms( $taxonomy, array('fields'=>'ids','get'=>'all') );
|
557 |
+
|
558 |
$tax_query[] = array(
|
559 |
'taxonomy' => $taxonomy,
|
560 |
'field' => 'term_id',
|
561 |
'terms' => $terms,
|
562 |
'operator' => 'NOT IN',
|
563 |
+
);
|
564 |
}
|
565 |
+
elseif ( 'in' === $query->query[$taxonomy] ) {
|
566 |
+
|
567 |
$terms = get_terms( $taxonomy, array('fields'=>'ids','get'=>'all') );
|
568 |
+
|
569 |
$tax_query[] = array(
|
570 |
'taxonomy' => $taxonomy,
|
571 |
'field' => 'term_id',
|
572 |
'terms' => $terms,
|
573 |
'operator' => 'IN',
|
574 |
+
);
|
575 |
}
|
576 |
}
|
577 |
}
|
578 |
} // endforeach
|
579 |
+
|
580 |
if ( ! empty( $tax_query ) )
|
|
|
581 |
$query->tax_query = new WP_Tax_Query( $tax_query );
|
582 |
+
|
|
|
583 |
} // endif
|
584 |
}
|
585 |
}
|
586 |
|
587 |
|
588 |
|
|
|
|
|
589 |
/**
|
590 |
* wpuxss_eml_attachment_fields_to_edit
|
591 |
*
|
592 |
* Based on /wp-admin/includes/media.php
|
593 |
+
*
|
594 |
* @since 1.0
|
595 |
* @created 14/08/13
|
596 |
*/
|
597 |
+
|
598 |
add_filter( 'attachment_fields_to_edit', 'wpuxss_eml_attachment_fields_to_edit', 10, 2 );
|
599 |
|
600 |
if( ! function_exists( 'wpuxss_eml_attachment_fields_to_edit' ) ) {
|
601 |
+
|
602 |
function wpuxss_eml_attachment_fields_to_edit( $form_fields, $post ) {
|
603 |
+
|
604 |
$wpuxss_eml_tax_options = get_option('wpuxss_eml_tax_options');
|
605 |
+
|
606 |
foreach ( get_attachment_taxonomies($post) as $taxonomy ) {
|
607 |
+
|
608 |
$t = (array) get_taxonomy($taxonomy);
|
609 |
if ( ! $t['show_ui'] )
|
610 |
continue;
|
612 |
$t['label'] = $taxonomy;
|
613 |
if ( empty($t['args']) )
|
614 |
$t['args'] = array();
|
615 |
+
|
616 |
$terms = get_object_term_cache($post->ID, $taxonomy);
|
617 |
if ( false === $terms )
|
618 |
$terms = wp_get_object_terms($post->ID, $taxonomy, $t['args']);
|
619 |
+
|
620 |
$values = array();
|
621 |
+
|
622 |
+
foreach ( $terms as $term ) {
|
623 |
$values[] = $term->slug;
|
624 |
+
}
|
625 |
+
|
626 |
$t['value'] = join(', ', $values);
|
627 |
$t['show_in_edit'] = false;
|
628 |
+
|
629 |
+
if ( ( $wpuxss_eml_tax_options['edit_all_as_hierarchical'] || $t['hierarchical'] ) && function_exists( 'wp_terms_checklist' ) ) {
|
630 |
+
|
631 |
ob_start();
|
632 |
+
|
633 |
wp_terms_checklist( $post->ID, array( 'taxonomy' => $taxonomy, 'checked_ontop' => false, 'walker' => new Walker_Media_Taxonomy_Checklist() ) );
|
634 |
+
|
635 |
if ( ob_get_contents() != false )
|
636 |
$html = '<ul class="term-list">' . ob_get_contents() . '</ul>';
|
637 |
else
|
638 |
$html = '<ul class="term-list"><li>No ' . $t['label'] . ' found.</li></ul>';
|
639 |
+
|
640 |
ob_end_clean();
|
641 |
+
|
642 |
unset( $t['value'] );
|
643 |
+
|
644 |
$t['input'] = 'html';
|
645 |
+
$t['html'] = $html;
|
646 |
}
|
647 |
+
|
648 |
$form_fields[$taxonomy] = $t;
|
649 |
}
|
650 |
+
|
651 |
return $form_fields;
|
652 |
}
|
653 |
}
|
654 |
|
655 |
|
656 |
|
|
|
|
|
657 |
/**
|
658 |
* Walker_Media_Taxonomy_Checklist
|
659 |
*
|
664 |
*/
|
665 |
|
666 |
if( ! class_exists('Walker_Media_Taxonomy_Checklist') ) {
|
667 |
+
|
668 |
class Walker_Media_Taxonomy_Checklist extends Walker {
|
669 |
+
|
670 |
var $tree_type = 'category';
|
671 |
+
var $db_fields = array ('parent' => 'parent', 'id' => 'term_id');
|
672 |
+
|
673 |
+
function start_lvl( &$output, $depth = 0, $args = array() ) {
|
674 |
+
|
675 |
$indent = str_repeat("\t", $depth);
|
676 |
$output .= "$indent<ul class='children'>\n";
|
677 |
}
|
678 |
+
|
679 |
+
function end_lvl( &$output, $depth = 0, $args = array() ) {
|
680 |
+
|
681 |
$indent = str_repeat("\t", $depth);
|
682 |
$output .= "$indent</ul>\n";
|
683 |
}
|
684 |
+
|
685 |
+
function start_el( &$output, $category, $depth = 0, $args = array(), $id = 0 ) {
|
686 |
+
|
687 |
extract($args);
|
688 |
+
|
689 |
if ( empty($taxonomy) )
|
690 |
$taxonomy = 'category';
|
691 |
+
|
692 |
$class = in_array( $category->term_id, $popular_cats ) ? ' class="popular-category"' : '';
|
693 |
$output .= "\n<li id='{$taxonomy}-{$category->term_id}'$class>" . "<label class='selectit'><input value='0' type='hidden' name='tax_input[{$taxonomy}][{$category->term_id}]' /><input value='1' type='checkbox' name='tax_input[{$taxonomy}][{$category->term_id}]' id='in-{$taxonomy}-{$category->term_id}'" . checked( in_array( $category->term_id, $selected_cats ), true, false ) . disabled( empty( $args['disabled'] ), false, false ) . " />" . esc_html( apply_filters('the_category', $category->name )) . "</label>";
|
694 |
}
|
695 |
+
|
696 |
+
function end_el( &$output, $category, $depth = 0, $args = array() ) {
|
697 |
+
|
698 |
$output .= "</li>\n";
|
699 |
}
|
700 |
}
|
702 |
|
703 |
|
704 |
|
|
|
705 |
/**
|
706 |
* Walker_Media_Taxonomy_Uploader_Filter
|
707 |
*
|
712 |
*/
|
713 |
|
714 |
if( ! class_exists('Walker_Media_Taxonomy_Uploader_Filter') ) {
|
715 |
+
|
716 |
class Walker_Media_Taxonomy_Uploader_Filter extends Walker {
|
717 |
+
|
718 |
var $tree_type = 'category';
|
719 |
+
var $db_fields = array ('parent' => 'parent', 'id' => 'term_id');
|
720 |
+
|
721 |
+
function start_lvl( &$output, $depth = 0, $args = array() ) {
|
722 |
+
|
723 |
$output .= "";
|
724 |
}
|
725 |
+
|
726 |
+
function end_lvl( &$output, $depth = 0, $args = array() ) {
|
727 |
+
|
728 |
$output .= "";
|
729 |
}
|
730 |
+
|
731 |
+
function start_el( &$output, $category, $depth = 0, $args = array(), $id = 0 ) {
|
732 |
+
|
733 |
extract($args);
|
734 |
+
|
735 |
+
$indent = str_repeat(' ', $depth);
|
736 |
$output .= $category->term_id . '>' . $indent . esc_html( apply_filters('the_category', $category->name )) . '|';
|
737 |
}
|
738 |
+
|
739 |
+
function end_el( &$output, $category, $depth = 0, $args = array() ) {
|
740 |
+
|
741 |
$output .= "";
|
742 |
}
|
743 |
}
|
745 |
|
746 |
|
747 |
|
748 |
+
/**
|
|
|
|
|
749 |
* wpuxss_eml_save_attachment_compat
|
750 |
*
|
751 |
* Based on /wp-admin/includes/ajax-actions.php
|
757 |
add_action( 'wp_ajax_save-attachment-compat', 'wpuxss_eml_save_attachment_compat', 0 );
|
758 |
|
759 |
if( ! function_exists('wpuxss_eml_save_attachment_compat') ) {
|
760 |
+
|
761 |
+
function wpuxss_eml_save_attachment_compat() {
|
762 |
+
|
763 |
if ( ! isset( $_REQUEST['id'] ) )
|
764 |
wp_send_json_error();
|
765 |
+
|
766 |
if ( ! $id = absint( $_REQUEST['id'] ) )
|
767 |
wp_send_json_error();
|
768 |
+
|
769 |
if ( empty( $_REQUEST['attachments'] ) || empty( $_REQUEST['attachments'][ $id ] ) )
|
770 |
wp_send_json_error();
|
771 |
+
|
772 |
+
|
773 |
$attachment_data = $_REQUEST['attachments'][ $id ];
|
774 |
+
|
775 |
check_ajax_referer( 'update-post_' . $id, 'nonce' );
|
776 |
+
|
777 |
if ( ! current_user_can( 'edit_post', $id ) )
|
778 |
wp_send_json_error();
|
779 |
+
|
780 |
$post = get_post( $id, ARRAY_A );
|
781 |
+
|
782 |
if ( 'attachment' != $post['post_type'] )
|
783 |
wp_send_json_error();
|
784 |
+
|
785 |
/** This filter is documented in wp-admin/includes/media.php */
|
786 |
$post = apply_filters( 'attachment_fields_to_save', $post, $attachment_data );
|
787 |
+
|
788 |
if ( isset( $post['errors'] ) ) {
|
789 |
+
|
790 |
$errors = $post['errors']; // @todo return me and display me!
|
791 |
unset( $post['errors'] );
|
792 |
}
|
793 |
+
|
794 |
wp_update_post( $post );
|
795 |
+
|
796 |
+
foreach ( get_attachment_taxonomies( $post ) as $taxonomy ) {
|
797 |
+
|
798 |
+
if ( isset( $attachment_data[ $taxonomy ] ) ) {
|
799 |
+
|
800 |
wp_set_object_terms( $id, array_map( 'trim', preg_split( '/,+/', $attachment_data[ $taxonomy ] ) ), $taxonomy, false );
|
801 |
}
|
802 |
+
elseif ( isset( $_REQUEST['tax_input'] ) && isset( $_REQUEST['tax_input'][ $taxonomy ] ) ) {
|
803 |
+
|
804 |
$term_ids = array_keys( $_REQUEST['tax_input'][ $taxonomy ], 1 );
|
805 |
$term_ids = array_map( 'intval', $term_ids );
|
806 |
+
|
807 |
wp_set_object_terms( $id, $term_ids, $taxonomy, false );
|
808 |
}
|
809 |
}
|
810 |
+
|
811 |
if ( ! $attachment = wp_prepare_attachment_for_js( $id ) )
|
812 |
wp_send_json_error();
|
813 |
+
|
814 |
wp_send_json_success( $attachment );
|
815 |
}
|
816 |
}
|
817 |
|
818 |
|
819 |
|
|
|
|
|
820 |
/**
|
821 |
* wpuxss_eml_pre_get_posts
|
822 |
*
|
829 |
add_action( 'pre_get_posts', 'wpuxss_eml_pre_get_posts', 99 );
|
830 |
|
831 |
if( ! function_exists('wpuxss_eml_pre_get_posts') ) {
|
832 |
+
|
833 |
+
function wpuxss_eml_pre_get_posts( $query ) {
|
834 |
+
|
835 |
$wpuxss_eml_tax_options = get_option('wpuxss_eml_tax_options');
|
836 |
+
|
837 |
+
if ( $wpuxss_eml_tax_options['tax_archives'] ) {
|
838 |
+
|
839 |
$wpuxss_eml_taxonomies = get_option('wpuxss_eml_taxonomies');
|
840 |
+
|
841 |
+
foreach ( (array) $wpuxss_eml_taxonomies as $taxonomy => $params ) {
|
842 |
+
|
843 |
+
if ( $params['assigned'] && $params['eml_media'] && $query->is_main_query() && is_tax($taxonomy) && !is_admin() ) {
|
844 |
+
|
845 |
$query->set( 'post_type', 'attachment' );
|
846 |
$query->set( 'post_status', 'inherit' );
|
847 |
+
}
|
848 |
}
|
849 |
}
|
850 |
}
|
851 |
}
|
852 |
|
853 |
+
?>
|
css/eml-admin.css
CHANGED
@@ -23,7 +23,7 @@ body.eml-media-css .term-list li input[type=checkbox]:indeterminate:before {
|
|
23 |
speak: none;
|
24 |
-webkit-font-smoothing: antialiased;
|
25 |
-moz-osx-font-smoothing: grayscale;
|
26 |
-
|
27 |
content: '\f147';
|
28 |
margin: -3px 0 0 -4px;
|
29 |
color: #CBCBCB;
|
@@ -34,7 +34,7 @@ body.eml-media-css .term-list .children {
|
|
34 |
|
35 |
body.eml-media-css .compat-item .eml-tax-label {
|
36 |
width: 100%;
|
37 |
-
float: none;
|
38 |
text-align: left;
|
39 |
}
|
40 |
body.eml-media-css .compat-item .eml-tax-label span {
|
@@ -42,7 +42,7 @@ body.eml-media-css .compat-item .eml-tax-label span {
|
|
42 |
}
|
43 |
body.eml-media-css .compat-item .eml-tax-field {
|
44 |
width: 100%;
|
45 |
-
float: none;
|
46 |
}
|
47 |
|
48 |
|
@@ -89,9 +89,18 @@ body.eml-media-css .attachments-browser .instructions {
|
|
89 |
display: block;
|
90 |
}
|
91 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
92 |
|
93 |
@media only screen and (max-width: 1200px) {
|
94 |
-
|
95 |
body.eml-media-css .attachments-browser .media-toolbar-primary {
|
96 |
width: 30%;
|
97 |
}
|
@@ -101,27 +110,27 @@ body.eml-media-css .attachments-browser .instructions {
|
|
101 |
}
|
102 |
|
103 |
@media only screen and (max-width: 900px) {
|
104 |
-
|
105 |
body.eml-media-css .attachments-browser .media-toolbar {
|
106 |
-
|
107 |
margin-right: 262px;
|
108 |
}
|
109 |
-
|
110 |
body.eml-media-css .attachments-browser .media-toolbar .attachment-filters {
|
111 |
margin-top: 11px;
|
112 |
margin-right: 10px;
|
113 |
-
}
|
114 |
}
|
115 |
|
116 |
@media only screen and (max-width: 640px), screen and (max-height: 400px) {
|
117 |
-
|
118 |
body.eml-media-css .attachments-browser .media-toolbar {
|
119 |
margin-right: 0;
|
120 |
}
|
121 |
}
|
122 |
|
123 |
@media only screen and (max-width: 480px) {
|
124 |
-
|
125 |
body.eml-media-css .attachments-browser .media-toolbar-primary,
|
126 |
body.eml-media-css .attachments-browser .media-toolbar-secondary {
|
127 |
float: none;
|
@@ -249,13 +258,17 @@ body.eml-media-css .media-modal.acf-expanded .attachments-browser .media-toolbar
|
|
249 |
padding: 3px 0;
|
250 |
}
|
251 |
.wpuxss-eml-taxonomy-edit .wpuxss-eml-labels-edit label {
|
252 |
-
display: inline-block;
|
253 |
width: 100px;
|
254 |
}
|
255 |
-
.wpuxss-eml-taxonomy-edit
|
256 |
-
.wpuxss-eml-taxonomy-edit .wpuxss-eml-settings-edit input[type="text"] {
|
257 |
min-width: 150px;
|
258 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
259 |
|
260 |
|
261 |
|
@@ -306,7 +319,7 @@ body.eml-media-css .media-modal.acf-expanded .attachments-browser .media-toolbar
|
|
306 |
}
|
307 |
|
308 |
#wpuxss-eml-global-options-wrap .postbox {
|
309 |
-
background-image:none !important;
|
310 |
position: relative;
|
311 |
}
|
312 |
#wpuxss-eml-global-options-wrap #poststuff .inside {
|
@@ -357,4 +370,4 @@ body.eml-media-css .media-modal.acf-expanded .attachments-browser .media-toolbar
|
|
357 |
url('../fonts/webbistro.svg#webbistro') format('svg');
|
358 |
font-weight: normal;
|
359 |
font-style: normal;
|
360 |
-
}
|
23 |
speak: none;
|
24 |
-webkit-font-smoothing: antialiased;
|
25 |
-moz-osx-font-smoothing: grayscale;
|
26 |
+
|
27 |
content: '\f147';
|
28 |
margin: -3px 0 0 -4px;
|
29 |
color: #CBCBCB;
|
34 |
|
35 |
body.eml-media-css .compat-item .eml-tax-label {
|
36 |
width: 100%;
|
37 |
+
float: none;
|
38 |
text-align: left;
|
39 |
}
|
40 |
body.eml-media-css .compat-item .eml-tax-label span {
|
42 |
}
|
43 |
body.eml-media-css .compat-item .eml-tax-field {
|
44 |
width: 100%;
|
45 |
+
float: none;
|
46 |
}
|
47 |
|
48 |
|
89 |
display: block;
|
90 |
}
|
91 |
|
92 |
+
body.eml-media-css .eml-info-box {
|
93 |
+
overflow: hidden;
|
94 |
+
}
|
95 |
+
body.eml-media-css .eml-info-box ul {
|
96 |
+
margin: 0;
|
97 |
+
}
|
98 |
+
|
99 |
+
|
100 |
+
|
101 |
|
102 |
@media only screen and (max-width: 1200px) {
|
103 |
+
|
104 |
body.eml-media-css .attachments-browser .media-toolbar-primary {
|
105 |
width: 30%;
|
106 |
}
|
110 |
}
|
111 |
|
112 |
@media only screen and (max-width: 900px) {
|
113 |
+
|
114 |
body.eml-media-css .attachments-browser .media-toolbar {
|
115 |
+
|
116 |
margin-right: 262px;
|
117 |
}
|
118 |
+
|
119 |
body.eml-media-css .attachments-browser .media-toolbar .attachment-filters {
|
120 |
margin-top: 11px;
|
121 |
margin-right: 10px;
|
122 |
+
}
|
123 |
}
|
124 |
|
125 |
@media only screen and (max-width: 640px), screen and (max-height: 400px) {
|
126 |
+
|
127 |
body.eml-media-css .attachments-browser .media-toolbar {
|
128 |
margin-right: 0;
|
129 |
}
|
130 |
}
|
131 |
|
132 |
@media only screen and (max-width: 480px) {
|
133 |
+
|
134 |
body.eml-media-css .attachments-browser .media-toolbar-primary,
|
135 |
body.eml-media-css .attachments-browser .media-toolbar-secondary {
|
136 |
float: none;
|
258 |
padding: 3px 0;
|
259 |
}
|
260 |
.wpuxss-eml-taxonomy-edit .wpuxss-eml-labels-edit label {
|
|
|
261 |
width: 100px;
|
262 |
}
|
263 |
+
.wpuxss-eml-taxonomy-edit input[type="text"] {
|
|
|
264 |
min-width: 150px;
|
265 |
}
|
266 |
+
.wpuxss-eml-taxonomy-edit .wpuxss-eml-settings-edit input[type="text"] {
|
267 |
+
width: 50%;
|
268 |
+
}
|
269 |
+
.wpuxss-eml-taxonomy-edit .wpuxss-eml-labels-edit input[type="text"] {
|
270 |
+
width: 70%;
|
271 |
+
}
|
272 |
|
273 |
|
274 |
|
319 |
}
|
320 |
|
321 |
#wpuxss-eml-global-options-wrap .postbox {
|
322 |
+
background-image:none !important;
|
323 |
position: relative;
|
324 |
}
|
325 |
#wpuxss-eml-global-options-wrap #poststuff .inside {
|
370 |
url('../fonts/webbistro.svg#webbistro') format('svg');
|
371 |
font-weight: normal;
|
372 |
font-style: normal;
|
373 |
+
}
|
enhanced-media-library.php
CHANGED
@@ -1,9 +1,10 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Enhanced Media Library
|
|
|
4 |
Plugin URI: http://wpUXsolutions.com
|
5 |
Description: This plugin will be handy for those who need to manage a lot of media files.
|
6 |
-
Version: 2.
|
7 |
Author: wpUXsolutions
|
8 |
Author URI: http://wpUXsolutions.com
|
9 |
Text Domain: eml
|
@@ -15,7 +16,6 @@ Copyright 2013-2015 wpUXsolutions (email : wpUXsolutions@gmail.com)
|
|
15 |
|
16 |
|
17 |
|
18 |
-
|
19 |
global $wp_version,
|
20 |
$wpuxss_eml_version,
|
21 |
$wpuxss_eml_dir,
|
@@ -23,8 +23,46 @@ global $wp_version,
|
|
23 |
|
24 |
|
25 |
|
26 |
-
$wpuxss_eml_version = '2.
|
|
|
|
|
27 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
|
29 |
|
30 |
|
@@ -38,26 +76,27 @@ $wpuxss_eml_version = '2.0.4.8';
|
|
38 |
add_action( 'plugins_loaded', 'wpuxss_eml_on_plugins_loaded' );
|
39 |
|
40 |
if ( ! function_exists( 'wpuxss_eml_on_plugins_loaded' ) ) {
|
41 |
-
|
42 |
function wpuxss_eml_on_plugins_loaded() {
|
43 |
-
|
44 |
-
load_plugin_textdomain( 'eml', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
|
45 |
}
|
46 |
}
|
47 |
|
48 |
|
49 |
|
50 |
-
|
|
|
|
|
51 |
|
52 |
include_once( 'core/mime-types.php' );
|
53 |
include_once( 'core/taxonomies.php' );
|
|
|
54 |
|
55 |
-
if( is_admin() ) {
|
56 |
|
57 |
include_once( 'core/options-pages.php' );
|
58 |
}
|
59 |
-
|
60 |
-
|
61 |
|
62 |
|
63 |
|
@@ -73,29 +112,29 @@ add_action('init', 'wpuxss_eml_on_init', 12);
|
|
73 |
if ( ! function_exists( 'wpuxss_eml_on_init' ) ) {
|
74 |
|
75 |
function wpuxss_eml_on_init() {
|
76 |
-
|
77 |
global $wpuxss_eml_dir,
|
78 |
$wpuxss_eml_path;
|
79 |
-
|
80 |
-
|
81 |
$wpuxss_eml_dir = plugin_dir_url( __FILE__ );
|
82 |
-
$wpuxss_eml_path = plugin_dir_path( __FILE__ );
|
83 |
-
|
84 |
|
85 |
wpuxss_eml_on_activation_update();
|
86 |
|
87 |
|
88 |
$wpuxss_eml_taxonomies = get_option('wpuxss_eml_taxonomies');
|
89 |
if ( empty($wpuxss_eml_taxonomies) ) $wpuxss_eml_taxonomies = array();
|
90 |
-
|
91 |
// register eml taxonomies
|
92 |
-
foreach ( $wpuxss_eml_taxonomies as $taxonomy => $params )
|
93 |
-
|
94 |
-
if ( $params['eml_media'] && !empty($params['labels']['singular_name']) && !empty($params['labels']['name']) )
|
95 |
-
|
96 |
-
register_taxonomy(
|
97 |
-
$taxonomy,
|
98 |
-
'attachment',
|
99 |
array(
|
100 |
'labels' => $params['labels'],
|
101 |
'public' => true,
|
@@ -104,20 +143,19 @@ if ( ! function_exists( 'wpuxss_eml_on_init' ) ) {
|
|
104 |
'hierarchical' => $params['hierarchical'],
|
105 |
'update_count_callback' => '_update_generic_term_count',
|
106 |
'sort' => $params['sort'],
|
107 |
-
'rewrite' => array(
|
108 |
-
'slug' => $params['rewrite']['slug'],
|
109 |
-
'with_front' => $params['rewrite']['with_front']
|
110 |
)
|
111 |
-
)
|
112 |
);
|
113 |
}
|
114 |
-
}
|
115 |
}
|
116 |
}
|
117 |
|
118 |
|
119 |
|
120 |
-
|
121 |
/**
|
122 |
* wpuxss_eml_on_wp_loaded
|
123 |
*
|
@@ -125,22 +163,23 @@ if ( ! function_exists( 'wpuxss_eml_on_init' ) ) {
|
|
125 |
* @created 03/11/13
|
126 |
*/
|
127 |
|
128 |
-
|
129 |
add_action( 'wp_loaded', 'wpuxss_eml_on_wp_loaded' );
|
130 |
|
131 |
if ( ! function_exists( 'wpuxss_eml_on_wp_loaded' ) ) {
|
132 |
|
133 |
function wpuxss_eml_on_wp_loaded() {
|
134 |
-
|
|
|
|
|
135 |
$wpuxss_eml_taxonomies = get_option('wpuxss_eml_taxonomies');
|
136 |
if ( empty($wpuxss_eml_taxonomies) ) $wpuxss_eml_taxonomies = array();
|
137 |
$taxonomies = get_taxonomies(array(),'object');
|
138 |
-
|
139 |
// discover 'foreign' taxonomies
|
140 |
-
foreach ( $taxonomies as $taxonomy => $params )
|
141 |
-
|
142 |
-
if ( !empty($params->object_type) && !array_key_exists($taxonomy,$wpuxss_eml_taxonomies) && !in_array('revision',$params->object_type) && !in_array('nav_menu_item',$params->object_type) && $taxonomy != 'post_format' )
|
143 |
-
|
144 |
$wpuxss_eml_taxonomies[$taxonomy] = array(
|
145 |
'eml_media' => 0,
|
146 |
'admin_filter' => 0,
|
@@ -151,77 +190,76 @@ if ( ! function_exists( 'wpuxss_eml_on_wp_loaded' ) ) {
|
|
151 |
'hierarchical' => $params->hierarchical ? 1 : 0,
|
152 |
'sort' => isset($params->sort) ? $params->sort : 0
|
153 |
);
|
154 |
-
|
155 |
if ( in_array('attachment',$params->object_type) )
|
156 |
$wpuxss_eml_taxonomies[$taxonomy]['assigned'] = 1;
|
157 |
-
else
|
158 |
$wpuxss_eml_taxonomies[$taxonomy]['assigned'] = 0;
|
159 |
}
|
160 |
}
|
161 |
-
|
162 |
// assign/unassign taxonomies to atachment
|
163 |
-
foreach ( $wpuxss_eml_taxonomies as $taxonomy => $params )
|
164 |
-
|
165 |
if ( $params['assigned'] )
|
166 |
register_taxonomy_for_object_type( $taxonomy, 'attachment' );
|
167 |
-
|
168 |
if ( ! $params['assigned'] )
|
169 |
unregister_taxonomy_for_object_type( $taxonomy, 'attachment' );
|
170 |
}
|
171 |
-
|
172 |
-
global $wp_taxonomies;
|
173 |
-
|
174 |
// update_count_callback for attachment taxonomies if needed
|
175 |
-
foreach ( $taxonomies as $taxonomy => $params )
|
176 |
-
|
177 |
-
if ( in_array('attachment',$params->object_type) )
|
178 |
-
|
179 |
-
if ( !isset($wp_taxonomies[$taxonomy]->update_count_callback) ||
|
|
|
|
|
180 |
$wp_taxonomies[$taxonomy]->update_count_callback = '_update_generic_term_count';
|
|
|
181 |
}
|
182 |
}
|
183 |
-
|
184 |
update_option( 'wpuxss_eml_taxonomies', $wpuxss_eml_taxonomies );
|
185 |
}
|
186 |
}
|
187 |
|
188 |
|
189 |
|
190 |
-
|
191 |
-
|
192 |
/**
|
193 |
* wpuxss_eml_admin_enqueue_scripts
|
194 |
*
|
195 |
* @since 1.1.1
|
196 |
* @created 07/04/14
|
197 |
*/
|
198 |
-
|
199 |
add_action( 'admin_enqueue_scripts', 'wpuxss_eml_admin_enqueue_scripts' );
|
200 |
|
201 |
if ( ! function_exists( 'wpuxss_eml_admin_enqueue_scripts' ) ) {
|
202 |
-
|
203 |
function wpuxss_eml_admin_enqueue_scripts() {
|
204 |
-
|
205 |
global $wpuxss_eml_version,
|
206 |
$wpuxss_eml_dir,
|
207 |
$current_screen;
|
208 |
-
|
209 |
-
|
210 |
$media_library_mode = get_user_option( 'media_library_mode', get_current_user_id() ) ? get_user_option( 'media_library_mode', get_current_user_id() ) : 'grid';
|
211 |
-
|
212 |
-
|
213 |
// admin styles
|
214 |
-
wp_enqueue_style(
|
215 |
-
'wpuxss-eml-admin-custom-style',
|
216 |
$wpuxss_eml_dir . 'css/eml-admin.css',
|
217 |
-
false,
|
218 |
$wpuxss_eml_version,
|
219 |
-
'all'
|
220 |
);
|
221 |
-
|
222 |
-
// scripts for list view :: /wp-admin/upload.php
|
223 |
-
if ( isset( $current_screen ) && 'upload' === $current_screen->base && 'list' === $media_library_mode )
|
224 |
-
|
225 |
wp_enqueue_script(
|
226 |
'wpuxss-eml-media-list-script',
|
227 |
$wpuxss_eml_dir . 'js/eml-media-list.js',
|
@@ -235,100 +273,109 @@ if ( ! function_exists( 'wpuxss_eml_admin_enqueue_scripts' ) ) {
|
|
235 |
|
236 |
|
237 |
|
238 |
-
|
239 |
/**
|
240 |
* wpuxss_eml_enqueue_media
|
241 |
*
|
242 |
* @since 2.0
|
243 |
* @created 04/09/14
|
244 |
*/
|
245 |
-
|
246 |
add_action( 'wp_enqueue_media', 'wpuxss_eml_enqueue_media' );
|
247 |
|
248 |
if ( ! function_exists( 'wpuxss_eml_enqueue_media' ) ) {
|
249 |
|
250 |
function wpuxss_eml_enqueue_media() {
|
251 |
-
|
252 |
global $wpuxss_eml_version,
|
253 |
$wpuxss_eml_dir,
|
254 |
$wp_version,
|
255 |
$current_screen;
|
256 |
-
|
257 |
-
|
258 |
if ( ! is_admin() ) {
|
259 |
return;
|
260 |
}
|
261 |
-
|
262 |
-
|
263 |
$media_library_mode = get_user_option( 'media_library_mode', get_current_user_id() ) ? get_user_option( 'media_library_mode', get_current_user_id() ) : 'grid';
|
264 |
-
|
265 |
$wpuxss_eml_tax_options = get_option('wpuxss_eml_tax_options');
|
266 |
-
|
267 |
// taxonomies for passing to media uploader's filter
|
268 |
$wpuxss_eml_taxonomies = get_option('wpuxss_eml_taxonomies');
|
269 |
if ( empty($wpuxss_eml_taxonomies) ) $wpuxss_eml_taxonomies = array();
|
270 |
-
|
271 |
-
$
|
|
|
272 |
$compat_taxonomies_to_hide = array();
|
273 |
$compat_taxonomies_to_show = array();
|
274 |
$compat_taxonomies = array();
|
275 |
-
|
276 |
-
foreach ( get_object_taxonomies('attachment','object') as $taxonomy )
|
277 |
-
|
278 |
$terms_array = array();
|
279 |
$terms = array();
|
280 |
-
|
281 |
-
if ( $wpuxss_eml_taxonomies[$taxonomy->name]['media_uploader_filter'] && function_exists( 'wp_terms_checklist' ) )
|
282 |
-
|
283 |
ob_start();
|
284 |
-
|
285 |
wp_terms_checklist( 0, array( 'taxonomy' => $taxonomy->name, 'checked_ontop' => false, 'walker' => new Walker_Media_Taxonomy_Uploader_Filter() ) );
|
286 |
-
|
287 |
$html = '';
|
288 |
-
if ( ob_get_contents() != false )
|
289 |
$html = ob_get_contents();
|
290 |
-
|
|
|
291 |
ob_end_clean();
|
292 |
-
|
293 |
$terms = array_filter( explode('|', $html) );
|
294 |
-
|
295 |
-
if ( !empty($terms) )
|
296 |
-
|
297 |
-
foreach ($terms as $term)
|
298 |
-
|
299 |
$term = explode('>', $term);
|
300 |
array_push($terms_array, array('term_id' => $term[0], 'term_name' => $term[1]));
|
301 |
}
|
|
|
302 |
$taxonomies_array[$taxonomy->name] = array(
|
303 |
'singular_name' => $taxonomy->labels->singular_name,
|
304 |
-
'plural_name'
|
305 |
-
'term_list'
|
306 |
);
|
307 |
}
|
308 |
}
|
309 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
310 |
if ( ! $wpuxss_eml_taxonomies[$taxonomy->name]['media_popup_taxonomy_edit'] ) {
|
311 |
$compat_taxonomies_to_hide[] = $taxonomy->name;
|
312 |
}
|
313 |
elseif ( $wpuxss_eml_tax_options['edit_all_as_hierarchical'] || $taxonomy->hierarchical ) {
|
314 |
$compat_taxonomies_to_show[] = $taxonomy->name;
|
315 |
}
|
316 |
-
|
317 |
$compat_taxonomies[] = $taxonomy->name;
|
318 |
-
|
319 |
} //endforeach
|
320 |
-
|
321 |
-
|
322 |
-
// generic scripts
|
323 |
-
|
324 |
wp_enqueue_script(
|
325 |
'wpuxss-eml-media-models-script',
|
326 |
$wpuxss_eml_dir . 'js/eml-media-models.js',
|
327 |
array('media-models'),
|
328 |
$wpuxss_eml_version,
|
329 |
true
|
330 |
-
);
|
331 |
-
|
332 |
wp_enqueue_script(
|
333 |
'wpuxss-eml-media-views-script',
|
334 |
$wpuxss_eml_dir . 'js/eml-media-views.js',
|
@@ -336,22 +383,32 @@ if ( ! function_exists( 'wpuxss_eml_enqueue_media' ) ) {
|
|
336 |
$wpuxss_eml_version,
|
337 |
true
|
338 |
);
|
339 |
-
|
340 |
wp_enqueue_script(
|
341 |
-
'wpuxss-eml-
|
342 |
-
'
|
343 |
-
array(),
|
344 |
$wpuxss_eml_version,
|
345 |
true
|
346 |
);
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
351 |
'wpuxss_eml_attachments_edit_nonce',
|
352 |
wp_create_nonce( 'eml-attachments-edit-nonce' )
|
353 |
);
|
354 |
-
|
355 |
$media_views_l10n = array(
|
356 |
'taxonomies' => $taxonomies_array,
|
357 |
'compat_taxonomies' => $compat_taxonomies,
|
@@ -364,17 +421,28 @@ if ( ! function_exists( 'wpuxss_eml_enqueue_media' ) ) {
|
|
364 |
'in' => __( 'All ', 'eml' ),
|
365 |
'not_in' => __( 'Not in ', 'eml' ),
|
366 |
'reset_filters' => __( 'Reset All Filters', 'eml' )
|
367 |
-
);
|
368 |
-
|
369 |
-
wp_localize_script(
|
370 |
-
'wpuxss-eml-media-views-script',
|
371 |
'wpuxss_eml_media_views_l10n',
|
372 |
$media_views_l10n
|
373 |
-
);
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
378 |
wp_enqueue_script(
|
379 |
'wpuxss-eml-media-grid-script',
|
380 |
$wpuxss_eml_dir . 'js/eml-media-grid.js',
|
@@ -383,10 +451,10 @@ if ( ! function_exists( 'wpuxss_eml_enqueue_media' ) ) {
|
|
383 |
true
|
384 |
);
|
385 |
}
|
386 |
-
|
387 |
// scripts for Appearance -> Header
|
388 |
if ( isset( $current_screen ) && 'appearance_page_custom-header' === $current_screen->base ) {
|
389 |
-
|
390 |
wp_enqueue_script(
|
391 |
'wpuxss-eml-custom-header-script',
|
392 |
$wpuxss_eml_dir . 'js/eml-custom-header.js',
|
@@ -395,10 +463,10 @@ if ( ! function_exists( 'wpuxss_eml_enqueue_media' ) ) {
|
|
395 |
true
|
396 |
);
|
397 |
}
|
398 |
-
|
399 |
// scripts for Appearance -> Background
|
400 |
if ( isset( $current_screen ) && 'appearance_page_custom-background' === $current_screen->base ) {
|
401 |
-
|
402 |
wp_enqueue_script(
|
403 |
'wpuxss-eml-custom-background-script',
|
404 |
$wpuxss_eml_dir . 'js/eml-custom-background.js',
|
@@ -407,11 +475,11 @@ if ( ! function_exists( 'wpuxss_eml_enqueue_media' ) ) {
|
|
407 |
true
|
408 |
);
|
409 |
}
|
410 |
-
|
411 |
-
|
412 |
// scripts for /wp-admin/customize.php
|
413 |
-
if ( isset( $current_screen ) && 'customize' === $current_screen->base )
|
414 |
-
|
415 |
wp_enqueue_script(
|
416 |
'wpuxss-eml-customize-controls-script',
|
417 |
$wpuxss_eml_dir . 'js/eml-customize-controls.js',
|
@@ -425,34 +493,34 @@ if ( ! function_exists( 'wpuxss_eml_enqueue_media' ) ) {
|
|
425 |
|
426 |
|
427 |
|
428 |
-
|
429 |
-
|
430 |
/**
|
431 |
* wpuxss_eml_on_activation_update
|
432 |
*
|
|
|
|
|
433 |
* @since 2.0.4
|
434 |
* @created 30/01/15
|
435 |
*/
|
436 |
|
437 |
if ( ! function_exists( 'wpuxss_eml_on_activation_update' ) ) {
|
438 |
-
|
439 |
function wpuxss_eml_on_activation_update() {
|
440 |
-
|
441 |
global $wpuxss_eml_version;
|
442 |
-
|
443 |
-
$wpuxss_eml_old_version = get_option('wpuxss_eml_version', false);
|
444 |
|
445 |
-
|
446 |
-
|
|
|
|
|
447 |
update_option('wpuxss_eml_version', $wpuxss_eml_version );
|
448 |
|
449 |
-
if ( empty($wpuxss_eml_old_version) )
|
450 |
-
|
451 |
$wpuxss_eml_taxonomies['media_category'] = array(
|
452 |
'assigned' => 1,
|
453 |
'eml_media' => 1,
|
454 |
'public' => 1,
|
455 |
-
|
456 |
'labels' => array(
|
457 |
'name' => 'Media Categories',
|
458 |
'singular_name' => 'Media Category',
|
@@ -467,32 +535,32 @@ if ( ! function_exists( 'wpuxss_eml_on_activation_update' ) ) {
|
|
467 |
'parent_item_colon' => 'Parent Media Category:',
|
468 |
'search_items' => 'Search Media Categories'
|
469 |
),
|
470 |
-
|
471 |
'hierarchical' => 1,
|
472 |
-
|
473 |
'show_admin_column' => 1,
|
474 |
'admin_filter' => 1, // list view filter
|
475 |
'media_uploader_filter' => 1, // grid view filter
|
476 |
'media_popup_taxonomy_edit' => 1,
|
477 |
-
|
478 |
'show_in_nav_menus' => 1,
|
479 |
'sort' => 0,
|
480 |
-
'rewrite' => array(
|
481 |
-
'slug' => 'media_category',
|
482 |
-
'with_front' => 1
|
483 |
-
)
|
484 |
);
|
485 |
-
|
486 |
$wpuxss_eml_tax_options = array(
|
487 |
'tax_archives' => 1,
|
488 |
'edit_all_as_hierarchical' => 0,
|
489 |
'force_filters' => 0
|
490 |
);
|
491 |
-
|
492 |
$allowed_mimes = get_allowed_mime_types();
|
493 |
-
|
494 |
-
foreach ( wp_get_mime_types() as $type => $mime )
|
495 |
-
|
496 |
$wpuxss_eml_mimes[$type] = array(
|
497 |
'mime' => $mime,
|
498 |
'singular' => $mime,
|
@@ -501,54 +569,54 @@ if ( ! function_exists( 'wpuxss_eml_on_activation_update' ) ) {
|
|
501 |
'upload' => isset($allowed_mimes[$type]) ? 1 : 0
|
502 |
);
|
503 |
}
|
504 |
-
|
|
|
|
|
|
|
505 |
$wpuxss_eml_mimes['pdf']['singular'] = 'PDF';
|
506 |
$wpuxss_eml_mimes['pdf']['plural'] = 'PDFs';
|
507 |
$wpuxss_eml_mimes['pdf']['filter'] = 1;
|
508 |
-
|
509 |
update_option( 'wpuxss_eml_taxonomies', $wpuxss_eml_taxonomies );
|
510 |
update_option( 'wpuxss_eml_tax_options', $wpuxss_eml_tax_options );
|
511 |
-
|
512 |
update_option( 'wpuxss_eml_mimes', $wpuxss_eml_mimes );
|
513 |
-
|
514 |
-
|
515 |
return;
|
516 |
-
}
|
517 |
-
|
518 |
-
if ( version_compare( $wpuxss_eml_old_version, '2.0.2', '<' ) )
|
519 |
-
|
520 |
$wpuxss_eml_taxonomies = get_option('wpuxss_eml_taxonomies');
|
521 |
-
|
522 |
-
foreach( (array) $wpuxss_eml_taxonomies as $taxonomy => $params )
|
523 |
-
|
524 |
-
if ( $params['eml_media'] )
|
525 |
-
{
|
526 |
$wpuxss_eml_taxonomies[$taxonomy]['rewrite']['with_front'] = 1;
|
527 |
-
}
|
528 |
}
|
529 |
-
|
530 |
update_option( 'wpuxss_eml_taxonomies', $wpuxss_eml_taxonomies );
|
531 |
}
|
532 |
-
|
533 |
-
if ( version_compare( $wpuxss_eml_old_version, '2.0.4', '<' ) )
|
534 |
-
|
535 |
$wpuxss_eml_taxonomies = get_option('wpuxss_eml_taxonomies');
|
536 |
-
|
537 |
-
foreach( (array) $wpuxss_eml_taxonomies as $taxonomy => $params )
|
538 |
-
{
|
539 |
$wpuxss_eml_taxonomies[$taxonomy]['media_popup_taxonomy_edit'] = 1;
|
540 |
}
|
541 |
-
|
542 |
$wpuxss_eml_tax_options = array(
|
543 |
'tax_archives' => 1,
|
544 |
'edit_all_as_hierarchical' => 0,
|
545 |
'force_filters' => 0
|
546 |
);
|
547 |
-
|
548 |
update_option( 'wpuxss_eml_taxonomies', $wpuxss_eml_taxonomies );
|
549 |
update_option( 'wpuxss_eml_tax_options', $wpuxss_eml_tax_options );
|
550 |
}
|
551 |
-
} // endif
|
552 |
}
|
553 |
}
|
554 |
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Enhanced Media Library
|
4 |
+
Depends: Toolbar Publish Button
|
5 |
Plugin URI: http://wpUXsolutions.com
|
6 |
Description: This plugin will be handy for those who need to manage a lot of media files.
|
7 |
+
Version: 2.1
|
8 |
Author: wpUXsolutions
|
9 |
Author URI: http://wpUXsolutions.com
|
10 |
Text Domain: eml
|
16 |
|
17 |
|
18 |
|
|
|
19 |
global $wp_version,
|
20 |
$wpuxss_eml_version,
|
21 |
$wpuxss_eml_dir,
|
23 |
|
24 |
|
25 |
|
26 |
+
$wpuxss_eml_version = '2.1';
|
27 |
+
|
28 |
+
|
29 |
|
30 |
+
/**
|
31 |
+
* wpuxss_get_eml_slug
|
32 |
+
*
|
33 |
+
* @since 2.0.4.9
|
34 |
+
* @created 27/10/15
|
35 |
+
*/
|
36 |
+
|
37 |
+
if ( ! function_exists( 'wpuxss_get_eml_slug' ) ) {
|
38 |
+
|
39 |
+
function wpuxss_get_eml_slug() {
|
40 |
+
|
41 |
+
$path_array = array_filter( explode ( '/', plugin_dir_url( __FILE__ ) ) );
|
42 |
+
$wpuxss_eml_slug = end( $path_array );
|
43 |
+
|
44 |
+
return $wpuxss_eml_slug;
|
45 |
+
}
|
46 |
+
}
|
47 |
+
|
48 |
+
|
49 |
+
|
50 |
+
/**
|
51 |
+
* wpuxss_get_eml_basename
|
52 |
+
*
|
53 |
+
* @since 2.0.4.9
|
54 |
+
* @created 27/10/15
|
55 |
+
*/
|
56 |
+
|
57 |
+
if ( ! function_exists( 'wpuxss_get_eml_basename' ) ) {
|
58 |
+
|
59 |
+
function wpuxss_get_eml_basename() {
|
60 |
+
|
61 |
+
$wpuxss_eml_basename = wpuxss_get_eml_slug() . '/' . basename(__FILE__);
|
62 |
+
|
63 |
+
return $wpuxss_eml_basename;
|
64 |
+
}
|
65 |
+
}
|
66 |
|
67 |
|
68 |
|
76 |
add_action( 'plugins_loaded', 'wpuxss_eml_on_plugins_loaded' );
|
77 |
|
78 |
if ( ! function_exists( 'wpuxss_eml_on_plugins_loaded' ) ) {
|
79 |
+
|
80 |
function wpuxss_eml_on_plugins_loaded() {
|
81 |
+
|
82 |
+
load_plugin_textdomain( 'eml', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
|
83 |
}
|
84 |
}
|
85 |
|
86 |
|
87 |
|
88 |
+
/**
|
89 |
+
* Free functionality
|
90 |
+
*/
|
91 |
|
92 |
include_once( 'core/mime-types.php' );
|
93 |
include_once( 'core/taxonomies.php' );
|
94 |
+
include_once( 'core/gallery.php' );
|
95 |
|
96 |
+
if( is_admin() ) {
|
97 |
|
98 |
include_once( 'core/options-pages.php' );
|
99 |
}
|
|
|
|
|
100 |
|
101 |
|
102 |
|
112 |
if ( ! function_exists( 'wpuxss_eml_on_init' ) ) {
|
113 |
|
114 |
function wpuxss_eml_on_init() {
|
115 |
+
|
116 |
global $wpuxss_eml_dir,
|
117 |
$wpuxss_eml_path;
|
118 |
+
|
119 |
+
|
120 |
$wpuxss_eml_dir = plugin_dir_url( __FILE__ );
|
121 |
+
$wpuxss_eml_path = plugin_dir_path( __FILE__ );
|
122 |
+
|
123 |
|
124 |
wpuxss_eml_on_activation_update();
|
125 |
|
126 |
|
127 |
$wpuxss_eml_taxonomies = get_option('wpuxss_eml_taxonomies');
|
128 |
if ( empty($wpuxss_eml_taxonomies) ) $wpuxss_eml_taxonomies = array();
|
129 |
+
|
130 |
// register eml taxonomies
|
131 |
+
foreach ( $wpuxss_eml_taxonomies as $taxonomy => $params ) {
|
132 |
+
|
133 |
+
if ( $params['eml_media'] && ! empty( $params['labels']['singular_name'] ) && ! empty( $params['labels']['name'] ) ) {
|
134 |
+
|
135 |
+
register_taxonomy(
|
136 |
+
$taxonomy,
|
137 |
+
'attachment',
|
138 |
array(
|
139 |
'labels' => $params['labels'],
|
140 |
'public' => true,
|
143 |
'hierarchical' => $params['hierarchical'],
|
144 |
'update_count_callback' => '_update_generic_term_count',
|
145 |
'sort' => $params['sort'],
|
146 |
+
'rewrite' => array(
|
147 |
+
'slug' => $params['rewrite']['slug'],
|
148 |
+
'with_front' => $params['rewrite']['with_front']
|
149 |
)
|
150 |
+
)
|
151 |
);
|
152 |
}
|
153 |
+
} // endforeach
|
154 |
}
|
155 |
}
|
156 |
|
157 |
|
158 |
|
|
|
159 |
/**
|
160 |
* wpuxss_eml_on_wp_loaded
|
161 |
*
|
163 |
* @created 03/11/13
|
164 |
*/
|
165 |
|
|
|
166 |
add_action( 'wp_loaded', 'wpuxss_eml_on_wp_loaded' );
|
167 |
|
168 |
if ( ! function_exists( 'wpuxss_eml_on_wp_loaded' ) ) {
|
169 |
|
170 |
function wpuxss_eml_on_wp_loaded() {
|
171 |
+
|
172 |
+
global $wp_taxonomies;
|
173 |
+
|
174 |
$wpuxss_eml_taxonomies = get_option('wpuxss_eml_taxonomies');
|
175 |
if ( empty($wpuxss_eml_taxonomies) ) $wpuxss_eml_taxonomies = array();
|
176 |
$taxonomies = get_taxonomies(array(),'object');
|
177 |
+
|
178 |
// discover 'foreign' taxonomies
|
179 |
+
foreach ( $taxonomies as $taxonomy => $params ) {
|
180 |
+
|
181 |
+
if ( !empty($params->object_type) && !array_key_exists($taxonomy,$wpuxss_eml_taxonomies) && !in_array('revision',$params->object_type) && !in_array('nav_menu_item',$params->object_type) && $taxonomy != 'post_format' ) {
|
182 |
+
|
183 |
$wpuxss_eml_taxonomies[$taxonomy] = array(
|
184 |
'eml_media' => 0,
|
185 |
'admin_filter' => 0,
|
190 |
'hierarchical' => $params->hierarchical ? 1 : 0,
|
191 |
'sort' => isset($params->sort) ? $params->sort : 0
|
192 |
);
|
193 |
+
|
194 |
if ( in_array('attachment',$params->object_type) )
|
195 |
$wpuxss_eml_taxonomies[$taxonomy]['assigned'] = 1;
|
196 |
+
else
|
197 |
$wpuxss_eml_taxonomies[$taxonomy]['assigned'] = 0;
|
198 |
}
|
199 |
}
|
200 |
+
|
201 |
// assign/unassign taxonomies to atachment
|
202 |
+
foreach ( $wpuxss_eml_taxonomies as $taxonomy => $params ) {
|
203 |
+
|
204 |
if ( $params['assigned'] )
|
205 |
register_taxonomy_for_object_type( $taxonomy, 'attachment' );
|
206 |
+
|
207 |
if ( ! $params['assigned'] )
|
208 |
unregister_taxonomy_for_object_type( $taxonomy, 'attachment' );
|
209 |
}
|
210 |
+
|
|
|
|
|
211 |
// update_count_callback for attachment taxonomies if needed
|
212 |
+
foreach ( $taxonomies as $taxonomy => $params ) {
|
213 |
+
|
214 |
+
if ( in_array('attachment',$params->object_type) ) {
|
215 |
+
|
216 |
+
if ( ! isset( $wp_taxonomies[$taxonomy]->update_count_callback ) ||
|
217 |
+
empty( $wp_taxonomies[$taxonomy]->update_count_callback ) ) {
|
218 |
+
|
219 |
$wp_taxonomies[$taxonomy]->update_count_callback = '_update_generic_term_count';
|
220 |
+
}
|
221 |
}
|
222 |
}
|
223 |
+
|
224 |
update_option( 'wpuxss_eml_taxonomies', $wpuxss_eml_taxonomies );
|
225 |
}
|
226 |
}
|
227 |
|
228 |
|
229 |
|
|
|
|
|
230 |
/**
|
231 |
* wpuxss_eml_admin_enqueue_scripts
|
232 |
*
|
233 |
* @since 1.1.1
|
234 |
* @created 07/04/14
|
235 |
*/
|
236 |
+
|
237 |
add_action( 'admin_enqueue_scripts', 'wpuxss_eml_admin_enqueue_scripts' );
|
238 |
|
239 |
if ( ! function_exists( 'wpuxss_eml_admin_enqueue_scripts' ) ) {
|
240 |
+
|
241 |
function wpuxss_eml_admin_enqueue_scripts() {
|
242 |
+
|
243 |
global $wpuxss_eml_version,
|
244 |
$wpuxss_eml_dir,
|
245 |
$current_screen;
|
246 |
+
|
247 |
+
|
248 |
$media_library_mode = get_user_option( 'media_library_mode', get_current_user_id() ) ? get_user_option( 'media_library_mode', get_current_user_id() ) : 'grid';
|
249 |
+
|
250 |
+
|
251 |
// admin styles
|
252 |
+
wp_enqueue_style(
|
253 |
+
'wpuxss-eml-admin-custom-style',
|
254 |
$wpuxss_eml_dir . 'css/eml-admin.css',
|
255 |
+
false,
|
256 |
$wpuxss_eml_version,
|
257 |
+
'all'
|
258 |
);
|
259 |
+
|
260 |
+
// scripts for list view :: /wp-admin/upload.php
|
261 |
+
if ( isset( $current_screen ) && 'upload' === $current_screen->base && 'list' === $media_library_mode ) {
|
262 |
+
|
263 |
wp_enqueue_script(
|
264 |
'wpuxss-eml-media-list-script',
|
265 |
$wpuxss_eml_dir . 'js/eml-media-list.js',
|
273 |
|
274 |
|
275 |
|
|
|
276 |
/**
|
277 |
* wpuxss_eml_enqueue_media
|
278 |
*
|
279 |
* @since 2.0
|
280 |
* @created 04/09/14
|
281 |
*/
|
282 |
+
|
283 |
add_action( 'wp_enqueue_media', 'wpuxss_eml_enqueue_media' );
|
284 |
|
285 |
if ( ! function_exists( 'wpuxss_eml_enqueue_media' ) ) {
|
286 |
|
287 |
function wpuxss_eml_enqueue_media() {
|
288 |
+
|
289 |
global $wpuxss_eml_version,
|
290 |
$wpuxss_eml_dir,
|
291 |
$wp_version,
|
292 |
$current_screen;
|
293 |
+
|
294 |
+
|
295 |
if ( ! is_admin() ) {
|
296 |
return;
|
297 |
}
|
298 |
+
|
299 |
+
|
300 |
$media_library_mode = get_user_option( 'media_library_mode', get_current_user_id() ) ? get_user_option( 'media_library_mode', get_current_user_id() ) : 'grid';
|
301 |
+
|
302 |
$wpuxss_eml_tax_options = get_option('wpuxss_eml_tax_options');
|
303 |
+
|
304 |
// taxonomies for passing to media uploader's filter
|
305 |
$wpuxss_eml_taxonomies = get_option('wpuxss_eml_taxonomies');
|
306 |
if ( empty($wpuxss_eml_taxonomies) ) $wpuxss_eml_taxonomies = array();
|
307 |
+
|
308 |
+
$all_taxonomies_array = array(); // all attachment taxonomies
|
309 |
+
$taxonomies_array = array(); // attachment taxonomies excluding those without grid view filter
|
310 |
$compat_taxonomies_to_hide = array();
|
311 |
$compat_taxonomies_to_show = array();
|
312 |
$compat_taxonomies = array();
|
313 |
+
|
314 |
+
foreach ( get_object_taxonomies('attachment','object') as $taxonomy ) {
|
315 |
+
|
316 |
$terms_array = array();
|
317 |
$terms = array();
|
318 |
+
|
319 |
+
if ( $wpuxss_eml_taxonomies[$taxonomy->name]['media_uploader_filter'] && function_exists( 'wp_terms_checklist' ) ) {
|
320 |
+
|
321 |
ob_start();
|
322 |
+
|
323 |
wp_terms_checklist( 0, array( 'taxonomy' => $taxonomy->name, 'checked_ontop' => false, 'walker' => new Walker_Media_Taxonomy_Uploader_Filter() ) );
|
324 |
+
|
325 |
$html = '';
|
326 |
+
if ( ob_get_contents() != false ) {
|
327 |
$html = ob_get_contents();
|
328 |
+
}
|
329 |
+
|
330 |
ob_end_clean();
|
331 |
+
|
332 |
$terms = array_filter( explode('|', $html) );
|
333 |
+
|
334 |
+
if ( ! empty( $terms ) ) {
|
335 |
+
|
336 |
+
foreach ( $terms as $term ) {
|
337 |
+
|
338 |
$term = explode('>', $term);
|
339 |
array_push($terms_array, array('term_id' => $term[0], 'term_name' => $term[1]));
|
340 |
}
|
341 |
+
|
342 |
$taxonomies_array[$taxonomy->name] = array(
|
343 |
'singular_name' => $taxonomy->labels->singular_name,
|
344 |
+
'plural_name' => $taxonomy->labels->name,
|
345 |
+
'term_list' => $terms_array
|
346 |
);
|
347 |
}
|
348 |
}
|
349 |
+
|
350 |
+
$all_terms = get_terms( $taxonomy->name, array('fields'=>'id=>name','get'=>'all') );
|
351 |
+
$all_taxonomies_array[$taxonomy->name] = array(
|
352 |
+
'singular_name' => $taxonomy->labels->singular_name,
|
353 |
+
'plural_name' => $taxonomy->labels->name,
|
354 |
+
'terms' => $all_terms
|
355 |
+
);
|
356 |
+
|
357 |
if ( ! $wpuxss_eml_taxonomies[$taxonomy->name]['media_popup_taxonomy_edit'] ) {
|
358 |
$compat_taxonomies_to_hide[] = $taxonomy->name;
|
359 |
}
|
360 |
elseif ( $wpuxss_eml_tax_options['edit_all_as_hierarchical'] || $taxonomy->hierarchical ) {
|
361 |
$compat_taxonomies_to_show[] = $taxonomy->name;
|
362 |
}
|
363 |
+
|
364 |
$compat_taxonomies[] = $taxonomy->name;
|
365 |
+
|
366 |
} //endforeach
|
367 |
+
|
368 |
+
|
369 |
+
// generic scripts
|
370 |
+
|
371 |
wp_enqueue_script(
|
372 |
'wpuxss-eml-media-models-script',
|
373 |
$wpuxss_eml_dir . 'js/eml-media-models.js',
|
374 |
array('media-models'),
|
375 |
$wpuxss_eml_version,
|
376 |
true
|
377 |
+
);
|
378 |
+
|
379 |
wp_enqueue_script(
|
380 |
'wpuxss-eml-media-views-script',
|
381 |
$wpuxss_eml_dir . 'js/eml-media-views.js',
|
383 |
$wpuxss_eml_version,
|
384 |
true
|
385 |
);
|
386 |
+
|
387 |
wp_enqueue_script(
|
388 |
+
'wpuxss-eml-media-editor-script',
|
389 |
+
$wpuxss_eml_dir . 'js/eml-media-editor.js',
|
390 |
+
array('media-editor','media-views'),
|
391 |
$wpuxss_eml_version,
|
392 |
true
|
393 |
);
|
394 |
+
|
395 |
+
|
396 |
+
// TODO:
|
397 |
+
// wp_enqueue_script(
|
398 |
+
// 'wpuxss-eml-tags-box-script',
|
399 |
+
// '/wp-admin/js/tags-box.js',
|
400 |
+
// array(),
|
401 |
+
// $wpuxss_eml_version,
|
402 |
+
// true
|
403 |
+
// );
|
404 |
+
|
405 |
+
|
406 |
+
wp_localize_script(
|
407 |
+
'wpuxss-eml-media-models-script',
|
408 |
'wpuxss_eml_attachments_edit_nonce',
|
409 |
wp_create_nonce( 'eml-attachments-edit-nonce' )
|
410 |
);
|
411 |
+
|
412 |
$media_views_l10n = array(
|
413 |
'taxonomies' => $taxonomies_array,
|
414 |
'compat_taxonomies' => $compat_taxonomies,
|
421 |
'in' => __( 'All ', 'eml' ),
|
422 |
'not_in' => __( 'Not in ', 'eml' ),
|
423 |
'reset_filters' => __( 'Reset All Filters', 'eml' )
|
424 |
+
);
|
425 |
+
|
426 |
+
wp_localize_script(
|
427 |
+
'wpuxss-eml-media-views-script',
|
428 |
'wpuxss_eml_media_views_l10n',
|
429 |
$media_views_l10n
|
430 |
+
);
|
431 |
+
|
432 |
+
$media_editor_l10n = array(
|
433 |
+
'all_taxonomies' => $all_taxonomies_array,
|
434 |
+
'uploaded_to' => __( 'Uploaded to post #', 'eml' )
|
435 |
+
);
|
436 |
+
|
437 |
+
wp_localize_script(
|
438 |
+
'wpuxss-eml-media-editor-script',
|
439 |
+
'wpuxss_eml_media_editor_l10n',
|
440 |
+
$media_editor_l10n
|
441 |
+
);
|
442 |
+
|
443 |
+
// scripts for grid view :: /wp-admin/upload.php
|
444 |
+
if ( isset( $current_screen ) && 'upload' === $current_screen->base && 'grid' === $media_library_mode ) {
|
445 |
+
|
446 |
wp_enqueue_script(
|
447 |
'wpuxss-eml-media-grid-script',
|
448 |
$wpuxss_eml_dir . 'js/eml-media-grid.js',
|
451 |
true
|
452 |
);
|
453 |
}
|
454 |
+
|
455 |
// scripts for Appearance -> Header
|
456 |
if ( isset( $current_screen ) && 'appearance_page_custom-header' === $current_screen->base ) {
|
457 |
+
|
458 |
wp_enqueue_script(
|
459 |
'wpuxss-eml-custom-header-script',
|
460 |
$wpuxss_eml_dir . 'js/eml-custom-header.js',
|
463 |
true
|
464 |
);
|
465 |
}
|
466 |
+
|
467 |
// scripts for Appearance -> Background
|
468 |
if ( isset( $current_screen ) && 'appearance_page_custom-background' === $current_screen->base ) {
|
469 |
+
|
470 |
wp_enqueue_script(
|
471 |
'wpuxss-eml-custom-background-script',
|
472 |
$wpuxss_eml_dir . 'js/eml-custom-background.js',
|
475 |
true
|
476 |
);
|
477 |
}
|
478 |
+
|
479 |
+
|
480 |
// scripts for /wp-admin/customize.php
|
481 |
+
if ( isset( $current_screen ) && 'customize' === $current_screen->base ) {
|
482 |
+
|
483 |
wp_enqueue_script(
|
484 |
'wpuxss-eml-customize-controls-script',
|
485 |
$wpuxss_eml_dir . 'js/eml-customize-controls.js',
|
493 |
|
494 |
|
495 |
|
|
|
|
|
496 |
/**
|
497 |
* wpuxss_eml_on_activation_update
|
498 |
*
|
499 |
+
* It is performed during activation or update
|
500 |
+
*
|
501 |
* @since 2.0.4
|
502 |
* @created 30/01/15
|
503 |
*/
|
504 |
|
505 |
if ( ! function_exists( 'wpuxss_eml_on_activation_update' ) ) {
|
506 |
+
|
507 |
function wpuxss_eml_on_activation_update() {
|
508 |
+
|
509 |
global $wpuxss_eml_version;
|
|
|
|
|
510 |
|
511 |
+
$wpuxss_eml_old_version = get_option('wpuxss_eml_version', false);
|
512 |
+
|
513 |
+
if ( version_compare( $wpuxss_eml_version, $wpuxss_eml_old_version, '<>' ) ) {
|
514 |
+
|
515 |
update_option('wpuxss_eml_version', $wpuxss_eml_version );
|
516 |
|
517 |
+
if ( empty($wpuxss_eml_old_version) ) {
|
518 |
+
|
519 |
$wpuxss_eml_taxonomies['media_category'] = array(
|
520 |
'assigned' => 1,
|
521 |
'eml_media' => 1,
|
522 |
'public' => 1,
|
523 |
+
|
524 |
'labels' => array(
|
525 |
'name' => 'Media Categories',
|
526 |
'singular_name' => 'Media Category',
|
535 |
'parent_item_colon' => 'Parent Media Category:',
|
536 |
'search_items' => 'Search Media Categories'
|
537 |
),
|
538 |
+
|
539 |
'hierarchical' => 1,
|
540 |
+
|
541 |
'show_admin_column' => 1,
|
542 |
'admin_filter' => 1, // list view filter
|
543 |
'media_uploader_filter' => 1, // grid view filter
|
544 |
'media_popup_taxonomy_edit' => 1,
|
545 |
+
|
546 |
'show_in_nav_menus' => 1,
|
547 |
'sort' => 0,
|
548 |
+
'rewrite' => array(
|
549 |
+
'slug' => 'media_category',
|
550 |
+
'with_front' => 1
|
551 |
+
)
|
552 |
);
|
553 |
+
|
554 |
$wpuxss_eml_tax_options = array(
|
555 |
'tax_archives' => 1,
|
556 |
'edit_all_as_hierarchical' => 0,
|
557 |
'force_filters' => 0
|
558 |
);
|
559 |
+
|
560 |
$allowed_mimes = get_allowed_mime_types();
|
561 |
+
|
562 |
+
foreach ( wp_get_mime_types() as $type => $mime ) {
|
563 |
+
|
564 |
$wpuxss_eml_mimes[$type] = array(
|
565 |
'mime' => $mime,
|
566 |
'singular' => $mime,
|
569 |
'upload' => isset($allowed_mimes[$type]) ? 1 : 0
|
570 |
);
|
571 |
}
|
572 |
+
|
573 |
+
// backup mimes without PDF
|
574 |
+
update_option( 'wpuxss_eml_mimes_backup', $wpuxss_eml_mimes );
|
575 |
+
|
576 |
$wpuxss_eml_mimes['pdf']['singular'] = 'PDF';
|
577 |
$wpuxss_eml_mimes['pdf']['plural'] = 'PDFs';
|
578 |
$wpuxss_eml_mimes['pdf']['filter'] = 1;
|
579 |
+
|
580 |
update_option( 'wpuxss_eml_taxonomies', $wpuxss_eml_taxonomies );
|
581 |
update_option( 'wpuxss_eml_tax_options', $wpuxss_eml_tax_options );
|
582 |
+
|
583 |
update_option( 'wpuxss_eml_mimes', $wpuxss_eml_mimes );
|
584 |
+
|
585 |
+
|
586 |
return;
|
587 |
+
} // endif :: old version absent
|
588 |
+
|
589 |
+
if ( version_compare( $wpuxss_eml_old_version, '2.0.2', '<' ) ) {
|
590 |
+
|
591 |
$wpuxss_eml_taxonomies = get_option('wpuxss_eml_taxonomies');
|
592 |
+
|
593 |
+
foreach( (array) $wpuxss_eml_taxonomies as $taxonomy => $params ) {
|
594 |
+
|
595 |
+
if ( $params['eml_media'] )
|
|
|
596 |
$wpuxss_eml_taxonomies[$taxonomy]['rewrite']['with_front'] = 1;
|
|
|
597 |
}
|
598 |
+
|
599 |
update_option( 'wpuxss_eml_taxonomies', $wpuxss_eml_taxonomies );
|
600 |
}
|
601 |
+
|
602 |
+
if ( version_compare( $wpuxss_eml_old_version, '2.0.4', '<' ) ) {
|
603 |
+
|
604 |
$wpuxss_eml_taxonomies = get_option('wpuxss_eml_taxonomies');
|
605 |
+
|
606 |
+
foreach( (array) $wpuxss_eml_taxonomies as $taxonomy => $params ) {
|
|
|
607 |
$wpuxss_eml_taxonomies[$taxonomy]['media_popup_taxonomy_edit'] = 1;
|
608 |
}
|
609 |
+
|
610 |
$wpuxss_eml_tax_options = array(
|
611 |
'tax_archives' => 1,
|
612 |
'edit_all_as_hierarchical' => 0,
|
613 |
'force_filters' => 0
|
614 |
);
|
615 |
+
|
616 |
update_option( 'wpuxss_eml_taxonomies', $wpuxss_eml_taxonomies );
|
617 |
update_option( 'wpuxss_eml_tax_options', $wpuxss_eml_tax_options );
|
618 |
}
|
619 |
+
} // endif :: new and old versions are not the same
|
620 |
}
|
621 |
}
|
622 |
|
js/eml-media-editor.js
ADDED
@@ -0,0 +1,269 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
window.wp = window.wp || {};
|
2 |
+
window.eml = window.eml || { l10n: {} };
|
3 |
+
|
4 |
+
( function( $, _ ) {
|
5 |
+
|
6 |
+
var media = wp.media,
|
7 |
+
l10n = media.view.l10n,
|
8 |
+
original = {},
|
9 |
+
gallery = wp.mce.views.get('gallery');
|
10 |
+
|
11 |
+
|
12 |
+
|
13 |
+
_.extend( eml.l10n, wpuxss_eml_media_editor_l10n );
|
14 |
+
|
15 |
+
|
16 |
+
|
17 |
+
/**
|
18 |
+
* wp.media.gallery
|
19 |
+
*
|
20 |
+
*/
|
21 |
+
_.extend( media.gallery.defaults, {
|
22 |
+
orderby : 'menuOrder'
|
23 |
+
});
|
24 |
+
|
25 |
+
delete media.gallery.defaults.id;
|
26 |
+
|
27 |
+
_.extend( media.gallery, {
|
28 |
+
|
29 |
+
collections: {},
|
30 |
+
|
31 |
+
attachments: function( shortcode ) {
|
32 |
+
|
33 |
+
var collections = this.collections,
|
34 |
+
shortcodeString = shortcode.string(),
|
35 |
+
result = collections[ shortcodeString ],
|
36 |
+
attrs, args, query, others, self = this,
|
37 |
+
isFilterBased = emlIsGalleryFilterBased( shortcode.attrs.named );
|
38 |
+
|
39 |
+
|
40 |
+
delete collections[ shortcodeString ];
|
41 |
+
|
42 |
+
|
43 |
+
if ( result && ! isFilterBased ) {
|
44 |
+
return result;
|
45 |
+
}
|
46 |
+
|
47 |
+
// Fill the default shortcode attributes.
|
48 |
+
attrs = _.defaults( shortcode.attrs.named, this.defaults );
|
49 |
+
args = _.pick( attrs, 'orderby', 'order' );
|
50 |
+
|
51 |
+
args.type = this.type;
|
52 |
+
args.perPage = -1;
|
53 |
+
|
54 |
+
|
55 |
+
if ( 'rand' === attrs.orderby ) {
|
56 |
+
attrs._orderbyRandom = true;
|
57 |
+
}
|
58 |
+
|
59 |
+
if ( 'post_date' === attrs.orderby ) {
|
60 |
+
args.orderby = 'date';
|
61 |
+
}
|
62 |
+
|
63 |
+
// Map the `orderby` attribute to the corresponding model property.
|
64 |
+
if ( ! attrs.orderby || /^menu_order(?: ID)?$/i.test( attrs.orderby ) ) {
|
65 |
+
args.orderby = 'menuOrder';
|
66 |
+
}
|
67 |
+
|
68 |
+
if ( 'menuOrder' === args.orderby ) {
|
69 |
+
args.order = 'ASC';
|
70 |
+
}
|
71 |
+
|
72 |
+
if ( undefined === attrs.id && ! isFilterBased ) {
|
73 |
+
attrs.id = media.view.settings.post && media.view.settings.post.id;
|
74 |
+
}
|
75 |
+
|
76 |
+
if ( isFilterBased ) {
|
77 |
+
|
78 |
+
if ( undefined !== attrs.id ) {
|
79 |
+
args.uploadedTo = attrs.id;
|
80 |
+
}
|
81 |
+
|
82 |
+
_.each( eml.l10n.all_taxonomies, function( terms, taxonomy ) {
|
83 |
+
|
84 |
+
if ( attrs[taxonomy] ) {
|
85 |
+
|
86 |
+
if ( _.isArray( attrs[taxonomy] ) ) {
|
87 |
+
args[taxonomy] = attrs[taxonomy];
|
88 |
+
}
|
89 |
+
else {
|
90 |
+
args[taxonomy] = attrs[taxonomy].split(',');
|
91 |
+
}
|
92 |
+
}
|
93 |
+
});
|
94 |
+
|
95 |
+
if ( attrs.monthnum && attrs.year ) {
|
96 |
+
args.monthnum = attrs.monthnum;
|
97 |
+
args.year = attrs.year;
|
98 |
+
}
|
99 |
+
}
|
100 |
+
else {
|
101 |
+
|
102 |
+
if ( attrs.ids ) {
|
103 |
+
|
104 |
+
args.post__in = attrs.ids.split(',');
|
105 |
+
|
106 |
+
if ( 'menuOrder' === args.orderby ) {
|
107 |
+
args.orderby = 'post__in';
|
108 |
+
}
|
109 |
+
}
|
110 |
+
else if ( attrs.include ) {
|
111 |
+
args.post__in = attrs.include.split(',');
|
112 |
+
}
|
113 |
+
|
114 |
+
if ( attrs.exclude ) {
|
115 |
+
args.post__not_in = attrs.exclude.split(',');
|
116 |
+
}
|
117 |
+
|
118 |
+
if ( ! args.post__in ) {
|
119 |
+
args.uploadedTo = attrs.id;
|
120 |
+
}
|
121 |
+
}
|
122 |
+
|
123 |
+
|
124 |
+
// Collect the attributes that were not included in `args`.
|
125 |
+
others = _.omit( attrs, 'id', 'ids', 'include', 'exclude' );
|
126 |
+
|
127 |
+
_.each( this.defaults, function( value, key ) {
|
128 |
+
others[ key ] = self.coerce( others, key );
|
129 |
+
});
|
130 |
+
|
131 |
+
query = wp.media.query( args );
|
132 |
+
query[ this.tag ] = new Backbone.Model( others );
|
133 |
+
|
134 |
+
return query;
|
135 |
+
},
|
136 |
+
|
137 |
+
shortcode: function( attachments ) {
|
138 |
+
|
139 |
+
var collections = this.collections,
|
140 |
+
props = attachments.props.toJSON(),
|
141 |
+
attrs = _.pick( props, 'orderby', 'order' ),
|
142 |
+
shortcode, clone,
|
143 |
+
isFilterBased = emlIsGalleryFilterBased( props );
|
144 |
+
|
145 |
+
|
146 |
+
if ( attachments.type ) {
|
147 |
+
attrs.type = attachments.type;
|
148 |
+
delete attachments.type;
|
149 |
+
}
|
150 |
+
|
151 |
+
if ( attachments[this.tag] ) {
|
152 |
+
_.extend( attrs, attachments[this.tag].toJSON() );
|
153 |
+
}
|
154 |
+
|
155 |
+
if ( ! isFilterBased || 'menuOrder' === attrs.orderby ) {
|
156 |
+
// Convert all gallery shortcodes to use the `ids` property.
|
157 |
+
// Ignore `post__in` and `post__not_in`; the attachments in
|
158 |
+
// the collection will already reflect those properties.
|
159 |
+
attrs.ids = attachments.pluck('id');
|
160 |
+
}
|
161 |
+
|
162 |
+
// Copy the `uploadedTo` post ID.
|
163 |
+
if ( undefined !== props.uploadedTo && null !== props.uploadedTo ) {
|
164 |
+
attrs.id = props.uploadedTo;
|
165 |
+
}
|
166 |
+
|
167 |
+
if ( undefined !== attrs._orderbyRandom ) {
|
168 |
+
|
169 |
+
if ( attrs._orderbyRandom ) {
|
170 |
+
attrs.orderby = 'rand';
|
171 |
+
} else {
|
172 |
+
delete attrs.orderby;
|
173 |
+
}
|
174 |
+
delete attrs._orderbyRandom;
|
175 |
+
}
|
176 |
+
|
177 |
+
|
178 |
+
_.each( eml.l10n.all_taxonomies, function( terms, taxonomy ) {
|
179 |
+
|
180 |
+
if ( props[taxonomy] ) {
|
181 |
+
attrs[taxonomy] = props[taxonomy];
|
182 |
+
}
|
183 |
+
});
|
184 |
+
|
185 |
+
|
186 |
+
if ( props.monthnum && props.year ) {
|
187 |
+
attrs.monthnum = props.monthnum;
|
188 |
+
attrs.year = props.year;
|
189 |
+
}
|
190 |
+
|
191 |
+
if ( 'rand' === attrs.orderby || 'menuOrder' === attrs.orderby ) {
|
192 |
+
delete attrs.order;
|
193 |
+
}
|
194 |
+
|
195 |
+
attrs = this.setDefaults( attrs );
|
196 |
+
|
197 |
+
|
198 |
+
shortcode = new wp.shortcode({
|
199 |
+
tag: this.tag,
|
200 |
+
attrs: attrs,
|
201 |
+
type: 'single'
|
202 |
+
});
|
203 |
+
|
204 |
+
// Use a cloned version of the gallery.
|
205 |
+
clone = new wp.media.model.Attachments( attachments.models, {
|
206 |
+
props: props
|
207 |
+
});
|
208 |
+
clone[ this.tag ] = attachments[ this.tag ];
|
209 |
+
collections[ shortcode.string() ] = clone;
|
210 |
+
|
211 |
+
return shortcode;
|
212 |
+
},
|
213 |
+
|
214 |
+
edit: function( content ) {
|
215 |
+
|
216 |
+
var shortcode = wp.shortcode.next( this.tag, content ),
|
217 |
+
attachments, selection, state;
|
218 |
+
|
219 |
+
// Bail if we didn't match the shortcode or all of the content.
|
220 |
+
if ( ! shortcode || shortcode.content !== content ) {
|
221 |
+
return;
|
222 |
+
}
|
223 |
+
|
224 |
+
// Ignore the rest of the match object.
|
225 |
+
shortcode = shortcode.shortcode;
|
226 |
+
|
227 |
+
attachments = this.attachments( shortcode );
|
228 |
+
|
229 |
+
selection = new wp.media.model.Selection( attachments.models, {
|
230 |
+
props: attachments.props.toJSON(),
|
231 |
+
multiple: true
|
232 |
+
});
|
233 |
+
|
234 |
+
selection[ this.tag ] = attachments[ this.tag ];
|
235 |
+
|
236 |
+
// Fetch the query's attachments, and then break ties from the
|
237 |
+
// query to allow for sorting.
|
238 |
+
selection.more().done( function() {
|
239 |
+
// Break ties with the query.
|
240 |
+
selection.props.set({ query: false });
|
241 |
+
selection.unmirror();
|
242 |
+
});
|
243 |
+
|
244 |
+
// Destroy the previous gallery frame.
|
245 |
+
if ( this.frame ) {
|
246 |
+
this.frame.dispose();
|
247 |
+
}
|
248 |
+
|
249 |
+
if ( shortcode.attrs.named.type && 'video' === shortcode.attrs.named.type ) {
|
250 |
+
state = 'video-' + this.tag + '-edit';
|
251 |
+
} else {
|
252 |
+
state = this.tag + '-edit';
|
253 |
+
}
|
254 |
+
|
255 |
+
// Store the current frame.
|
256 |
+
this.frame = wp.media({
|
257 |
+
frame: 'post',
|
258 |
+
state: state,
|
259 |
+
title: this.editTitle,
|
260 |
+
editing: true,
|
261 |
+
multiple: true,
|
262 |
+
selection: selection
|
263 |
+
}).open();
|
264 |
+
|
265 |
+
return this.frame;
|
266 |
+
}
|
267 |
+
});
|
268 |
+
|
269 |
+
})( jQuery, _ );
|
js/eml-media-models.js
CHANGED
@@ -1,18 +1,17 @@
|
|
1 |
window.wp = window.wp || {};
|
2 |
|
3 |
( function( $, _ ) {
|
4 |
-
|
5 |
var media = wp.media,
|
6 |
Attachments = media.model.Attachments,
|
7 |
Query = media.model.Query;
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
_.extend( Query.prototype, {
|
13 |
-
|
14 |
initialize: function( models, options ) {
|
15 |
-
|
16 |
var allowed;
|
17 |
|
18 |
options = options || {};
|
@@ -64,23 +63,27 @@ window.wp = window.wp || {};
|
|
64 |
}
|
65 |
}
|
66 |
});
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
|
|
|
|
|
|
|
|
71 |
_.extend( Query, {
|
72 |
-
|
73 |
queries: [],
|
74 |
-
|
75 |
cleanQueries: function(){
|
76 |
-
|
77 |
this.queries = [];
|
78 |
},
|
79 |
-
|
80 |
get: (function(){
|
81 |
|
82 |
return function( props, options ) {
|
83 |
-
|
84 |
var args = {},
|
85 |
orderby = Query.orderby,
|
86 |
defaults = Query.defaultProps,
|
@@ -120,7 +123,7 @@ window.wp = window.wp || {};
|
|
120 |
// `props.orderby` does not always map directly to `args.orderby`.
|
121 |
// Substitute exceptions specified in orderby.keymap.
|
122 |
args.orderby = orderby.valuemap[ props.orderby ] || props.orderby;
|
123 |
-
|
124 |
// Search the query cache for matches.
|
125 |
if ( cache ) {
|
126 |
query = _.find( this.queries, function( query ) {
|
@@ -143,7 +146,5 @@ window.wp = window.wp || {};
|
|
143 |
};
|
144 |
}())
|
145 |
});
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
})( jQuery, _ );
|
1 |
window.wp = window.wp || {};
|
2 |
|
3 |
( function( $, _ ) {
|
4 |
+
|
5 |
var media = wp.media,
|
6 |
Attachments = media.model.Attachments,
|
7 |
Query = media.model.Query;
|
8 |
+
|
9 |
+
|
10 |
+
|
|
|
11 |
_.extend( Query.prototype, {
|
12 |
+
|
13 |
initialize: function( models, options ) {
|
14 |
+
|
15 |
var allowed;
|
16 |
|
17 |
options = options || {};
|
63 |
}
|
64 |
}
|
65 |
});
|
66 |
+
|
67 |
+
|
68 |
+
|
69 |
+
// add 'rand' to allowed
|
70 |
+
_.extend( Query.orderby.allowed, [ 'name', 'author', 'date', 'title', 'rand', 'modified', 'uploadedTo', 'id', 'post__in', 'menuOrder' ] );
|
71 |
+
|
72 |
+
|
73 |
+
|
74 |
_.extend( Query, {
|
75 |
+
|
76 |
queries: [],
|
77 |
+
|
78 |
cleanQueries: function(){
|
79 |
+
|
80 |
this.queries = [];
|
81 |
},
|
82 |
+
|
83 |
get: (function(){
|
84 |
|
85 |
return function( props, options ) {
|
86 |
+
|
87 |
var args = {},
|
88 |
orderby = Query.orderby,
|
89 |
defaults = Query.defaultProps,
|
123 |
// `props.orderby` does not always map directly to `args.orderby`.
|
124 |
// Substitute exceptions specified in orderby.keymap.
|
125 |
args.orderby = orderby.valuemap[ props.orderby ] || props.orderby;
|
126 |
+
|
127 |
// Search the query cache for matches.
|
128 |
if ( cache ) {
|
129 |
query = _.find( this.queries, function( query ) {
|
146 |
};
|
147 |
}())
|
148 |
});
|
149 |
+
|
150 |
+
})( jQuery, _ );
|
|
|
|
js/eml-media-views.js
CHANGED
@@ -1,125 +1,153 @@
|
|
1 |
window.wp = window.wp || {};
|
2 |
-
window.eml = { l10n: {} };
|
|
|
3 |
|
4 |
( function( $, _ ) {
|
5 |
-
|
6 |
var media = wp.media,
|
7 |
l10n = media.view.l10n,
|
8 |
original = {};
|
9 |
-
|
10 |
-
|
11 |
|
12 |
-
|
|
|
13 |
_.extend( eml.l10n, wpuxss_eml_media_views_l10n );
|
14 |
|
15 |
|
16 |
|
17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
/**
|
19 |
-
* media.controller.Library
|
20 |
*
|
21 |
*/
|
22 |
-
_.extend( media.controller.Library.prototype, {
|
23 |
-
|
24 |
-
uploading: function( attachment ) {
|
25 |
-
|
26 |
var dateFilter, Filters, taxFilter,
|
27 |
content = this.frame.content,
|
28 |
selection = this.get('selection'),
|
29 |
library = this.get('library');
|
30 |
-
|
31 |
-
|
32 |
if ( 'upload' === content.mode() ) {
|
33 |
this.frame.content.mode('browse');
|
34 |
}
|
35 |
-
|
36 |
if ( wp.Uploader.queue.length == 1 ) {
|
37 |
-
|
38 |
dateFilter = content.get().toolbar.get( 'dateFilter' );
|
39 |
Filters = content.get().toolbar.get( 'filters' );
|
40 |
-
|
41 |
if ( ! _.isUndefined(dateFilter) && 'all' !== dateFilter.$el.val() ) {
|
42 |
dateFilter.$el.val( 'all' ).change();
|
43 |
}
|
44 |
-
|
45 |
if ( ! _.isUndefined(Filters) && 'all' !== Filters.$el.val() ) {
|
46 |
Filters.$el.val( 'all' ).change();
|
47 |
}
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
taxFilter = content.get().toolbar.get( taxonomy+'-filter' );
|
52 |
-
|
53 |
if ( ! _.isUndefined(taxFilter) && 'all' !== taxFilter.$el.val() ) {
|
54 |
taxFilter.$el.val( 'all' ).change();
|
55 |
}
|
56 |
});
|
57 |
}
|
58 |
-
|
59 |
-
if ( eml.l10n.wp_version < '4.0' || this.get( 'autoSelect' ) ) {
|
60 |
-
|
61 |
if ( wp.Uploader.queue.length == 1 && selection.length ) {
|
62 |
-
selection.reset();
|
63 |
}
|
64 |
selection.add( attachment );
|
65 |
selection.trigger( 'selection:unsingle', selection.model, selection );
|
66 |
selection.trigger( 'selection:single', selection.model, selection );
|
67 |
-
}
|
68 |
}
|
69 |
});
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
/**
|
75 |
-
* media.view.AttachmentCompat
|
76 |
*
|
77 |
*/
|
78 |
-
var
|
79 |
'click input' : 'preSave'
|
80 |
};
|
81 |
-
|
82 |
-
_.extend( media.view.AttachmentCompat.prototype.events,
|
83 |
-
|
84 |
_.extend( media.view.AttachmentCompat.prototype, {
|
85 |
-
|
86 |
preSave: function() {
|
87 |
-
|
88 |
this.noRender = true;
|
89 |
-
|
90 |
media.model.Query.cleanQueries();
|
91 |
},
|
92 |
-
|
93 |
render: function() {
|
94 |
-
|
95 |
var compat = this.model.get('compat'),
|
96 |
$compat_el = this.$el;
|
97 |
-
|
98 |
if ( ! compat || ! compat.item ) {
|
99 |
return;
|
100 |
}
|
101 |
-
|
102 |
if ( this.noRender ) {
|
103 |
return this;
|
104 |
}
|
105 |
-
|
106 |
this.views.detach();
|
107 |
this.$el.html( compat.item );
|
108 |
this.views.render();
|
109 |
-
|
110 |
-
|
111 |
// TODO: find a better solution
|
112 |
if ( this.controller.isModeActive( 'select' ) && 'edit-attachment' != this.controller.state().get('id') ) {
|
113 |
-
|
114 |
$.each( eml.l10n.compat_taxonomies_to_hide, function( id, taxonomy ) {
|
115 |
$compat_el.find( '.compat-field-'+taxonomy ).remove();
|
116 |
});
|
117 |
}
|
118 |
|
119 |
-
|
120 |
// TODO: find a better solution
|
121 |
$.each( eml.l10n.compat_taxonomies, function( id, taxonomy ) {
|
122 |
-
|
123 |
$compat_el.find( '.compat-field-'+taxonomy+' .label' ).addClass( 'eml-tax-label' );
|
124 |
$compat_el.find( '.compat-field-'+taxonomy+' .field' ).addClass( 'eml-tax-field' );
|
125 |
});
|
@@ -127,68 +155,70 @@ window.eml = { l10n: {} };
|
|
127 |
return this;
|
128 |
}
|
129 |
});
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
/**
|
135 |
-
* media.view.AttachmentFilters
|
136 |
-
|
|
|
137 |
_.extend( media.view.AttachmentFilters.prototype, {
|
138 |
-
|
139 |
change: function() {
|
140 |
-
|
141 |
var filter = this.filters[ this.el.value ],
|
142 |
selection = this.controller.state().get( 'selection' ),
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
if ( ! $mainFilter.prop( 'selectedIndex' ) &&
|
155 |
-
! $dateFilter.prop( 'selectedIndex' ) &&
|
156 |
-
! $taxFilters.filter( function() { return $(this).prop( 'selectedIndex' ) } ).get().length ) {
|
157 |
-
resetFilterButton.model.set( 'disabled', true )
|
158 |
-
} else {
|
159 |
-
resetFilterButton.model.set( 'disabled', false )
|
160 |
-
}
|
161 |
-
|
162 |
if ( filter ) {
|
163 |
this.model.set( filter.props );
|
164 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
165 |
}
|
166 |
});
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
|
171 |
/**
|
172 |
-
* media.view.AttachmentFilters.All
|
173 |
-
|
|
|
174 |
original.AttachmentFilters = {
|
175 |
-
|
176 |
All: {
|
177 |
createFilters: media.view.AttachmentFilters.All.prototype.createFilters
|
178 |
}
|
179 |
};
|
180 |
-
|
181 |
_.extend( media.view.AttachmentFilters.All.prototype, {
|
182 |
-
|
183 |
createFilters: function() {
|
184 |
-
|
185 |
original.AttachmentFilters.All.createFilters.apply( this, arguments );
|
186 |
-
|
187 |
-
_.each( this.filters, function( filter, key )
|
188 |
{
|
189 |
filter.props['uncategorized'] = null;
|
190 |
})
|
191 |
-
|
192 |
this.filters.uncategorized = {
|
193 |
text: eml.l10n.uncategorized,
|
194 |
props: {
|
@@ -202,167 +232,186 @@ window.eml = { l10n: {} };
|
|
202 |
priority: 60
|
203 |
};
|
204 |
},
|
205 |
-
|
206 |
change: function() {
|
207 |
-
|
208 |
var filter = this.filters[ this.el.value ],
|
209 |
-
|
210 |
-
|
|
|
211 |
media.view.AttachmentFilters.prototype.change.apply( this, arguments );
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
|
|
|
|
|
|
|
|
219 |
});
|
220 |
}
|
221 |
}
|
222 |
});
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
/**
|
228 |
-
* media.view.AttachmentFilters.Taxonomy
|
229 |
-
|
|
|
230 |
media.view.AttachmentFilters.Taxonomy = media.view.AttachmentFilters.extend({
|
231 |
-
|
232 |
id: function() {
|
233 |
-
|
234 |
return 'media-attachment-'+this.options.taxonomy+'-filters';
|
235 |
},
|
236 |
-
|
237 |
className: function() {
|
238 |
-
|
239 |
// TODO: get rid of excess class name that duplicates id
|
240 |
return 'attachment-filters eml-attachment-filters attachment-'+this.options.taxonomy+'-filter';
|
241 |
},
|
242 |
-
|
243 |
createFilters: function() {
|
244 |
-
|
245 |
var filters = {},
|
246 |
self = this;
|
247 |
-
|
248 |
_.each( self.options.termList || {}, function( term, key ) {
|
249 |
-
|
250 |
var term_id = term['term_id'],
|
251 |
term_name = $("<div/>").html(term['term_name']).text();
|
252 |
-
|
253 |
filters[ term_id ] = {
|
254 |
text: term_name,
|
255 |
-
props: {
|
|
|
|
|
|
|
|
|
256 |
priority: key+4
|
257 |
};
|
258 |
-
|
259 |
filters[term_id]['props'][self.options.taxonomy] = term_id;
|
260 |
-
|
261 |
-
// TODO: for future sorting inside a ctegory
|
262 |
-
// filters[term_id]['props']['orderby'] = 'menuOrder';
|
263 |
-
// filters[term_id]['props']['order'] = 'ASC';
|
264 |
});
|
265 |
-
|
266 |
filters.all = {
|
267 |
text: eml.l10n.filter_by + self.options.singularName,
|
268 |
-
props: {
|
|
|
|
|
|
|
|
|
269 |
priority: 1
|
270 |
};
|
271 |
-
|
272 |
filters['all']['props'][self.options.taxonomy] = null;
|
273 |
-
|
274 |
-
// TODO: for future sorting inside a ctegory
|
275 |
-
// filters['all']['props']['orderby'] = 'menuOrder';
|
276 |
-
// filters['all']['props']['order'] = 'ASC';
|
277 |
-
|
278 |
filters.in = {
|
279 |
-
text: '
|
280 |
-
props: {
|
|
|
|
|
|
|
|
|
281 |
priority: 2
|
282 |
};
|
283 |
-
|
284 |
filters['in']['props'][self.options.taxonomy] = 'in';
|
285 |
-
|
286 |
filters.not_in = {
|
287 |
-
text: '
|
288 |
-
props: {
|
|
|
|
|
|
|
|
|
289 |
priority: 3
|
290 |
};
|
291 |
-
|
292 |
filters['not_in']['props'][self.options.taxonomy] = 'not_in';
|
293 |
-
|
294 |
this.filters = filters;
|
295 |
},
|
296 |
-
|
297 |
change: function() {
|
298 |
-
|
299 |
-
var
|
300 |
-
|
301 |
-
|
|
|
302 |
media.view.AttachmentFilters.prototype.change.apply( this, arguments );
|
303 |
-
|
304 |
-
if ( filter && 1 != filter.priority && 'uncategorized' ==
|
305 |
-
|
306 |
}
|
307 |
}
|
308 |
});
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
media.view.Button.resetFilters = media.view.Button.extend({
|
313 |
-
|
314 |
id: 'reset-all-filters',
|
315 |
|
316 |
click: function( event ) {
|
317 |
-
|
318 |
if ( '#' === this.attributes.href ) {
|
319 |
event.preventDefault();
|
320 |
}
|
321 |
-
|
322 |
$.each( $('select.attachment-filters'), function() {
|
323 |
if ( this.value != 'all' )
|
324 |
$(this).val( 'all' ).change();
|
325 |
});
|
326 |
}
|
327 |
});
|
328 |
-
|
329 |
-
|
330 |
-
|
|
|
|
|
|
|
|
|
331 |
original.AttachmentsBrowser = {
|
332 |
-
|
333 |
initialize: media.view.AttachmentsBrowser.prototype.initialize,
|
334 |
-
createToolbar: media.view.AttachmentsBrowser.prototype.createToolbar
|
|
|
335 |
};
|
336 |
-
|
337 |
_.extend( media.view.AttachmentsBrowser.prototype, {
|
338 |
-
|
339 |
initialize: function() {
|
340 |
-
|
341 |
original.AttachmentsBrowser.initialize.apply( this, arguments );
|
342 |
-
|
343 |
this.on( 'ready', this.fixLayout, this );
|
344 |
-
|
345 |
$( window ).on( 'resize', _.debounce( _.bind( this.fixLayout, this ), 15 ) );
|
346 |
-
|
347 |
// ACF compatibility
|
348 |
$( document ).on( 'click', '.acf-expand-details', _.debounce( _.bind( this.fixLayout, this ), 250 ) );
|
349 |
},
|
350 |
-
|
351 |
fixLayout: function() {
|
352 |
-
|
353 |
var $browser = this.$el,
|
354 |
$attachments = $browser.find('.attachments'),
|
355 |
$uploader = $browser.find('.uploader-inline'),
|
356 |
$toolbar = $browser.find('.media-toolbar'),
|
357 |
$messages = $('.eml-media-css .updated:visible, .eml-media-css .error:visible');
|
358 |
-
|
359 |
-
|
360 |
if ( eml.l10n.wp_version < '4.0' ) {
|
361 |
-
|
362 |
-
if ( 'absolute' == $attachments.css( 'position' ) &&
|
363 |
-
$browser.height() > $toolbar.height() + 20 ) {
|
364 |
-
|
365 |
-
$attachments.css( 'top', $toolbar.height() + 20 + 'px' );
|
366 |
$uploader.css( 'top', $toolbar.height() + 20 + 'px' );
|
367 |
}
|
368 |
else if ( 'absolute' == $attachments.css( 'position' ) ) {
|
@@ -373,57 +422,70 @@ window.eml = { l10n: {} };
|
|
373 |
$attachments.css( 'top', '0' );
|
374 |
$uploader.css( 'top', '0' );
|
375 |
}
|
376 |
-
|
377 |
// TODO: find a better place for it, something like fixLayoutOnce
|
378 |
$toolbar.find('.media-toolbar-secondary').prepend( $toolbar.find('.instructions') );
|
379 |
-
|
380 |
return;
|
381 |
}
|
382 |
-
|
383 |
-
|
384 |
-
if ( ! this.controller.isModeActive( 'select' ) &&
|
385 |
! this.controller.isModeActive( 'eml-grid' ) ) {
|
386 |
return;
|
387 |
}
|
388 |
-
|
389 |
if ( this.controller.isModeActive( 'select' ) ) {
|
390 |
-
|
391 |
-
$attachments.css( 'top', $toolbar.height() + 10 + 'px' );
|
392 |
$uploader.css( 'top', $toolbar.height() + 10 + 'px' );
|
393 |
$browser.find('.eml-loader').css( 'top', $toolbar.height() + 10 + 'px' );
|
394 |
-
|
395 |
// TODO: find a better place for it, something like fixLayoutOnce
|
396 |
$toolbar.find('.media-toolbar-secondary').prepend( $toolbar.find('.instructions') );
|
397 |
}
|
398 |
-
|
399 |
-
if ( this.controller.isModeActive( 'eml-grid' ) )
|
400 |
{
|
401 |
var messagesOuterHeight = 0;
|
402 |
-
|
403 |
-
if ( ! _.isUndefined( $messages ) )
|
404 |
{
|
405 |
$messages.each( function() {
|
406 |
messagesOuterHeight += $(this).outerHeight( true );
|
407 |
});
|
408 |
-
|
409 |
messagesOuterHeight = messagesOuterHeight ? messagesOuterHeight - 20 : 0;
|
410 |
-
}
|
411 |
-
|
412 |
$browser.css( 'top', $toolbar.outerHeight() + messagesOuterHeight + 20 + 'px' );
|
413 |
$toolbar.css( 'top', - $toolbar.outerHeight() - 30 + 'px' );
|
414 |
}
|
415 |
},
|
416 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
417 |
createToolbar: function() {
|
418 |
-
|
419 |
var filters = this.options.filters,
|
420 |
self = this,
|
421 |
i = 1;
|
422 |
-
|
|
|
423 |
original.AttachmentsBrowser.createToolbar.apply( this, arguments );
|
424 |
-
|
425 |
-
|
426 |
-
|
|
|
|
|
|
|
427 |
this.toolbar.set( 'filtersLabel', new media.view.Label({
|
428 |
value: l10n.filterByType,
|
429 |
attributes: {
|
@@ -447,8 +509,8 @@ window.eml = { l10n: {} };
|
|
447 |
|
448 |
this.toolbar.set( 'filters', Filters.render() );
|
449 |
}
|
450 |
-
|
451 |
-
if ( eml.l10n.wp_version >= '4.0' )
|
452 |
{
|
453 |
this.toolbar.set( 'dateFilterLabel', new media.view.Label({
|
454 |
value: l10n.filterByDate,
|
@@ -464,10 +526,11 @@ window.eml = { l10n: {} };
|
|
464 |
}).render() );
|
465 |
}
|
466 |
|
|
|
467 |
$.each( eml.l10n.taxonomies, function( taxonomy, values ) {
|
468 |
-
|
469 |
if ( values.term_list ) {
|
470 |
-
|
471 |
self.toolbar.set( taxonomy+'FilterLabel', new media.view.Label({
|
472 |
value: eml.l10n.filter_by + values.singular_name,
|
473 |
attributes: {
|
@@ -479,33 +542,39 @@ window.eml = { l10n: {} };
|
|
479 |
controller: self.controller,
|
480 |
model: self.collection.props,
|
481 |
priority: -70 + i++,
|
482 |
-
taxonomy: taxonomy,
|
483 |
termList: values.term_list,
|
484 |
singularName: values.singular_name,
|
485 |
pluralName: values.plural_name
|
486 |
}).render() );
|
487 |
}
|
488 |
});
|
489 |
-
|
|
|
490 |
this.toolbar.set( 'resetFilterButton', new media.view.Button.resetFilters({
|
491 |
controller: this.controller,
|
492 |
text: eml.l10n.reset_filters,
|
493 |
disabled: true,
|
494 |
priority: -70 + i
|
495 |
}).render() );
|
496 |
-
|
|
|
497 |
}
|
498 |
});
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
|
|
|
|
|
|
504 |
if ( _.isUndefined( media.view.DateFilter ) ) {
|
|
|
505 |
media.view.DateFilter = media.view.AttachmentFilters.extend({
|
506 |
-
|
507 |
id: 'media-attachment-date-filters',
|
508 |
-
|
509 |
createFilters: function() {
|
510 |
var filters = {};
|
511 |
_.each( media.view.settings.months || {}, function( value, index ) {
|
@@ -529,11 +598,135 @@ window.eml = { l10n: {} };
|
|
529 |
}
|
530 |
});
|
531 |
}
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
536 |
// TODO: move to the PHP side
|
537 |
$('body').addClass('eml-media-css');
|
538 |
|
539 |
-
})( jQuery, _ );
|
1 |
window.wp = window.wp || {};
|
2 |
+
window.eml = window.eml || { l10n: {} };
|
3 |
+
|
4 |
|
5 |
( function( $, _ ) {
|
6 |
+
|
7 |
var media = wp.media,
|
8 |
l10n = media.view.l10n,
|
9 |
original = {};
|
|
|
|
|
10 |
|
11 |
+
|
12 |
+
|
13 |
_.extend( eml.l10n, wpuxss_eml_media_views_l10n );
|
14 |
|
15 |
|
16 |
|
17 |
+
window.emlIsGalleryFilterBased = function( attrs ) {
|
18 |
+
|
19 |
+
var filterBasedFields;
|
20 |
+
|
21 |
+
if ( _.isUndefined( attrs ) ) {
|
22 |
+
return false;
|
23 |
+
}
|
24 |
+
|
25 |
+
// because of 0 (unattached) value
|
26 |
+
if ( ! _.isUndefined( attrs.uploadedTo ) ) {
|
27 |
+
return true;
|
28 |
+
}
|
29 |
+
|
30 |
+
if ( _.filter( _.pick( attrs, 'monthnum', 'year' ), _.identity ).length == 2 ) {
|
31 |
+
filterBasedFields = _.omit( attrs, 'type', 'orderby', 'order', 'query', 'perPage', 'post__in', 'include', 'exclude', 'id', 'ids', 'columns', 'itemtag', 'icontag', 'captiontag', 'link', 'size', '_orderByField', '_orderbyRandom' );
|
32 |
+
}
|
33 |
+
else {
|
34 |
+
filterBasedFields = _.omit( attrs, 'type', 'orderby', 'order', 'query', 'perPage', 'post__in', 'include', 'exclude', 'id', 'ids', 'columns', 'itemtag', 'icontag', 'captiontag', 'link', 'size', '_orderByField', '_orderbyRandom', 'monthnum', 'year' );
|
35 |
+
}
|
36 |
+
|
37 |
+
// if any of these is set: %taxonomy_name%, monthnum, year
|
38 |
+
if ( _.filter( _.values( filterBasedFields ), _.identity ).length ) {
|
39 |
+
return true;
|
40 |
+
}
|
41 |
+
|
42 |
+
return false;
|
43 |
+
};
|
44 |
+
|
45 |
+
|
46 |
+
|
47 |
/**
|
48 |
+
* wp.media.controller.Library
|
49 |
*
|
50 |
*/
|
51 |
+
_.extend( media.controller.Library.prototype, {
|
52 |
+
|
53 |
+
uploading: function( attachment ) {
|
54 |
+
|
55 |
var dateFilter, Filters, taxFilter,
|
56 |
content = this.frame.content,
|
57 |
selection = this.get('selection'),
|
58 |
library = this.get('library');
|
59 |
+
|
60 |
+
|
61 |
if ( 'upload' === content.mode() ) {
|
62 |
this.frame.content.mode('browse');
|
63 |
}
|
64 |
+
|
65 |
if ( wp.Uploader.queue.length == 1 ) {
|
66 |
+
|
67 |
dateFilter = content.get().toolbar.get( 'dateFilter' );
|
68 |
Filters = content.get().toolbar.get( 'filters' );
|
69 |
+
|
70 |
if ( ! _.isUndefined(dateFilter) && 'all' !== dateFilter.$el.val() ) {
|
71 |
dateFilter.$el.val( 'all' ).change();
|
72 |
}
|
73 |
+
|
74 |
if ( ! _.isUndefined(Filters) && 'all' !== Filters.$el.val() ) {
|
75 |
Filters.$el.val( 'all' ).change();
|
76 |
}
|
77 |
+
|
78 |
+
_.each( eml.l10n.taxonomies, function( values, taxonomy ) {
|
79 |
+
|
80 |
taxFilter = content.get().toolbar.get( taxonomy+'-filter' );
|
81 |
+
|
82 |
if ( ! _.isUndefined(taxFilter) && 'all' !== taxFilter.$el.val() ) {
|
83 |
taxFilter.$el.val( 'all' ).change();
|
84 |
}
|
85 |
});
|
86 |
}
|
87 |
+
|
88 |
+
if ( eml.l10n.wp_version < '4.0' || this.get( 'autoSelect' ) ) {
|
89 |
+
|
90 |
if ( wp.Uploader.queue.length == 1 && selection.length ) {
|
91 |
+
selection.reset();
|
92 |
}
|
93 |
selection.add( attachment );
|
94 |
selection.trigger( 'selection:unsingle', selection.model, selection );
|
95 |
selection.trigger( 'selection:single', selection.model, selection );
|
96 |
+
}
|
97 |
}
|
98 |
});
|
99 |
+
|
100 |
+
|
101 |
+
|
|
|
102 |
/**
|
103 |
+
* wp.media.view.AttachmentCompat
|
104 |
*
|
105 |
*/
|
106 |
+
var newAttachmentCompatEvents = {
|
107 |
'click input' : 'preSave'
|
108 |
};
|
109 |
+
|
110 |
+
_.extend( media.view.AttachmentCompat.prototype.events, newAttachmentCompatEvents );
|
111 |
+
|
112 |
_.extend( media.view.AttachmentCompat.prototype, {
|
113 |
+
|
114 |
preSave: function() {
|
115 |
+
|
116 |
this.noRender = true;
|
117 |
+
|
118 |
media.model.Query.cleanQueries();
|
119 |
},
|
120 |
+
|
121 |
render: function() {
|
122 |
+
|
123 |
var compat = this.model.get('compat'),
|
124 |
$compat_el = this.$el;
|
125 |
+
|
126 |
if ( ! compat || ! compat.item ) {
|
127 |
return;
|
128 |
}
|
129 |
+
|
130 |
if ( this.noRender ) {
|
131 |
return this;
|
132 |
}
|
133 |
+
|
134 |
this.views.detach();
|
135 |
this.$el.html( compat.item );
|
136 |
this.views.render();
|
137 |
+
|
138 |
+
|
139 |
// TODO: find a better solution
|
140 |
if ( this.controller.isModeActive( 'select' ) && 'edit-attachment' != this.controller.state().get('id') ) {
|
141 |
+
|
142 |
$.each( eml.l10n.compat_taxonomies_to_hide, function( id, taxonomy ) {
|
143 |
$compat_el.find( '.compat-field-'+taxonomy ).remove();
|
144 |
});
|
145 |
}
|
146 |
|
147 |
+
|
148 |
// TODO: find a better solution
|
149 |
$.each( eml.l10n.compat_taxonomies, function( id, taxonomy ) {
|
150 |
+
|
151 |
$compat_el.find( '.compat-field-'+taxonomy+' .label' ).addClass( 'eml-tax-label' );
|
152 |
$compat_el.find( '.compat-field-'+taxonomy+' .field' ).addClass( 'eml-tax-field' );
|
153 |
});
|
155 |
return this;
|
156 |
}
|
157 |
});
|
158 |
+
|
159 |
+
|
160 |
+
|
|
|
161 |
/**
|
162 |
+
* wp.media.view.AttachmentFilters
|
163 |
+
*
|
164 |
+
*/
|
165 |
_.extend( media.view.AttachmentFilters.prototype, {
|
166 |
+
|
167 |
change: function() {
|
168 |
+
|
169 |
var filter = this.filters[ this.el.value ],
|
170 |
selection = this.controller.state().get( 'selection' ),
|
171 |
+
resetFilterButton = this.controller.content.get().toolbar.get( 'resetFilterButton' ),
|
172 |
+
|
173 |
+
all = $('.attachment-filters').length,
|
174 |
+
unchanged = $('.attachment-filters').map(function(){
|
175 |
+
return this.value
|
176 |
+
}).get().filter( function( val ){
|
177 |
+
return 'all' === val
|
178 |
+
}).length;
|
179 |
+
|
180 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
181 |
if ( filter ) {
|
182 |
this.model.set( filter.props );
|
183 |
}
|
184 |
+
|
185 |
+
if ( filter && selection && selection.length && ! wp.Uploader.queue.length ) {
|
186 |
+
selection.reset();
|
187 |
+
}
|
188 |
+
|
189 |
+
if ( _.isUndefined( resetFilterButton ) ) {
|
190 |
+
return;
|
191 |
+
}
|
192 |
+
|
193 |
+
resetFilterButton.model.set( 'disabled', all === unchanged );
|
194 |
}
|
195 |
});
|
196 |
+
|
197 |
+
|
198 |
+
|
199 |
|
200 |
/**
|
201 |
+
* wp.media.view.AttachmentFilters.All
|
202 |
+
*
|
203 |
+
*/
|
204 |
original.AttachmentFilters = {
|
205 |
+
|
206 |
All: {
|
207 |
createFilters: media.view.AttachmentFilters.All.prototype.createFilters
|
208 |
}
|
209 |
};
|
210 |
+
|
211 |
_.extend( media.view.AttachmentFilters.All.prototype, {
|
212 |
+
|
213 |
createFilters: function() {
|
214 |
+
|
215 |
original.AttachmentFilters.All.createFilters.apply( this, arguments );
|
216 |
+
|
217 |
+
_.each( this.filters, function( filter, key )
|
218 |
{
|
219 |
filter.props['uncategorized'] = null;
|
220 |
})
|
221 |
+
|
222 |
this.filters.uncategorized = {
|
223 |
text: eml.l10n.uncategorized,
|
224 |
props: {
|
232 |
priority: 60
|
233 |
};
|
234 |
},
|
235 |
+
|
236 |
change: function() {
|
237 |
+
|
238 |
var filter = this.filters[ this.el.value ],
|
239 |
+
content = this.controller.content;
|
240 |
+
|
241 |
+
|
242 |
media.view.AttachmentFilters.prototype.change.apply( this, arguments );
|
243 |
+
|
244 |
+
|
245 |
+
if ( filter && filter.props.uncategorized ) {
|
246 |
+
|
247 |
+
_.each( eml.l10n.taxonomies, function( terms, taxonomy ) {
|
248 |
+
|
249 |
+
taxFilter = content.get().toolbar.get( taxonomy+'-filter' );
|
250 |
+
|
251 |
+
if ( ! _.isUndefined( taxFilter ) && 'all' !== taxFilter.$el.val() ) {
|
252 |
+
taxFilter.$el.val( 'all' ).change();
|
253 |
+
}
|
254 |
});
|
255 |
}
|
256 |
}
|
257 |
});
|
258 |
+
|
259 |
+
|
260 |
+
|
|
|
261 |
/**
|
262 |
+
* wp.media.view.AttachmentFilters.Taxonomy
|
263 |
+
*
|
264 |
+
*/
|
265 |
media.view.AttachmentFilters.Taxonomy = media.view.AttachmentFilters.extend({
|
266 |
+
|
267 |
id: function() {
|
268 |
+
|
269 |
return 'media-attachment-'+this.options.taxonomy+'-filters';
|
270 |
},
|
271 |
+
|
272 |
className: function() {
|
273 |
+
|
274 |
// TODO: get rid of excess class name that duplicates id
|
275 |
return 'attachment-filters eml-attachment-filters attachment-'+this.options.taxonomy+'-filter';
|
276 |
},
|
277 |
+
|
278 |
createFilters: function() {
|
279 |
+
|
280 |
var filters = {},
|
281 |
self = this;
|
282 |
+
|
283 |
_.each( self.options.termList || {}, function( term, key ) {
|
284 |
+
|
285 |
var term_id = term['term_id'],
|
286 |
term_name = $("<div/>").html(term['term_name']).text();
|
287 |
+
|
288 |
filters[ term_id ] = {
|
289 |
text: term_name,
|
290 |
+
props: {
|
291 |
+
uncategorized : null,
|
292 |
+
orderby : 'menuOrder',
|
293 |
+
order : 'ASC'
|
294 |
+
},
|
295 |
priority: key+4
|
296 |
};
|
297 |
+
|
298 |
filters[term_id]['props'][self.options.taxonomy] = term_id;
|
|
|
|
|
|
|
|
|
299 |
});
|
300 |
+
|
301 |
filters.all = {
|
302 |
text: eml.l10n.filter_by + self.options.singularName,
|
303 |
+
props: {
|
304 |
+
uncategorized : null,
|
305 |
+
orderby : 'date',
|
306 |
+
order : 'DESC'
|
307 |
+
},
|
308 |
priority: 1
|
309 |
};
|
310 |
+
|
311 |
filters['all']['props'][self.options.taxonomy] = null;
|
312 |
+
|
|
|
|
|
|
|
|
|
313 |
filters.in = {
|
314 |
+
text: '— ' + eml.l10n.in + self.options.pluralName + ' —',
|
315 |
+
props: {
|
316 |
+
uncategorized : null,
|
317 |
+
orderby : 'date',
|
318 |
+
order : 'DESC'
|
319 |
+
},
|
320 |
priority: 2
|
321 |
};
|
322 |
+
|
323 |
filters['in']['props'][self.options.taxonomy] = 'in';
|
324 |
+
|
325 |
filters.not_in = {
|
326 |
+
text: '— ' + eml.l10n.not_in + self.options.singularName + ' —',
|
327 |
+
props: {
|
328 |
+
uncategorized : null,
|
329 |
+
orderby : 'date',
|
330 |
+
order : 'DESC'
|
331 |
+
},
|
332 |
priority: 3
|
333 |
};
|
334 |
+
|
335 |
filters['not_in']['props'][self.options.taxonomy] = 'not_in';
|
336 |
+
|
337 |
this.filters = filters;
|
338 |
},
|
339 |
+
|
340 |
change: function() {
|
341 |
+
|
342 |
+
var controller = this.controller,
|
343 |
+
filter = this.filters[ this.el.value ],
|
344 |
+
Filters = controller.content.get().toolbar.get( 'filters' );
|
345 |
+
|
346 |
media.view.AttachmentFilters.prototype.change.apply( this, arguments );
|
347 |
+
|
348 |
+
if ( filter && 1 != filter.priority && 'uncategorized' == Filters.$el.val() ) {
|
349 |
+
Filters.$el.val( 'all' ).change();
|
350 |
}
|
351 |
}
|
352 |
});
|
353 |
+
|
354 |
+
|
355 |
+
|
356 |
media.view.Button.resetFilters = media.view.Button.extend({
|
357 |
+
|
358 |
id: 'reset-all-filters',
|
359 |
|
360 |
click: function( event ) {
|
361 |
+
|
362 |
if ( '#' === this.attributes.href ) {
|
363 |
event.preventDefault();
|
364 |
}
|
365 |
+
|
366 |
$.each( $('select.attachment-filters'), function() {
|
367 |
if ( this.value != 'all' )
|
368 |
$(this).val( 'all' ).change();
|
369 |
});
|
370 |
}
|
371 |
});
|
372 |
+
|
373 |
+
|
374 |
+
|
375 |
+
/**
|
376 |
+
* wp.media.view.AttachmentsBrowser
|
377 |
+
*
|
378 |
+
*/
|
379 |
original.AttachmentsBrowser = {
|
380 |
+
|
381 |
initialize: media.view.AttachmentsBrowser.prototype.initialize,
|
382 |
+
createToolbar: media.view.AttachmentsBrowser.prototype.createToolbar,
|
383 |
+
createSingle: media.view.AttachmentsBrowser.prototype.createSingle
|
384 |
};
|
385 |
+
|
386 |
_.extend( media.view.AttachmentsBrowser.prototype, {
|
387 |
+
|
388 |
initialize: function() {
|
389 |
+
|
390 |
original.AttachmentsBrowser.initialize.apply( this, arguments );
|
391 |
+
|
392 |
this.on( 'ready', this.fixLayout, this );
|
393 |
+
|
394 |
$( window ).on( 'resize', _.debounce( _.bind( this.fixLayout, this ), 15 ) );
|
395 |
+
|
396 |
// ACF compatibility
|
397 |
$( document ).on( 'click', '.acf-expand-details', _.debounce( _.bind( this.fixLayout, this ), 250 ) );
|
398 |
},
|
399 |
+
|
400 |
fixLayout: function() {
|
401 |
+
|
402 |
var $browser = this.$el,
|
403 |
$attachments = $browser.find('.attachments'),
|
404 |
$uploader = $browser.find('.uploader-inline'),
|
405 |
$toolbar = $browser.find('.media-toolbar'),
|
406 |
$messages = $('.eml-media-css .updated:visible, .eml-media-css .error:visible');
|
407 |
+
|
408 |
+
|
409 |
if ( eml.l10n.wp_version < '4.0' ) {
|
410 |
+
|
411 |
+
if ( 'absolute' == $attachments.css( 'position' ) &&
|
412 |
+
$browser.height() > $toolbar.height() + 20 ) {
|
413 |
+
|
414 |
+
$attachments.css( 'top', $toolbar.height() + 20 + 'px' );
|
415 |
$uploader.css( 'top', $toolbar.height() + 20 + 'px' );
|
416 |
}
|
417 |
else if ( 'absolute' == $attachments.css( 'position' ) ) {
|
422 |
$attachments.css( 'top', '0' );
|
423 |
$uploader.css( 'top', '0' );
|
424 |
}
|
425 |
+
|
426 |
// TODO: find a better place for it, something like fixLayoutOnce
|
427 |
$toolbar.find('.media-toolbar-secondary').prepend( $toolbar.find('.instructions') );
|
428 |
+
|
429 |
return;
|
430 |
}
|
431 |
+
|
432 |
+
|
433 |
+
if ( ! this.controller.isModeActive( 'select' ) &&
|
434 |
! this.controller.isModeActive( 'eml-grid' ) ) {
|
435 |
return;
|
436 |
}
|
437 |
+
|
438 |
if ( this.controller.isModeActive( 'select' ) ) {
|
439 |
+
|
440 |
+
$attachments.css( 'top', $toolbar.height() + 10 + 'px' );
|
441 |
$uploader.css( 'top', $toolbar.height() + 10 + 'px' );
|
442 |
$browser.find('.eml-loader').css( 'top', $toolbar.height() + 10 + 'px' );
|
443 |
+
|
444 |
// TODO: find a better place for it, something like fixLayoutOnce
|
445 |
$toolbar.find('.media-toolbar-secondary').prepend( $toolbar.find('.instructions') );
|
446 |
}
|
447 |
+
|
448 |
+
if ( this.controller.isModeActive( 'eml-grid' ) )
|
449 |
{
|
450 |
var messagesOuterHeight = 0;
|
451 |
+
|
452 |
+
if ( ! _.isUndefined( $messages ) )
|
453 |
{
|
454 |
$messages.each( function() {
|
455 |
messagesOuterHeight += $(this).outerHeight( true );
|
456 |
});
|
457 |
+
|
458 |
messagesOuterHeight = messagesOuterHeight ? messagesOuterHeight - 20 : 0;
|
459 |
+
}
|
460 |
+
|
461 |
$browser.css( 'top', $toolbar.outerHeight() + messagesOuterHeight + 20 + 'px' );
|
462 |
$toolbar.css( 'top', - $toolbar.outerHeight() - 30 + 'px' );
|
463 |
}
|
464 |
},
|
465 |
+
|
466 |
+
createSingle: function() {
|
467 |
+
|
468 |
+
var state = this.controller.state().get('id');
|
469 |
+
|
470 |
+
if ( 'gallery-edit' != state && 'gallery' != state ) {
|
471 |
+
original.AttachmentsBrowser.createSingle.apply( this, arguments );
|
472 |
+
}
|
473 |
+
},
|
474 |
+
|
475 |
createToolbar: function() {
|
476 |
+
|
477 |
var filters = this.options.filters,
|
478 |
self = this,
|
479 |
i = 1;
|
480 |
+
|
481 |
+
|
482 |
original.AttachmentsBrowser.createToolbar.apply( this, arguments );
|
483 |
+
|
484 |
+
|
485 |
+
if ( -1 !== $.inArray( this.options.filters, [ 'uploaded', 'all' ] ) ||
|
486 |
+
parseInt( eml.l10n.force_filters ) ) {
|
487 |
+
|
488 |
+
|
489 |
this.toolbar.set( 'filtersLabel', new media.view.Label({
|
490 |
value: l10n.filterByType,
|
491 |
attributes: {
|
509 |
|
510 |
this.toolbar.set( 'filters', Filters.render() );
|
511 |
}
|
512 |
+
|
513 |
+
if ( eml.l10n.wp_version >= '4.0' )
|
514 |
{
|
515 |
this.toolbar.set( 'dateFilterLabel', new media.view.Label({
|
516 |
value: l10n.filterByDate,
|
526 |
}).render() );
|
527 |
}
|
528 |
|
529 |
+
|
530 |
$.each( eml.l10n.taxonomies, function( taxonomy, values ) {
|
531 |
+
|
532 |
if ( values.term_list ) {
|
533 |
+
|
534 |
self.toolbar.set( taxonomy+'FilterLabel', new media.view.Label({
|
535 |
value: eml.l10n.filter_by + values.singular_name,
|
536 |
attributes: {
|
542 |
controller: self.controller,
|
543 |
model: self.collection.props,
|
544 |
priority: -70 + i++,
|
545 |
+
taxonomy: taxonomy,
|
546 |
termList: values.term_list,
|
547 |
singularName: values.singular_name,
|
548 |
pluralName: values.plural_name
|
549 |
}).render() );
|
550 |
}
|
551 |
});
|
552 |
+
|
553 |
+
|
554 |
this.toolbar.set( 'resetFilterButton', new media.view.Button.resetFilters({
|
555 |
controller: this.controller,
|
556 |
text: eml.l10n.reset_filters,
|
557 |
disabled: true,
|
558 |
priority: -70 + i
|
559 |
}).render() );
|
560 |
+
|
561 |
+
} // endif
|
562 |
}
|
563 |
});
|
564 |
+
|
565 |
+
|
566 |
+
|
567 |
+
/**
|
568 |
+
* wp.media.view.DateFilter
|
569 |
+
*
|
570 |
+
* a copy from media-grid.js | for WP less than 4.1
|
571 |
+
*/
|
572 |
if ( _.isUndefined( media.view.DateFilter ) ) {
|
573 |
+
|
574 |
media.view.DateFilter = media.view.AttachmentFilters.extend({
|
575 |
+
|
576 |
id: 'media-attachment-date-filters',
|
577 |
+
|
578 |
createFilters: function() {
|
579 |
var filters = {};
|
580 |
_.each( media.view.settings.months || {}, function( value, index ) {
|
598 |
}
|
599 |
});
|
600 |
}
|
601 |
+
|
602 |
+
|
603 |
+
|
604 |
+
/**
|
605 |
+
* wp.media.view.MediaFrame.Post
|
606 |
+
*
|
607 |
+
*/
|
608 |
+
original.MediaFrame = {
|
609 |
+
|
610 |
+
Post: {
|
611 |
+
activate: media.view.MediaFrame.Post.prototype.activate,
|
612 |
+
galleryMenu: media.view.MediaFrame.Post.prototype.galleryMenu
|
613 |
+
}
|
614 |
+
};
|
615 |
+
|
616 |
+
_.extend( media.view.MediaFrame.Post.prototype, {
|
617 |
+
|
618 |
+
activate: function() {
|
619 |
+
|
620 |
+
original.MediaFrame.Post.activate.apply( this, arguments );
|
621 |
+
|
622 |
+
var content = this.content.get();
|
623 |
+
|
624 |
+
this.on( 'open', content.fixLayout, content );
|
625 |
+
},
|
626 |
+
|
627 |
+
galleryMenu: function( view ) {
|
628 |
+
|
629 |
+
original.MediaFrame.Post.galleryMenu.apply( this, arguments );
|
630 |
+
|
631 |
+
var library = this.state().get('library'),
|
632 |
+
isFilterBased = emlIsGalleryFilterBased( library.props.toJSON() );
|
633 |
+
|
634 |
+
|
635 |
+
if ( isFilterBased ) {
|
636 |
+
view.hide( 'gallery-library' );
|
637 |
+
}
|
638 |
+
}
|
639 |
+
});
|
640 |
+
|
641 |
+
|
642 |
+
|
643 |
+
/**
|
644 |
+
* wp.media.view.Attachment.EditLibrary
|
645 |
+
*
|
646 |
+
*/
|
647 |
+
_.extend( media.view.Attachment.EditLibrary.prototype, {
|
648 |
+
|
649 |
+
initialize: function() {
|
650 |
+
|
651 |
+
var state = this.controller.state(),
|
652 |
+
isFilterBased = emlIsGalleryFilterBased( state.get('library').props.toJSON() );
|
653 |
+
|
654 |
+
|
655 |
+
this.buttons.close = ( 'gallery-edit' == state.get('id') && isFilterBased ) ? false : true;
|
656 |
+
}
|
657 |
+
});
|
658 |
+
|
659 |
+
|
660 |
+
|
661 |
+
/**
|
662 |
+
* wp.media.view.Settings.Gallery
|
663 |
+
*
|
664 |
+
*/
|
665 |
+
_.extend( media.view.Settings.Gallery.prototype.events, {
|
666 |
+
'change ._orderbyRandom' : 'change_orderbyRandom',
|
667 |
+
});
|
668 |
+
|
669 |
+
_.extend( media.view.Settings.Gallery.prototype, {
|
670 |
+
|
671 |
+
template: media.template('eml-gallery-settings'),
|
672 |
+
|
673 |
+
change_orderbyRandom: function( event ) {
|
674 |
+
|
675 |
+
var content = this.controller.frame.content,
|
676 |
+
reverse = content.get().toolbar.get( 'reverse' );
|
677 |
+
|
678 |
+
reverse.model.set( 'disabled', $( event.target ).is(':checked') );
|
679 |
+
}
|
680 |
+
});
|
681 |
+
|
682 |
+
|
683 |
+
|
684 |
+
/**
|
685 |
+
* wp.media.controller.GalleryEdit
|
686 |
+
*
|
687 |
+
*/
|
688 |
+
original.GalleryEdit = {
|
689 |
+
|
690 |
+
gallerySettings: media.controller.GalleryEdit.prototype.gallerySettings,
|
691 |
+
};
|
692 |
+
|
693 |
+
_.extend( media.controller.GalleryEdit.prototype, {
|
694 |
+
|
695 |
+
gallerySettings: function( browser ) {
|
696 |
+
|
697 |
+
original.GalleryEdit.gallerySettings.apply( this, arguments );
|
698 |
+
|
699 |
+
var library = this.get('library'),
|
700 |
+
reverse = browser.toolbar.get( 'reverse' );
|
701 |
+
|
702 |
+
|
703 |
+
reverse.model.set( 'disabled', 'rand' === library.props.get('orderby') );
|
704 |
+
|
705 |
+
reverse.options.click = function() {
|
706 |
+
|
707 |
+
switch( library.gallery.get( 'order' ) ) {
|
708 |
+
case 'ASC':
|
709 |
+
library.props.set( 'order', 'DESC' );
|
710 |
+
library.gallery.set( 'order', 'DESC' );
|
711 |
+
break;
|
712 |
+
case 'DESC':
|
713 |
+
library.props.set( 'order', 'ASC' );
|
714 |
+
library.gallery.set( 'order', 'ASC' );
|
715 |
+
break;
|
716 |
+
default:
|
717 |
+
library.props.set( 'order', 'DESC' );
|
718 |
+
library.gallery.set( 'order', 'DESC' );
|
719 |
+
}
|
720 |
+
|
721 |
+
library.reset( library.toArray().reverse() );
|
722 |
+
library.saveMenuOrder();
|
723 |
+
}
|
724 |
+
}
|
725 |
+
});
|
726 |
+
|
727 |
+
|
728 |
+
|
729 |
// TODO: move to the PHP side
|
730 |
$('body').addClass('eml-media-css');
|
731 |
|
732 |
+
})( jQuery, _ );
|
languages/eml-ko_KR.mo
ADDED
Binary file
|
languages/eml-ko_KR.po
ADDED
@@ -0,0 +1,791 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: Enhanced Media Library PRO\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2015-03-04 00:13+0200\n"
|
6 |
+
"PO-Revision-Date: 2015-09-24 14:58+0900\n"
|
7 |
+
"Last-Translator: Josh Kim <joshkkim@gmail.com>\n"
|
8 |
+
"Language-Team: \n"
|
9 |
+
"Language: ko\n"
|
10 |
+
"Plural-Forms: nplurals=1; plural=0;\n"
|
11 |
+
"MIME-Version: 1.0\n"
|
12 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
13 |
+
"Content-Transfer-Encoding: 8bit\n"
|
14 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
15 |
+
"X-Generator: Poedit 1.8.4\n"
|
16 |
+
"X-Poedit-Basepath: ..\n"
|
17 |
+
"X-Poedit-KeywordsList: _:1;gettext:1;dgettext:2;ngettext:1,2;dngettext:2,3;__:1;_e:1;"
|
18 |
+
"_c:1;_n:1,2;_n_noop:1,2;_nc:1,2;__ngettext:1,2;__ngettext_noop:1,2;_x:1,2c;_ex:1,2c;"
|
19 |
+
"_nx:1,2,4c;_nx_noop:1,2,3c;_n_js:1,2;_nx_js:1,2,3c;esc_attr__:1;esc_html__:1;"
|
20 |
+
"esc_attr_e:1;esc_html_e:1;esc_attr_x:1,2c;esc_html_x:1,2c;comments_number_link:2,3;"
|
21 |
+
"t:1;st:1;trans:1;transChoice:1,2\n"
|
22 |
+
"X-Loco-Target-Locale: ko_KR\n"
|
23 |
+
"X-Poedit-SearchPath-0: .\n"
|
24 |
+
"X-Poedit-SearchPathExcluded-0: *.js\n"
|
25 |
+
|
26 |
+
#: core/class-eml-media-list-table.php:39
|
27 |
+
#, php-format
|
28 |
+
msgctxt "uploaded files"
|
29 |
+
msgid "All (%s)"
|
30 |
+
msgid_plural "All (%s)"
|
31 |
+
msgstr[0] "모든 (%s)"
|
32 |
+
|
33 |
+
#: core/class-eml-media-list-table.php:50
|
34 |
+
#, php-format
|
35 |
+
msgctxt "detached files"
|
36 |
+
msgid "Unattached (%s)"
|
37 |
+
msgid_plural "Unattached (%s)"
|
38 |
+
msgstr[0] "첨부되지 않음 (%s)"
|
39 |
+
|
40 |
+
#: core/class-eml-media-list-table.php:52 enhanced-media-library.php:377
|
41 |
+
msgid "All Uncategorized"
|
42 |
+
msgstr "모두 미분류됨"
|
43 |
+
|
44 |
+
#: core/class-eml-media-list-table.php:55
|
45 |
+
#, php-format
|
46 |
+
msgctxt "uploaded files"
|
47 |
+
msgid "Trash (%s)"
|
48 |
+
msgid_plural "Trash (%s)"
|
49 |
+
msgstr[0] "휴지통 (%s)"
|
50 |
+
|
51 |
+
#: core/class-eml-media-list-table.php:75
|
52 |
+
msgid "Filter"
|
53 |
+
msgstr "필터"
|
54 |
+
|
55 |
+
#: core/class-eml-media-list-table.php:77 enhanced-media-library.php:381
|
56 |
+
msgid "Reset All Filters"
|
57 |
+
msgstr "모든 필터 재설정"
|
58 |
+
|
59 |
+
#: core/class-eml-media-list-table.php:81
|
60 |
+
msgid "Empty Trash"
|
61 |
+
msgstr "휴지통 비우기"
|
62 |
+
|
63 |
+
#: core/eml-upload.php:19
|
64 |
+
msgid "You do not have permission to upload files."
|
65 |
+
msgstr "파일을 업로드할 권한이 없습니다."
|
66 |
+
|
67 |
+
#: core/eml-upload.php:39 core/eml-upload.php:212
|
68 |
+
msgid "Overview"
|
69 |
+
msgstr "개요"
|
70 |
+
|
71 |
+
#: core/eml-upload.php:41
|
72 |
+
msgid ""
|
73 |
+
"All the files you’ve uploaded are listed in the Media Library, with the most "
|
74 |
+
"recent uploads listed first."
|
75 |
+
msgstr ""
|
76 |
+
"업로드한 모든 파일은 미디어 라이브러리 내에 나열되며 가장 최근 업로드한 목록을 먼저 "
|
77 |
+
"표시합니다."
|
78 |
+
|
79 |
+
#: core/eml-upload.php:42 core/eml-upload.php:216
|
80 |
+
msgid ""
|
81 |
+
"You can view your media in a simple visual grid or a list with columns. Switch "
|
82 |
+
"between these views using the icons to the left above the media."
|
83 |
+
msgstr ""
|
84 |
+
"미디어를 간단한 비주얼 그리드 또는 열이 있는 목록으로 볼 수 있습니다. 미디어 좌측 상"
|
85 |
+
"단에 있는 아이콘을 이용하여 화면을 변경할 수 있습니다."
|
86 |
+
|
87 |
+
#: core/eml-upload.php:43
|
88 |
+
msgid ""
|
89 |
+
"To delete media items, click the Bulk Select button at the top of the screen. Select "
|
90 |
+
"any items you wish to delete, then click the Delete Selected button. Clicking the "
|
91 |
+
"Cancel Selection button takes you back to viewing your media."
|
92 |
+
msgstr ""
|
93 |
+
"미디어 항목을 삭제하려면, 화면 상단의 일괄 선택 버튼을 클릭하세요. 삭제할 모든 파일"
|
94 |
+
"을 선택한 다음, 선택 삭제 버튼을 클릭하세요. 선택 해제 버튼을 클릭하면 미디어 화면으"
|
95 |
+
"로 돌아갑니다."
|
96 |
+
|
97 |
+
#: core/eml-upload.php:48
|
98 |
+
msgid "Attachment Details"
|
99 |
+
msgstr "첨부 파일 세부 정보"
|
100 |
+
|
101 |
+
#: core/eml-upload.php:50
|
102 |
+
msgid ""
|
103 |
+
"Clicking an item will display an Attachment Details dialog, which allows you to "
|
104 |
+
"preview media and make quick edits. Any changes you make to the attachment details "
|
105 |
+
"will be automatically saved."
|
106 |
+
msgstr ""
|
107 |
+
"항목을 클릭하면 미디어를 미리 보고 빠르게 편집할 수 있는 첨부 파일 상세 정보 대화창"
|
108 |
+
"이 표시됩니다. 첨부 파일 상세 정보에서의 모든 변경 사항은 자동으로 저장됩니다."
|
109 |
+
|
110 |
+
#: core/eml-upload.php:51
|
111 |
+
msgid ""
|
112 |
+
"Use the arrow buttons at the top of the dialog, or the left and right arrow keys on "
|
113 |
+
"your keyboard, to navigate between media items quickly."
|
114 |
+
msgstr ""
|
115 |
+
"대화창 상단의 화살표 버튼을 사용하거나, 키보드의 왼쪽 및 오른쪽 화살표 키를 이용하여 "
|
116 |
+
"미디어 항목을 신속하게 탐색할 수 있습니다."
|
117 |
+
|
118 |
+
#: core/eml-upload.php:52
|
119 |
+
msgid ""
|
120 |
+
"You can also delete individual items and access the extended edit screen from the "
|
121 |
+
"details dialog."
|
122 |
+
msgstr "상세 정보 대화에서 개별 항목을 삭제하고 확장 편집 화면에 접근할 수 있습니다."
|
123 |
+
|
124 |
+
#: core/eml-upload.php:56 core/eml-upload.php:232
|
125 |
+
msgid "For more information:"
|
126 |
+
msgstr "더 많은 정보:"
|
127 |
+
|
128 |
+
#: core/eml-upload.php:57 core/eml-upload.php:233
|
129 |
+
msgid ""
|
130 |
+
"<a href=\"http://codex.wordpress.org/Media_Library_Screen\" target=\"_blank"
|
131 |
+
"\">Documentation on Media Library</a>"
|
132 |
+
msgstr ""
|
133 |
+
"<a href=\"http://codex.wordpress.org/Media_Library_Screen\" target=\"_blank\">미디어 "
|
134 |
+
"라이브러리에 대한 문서</a>"
|
135 |
+
|
136 |
+
#: core/eml-upload.php:58 core/eml-upload.php:234
|
137 |
+
msgid "<a href=\"https://wordpress.org/support/\" target=\"_blank\">Support Forums</a>"
|
138 |
+
msgstr "지원 포럼"
|
139 |
+
|
140 |
+
#: core/eml-upload.php:61 core/eml-upload.php:203
|
141 |
+
msgid "Media Library"
|
142 |
+
msgstr "미디어 라이브러리"
|
143 |
+
|
144 |
+
#: core/eml-upload.php:71 core/eml-upload.php:245
|
145 |
+
msgctxt "file"
|
146 |
+
msgid "Add New"
|
147 |
+
msgstr "새로 추가"
|
148 |
+
|
149 |
+
#: core/eml-upload.php:76
|
150 |
+
msgid ""
|
151 |
+
"The grid view for the Media Library requires JavaScript. <a href=\"upload.php?"
|
152 |
+
"mode=list\">Switch to the list view</a>."
|
153 |
+
msgstr ""
|
154 |
+
"미디어 라이브러리에 대한 그리드 화면은 자바 스크립트가 필요합니다. <a href=\"upload."
|
155 |
+
"php?mode=list\">목록 화면으로 전환</a>."
|
156 |
+
|
157 |
+
#: core/eml-upload.php:124
|
158 |
+
msgid "You are not allowed to edit this post."
|
159 |
+
msgstr "이 글을 편집할 권한이 없습니다."
|
160 |
+
|
161 |
+
#: core/eml-upload.php:161
|
162 |
+
msgid "You are not allowed to move this post to the trash."
|
163 |
+
msgstr "이 글을 휴지통으로 이동할 권한이 없습니다."
|
164 |
+
|
165 |
+
#: core/eml-upload.php:164
|
166 |
+
msgid "Error in moving to trash."
|
167 |
+
msgstr "휴지통으로 이동하는 도중 오류가 발생함."
|
168 |
+
|
169 |
+
#: core/eml-upload.php:173
|
170 |
+
msgid "You are not allowed to move this post out of the trash."
|
171 |
+
msgstr "이 글을 휴지통으로부터 이동할 권한이 없습니다."
|
172 |
+
|
173 |
+
#: core/eml-upload.php:176
|
174 |
+
msgid "Error in restoring from trash."
|
175 |
+
msgstr "휴지통으로부터 복구하는 도중 오류가 발생함."
|
176 |
+
|
177 |
+
#: core/eml-upload.php:185
|
178 |
+
msgid "You are not allowed to delete this post."
|
179 |
+
msgstr "이 글을 삭제할 권한이 없습니다."
|
180 |
+
|
181 |
+
#: core/eml-upload.php:188
|
182 |
+
msgid "Error in deleting."
|
183 |
+
msgstr "삭제하는 도중 오류가 발생함."
|
184 |
+
|
185 |
+
#: core/eml-upload.php:208
|
186 |
+
msgctxt "items per page (screen options)"
|
187 |
+
msgid "Media items"
|
188 |
+
msgstr "미디어 항목"
|
189 |
+
|
190 |
+
#: core/eml-upload.php:214
|
191 |
+
msgid ""
|
192 |
+
"All the files you’ve uploaded are listed in the Media Library, with the most "
|
193 |
+
"recent uploads listed first. You can use the Screen Options tab to customize the "
|
194 |
+
"display of this screen."
|
195 |
+
msgstr ""
|
196 |
+
"업로드한 모든 파일은 미디어 라이브러리 내에 나열되며 가장 최근 업로드한 목록을 먼저 "
|
197 |
+
"표시합니다. 화면 옵션 탭을 사용해 이 화면의 표시를 설정할 수 있습니다."
|
198 |
+
|
199 |
+
#: core/eml-upload.php:215
|
200 |
+
msgid ""
|
201 |
+
"You can narrow the list by file type/status using the text link filters at the top "
|
202 |
+
"of the screen. You also can refine the list by date using the dropdown menu above "
|
203 |
+
"the media table."
|
204 |
+
msgstr ""
|
205 |
+
"화면 상단에 있는 텍스트 링크 필터를 사용하여 파일 유형/상태 기준으로 목록을 좁힐 수 "
|
206 |
+
"있습니다. 또한 미디어 표 위의 드롭 다운 메뉴를 사용하여 날짜 별로 목록을 구체화 할 "
|
207 |
+
"수 있습니다."
|
208 |
+
|
209 |
+
#: core/eml-upload.php:220
|
210 |
+
msgid "Available Actions"
|
211 |
+
msgstr "사용 가능한 동작"
|
212 |
+
|
213 |
+
#: core/eml-upload.php:222
|
214 |
+
msgid ""
|
215 |
+
"Hovering over a row reveals action links: Edit, Delete Permanently, and View. "
|
216 |
+
"Clicking Edit or on the media file’s name displays a simple screen to edit "
|
217 |
+
"that individual file’s metadata. Clicking Delete Permanently will delete the "
|
218 |
+
"file from the media library (as well as from any posts to which it is currently "
|
219 |
+
"attached). View will take you to the display page for that file."
|
220 |
+
msgstr ""
|
221 |
+
"행에 마우스를 올리면 다음의 작업 링크가 나타납니다 : 편집, 영구 삭제, 그리고 보기. 편"
|
222 |
+
"집이나 미디어 파일의 이름을 클릭하면 개별 파일의 메타 데이터를 편집하는 간단한 화면"
|
223 |
+
"이 표시됩니다. 영구 삭제를 클릭하면 미디어 라이브러리(뿐만 아니라 그것이 현재 첨부된 "
|
224 |
+
"모든 글에서도)에서 파일을 삭제합니다. 보기는 파일이 사용된 페이지로 이동합니다."
|
225 |
+
|
226 |
+
#: core/eml-upload.php:226
|
227 |
+
msgid "Attaching Files"
|
228 |
+
msgstr "파일을 첨부하는 중"
|
229 |
+
|
230 |
+
#: core/eml-upload.php:228
|
231 |
+
msgid ""
|
232 |
+
"If a media file has not been attached to any post, you will see that in the Attached "
|
233 |
+
"To column, and can click on Attach File to launch a small popup that will allow you "
|
234 |
+
"to search for a post and attach the file."
|
235 |
+
msgstr ""
|
236 |
+
"미디어 파일이 모든 글에 첨부되지 않은 경우, 다음에 첨부됨 열에 표시되고, 파일 첨부를 "
|
237 |
+
"클릭하면 글을 검색하고 파일을 첨부할 수 있는 작은 팝업이 나타납니다."
|
238 |
+
|
239 |
+
#: core/eml-upload.php:248
|
240 |
+
#, php-format
|
241 |
+
msgid "Search results for “%s”"
|
242 |
+
msgstr "“%s”에 대한 검색 결과"
|
243 |
+
|
244 |
+
#: core/eml-upload.php:254 core/eml-upload.php:279
|
245 |
+
msgid "Media attachment updated."
|
246 |
+
msgstr "미디어 첨부파일이 업데이트 됨."
|
247 |
+
|
248 |
+
#: core/eml-upload.php:259
|
249 |
+
#, php-format
|
250 |
+
msgid "Reattached %d attachment."
|
251 |
+
msgid_plural "Reattached %d attachments."
|
252 |
+
msgstr[0] "%d 첨부파일을 다시 첨부함."
|
253 |
+
|
254 |
+
#: core/eml-upload.php:264
|
255 |
+
#, php-format
|
256 |
+
msgid "Media attachment permanently deleted."
|
257 |
+
msgid_plural "%d media attachments permanently deleted."
|
258 |
+
msgstr[0] "미디어 첨부 파일을 영구적으로 삭제함."
|
259 |
+
|
260 |
+
#: core/eml-upload.php:269
|
261 |
+
#, php-format
|
262 |
+
msgid "Media attachment moved to the trash."
|
263 |
+
msgid_plural "%d media attachments moved to the trash."
|
264 |
+
msgstr[0] "미디어 첨부 파일을 휴지통으로 이동함."
|
265 |
+
|
266 |
+
#: core/eml-upload.php:270 core/eml-upload.php:282
|
267 |
+
msgid "Undo"
|
268 |
+
msgstr "실행 취소"
|
269 |
+
|
270 |
+
#: core/eml-upload.php:275
|
271 |
+
#, php-format
|
272 |
+
msgid "Media attachment restored from the trash."
|
273 |
+
msgid_plural "%d media attachments restored from the trash."
|
274 |
+
msgstr[0] "미디어 첨부 파일을 휴지통으로부터 복구함."
|
275 |
+
|
276 |
+
#: core/eml-upload.php:280
|
277 |
+
msgid "Media permanently deleted."
|
278 |
+
msgstr "미디어를 영구적으로 삭제함."
|
279 |
+
|
280 |
+
#: core/eml-upload.php:281
|
281 |
+
msgid "Error saving media attachment."
|
282 |
+
msgstr "미디어 첨부 파일을 저장하는 중 오류 발생."
|
283 |
+
|
284 |
+
#: core/eml-upload.php:282
|
285 |
+
msgid "Media moved to the trash."
|
286 |
+
msgstr "미디어가 휴지통으로 이동함."
|
287 |
+
|
288 |
+
#: core/eml-upload.php:283
|
289 |
+
msgid "Media restored from the trash."
|
290 |
+
msgstr "미디어를 휴지통에서 복구함."
|
291 |
+
|
292 |
+
#: core/mime-types.php:107
|
293 |
+
#, php-format
|
294 |
+
msgid " <span class=\"count\">(%s)</span>"
|
295 |
+
msgid_plural " <span class=\"count\">(%s)</span>"
|
296 |
+
msgstr[0] "<span class=\"count\">(%s)</span>"
|
297 |
+
|
298 |
+
#: core/options-pages.php:67 core/options-pages.php:68 core/options-pages.php:77
|
299 |
+
msgid "Media Settings"
|
300 |
+
msgstr "미디어 설정"
|
301 |
+
|
302 |
+
#: core/options-pages.php:78 core/options-pages.php:254 core/options-pages.php:276
|
303 |
+
#: core/options-pages.php:322 core/options-pages.php:386
|
304 |
+
msgid "Settings"
|
305 |
+
msgstr "설정"
|
306 |
+
|
307 |
+
#: core/options-pages.php:85 core/options-pages.php:86 core/options-pages.php:188
|
308 |
+
msgid "Taxonomies"
|
309 |
+
msgstr "카테고리"
|
310 |
+
|
311 |
+
#: core/options-pages.php:94 core/options-pages.php:95 core/options-pages.php:510
|
312 |
+
msgid "MIME Types"
|
313 |
+
msgstr "MIME 유형"
|
314 |
+
|
315 |
+
#: core/options-pages.php:132 core/options-pages.php:229 core/options-pages.php:243
|
316 |
+
#: core/options-pages.php:311 core/options-pages.php:383
|
317 |
+
msgid "Edit"
|
318 |
+
msgstr "편집"
|
319 |
+
|
320 |
+
#: core/options-pages.php:133 pro/enhanced-media-library-pro.php:166
|
321 |
+
msgid "Close"
|
322 |
+
msgstr "닫기"
|
323 |
+
|
324 |
+
#: core/options-pages.php:134 core/options-pages.php:244 core/options-pages.php:312
|
325 |
+
msgid "View"
|
326 |
+
msgstr "보기"
|
327 |
+
|
328 |
+
#: core/options-pages.php:135 core/options-pages.php:245 core/options-pages.php:313
|
329 |
+
msgid "Update"
|
330 |
+
msgstr "업데이트"
|
331 |
+
|
332 |
+
#: core/options-pages.php:136 core/options-pages.php:246 core/options-pages.php:314
|
333 |
+
msgid "Add New"
|
334 |
+
msgstr "새로 추가하기"
|
335 |
+
|
336 |
+
#: core/options-pages.php:137 core/options-pages.php:247 core/options-pages.php:315
|
337 |
+
msgid "New"
|
338 |
+
msgstr "신규"
|
339 |
+
|
340 |
+
#: core/options-pages.php:138
|
341 |
+
msgid "Name"
|
342 |
+
msgstr "이름"
|
343 |
+
|
344 |
+
#: core/options-pages.php:139 core/options-pages.php:248 core/options-pages.php:316
|
345 |
+
msgid "Parent"
|
346 |
+
msgstr "부모"
|
347 |
+
|
348 |
+
#: core/options-pages.php:140 core/options-pages.php:242 core/options-pages.php:310
|
349 |
+
msgid "All"
|
350 |
+
msgstr "모두"
|
351 |
+
|
352 |
+
#: core/options-pages.php:141 core/options-pages.php:249 core/options-pages.php:317
|
353 |
+
msgid "Search"
|
354 |
+
msgstr "검색"
|
355 |
+
|
356 |
+
#: core/options-pages.php:143
|
357 |
+
msgid ""
|
358 |
+
"Taxonomy will be deleted permanently! Your media files will remain intacted, but all "
|
359 |
+
"the connections with this taxonomy and its terms will be lost."
|
360 |
+
msgstr ""
|
361 |
+
"카테고리가 영구적으로 삭제됩니다. 미디어 파일은 보존되지만, 이 카테고리 및 용어와의 "
|
362 |
+
"모든 연결은 손실됩니다."
|
363 |
+
|
364 |
+
#: core/options-pages.php:144
|
365 |
+
msgid "There is already a taxonomy with the same name. Please chose other one."
|
366 |
+
msgstr "동일한 이름의 카테고리가 이미 존재합니다. 다른 것을 선택해주세요."
|
367 |
+
|
368 |
+
#: core/options-pages.php:145 core/options-pages.php:298
|
369 |
+
msgid "New Taxonomy"
|
370 |
+
msgstr "새로운 카테고리"
|
371 |
+
|
372 |
+
#: core/options-pages.php:146
|
373 |
+
msgid "Please choose Singular and Plural names for all your new taxomonies."
|
374 |
+
msgstr "모든 새로운 카테고리에 대한 단수 및 복수 이름을 선택해주세요."
|
375 |
+
|
376 |
+
#: core/options-pages.php:147
|
377 |
+
msgid "Please choose Singilar name for all your new taxomonies."
|
378 |
+
msgstr "모든 새로운 카테고리에 대한 단수 이름을 선택해주세요."
|
379 |
+
|
380 |
+
#: core/options-pages.php:148
|
381 |
+
msgid "Please choose Plural Name for all your new taxomonies."
|
382 |
+
msgstr "모든 새로운 카테고리에 대한 복수 이름을 선택해주세요."
|
383 |
+
|
384 |
+
#: core/options-pages.php:150
|
385 |
+
msgid "Warning! All your custom MIME Types will be deleted by this operation."
|
386 |
+
msgstr "경고! 이 작업으로 인해 모든 사용자 지정 MIME 유형이 삭제됩니다."
|
387 |
+
|
388 |
+
#: core/options-pages.php:151
|
389 |
+
msgid "Please fill into all fields."
|
390 |
+
msgstr "모든 필드에 입력해주세요."
|
391 |
+
|
392 |
+
#: core/options-pages.php:152
|
393 |
+
msgid "Duplicate extensions or MIME types. Please chose other one."
|
394 |
+
msgstr "중복 확장자 또는 MIME 유형. 다른 것을 선택해주세요."
|
395 |
+
|
396 |
+
#: core/options-pages.php:180 core/options-pages.php:501 pro/core/options-pages.php:170
|
397 |
+
msgid "You do not have sufficient permissions to access this page."
|
398 |
+
msgstr "이 페이지에 접근할 권한이 없습니다."
|
399 |
+
|
400 |
+
#: core/options-pages.php:204
|
401 |
+
msgid "Media Taxonomies"
|
402 |
+
msgstr "미디어 카테고리"
|
403 |
+
|
404 |
+
#: core/options-pages.php:208 core/options-pages.php:360
|
405 |
+
msgid "Assign following taxonomies to Media Library:"
|
406 |
+
msgstr "다음 카테고리를 미디어 라이브러리에 할당:"
|
407 |
+
|
408 |
+
#: core/options-pages.php:226 core/options-pages.php:296 core/options-pages.php:376
|
409 |
+
msgid "Assign Taxonomy"
|
410 |
+
msgstr "카테고리 할당"
|
411 |
+
|
412 |
+
#: core/options-pages.php:229 core/options-pages.php:383
|
413 |
+
msgid "Edit Taxonomy"
|
414 |
+
msgstr "카테고리 편집"
|
415 |
+
|
416 |
+
#: core/options-pages.php:232 core/options-pages.php:300
|
417 |
+
msgid "Delete Taxonomy"
|
418 |
+
msgstr "카테고리 삭제"
|
419 |
+
|
420 |
+
#: core/options-pages.php:237 core/options-pages.php:305
|
421 |
+
msgid "Labels"
|
422 |
+
msgstr "라벨"
|
423 |
+
|
424 |
+
#: core/options-pages.php:239 core/options-pages.php:307
|
425 |
+
msgid "Singular"
|
426 |
+
msgstr "단수"
|
427 |
+
|
428 |
+
#: core/options-pages.php:240 core/options-pages.php:308
|
429 |
+
msgid "Plural"
|
430 |
+
msgstr "복수"
|
431 |
+
|
432 |
+
#: core/options-pages.php:241 core/options-pages.php:309
|
433 |
+
msgid "Menu Name"
|
434 |
+
msgstr "메뉴명"
|
435 |
+
|
436 |
+
#: core/options-pages.php:256 core/options-pages.php:324
|
437 |
+
msgid "Taxonomy Name"
|
438 |
+
msgstr "카테고리명"
|
439 |
+
|
440 |
+
#: core/options-pages.php:257 core/options-pages.php:325
|
441 |
+
msgid "Hierarchical"
|
442 |
+
msgstr "계층 구조"
|
443 |
+
|
444 |
+
#: core/options-pages.php:258 core/options-pages.php:326
|
445 |
+
msgid "Column in List View"
|
446 |
+
msgstr "목록 화면에서 열 표시"
|
447 |
+
|
448 |
+
#: core/options-pages.php:259 core/options-pages.php:278 core/options-pages.php:327
|
449 |
+
#: core/options-pages.php:388
|
450 |
+
msgid "Filter in List View"
|
451 |
+
msgstr "목록 화면에서 필터 적용"
|
452 |
+
|
453 |
+
#: core/options-pages.php:260 core/options-pages.php:279 core/options-pages.php:328
|
454 |
+
#: core/options-pages.php:389
|
455 |
+
msgid "Filter in Grid View / Media Popup"
|
456 |
+
msgstr "그리드 화면 / 미디어 팝업에서 필터 적용"
|
457 |
+
|
458 |
+
#: core/options-pages.php:261 core/options-pages.php:280 core/options-pages.php:329
|
459 |
+
#: core/options-pages.php:390
|
460 |
+
msgid "Edit in Media Popup"
|
461 |
+
msgstr "미디어 팝업에서 편집"
|
462 |
+
|
463 |
+
#: core/options-pages.php:262 core/options-pages.php:330
|
464 |
+
msgid "Show in Nav Menu"
|
465 |
+
msgstr "탐색 메뉴에서 표시"
|
466 |
+
|
467 |
+
#: core/options-pages.php:263 core/options-pages.php:331
|
468 |
+
msgid "Remember terms order (sort)"
|
469 |
+
msgstr "용어 순서 기억 (정렬)"
|
470 |
+
|
471 |
+
#: core/options-pages.php:264 core/options-pages.php:332
|
472 |
+
msgid "Rewrite Slug"
|
473 |
+
msgstr "슬러그 다시 쓰기"
|
474 |
+
|
475 |
+
#: core/options-pages.php:265 core/options-pages.php:333
|
476 |
+
msgid "Slug with Front"
|
477 |
+
msgstr "프런트를 포함한 슬러그"
|
478 |
+
|
479 |
+
#: core/options-pages.php:345
|
480 |
+
msgid "Add New Taxonomy"
|
481 |
+
msgstr "새로운 카테고리 추가"
|
482 |
+
|
483 |
+
#: core/options-pages.php:356
|
484 |
+
msgid "Non-Media Taxonomies"
|
485 |
+
msgstr "비 미디어 카테고리"
|
486 |
+
|
487 |
+
#: core/options-pages.php:415
|
488 |
+
msgid "Options"
|
489 |
+
msgstr "옵션"
|
490 |
+
|
491 |
+
#: core/options-pages.php:425 core/options-pages.php:428
|
492 |
+
msgid "Taxonomy archive pages"
|
493 |
+
msgstr "카테고리 보관 페이지"
|
494 |
+
|
495 |
+
#: core/options-pages.php:429
|
496 |
+
msgid "Turn on media taxonomy archive pages on the front-end"
|
497 |
+
msgstr "전면에 미디어 카테고리 보관 페이지를 켜기"
|
498 |
+
|
499 |
+
#: core/options-pages.php:430
|
500 |
+
msgid "Re-save your permalink settings after this option change to make it work."
|
501 |
+
msgstr "이 옵션의 변경 사항을 적용하려면 고유주소 설정을 다시 저장하세요."
|
502 |
+
|
503 |
+
#: core/options-pages.php:436
|
504 |
+
msgid "Assign all like hierarchical"
|
505 |
+
msgstr "모두 계층 구조와 같이 할당"
|
506 |
+
|
507 |
+
#: core/options-pages.php:439 core/options-pages.php:440
|
508 |
+
msgid "Show non-hierarchical taxonomies like hierarchical in Grid View / Media Popup"
|
509 |
+
msgstr "그리드 화면 / 미디어 그룹에서 비 계층 구조 카테고리를 계층 구조와 같이 표시"
|
510 |
+
|
511 |
+
#: core/options-pages.php:446 core/options-pages.php:449
|
512 |
+
msgid "Force filters"
|
513 |
+
msgstr "필터 강제 적용"
|
514 |
+
|
515 |
+
#: core/options-pages.php:450
|
516 |
+
msgid "Show media filters for ANY Media Popup."
|
517 |
+
msgstr "모든 미디어 팝업에 대한 미디어 필터 표시"
|
518 |
+
|
519 |
+
#: core/options-pages.php:451
|
520 |
+
msgid ""
|
521 |
+
"May be useful for those who need forcing filters for third-party plugins or themes."
|
522 |
+
msgstr ""
|
523 |
+
"제3자 플러그인 또는 테마에 대한 필터에 대한 강제 적용이 필요할 때 유용할 수 있음."
|
524 |
+
|
525 |
+
#: core/options-pages.php:511
|
526 |
+
msgid "Add New MIME Type"
|
527 |
+
msgstr "새로운 MIME 유형 추가"
|
528 |
+
|
529 |
+
#: core/options-pages.php:529 core/options-pages.php:582
|
530 |
+
msgid "Extension"
|
531 |
+
msgstr "확장자"
|
532 |
+
|
533 |
+
#: core/options-pages.php:530 core/options-pages.php:583
|
534 |
+
msgid "MIME Type"
|
535 |
+
msgstr "MIME 유형"
|
536 |
+
|
537 |
+
#: core/options-pages.php:531 core/options-pages.php:584
|
538 |
+
msgid "Singular Label"
|
539 |
+
msgstr "단수 라벨"
|
540 |
+
|
541 |
+
#: core/options-pages.php:532 core/options-pages.php:585
|
542 |
+
msgid "Plural Label"
|
543 |
+
msgstr "복수 라벨"
|
544 |
+
|
545 |
+
#: core/options-pages.php:533 core/options-pages.php:561 core/options-pages.php:574
|
546 |
+
#: core/options-pages.php:586
|
547 |
+
msgid "Add Filter"
|
548 |
+
msgstr "필터 추가"
|
549 |
+
|
550 |
+
#: core/options-pages.php:534 core/options-pages.php:562 core/options-pages.php:575
|
551 |
+
#: core/options-pages.php:587
|
552 |
+
msgid "Allow Upload"
|
553 |
+
msgstr "업로드 허용"
|
554 |
+
|
555 |
+
#: core/options-pages.php:576
|
556 |
+
msgid "Delete MIME Type"
|
557 |
+
msgstr "MIME 유형 삭제"
|
558 |
+
|
559 |
+
#: core/options-pages.php:593
|
560 |
+
msgid "Restore default MIME Types"
|
561 |
+
msgstr "기본 MIME 유형 복구"
|
562 |
+
|
563 |
+
#: core/taxonomies.php:321 core/taxonomies.php:327 enhanced-media-library.php:378
|
564 |
+
msgid "Filter by "
|
565 |
+
msgstr "필터 적용: "
|
566 |
+
|
567 |
+
#: core/taxonomies.php:328 enhanced-media-library.php:379
|
568 |
+
msgid "All "
|
569 |
+
msgstr "모든 "
|
570 |
+
|
571 |
+
#: core/taxonomies.php:329 enhanced-media-library.php:380
|
572 |
+
msgid "Not in "
|
573 |
+
msgstr "포함되지 않음: "
|
574 |
+
|
575 |
+
#: enhanced-media-library.php:47
|
576 |
+
msgid ""
|
577 |
+
"Please deactivate and <strong>remove</strong> the old version prior to the "
|
578 |
+
"<strong>Enhanced Media Library PRO</strong> activation. All your data will remain "
|
579 |
+
"intact."
|
580 |
+
msgstr ""
|
581 |
+
"<strong>Enhanced Media Library PRO</strong>를 활성화하기 전에 오래된 버전을 비활성화 "
|
582 |
+
"및 <strong>제거</strong>해주세요. 모든 데이터는 보존됩니다."
|
583 |
+
|
584 |
+
#: enhanced-media-library.php:47
|
585 |
+
msgid "Return to Plugins"
|
586 |
+
msgstr "플러그인으로 돌아가기"
|
587 |
+
|
588 |
+
#: pro/core/bulk-edit.php:75
|
589 |
+
msgid "Remove"
|
590 |
+
msgstr "제거"
|
591 |
+
|
592 |
+
#: pro/core/bulk-edit.php:79
|
593 |
+
msgid "Deselect"
|
594 |
+
msgstr "선택 해제"
|
595 |
+
|
596 |
+
#: pro/core/bulk-edit.php:86
|
597 |
+
msgid "Caption this image…"
|
598 |
+
msgstr "이 이미지에 캡션을 추가..."
|
599 |
+
|
600 |
+
#: pro/core/bulk-edit.php:90
|
601 |
+
msgid "Describe this video…"
|
602 |
+
msgstr "이 비디오를 설명..."
|
603 |
+
|
604 |
+
#: pro/core/bulk-edit.php:92
|
605 |
+
msgid "Describe this audio file…"
|
606 |
+
msgstr "이 오디오 파일을 설명..."
|
607 |
+
|
608 |
+
#: pro/core/bulk-edit.php:94
|
609 |
+
msgid "Describe this media file…"
|
610 |
+
msgstr "이 미디어 파일을 설명..."
|
611 |
+
|
612 |
+
#: pro/core/bulk-edit.php:103
|
613 |
+
msgid "Attachments Details"
|
614 |
+
msgstr "첨부 파일 세부 정보"
|
615 |
+
|
616 |
+
#: pro/core/bulk-edit.php:157
|
617 |
+
msgid "Select All"
|
618 |
+
msgstr "모두 선택"
|
619 |
+
|
620 |
+
#: pro/core/bulk-edit.php:159
|
621 |
+
msgid "Edit Selection"
|
622 |
+
msgstr "선택 편집"
|
623 |
+
|
624 |
+
#: pro/core/bulk-edit.php:162
|
625 |
+
msgid "Deselect All"
|
626 |
+
msgstr "모두 선택 해제"
|
627 |
+
|
628 |
+
#: pro/core/bulk-edit.php:166
|
629 |
+
msgid "Delete Selected"
|
630 |
+
msgstr "선택 삭제"
|
631 |
+
|
632 |
+
#: pro/core/options-pages.php:100 pro/core/options-pages.php:101
|
633 |
+
msgid "EML PRO Updates"
|
634 |
+
msgstr "EML PRO 업데이트"
|
635 |
+
|
636 |
+
#: pro/core/options-pages.php:126 pro/enhanced-media-library-pro.php:168
|
637 |
+
msgid "Bulk Edit"
|
638 |
+
msgstr "일괄 편집"
|
639 |
+
|
640 |
+
#: pro/core/options-pages.php:134 pro/core/options-pages.php:137
|
641 |
+
msgid "Turn off 'Save Changes' button"
|
642 |
+
msgstr "'변경 사항 저장' 버튼 해제"
|
643 |
+
|
644 |
+
#: pro/core/options-pages.php:138
|
645 |
+
msgid "Save changes on the fly"
|
646 |
+
msgstr "변경 사항 즉시 저장"
|
647 |
+
|
648 |
+
#: pro/core/options-pages.php:139
|
649 |
+
msgid ""
|
650 |
+
"Any click on a taxonomy checkbox during media files bulk edition will lead to an "
|
651 |
+
"<strong style=\"color:red\">immediate saving</strong> of the data. Please, be "
|
652 |
+
"careful! You have much greater chance to <strong style=\"color:red\">accidentally "
|
653 |
+
"perform wrong re-assigning</strong> of a lot of your media files / taxonomies with "
|
654 |
+
"this option turned on."
|
655 |
+
msgstr ""
|
656 |
+
"미디어 파일 일괄 편집 도중 카테고리 확인란에 클릭하면 데이터를 <strong style=\"color:"
|
657 |
+
"red\">즉시 저장</strong>하게 됩니다. 조심해주세요! 이 옵션을 켜면 다수의 미디어 파"
|
658 |
+
"일 / 카테고리에 <strong style=\"color:red\">실수로 재할당을 잘못 수행</strong>할 가능"
|
659 |
+
"성이 훨씬 더 높습니다."
|
660 |
+
|
661 |
+
#: pro/core/options-pages.php:140
|
662 |
+
msgid ""
|
663 |
+
"Strongly NOT recommended option if you work with more than hundred of files at a "
|
664 |
+
"time."
|
665 |
+
msgstr "한 번에 100 개 이상의 파일을 작업을하는 경우 절대로 권장하지 않는 옵션임."
|
666 |
+
|
667 |
+
#: pro/core/options-pages.php:175
|
668 |
+
msgid "Updates"
|
669 |
+
msgstr "업데이트"
|
670 |
+
|
671 |
+
#: pro/core/options-pages.php:190
|
672 |
+
msgid "Enhanced Media Library PRO License"
|
673 |
+
msgstr "Enhanced Media Library PRO 라이센스"
|
674 |
+
|
675 |
+
#: pro/core/options-pages.php:215
|
676 |
+
msgid ""
|
677 |
+
"To unlock updates, please enter your license key below. You can see your license key "
|
678 |
+
"in <a href=\"http://www.wpuxsolutions.com/account/\">Your Account</a>. If you "
|
679 |
+
"don’t have a licence key, you are welcome to <a href=\"http://www."
|
680 |
+
"wpuxsolutions.com/pricing/\">purchase it</a>."
|
681 |
+
msgstr ""
|
682 |
+
"업데이트를 잠금 해제하려면, 아래 라이센스 키를 입력해주세요. <a href=\"http://www."
|
683 |
+
"wpuxsolutions.com/account/\">Your Account</a>에서 라이센스 키를 확인할 수 있습니다. "
|
684 |
+
"라이센스 키가 없을 경우, <a href=\"http://www.wpuxsolutions.com/pricing/\">구입</a>하"
|
685 |
+
"실 수 있습니다."
|
686 |
+
|
687 |
+
#: pro/core/options-pages.php:219
|
688 |
+
msgid "License Key"
|
689 |
+
msgstr "라이센스 키"
|
690 |
+
|
691 |
+
#: pro/core/options-pages.php:226
|
692 |
+
msgid "Activate License"
|
693 |
+
msgstr "라이센스 활성화"
|
694 |
+
|
695 |
+
#: pro/core/options-pages.php:243
|
696 |
+
msgid "Your license is active!"
|
697 |
+
msgstr "라이센스가 활성화되었습니다!"
|
698 |
+
|
699 |
+
#: pro/core/update.php:109 pro/core/update.php:114 pro/core/update.php:118
|
700 |
+
msgid ""
|
701 |
+
"An unexpected error occurred. Something may be wrong with WordPress.org or this "
|
702 |
+
"server’s configuration. If you continue to have problems, please try the <a "
|
703 |
+
"href=\"https://wordpress.org/support/\">support forums</a>."
|
704 |
+
msgstr ""
|
705 |
+
"예기치 않은 오류가 발생했습니다. WordPress.org 또는 이 서버의 구성에 문제가 있을 수 "
|
706 |
+
"있습니다. 문제가 계속될 경우, <a href=\"https://wordpress.org/support/\">지원 포럼</"
|
707 |
+
"a>을 시도해 보시기 바랍니다."
|
708 |
+
|
709 |
+
#: pro/core/update.php:109
|
710 |
+
msgid ""
|
711 |
+
"(WordPress could not establish a secure connection to WordPress.org. Please contact "
|
712 |
+
"your server administrator.)"
|
713 |
+
msgstr ""
|
714 |
+
"(워드프레스가 WordPress.org에 보안 연결을 설정할 수 없습니다. 서버 관리자에게 문의하"
|
715 |
+
"세요.)"
|
716 |
+
|
717 |
+
#: pro/core/update.php:184
|
718 |
+
#, php-format
|
719 |
+
msgid ""
|
720 |
+
"To unlock updates, please enter your license key on the <a href=\"%s\">Updates</a> "
|
721 |
+
"page. You can see your license key in <a href=\"%s\">Your Account</a>. If you "
|
722 |
+
"don’t have a licence key, you are welcome to <a href=\"%s\">purchase it</a>."
|
723 |
+
msgstr ""
|
724 |
+
"업데이트를 잠금 해제하려면, <a href=\"%s\">업데이트</a> 페이지에서 라이센스 키를 입력"
|
725 |
+
"해주세요. <a href=\"http://www.wpuxsolutions.com/account/\">Your Account</a>에서 라이"
|
726 |
+
"센스 키를 확인할 수 있습니다. 라이센스 키가 없을 경우, <a href=\"http://www."
|
727 |
+
"wpuxsolutions.com/pricing/\">구입</a>하실 수 있습니다."
|
728 |
+
|
729 |
+
#: pro/enhanced-media-library-pro.php:89 pro/enhanced-media-library-pro.php:100
|
730 |
+
msgid "Expand Details"
|
731 |
+
msgstr "세부 정보 펼치기"
|
732 |
+
|
733 |
+
#: pro/enhanced-media-library-pro.php:90 pro/enhanced-media-library-pro.php:101
|
734 |
+
msgid "Collapse Details"
|
735 |
+
msgstr "세부 정보 접기"
|
736 |
+
|
737 |
+
#: pro/enhanced-media-library-pro.php:93
|
738 |
+
msgid "Validation Failed. One or more fields below are required."
|
739 |
+
msgstr "검증에 실패함. 아래 하나 이상의 필드가 필요합니다."
|
740 |
+
|
741 |
+
#: pro/enhanced-media-library-pro.php:99
|
742 |
+
msgid "The changes you made will be lost if you navigate away from this page"
|
743 |
+
msgstr "이 페이지에서 벗어나면 변경 사항을 잃게 됩니다."
|
744 |
+
|
745 |
+
#: pro/enhanced-media-library-pro.php:160
|
746 |
+
msgid "ALL files belong to this item"
|
747 |
+
msgstr "이 항목에 모든 파일이 속합니다"
|
748 |
+
|
749 |
+
#: pro/enhanced-media-library-pro.php:161
|
750 |
+
msgid "SOME files belong to this item"
|
751 |
+
msgstr "이 항목에 SOME 파일이 속합니다"
|
752 |
+
|
753 |
+
#: pro/enhanced-media-library-pro.php:162
|
754 |
+
msgid "NO files belong to this item"
|
755 |
+
msgstr "이 항목에 속한 파일이 없습니다"
|
756 |
+
|
757 |
+
#: pro/enhanced-media-library-pro.php:163
|
758 |
+
msgid "Changes saved."
|
759 |
+
msgstr "변경 사항이 저장됨."
|
760 |
+
|
761 |
+
#: pro/enhanced-media-library-pro.php:164
|
762 |
+
msgid "Something went wrong."
|
763 |
+
msgstr "문제가 발생했습니다."
|
764 |
+
|
765 |
+
#: pro/enhanced-media-library-pro.php:165
|
766 |
+
msgid "Save Changes"
|
767 |
+
msgstr "변경 사항 저장"
|
768 |
+
|
769 |
+
#: pro/enhanced-media-library-pro.php:167
|
770 |
+
msgid "Edit Media Files"
|
771 |
+
msgstr "미디어 파일 편집"
|
772 |
+
|
773 |
+
#: pro/enhanced-media-library-pro.php:260
|
774 |
+
msgid ""
|
775 |
+
"<strong>Enhanced Media Library PRO</strong> does not require free version to be "
|
776 |
+
"active. Please deactivate and remove the free version of the plugin."
|
777 |
+
msgstr ""
|
778 |
+
"<strong>Enhanced Media Library PRO</strong>는 활성화 시 무료 버전이 필요없습니다. 플"
|
779 |
+
"러그인의 무료 버전을 비활성화 및 제거해주세요. "
|
780 |
+
|
781 |
+
#. Plugin Name of the plugin/theme
|
782 |
+
msgid "Enhanced Media Library"
|
783 |
+
msgstr "Enhanced Media Library"
|
784 |
+
|
785 |
+
#. Plugin Name of the plugin/theme
|
786 |
+
msgid "Enhanced Media Library PRO"
|
787 |
+
msgstr "Enhanced Media Library PRO"
|
788 |
+
|
789 |
+
#. Description of the plugin/theme
|
790 |
+
msgid "This plugin will be handy for those who need to manage a lot of media files."
|
791 |
+
msgstr "이 플러그인은 많은 미디어 파일을 관리해야 하는 사용자에게 유용합니다."
|
languages/eml.pot
CHANGED
@@ -1,24 +1,26 @@
|
|
1 |
# Copyright (C) 2015 Enhanced Media Library PRO
|
2 |
# This file is distributed under the same license as the Enhanced Media Library PRO package.
|
|
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
"Project-Id-Version: Enhanced Media Library PRO\n"
|
6 |
-
"POT-Creation-Date: 2015-
|
7 |
"Last-Translator: \n"
|
8 |
"Language-Team: \n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"X-Generator: Poedit 1.
|
13 |
"X-Poedit-Basepath: ..\n"
|
14 |
"X-Poedit-SourceCharset: UTF-8\n"
|
15 |
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
|
16 |
"esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;"
|
17 |
"_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
|
|
|
18 |
"X-Poedit-SearchPath-0: .\n"
|
19 |
"X-Poedit-SearchPathExcluded-0: *.js\n"
|
20 |
|
21 |
-
#: core/class-eml-media-list-table.php:
|
22 |
#, php-format
|
23 |
msgctxt "uploaded files"
|
24 |
msgid "All (%s)"
|
@@ -26,7 +28,7 @@ msgid_plural "All (%s)"
|
|
26 |
msgstr[0] ""
|
27 |
msgstr[1] ""
|
28 |
|
29 |
-
#: core/class-eml-media-list-table.php:
|
30 |
#, php-format
|
31 |
msgctxt "detached files"
|
32 |
msgid "Unattached (%s)"
|
@@ -34,11 +36,11 @@ msgid_plural "Unattached (%s)"
|
|
34 |
msgstr[0] ""
|
35 |
msgstr[1] ""
|
36 |
|
37 |
-
#: core/class-eml-media-list-table.php:
|
38 |
msgid "All Uncategorized"
|
39 |
msgstr ""
|
40 |
|
41 |
-
#: core/class-eml-media-list-table.php:
|
42 |
#, php-format
|
43 |
msgctxt "uploaded files"
|
44 |
msgid "Trash (%s)"
|
@@ -46,39 +48,41 @@ msgid_plural "Trash (%s)"
|
|
46 |
msgstr[0] ""
|
47 |
msgstr[1] ""
|
48 |
|
49 |
-
#: core/class-eml-media-list-table.php:
|
50 |
msgid "Filter"
|
51 |
msgstr ""
|
52 |
|
53 |
-
#: core/class-eml-media-list-table.php:
|
54 |
msgid "Reset All Filters"
|
55 |
msgstr ""
|
56 |
|
57 |
-
#: core/class-eml-media-list-table.php:
|
58 |
msgid "Empty Trash"
|
59 |
msgstr ""
|
60 |
|
61 |
-
#: core/eml-upload.php:
|
62 |
msgid "You do not have permission to upload files."
|
63 |
msgstr ""
|
64 |
|
65 |
-
#: core/eml-upload.php:
|
|
|
66 |
msgid "Overview"
|
67 |
msgstr ""
|
68 |
|
69 |
-
#: core/eml-upload.php:
|
70 |
msgid ""
|
71 |
"All the files you’ve uploaded are listed in the Media Library, with "
|
72 |
"the most recent uploads listed first."
|
73 |
msgstr ""
|
74 |
|
75 |
-
#: core/eml-upload.php:
|
|
|
76 |
msgid ""
|
77 |
"You can view your media in a simple visual grid or a list with columns. "
|
78 |
"Switch between these views using the icons to the left above the media."
|
79 |
msgstr ""
|
80 |
|
81 |
-
#: core/eml-upload.php:
|
82 |
msgid ""
|
83 |
"To delete media items, click the Bulk Select button at the top of the "
|
84 |
"screen. Select any items you wish to delete, then click the Delete Selected "
|
@@ -86,112 +90,116 @@ msgid ""
|
|
86 |
"media."
|
87 |
msgstr ""
|
88 |
|
89 |
-
#: core/eml-upload.php:
|
90 |
msgid "Attachment Details"
|
91 |
msgstr ""
|
92 |
|
93 |
-
#: core/eml-upload.php:
|
94 |
msgid ""
|
95 |
"Clicking an item will display an Attachment Details dialog, which allows you "
|
96 |
"to preview media and make quick edits. Any changes you make to the "
|
97 |
"attachment details will be automatically saved."
|
98 |
msgstr ""
|
99 |
|
100 |
-
#: core/eml-upload.php:
|
101 |
msgid ""
|
102 |
"Use the arrow buttons at the top of the dialog, or the left and right arrow "
|
103 |
"keys on your keyboard, to navigate between media items quickly."
|
104 |
msgstr ""
|
105 |
|
106 |
-
#: core/eml-upload.php:
|
107 |
msgid ""
|
108 |
"You can also delete individual items and access the extended edit screen "
|
109 |
"from the details dialog."
|
110 |
msgstr ""
|
111 |
|
112 |
-
#: core/eml-upload.php:
|
|
|
113 |
msgid "For more information:"
|
114 |
msgstr ""
|
115 |
|
116 |
-
#: core/eml-upload.php:
|
117 |
msgid ""
|
118 |
"<a href=\"http://codex.wordpress.org/Media_Library_Screen\" target=\"_blank"
|
119 |
"\">Documentation on Media Library</a>"
|
120 |
msgstr ""
|
121 |
|
122 |
-
#: core/eml-upload.php:
|
|
|
123 |
msgid ""
|
124 |
"<a href=\"https://wordpress.org/support/\" target=\"_blank\">Support Forums</"
|
125 |
"a>"
|
126 |
msgstr ""
|
127 |
|
128 |
-
#: core/eml-upload.php:
|
|
|
129 |
msgid "Media Library"
|
130 |
msgstr ""
|
131 |
|
132 |
-
#: core/eml-upload.php:
|
|
|
133 |
msgctxt "file"
|
134 |
msgid "Add New"
|
135 |
msgstr ""
|
136 |
|
137 |
-
#: core/eml-upload.php:
|
138 |
msgid ""
|
139 |
"The grid view for the Media Library requires JavaScript. <a href=\"upload."
|
140 |
"php?mode=list\">Switch to the list view</a>."
|
141 |
msgstr ""
|
142 |
|
143 |
-
#: core/eml-upload.php:
|
144 |
msgid "You are not allowed to edit this post."
|
145 |
msgstr ""
|
146 |
|
147 |
-
#: core/eml-upload.php:
|
148 |
msgid "You are not allowed to move this post to the trash."
|
149 |
msgstr ""
|
150 |
|
151 |
-
#: core/eml-upload.php:
|
152 |
msgid "Error in moving to trash."
|
153 |
msgstr ""
|
154 |
|
155 |
-
#: core/eml-upload.php:
|
156 |
msgid "You are not allowed to move this post out of the trash."
|
157 |
msgstr ""
|
158 |
|
159 |
-
#: core/eml-upload.php:
|
160 |
msgid "Error in restoring from trash."
|
161 |
msgstr ""
|
162 |
|
163 |
-
#: core/eml-upload.php:
|
164 |
msgid "You are not allowed to delete this post."
|
165 |
msgstr ""
|
166 |
|
167 |
-
#: core/eml-upload.php:
|
168 |
msgid "Error in deleting."
|
169 |
msgstr ""
|
170 |
|
171 |
-
#: core/eml-upload.php:
|
172 |
msgctxt "items per page (screen options)"
|
173 |
msgid "Media items"
|
174 |
msgstr ""
|
175 |
|
176 |
-
#: core/eml-upload.php:
|
177 |
msgid ""
|
178 |
"All the files you’ve uploaded are listed in the Media Library, with "
|
179 |
"the most recent uploads listed first. You can use the Screen Options tab to "
|
180 |
"customize the display of this screen."
|
181 |
msgstr ""
|
182 |
|
183 |
-
#: core/eml-upload.php:
|
184 |
msgid ""
|
185 |
"You can narrow the list by file type/status using the text link filters at "
|
186 |
"the top of the screen. You also can refine the list by date using the "
|
187 |
"dropdown menu above the media table."
|
188 |
msgstr ""
|
189 |
|
190 |
-
#: core/eml-upload.php:
|
191 |
msgid "Available Actions"
|
192 |
msgstr ""
|
193 |
|
194 |
-
#: core/eml-upload.php:
|
195 |
msgid ""
|
196 |
"Hovering over a row reveals action links: Edit, Delete Permanently, and "
|
197 |
"View. Clicking Edit or on the media file’s name displays a simple "
|
@@ -201,445 +209,695 @@ msgid ""
|
|
201 |
"page for that file."
|
202 |
msgstr ""
|
203 |
|
204 |
-
#: core/eml-upload.php:
|
205 |
msgid "Attaching Files"
|
206 |
msgstr ""
|
207 |
|
208 |
-
#: core/eml-upload.php:
|
209 |
msgid ""
|
210 |
"If a media file has not been attached to any post, you will see that in the "
|
211 |
"Attached To column, and can click on Attach File to launch a small popup "
|
212 |
"that will allow you to search for a post and attach the file."
|
213 |
msgstr ""
|
214 |
|
215 |
-
#: core/eml-upload.php:
|
216 |
#, php-format
|
217 |
msgid "Search results for “%s”"
|
218 |
msgstr ""
|
219 |
|
220 |
-
#: core/eml-upload.php:
|
|
|
221 |
msgid "Media attachment updated."
|
222 |
msgstr ""
|
223 |
|
224 |
-
#: core/eml-upload.php:
|
225 |
#, php-format
|
226 |
msgid "Reattached %d attachment."
|
227 |
msgid_plural "Reattached %d attachments."
|
228 |
msgstr[0] ""
|
229 |
msgstr[1] ""
|
230 |
|
231 |
-
#: core/eml-upload.php:
|
|
|
232 |
#, php-format
|
233 |
msgid "Media attachment permanently deleted."
|
234 |
msgid_plural "%d media attachments permanently deleted."
|
235 |
msgstr[0] ""
|
236 |
msgstr[1] ""
|
237 |
|
238 |
-
#: core/eml-upload.php:
|
|
|
239 |
#, php-format
|
240 |
msgid "Media attachment moved to the trash."
|
241 |
msgid_plural "%d media attachments moved to the trash."
|
242 |
msgstr[0] ""
|
243 |
msgstr[1] ""
|
244 |
|
245 |
-
#: core/eml-upload.php:
|
|
|
246 |
msgid "Undo"
|
247 |
msgstr ""
|
248 |
|
249 |
-
#: core/eml-upload.php:
|
|
|
250 |
#, php-format
|
251 |
msgid "Media attachment restored from the trash."
|
252 |
msgid_plural "%d media attachments restored from the trash."
|
253 |
msgstr[0] ""
|
254 |
msgstr[1] ""
|
255 |
|
256 |
-
#: core/eml-upload.php:
|
257 |
msgid "Media permanently deleted."
|
258 |
msgstr ""
|
259 |
|
260 |
-
#: core/eml-upload.php:
|
261 |
msgid "Error saving media attachment."
|
262 |
msgstr ""
|
263 |
|
264 |
-
#: core/eml-upload.php:
|
265 |
msgid "Media moved to the trash."
|
266 |
msgstr ""
|
267 |
|
268 |
-
#: core/eml-upload.php:
|
269 |
msgid "Media restored from the trash."
|
270 |
msgstr ""
|
271 |
|
272 |
-
#: core/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
273 |
#, php-format
|
274 |
msgid " <span class=\"count\">(%s)</span>"
|
275 |
msgid_plural " <span class=\"count\">(%s)</span>"
|
276 |
msgstr[0] ""
|
277 |
msgstr[1] ""
|
278 |
|
279 |
-
#: core/options-pages.php:
|
280 |
-
|
|
|
|
|
|
|
|
|
281 |
msgid "Media Settings"
|
282 |
msgstr ""
|
283 |
|
284 |
-
#: core/options-pages.php:
|
285 |
-
#: core/options-pages.php:
|
286 |
-
#: core/options-pages.php:
|
287 |
msgid "Settings"
|
288 |
msgstr ""
|
289 |
|
290 |
-
#: core/options-pages.php:
|
291 |
-
#: core/options-pages.php:
|
292 |
msgid "Taxonomies"
|
293 |
msgstr ""
|
294 |
|
295 |
-
#: core/options-pages.php:
|
296 |
-
#: core/options-pages.php:
|
297 |
msgid "MIME Types"
|
298 |
msgstr ""
|
299 |
|
300 |
-
#: core/options-pages.php:
|
301 |
-
#: core/options-pages.php:
|
302 |
-
#: core/options-pages.php:
|
303 |
msgid "Edit"
|
304 |
msgstr ""
|
305 |
|
306 |
-
#: core/options-pages.php:
|
307 |
msgid "Close"
|
308 |
msgstr ""
|
309 |
|
310 |
-
#: core/options-pages.php:
|
311 |
-
#: core/options-pages.php:
|
312 |
msgid "View"
|
313 |
msgstr ""
|
314 |
|
315 |
-
#: core/options-pages.php:
|
316 |
-
#: core/options-pages.php:
|
317 |
msgid "Update"
|
318 |
msgstr ""
|
319 |
|
320 |
-
#: core/options-pages.php:
|
321 |
-
#: core/options-pages.php:
|
322 |
msgid "Add New"
|
323 |
msgstr ""
|
324 |
|
325 |
-
#: core/options-pages.php:
|
326 |
-
#: core/options-pages.php:
|
327 |
msgid "New"
|
328 |
msgstr ""
|
329 |
|
330 |
-
#: core/options-pages.php:
|
331 |
msgid "Name"
|
332 |
msgstr ""
|
333 |
|
334 |
-
#: core/options-pages.php:
|
335 |
-
#: core/options-pages.php:
|
336 |
msgid "Parent"
|
337 |
msgstr ""
|
338 |
|
339 |
-
#: core/options-pages.php:
|
340 |
-
#: core/options-pages.php:
|
341 |
msgid "All"
|
342 |
msgstr ""
|
343 |
|
344 |
-
#: core/options-pages.php:
|
345 |
-
#: core/options-pages.php:
|
346 |
msgid "Search"
|
347 |
msgstr ""
|
348 |
|
349 |
-
#: core/options-pages.php:
|
350 |
msgid ""
|
351 |
"Taxonomy will be deleted permanently! Your media files will remain intacted, "
|
352 |
"but all the connections with this taxonomy and its terms will be lost."
|
353 |
msgstr ""
|
354 |
|
355 |
-
#: core/options-pages.php:
|
356 |
msgid "There is already a taxonomy with the same name. Please chose other one."
|
357 |
msgstr ""
|
358 |
|
359 |
-
#: core/options-pages.php:
|
360 |
msgid "New Taxonomy"
|
361 |
msgstr ""
|
362 |
|
363 |
-
#: core/options-pages.php:
|
364 |
msgid "Please choose Singular and Plural names for all your new taxomonies."
|
365 |
msgstr ""
|
366 |
|
367 |
-
#: core/options-pages.php:
|
368 |
msgid "Please choose Singilar name for all your new taxomonies."
|
369 |
msgstr ""
|
370 |
|
371 |
-
#: core/options-pages.php:
|
372 |
msgid "Please choose Plural Name for all your new taxomonies."
|
373 |
msgstr ""
|
374 |
|
375 |
-
#: core/options-pages.php:
|
376 |
msgid "Warning! All your custom MIME Types will be deleted by this operation."
|
377 |
msgstr ""
|
378 |
|
379 |
-
#: core/options-pages.php:
|
380 |
msgid "Please fill into all fields."
|
381 |
msgstr ""
|
382 |
|
383 |
-
#: core/options-pages.php:
|
384 |
msgid "Duplicate extensions or MIME types. Please chose other one."
|
385 |
msgstr ""
|
386 |
|
387 |
-
#: core/options-pages.php:
|
388 |
-
#:
|
389 |
msgid "You do not have sufficient permissions to access this page."
|
390 |
msgstr ""
|
391 |
|
392 |
-
#: core/options-pages.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
393 |
msgid "Media Taxonomies"
|
394 |
msgstr ""
|
395 |
|
396 |
-
#: core/options-pages.php:
|
397 |
msgid "Assign following taxonomies to Media Library:"
|
398 |
msgstr ""
|
399 |
|
400 |
-
#: core/options-pages.php:
|
401 |
-
#: core/options-pages.php:
|
402 |
msgid "Assign Taxonomy"
|
403 |
msgstr ""
|
404 |
|
405 |
-
#: core/options-pages.php:
|
406 |
msgid "Edit Taxonomy"
|
407 |
msgstr ""
|
408 |
|
409 |
-
#: core/options-pages.php:
|
410 |
msgid "Delete Taxonomy"
|
411 |
msgstr ""
|
412 |
|
413 |
-
#: core/options-pages.php:
|
414 |
msgid "Labels"
|
415 |
msgstr ""
|
416 |
|
417 |
-
#: core/options-pages.php:
|
418 |
msgid "Singular"
|
419 |
msgstr ""
|
420 |
|
421 |
-
#: core/options-pages.php:
|
422 |
msgid "Plural"
|
423 |
msgstr ""
|
424 |
|
425 |
-
#: core/options-pages.php:
|
426 |
msgid "Menu Name"
|
427 |
msgstr ""
|
428 |
|
429 |
-
#: core/options-pages.php:
|
430 |
msgid "Taxonomy Name"
|
431 |
msgstr ""
|
432 |
|
433 |
-
#: core/options-pages.php:
|
434 |
msgid "Hierarchical"
|
435 |
msgstr ""
|
436 |
|
437 |
-
#: core/options-pages.php:
|
438 |
msgid "Column in List View"
|
439 |
msgstr ""
|
440 |
|
441 |
-
#: core/options-pages.php:
|
442 |
-
#: core/options-pages.php:
|
443 |
msgid "Filter in List View"
|
444 |
msgstr ""
|
445 |
|
446 |
-
#: core/options-pages.php:
|
447 |
-
#: core/options-pages.php:
|
448 |
msgid "Filter in Grid View / Media Popup"
|
449 |
msgstr ""
|
450 |
|
451 |
-
#: core/options-pages.php:
|
452 |
-
#: core/options-pages.php:
|
453 |
msgid "Edit in Media Popup"
|
454 |
msgstr ""
|
455 |
|
456 |
-
#: core/options-pages.php:
|
457 |
msgid "Show in Nav Menu"
|
458 |
msgstr ""
|
459 |
|
460 |
-
#: core/options-pages.php:
|
461 |
-
msgid "Remember
|
462 |
msgstr ""
|
463 |
|
464 |
-
#: core/options-pages.php:
|
465 |
msgid "Rewrite Slug"
|
466 |
msgstr ""
|
467 |
|
468 |
-
#: core/options-pages.php:
|
469 |
msgid "Slug with Front"
|
470 |
msgstr ""
|
471 |
|
472 |
-
#: core/options-pages.php:
|
473 |
msgid "Add New Taxonomy"
|
474 |
msgstr ""
|
475 |
|
476 |
-
#: core/options-pages.php:
|
477 |
msgid "Non-Media Taxonomies"
|
478 |
msgstr ""
|
479 |
|
480 |
-
#: core/options-pages.php:
|
481 |
msgid "Options"
|
482 |
msgstr ""
|
483 |
|
484 |
-
#: core/options-pages.php:
|
485 |
msgid "Taxonomy archive pages"
|
486 |
msgstr ""
|
487 |
|
488 |
-
#: core/options-pages.php:
|
489 |
msgid "Turn on media taxonomy archive pages on the front-end"
|
490 |
msgstr ""
|
491 |
|
492 |
-
#: core/options-pages.php:
|
493 |
msgid ""
|
494 |
"Re-save your permalink settings after this option change to make it work."
|
495 |
msgstr ""
|
496 |
|
497 |
-
#: core/options-pages.php:
|
498 |
msgid "Assign all like hierarchical"
|
499 |
msgstr ""
|
500 |
|
501 |
-
#: core/options-pages.php:
|
502 |
msgid ""
|
503 |
"Show non-hierarchical taxonomies like hierarchical in Grid View / Media Popup"
|
504 |
msgstr ""
|
505 |
|
506 |
-
#: core/options-pages.php:
|
507 |
msgid "Force filters"
|
508 |
msgstr ""
|
509 |
|
510 |
-
#: core/options-pages.php:
|
511 |
msgid "Show media filters for ANY Media Popup."
|
512 |
msgstr ""
|
513 |
|
514 |
-
#: core/options-pages.php:
|
515 |
msgid ""
|
516 |
"May be useful for those who need forcing filters for third-party plugins or "
|
517 |
"themes."
|
518 |
msgstr ""
|
519 |
|
520 |
-
#: core/options-pages.php:
|
521 |
msgid "Add New MIME Type"
|
522 |
msgstr ""
|
523 |
|
524 |
-
#: core/options-pages.php:
|
525 |
msgid "Extension"
|
526 |
msgstr ""
|
527 |
|
528 |
-
#: core/options-pages.php:
|
529 |
msgid "MIME Type"
|
530 |
msgstr ""
|
531 |
|
532 |
-
#: core/options-pages.php:
|
533 |
msgid "Singular Label"
|
534 |
msgstr ""
|
535 |
|
536 |
-
#: core/options-pages.php:
|
537 |
msgid "Plural Label"
|
538 |
msgstr ""
|
539 |
|
540 |
-
#: core/options-pages.php:
|
541 |
-
#: core/options-pages.php:
|
542 |
msgid "Add Filter"
|
543 |
msgstr ""
|
544 |
|
545 |
-
#: core/options-pages.php:
|
546 |
-
#: core/options-pages.php:
|
547 |
msgid "Allow Upload"
|
548 |
msgstr ""
|
549 |
|
550 |
-
#: core/options-pages.php:
|
551 |
msgid "Delete MIME Type"
|
552 |
msgstr ""
|
553 |
|
554 |
-
#: core/options-pages.php:
|
555 |
-
msgid "Restore default MIME Types"
|
|
|
|
|
|
|
|
|
556 |
msgstr ""
|
557 |
|
558 |
-
#: core/taxonomies.php:
|
559 |
-
|
|
|
|
|
|
|
|
|
560 |
msgid "Filter by "
|
561 |
msgstr ""
|
562 |
|
563 |
-
#: core/taxonomies.php:
|
564 |
msgid "All "
|
565 |
msgstr ""
|
566 |
|
567 |
-
#: core/taxonomies.php:
|
568 |
msgid "Not in "
|
569 |
msgstr ""
|
570 |
|
571 |
-
#: enhanced-media-library.php:
|
572 |
-
msgid ""
|
573 |
-
"Please deactivate and <strong>remove</strong> the old version prior to the "
|
574 |
-
"<strong>Enhanced Media Library PRO</strong> activation. All your data will "
|
575 |
-
"remain intact."
|
576 |
-
msgstr ""
|
577 |
-
|
578 |
-
#: enhanced-media-library.php:47
|
579 |
-
msgid "Return to Plugins"
|
580 |
msgstr ""
|
581 |
|
582 |
-
#: pro/core/bulk-edit.php:
|
583 |
msgid "Remove"
|
584 |
msgstr ""
|
585 |
|
586 |
-
#: pro/core/bulk-edit.php:
|
587 |
msgid "Deselect"
|
588 |
msgstr ""
|
589 |
|
590 |
-
#: pro/core/bulk-edit.php:
|
591 |
msgid "Caption this image…"
|
592 |
msgstr ""
|
593 |
|
594 |
-
#: pro/core/bulk-edit.php:
|
595 |
msgid "Describe this video…"
|
596 |
msgstr ""
|
597 |
|
598 |
-
#: pro/core/bulk-edit.php:
|
599 |
msgid "Describe this audio file…"
|
600 |
msgstr ""
|
601 |
|
602 |
-
#: pro/core/bulk-edit.php:
|
603 |
msgid "Describe this media file…"
|
604 |
msgstr ""
|
605 |
|
606 |
-
#: pro/core/bulk-edit.php:
|
607 |
msgid "Attachments Details"
|
608 |
msgstr ""
|
609 |
|
610 |
-
#: pro/core/bulk-edit.php:
|
611 |
msgid "Select All"
|
612 |
msgstr ""
|
613 |
|
614 |
-
#: pro/core/bulk-edit.php:
|
615 |
msgid "Edit Selection"
|
616 |
msgstr ""
|
617 |
|
618 |
-
#: pro/core/bulk-edit.php:
|
619 |
msgid "Deselect All"
|
620 |
msgstr ""
|
621 |
|
622 |
-
#: pro/core/bulk-edit.php:
|
623 |
msgid "Delete Selected"
|
624 |
msgstr ""
|
625 |
|
626 |
-
#: pro/core/
|
627 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
628 |
msgstr ""
|
629 |
|
630 |
-
#: pro/core/options-pages.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
631 |
msgid "Bulk Edit"
|
632 |
msgstr ""
|
633 |
|
634 |
-
#: pro/core/options-pages.php:
|
635 |
msgid "Turn off 'Save Changes' button"
|
636 |
msgstr ""
|
637 |
|
638 |
-
#: pro/core/options-pages.php:
|
639 |
msgid "Save changes on the fly"
|
640 |
msgstr ""
|
641 |
|
642 |
-
#: pro/core/options-pages.php:
|
643 |
msgid ""
|
644 |
"Any click on a taxonomy checkbox during media files bulk edition will lead "
|
645 |
"to an <strong style=\"color:red\">immediate saving</strong> of the data. "
|
@@ -648,123 +906,132 @@ msgid ""
|
|
648 |
"files / taxonomies with this option turned on."
|
649 |
msgstr ""
|
650 |
|
651 |
-
#: pro/core/options-pages.php:
|
652 |
msgid ""
|
653 |
"Strongly NOT recommended option if you work with more than hundred of files "
|
654 |
"at a time."
|
655 |
msgstr ""
|
656 |
|
657 |
-
#: pro/core/options-pages.php:
|
658 |
-
msgid "
|
659 |
-
msgstr ""
|
660 |
-
|
661 |
-
#: pro/core/options-pages.php:190
|
662 |
-
msgid "Enhanced Media Library PRO License"
|
663 |
msgstr ""
|
664 |
|
665 |
-
#: pro/core/options-pages.php:
|
|
|
666 |
msgid ""
|
667 |
-
"To unlock updates
|
668 |
-
"license key in <a href=\"
|
669 |
-
"
|
670 |
-
"href=\"http://www.wpuxsolutions.com/pricing/\">purchase it</a>."
|
671 |
msgstr ""
|
672 |
|
673 |
-
#: pro/core/options-pages.php:
|
674 |
-
msgid "License Key"
|
675 |
-
msgstr ""
|
676 |
-
|
677 |
-
#: pro/core/options-pages.php:226
|
678 |
msgid "Activate License"
|
679 |
msgstr ""
|
680 |
|
681 |
-
#: pro/core/options-pages.php:
|
682 |
msgid "Your license is active!"
|
683 |
msgstr ""
|
684 |
|
685 |
-
#: pro/core/
|
|
|
|
|
|
|
|
|
686 |
msgid ""
|
687 |
"An unexpected error occurred. Something may be wrong with WordPress.org or "
|
688 |
"this server’s configuration. If you continue to have problems, please "
|
689 |
"try the <a href=\"https://wordpress.org/support/\">support forums</a>."
|
690 |
msgstr ""
|
691 |
|
692 |
-
#: pro/core/update.php:
|
693 |
msgid ""
|
694 |
"(WordPress could not establish a secure connection to WordPress.org. Please "
|
695 |
"contact your server administrator.)"
|
696 |
msgstr ""
|
697 |
|
698 |
-
#: pro/core/update.php:
|
699 |
#, php-format
|
700 |
msgid ""
|
701 |
-
"To unlock updates, please
|
702 |
-
"
|
703 |
-
"
|
704 |
-
"href=\"%s\">purchase it</a>."
|
705 |
msgstr ""
|
706 |
|
707 |
-
#: pro/enhanced-media-library-pro.php:
|
708 |
-
#: pro/enhanced-media-library-pro.php:100
|
709 |
msgid "Expand Details"
|
710 |
msgstr ""
|
711 |
|
712 |
-
#: pro/enhanced-media-library-pro.php:
|
713 |
-
#: pro/enhanced-media-library-pro.php:101
|
714 |
msgid "Collapse Details"
|
715 |
msgstr ""
|
716 |
|
717 |
-
#: pro/enhanced-media-library-pro.php:
|
718 |
msgid "Validation Failed. One or more fields below are required."
|
719 |
msgstr ""
|
720 |
|
721 |
-
#: pro/enhanced-media-library-pro.php:
|
722 |
msgid "The changes you made will be lost if you navigate away from this page"
|
723 |
msgstr ""
|
724 |
|
725 |
-
#: pro/enhanced-media-library-pro.php:
|
726 |
msgid "ALL files belong to this item"
|
727 |
msgstr ""
|
728 |
|
729 |
-
#: pro/enhanced-media-library-pro.php:
|
730 |
msgid "SOME files belong to this item"
|
731 |
msgstr ""
|
732 |
|
733 |
-
#: pro/enhanced-media-library-pro.php:
|
734 |
msgid "NO files belong to this item"
|
735 |
msgstr ""
|
736 |
|
737 |
-
#: pro/enhanced-media-library-pro.php:
|
738 |
msgid "Changes saved."
|
739 |
msgstr ""
|
740 |
|
741 |
-
#: pro/enhanced-media-library-pro.php:
|
742 |
msgid "Something went wrong."
|
743 |
msgstr ""
|
744 |
|
745 |
-
#: pro/enhanced-media-library-pro.php:
|
746 |
-
msgid "
|
747 |
msgstr ""
|
748 |
|
749 |
-
#: pro/enhanced-media-library-pro.php:
|
750 |
-
msgid "
|
751 |
msgstr ""
|
752 |
|
753 |
-
#: pro/enhanced-media-library-pro.php:
|
754 |
msgid ""
|
755 |
-
"<strong>
|
756 |
-
"
|
|
|
757 |
msgstr ""
|
758 |
|
759 |
-
|
760 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
761 |
msgstr ""
|
762 |
|
763 |
-
|
764 |
-
msgid "
|
|
|
|
|
|
|
765 |
msgstr ""
|
766 |
|
767 |
-
|
768 |
msgid ""
|
769 |
-
"
|
|
|
|
|
|
|
|
|
770 |
msgstr ""
|
1 |
# Copyright (C) 2015 Enhanced Media Library PRO
|
2 |
# This file is distributed under the same license as the Enhanced Media Library PRO package.
|
3 |
+
#, fuzzy
|
4 |
msgid ""
|
5 |
msgstr ""
|
6 |
"Project-Id-Version: Enhanced Media Library PRO\n"
|
7 |
+
"POT-Creation-Date: 2015-12-15 03:20+0200\n"
|
8 |
"Last-Translator: \n"
|
9 |
"Language-Team: \n"
|
10 |
"MIME-Version: 1.0\n"
|
11 |
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
"Content-Transfer-Encoding: 8bit\n"
|
13 |
+
"X-Generator: Poedit 1.8.6\n"
|
14 |
"X-Poedit-Basepath: ..\n"
|
15 |
"X-Poedit-SourceCharset: UTF-8\n"
|
16 |
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
|
17 |
"esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;"
|
18 |
"_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
|
19 |
+
"PO-Revision-Date: \n"
|
20 |
"X-Poedit-SearchPath-0: .\n"
|
21 |
"X-Poedit-SearchPathExcluded-0: *.js\n"
|
22 |
|
23 |
+
#: core/class-eml-media-list-table.php:52
|
24 |
#, php-format
|
25 |
msgctxt "uploaded files"
|
26 |
msgid "All (%s)"
|
28 |
msgstr[0] ""
|
29 |
msgstr[1] ""
|
30 |
|
31 |
+
#: core/class-eml-media-list-table.php:63
|
32 |
#, php-format
|
33 |
msgctxt "detached files"
|
34 |
msgid "Unattached (%s)"
|
36 |
msgstr[0] ""
|
37 |
msgstr[1] ""
|
38 |
|
39 |
+
#: core/class-eml-media-list-table.php:65 enhanced-media-library.php:431
|
40 |
msgid "All Uncategorized"
|
41 |
msgstr ""
|
42 |
|
43 |
+
#: core/class-eml-media-list-table.php:68
|
44 |
#, php-format
|
45 |
msgctxt "uploaded files"
|
46 |
msgid "Trash (%s)"
|
48 |
msgstr[0] ""
|
49 |
msgstr[1] ""
|
50 |
|
51 |
+
#: core/class-eml-media-list-table.php:88
|
52 |
msgid "Filter"
|
53 |
msgstr ""
|
54 |
|
55 |
+
#: core/class-eml-media-list-table.php:90 enhanced-media-library.php:435
|
56 |
msgid "Reset All Filters"
|
57 |
msgstr ""
|
58 |
|
59 |
+
#: core/class-eml-media-list-table.php:94
|
60 |
msgid "Empty Trash"
|
61 |
msgstr ""
|
62 |
|
63 |
+
#: core/eml-upload-4.1.php:21 core/eml-upload-4.4.php:20
|
64 |
msgid "You do not have permission to upload files."
|
65 |
msgstr ""
|
66 |
|
67 |
+
#: core/eml-upload-4.1.php:41 core/eml-upload-4.1.php:215
|
68 |
+
#: core/eml-upload-4.4.php:55 core/eml-upload-4.4.php:197
|
69 |
msgid "Overview"
|
70 |
msgstr ""
|
71 |
|
72 |
+
#: core/eml-upload-4.1.php:43 core/eml-upload-4.4.php:57
|
73 |
msgid ""
|
74 |
"All the files you’ve uploaded are listed in the Media Library, with "
|
75 |
"the most recent uploads listed first."
|
76 |
msgstr ""
|
77 |
|
78 |
+
#: core/eml-upload-4.1.php:44 core/eml-upload-4.1.php:219
|
79 |
+
#: core/eml-upload-4.4.php:58 core/eml-upload-4.4.php:201
|
80 |
msgid ""
|
81 |
"You can view your media in a simple visual grid or a list with columns. "
|
82 |
"Switch between these views using the icons to the left above the media."
|
83 |
msgstr ""
|
84 |
|
85 |
+
#: core/eml-upload-4.1.php:45 core/eml-upload-4.4.php:59
|
86 |
msgid ""
|
87 |
"To delete media items, click the Bulk Select button at the top of the "
|
88 |
"screen. Select any items you wish to delete, then click the Delete Selected "
|
90 |
"media."
|
91 |
msgstr ""
|
92 |
|
93 |
+
#: core/eml-upload-4.1.php:50 core/eml-upload-4.4.php:64
|
94 |
msgid "Attachment Details"
|
95 |
msgstr ""
|
96 |
|
97 |
+
#: core/eml-upload-4.1.php:52 core/eml-upload-4.4.php:66
|
98 |
msgid ""
|
99 |
"Clicking an item will display an Attachment Details dialog, which allows you "
|
100 |
"to preview media and make quick edits. Any changes you make to the "
|
101 |
"attachment details will be automatically saved."
|
102 |
msgstr ""
|
103 |
|
104 |
+
#: core/eml-upload-4.1.php:53 core/eml-upload-4.4.php:67
|
105 |
msgid ""
|
106 |
"Use the arrow buttons at the top of the dialog, or the left and right arrow "
|
107 |
"keys on your keyboard, to navigate between media items quickly."
|
108 |
msgstr ""
|
109 |
|
110 |
+
#: core/eml-upload-4.1.php:54 core/eml-upload-4.4.php:68
|
111 |
msgid ""
|
112 |
"You can also delete individual items and access the extended edit screen "
|
113 |
"from the details dialog."
|
114 |
msgstr ""
|
115 |
|
116 |
+
#: core/eml-upload-4.1.php:58 core/eml-upload-4.1.php:235
|
117 |
+
#: core/eml-upload-4.4.php:72 core/eml-upload-4.4.php:217
|
118 |
msgid "For more information:"
|
119 |
msgstr ""
|
120 |
|
121 |
+
#: core/eml-upload-4.1.php:59 core/eml-upload-4.1.php:236
|
122 |
msgid ""
|
123 |
"<a href=\"http://codex.wordpress.org/Media_Library_Screen\" target=\"_blank"
|
124 |
"\">Documentation on Media Library</a>"
|
125 |
msgstr ""
|
126 |
|
127 |
+
#: core/eml-upload-4.1.php:60 core/eml-upload-4.1.php:237
|
128 |
+
#: core/eml-upload-4.4.php:74 core/eml-upload-4.4.php:219
|
129 |
msgid ""
|
130 |
"<a href=\"https://wordpress.org/support/\" target=\"_blank\">Support Forums</"
|
131 |
"a>"
|
132 |
msgstr ""
|
133 |
|
134 |
+
#: core/eml-upload-4.1.php:63 core/eml-upload-4.1.php:206
|
135 |
+
#: core/eml-upload-4.4.php:77 core/eml-upload-4.4.php:188
|
136 |
msgid "Media Library"
|
137 |
msgstr ""
|
138 |
|
139 |
+
#: core/eml-upload-4.1.php:73 core/eml-upload-4.1.php:248
|
140 |
+
#: core/eml-upload-4.4.php:87 core/eml-upload-4.4.php:236
|
141 |
msgctxt "file"
|
142 |
msgid "Add New"
|
143 |
msgstr ""
|
144 |
|
145 |
+
#: core/eml-upload-4.1.php:78 core/eml-upload-4.4.php:92
|
146 |
msgid ""
|
147 |
"The grid view for the Media Library requires JavaScript. <a href=\"upload."
|
148 |
"php?mode=list\">Switch to the list view</a>."
|
149 |
msgstr ""
|
150 |
|
151 |
+
#: core/eml-upload-4.1.php:127
|
152 |
msgid "You are not allowed to edit this post."
|
153 |
msgstr ""
|
154 |
|
155 |
+
#: core/eml-upload-4.1.php:164
|
156 |
msgid "You are not allowed to move this post to the trash."
|
157 |
msgstr ""
|
158 |
|
159 |
+
#: core/eml-upload-4.1.php:167 core/eml-upload-4.4.php:149
|
160 |
msgid "Error in moving to trash."
|
161 |
msgstr ""
|
162 |
|
163 |
+
#: core/eml-upload-4.1.php:176
|
164 |
msgid "You are not allowed to move this post out of the trash."
|
165 |
msgstr ""
|
166 |
|
167 |
+
#: core/eml-upload-4.1.php:179 core/eml-upload-4.4.php:161
|
168 |
msgid "Error in restoring from trash."
|
169 |
msgstr ""
|
170 |
|
171 |
+
#: core/eml-upload-4.1.php:188
|
172 |
msgid "You are not allowed to delete this post."
|
173 |
msgstr ""
|
174 |
|
175 |
+
#: core/eml-upload-4.1.php:191 core/eml-upload-4.4.php:173
|
176 |
msgid "Error in deleting."
|
177 |
msgstr ""
|
178 |
|
179 |
+
#: core/eml-upload-4.1.php:211
|
180 |
msgctxt "items per page (screen options)"
|
181 |
msgid "Media items"
|
182 |
msgstr ""
|
183 |
|
184 |
+
#: core/eml-upload-4.1.php:217 core/eml-upload-4.4.php:199
|
185 |
msgid ""
|
186 |
"All the files you’ve uploaded are listed in the Media Library, with "
|
187 |
"the most recent uploads listed first. You can use the Screen Options tab to "
|
188 |
"customize the display of this screen."
|
189 |
msgstr ""
|
190 |
|
191 |
+
#: core/eml-upload-4.1.php:218 core/eml-upload-4.4.php:200
|
192 |
msgid ""
|
193 |
"You can narrow the list by file type/status using the text link filters at "
|
194 |
"the top of the screen. You also can refine the list by date using the "
|
195 |
"dropdown menu above the media table."
|
196 |
msgstr ""
|
197 |
|
198 |
+
#: core/eml-upload-4.1.php:223 core/eml-upload-4.4.php:205
|
199 |
msgid "Available Actions"
|
200 |
msgstr ""
|
201 |
|
202 |
+
#: core/eml-upload-4.1.php:225 core/eml-upload-4.4.php:207
|
203 |
msgid ""
|
204 |
"Hovering over a row reveals action links: Edit, Delete Permanently, and "
|
205 |
"View. Clicking Edit or on the media file’s name displays a simple "
|
209 |
"page for that file."
|
210 |
msgstr ""
|
211 |
|
212 |
+
#: core/eml-upload-4.1.php:229 core/eml-upload-4.4.php:211
|
213 |
msgid "Attaching Files"
|
214 |
msgstr ""
|
215 |
|
216 |
+
#: core/eml-upload-4.1.php:231 core/eml-upload-4.4.php:213
|
217 |
msgid ""
|
218 |
"If a media file has not been attached to any post, you will see that in the "
|
219 |
"Attached To column, and can click on Attach File to launch a small popup "
|
220 |
"that will allow you to search for a post and attach the file."
|
221 |
msgstr ""
|
222 |
|
223 |
+
#: core/eml-upload-4.1.php:251 core/eml-upload-4.4.php:239
|
224 |
#, php-format
|
225 |
msgid "Search results for “%s”"
|
226 |
msgstr ""
|
227 |
|
228 |
+
#: core/eml-upload-4.1.php:257 core/eml-upload-4.1.php:282
|
229 |
+
#: core/eml-upload-4.4.php:245 core/eml-upload-4.4.php:290
|
230 |
msgid "Media attachment updated."
|
231 |
msgstr ""
|
232 |
|
233 |
+
#: core/eml-upload-4.1.php:262 core/eml-upload-4.4.php:250
|
234 |
#, php-format
|
235 |
msgid "Reattached %d attachment."
|
236 |
msgid_plural "Reattached %d attachments."
|
237 |
msgstr[0] ""
|
238 |
msgstr[1] ""
|
239 |
|
240 |
+
#: core/eml-upload-4.1.php:267 core/eml-upload-4.4.php:261
|
241 |
+
#: core/eml-upload-4.4.php:291
|
242 |
#, php-format
|
243 |
msgid "Media attachment permanently deleted."
|
244 |
msgid_plural "%d media attachments permanently deleted."
|
245 |
msgstr[0] ""
|
246 |
msgstr[1] ""
|
247 |
|
248 |
+
#: core/eml-upload-4.1.php:272 core/eml-upload-4.4.php:271
|
249 |
+
#: core/eml-upload-4.4.php:293
|
250 |
#, php-format
|
251 |
msgid "Media attachment moved to the trash."
|
252 |
msgid_plural "%d media attachments moved to the trash."
|
253 |
msgstr[0] ""
|
254 |
msgstr[1] ""
|
255 |
|
256 |
+
#: core/eml-upload-4.1.php:273 core/eml-upload-4.1.php:285
|
257 |
+
#: core/eml-upload-4.4.php:276 core/eml-upload-4.4.php:293
|
258 |
msgid "Undo"
|
259 |
msgstr ""
|
260 |
|
261 |
+
#: core/eml-upload-4.1.php:278 core/eml-upload-4.4.php:282
|
262 |
+
#: core/eml-upload-4.4.php:294
|
263 |
#, php-format
|
264 |
msgid "Media attachment restored from the trash."
|
265 |
msgid_plural "%d media attachments restored from the trash."
|
266 |
msgstr[0] ""
|
267 |
msgstr[1] ""
|
268 |
|
269 |
+
#: core/eml-upload-4.1.php:283
|
270 |
msgid "Media permanently deleted."
|
271 |
msgstr ""
|
272 |
|
273 |
+
#: core/eml-upload-4.1.php:284 core/eml-upload-4.4.php:292
|
274 |
msgid "Error saving media attachment."
|
275 |
msgstr ""
|
276 |
|
277 |
+
#: core/eml-upload-4.1.php:285
|
278 |
msgid "Media moved to the trash."
|
279 |
msgstr ""
|
280 |
|
281 |
+
#: core/eml-upload-4.1.php:286
|
282 |
msgid "Media restored from the trash."
|
283 |
msgstr ""
|
284 |
|
285 |
+
#: core/eml-upload-4.4.php:73 core/eml-upload-4.4.php:218
|
286 |
+
msgid ""
|
287 |
+
"<a href=\"https://codex.wordpress.org/Media_Library_Screen\" target=\"_blank"
|
288 |
+
"\">Documentation on Media Library</a>"
|
289 |
+
msgstr ""
|
290 |
+
|
291 |
+
#: core/eml-upload-4.4.php:146
|
292 |
+
msgid "You are not allowed to move this item to the Trash."
|
293 |
+
msgstr ""
|
294 |
+
|
295 |
+
#: core/eml-upload-4.4.php:158
|
296 |
+
msgid "You are not allowed to move this item out of the Trash."
|
297 |
+
msgstr ""
|
298 |
+
|
299 |
+
#: core/eml-upload-4.4.php:170
|
300 |
+
msgid "You are not allowed to delete this item."
|
301 |
+
msgstr ""
|
302 |
+
|
303 |
+
#: core/eml-upload-4.4.php:223
|
304 |
+
msgid "Filter media items list"
|
305 |
+
msgstr ""
|
306 |
+
|
307 |
+
#: core/eml-upload-4.4.php:224
|
308 |
+
msgid "Media items list navigation"
|
309 |
+
msgstr ""
|
310 |
+
|
311 |
+
#: core/eml-upload-4.4.php:225
|
312 |
+
msgid "Media items list"
|
313 |
+
msgstr ""
|
314 |
+
|
315 |
+
#: core/eml-upload-4.4.php:255
|
316 |
+
#, php-format
|
317 |
+
msgid "Detached %d attachment."
|
318 |
+
msgid_plural "Detached %d attachments."
|
319 |
+
msgstr[0] ""
|
320 |
+
msgstr[1] ""
|
321 |
+
|
322 |
+
#: core/eml-upload-4.4.php:263
|
323 |
+
#, php-format
|
324 |
+
msgid "%d media attachment permanently deleted."
|
325 |
+
msgid_plural "%d media attachments permanently deleted."
|
326 |
+
msgstr[0] ""
|
327 |
+
msgstr[1] ""
|
328 |
+
|
329 |
+
#: core/eml-upload-4.4.php:273
|
330 |
+
#, php-format
|
331 |
+
msgid "%d media attachment moved to the trash."
|
332 |
+
msgid_plural "%d media attachments moved to the trash."
|
333 |
+
msgstr[0] ""
|
334 |
+
msgstr[1] ""
|
335 |
+
|
336 |
+
#: core/eml-upload-4.4.php:284
|
337 |
+
#, php-format
|
338 |
+
msgid "%d media attachment restored from the trash."
|
339 |
+
msgid_plural "%d media attachments restored from the trash."
|
340 |
+
msgstr[0] ""
|
341 |
+
msgstr[1] ""
|
342 |
+
|
343 |
+
#: core/gallery.php:280 pro/core/gallery.php:22
|
344 |
+
msgid "Gallery Settings"
|
345 |
+
msgstr ""
|
346 |
+
|
347 |
+
#: core/gallery.php:283 pro/core/gallery.php:25
|
348 |
+
msgid "Link To"
|
349 |
+
msgstr ""
|
350 |
+
|
351 |
+
#: core/gallery.php:293 pro/core/gallery.php:34
|
352 |
+
msgid "Attachment Page"
|
353 |
+
msgstr ""
|
354 |
+
|
355 |
+
#: core/gallery.php:296 pro/core/gallery.php:37
|
356 |
+
msgid "Media File"
|
357 |
+
msgstr ""
|
358 |
+
|
359 |
+
#: core/gallery.php:299 pro/core/gallery.php:40
|
360 |
+
msgid "None"
|
361 |
+
msgstr ""
|
362 |
+
|
363 |
+
#: core/gallery.php:305 pro/core/gallery.php:46
|
364 |
+
msgid "Columns"
|
365 |
+
msgstr ""
|
366 |
+
|
367 |
+
#: core/gallery.php:319
|
368 |
+
msgid "Random Order"
|
369 |
+
msgstr ""
|
370 |
+
|
371 |
+
#: core/gallery.php:324 pro/core/gallery.php:102
|
372 |
+
msgid "Size"
|
373 |
+
msgstr ""
|
374 |
+
|
375 |
+
#: core/gallery.php:334 pro/core/gallery.php:112
|
376 |
+
msgid "Thumbnail"
|
377 |
+
msgstr ""
|
378 |
+
|
379 |
+
#: core/gallery.php:335 pro/core/gallery.php:113
|
380 |
+
msgid "Medium"
|
381 |
+
msgstr ""
|
382 |
+
|
383 |
+
#: core/gallery.php:336 pro/core/gallery.php:114
|
384 |
+
msgid "Large"
|
385 |
+
msgstr ""
|
386 |
+
|
387 |
+
#: core/gallery.php:337 pro/core/gallery.php:115
|
388 |
+
msgid "Full Size"
|
389 |
+
msgstr ""
|
390 |
+
|
391 |
+
#: core/gallery.php:358 pro/core/gallery.php:134
|
392 |
+
msgid "Based On"
|
393 |
+
msgstr ""
|
394 |
+
|
395 |
+
#: core/mime-types.php:27
|
396 |
+
msgid "MIME type settings restored."
|
397 |
+
msgstr ""
|
398 |
+
|
399 |
+
#: core/mime-types.php:36
|
400 |
+
msgid "MIME type settings saved."
|
401 |
+
msgstr ""
|
402 |
+
|
403 |
+
#: core/mime-types.php:112
|
404 |
#, php-format
|
405 |
msgid " <span class=\"count\">(%s)</span>"
|
406 |
msgid_plural " <span class=\"count\">(%s)</span>"
|
407 |
msgstr[0] ""
|
408 |
msgstr[1] ""
|
409 |
|
410 |
+
#: core/options-pages.php:69 core/options-pages.php:70
|
411 |
+
msgid "Enhanced Media Library"
|
412 |
+
msgstr ""
|
413 |
+
|
414 |
+
#: core/options-pages.php:79 core/options-pages.php:80
|
415 |
+
#: core/options-pages.php:89
|
416 |
msgid "Media Settings"
|
417 |
msgstr ""
|
418 |
|
419 |
+
#: core/options-pages.php:90 core/options-pages.php:561
|
420 |
+
#: core/options-pages.php:583 core/options-pages.php:629
|
421 |
+
#: core/options-pages.php:694 core/options-pages.php:984
|
422 |
msgid "Settings"
|
423 |
msgstr ""
|
424 |
|
425 |
+
#: core/options-pages.php:97 core/options-pages.php:98
|
426 |
+
#: core/options-pages.php:494
|
427 |
msgid "Taxonomies"
|
428 |
msgstr ""
|
429 |
|
430 |
+
#: core/options-pages.php:106 core/options-pages.php:107
|
431 |
+
#: core/options-pages.php:812
|
432 |
msgid "MIME Types"
|
433 |
msgstr ""
|
434 |
|
435 |
+
#: core/options-pages.php:143 core/options-pages.php:535
|
436 |
+
#: core/options-pages.php:550 core/options-pages.php:618
|
437 |
+
#: core/options-pages.php:691
|
438 |
msgid "Edit"
|
439 |
msgstr ""
|
440 |
|
441 |
+
#: core/options-pages.php:144 pro/enhanced-media-library-pro.php:184
|
442 |
msgid "Close"
|
443 |
msgstr ""
|
444 |
|
445 |
+
#: core/options-pages.php:145 core/options-pages.php:551
|
446 |
+
#: core/options-pages.php:619
|
447 |
msgid "View"
|
448 |
msgstr ""
|
449 |
|
450 |
+
#: core/options-pages.php:146 core/options-pages.php:552
|
451 |
+
#: core/options-pages.php:620
|
452 |
msgid "Update"
|
453 |
msgstr ""
|
454 |
|
455 |
+
#: core/options-pages.php:147 core/options-pages.php:553
|
456 |
+
#: core/options-pages.php:621
|
457 |
msgid "Add New"
|
458 |
msgstr ""
|
459 |
|
460 |
+
#: core/options-pages.php:148 core/options-pages.php:554
|
461 |
+
#: core/options-pages.php:622
|
462 |
msgid "New"
|
463 |
msgstr ""
|
464 |
|
465 |
+
#: core/options-pages.php:149
|
466 |
msgid "Name"
|
467 |
msgstr ""
|
468 |
|
469 |
+
#: core/options-pages.php:150 core/options-pages.php:555
|
470 |
+
#: core/options-pages.php:623
|
471 |
msgid "Parent"
|
472 |
msgstr ""
|
473 |
|
474 |
+
#: core/options-pages.php:151 core/options-pages.php:549
|
475 |
+
#: core/options-pages.php:617
|
476 |
msgid "All"
|
477 |
msgstr ""
|
478 |
|
479 |
+
#: core/options-pages.php:152 core/options-pages.php:556
|
480 |
+
#: core/options-pages.php:624
|
481 |
msgid "Search"
|
482 |
msgstr ""
|
483 |
|
484 |
+
#: core/options-pages.php:154
|
485 |
msgid ""
|
486 |
"Taxonomy will be deleted permanently! Your media files will remain intacted, "
|
487 |
"but all the connections with this taxonomy and its terms will be lost."
|
488 |
msgstr ""
|
489 |
|
490 |
+
#: core/options-pages.php:155
|
491 |
msgid "There is already a taxonomy with the same name. Please chose other one."
|
492 |
msgstr ""
|
493 |
|
494 |
+
#: core/options-pages.php:156 core/options-pages.php:605
|
495 |
msgid "New Taxonomy"
|
496 |
msgstr ""
|
497 |
|
498 |
+
#: core/options-pages.php:157
|
499 |
msgid "Please choose Singular and Plural names for all your new taxomonies."
|
500 |
msgstr ""
|
501 |
|
502 |
+
#: core/options-pages.php:158
|
503 |
msgid "Please choose Singilar name for all your new taxomonies."
|
504 |
msgstr ""
|
505 |
|
506 |
+
#: core/options-pages.php:159
|
507 |
msgid "Please choose Plural Name for all your new taxomonies."
|
508 |
msgstr ""
|
509 |
|
510 |
+
#: core/options-pages.php:161
|
511 |
msgid "Warning! All your custom MIME Types will be deleted by this operation."
|
512 |
msgstr ""
|
513 |
|
514 |
+
#: core/options-pages.php:162
|
515 |
msgid "Please fill into all fields."
|
516 |
msgstr ""
|
517 |
|
518 |
+
#: core/options-pages.php:163
|
519 |
msgid "Duplicate extensions or MIME types. Please chose other one."
|
520 |
msgstr ""
|
521 |
|
522 |
+
#: core/options-pages.php:189 core/options-pages.php:486
|
523 |
+
#: core/options-pages.php:804
|
524 |
msgid "You do not have sufficient permissions to access this page."
|
525 |
msgstr ""
|
526 |
|
527 |
+
#: core/options-pages.php:194
|
528 |
+
msgid "Enhanced Media Library Settings"
|
529 |
+
msgstr ""
|
530 |
+
|
531 |
+
#: core/options-pages.php:205
|
532 |
+
msgid "Export"
|
533 |
+
msgstr ""
|
534 |
+
|
535 |
+
#: core/options-pages.php:209
|
536 |
+
msgid ""
|
537 |
+
"The plugin settings <strong>Media Settings > Taxonomies</strong> and "
|
538 |
+
"<strong>Media Settings > MIME Types</strong> will be exported to a "
|
539 |
+
"configuration file. It allows you to easily import the configuration into "
|
540 |
+
"another website."
|
541 |
+
msgstr ""
|
542 |
+
|
543 |
+
#: core/options-pages.php:214
|
544 |
+
msgid "Export Plugin Settings"
|
545 |
+
msgstr ""
|
546 |
+
|
547 |
+
#: core/options-pages.php:224
|
548 |
+
msgid "Import"
|
549 |
+
msgstr ""
|
550 |
+
|
551 |
+
#: core/options-pages.php:228
|
552 |
+
msgid ""
|
553 |
+
"The plugin settings <strong>Media Settings > Taxonomies</strong> and "
|
554 |
+
"<strong>Media Settings > MIME Types</strong> will be imported from a "
|
555 |
+
"configuration file which can be obtained by exporting the settings on "
|
556 |
+
"another website using the export button above."
|
557 |
+
msgstr ""
|
558 |
+
|
559 |
+
#: core/options-pages.php:229
|
560 |
+
msgid ""
|
561 |
+
"All plugin settings will be overriden by the import. You will have a chance "
|
562 |
+
"to restore current data from an automatic backup in case you are not "
|
563 |
+
"satisfied with the result of the import."
|
564 |
+
msgstr ""
|
565 |
+
|
566 |
+
#: core/options-pages.php:236
|
567 |
+
msgid "Import Plugin Settings"
|
568 |
+
msgstr ""
|
569 |
+
|
570 |
+
#: core/options-pages.php:248
|
571 |
+
msgid "Restore"
|
572 |
+
msgstr ""
|
573 |
+
|
574 |
+
#: core/options-pages.php:254
|
575 |
+
msgid "No backup available at the moment."
|
576 |
+
msgstr ""
|
577 |
+
|
578 |
+
#: core/options-pages.php:256
|
579 |
+
msgid "Backup will be created automatically before any import operation."
|
580 |
+
msgstr ""
|
581 |
+
|
582 |
+
#: core/options-pages.php:260
|
583 |
+
msgid ""
|
584 |
+
"The backup had been automatically created before the latest import opetarion."
|
585 |
+
msgstr ""
|
586 |
+
|
587 |
+
#: core/options-pages.php:264
|
588 |
+
msgid "Restore Settings from the Backup"
|
589 |
+
msgstr ""
|
590 |
+
|
591 |
+
#: core/options-pages.php:371
|
592 |
+
msgid "Please upload a file to import settings."
|
593 |
+
msgstr ""
|
594 |
+
|
595 |
+
#: core/options-pages.php:390
|
596 |
+
msgid "Plugin settings imported."
|
597 |
+
msgstr ""
|
598 |
+
|
599 |
+
#: core/options-pages.php:436
|
600 |
+
msgid "Plugin settings restored from the backup."
|
601 |
+
msgstr ""
|
602 |
+
|
603 |
+
#: core/options-pages.php:510
|
604 |
msgid "Media Taxonomies"
|
605 |
msgstr ""
|
606 |
|
607 |
+
#: core/options-pages.php:514 core/options-pages.php:666
|
608 |
msgid "Assign following taxonomies to Media Library:"
|
609 |
msgstr ""
|
610 |
|
611 |
+
#: core/options-pages.php:532 core/options-pages.php:603
|
612 |
+
#: core/options-pages.php:684
|
613 |
msgid "Assign Taxonomy"
|
614 |
msgstr ""
|
615 |
|
616 |
+
#: core/options-pages.php:535 core/options-pages.php:691
|
617 |
msgid "Edit Taxonomy"
|
618 |
msgstr ""
|
619 |
|
620 |
+
#: core/options-pages.php:539 core/options-pages.php:607
|
621 |
msgid "Delete Taxonomy"
|
622 |
msgstr ""
|
623 |
|
624 |
+
#: core/options-pages.php:544 core/options-pages.php:612
|
625 |
msgid "Labels"
|
626 |
msgstr ""
|
627 |
|
628 |
+
#: core/options-pages.php:546 core/options-pages.php:614
|
629 |
msgid "Singular"
|
630 |
msgstr ""
|
631 |
|
632 |
+
#: core/options-pages.php:547 core/options-pages.php:615
|
633 |
msgid "Plural"
|
634 |
msgstr ""
|
635 |
|
636 |
+
#: core/options-pages.php:548 core/options-pages.php:616
|
637 |
msgid "Menu Name"
|
638 |
msgstr ""
|
639 |
|
640 |
+
#: core/options-pages.php:563 core/options-pages.php:631
|
641 |
msgid "Taxonomy Name"
|
642 |
msgstr ""
|
643 |
|
644 |
+
#: core/options-pages.php:564 core/options-pages.php:632
|
645 |
msgid "Hierarchical"
|
646 |
msgstr ""
|
647 |
|
648 |
+
#: core/options-pages.php:565 core/options-pages.php:633
|
649 |
msgid "Column in List View"
|
650 |
msgstr ""
|
651 |
|
652 |
+
#: core/options-pages.php:566 core/options-pages.php:585
|
653 |
+
#: core/options-pages.php:634 core/options-pages.php:696
|
654 |
msgid "Filter in List View"
|
655 |
msgstr ""
|
656 |
|
657 |
+
#: core/options-pages.php:567 core/options-pages.php:586
|
658 |
+
#: core/options-pages.php:635 core/options-pages.php:697
|
659 |
msgid "Filter in Grid View / Media Popup"
|
660 |
msgstr ""
|
661 |
|
662 |
+
#: core/options-pages.php:568 core/options-pages.php:587
|
663 |
+
#: core/options-pages.php:636 core/options-pages.php:698
|
664 |
msgid "Edit in Media Popup"
|
665 |
msgstr ""
|
666 |
|
667 |
+
#: core/options-pages.php:569 core/options-pages.php:637
|
668 |
msgid "Show in Nav Menu"
|
669 |
msgstr ""
|
670 |
|
671 |
+
#: core/options-pages.php:570 core/options-pages.php:638
|
672 |
+
msgid "Remember Terms Order (sort)"
|
673 |
msgstr ""
|
674 |
|
675 |
+
#: core/options-pages.php:571 core/options-pages.php:639
|
676 |
msgid "Rewrite Slug"
|
677 |
msgstr ""
|
678 |
|
679 |
+
#: core/options-pages.php:572 core/options-pages.php:640
|
680 |
msgid "Slug with Front"
|
681 |
msgstr ""
|
682 |
|
683 |
+
#: core/options-pages.php:652
|
684 |
msgid "Add New Taxonomy"
|
685 |
msgstr ""
|
686 |
|
687 |
+
#: core/options-pages.php:662
|
688 |
msgid "Non-Media Taxonomies"
|
689 |
msgstr ""
|
690 |
|
691 |
+
#: core/options-pages.php:725
|
692 |
msgid "Options"
|
693 |
msgstr ""
|
694 |
|
695 |
+
#: core/options-pages.php:735 core/options-pages.php:738
|
696 |
msgid "Taxonomy archive pages"
|
697 |
msgstr ""
|
698 |
|
699 |
+
#: core/options-pages.php:739
|
700 |
msgid "Turn on media taxonomy archive pages on the front-end"
|
701 |
msgstr ""
|
702 |
|
703 |
+
#: core/options-pages.php:740
|
704 |
msgid ""
|
705 |
"Re-save your permalink settings after this option change to make it work."
|
706 |
msgstr ""
|
707 |
|
708 |
+
#: core/options-pages.php:746
|
709 |
msgid "Assign all like hierarchical"
|
710 |
msgstr ""
|
711 |
|
712 |
+
#: core/options-pages.php:749 core/options-pages.php:750
|
713 |
msgid ""
|
714 |
"Show non-hierarchical taxonomies like hierarchical in Grid View / Media Popup"
|
715 |
msgstr ""
|
716 |
|
717 |
+
#: core/options-pages.php:756 core/options-pages.php:759
|
718 |
msgid "Force filters"
|
719 |
msgstr ""
|
720 |
|
721 |
+
#: core/options-pages.php:760
|
722 |
msgid "Show media filters for ANY Media Popup."
|
723 |
msgstr ""
|
724 |
|
725 |
+
#: core/options-pages.php:761
|
726 |
msgid ""
|
727 |
"May be useful for those who need forcing filters for third-party plugins or "
|
728 |
"themes."
|
729 |
msgstr ""
|
730 |
|
731 |
+
#: core/options-pages.php:813
|
732 |
msgid "Add New MIME Type"
|
733 |
msgstr ""
|
734 |
|
735 |
+
#: core/options-pages.php:831 core/options-pages.php:886
|
736 |
msgid "Extension"
|
737 |
msgstr ""
|
738 |
|
739 |
+
#: core/options-pages.php:832 core/options-pages.php:887
|
740 |
msgid "MIME Type"
|
741 |
msgstr ""
|
742 |
|
743 |
+
#: core/options-pages.php:833 core/options-pages.php:888
|
744 |
msgid "Singular Label"
|
745 |
msgstr ""
|
746 |
|
747 |
+
#: core/options-pages.php:834 core/options-pages.php:889
|
748 |
msgid "Plural Label"
|
749 |
msgstr ""
|
750 |
|
751 |
+
#: core/options-pages.php:835 core/options-pages.php:865
|
752 |
+
#: core/options-pages.php:878 core/options-pages.php:890
|
753 |
msgid "Add Filter"
|
754 |
msgstr ""
|
755 |
|
756 |
+
#: core/options-pages.php:836 core/options-pages.php:866
|
757 |
+
#: core/options-pages.php:879 core/options-pages.php:891
|
758 |
msgid "Allow Upload"
|
759 |
msgstr ""
|
760 |
|
761 |
+
#: core/options-pages.php:880
|
762 |
msgid "Delete MIME Type"
|
763 |
msgstr ""
|
764 |
|
765 |
+
#: core/options-pages.php:897
|
766 |
+
msgid "Restore WordPress default MIME Types"
|
767 |
+
msgstr ""
|
768 |
+
|
769 |
+
#: core/options-pages.php:899 pro/enhanced-media-library-pro.php:183
|
770 |
+
msgid "Save Changes"
|
771 |
msgstr ""
|
772 |
|
773 |
+
#: core/taxonomies.php:104
|
774 |
+
msgid "Taxonomy settings saved."
|
775 |
+
msgstr ""
|
776 |
+
|
777 |
+
#: core/taxonomies.php:330 core/taxonomies.php:336
|
778 |
+
#: enhanced-media-library.php:432
|
779 |
msgid "Filter by "
|
780 |
msgstr ""
|
781 |
|
782 |
+
#: core/taxonomies.php:337 enhanced-media-library.php:433
|
783 |
msgid "All "
|
784 |
msgstr ""
|
785 |
|
786 |
+
#: core/taxonomies.php:338 enhanced-media-library.php:434
|
787 |
msgid "Not in "
|
788 |
msgstr ""
|
789 |
|
790 |
+
#: enhanced-media-library.php:446
|
791 |
+
msgid "Uploaded to post #"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
792 |
msgstr ""
|
793 |
|
794 |
+
#: pro/core/bulk-edit.php:55 pro/core/bulk-edit.php:62
|
795 |
msgid "Remove"
|
796 |
msgstr ""
|
797 |
|
798 |
+
#: pro/core/bulk-edit.php:57 pro/core/bulk-edit.php:64
|
799 |
msgid "Deselect"
|
800 |
msgstr ""
|
801 |
|
802 |
+
#: pro/core/bulk-edit.php:109
|
803 |
msgid "Caption this image…"
|
804 |
msgstr ""
|
805 |
|
806 |
+
#: pro/core/bulk-edit.php:113
|
807 |
msgid "Describe this video…"
|
808 |
msgstr ""
|
809 |
|
810 |
+
#: pro/core/bulk-edit.php:115
|
811 |
msgid "Describe this audio file…"
|
812 |
msgstr ""
|
813 |
|
814 |
+
#: pro/core/bulk-edit.php:117
|
815 |
msgid "Describe this media file…"
|
816 |
msgstr ""
|
817 |
|
818 |
+
#: pro/core/bulk-edit.php:126
|
819 |
msgid "Attachments Details"
|
820 |
msgstr ""
|
821 |
|
822 |
+
#: pro/core/bulk-edit.php:178 pro/core/bulk-edit.php:183
|
823 |
msgid "Select All"
|
824 |
msgstr ""
|
825 |
|
826 |
+
#: pro/core/bulk-edit.php:179 pro/core/bulk-edit.php:184
|
827 |
msgid "Edit Selection"
|
828 |
msgstr ""
|
829 |
|
830 |
+
#: pro/core/bulk-edit.php:180 pro/core/bulk-edit.php:185
|
831 |
msgid "Deselect All"
|
832 |
msgstr ""
|
833 |
|
834 |
+
#: pro/core/bulk-edit.php:181 pro/core/bulk-edit.php:186
|
835 |
msgid "Delete Selected"
|
836 |
msgstr ""
|
837 |
|
838 |
+
#: pro/core/gallery.php:60
|
839 |
+
msgid "Order By"
|
840 |
+
msgstr ""
|
841 |
+
|
842 |
+
#: pro/core/gallery.php:64
|
843 |
+
msgid "Date"
|
844 |
+
msgstr ""
|
845 |
+
|
846 |
+
#: pro/core/gallery.php:67
|
847 |
+
msgid "Title"
|
848 |
+
msgstr ""
|
849 |
+
|
850 |
+
#: pro/core/gallery.php:70
|
851 |
+
msgid "Custom Order"
|
852 |
+
msgstr ""
|
853 |
+
|
854 |
+
#: pro/core/gallery.php:73
|
855 |
+
msgid "Random"
|
856 |
+
msgstr ""
|
857 |
+
|
858 |
+
#: pro/core/gallery.php:89
|
859 |
+
msgid "Order"
|
860 |
+
msgstr ""
|
861 |
+
|
862 |
+
#: pro/core/gallery.php:93
|
863 |
+
msgid "Ascending"
|
864 |
+
msgstr ""
|
865 |
+
|
866 |
+
#: pro/core/gallery.php:96
|
867 |
+
msgid "Descending"
|
868 |
+
msgstr ""
|
869 |
+
|
870 |
+
#: pro/core/options-pages.php:72
|
871 |
+
msgid "Your license has been deactivated."
|
872 |
+
msgstr ""
|
873 |
+
|
874 |
+
#: pro/core/options-pages.php:82
|
875 |
+
msgid "Please check if your license key is correct and try again."
|
876 |
msgstr ""
|
877 |
|
878 |
+
#: pro/core/options-pages.php:95
|
879 |
+
msgid ""
|
880 |
+
"Wrong license key or a server error occured. Please check your license key "
|
881 |
+
"and try again."
|
882 |
+
msgstr ""
|
883 |
+
|
884 |
+
#: pro/core/options-pages.php:105
|
885 |
+
msgid "You license has been activated."
|
886 |
+
msgstr ""
|
887 |
+
|
888 |
+
#: pro/core/options-pages.php:130 pro/enhanced-media-library-pro.php:186
|
889 |
msgid "Bulk Edit"
|
890 |
msgstr ""
|
891 |
|
892 |
+
#: pro/core/options-pages.php:138 pro/core/options-pages.php:141
|
893 |
msgid "Turn off 'Save Changes' button"
|
894 |
msgstr ""
|
895 |
|
896 |
+
#: pro/core/options-pages.php:142
|
897 |
msgid "Save changes on the fly"
|
898 |
msgstr ""
|
899 |
|
900 |
+
#: pro/core/options-pages.php:143
|
901 |
msgid ""
|
902 |
"Any click on a taxonomy checkbox during media files bulk edition will lead "
|
903 |
"to an <strong style=\"color:red\">immediate saving</strong> of the data. "
|
906 |
"files / taxonomies with this option turned on."
|
907 |
msgstr ""
|
908 |
|
909 |
+
#: pro/core/options-pages.php:144
|
910 |
msgid ""
|
911 |
"Strongly NOT recommended option if you work with more than hundred of files "
|
912 |
"at a time."
|
913 |
msgstr ""
|
914 |
|
915 |
+
#: pro/core/options-pages.php:183 pro/core/options-pages.php:201
|
916 |
+
msgid "License Key"
|
|
|
|
|
|
|
|
|
917 |
msgstr ""
|
918 |
|
919 |
+
#: pro/core/options-pages.php:194
|
920 |
+
#, php-format
|
921 |
msgid ""
|
922 |
+
"To unlock updates please enter your license key below. You can get your "
|
923 |
+
"license key in <a href=\"%s\">Your Account</a>. If you do not have a "
|
924 |
+
"license, you are welcome to <a href=\"%s\">purchase it</a>."
|
|
|
925 |
msgstr ""
|
926 |
|
927 |
+
#: pro/core/options-pages.php:204
|
|
|
|
|
|
|
|
|
928 |
msgid "Activate License"
|
929 |
msgstr ""
|
930 |
|
931 |
+
#: pro/core/options-pages.php:211
|
932 |
msgid "Your license is active!"
|
933 |
msgstr ""
|
934 |
|
935 |
+
#: pro/core/options-pages.php:215
|
936 |
+
msgid "Deactivate License"
|
937 |
+
msgstr ""
|
938 |
+
|
939 |
+
#: pro/core/update.php:92 pro/core/update.php:98 pro/core/update.php:104
|
940 |
msgid ""
|
941 |
"An unexpected error occurred. Something may be wrong with WordPress.org or "
|
942 |
"this server’s configuration. If you continue to have problems, please "
|
943 |
"try the <a href=\"https://wordpress.org/support/\">support forums</a>."
|
944 |
msgstr ""
|
945 |
|
946 |
+
#: pro/core/update.php:92
|
947 |
msgid ""
|
948 |
"(WordPress could not establish a secure connection to WordPress.org. Please "
|
949 |
"contact your server administrator.)"
|
950 |
msgstr ""
|
951 |
|
952 |
+
#: pro/core/update.php:159
|
953 |
#, php-format
|
954 |
msgid ""
|
955 |
+
"To unlock updates, please <a href=\"%s\">activate your license</a>. You can "
|
956 |
+
"get your license key in <a href=\"%s\">Your Account</a>. If you do not have "
|
957 |
+
"a license, you are welcome to <a href=\"%s\">purchase it</a>."
|
|
|
958 |
msgstr ""
|
959 |
|
960 |
+
#: pro/enhanced-media-library-pro.php:97 pro/enhanced-media-library-pro.php:109
|
|
|
961 |
msgid "Expand Details"
|
962 |
msgstr ""
|
963 |
|
964 |
+
#: pro/enhanced-media-library-pro.php:98 pro/enhanced-media-library-pro.php:110
|
|
|
965 |
msgid "Collapse Details"
|
966 |
msgstr ""
|
967 |
|
968 |
+
#: pro/enhanced-media-library-pro.php:101
|
969 |
msgid "Validation Failed. One or more fields below are required."
|
970 |
msgstr ""
|
971 |
|
972 |
+
#: pro/enhanced-media-library-pro.php:108
|
973 |
msgid "The changes you made will be lost if you navigate away from this page"
|
974 |
msgstr ""
|
975 |
|
976 |
+
#: pro/enhanced-media-library-pro.php:178
|
977 |
msgid "ALL files belong to this item"
|
978 |
msgstr ""
|
979 |
|
980 |
+
#: pro/enhanced-media-library-pro.php:179
|
981 |
msgid "SOME files belong to this item"
|
982 |
msgstr ""
|
983 |
|
984 |
+
#: pro/enhanced-media-library-pro.php:180
|
985 |
msgid "NO files belong to this item"
|
986 |
msgstr ""
|
987 |
|
988 |
+
#: pro/enhanced-media-library-pro.php:181
|
989 |
msgid "Changes saved."
|
990 |
msgstr ""
|
991 |
|
992 |
+
#: pro/enhanced-media-library-pro.php:182
|
993 |
msgid "Something went wrong."
|
994 |
msgstr ""
|
995 |
|
996 |
+
#: pro/enhanced-media-library-pro.php:185
|
997 |
+
msgid "Edit Media Files"
|
998 |
msgstr ""
|
999 |
|
1000 |
+
#: pro/enhanced-media-library-pro.php:199
|
1001 |
+
msgid "Create a filter-based gallery"
|
1002 |
msgstr ""
|
1003 |
|
1004 |
+
#: pro/enhanced-media-library-pro.php:272
|
1005 |
msgid ""
|
1006 |
+
"Please deactivate and <strong>remove</strong> the old FREE version prior to "
|
1007 |
+
"the <strong>Enhanced Media Library PRO</strong> activation. All your data "
|
1008 |
+
"will remain intact."
|
1009 |
msgstr ""
|
1010 |
|
1011 |
+
#: pro/enhanced-media-library-pro.php:272
|
1012 |
+
msgid "Return to Plugins"
|
1013 |
+
msgstr ""
|
1014 |
+
|
1015 |
+
#: pro/enhanced-media-library-pro.php:314
|
1016 |
+
msgid ""
|
1017 |
+
"Both FREE and PRO versions of the Enhanced Media Library are network active. "
|
1018 |
+
"<strong>Enhanced Media Library PRO</strong> does not require free version to "
|
1019 |
+
"be active. Please network deactivate and delete the free versions of the "
|
1020 |
+
"plugin. All your data will remail intact."
|
1021 |
msgstr ""
|
1022 |
|
1023 |
+
#: pro/enhanced-media-library-pro.php:331
|
1024 |
+
msgid ""
|
1025 |
+
"<strong>Enhanced Media Library PRO</strong> does not require free version to "
|
1026 |
+
"be active. Please deactivate and delete the free version of the plugin. All "
|
1027 |
+
"your data will remain intact."
|
1028 |
msgstr ""
|
1029 |
|
1030 |
+
#: pro/enhanced-media-library-pro.php:347
|
1031 |
msgid ""
|
1032 |
+
"Both FREE and PRO versions of the Enhanced Media Library are active for this "
|
1033 |
+
"site. <strong>Enhanced Media Library PRO</strong> does not require free "
|
1034 |
+
"version to be active. Please deactivate (or network deactivate) and delete "
|
1035 |
+
"the free version of the plugin for this site. All your data will remail "
|
1036 |
+
"intact."
|
1037 |
msgstr ""
|
readme.txt
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
=== Enhanced Media Library ===
|
2 |
Contributors: webbistro
|
3 |
-
Tags: media library,
|
4 |
Requires at least: 4.0
|
5 |
-
Tested up to: 4.
|
6 |
-
Stable tag: 2.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -15,42 +15,62 @@ A better management for WordPress Media Library
|
|
15 |
|
16 |
== Description ==
|
17 |
|
18 |
-
|
19 |
|
20 |
|
21 |
-
= Media Taxonomies (Categories for
|
22 |
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
|
32 |
|
33 |
= MIME Types (Media File Types) =
|
34 |
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
|
|
40 |
|
41 |
|
42 |
-
=
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
|
44 |
* Dutch
|
45 |
* German
|
46 |
* Hebrew
|
|
|
47 |
* Polish
|
48 |
* Swedish
|
49 |
|
|
|
|
|
50 |
|
51 |
-
=
|
52 |
|
53 |
-
* Advanced Custom Fields
|
54 |
* WooCommerce
|
55 |
* Meta Slider
|
56 |
* Search & Filter
|
@@ -58,23 +78,19 @@ This plugin will be handy for those who need to manage a lot of media files.
|
|
58 |
Please let us know if you find any issue with the plugins from the list above or others.
|
59 |
|
60 |
|
61 |
-
|
62 |
|
63 |
-
|
64 |
-
> * The PRO version requires at least WordPress 4.0
|
65 |
-
> * [Learn more »](http://wpuxsolutions.com/plugins/enhanced-media-library/)
|
66 |
|
67 |
-
= Bulk Attachment for Media Taxonomies (PRO only) =
|
68 |
|
69 |
-
|
70 |
-
* during uploading process
|
71 |
-
* in Media Popup during post/page editing
|
72 |
-
* in Media Library Grid View
|
73 |
-
|
74 |
-
= Bulk selection/deletion of media files (PRO only) =
|
75 |
|
76 |
-
|
77 |
-
|
|
|
|
|
|
|
|
|
78 |
|
79 |
|
80 |
= Useful Links =
|
@@ -83,8 +99,6 @@ Please let us know if you find any issue with the plugins from the list above or
|
|
83 |
|
84 |
|
85 |
|
86 |
-
|
87 |
-
|
88 |
== Installation ==
|
89 |
|
90 |
1. Upload plugin folder to '/wp-content/plugins/' directory
|
@@ -109,11 +123,17 @@ Try to just re-save permalinks settings. Go to Settings >> Permalinks and push "
|
|
109 |
|
110 |
EML adds its filters to ANY media popup that already contains native WordPress filters. We chose NOT to force adding filters to ANY media popup because there are a lot of cases when filters are not acceptable and theme's/plugin's author did not add them intentionally.
|
111 |
|
112 |
-
If you believe that a third-party plugin
|
|
|
|
|
|
|
|
|
113 |
|
114 |
-
|
115 |
|
116 |
-
|
|
|
|
|
117 |
|
118 |
|
119 |
|
@@ -141,6 +161,31 @@ Right now it is possible via WP_Query ([example of the code](http://wordpress.or
|
|
141 |
|
142 |
== Changelog ==
|
143 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
144 |
= 2.0.4.8 =
|
145 |
*Release Date - September 14, 2015*
|
146 |
|
@@ -323,7 +368,7 @@ Right now it is possible via WP_Query ([example of the code](http://wordpress.or
|
|
323 |
= Improvements =
|
324 |
* Media Popup: Filters reset automatically as soon as new media files upload process started
|
325 |
* Media Popup: Selection resets automatically as soon as filter is changed
|
326 |
-
* Media Popup: WordPress 4.0 date filter added
|
327 |
* Compatibility: general compatibility with other plugins improved, please [let me know](http://wpuxsolutions.com/support/create-new-ticket/) if you have any issue with EML and other plugins
|
328 |
|
329 |
= Bugfixes =
|
1 |
=== Enhanced Media Library ===
|
2 |
Contributors: webbistro
|
3 |
+
Tags: media library, media category, media categories, media management, media organizer, media gallery, gallery shortcode, media tag, media tags, media taxonomy, media taxonomies, media uploader, mime type, mime, mime types, file types, media types, media filter, attachment, gallery, image, images, media, ux, user experience, wp-admin, admin, taxonomy, taxonomies
|
4 |
Requires at least: 4.0
|
5 |
+
Tested up to: 4.4
|
6 |
+
Stable tag: 2.1
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
15 |
|
16 |
== Description ==
|
17 |
|
18 |
+
The plugin will be handy for those who need to manage a lot of media files.
|
19 |
|
20 |
|
21 |
+
= Media Taxonomies (Categories and Tags for media files) =
|
22 |
|
23 |
+
With the plugin installed you will immediately obtain Media Categories that will be useful for categorizing and filtering media items in the WordPress admin. This feature alone will save you hours of searching through a media library with even as few as 100 images.
|
24 |
+
|
25 |
+
Whether you have a lot of images that need to be organized into complex structures or simply dislike the name of the default taxonomy - Media Categories - you can create and (un)assign to the media library as many taxonomies as you wish without writing a single line of code. Even in case the only taxonomy is totally enough for you, you may prefer to call it "Photo Categories" or simply "Photos".
|
26 |
+
|
27 |
+
You can also assign to the media library built-in WordPress taxonomies - Categories and Tags - as well as any other taxonomy created by third-party plugin, theme, or hand-coded with only plugin's UI.
|
28 |
+
|
29 |
+
The plugin will allow you to categorize both new and existing media files. You can assign a category to a media file during the upload process, in the media library (preferably Grid Mode), in the post/page editor media popup ("Add Media" button). If you need to manage a lot of files at once, there is the PRO version of the plugin that allows to do it in bulk.
|
30 |
+
|
31 |
+
Every media library window is enhanced with the plugin's filters to search and sort your media files. With the flexible plugin's options you can adjust what filters you will see in the Grid and List modes of the media library and in the post/page editor media popups, and what taxonomies you would like to be able to edit when inserting media to posts/pages. The plugin will work with custom post types as well. The options will also help you to force plugin's filters for third-party plugins or themes, manage media taxonomies archive pages, etc.
|
32 |
+
|
33 |
+
|
34 |
+
= Filter-Based Image Galleries (Fully compatible with WordPress native gallery shortcode) =
|
35 |
+
|
36 |
+
Media files categorizing can be useful for the front-end, of course. To insert media galleries based on media categories you have to use the familiar format like `[gallery media_category="5" category="2" monthnum="12" year="2015" orderby="title" order="DESC"]`. The PRO version of the plugin allows to manage gallery shortcode without "coding" at all. Just choose the settings with the plugin's UI in the familiar gallery edit popup and see your gallery live immediately in the post/page editor.
|
37 |
|
38 |
|
39 |
= MIME Types (Media File Types) =
|
40 |
|
41 |
+
Another feature of the plugin is the MIME Types control. You can add new MIME types, delete existing ones, and point what file types are allowed for uploading. Initially, the plugin shows up the WordPress default MIME Type settings and creates the backup of them. The column "Add Filter" allows to add a MIME Type to plugin's filters so that you will be able to filter your media files not only by categories but also by the file type. You can set any label you wish to see in a filter with columns "Singular Label" and "Plural Label".
|
42 |
+
|
43 |
+
|
44 |
+
= Export / Import Plugin Settings =
|
45 |
+
|
46 |
+
If you need to move your media library to another website you should export and import WordPress content with WordPress built-in export/import. But to make the Enhanced Media Library work on the new site with the same settings you are provided with the export/import feature.
|
47 |
|
48 |
|
49 |
+
= Easy to Use and WordPress Native Functionality Oriented Plugin =
|
50 |
+
|
51 |
+
We spend hours to make plugins features work as though they were native WordPress functionality. If you are a developer and looking for a solution totally compatible with WordPress core and, at the same point, really easy to deal with for your non-geeky customers, give it a try, you won't be disappointed.
|
52 |
+
|
53 |
+
|
54 |
+
= Support =
|
55 |
+
|
56 |
+
Support is free for both versions of the plugin. "PRO"-users do not have priority. We do out best to respond in 24 hours if not sooner.
|
57 |
+
|
58 |
+
|
59 |
+
= Available Languages (Assistance with the translation is highly appreciated) =
|
60 |
|
61 |
* Dutch
|
62 |
* German
|
63 |
* Hebrew
|
64 |
+
* Korean
|
65 |
* Polish
|
66 |
* Swedish
|
67 |
|
68 |
+
Many thanks to the authors of the translations! If you wish to be credited here please just let us know what name and URL we have to use.
|
69 |
+
|
70 |
|
71 |
+
= Compatibility with Other Plugins =
|
72 |
|
73 |
+
* Advanced Custom Fields
|
74 |
* WooCommerce
|
75 |
* Meta Slider
|
76 |
* Search & Filter
|
78 |
Please let us know if you find any issue with the plugins from the list above or others.
|
79 |
|
80 |
|
81 |
+
= Incompatibility =
|
82 |
|
83 |
+
Please notice that you use the Enhanced Media Library with other plugins adding media categories, media folders, and managing MIME Types at your own risk. We cannot guarantee their compatibility because of different approach to the same functionality. It does NOT mean that we do not recommend using those plugins, it just means we do not recommend to use them at the same time with the Enhanced Media Library. Choose the one you prefer.
|
|
|
|
|
84 |
|
|
|
85 |
|
86 |
+
> #### Enhanced Media Library PRO
|
|
|
|
|
|
|
|
|
|
|
87 |
|
88 |
+
> The key features:
|
89 |
+
|
90 |
+
> * Media files can be categorized in bulk (multiple files to multiple taxonomies at once) both just uploaded and existing
|
91 |
+
> * Media files within a category can be selected in bulk with a single click
|
92 |
+
> * Selected media files can be deleted in bulk in the Grid mode of the media library or in the post/page editor media popup
|
93 |
+
> * Filter-based gallery in two clicks, no need to delve into the text editor shortcode
|
94 |
|
95 |
|
96 |
= Useful Links =
|
99 |
|
100 |
|
101 |
|
|
|
|
|
102 |
== Installation ==
|
103 |
|
104 |
1. Upload plugin folder to '/wp-content/plugins/' directory
|
123 |
|
124 |
EML adds its filters to ANY media popup that already contains native WordPress filters. We chose NOT to force adding filters to ANY media popup because there are a lot of cases when filters are not acceptable and theme's/plugin's author did not add them intentionally.
|
125 |
|
126 |
+
If you believe that a third-party plugin should have filters in its Media Popup please contact its author with a request to add NATIVE WordPress filters ([example of the code](http://wordpress.org/support/topic/how-can-we-use-this-plugin-features-in-my-custom-plugin-media-uploader?replies=15#post-5753212) for theme's/plugin's authors).
|
127 |
+
|
128 |
+
= How to show images per media category on a webpage? =
|
129 |
+
|
130 |
+
[**UPD:** Since EML 2.1 you can use gallery shortcode with taxonomy parameters like this: `[gallery media_category="5" category="2" monthnum="12" year="2015" orderby="title" order="DESC"]` to show filter-based gallery on the front-end.]
|
131 |
|
132 |
+
Right now it is possible via WP_Query ([example of the code](http://wordpress.org/support/topic/php-displaying-an-array-of-images-per-category-or-categories)). We are working on a gallery based on EML taxonomies.
|
133 |
|
134 |
+
= Will I lose media categories I’ve created if I upgrade from free to PRO? =
|
135 |
+
|
136 |
+
No, all your data will remain intact. Your created media categories and their ties with your images are stored in the database. When you deactivate and delete the free version and then upload and activate the PRO one nothing happens to the database.
|
137 |
|
138 |
|
139 |
|
161 |
|
162 |
== Changelog ==
|
163 |
|
164 |
+
|
165 |
+
= 2.1 =
|
166 |
+
*Release Date - December 15, 2015*
|
167 |
+
|
168 |
+
= New =
|
169 |
+
* Filter-based Image Galleries by extending native WordPress gallery shortcode
|
170 |
+
* Easy visual gallery editing with the native WordPress gallery UI [PRO only]
|
171 |
+
* Export/import of the plugin settings to JSON
|
172 |
+
|
173 |
+
= Improvements =
|
174 |
+
* Better filtering and "force filters" mechanism, sorting by 'menuOrder' by default for media taxonomy filters
|
175 |
+
* Plugin credits in admin removed from Media Settings > Taxonomies, and Media Settings > MIME Types, moved to Settings > Enhanced Media Library
|
176 |
+
* "Deactivate License" added [PRO only]
|
177 |
+
* Various code improvements for both free and PRO
|
178 |
+
* Minor UX improvements
|
179 |
+
|
180 |
+
= Compatibility =
|
181 |
+
* Fixed incompatibility with [WP Plugin Dependencies](https://github.com/xwp/wp-plugin-dependencies)
|
182 |
+
* Wordpress 4.4 compatibility ensured
|
183 |
+
|
184 |
+
= Languages =
|
185 |
+
* Korean translation added
|
186 |
+
|
187 |
+
|
188 |
+
|
189 |
= 2.0.4.8 =
|
190 |
*Release Date - September 14, 2015*
|
191 |
|
368 |
= Improvements =
|
369 |
* Media Popup: Filters reset automatically as soon as new media files upload process started
|
370 |
* Media Popup: Selection resets automatically as soon as filter is changed
|
371 |
+
* Media Popup: WordPress 4.0 date filter added
|
372 |
* Compatibility: general compatibility with other plugins improved, please [let me know](http://wpuxsolutions.com/support/create-new-ticket/) if you have any issue with EML and other plugins
|
373 |
|
374 |
= Bugfixes =
|