Version Description
Download this release
Release Info
Developer | webbistro |
Plugin | Enhanced Media Library |
Version | 2.0 |
Comparing to | |
See all releases |
Code changes from version 1.1.2 to 2.0
- core/mime-types.php +176 -173
- core/options-pages.php +496 -454
- core/taxonomies.php +381 -348
- css/eml-admin.css +196 -178
- enhanced-media-library.php +272 -271
- js/eml-custom-background.js +63 -63
- js/eml-custom-header.js +56 -56
- js/eml-customize-controls.js +46 -46
- js/eml-media-grid.js +8 -0
- js/eml-media-models.js +147 -341
- js/eml-media-views.js +318 -116
- js/eml-options.js +344 -344
- languages/eml-nl_NL.mo +0 -0
- languages/eml-nl_NL.po +329 -0
- languages/eml-pl_PL.mo +0 -0
- languages/eml-pl_PL.po +264 -0
- languages/eml.pot +86 -78
- readme.txt +47 -8
core/mime-types.php
CHANGED
@@ -1,174 +1,177 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
*
|
8 |
-
*
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
}
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
*
|
60 |
-
*
|
61 |
-
*
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
*
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
}
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
*
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
}
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
*
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
}
|
173 |
-
|
|
|
|
|
|
|
174 |
?>
|
1 |
+
<?php
|
2 |
+
|
3 |
+
|
4 |
+
|
5 |
+
|
6 |
+
/**
|
7 |
+
* wpuxss_eml_mimes_validate
|
8 |
+
*
|
9 |
+
* @type callback function
|
10 |
+
* @since 1.0
|
11 |
+
* @created 15/10/13
|
12 |
+
*/
|
13 |
+
|
14 |
+
function wpuxss_eml_mimes_validate($input)
|
15 |
+
{
|
16 |
+
if ( !$input ) $input = array();
|
17 |
+
|
18 |
+
if ( isset($_REQUEST['wpuxss_eml_restore_mimes_backup']) )
|
19 |
+
{
|
20 |
+
$_REQUEST['_wp_http_referer'] .= '&settings-restored=true';
|
21 |
+
$wpuxss_eml_mimes_backup = get_option('wpuxss_eml_mimes_backup');
|
22 |
+
$input = $wpuxss_eml_mimes_backup;
|
23 |
+
}
|
24 |
+
else
|
25 |
+
{
|
26 |
+
foreach ( $input as $type => $mime )
|
27 |
+
{
|
28 |
+
$sanitized_type = wpuxss_eml_sanitize_extension($type);
|
29 |
+
|
30 |
+
if ( $sanitized_type !== $type )
|
31 |
+
{
|
32 |
+
$input[$sanitized_type] = $input[$type];
|
33 |
+
unset($input[$type]);
|
34 |
+
$type = $sanitized_type;
|
35 |
+
}
|
36 |
+
|
37 |
+
if ( !isset($input[$type]['filter']) )
|
38 |
+
$input[$type]['filter'] = 0;
|
39 |
+
|
40 |
+
if ( !isset($input[$type]['upload']) )
|
41 |
+
$input[$type]['upload'] = 0;
|
42 |
+
|
43 |
+
$input[$type]['filter'] = intval($input[$type]['filter']);
|
44 |
+
$input[$type]['upload'] = intval($input[$type]['upload']);
|
45 |
+
|
46 |
+
$input[$type]['mime'] = sanitize_mime_type($mime['mime']);
|
47 |
+
$input[$type]['singular'] = sanitize_text_field($mime['singular']);
|
48 |
+
$input[$type]['plural'] = sanitize_text_field($mime['plural']);
|
49 |
+
}
|
50 |
+
}
|
51 |
+
|
52 |
+
return $input;
|
53 |
+
}
|
54 |
+
|
55 |
+
|
56 |
+
|
57 |
+
|
58 |
+
/**
|
59 |
+
* wpuxss_eml_sanitize_extension
|
60 |
+
*
|
61 |
+
* Based on the original sanitize_key
|
62 |
+
*
|
63 |
+
* @since 1.0
|
64 |
+
* @created 24/10/13
|
65 |
+
*/
|
66 |
+
|
67 |
+
function wpuxss_eml_sanitize_extension( $key )
|
68 |
+
{
|
69 |
+
$raw_key = $key;
|
70 |
+
$key = strtolower( $key );
|
71 |
+
$key = preg_replace( '/[^a-z0-9|]/', '', $key );
|
72 |
+
return apply_filters( 'sanitize_key', $key, $raw_key );
|
73 |
+
}
|
74 |
+
|
75 |
+
|
76 |
+
|
77 |
+
|
78 |
+
/**
|
79 |
+
* wpuxss_eml_post_mime_types
|
80 |
+
*
|
81 |
+
* @since 1.0
|
82 |
+
* @created 03/08/13
|
83 |
+
*/
|
84 |
+
|
85 |
+
add_filter('post_mime_types', 'wpuxss_eml_post_mime_types');
|
86 |
+
|
87 |
+
function wpuxss_eml_post_mime_types( $post_mime_types )
|
88 |
+
{
|
89 |
+
$wpuxss_eml_mimes = get_option('wpuxss_eml_mimes');
|
90 |
+
|
91 |
+
if ( !empty($wpuxss_eml_mimes) )
|
92 |
+
{
|
93 |
+
foreach ( $wpuxss_eml_mimes as $type => $mime )
|
94 |
+
{
|
95 |
+
if ( $mime['filter'] == 1 )
|
96 |
+
$post_mime_types[$mime['mime']] = array(
|
97 |
+
$mime['singular'],
|
98 |
+
'Manage ' . $mime['singular'],
|
99 |
+
_n_noop($mime['singular'] . ' <span class="count">(%s)</span>', $mime['plural'] . ' <span class="count">(%s)</span>')
|
100 |
+
);
|
101 |
+
}
|
102 |
+
}
|
103 |
+
|
104 |
+
return $post_mime_types;
|
105 |
+
}
|
106 |
+
|
107 |
+
|
108 |
+
|
109 |
+
|
110 |
+
/**
|
111 |
+
* wpuxss_eml_upload_mimes
|
112 |
+
*
|
113 |
+
* @since 1.0
|
114 |
+
* @created 03/08/13
|
115 |
+
*/
|
116 |
+
|
117 |
+
add_filter('upload_mimes', 'wpuxss_eml_upload_mimes');
|
118 |
+
|
119 |
+
function wpuxss_eml_upload_mimes ( $existing_mimes=array() )
|
120 |
+
{
|
121 |
+
$wpuxss_eml_mimes = get_option('wpuxss_eml_mimes');
|
122 |
+
|
123 |
+
if ( !empty($wpuxss_eml_mimes) )
|
124 |
+
{
|
125 |
+
foreach ( $wpuxss_eml_mimes as $type => $mime )
|
126 |
+
{
|
127 |
+
if ( $mime['upload'] == 1 )
|
128 |
+
{
|
129 |
+
if ( !isset($existing_mimes[$type]) )
|
130 |
+
$existing_mimes[$type] = $mime['mime'];
|
131 |
+
}
|
132 |
+
else
|
133 |
+
{
|
134 |
+
if ( isset($existing_mimes[$type]) )
|
135 |
+
unset($existing_mimes[$type]);
|
136 |
+
}
|
137 |
+
}
|
138 |
+
}
|
139 |
+
|
140 |
+
return $existing_mimes;
|
141 |
+
}
|
142 |
+
|
143 |
+
|
144 |
+
|
145 |
+
|
146 |
+
/**
|
147 |
+
* wpuxss_eml_mime_types
|
148 |
+
*
|
149 |
+
* @since 1.0
|
150 |
+
* @created 03/08/13
|
151 |
+
*/
|
152 |
+
|
153 |
+
add_filter( 'mime_types', 'wpuxss_eml_mime_types' );
|
154 |
+
|
155 |
+
function wpuxss_eml_mime_types( $existing_mimes )
|
156 |
+
{
|
157 |
+
$wpuxss_eml_mimes = get_option('wpuxss_eml_mimes');
|
158 |
+
|
159 |
+
if ( !empty($wpuxss_eml_mimes) )
|
160 |
+
{
|
161 |
+
foreach ( $wpuxss_eml_mimes as $type => $mime )
|
162 |
+
{
|
163 |
+
if ( !isset($existing_mimes[$type]) )
|
164 |
+
$existing_mimes[$type] = $mime['mime'];
|
165 |
+
}
|
166 |
+
|
167 |
+
foreach ( $existing_mimes as $type => $mime )
|
168 |
+
{
|
169 |
+
if ( !isset($wpuxss_eml_mimes[$type]) && isset($existing_mimes[$type]) )
|
170 |
+
unset($existing_mimes[$type]);
|
171 |
+
}
|
172 |
+
}
|
173 |
+
|
174 |
+
return $existing_mimes;
|
175 |
+
}
|
176 |
+
|
177 |
?>
|
core/options-pages.php
CHANGED
@@ -1,5 +1,44 @@
|
|
1 |
<?php
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
/**
|
4 |
* wpuxss_eml_admin_menu
|
5 |
*
|
@@ -11,40 +50,40 @@ add_action('admin_menu', 'wpuxss_eml_admin_menu');
|
|
11 |
|
12 |
function wpuxss_eml_admin_menu()
|
13 |
{
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
}
|
42 |
|
43 |
|
44 |
|
45 |
|
46 |
/**
|
47 |
-
*
|
48 |
*
|
49 |
* @since 1.0
|
50 |
* @created 28/10/13
|
@@ -52,46 +91,46 @@ function wpuxss_eml_admin_menu()
|
|
52 |
|
53 |
function wpuxss_eml_admin_settings_pages_scripts()
|
54 |
{
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
}
|
96 |
|
97 |
|
@@ -107,259 +146,259 @@ function wpuxss_eml_admin_settings_pages_scripts()
|
|
107 |
|
108 |
function wpuxss_eml_print_taxonomies_options()
|
109 |
{
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
|
|
|
|
122 |
|
123 |
-
|
124 |
-
|
125 |
-
<div id="post-body" class="metabox-holder columns-2">
|
126 |
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
|
131 |
-
|
132 |
-
|
133 |
-
|
|
|
|
|
|
|
|
|
134 |
|
135 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
136 |
|
137 |
-
|
138 |
-
|
139 |
-
<p><?php _e('Assign following taxonomies to Media Library:','eml'); ?></p>
|
140 |
-
|
141 |
-
<?php
|
142 |
-
|
143 |
-
$html = '';
|
144 |
-
foreach ( get_taxonomies(array(),'object') as $taxonomy )
|
145 |
-
{
|
146 |
-
if ( (in_array('attachment',$taxonomy->object_type) && count($taxonomy->object_type) == 1) || empty($taxonomy->object_type) )
|
147 |
-
{
|
148 |
-
$assigned = intval($wpuxss_eml_taxonomies[$taxonomy->name]['assigned']);
|
149 |
-
$eml_media = intval($wpuxss_eml_taxonomies[$taxonomy->name]['eml_media']);
|
150 |
-
|
151 |
-
if ($eml_media)
|
152 |
-
$li_class = 'wpuxss-eml-taxonomy';
|
153 |
-
else
|
154 |
-
$li_class = 'wpuxss-non-eml-taxonomy';
|
155 |
-
|
156 |
-
$html .= '<li class="' . $li_class . '" id="' . $taxonomy->name . '">';
|
157 |
-
|
158 |
-
$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') . '" />';
|
159 |
-
$html .= '<input name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][eml_media]" type="hidden" value="' . $eml_media . '" />';
|
160 |
-
$html .= ' <label>' . $taxonomy->label . '</label>';
|
161 |
-
$html .= '<a class="wpuxss-eml-button-edit" title="' . __('Edit Taxonomy','eml') . '" href="javascript:;">' . __('Edit','eml') . ' ↓</a>';
|
162 |
-
if ( $wpuxss_eml_taxonomies[$taxonomy->name]['eml_media'] == 1 )
|
163 |
-
{
|
164 |
-
$html .= '<a class="wpuxss-eml-button-remove" title="' . __('Delete Taxonomy','eml') . '" href="javascript:;">–</a>';
|
165 |
-
|
166 |
-
$html .= '<div class="wpuxss-eml-taxonomy-edit" style="display:none;">';
|
167 |
-
|
168 |
-
$html .= '<div class="wpuxss-eml-labels-edit">';
|
169 |
-
$html .= '<h4>' . __('Labels','eml') . '</h4>';
|
170 |
-
$html .= '<ul>';
|
171 |
-
$html .= '<li><label>' . __('Singular','eml') . '</label><input type="text" class="wpuxss-eml-singular_name" name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][labels][singular_name]" value="' . esc_html($taxonomy->labels->singular_name) . '" /></li>';
|
172 |
-
$html .= '<li><label>' . __('Plural','eml') . '</label><input type="text" class="wpuxss-eml-name" name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][labels][name]" value="' . esc_html($taxonomy->labels->name) . '" /></li>';
|
173 |
-
$html .= '<li><label>' . __('Menu Name','eml') . '</label><input type="text" class="wpuxss-eml-menu_name" name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][labels][menu_name]" value="' . esc_html($taxonomy->labels->menu_name) . '" /></li>';
|
174 |
-
$html .= '<li><label>' . __('All','eml') . '</label><input type="text" class="wpuxss-eml-all_items" name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][labels][all_items]" value="' . esc_html($taxonomy->labels->all_items) . '" /></li>';
|
175 |
-
$html .= '<li><label>' . __('Edit','eml') . '</label><input type="text" class="wpuxss-eml-edit_item" name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][labels][edit_item]" value="' . esc_html($taxonomy->labels->edit_item) . '" /></li>';
|
176 |
-
$html .= '<li><label>' . __('View','eml') . '</label><input type="text" class="wpuxss-eml-view_item" name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][labels][view_item]" value="' . esc_html($taxonomy->labels->view_item) . '" /></li>';
|
177 |
-
$html .= '<li><label>' . __('Update','eml') . '</label><input type="text" class="wpuxss-eml-update_item" name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][labels][update_item]" value="' . esc_html($taxonomy->labels->update_item) . '" /></li>';
|
178 |
-
$html .= '<li><label>' . __('Add New','eml') . '</label><input type="text" class="wpuxss-eml-add_new_item" name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][labels][add_new_item]" value="' . esc_html($taxonomy->labels->add_new_item) . '" /></li>';
|
179 |
-
$html .= '<li><label>' . __('New','eml') . '</label><input type="text" class="wpuxss-eml-new_item_name" name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][labels][new_item_name]" value="' . esc_html($taxonomy->labels->new_item_name) . '" /></li>';
|
180 |
-
$html .= '<li><label>' . __('Parent','eml') . '</label><input type="text" class="wpuxss-eml-parent_item" name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][labels][parent_item]" value="' . esc_html($taxonomy->labels->parent_item) . '" /></li>';
|
181 |
-
$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>';
|
182 |
-
$html .= '</ul>';
|
183 |
-
$html .= '</div>';
|
184 |
-
|
185 |
-
$html .= '<div class="wpuxss-eml-settings-edit">';
|
186 |
-
$html .= '<h4>' . __('Settings','eml') . '</h4>';
|
187 |
-
$html .= '<ul>';
|
188 |
-
$html .= '<li><label>' . __('Hierarchical','eml') . '</label><input type="checkbox" class="wpuxss-eml-hierarchical" name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][hierarchical]" value="1" ' . checked( 1, $taxonomy->hierarchical, false ) . ' /></li>';
|
189 |
-
$html .= '<li><label>' . __('Column in Media Library','eml') . '</label><input type="checkbox" class="wpuxss-eml-show_admin_column" name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][show_admin_column]" value="1" ' . checked( 1, $taxonomy->show_admin_column, false ) . ' /></li>';
|
190 |
-
$html .= '<li><label>' . __('Filter in Media Library','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>';
|
191 |
-
$html .= '<li><label>' . __('Filter in Media Popup / Grid View','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>';
|
192 |
-
$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>';
|
193 |
-
$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>';
|
194 |
-
$html .= '<li><label>' . __('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>';
|
195 |
-
$html .= '</ul>';
|
196 |
-
$html .= '</div>';
|
197 |
-
|
198 |
-
$html .= '</div>';
|
199 |
-
}
|
200 |
-
else
|
201 |
-
{
|
202 |
-
$html .= '<div class="wpuxss-eml-taxonomy-edit" style="display:none;">';
|
203 |
-
|
204 |
-
$html .= '<div class="wpuxss-eml-settings-edit">';
|
205 |
-
$html .= '<h4>' . __('Settings','eml') . '</h4>';
|
206 |
-
$html .= '<ul>';
|
207 |
-
$html .= '<li><label>' . __('Filter in Media Library','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>';
|
208 |
-
$html .= '<li><label>' . __('Filter in Media Popup / Grid View','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>';
|
209 |
-
$html .= '</ul>';
|
210 |
-
|
211 |
-
$html .= '<input name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][show_admin_column]" type="hidden" value="' . $wpuxss_eml_taxonomies[$taxonomy->name]['show_admin_column'] . '" />';
|
212 |
-
$html .= '<input name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][show_in_nav_menus]" type="hidden" value="' . $wpuxss_eml_taxonomies[$taxonomy->name]['show_in_nav_menus'] . '" />';
|
213 |
-
$html .= '<input name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][hierarchical]" type="hidden" value="' . $wpuxss_eml_taxonomies[$taxonomy->name]['hierarchical'] . '" />';
|
214 |
-
$html .= '<input name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][sort]" type="hidden" value="' . $wpuxss_eml_taxonomies[$taxonomy->name]['sort'] . '" />';
|
215 |
-
$html .= '</div>';
|
216 |
-
|
217 |
-
$html .= '</div>';
|
218 |
-
}
|
219 |
-
$html .= '</li>';
|
220 |
-
}
|
221 |
-
}
|
222 |
-
|
223 |
-
$html .= '<li class="wpuxss-eml-clone" style="display:none">';
|
224 |
-
$html .= '<input class="wpuxss-eml-assigned" name="" type="checkbox" class="wpuxss-eml-assigned" value="1" checked="checked" title="' . __('Assign Taxonomy','eml') . '" />';
|
225 |
-
$html .= '<input name="" type="hidden" class="wpuxss-eml-eml_media" value="1" />';
|
226 |
-
$html .= ' <label class="wpuxss-eml-taxonomy-label">' . __('New Taxonomy','eml') . '</label>';
|
227 |
-
|
228 |
-
$html .= '<a class="wpuxss-eml-button-remove" title="' . __('Delete Taxonomy','eml') . '" href="javascript:;">–</a>';
|
229 |
-
|
230 |
-
$html .= '<div class="wpuxss-eml-taxonomy-edit">';
|
231 |
-
|
232 |
-
$html .= '<div class="wpuxss-eml-labels-edit">';
|
233 |
-
$html .= '<h4>' . __('Labels','eml') . '</h4>';
|
234 |
-
$html .= '<ul>';
|
235 |
-
$html .= '<li><label>' . __('Singular','eml') . '</label><input type="text" class="wpuxss-eml-singular_name" name="" value="" /></li>';
|
236 |
-
$html .= '<li><label>' . __('Plural','eml') . '</label><input type="text" class="wpuxss-eml-name" name="" value="" /></li>';
|
237 |
-
$html .= '<li><label>' . __('Menu Name','eml') . '</label><input type="text" class="wpuxss-eml-menu_name" name="" value="" /></li>';
|
238 |
-
$html .= '<li><label>' . __('All','eml') . '</label><input type="text" class="wpuxss-eml-all_items" name="" value="" /></li>';
|
239 |
-
$html .= '<li><label>' . __('Edit','eml') . '</label><input type="text" class="wpuxss-eml-edit_item" name="" value="" /></li>';
|
240 |
-
$html .= '<li><label>' . __('View','eml') . '</label><input type="text" class="wpuxss-eml-view_item" name="" value="" /></li>';
|
241 |
-
$html .= '<li><label>' . __('Update','eml') . '</label><input type="text" class="wpuxss-eml-update_item" name="" value="" /></li>';
|
242 |
-
$html .= '<li><label>' . __('Add New','eml') . '</label><input type="text" class="wpuxss-eml-add_new_item" name="" value="" /></li>';
|
243 |
-
$html .= '<li><label>' . __('New','eml') . '</label><input type="text" class="wpuxss-eml-new_item_name" name="" value="" /></li>';
|
244 |
-
$html .= '<li><label>' . __('Parent','eml') . '</label><input type="text" class="wpuxss-eml-parent_item" name="" value="" /></li>';
|
245 |
-
$html .= '<li><label>' . __('Search','eml') . '</label><input type="text" class="wpuxss-eml-search_items" name="" value="" /></li>';
|
246 |
-
$html .= '</ul>';
|
247 |
-
$html .= '</div>';
|
248 |
-
|
249 |
-
$html .= '<div class="wpuxss-eml-settings-edit">';
|
250 |
-
$html .= '<h4>' . __('Settings','eml') . '</h4>';
|
251 |
-
$html .= '<ul>';
|
252 |
-
$html .= '<li><label>' . __('Hierarchical','eml') . '</label><input type="checkbox" class="wpuxss-eml-hierarchical" name="" value="1" checked="checked" /></li>';
|
253 |
-
$html .= '<li><label>' . __('Column in Media Library','eml') . '</label><input class="wpuxss-eml-show_admin_column" type="checkbox" name="" value="1" /></li>';
|
254 |
-
$html .= '<li><label>' . __('Filter in Media Library','eml') . '</label><input class="wpuxss-eml-admin_filter" type="checkbox" name="" value="1" /></li>';
|
255 |
-
$html .= '<li><label>' . __('Filter in Media Popup / Grid View','eml') . '</label><input class="wpuxss-eml-media_uploader_filter" type="checkbox" name="" value="1" /></li>';
|
256 |
-
$html .= '<li><label>' . __('Show in Nav Menu','eml') . '</label><input type="checkbox" class="wpuxss-eml-show_in_nav_menus" name="" value="1" /></li>';
|
257 |
-
$html .= '<li><label>' . __('Remember terms order (sort)','eml') . '</label><input type="checkbox" class="wpuxss-eml-sort" name="" value="1" /></li>';
|
258 |
-
$html .= '<li><label>' . __('Slug','eml') . '</label><input type="text" class="wpuxss-eml-slug" name="" value="" /></li>';
|
259 |
-
$html .= '</ul>';
|
260 |
-
$html .= '</div>';
|
261 |
-
|
262 |
-
$html .= '</div>';
|
263 |
-
$html .= '</li>';
|
264 |
-
|
265 |
-
if ( !empty($html) )
|
266 |
-
{
|
267 |
-
?>
|
268 |
-
<ul class="wpuxss-eml-settings-list wpuxss-eml-media-taxonomy-list">
|
269 |
-
<?php echo $html; ?>
|
270 |
-
</ul>
|
271 |
-
<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>
|
272 |
-
<?php
|
273 |
-
}
|
274 |
-
|
275 |
-
submit_button();
|
276 |
-
?>
|
277 |
-
|
278 |
-
</div>
|
279 |
-
|
280 |
-
</div>
|
281 |
-
|
282 |
-
<div class="postbox">
|
283 |
|
284 |
-
|
285 |
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
submit_button();
|
340 |
-
?>
|
341 |
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
|
352 |
-
|
353 |
-
|
354 |
-
|
|
|
|
|
355 |
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
</div>
|
361 |
|
362 |
-
|
363 |
}
|
364 |
|
365 |
|
@@ -375,124 +414,124 @@ function wpuxss_eml_print_taxonomies_options()
|
|
375 |
|
376 |
function wpuxss_eml_print_mimetypes_options()
|
377 |
{
|
378 |
-
|
379 |
-
|
380 |
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
|
485 |
-
|
486 |
-
|
487 |
-
|
|
|
|
|
488 |
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
</div>
|
494 |
|
495 |
-
|
496 |
}
|
497 |
|
498 |
|
@@ -508,38 +547,41 @@ function wpuxss_eml_print_mimetypes_options()
|
|
508 |
|
509 |
function wpuxss_eml_print_credits()
|
510 |
{
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
|
|
|
|
|
|
543 |
}
|
544 |
|
545 |
|
1 |
<?php
|
2 |
|
3 |
+
|
4 |
+
|
5 |
+
|
6 |
+
/**
|
7 |
+
* wpuxss_eml_on_admin_init
|
8 |
+
*
|
9 |
+
* @since 1.0
|
10 |
+
* @created 03/08/13
|
11 |
+
*/
|
12 |
+
|
13 |
+
add_action( 'admin_init', 'wpuxss_eml_on_admin_init' );
|
14 |
+
|
15 |
+
function wpuxss_eml_on_admin_init()
|
16 |
+
{
|
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: mime types
|
26 |
+
register_setting(
|
27 |
+
'wpuxss_eml_mimes', //option_group
|
28 |
+
'wpuxss_eml_mimes', //option_name
|
29 |
+
'wpuxss_eml_mimes_validate' //sanitize_callback
|
30 |
+
);
|
31 |
+
|
32 |
+
// plugin settings: mime types backup
|
33 |
+
register_setting(
|
34 |
+
'wpuxss_eml_mimes_backup', //option_group
|
35 |
+
'wpuxss_eml_mimes_backup' //option_name
|
36 |
+
);
|
37 |
+
}
|
38 |
+
|
39 |
+
|
40 |
+
|
41 |
+
|
42 |
/**
|
43 |
* wpuxss_eml_admin_menu
|
44 |
*
|
50 |
|
51 |
function wpuxss_eml_admin_menu()
|
52 |
{
|
53 |
+
add_utility_page(
|
54 |
+
__('Media Settings','eml'), //page_title
|
55 |
+
__('Media Settings','eml'), //menu_title
|
56 |
+
'manage_options', //capability
|
57 |
+
'eml-taxonomies-options', //page
|
58 |
+
'wpuxss_eml_print_taxonomies_options' //callback
|
59 |
+
);
|
60 |
+
|
61 |
+
$eml_taxonomies_options_suffix = add_submenu_page(
|
62 |
+
'eml-taxonomies-options',
|
63 |
+
__('Taxonomies','eml'),
|
64 |
+
__('Taxonomies','eml'),
|
65 |
+
'manage_options',
|
66 |
+
'eml-taxonomies-options'
|
67 |
+
);
|
68 |
+
|
69 |
+
$eml_mimetype_options_suffix = add_submenu_page(
|
70 |
+
'eml-taxonomies-options',
|
71 |
+
__('MIME Types','eml'),
|
72 |
+
__('MIME Types','eml'),
|
73 |
+
'manage_options',
|
74 |
+
'eml-mimetype-options',
|
75 |
+
'wpuxss_eml_print_mimetypes_options'
|
76 |
+
);
|
77 |
+
|
78 |
+
add_action('admin_print_scripts-' . $eml_taxonomies_options_suffix, 'wpuxss_eml_admin_settings_pages_scripts');
|
79 |
+
add_action('admin_print_scripts-' . $eml_mimetype_options_suffix, 'wpuxss_eml_admin_settings_pages_scripts');
|
80 |
}
|
81 |
|
82 |
|
83 |
|
84 |
|
85 |
/**
|
86 |
+
* wpuxss_eml_admin_settings_pages_scripts
|
87 |
*
|
88 |
* @since 1.0
|
89 |
* @created 28/10/13
|
91 |
|
92 |
function wpuxss_eml_admin_settings_pages_scripts()
|
93 |
{
|
94 |
+
global $wpuxss_eml_version,
|
95 |
+
$wpuxss_eml_dir;
|
96 |
+
|
97 |
+
wp_enqueue_script(
|
98 |
+
'wpuxss-eml-options-script',
|
99 |
+
$wpuxss_eml_dir . 'js/eml-options.js',
|
100 |
+
array('jquery'),
|
101 |
+
$wpuxss_eml_version,
|
102 |
+
true
|
103 |
+
);
|
104 |
+
|
105 |
+
$i18n_data = array(
|
106 |
+
'edit' => __( 'Edit', 'eml' ),
|
107 |
+
'close' => __( 'Close', 'eml' ),
|
108 |
+
'view' => __( 'View', 'eml' ),
|
109 |
+
'update' => __( 'Update', 'eml' ),
|
110 |
+
'add_new' => __( 'Add New', 'eml' ),
|
111 |
+
'new' => __( 'New', 'eml' ),
|
112 |
+
'name' => __( 'Name', 'eml' ),
|
113 |
+
'parent' => __( 'Parent', 'eml' ),
|
114 |
+
'all' => __( 'All', 'eml' ),
|
115 |
+
'search' => __( 'Search', 'eml' ),
|
116 |
+
|
117 |
+
'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' ),
|
118 |
+
'tax_error_duplicate' => __( 'There is already a taxonomy with the same name. Please chose other one.', 'eml' ),
|
119 |
+
'tax_new' => __( 'New Taxonomy', 'eml' ),
|
120 |
+
'tax_error_empty_both' => __( 'Please choose Singular and Plural names for all your new taxomonies.', 'eml' ),
|
121 |
+
'tax_error_empty_singular' => __( 'Please choose Singilar name for all your new taxomonies.', 'eml' ),
|
122 |
+
'tax_error_empty_plural' => __( 'Please choose Plural Name for all your new taxomonies.', 'eml' ),
|
123 |
+
|
124 |
+
'mime_deletion_confirm' => __( 'Warning! All your custom MIME Types will be deleted by this operation.', 'eml' ),
|
125 |
+
'mime_error_empty_fields' => __( 'Please fill into all fields.', 'eml' ),
|
126 |
+
'mime_error_duplicate' => __( 'Duplicate extensions or MIME types. Please chose other one.', 'eml' )
|
127 |
+
);
|
128 |
+
|
129 |
+
wp_localize_script(
|
130 |
+
'wpuxss-eml-options-script',
|
131 |
+
'wpuxss_eml_i18n_data',
|
132 |
+
$i18n_data
|
133 |
+
);
|
134 |
}
|
135 |
|
136 |
|
146 |
|
147 |
function wpuxss_eml_print_taxonomies_options()
|
148 |
{
|
149 |
+
if (!current_user_can('manage_options'))
|
150 |
+
wp_die( __('You do not have sufficient permissions to access this page.','eml') );
|
151 |
+
|
152 |
+
$wpuxss_eml_taxonomies = get_option('wpuxss_eml_taxonomies');
|
153 |
+
$taxonomies = get_taxonomies(array(),'names');
|
154 |
+
?>
|
155 |
+
|
156 |
+
<div id="wpuxss-eml-global-options-wrap" class="wrap">
|
157 |
+
<?php screen_icon('options-general'); ?>
|
158 |
+
<h2><?php _e('Taxonomies','eml'); ?></h2>
|
159 |
+
|
160 |
+
<?php settings_errors(); ?>
|
161 |
+
|
162 |
+
<div id="poststuff">
|
163 |
|
164 |
+
<div id="post-body" class="metabox-holder columns-2">
|
|
|
|
|
165 |
|
166 |
+
<div id="postbox-container-2" class="postbox-container">
|
167 |
+
|
168 |
+
<form id="wpuxss-eml-form-taxonomies" method="post" action="options.php">
|
169 |
|
170 |
+
<?php settings_fields( 'wpuxss_eml_taxonomies' ); ?>
|
171 |
+
|
172 |
+
<div class="postbox">
|
173 |
+
|
174 |
+
<h3 class="hndle"><?php _e('Media Taxonomies','eml'); ?></h3>
|
175 |
+
|
176 |
+
<div class="inside">
|
177 |
|
178 |
+
<p><?php _e('Assign following taxonomies to Media Library:','eml'); ?></p>
|
179 |
+
|
180 |
+
<?php
|
181 |
+
|
182 |
+
$html = '';
|
183 |
+
foreach ( get_taxonomies(array(),'object') as $taxonomy )
|
184 |
+
{
|
185 |
+
if ( (in_array('attachment',$taxonomy->object_type) && count($taxonomy->object_type) == 1) || empty($taxonomy->object_type) )
|
186 |
+
{
|
187 |
+
$assigned = intval($wpuxss_eml_taxonomies[$taxonomy->name]['assigned']);
|
188 |
+
$eml_media = intval($wpuxss_eml_taxonomies[$taxonomy->name]['eml_media']);
|
189 |
+
|
190 |
+
if ($eml_media)
|
191 |
+
$li_class = 'wpuxss-eml-taxonomy';
|
192 |
+
else
|
193 |
+
$li_class = 'wpuxss-non-eml-taxonomy';
|
194 |
+
|
195 |
+
$html .= '<li class="' . $li_class . '" id="' . $taxonomy->name . '">';
|
196 |
+
|
197 |
+
$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') . '" />';
|
198 |
+
$html .= '<input name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][eml_media]" type="hidden" value="' . $eml_media . '" />';
|
199 |
+
$html .= ' <label>' . $taxonomy->label . '</label>';
|
200 |
+
$html .= '<a class="wpuxss-eml-button-edit" title="' . __('Edit Taxonomy','eml') . '" href="javascript:;">' . __('Edit','eml') . ' ↓</a>';
|
201 |
+
if ( $wpuxss_eml_taxonomies[$taxonomy->name]['eml_media'] == 1 )
|
202 |
+
{
|
203 |
+
$html .= '<a class="wpuxss-eml-button-remove" title="' . __('Delete Taxonomy','eml') . '" href="javascript:;">–</a>';
|
204 |
+
|
205 |
+
$html .= '<div class="wpuxss-eml-taxonomy-edit" style="display:none;">';
|
206 |
+
|
207 |
+
$html .= '<div class="wpuxss-eml-labels-edit">';
|
208 |
+
$html .= '<h4>' . __('Labels','eml') . '</h4>';
|
209 |
+
$html .= '<ul>';
|
210 |
+
$html .= '<li><label>' . __('Singular','eml') . '</label><input type="text" class="wpuxss-eml-singular_name" name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][labels][singular_name]" value="' . esc_html($taxonomy->labels->singular_name) . '" /></li>';
|
211 |
+
$html .= '<li><label>' . __('Plural','eml') . '</label><input type="text" class="wpuxss-eml-name" name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][labels][name]" value="' . esc_html($taxonomy->labels->name) . '" /></li>';
|
212 |
+
$html .= '<li><label>' . __('Menu Name','eml') . '</label><input type="text" class="wpuxss-eml-menu_name" name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][labels][menu_name]" value="' . esc_html($taxonomy->labels->menu_name) . '" /></li>';
|
213 |
+
$html .= '<li><label>' . __('All','eml') . '</label><input type="text" class="wpuxss-eml-all_items" name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][labels][all_items]" value="' . esc_html($taxonomy->labels->all_items) . '" /></li>';
|
214 |
+
$html .= '<li><label>' . __('Edit','eml') . '</label><input type="text" class="wpuxss-eml-edit_item" name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][labels][edit_item]" value="' . esc_html($taxonomy->labels->edit_item) . '" /></li>';
|
215 |
+
$html .= '<li><label>' . __('View','eml') . '</label><input type="text" class="wpuxss-eml-view_item" name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][labels][view_item]" value="' . esc_html($taxonomy->labels->view_item) . '" /></li>';
|
216 |
+
$html .= '<li><label>' . __('Update','eml') . '</label><input type="text" class="wpuxss-eml-update_item" name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][labels][update_item]" value="' . esc_html($taxonomy->labels->update_item) . '" /></li>';
|
217 |
+
$html .= '<li><label>' . __('Add New','eml') . '</label><input type="text" class="wpuxss-eml-add_new_item" name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][labels][add_new_item]" value="' . esc_html($taxonomy->labels->add_new_item) . '" /></li>';
|
218 |
+
$html .= '<li><label>' . __('New','eml') . '</label><input type="text" class="wpuxss-eml-new_item_name" name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][labels][new_item_name]" value="' . esc_html($taxonomy->labels->new_item_name) . '" /></li>';
|
219 |
+
$html .= '<li><label>' . __('Parent','eml') . '</label><input type="text" class="wpuxss-eml-parent_item" name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][labels][parent_item]" value="' . esc_html($taxonomy->labels->parent_item) . '" /></li>';
|
220 |
+
$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>';
|
221 |
+
$html .= '</ul>';
|
222 |
+
$html .= '</div>';
|
223 |
+
|
224 |
+
$html .= '<div class="wpuxss-eml-settings-edit">';
|
225 |
+
$html .= '<h4>' . __('Settings','eml') . '</h4>';
|
226 |
+
$html .= '<ul>';
|
227 |
+
$html .= '<li><label>' . __('Hierarchical','eml') . '</label><input type="checkbox" class="wpuxss-eml-hierarchical" name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][hierarchical]" value="1" ' . checked( 1, $taxonomy->hierarchical, false ) . ' /></li>';
|
228 |
+
$html .= '<li><label>' . __('Column in List View','eml') . '</label><input type="checkbox" class="wpuxss-eml-show_admin_column" name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][show_admin_column]" value="1" ' . checked( 1, $taxonomy->show_admin_column, false ) . ' /></li>';
|
229 |
+
$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>';
|
230 |
+
$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>';
|
231 |
+
$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>';
|
232 |
+
$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>';
|
233 |
+
$html .= '<li><label>' . __('Slug','eml') . '</label><input type="text" class="wpuxss-eml-slug" name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][rewrite][slug]" value="' . esc_attr($taxonomy->rewrite['slug']) . '" readonly="readonly" /></li>';
|
234 |
+
$html .= '</ul>';
|
235 |
+
$html .= '</div>';
|
236 |
+
|
237 |
+
$html .= '</div>';
|
238 |
+
}
|
239 |
+
else
|
240 |
+
{
|
241 |
+
$html .= '<div class="wpuxss-eml-taxonomy-edit" style="display:none;">';
|
242 |
+
|
243 |
+
$html .= '<div class="wpuxss-eml-settings-edit">';
|
244 |
+
$html .= '<h4>' . __('Settings','eml') . '</h4>';
|
245 |
+
$html .= '<ul>';
|
246 |
+
$html .= '<li><label>' . __('Filter in Media Library','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>';
|
247 |
+
$html .= '<li><label>' . __('Filter in Media Popup / Grid View','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>';
|
248 |
+
$html .= '</ul>';
|
249 |
+
|
250 |
+
$html .= '<input name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][show_admin_column]" type="hidden" value="' . $wpuxss_eml_taxonomies[$taxonomy->name]['show_admin_column'] . '" />';
|
251 |
+
$html .= '<input name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][show_in_nav_menus]" type="hidden" value="' . $wpuxss_eml_taxonomies[$taxonomy->name]['show_in_nav_menus'] . '" />';
|
252 |
+
$html .= '<input name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][hierarchical]" type="hidden" value="' . $wpuxss_eml_taxonomies[$taxonomy->name]['hierarchical'] . '" />';
|
253 |
+
$html .= '<input name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][sort]" type="hidden" value="' . $wpuxss_eml_taxonomies[$taxonomy->name]['sort'] . '" />';
|
254 |
+
$html .= '</div>';
|
255 |
+
|
256 |
+
$html .= '</div>';
|
257 |
+
}
|
258 |
+
$html .= '</li>';
|
259 |
+
}
|
260 |
+
}
|
261 |
+
|
262 |
+
$html .= '<li class="wpuxss-eml-clone" style="display:none">';
|
263 |
+
$html .= '<input class="wpuxss-eml-assigned" name="" type="checkbox" class="wpuxss-eml-assigned" value="1" checked="checked" title="' . __('Assign Taxonomy','eml') . '" />';
|
264 |
+
$html .= '<input name="" type="hidden" class="wpuxss-eml-eml_media" value="1" />';
|
265 |
+
$html .= ' <label class="wpuxss-eml-taxonomy-label">' . __('New Taxonomy','eml') . '</label>';
|
266 |
+
|
267 |
+
$html .= '<a class="wpuxss-eml-button-remove" title="' . __('Delete Taxonomy','eml') . '" href="javascript:;">–</a>';
|
268 |
+
|
269 |
+
$html .= '<div class="wpuxss-eml-taxonomy-edit">';
|
270 |
+
|
271 |
+
$html .= '<div class="wpuxss-eml-labels-edit">';
|
272 |
+
$html .= '<h4>' . __('Labels','eml') . '</h4>';
|
273 |
+
$html .= '<ul>';
|
274 |
+
$html .= '<li><label>' . __('Singular','eml') . '</label><input type="text" class="wpuxss-eml-singular_name" name="" value="" /></li>';
|
275 |
+
$html .= '<li><label>' . __('Plural','eml') . '</label><input type="text" class="wpuxss-eml-name" name="" value="" /></li>';
|
276 |
+
$html .= '<li><label>' . __('Menu Name','eml') . '</label><input type="text" class="wpuxss-eml-menu_name" name="" value="" /></li>';
|
277 |
+
$html .= '<li><label>' . __('All','eml') . '</label><input type="text" class="wpuxss-eml-all_items" name="" value="" /></li>';
|
278 |
+
$html .= '<li><label>' . __('Edit','eml') . '</label><input type="text" class="wpuxss-eml-edit_item" name="" value="" /></li>';
|
279 |
+
$html .= '<li><label>' . __('View','eml') . '</label><input type="text" class="wpuxss-eml-view_item" name="" value="" /></li>';
|
280 |
+
$html .= '<li><label>' . __('Update','eml') . '</label><input type="text" class="wpuxss-eml-update_item" name="" value="" /></li>';
|
281 |
+
$html .= '<li><label>' . __('Add New','eml') . '</label><input type="text" class="wpuxss-eml-add_new_item" name="" value="" /></li>';
|
282 |
+
$html .= '<li><label>' . __('New','eml') . '</label><input type="text" class="wpuxss-eml-new_item_name" name="" value="" /></li>';
|
283 |
+
$html .= '<li><label>' . __('Parent','eml') . '</label><input type="text" class="wpuxss-eml-parent_item" name="" value="" /></li>';
|
284 |
+
$html .= '<li><label>' . __('Search','eml') . '</label><input type="text" class="wpuxss-eml-search_items" name="" value="" /></li>';
|
285 |
+
$html .= '</ul>';
|
286 |
+
$html .= '</div>';
|
287 |
+
|
288 |
+
$html .= '<div class="wpuxss-eml-settings-edit">';
|
289 |
+
$html .= '<h4>' . __('Settings','eml') . '</h4>';
|
290 |
+
$html .= '<ul>';
|
291 |
+
$html .= '<li><label>' . __('Hierarchical','eml') . '</label><input type="checkbox" class="wpuxss-eml-hierarchical" name="" value="1" checked="checked" /></li>';
|
292 |
+
$html .= '<li><label>' . __('Column in Media Library','eml') . '</label><input class="wpuxss-eml-show_admin_column" type="checkbox" name="" value="1" /></li>';
|
293 |
+
$html .= '<li><label>' . __('Filter in Media Library','eml') . '</label><input class="wpuxss-eml-admin_filter" type="checkbox" name="" value="1" /></li>';
|
294 |
+
$html .= '<li><label>' . __('Filter in Media Popup / Grid View','eml') . '</label><input class="wpuxss-eml-media_uploader_filter" type="checkbox" name="" value="1" /></li>';
|
295 |
+
$html .= '<li><label>' . __('Show in Nav Menu','eml') . '</label><input type="checkbox" class="wpuxss-eml-show_in_nav_menus" name="" value="1" /></li>';
|
296 |
+
$html .= '<li><label>' . __('Remember terms order (sort)','eml') . '</label><input type="checkbox" class="wpuxss-eml-sort" name="" value="1" /></li>';
|
297 |
+
$html .= '<li><label>' . __('Slug','eml') . '</label><input type="text" class="wpuxss-eml-slug" name="" value="" /></li>';
|
298 |
+
$html .= '</ul>';
|
299 |
+
$html .= '</div>';
|
300 |
+
|
301 |
+
$html .= '</div>';
|
302 |
+
$html .= '</li>';
|
303 |
+
|
304 |
+
if ( !empty($html) )
|
305 |
+
{
|
306 |
+
?>
|
307 |
+
<ul class="wpuxss-eml-settings-list wpuxss-eml-media-taxonomy-list">
|
308 |
+
<?php echo $html; ?>
|
309 |
+
</ul>
|
310 |
+
<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>
|
311 |
+
<?php
|
312 |
+
}
|
313 |
+
|
314 |
+
submit_button();
|
315 |
+
?>
|
316 |
+
|
317 |
+
</div>
|
318 |
+
|
319 |
+
</div>
|
320 |
+
|
321 |
+
<div class="postbox">
|
322 |
|
323 |
+
<h3 class="hndle"><?php _e('Non-Media Taxonomies','eml'); ?></h3>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
324 |
|
325 |
+
<div class="inside">
|
326 |
|
327 |
+
<p><?php _e('Assign following taxonomies to Media Library:','eml'); ?></p>
|
328 |
+
|
329 |
+
<?php
|
330 |
+
$unuse = array('revision','nav_menu_item','attachment');
|
331 |
+
foreach ( get_post_types(array(),'object') as $post_type )
|
332 |
+
{
|
333 |
+
if ( !in_array($post_type->name,$unuse) )
|
334 |
+
{
|
335 |
+
$taxonomies = get_object_taxonomies($post_type->name,'object');
|
336 |
+
if ( !empty($taxonomies) )
|
337 |
+
{
|
338 |
+
$html = '';
|
339 |
+
foreach ( $taxonomies as $taxonomy )
|
340 |
+
{
|
341 |
+
if ( $taxonomy->name != 'post_format' )
|
342 |
+
{
|
343 |
+
$html .= '<li>';
|
344 |
+
$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') . '" />';
|
345 |
+
$html .= '<input name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][eml_media]" type="hidden" value="' . $wpuxss_eml_taxonomies[$taxonomy->name]['eml_media'] . '" />';
|
346 |
+
$html .= '<input name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][show_admin_column]" type="hidden" value="' . $wpuxss_eml_taxonomies[$taxonomy->name]['show_admin_column'] . '" />';
|
347 |
+
$html .= '<input name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][show_in_nav_menus]" type="hidden" value="' . $wpuxss_eml_taxonomies[$taxonomy->name]['show_in_nav_menus'] . '" />';
|
348 |
+
$html .= '<input name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][hierarchical]" type="hidden" value="' . $wpuxss_eml_taxonomies[$taxonomy->name]['hierarchical'] . '" />';
|
349 |
+
$html .= '<input name="wpuxss_eml_taxonomies[' . $taxonomy->name . '][sort]" type="hidden" value="' . $wpuxss_eml_taxonomies[$taxonomy->name]['sort'] . '" />';
|
350 |
+
$html .= ' <label>' . $taxonomy->label . '</label>';
|
351 |
+
$html .= '<a class="wpuxss-eml-button-edit" title="' . __('Edit Taxonomy','eml') . '" href="javascript:;">' . __('Edit','eml') . ' ↓</a>';
|
352 |
+
$html .= '<div class="wpuxss-eml-taxonomy-edit" style="display:none;">';
|
353 |
+
|
354 |
+
$html .= '<h4>' . __('Settings','eml') . '</h4>';
|
355 |
+
$html .= '<ul>';
|
356 |
+
$html .= '<li><label>' . __('Filter in Media Library','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>';
|
357 |
+
$html .= '<li><label>' . __('Filter in Media Popup / Grid View','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>';
|
358 |
+
$html .= '</ul>';
|
359 |
+
|
360 |
+
$html .= '</div>';
|
361 |
+
$html .= '</li>';
|
362 |
+
|
363 |
+
}
|
364 |
+
}
|
365 |
+
if ( !empty($html) )
|
366 |
+
{
|
367 |
+
?>
|
368 |
+
<h4><?php echo $post_type->label; ?></h4>
|
369 |
+
<ul class="wpuxss-eml-settings-list wpuxss-eml-non-media-taxonomy-list">
|
370 |
+
<?php echo $html; ?>
|
371 |
+
</ul>
|
372 |
+
<?php
|
373 |
+
}
|
374 |
+
}
|
375 |
+
}
|
376 |
+
}
|
377 |
+
|
378 |
+
submit_button();
|
379 |
+
?>
|
|
|
|
|
380 |
|
381 |
+
</div>
|
382 |
+
|
383 |
+
</div>
|
384 |
+
|
385 |
+
</form>
|
386 |
+
|
387 |
+
</div>
|
388 |
+
|
389 |
+
<div id="postbox-container-1" class="postbox-container">
|
390 |
|
391 |
+
<?php wpuxss_eml_print_credits(); ?>
|
392 |
+
|
393 |
+
</div>
|
394 |
+
|
395 |
+
</div>
|
396 |
|
397 |
+
</div>
|
398 |
+
|
399 |
+
</div>
|
|
|
|
|
400 |
|
401 |
+
<?php
|
402 |
}
|
403 |
|
404 |
|
414 |
|
415 |
function wpuxss_eml_print_mimetypes_options()
|
416 |
{
|
417 |
+
if (!current_user_can('manage_options'))
|
418 |
+
wp_die( __('You do not have sufficient permissions to access this page.','eml') );
|
419 |
|
420 |
+
$wpuxss_eml_mimes = get_option('wpuxss_eml_mimes');
|
421 |
+
$wpuxss_eml_mimes_backup = get_option('wpuxss_eml_mimes_backup');
|
422 |
+
?>
|
423 |
|
424 |
+
<div id="wpuxss-eml-global-options-wrap" class="wrap">
|
425 |
+
<?php screen_icon('options-general'); ?>
|
426 |
+
<h2>
|
427 |
+
<?php _e('MIME Types','eml'); ?>
|
428 |
+
<a class="add-new-h2 wpuxss-eml-button-create-mime" href="javascript:;">+ <?php _e('Add New MIME Type','eml'); ?></a>
|
429 |
+
</h2>
|
430 |
+
|
431 |
+
<?php settings_errors(); ?>
|
432 |
|
433 |
+
<div id="poststuff">
|
434 |
+
|
435 |
+
<div id="post-body" class="metabox-holder columns-2">
|
436 |
+
|
437 |
+
<div id="postbox-container-2" class="postbox-container">
|
438 |
+
|
439 |
+
<form method="post" action="options.php" id="wpuxss-eml-form-mimetypes">
|
440 |
+
|
441 |
+
<?php settings_fields( 'wpuxss_eml_mimes' ); ?>
|
442 |
+
|
443 |
+
<table class="wpuxss-eml-mime-type-list wp-list-table widefat" cellspacing="0">
|
444 |
+
<thead>
|
445 |
+
<tr>
|
446 |
+
<th scope="col" class="manage-column wpuxss-eml-column-extension"><?php _e('Extension','eml'); ?></th>
|
447 |
+
<th scope="col" class="manage-column wpuxss-eml-column-mime"><?php _e('MIME Type','eml'); ?></th>
|
448 |
+
<th scope="col" class="manage-column wpuxss-eml-column-singular"><?php _e('Singular Label','eml'); ?></th>
|
449 |
+
<th scope="col" class="manage-column wpuxss-eml-column-plural"><?php _e('Plural Label','eml'); ?></th>
|
450 |
+
<th scope="col" class="manage-column wpuxss-eml-column-filter"><?php _e('Add Filter','eml'); ?></th>
|
451 |
+
<th scope="col" class="manage-column wpuxss-eml-column-upload"><?php _e('Allow Upload','eml'); ?></th>
|
452 |
+
<th scope="col" class="manage-column wpuxss-eml-column-delete"></th>
|
453 |
+
</tr>
|
454 |
+
</thead>
|
455 |
+
|
456 |
+
|
457 |
+
<tbody>
|
458 |
+
|
459 |
+
<?php
|
460 |
+
$allowed_mimes = get_allowed_mime_types();
|
461 |
+
$all_mimes = wp_get_mime_types();
|
462 |
+
ksort( $all_mimes, SORT_STRING );
|
463 |
+
|
464 |
+
foreach ( $all_mimes as $type => $mime )
|
465 |
+
{
|
466 |
+
if ( isset($wpuxss_eml_mimes[$type]) )
|
467 |
+
{
|
468 |
+
$label = '<code>'. str_replace( '|', '</code>, <code>', $type ) .'</code>';
|
469 |
+
|
470 |
+
$allowed = false;
|
471 |
+
if ( array_key_exists( $type,$allowed_mimes ) )
|
472 |
+
$allowed = true;
|
473 |
+
?>
|
474 |
+
|
475 |
+
<tr>
|
476 |
+
<td id="<?php echo $type; ?>"><?php echo $label; ?></td>
|
477 |
+
<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>
|
478 |
+
<td><input type="text" name="wpuxss_eml_mimes[<?php echo $type; ?>][singular]" value="<?php echo esc_html($wpuxss_eml_mimes[$type]['singular']); ?>" /></td>
|
479 |
+
<td><input type="text" name="wpuxss_eml_mimes[<?php echo $type; ?>][plural]" value="<?php echo esc_html($wpuxss_eml_mimes[$type]['plural']); ?>" /></td>
|
480 |
+
<td class="checkbox_td"><input type="checkbox" name="wpuxss_eml_mimes[<?php echo $type; ?>][filter]" title="<?php _e('Add Filter','eml'); ?>" value="1" <?php checked(1, $wpuxss_eml_mimes[$type]['filter']); ?> /></td>
|
481 |
+
<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>
|
482 |
+
<td><a class="wpuxss-eml-button-remove" title="Delete MIME Type" href="javascript:;">–</a></td>
|
483 |
+
</tr>
|
484 |
+
|
485 |
+
<?php
|
486 |
+
}
|
487 |
+
}
|
488 |
+
?>
|
489 |
+
|
490 |
+
<tr class="wpuxss-eml-clone" style="display:none;">
|
491 |
+
<td><input type="text" class="wpuxss-eml-type" placeholder="jpg|jpeg|jpe" /></td>
|
492 |
+
<td><input type="text" class="wpuxss-eml-mime" placeholder="image/jpeg" /></td>
|
493 |
+
<td><input type="text" class="wpuxss-eml-singular" placeholder="Image" /></td>
|
494 |
+
<td><input type="text" class="wpuxss-eml-plural" placeholder="Images" /></td>
|
495 |
+
<td class="checkbox_td"><input type="checkbox" class="wpuxss-eml-filter" title="<?php _e('Add Filter','eml'); ?>" value="1" /></td>
|
496 |
+
<td class="checkbox_td"><input type="checkbox" class="wpuxss-eml-upload" title="<?php _e('Allow Upload','eml'); ?>" value="1" /></td>
|
497 |
+
<td><a class="wpuxss-eml-button-remove" title="<?php _e('Delete MIME Type','eml'); ?>" href="javascript:;">–</a></td>
|
498 |
+
</tr>
|
499 |
+
|
500 |
+
</tbody>
|
501 |
+
<tfoot>
|
502 |
+
<tr>
|
503 |
+
<th scope="col" class="manage-column wpuxss-eml-column-extension"><?php _e('Extension','eml'); ?></th>
|
504 |
+
<th scope="col" class="manage-column wpuxss-eml-column-mime"><?php _e('MIME Type','eml'); ?></th>
|
505 |
+
<th scope="col" class="manage-column wpuxss-eml-column-singular"><?php _e('Singular Label','eml'); ?></th>
|
506 |
+
<th scope="col" class="manage-column wpuxss-eml-column-plural"><?php _e('Plural Label','eml'); ?></th>
|
507 |
+
<th scope="col" class="manage-column wpuxss-eml-column-filter"><?php _e('Add Filter','eml'); ?></th>
|
508 |
+
<th scope="col" class="manage-column wpuxss-eml-column-upload"><?php _e('Allow Upload','eml'); ?></th>
|
509 |
+
<th scope="col" class="manage-column wpuxss-eml-column-delete"></th>
|
510 |
+
</tr>
|
511 |
+
</tfoot>
|
512 |
+
</table>
|
513 |
+
|
514 |
+
<?php submit_button(__('Restore default MIME Types','eml'),'secondary','wpuxss_eml_restore_mimes_backup'); ?>
|
515 |
+
|
516 |
+
<?php submit_button(); ?>
|
517 |
+
|
518 |
+
</form>
|
519 |
+
|
520 |
+
</div>
|
521 |
+
|
522 |
+
<div id="postbox-container-1" class="postbox-container">
|
523 |
|
524 |
+
<?php wpuxss_eml_print_credits(); ?>
|
525 |
+
|
526 |
+
</div>
|
527 |
+
|
528 |
+
</div>
|
529 |
|
530 |
+
</div>
|
531 |
+
|
532 |
+
</div>
|
|
|
|
|
533 |
|
534 |
+
<?php
|
535 |
}
|
536 |
|
537 |
|
547 |
|
548 |
function wpuxss_eml_print_credits()
|
549 |
{
|
550 |
+
global $wpuxss_eml_version;
|
551 |
+
?>
|
552 |
+
|
553 |
+
<div class="postbox" id="wpuxss-credits">
|
554 |
+
|
555 |
+
<h3 class="hndle">Enhanced Media Library <?php echo $wpuxss_eml_version; ?></h3>
|
556 |
+
|
557 |
+
<div class="inside">
|
558 |
+
|
559 |
+
<h4>Changelog</h4>
|
560 |
+
<p>What's new in <a href="http://wordpress.org/plugins/enhanced-media-library/changelog/">version <?php echo $wpuxss_eml_version; ?></a>.</p>
|
561 |
+
|
562 |
+
<h4>Enhanced Media Library PRO</h4>
|
563 |
+
<p>More features under the hood <a href="http://wordpressuxsolutions.com/plugins/enhanced-media-library/">wordpressuxsolutions.com</a>.</p>
|
564 |
+
|
565 |
+
<h4>Support</h4>
|
566 |
+
<p>Feel free to ask for help on <a href="http://wordpressuxsolutions.com/support/">wordpressuxsolutions.com</a>. Support is free for both versions of the plugin.</p>
|
567 |
+
|
568 |
+
<h4>Plugin rating</h4>
|
569 |
+
<p>Please <a href="http://wordpress.org/support/view/plugin-reviews/enhanced-media-library">vote for the plugin</a>. Thanks!</p>
|
570 |
+
|
571 |
+
<h4>Other plugins you may find useful</h4>
|
572 |
+
<ul>
|
573 |
+
<li><a href="http://wordpress.org/plugins/toolbar-publish-button/">Toolbar Publish Button</a></li>
|
574 |
+
</ul>
|
575 |
+
|
576 |
+
<div class="author">
|
577 |
+
<span><a href="http://wordpressuxsolutions.com/">WordPress UX Solutions</a> by <a class="logo-webbistro" href="http://twitter.com/webbistro"><span class="icon-webbistro">@</span>webbistro</a></span>
|
578 |
+
</div>
|
579 |
+
|
580 |
+
</div>
|
581 |
+
|
582 |
+
</div>
|
583 |
+
|
584 |
+
<?php
|
585 |
}
|
586 |
|
587 |
|
core/taxonomies.php
CHANGED
@@ -1,31 +1,37 @@
|
|
1 |
<?php
|
2 |
|
|
|
|
|
|
|
3 |
/**
|
4 |
-
*
|
5 |
*
|
6 |
* Unassign taxonomy (duplicates native WP(Since: WordPress 3.7.0) for back compatibility)
|
7 |
* Based on /wp-includes/taxonomy.php
|
8 |
*
|
9 |
-
* @since
|
10 |
-
* @created
|
11 |
*/
|
12 |
|
13 |
-
|
14 |
-
{
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
|
|
|
|
|
|
29 |
}
|
30 |
|
31 |
|
@@ -41,78 +47,78 @@ function wpuxss_eml_unregister_taxonomy_for_object_type( $taxonomy, $object_type
|
|
41 |
|
42 |
function wpuxss_eml_taxonomies_validate($input)
|
43 |
{
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
}
|
117 |
|
118 |
|
@@ -129,48 +135,62 @@ function wpuxss_eml_taxonomies_validate($input)
|
|
129 |
|
130 |
add_action( 'wp_ajax_query-attachments', 'wpuxss_eml_ajax_query_attachments', 0 );
|
131 |
|
132 |
-
function wpuxss_eml_ajax_query_attachments()
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
174 |
}
|
175 |
|
176 |
|
@@ -189,43 +209,45 @@ add_action('restrict_manage_posts','wpuxss_eml_restrict_manage_posts');
|
|
189 |
|
190 |
function wpuxss_eml_restrict_manage_posts()
|
191 |
{
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
|
|
|
|
229 |
}
|
230 |
|
231 |
|
@@ -242,46 +264,46 @@ add_filter('parse_query', 'wpuxss_eml_parse_query');
|
|
242 |
|
243 |
function wpuxss_eml_parse_query($query)
|
244 |
{
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
}
|
286 |
|
287 |
|
@@ -298,41 +320,53 @@ function wpuxss_eml_parse_query($query)
|
|
298 |
|
299 |
add_filter( 'attachment_fields_to_edit', 'wpuxss_eml_attachment_fields_to_edit', 10, 2 );
|
300 |
|
301 |
-
function wpuxss_eml_attachment_fields_to_edit( $form_fields, $post )
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
336 |
}
|
337 |
|
338 |
|
@@ -349,38 +383,38 @@ function wpuxss_eml_attachment_fields_to_edit( $form_fields, $post )
|
|
349 |
|
350 |
class Walker_Media_Taxonomy_Checklist extends Walker
|
351 |
{
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
}
|
385 |
|
386 |
|
@@ -397,31 +431,31 @@ class Walker_Media_Taxonomy_Checklist extends Walker
|
|
397 |
|
398 |
class Walker_Media_Taxonomy_Uploader_Filter extends Walker
|
399 |
{
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
}
|
426 |
|
427 |
|
@@ -441,50 +475,50 @@ add_action( 'wp_ajax_save-attachment-compat', 'wpuxss_eml_save_attachment_compat
|
|
441 |
|
442 |
function wpuxss_eml_save_attachment_compat()
|
443 |
{
|
444 |
-
|
445 |
-
|
446 |
|
447 |
-
|
448 |
-
|
449 |
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
|
454 |
-
|
455 |
|
456 |
-
|
457 |
-
|
458 |
|
459 |
-
|
460 |
|
461 |
-
|
462 |
-
|
463 |
|
464 |
-
|
465 |
-
|
466 |
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
|
472 |
-
|
473 |
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
}
|
489 |
|
490 |
|
@@ -503,19 +537,18 @@ add_action( 'pre_get_posts', 'wpuxss_eml_pre_get_posts', 99 );
|
|
503 |
|
504 |
function wpuxss_eml_pre_get_posts( $query )
|
505 |
{
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
}
|
519 |
}
|
520 |
|
521 |
?>
|
1 |
<?php
|
2 |
|
3 |
+
|
4 |
+
|
5 |
+
|
6 |
/**
|
7 |
+
* unregister_taxonomy_for_object_type
|
8 |
*
|
9 |
* Unassign taxonomy (duplicates native WP(Since: WordPress 3.7.0) for back compatibility)
|
10 |
* Based on /wp-includes/taxonomy.php
|
11 |
*
|
12 |
+
* @since 2.0
|
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 |
|
47 |
|
48 |
function wpuxss_eml_taxonomies_validate($input)
|
49 |
{
|
50 |
+
if ( !$input ) $input = array();
|
51 |
+
|
52 |
+
foreach ( $input as $taxonomy => $params )
|
53 |
+
{
|
54 |
+
$sanitized_taxonomy = sanitize_key($taxonomy);
|
55 |
+
|
56 |
+
if ( $sanitized_taxonomy !== $taxonomy )
|
57 |
+
{
|
58 |
+
$input[$sanitized_taxonomy] = $input[$taxonomy];
|
59 |
+
unset($input[$taxonomy]);
|
60 |
+
$taxonomy = $sanitized_taxonomy;
|
61 |
+
}
|
62 |
+
|
63 |
+
if ( !isset($params['hierarchical']) )
|
64 |
+
$input[$taxonomy]['hierarchical'] = 0;
|
65 |
+
|
66 |
+
if ( !isset($params['sort']) )
|
67 |
+
$input[$taxonomy]['sort'] = 0;
|
68 |
+
|
69 |
+
if ( !isset($params['show_admin_column']) )
|
70 |
+
$input[$taxonomy]['show_admin_column'] = 0;
|
71 |
+
|
72 |
+
if ( !isset($params['show_in_nav_menus']) )
|
73 |
+
$input[$taxonomy]['show_in_nav_menus'] = 0;
|
74 |
+
|
75 |
+
if ( !isset($params['assigned']) )
|
76 |
+
$input[$taxonomy]['assigned'] = 0;
|
77 |
+
|
78 |
+
if ( !isset($params['admin_filter']) )
|
79 |
+
$input[$taxonomy]['admin_filter'] = 0;
|
80 |
+
|
81 |
+
if ( !isset($params['media_uploader_filter']) )
|
82 |
+
$input[$taxonomy]['media_uploader_filter'] = 0;
|
83 |
+
|
84 |
+
$input[$taxonomy]['hierarchical'] = intval($input[$taxonomy]['hierarchical']);
|
85 |
+
$input[$taxonomy]['sort'] = intval($input[$taxonomy]['sort']);
|
86 |
+
$input[$taxonomy]['show_admin_column'] = intval($input[$taxonomy]['show_admin_column']);
|
87 |
+
$input[$taxonomy]['show_in_nav_menus'] = intval($input[$taxonomy]['show_in_nav_menus']);
|
88 |
+
$input[$taxonomy]['assigned'] = intval($input[$taxonomy]['assigned']);
|
89 |
+
$input[$taxonomy]['admin_filter'] = intval($input[$taxonomy]['admin_filter']);
|
90 |
+
$input[$taxonomy]['media_uploader_filter'] = intval($input[$taxonomy]['media_uploader_filter']);
|
91 |
+
|
92 |
+
if ( isset($params['labels']) )
|
93 |
+
{
|
94 |
+
$default_labels = array(
|
95 |
+
'menu_name' => $params['labels']['name'],
|
96 |
+
'all_items' => 'All ' . $params['labels']['name'],
|
97 |
+
'edit_item' => 'Edit ' . $params['labels']['singular_name'],
|
98 |
+
'view_item' => 'View ' . $params['labels']['singular_name'],
|
99 |
+
'update_item' => 'Update ' . $params['labels']['singular_name'],
|
100 |
+
'add_new_item' => 'Add New ' . $params['labels']['singular_name'],
|
101 |
+
'new_item_name' => 'New ' . $params['labels']['singular_name'] . ' Name',
|
102 |
+
'parent_item' => 'Parent ' . $params['labels']['singular_name'],
|
103 |
+
'search_items' => 'Search ' . $params['labels']['name']
|
104 |
+
);
|
105 |
+
|
106 |
+
foreach ( $params['labels'] as $label => $value )
|
107 |
+
{
|
108 |
+
$input[$taxonomy]['labels'][$label] = sanitize_text_field($value);
|
109 |
+
|
110 |
+
if ( empty($value) && isset($default_labels[$label]) )
|
111 |
+
{
|
112 |
+
$input[$taxonomy]['labels'][$label] = sanitize_text_field($default_labels[$label]);
|
113 |
+
}
|
114 |
+
}
|
115 |
+
}
|
116 |
+
|
117 |
+
if ( isset($params['rewrite']['slug']) )
|
118 |
+
$input[$taxonomy]['rewrite']['slug'] = sanitize_key($params['rewrite']['slug']);
|
119 |
+
}
|
120 |
+
|
121 |
+
return $input;
|
122 |
}
|
123 |
|
124 |
|
135 |
|
136 |
add_action( 'wp_ajax_query-attachments', 'wpuxss_eml_ajax_query_attachments', 0 );
|
137 |
|
138 |
+
function wpuxss_eml_ajax_query_attachments() {
|
139 |
+
|
140 |
+
if ( ! current_user_can( 'upload_files' ) )
|
141 |
+
wp_send_json_error();
|
142 |
+
|
143 |
+
$query = isset( $_REQUEST['query'] ) ? (array) $_REQUEST['query'] : array();
|
144 |
+
|
145 |
+
// TODO: rewrite date query as soon as WP core bug fixed
|
146 |
+
if ( isset( $query['year'] ) && $query['year'] &&
|
147 |
+
isset( $query['monthnum'] ) && $query['monthnum'] ) {
|
148 |
+
|
149 |
+
$query['m'] = $query['year'] . $query['monthnum'];
|
150 |
+
} else {
|
151 |
+
|
152 |
+
$query['m'] = '';
|
153 |
+
}
|
154 |
+
|
155 |
+
$query = array_intersect_key( $query, array_flip( array(
|
156 |
+
's', 'order', 'orderby', 'posts_per_page', 'paged', 'post_mime_type',
|
157 |
+
'post_parent', 'post__in', 'post__not_in', 'm'
|
158 |
+
) ) );
|
159 |
+
|
160 |
+
$query['tax_query'] = array( 'relation' => 'AND' );
|
161 |
+
|
162 |
+
foreach ( get_object_taxonomies('attachment','names') as $taxonomy )
|
163 |
+
{
|
164 |
+
if ( isset( $_REQUEST['query'][$taxonomy] ) && is_numeric( $_REQUEST['query'][$taxonomy] ) )
|
165 |
+
{
|
166 |
+
array_push($query['tax_query'],array(
|
167 |
+
'taxonomy' => $taxonomy,
|
168 |
+
'field' => 'id',
|
169 |
+
'terms' => $_REQUEST['query'][$taxonomy]
|
170 |
+
));
|
171 |
+
}
|
172 |
+
}
|
173 |
+
|
174 |
+
$query['post_type'] = 'attachment';
|
175 |
+
|
176 |
+
if ( MEDIA_TRASH
|
177 |
+
&& ! empty( $_REQUEST['query']['post_status'] )
|
178 |
+
&& 'trash' === $_REQUEST['query']['post_status'] ) {
|
179 |
+
$query['post_status'] = 'trash';
|
180 |
+
} else {
|
181 |
+
$query['post_status'] = 'inherit';
|
182 |
+
}
|
183 |
+
|
184 |
+
if ( current_user_can( get_post_type_object( 'attachment' )->cap->read_private_posts ) )
|
185 |
+
$query['post_status'] .= ',private';
|
186 |
+
|
187 |
+
$query = apply_filters( 'ajax_query_attachments_args', $query );
|
188 |
+
$query = new WP_Query( $query );
|
189 |
+
|
190 |
+
$posts = array_map( 'wp_prepare_attachment_for_js', $query->posts );
|
191 |
+
$posts = array_filter( $posts );
|
192 |
+
|
193 |
+
wp_send_json_success( $posts );
|
194 |
}
|
195 |
|
196 |
|
209 |
|
210 |
function wpuxss_eml_restrict_manage_posts()
|
211 |
{
|
212 |
+
global $pagenow,
|
213 |
+
$wp_query;
|
214 |
+
|
215 |
+
|
216 |
+
$wpuxss_eml_taxonomies = get_option('wpuxss_eml_taxonomies');
|
217 |
+
|
218 |
+
if ( 'upload.php' == $pagenow )
|
219 |
+
{
|
220 |
+
foreach ( get_object_taxonomies('attachment','object') as $taxonomy )
|
221 |
+
{
|
222 |
+
if ( $wpuxss_eml_taxonomies[$taxonomy->name]['admin_filter'] )
|
223 |
+
{
|
224 |
+
$selected = 0;
|
225 |
+
|
226 |
+
foreach ( $wp_query->tax_query->queries as $taxonomy_var )
|
227 |
+
{
|
228 |
+
if ( $taxonomy_var['taxonomy'] == $taxonomy->name && $taxonomy_var['field'] == 'slug' )
|
229 |
+
{
|
230 |
+
$term = get_term_by('slug', $taxonomy_var['terms'][0], $taxonomy->name);
|
231 |
+
if ($term) $selected = $term->term_id;
|
232 |
+
}
|
233 |
+
}
|
234 |
+
|
235 |
+
wp_dropdown_categories(
|
236 |
+
array(
|
237 |
+
'show_option_all' => $taxonomy->labels->all_items,
|
238 |
+
'taxonomy' => $taxonomy->name,
|
239 |
+
'name' => $taxonomy->name,
|
240 |
+
'orderby' => 'name',
|
241 |
+
'selected' => $selected,
|
242 |
+
'hierarchical' => true,
|
243 |
+
'show_count' => false,
|
244 |
+
'hide_empty' => false,
|
245 |
+
'hide_if_empty' => true
|
246 |
+
)
|
247 |
+
);
|
248 |
+
}
|
249 |
+
}
|
250 |
+
}
|
251 |
}
|
252 |
|
253 |
|
264 |
|
265 |
function wpuxss_eml_parse_query($query)
|
266 |
{
|
267 |
+
global $pagenow;
|
268 |
+
|
269 |
+
if ( 'upload.php' === $pagenow )
|
270 |
+
{
|
271 |
+
$qv = &$query->query_vars;
|
272 |
+
|
273 |
+
foreach ( get_object_taxonomies('attachment','object') as $taxonomy )
|
274 |
+
{
|
275 |
+
if ( isset( $qv['taxonomy']) && isset($qv['term'] ) )
|
276 |
+
{
|
277 |
+
$tax = $qv['taxonomy'];
|
278 |
+
|
279 |
+
if ( $tax == 'category' )
|
280 |
+
$tax = 'category_name';
|
281 |
+
|
282 |
+
if ( $tax == 'post_tag' )
|
283 |
+
$tax = 'tag';
|
284 |
+
|
285 |
+
$qv[$tax] = $qv['term'];
|
286 |
+
unset($qv['taxonomy']);
|
287 |
+
unset($qv['term']);
|
288 |
+
}
|
289 |
+
|
290 |
+
if ( isset($_REQUEST[$taxonomy->name]) && $_REQUEST[$taxonomy->name] && is_numeric($_REQUEST[$taxonomy->name]) )
|
291 |
+
{
|
292 |
+
$tax = $taxonomy->name;
|
293 |
+
|
294 |
+
if ( $tax == 'category' )
|
295 |
+
$tax = 'category_name';
|
296 |
+
|
297 |
+
if ( $tax == 'post_tag' )
|
298 |
+
$tax = 'tag';
|
299 |
+
|
300 |
+
$term = get_term_by('id', $_REQUEST[$taxonomy->name], $taxonomy->name);
|
301 |
+
|
302 |
+
if ($term)
|
303 |
+
$qv[$tax] = $term->slug;
|
304 |
+
}
|
305 |
+
}
|
306 |
+
}
|
307 |
}
|
308 |
|
309 |
|
320 |
|
321 |
add_filter( 'attachment_fields_to_edit', 'wpuxss_eml_attachment_fields_to_edit', 10, 2 );
|
322 |
|
323 |
+
function wpuxss_eml_attachment_fields_to_edit( $form_fields, $post ) {
|
324 |
+
|
325 |
+
foreach ( get_attachment_taxonomies($post) as $taxonomy ) {
|
326 |
+
|
327 |
+
$t = (array) get_taxonomy($taxonomy);
|
328 |
+
if ( ! $t['public'] || ! $t['show_ui'] )
|
329 |
+
continue;
|
330 |
+
if ( empty($t['label']) )
|
331 |
+
$t['label'] = $taxonomy;
|
332 |
+
if ( empty($t['args']) )
|
333 |
+
$t['args'] = array();
|
334 |
+
|
335 |
+
$terms = get_object_term_cache($post->ID, $taxonomy);
|
336 |
+
if ( false === $terms )
|
337 |
+
$terms = wp_get_object_terms($post->ID, $taxonomy, $t['args']);
|
338 |
+
|
339 |
+
$values = array();
|
340 |
+
|
341 |
+
foreach ( $terms as $term )
|
342 |
+
$values[] = $term->slug;
|
343 |
+
|
344 |
+
$t['value'] = join(', ', $values);
|
345 |
+
$t['show_in_edit'] = false;
|
346 |
+
|
347 |
+
if ( $t['hierarchical'] )
|
348 |
+
{
|
349 |
+
ob_start();
|
350 |
+
|
351 |
+
wp_terms_checklist( $post->ID, array( 'taxonomy' => $taxonomy, 'checked_ontop' => false, 'walker' => new Walker_Media_Taxonomy_Checklist() ) );
|
352 |
+
|
353 |
+
if ( ob_get_contents() != false )
|
354 |
+
$html = '<ul class="term-list">' . ob_get_contents() . '</ul>';
|
355 |
+
else
|
356 |
+
$html = '<ul class="term-list"><li>No ' . $t['label'] . ' found.</li></ul>';
|
357 |
+
|
358 |
+
ob_end_clean();
|
359 |
+
|
360 |
+
unset( $t['value'] );
|
361 |
+
|
362 |
+
$t['input'] = 'html';
|
363 |
+
$t['html'] = $html;
|
364 |
+
}
|
365 |
+
|
366 |
+
$form_fields[$taxonomy] = $t;
|
367 |
+
}
|
368 |
+
|
369 |
+
return $form_fields;
|
370 |
}
|
371 |
|
372 |
|
383 |
|
384 |
class Walker_Media_Taxonomy_Checklist extends Walker
|
385 |
{
|
386 |
+
var $tree_type = 'category';
|
387 |
+
var $db_fields = array ('parent' => 'parent', 'id' => 'term_id');
|
388 |
+
|
389 |
+
function start_lvl( &$output, $depth = 0, $args = array() )
|
390 |
+
{
|
391 |
+
$indent = str_repeat("\t", $depth);
|
392 |
+
$output .= "$indent<ul class='children'>\n";
|
393 |
+
}
|
394 |
+
|
395 |
+
function end_lvl( &$output, $depth = 0, $args = array() )
|
396 |
+
{
|
397 |
+
$indent = str_repeat("\t", $depth);
|
398 |
+
$output .= "$indent</ul>\n";
|
399 |
+
}
|
400 |
+
|
401 |
+
function start_el( &$output, $category, $depth = 0, $args = array(), $id = 0 )
|
402 |
+
{
|
403 |
+
extract($args);
|
404 |
+
|
405 |
+
if ( empty($taxonomy) )
|
406 |
+
$taxonomy = 'category';
|
407 |
+
|
408 |
+
$name = 'tax_input['.$taxonomy.']';
|
409 |
+
|
410 |
+
$class = in_array( $category->term_id, $popular_cats ) ? ' class="popular-category"' : '';
|
411 |
+
$output .= "\n<li id='{$taxonomy}-{$category->term_id}'$class>" . '<label class="selectit"><input value="' . $category->slug . '" type="checkbox" name="'.$name.'['. $category->slug.']" 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>';
|
412 |
+
}
|
413 |
+
|
414 |
+
function end_el( &$output, $category, $depth = 0, $args = array() )
|
415 |
+
{
|
416 |
+
$output .= "</li>\n";
|
417 |
+
}
|
418 |
}
|
419 |
|
420 |
|
431 |
|
432 |
class Walker_Media_Taxonomy_Uploader_Filter extends Walker
|
433 |
{
|
434 |
+
var $tree_type = 'category';
|
435 |
+
var $db_fields = array ('parent' => 'parent', 'id' => 'term_id');
|
436 |
+
|
437 |
+
function start_lvl( &$output, $depth = 0, $args = array() )
|
438 |
+
{
|
439 |
+
$output .= "";
|
440 |
+
}
|
441 |
+
|
442 |
+
function end_lvl( &$output, $depth = 0, $args = array() )
|
443 |
+
{
|
444 |
+
$output .= "";
|
445 |
+
}
|
446 |
+
|
447 |
+
function start_el( &$output, $category, $depth = 0, $args = array(), $id = 0 )
|
448 |
+
{
|
449 |
+
extract($args);
|
450 |
+
|
451 |
+
$indent = str_repeat(' ', $depth);
|
452 |
+
$output .= $category->term_id . '>' . $indent . esc_html( apply_filters('the_category', $category->name )) . '|';
|
453 |
+
}
|
454 |
+
|
455 |
+
function end_el( &$output, $category, $depth = 0, $args = array() )
|
456 |
+
{
|
457 |
+
$output .= "";
|
458 |
+
}
|
459 |
}
|
460 |
|
461 |
|
475 |
|
476 |
function wpuxss_eml_save_attachment_compat()
|
477 |
{
|
478 |
+
if ( ! isset( $_REQUEST['id'] ) )
|
479 |
+
wp_send_json_error();
|
480 |
|
481 |
+
if ( ! $id = absint( $_REQUEST['id'] ) )
|
482 |
+
wp_send_json_error();
|
483 |
|
484 |
+
if ( empty( $_REQUEST['attachments'] ) || empty( $_REQUEST['attachments'][ $id ] ) )
|
485 |
+
wp_send_json_error();
|
486 |
+
$attachment_data = $_REQUEST['attachments'][ $id ];
|
487 |
|
488 |
+
check_ajax_referer( 'update-post_' . $id, 'nonce' );
|
489 |
|
490 |
+
if ( ! current_user_can( 'edit_post', $id ) )
|
491 |
+
wp_send_json_error();
|
492 |
|
493 |
+
$post = get_post( $id, ARRAY_A );
|
494 |
|
495 |
+
if ( 'attachment' != $post['post_type'] )
|
496 |
+
wp_send_json_error();
|
497 |
|
498 |
+
/** This filter is documented in wp-admin/includes/media.php */
|
499 |
+
$post = apply_filters( 'attachment_fields_to_save', $post, $attachment_data );
|
500 |
|
501 |
+
if ( isset( $post['errors'] ) ) {
|
502 |
+
$errors = $post['errors']; // @todo return me and display me!
|
503 |
+
unset( $post['errors'] );
|
504 |
+
}
|
505 |
|
506 |
+
wp_update_post( $post );
|
507 |
|
508 |
+
foreach ( get_attachment_taxonomies( $post ) as $taxonomy )
|
509 |
+
{
|
510 |
+
if ( isset( $attachment_data[ $taxonomy ] ) )
|
511 |
+
wp_set_object_terms( $id, array_map( 'trim', preg_split( '/,+/', $attachment_data[ $taxonomy ] ) ), $taxonomy, false );
|
512 |
+
else if ( isset($_REQUEST['tax_input']) && isset( $_REQUEST['tax_input'][ $taxonomy ] ) )
|
513 |
+
wp_set_object_terms( $id, $_REQUEST['tax_input'][ $taxonomy ], $taxonomy, false );
|
514 |
+
else
|
515 |
+
wp_set_object_terms( $id, '', $taxonomy, false );
|
516 |
+
}
|
517 |
|
518 |
+
if ( ! $attachment = wp_prepare_attachment_for_js( $id ) )
|
519 |
+
wp_send_json_error();
|
520 |
+
|
521 |
+
wp_send_json_success( $attachment );
|
522 |
}
|
523 |
|
524 |
|
537 |
|
538 |
function wpuxss_eml_pre_get_posts( $query )
|
539 |
{
|
540 |
+
$wpuxss_eml_taxonomies = get_option('wpuxss_eml_taxonomies');
|
541 |
+
|
542 |
+
if ( empty($wpuxss_eml_taxonomies) ) $wpuxss_eml_taxonomies = array();
|
543 |
+
|
544 |
+
foreach ( $wpuxss_eml_taxonomies as $taxonomy => $params )
|
545 |
+
{
|
546 |
+
if ( $params['assigned'] && $params['eml_media'] && $query->is_main_query() && is_tax($taxonomy) && !is_admin() )
|
547 |
+
{
|
548 |
+
$query->set( 'post_type', 'attachment' );
|
549 |
+
$query->set( 'post_status', 'inherit' );
|
550 |
+
}
|
551 |
+
}
|
|
|
552 |
}
|
553 |
|
554 |
?>
|
css/eml-admin.css
CHANGED
@@ -1,303 +1,321 @@
|
|
1 |
|
2 |
/* == Attachment Fields == */
|
3 |
|
4 |
-
.compat-item .field input[type="checkbox"] {
|
5 |
-
|
6 |
}
|
7 |
|
8 |
-
.term-list {
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
}
|
15 |
-
.term-list li {
|
16 |
-
|
17 |
-
}
|
18 |
-
.term-list li input[type="checkbox"] {
|
19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
}
|
21 |
-
.term-list .children {
|
22 |
-
|
23 |
}
|
24 |
|
25 |
|
26 |
-
/* == Taxonomy Filters == */
|
27 |
-
|
28 |
-
.media-frame select[class^="attachment"] {
|
29 |
-
height: 28px;
|
30 |
-
}
|
31 |
|
32 |
|
33 |
-
/* == Media
|
34 |
|
35 |
-
.attachments-browser .media-toolbar {
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
}
|
40 |
-
|
41 |
-
|
|
|
|
|
42 |
}
|
43 |
-
.
|
44 |
-
|
45 |
-
float: none;
|
46 |
-
height: auto;
|
47 |
}
|
48 |
-
.attachments-browser .media-toolbar
|
49 |
-
|
|
|
50 |
}
|
51 |
-
.
|
52 |
-
|
53 |
-
float: left;
|
54 |
}
|
55 |
-
.
|
56 |
-
|
57 |
-
margin-right: 10px;
|
58 |
-
max-width: 140px;
|
59 |
}
|
60 |
-
|
61 |
-
.
|
62 |
-
|
|
|
|
|
|
|
|
|
63 |
}
|
64 |
-
.
|
65 |
-
margin: 0
|
66 |
}
|
67 |
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
|
|
75 |
}
|
76 |
|
77 |
-
@media only screen and (max-width: 900px)
|
78 |
-
{
|
79 |
-
.media-modal .attachments-browser .media-toolbar {
|
80 |
-
margin-right: 262px;
|
81 |
-
height: auto;
|
82 |
-
}
|
83 |
|
84 |
-
.media-
|
85 |
-
|
86 |
-
|
87 |
}
|
88 |
-
|
|
|
89 |
margin-top: 11px;
|
90 |
margin-right: 10px;
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
|
|
|
|
|
|
95 |
}
|
96 |
}
|
97 |
|
98 |
-
@media only screen and (max-width:
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
position: relative;
|
103 |
-
margin-right: 262px;
|
104 |
-
}
|
105 |
-
.media-frame .attachments-browser {
|
106 |
-
padding-bottom: 20px;
|
107 |
-
height: auto;
|
108 |
-
}
|
109 |
-
.media-sidebar .attachment-details h3 {
|
110 |
-
margin-top: 24px;
|
111 |
-
}
|
112 |
-
}
|
113 |
-
|
114 |
-
/*@media only screen and (max-width: 1120px)
|
115 |
-
{
|
116 |
-
.attachments-browser .media-toolbar.wp-filter .search-form {
|
117 |
float: none;
|
118 |
-
|
119 |
}
|
120 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
121 |
|
122 |
|
123 |
/* == MIME types Option Page Styles == */
|
124 |
|
125 |
.wpuxss-eml-mime-type-list {
|
126 |
-
|
127 |
}
|
128 |
.wpuxss-eml-mime-type-list td {
|
129 |
-
|
130 |
}
|
131 |
.wpuxss-eml-mime-type-list .checkbox_td {
|
132 |
-
|
133 |
}
|
134 |
.wpuxss-eml-mime-type-list input[type="text"] {
|
135 |
-
|
136 |
}
|
137 |
.wpuxss-eml-column-extension {
|
138 |
-
|
139 |
}
|
140 |
.wpuxss-eml-column-singular,
|
141 |
.wpuxss-eml-column-plural {
|
142 |
-
|
143 |
}
|
144 |
.wpuxss-eml-column-filter {
|
145 |
-
|
146 |
}
|
147 |
.wpuxss-eml-column-upload {
|
148 |
-
|
149 |
}
|
150 |
.wpuxss-eml-column-delete {
|
151 |
-
|
152 |
}
|
153 |
|
154 |
|
|
|
|
|
155 |
/* == Taxonomies Option Page Styles == */
|
156 |
|
157 |
.wpuxss-eml-settings-list {
|
158 |
-
|
159 |
}
|
160 |
.wpuxss-eml-settings-list > li {
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
}
|
167 |
.wpuxss-eml-settings-list > li > label {
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
}
|
172 |
.wpuxss-eml-settings-list input {
|
173 |
-
|
174 |
}
|
175 |
.wpuxss-eml-settings-list > li .wpuxss-eml-button-edit {
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
}
|
186 |
.wpuxss-eml-settings-list.wpuxss-eml-non-media-taxonomy-list > li .wpuxss-eml-button-edit {
|
187 |
-
|
188 |
}
|
189 |
.wpuxss-eml-settings-list > li .wpuxss-eml-button-remove {
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
}
|
194 |
.wpuxss-eml-settings-list .wpuxss-eml-assigned {
|
195 |
-
|
196 |
}
|
197 |
|
198 |
.wpuxss-eml-taxonomy-edit label {
|
199 |
-
|
200 |
-
|
201 |
}
|
202 |
.wpuxss-eml-taxonomy-edit .wpuxss-eml-labels-edit {
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
}
|
207 |
.wpuxss-eml-taxonomy-edit .wpuxss-eml-settings-edit {
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
}
|
212 |
.wpuxss-eml-taxonomy-edit .wpuxss-eml-settings-edit li {
|
213 |
-
|
214 |
}
|
215 |
.wpuxss-eml-taxonomy-edit .wpuxss-eml-labels-edit label {
|
216 |
-
|
217 |
-
|
218 |
}
|
219 |
-
.wpuxss-eml-taxonomy-edit .wpuxss-eml-labels-edit input
|
220 |
-
|
|
|
221 |
}
|
222 |
|
223 |
|
|
|
|
|
224 |
/* == Buttons Styles == */
|
225 |
|
226 |
.wpuxss-eml-button-remove {
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
}
|
238 |
.wpuxss-eml-button-remove:hover {
|
239 |
-
|
240 |
}
|
241 |
.wpuxss-eml-button-container-right {
|
242 |
-
|
243 |
-
|
244 |
}
|
245 |
|
246 |
|
|
|
|
|
247 |
/* == Option Page Generic Styles == */
|
248 |
|
249 |
#toplevel_page_media-library .wp-menu-image {
|
250 |
-
|
251 |
}
|
252 |
|
253 |
#wpuxss-eml-global-options-wrap .postbox {
|
254 |
-
|
255 |
-
|
256 |
-
|
|
|
|
|
257 |
}
|
258 |
|
259 |
#wpuxss-eml-global-options-wrap .postbox#wpuxss-credits {
|
260 |
-
|
261 |
}
|
262 |
#wpuxss-credits .author {
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
}
|
268 |
#wpuxss-credits .logo-webbistro {
|
269 |
-
|
270 |
-
|
271 |
}
|
272 |
#wpuxss-credits .icon-webbistro {
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
}
|
282 |
#wpuxss-credits h4 {
|
283 |
-
|
284 |
}
|
285 |
#wpuxss-credits p,
|
286 |
#wpuxss-credits ul {
|
287 |
-
|
288 |
}
|
289 |
#wpuxss-credits li {
|
290 |
-
|
291 |
-
|
292 |
}
|
293 |
|
294 |
@font-face {
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
}
|
1 |
|
2 |
/* == Attachment Fields == */
|
3 |
|
4 |
+
body.eml-media-css .compat-item .field input[type="checkbox"] {
|
5 |
+
width: auto;
|
6 |
}
|
7 |
|
8 |
+
body.eml-media-css .term-list {
|
9 |
+
background-color: #fff;
|
10 |
+
border: 1px solid #dfdfdf;
|
11 |
+
border-radius: 3px;
|
12 |
+
padding: 10px 10px 5px;
|
13 |
+
margin: 0 0 10px;
|
14 |
+
}
|
15 |
+
body.eml-media-css .term-list li {
|
16 |
+
line-height: 22px;
|
17 |
+
}
|
18 |
+
body.eml-media-css .term-list li input[type="checkbox"] {
|
19 |
+
margin: -4px 4px 0 0 !important;
|
20 |
+
}
|
21 |
+
body.eml-media-css .term-list li input[type=checkbox]:indeterminate:before {
|
22 |
+
float: left;
|
23 |
+
display: inline-block;
|
24 |
+
vertical-align: middle;
|
25 |
+
width: 16px;
|
26 |
+
font: normal 21px/1 'dashicons';
|
27 |
+
speak: none;
|
28 |
+
-webkit-font-smoothing: antialiased;
|
29 |
+
-moz-osx-font-smoothing: grayscale;
|
30 |
+
|
31 |
+
content: '\f147';
|
32 |
+
margin: -3px 0 0 -4px;
|
33 |
+
color: #CBCBCB;
|
34 |
}
|
35 |
+
body.eml-media-css .term-list .children {
|
36 |
+
margin: 5px 0 0 20px;
|
37 |
}
|
38 |
|
39 |
|
|
|
|
|
|
|
|
|
|
|
40 |
|
41 |
|
42 |
+
/* == Media Popup Boxes' Positions == */
|
43 |
|
44 |
+
body.eml-media-css .attachments-browser .media-toolbar {
|
45 |
+
height: auto;
|
46 |
+
position: relative;
|
47 |
+
margin-right: 300px;
|
48 |
}
|
49 |
+
|
50 |
+
body.eml-media-css .attachments-browser .media-toolbar-primary,
|
51 |
+
body.eml-media-css .attachments-browser .media-toolbar-secondary {
|
52 |
+
height: auto;
|
53 |
}
|
54 |
+
body.eml-media-css .attachments-browser .media-toolbar-primary {
|
55 |
+
width: 20%;
|
|
|
|
|
56 |
}
|
57 |
+
body.eml-media-css .attachments-browser .media-toolbar-secondary {
|
58 |
+
width: 80%;
|
59 |
+
position: relative;
|
60 |
}
|
61 |
+
body.eml-media-css .attachments-browser .media-toolbar-secondary select {
|
62 |
+
height: 28px;
|
|
|
63 |
}
|
64 |
+
body.eml-media-css .attachments-browser .media-toolbar-primary input[type="search"] {
|
65 |
+
width: 100%;
|
|
|
|
|
66 |
}
|
67 |
+
|
68 |
+
body.eml-media-css .attachments-browser .media-toolbar .spinner {
|
69 |
+
float: none;
|
70 |
+
position: absolute;
|
71 |
+
z-index: 100;
|
72 |
+
top: 0;
|
73 |
+
right: 10px;
|
74 |
}
|
75 |
+
body.eml-media-css .attachments-browser .uploader-inline {
|
76 |
+
margin-bottom: 0;
|
77 |
}
|
78 |
|
79 |
+
@media only screen and (max-width: 1200px) {
|
80 |
+
|
81 |
+
body.eml-media-css .attachments-browser .media-toolbar-primary {
|
82 |
+
width: 30%;
|
83 |
+
}
|
84 |
+
body.eml-media-css .attachments-browser .media-toolbar-secondary {
|
85 |
+
width: 70%;
|
86 |
+
}
|
87 |
}
|
88 |
|
89 |
+
@media only screen and (max-width: 900px) {
|
|
|
|
|
|
|
|
|
|
|
90 |
|
91 |
+
body.eml-media-css .attachments-browser .media-toolbar {
|
92 |
+
|
93 |
+
margin-right: 262px;
|
94 |
}
|
95 |
+
|
96 |
+
body.eml-media-css .attachments-browser .media-toolbar .attachment-filters {
|
97 |
margin-top: 11px;
|
98 |
margin-right: 10px;
|
99 |
+
}
|
100 |
+
}
|
101 |
+
|
102 |
+
@media only screen and (max-width: 640px), screen and (max-height: 400px) {
|
103 |
+
|
104 |
+
body.eml-media-css .attachments-browser .media-toolbar {
|
105 |
+
margin-right: 0;
|
106 |
}
|
107 |
}
|
108 |
|
109 |
+
@media only screen and (max-width: 480px) {
|
110 |
+
|
111 |
+
body.eml-media-css .attachments-browser .media-toolbar-primary,
|
112 |
+
body.eml-media-css .attachments-browser .media-toolbar-secondary {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
113 |
float: none;
|
114 |
+
width: 100%;
|
115 |
}
|
116 |
+
}
|
117 |
+
|
118 |
+
|
119 |
+
|
120 |
+
|
121 |
+
|
122 |
+
/* == ACF compatibility == */
|
123 |
+
|
124 |
+
body.eml-media-css .media-modal.acf-expanded .attachments-browser .media-toolbar {
|
125 |
+
margin-right: 700px;
|
126 |
+
}
|
127 |
+
|
128 |
+
|
129 |
+
|
130 |
|
131 |
|
132 |
/* == MIME types Option Page Styles == */
|
133 |
|
134 |
.wpuxss-eml-mime-type-list {
|
135 |
+
table-layout: fixed;
|
136 |
}
|
137 |
.wpuxss-eml-mime-type-list td {
|
138 |
+
padding: 8px 7px;
|
139 |
}
|
140 |
.wpuxss-eml-mime-type-list .checkbox_td {
|
141 |
+
text-align: center;
|
142 |
}
|
143 |
.wpuxss-eml-mime-type-list input[type="text"] {
|
144 |
+
width: 120px;
|
145 |
}
|
146 |
.wpuxss-eml-column-extension {
|
147 |
+
width: 130px;
|
148 |
}
|
149 |
.wpuxss-eml-column-singular,
|
150 |
.wpuxss-eml-column-plural {
|
151 |
+
width:120px;
|
152 |
}
|
153 |
.wpuxss-eml-column-filter {
|
154 |
+
width: 70px;
|
155 |
}
|
156 |
.wpuxss-eml-column-upload {
|
157 |
+
width: 90px;
|
158 |
}
|
159 |
.wpuxss-eml-column-delete {
|
160 |
+
width: 30px;
|
161 |
}
|
162 |
|
163 |
|
164 |
+
|
165 |
+
|
166 |
/* == Taxonomies Option Page Styles == */
|
167 |
|
168 |
.wpuxss-eml-settings-list {
|
169 |
+
border-top: 1px solid #dfdfdf;
|
170 |
}
|
171 |
.wpuxss-eml-settings-list > li {
|
172 |
+
border-bottom: 1px solid #dfdfdf;
|
173 |
+
padding: 8px 7px;
|
174 |
+
margin: 0;
|
175 |
+
position: relative;
|
176 |
+
overflow: hidden;
|
177 |
}
|
178 |
.wpuxss-eml-settings-list > li > label {
|
179 |
+
font-size: 14px;
|
180 |
+
display: inline-block;
|
181 |
+
margin-right: 100px;
|
182 |
}
|
183 |
.wpuxss-eml-settings-list input {
|
184 |
+
margin: 0;
|
185 |
}
|
186 |
.wpuxss-eml-settings-list > li .wpuxss-eml-button-edit {
|
187 |
+
position: absolute;
|
188 |
+
right: 40px;
|
189 |
+
top: 7px;
|
190 |
+
text-decoration: none;
|
191 |
+
height: 14px;
|
192 |
+
line-height: 14px;
|
193 |
+
border-radius: 10px;
|
194 |
+
box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);
|
195 |
+
padding: 3px 10px;
|
196 |
}
|
197 |
.wpuxss-eml-settings-list.wpuxss-eml-non-media-taxonomy-list > li .wpuxss-eml-button-edit {
|
198 |
+
right: 10px;
|
199 |
}
|
200 |
.wpuxss-eml-settings-list > li .wpuxss-eml-button-remove {
|
201 |
+
position: absolute;
|
202 |
+
right: 10px;
|
203 |
+
top: 7px;
|
204 |
}
|
205 |
.wpuxss-eml-settings-list .wpuxss-eml-assigned {
|
206 |
+
margin-right:10px;
|
207 |
}
|
208 |
|
209 |
.wpuxss-eml-taxonomy-edit label {
|
210 |
+
display: inline-block;
|
211 |
+
width: 210px;
|
212 |
}
|
213 |
.wpuxss-eml-taxonomy-edit .wpuxss-eml-labels-edit {
|
214 |
+
float: left;
|
215 |
+
width: 48%;
|
216 |
+
margin-right: 1%;
|
217 |
}
|
218 |
.wpuxss-eml-taxonomy-edit .wpuxss-eml-settings-edit {
|
219 |
+
float: left;
|
220 |
+
width: 50%;
|
221 |
+
margin-left: 1%;
|
222 |
}
|
223 |
.wpuxss-eml-taxonomy-edit .wpuxss-eml-settings-edit li {
|
224 |
+
padding: 3px 0;
|
225 |
}
|
226 |
.wpuxss-eml-taxonomy-edit .wpuxss-eml-labels-edit label {
|
227 |
+
display: inline-block;
|
228 |
+
width: 100px;
|
229 |
}
|
230 |
+
.wpuxss-eml-taxonomy-edit .wpuxss-eml-labels-edit input[type="text"],
|
231 |
+
.wpuxss-eml-taxonomy-edit .wpuxss-eml-settings-edit input[type="text"] {
|
232 |
+
min-width: 150px;
|
233 |
}
|
234 |
|
235 |
|
236 |
+
|
237 |
+
|
238 |
/* == Buttons Styles == */
|
239 |
|
240 |
.wpuxss-eml-button-remove {
|
241 |
+
display: inline-block;
|
242 |
+
text-align: center;
|
243 |
+
text-decoration: none;
|
244 |
+
line-height: 1em;
|
245 |
+
font-size: 18px;
|
246 |
+
font-family: Arial, Helvetica, sans-serif;
|
247 |
+
height: 20px;
|
248 |
+
width: 20px;
|
249 |
+
border-radius: 10px;
|
250 |
+
box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);
|
251 |
}
|
252 |
.wpuxss-eml-button-remove:hover {
|
253 |
+
box-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
|
254 |
}
|
255 |
.wpuxss-eml-button-container-right {
|
256 |
+
text-align: right;
|
257 |
+
margin: 20px 0 0;
|
258 |
}
|
259 |
|
260 |
|
261 |
+
|
262 |
+
|
263 |
/* == Option Page Generic Styles == */
|
264 |
|
265 |
#toplevel_page_media-library .wp-menu-image {
|
266 |
+
background-position: -119px -33px !important;
|
267 |
}
|
268 |
|
269 |
#wpuxss-eml-global-options-wrap .postbox {
|
270 |
+
background-image:none !important;
|
271 |
+
position: relative;
|
272 |
+
}
|
273 |
+
#wpuxss-eml-global-options-wrap #poststuff .inside {
|
274 |
+
margin: 20px 0 0;
|
275 |
}
|
276 |
|
277 |
#wpuxss-eml-global-options-wrap .postbox#wpuxss-credits {
|
278 |
+
background-color: #fff !important;
|
279 |
}
|
280 |
#wpuxss-credits .author {
|
281 |
+
font-style: italic;
|
282 |
+
margin: 30px 0 0;
|
283 |
+
padding: 10px 0 5px;
|
284 |
+
border-top: 1px solid #e0e5e9;
|
285 |
}
|
286 |
#wpuxss-credits .logo-webbistro {
|
287 |
+
font-style: italic;
|
288 |
+
text-decoration: none;
|
289 |
}
|
290 |
#wpuxss-credits .icon-webbistro {
|
291 |
+
font-family: 'webbistro';
|
292 |
+
speak: none;
|
293 |
+
font-style: normal;
|
294 |
+
font-weight: normal;
|
295 |
+
font-variant: normal;
|
296 |
+
text-transform: none;
|
297 |
+
line-height: 1;
|
298 |
+
-webkit-font-smoothing: antialiased;
|
299 |
}
|
300 |
#wpuxss-credits h4 {
|
301 |
+
margin: 20px 0 4px;
|
302 |
}
|
303 |
#wpuxss-credits p,
|
304 |
#wpuxss-credits ul {
|
305 |
+
margin-top: 0;
|
306 |
}
|
307 |
#wpuxss-credits li {
|
308 |
+
list-style: disc;
|
309 |
+
margin-left: 1.4em;
|
310 |
}
|
311 |
|
312 |
@font-face {
|
313 |
+
font-family: 'webbistro';
|
314 |
+
src:url('../fonts/webbistro.eot');
|
315 |
+
src:url('../fonts/webbistro.eot?#iefix') format('embedded-opentype'),
|
316 |
+
url('../fonts/webbistro.woff') format('woff'),
|
317 |
+
url('../fonts/webbistro.ttf') format('truetype'),
|
318 |
+
url('../fonts/webbistro.svg#webbistro') format('svg');
|
319 |
+
font-weight: normal;
|
320 |
+
font-style: normal;
|
321 |
}
|
enhanced-media-library.php
CHANGED
@@ -3,37 +3,28 @@
|
|
3 |
Plugin Name: Enhanced Media Library
|
4 |
Plugin URI: http://wordpressuxsolutions.com
|
5 |
Description: This plugin will be handy for those who need to manage a lot of media files.
|
6 |
-
Version:
|
7 |
Author: WordPress UX Solutions
|
8 |
Author URI: http://wordpressuxsolutions.com
|
9 |
-
License: GPLv2 or later
|
10 |
Text Domain: eml
|
11 |
Domain Path: /languages
|
12 |
-
|
13 |
|
14 |
Copyright 2013 WordPress UX Solutions (email : WordPressUXSolutions@gmail.com)
|
|
|
15 |
|
16 |
-
This program is free software; you can redistribute it and/or modify
|
17 |
-
it under the terms of the GNU General Public License, version 2, as
|
18 |
-
published by the Free Software Foundation.
|
19 |
|
20 |
-
This program is distributed in the hope that it will be useful,
|
21 |
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
22 |
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
23 |
-
GNU General Public License for more details.
|
24 |
|
25 |
-
You should have received a copy of the GNU General Public License
|
26 |
-
along with this program; if not, write to the Free Software
|
27 |
-
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
28 |
|
29 |
-
|
30 |
|
31 |
|
32 |
|
33 |
|
34 |
-
$wpuxss_eml_version
|
35 |
$wpuxss_eml_old_version = get_option('wpuxss_eml_version', false);
|
36 |
-
$wpuxss_eml_dir
|
|
|
37 |
|
38 |
|
39 |
|
@@ -41,9 +32,9 @@ $wpuxss_eml_dir = plugin_dir_url( __FILE__ );
|
|
41 |
include_once( 'core/mime-types.php' );
|
42 |
include_once( 'core/taxonomies.php' );
|
43 |
|
44 |
-
if( is_admin() )
|
45 |
-
|
46 |
-
|
47 |
}
|
48 |
|
49 |
|
@@ -52,11 +43,11 @@ if( is_admin() )
|
|
52 |
/**
|
53 |
* Load plugin text domain
|
54 |
*
|
55 |
-
* @since
|
56 |
-
* @created
|
57 |
*/
|
58 |
|
59 |
-
|
60 |
|
61 |
|
62 |
|
@@ -70,36 +61,35 @@ load_plugin_textdomain('eml', false, basename( dirname( __FILE__ ) ) . '/languag
|
|
70 |
|
71 |
add_action('init', 'wpuxss_eml_on_init', 12);
|
72 |
|
73 |
-
function wpuxss_eml_on_init()
|
74 |
-
{
|
75 |
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
}
|
104 |
|
105 |
|
@@ -113,206 +103,223 @@ function wpuxss_eml_on_init()
|
|
113 |
*/
|
114 |
add_action( 'wp_loaded', 'wpuxss_eml_on_wp_loaded' );
|
115 |
|
116 |
-
function wpuxss_eml_on_wp_loaded()
|
117 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
118 |
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
'show_admin_column' => isset($params->show_admin_column) ? $params->show_admin_column : 0,
|
133 |
-
'show_in_nav_menus' => isset($params->show_in_nav_menus) ? $params->show_in_nav_menus : 0,
|
134 |
-
'hierarchical' => $params->hierarchical ? 1 : 0,
|
135 |
-
'sort' => isset($params->sort) ? $params->sort : 0
|
136 |
-
);
|
137 |
-
|
138 |
-
if ( in_array('attachment',$params->object_type) )
|
139 |
-
$wpuxss_eml_taxonomies[$taxonomy]['assigned'] = 1;
|
140 |
-
else
|
141 |
-
$wpuxss_eml_taxonomies[$taxonomy]['assigned'] = 0;
|
142 |
-
}
|
143 |
-
}
|
144 |
-
|
145 |
-
// assign/unassign taxonomies to atachment
|
146 |
-
foreach ( $wpuxss_eml_taxonomies as $taxonomy => $params )
|
147 |
-
{
|
148 |
-
if ( $params['assigned'] )
|
149 |
-
register_taxonomy_for_object_type( $taxonomy, 'attachment' );
|
150 |
-
|
151 |
-
if ( ! $params['assigned'] )
|
152 |
-
wpuxss_eml_unregister_taxonomy_for_object_type( $taxonomy, 'attachment' );
|
153 |
-
}
|
154 |
-
|
155 |
-
// update_count_callback for attachment taxonomies if needed
|
156 |
-
foreach ( $taxonomies as $taxonomy => $params )
|
157 |
-
{
|
158 |
-
if ( in_array('attachment',$params->object_type) )
|
159 |
-
{
|
160 |
-
global $wp_taxonomies;
|
161 |
-
|
162 |
-
if ( !isset($wp_taxonomies[$taxonomy]->update_count_callback) || empty($wp_taxonomies[$taxonomy]->update_count_callback) )
|
163 |
-
$wp_taxonomies[$taxonomy]->update_count_callback = '_update_generic_term_count';
|
164 |
-
}
|
165 |
-
}
|
166 |
-
|
167 |
-
update_option( 'wpuxss_eml_taxonomies', $wpuxss_eml_taxonomies );
|
168 |
}
|
169 |
|
170 |
|
171 |
|
172 |
|
|
|
173 |
/**
|
174 |
-
*
|
175 |
*
|
176 |
-
* @since 1.
|
177 |
-
* @created
|
178 |
*/
|
179 |
|
180 |
-
add_action( '
|
181 |
-
|
182 |
-
function
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
'wpuxss_eml_mimes_validate' //sanitize_callback
|
197 |
-
);
|
198 |
-
|
199 |
-
// plugin settings: mime types backup
|
200 |
-
register_setting(
|
201 |
-
'wpuxss_eml_mimes_backup', //option_group
|
202 |
-
'wpuxss_eml_mimes_backup' //option_name
|
203 |
-
);
|
204 |
}
|
205 |
|
206 |
|
207 |
|
208 |
|
209 |
/**
|
210 |
-
*
|
211 |
*
|
212 |
-
* @since
|
213 |
-
* @created
|
214 |
*/
|
215 |
|
216 |
-
add_action( '
|
217 |
|
218 |
-
function
|
219 |
-
{
|
220 |
-
|
221 |
-
global $wpuxss_eml_version,
|
222 |
-
$wpuxss_eml_dir,
|
223 |
-
$pagenow;
|
224 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
225 |
|
226 |
-
|
227 |
-
|
228 |
{
|
229 |
-
|
230 |
-
$
|
231 |
-
if ( empty($wpuxss_eml_taxonomies) ) $wpuxss_eml_taxonomies = array();
|
232 |
|
233 |
-
$
|
234 |
-
foreach ( get_object_taxonomies('attachment','object') as $taxonomy )
|
235 |
{
|
236 |
-
|
237 |
-
|
238 |
|
239 |
-
|
240 |
-
{
|
241 |
-
|
242 |
-
ob_start();
|
243 |
|
244 |
-
|
245 |
-
|
246 |
-
$html =
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
{
|
256 |
-
|
257 |
-
|
258 |
-
$term = explode('>', $term);
|
259 |
-
array_push($terms_array, array('term_id' => $term[0], 'term_name' => $term[1]));
|
260 |
-
}
|
261 |
-
$taxonomies_array[$taxonomy->name] = array(
|
262 |
-
'list_title' => $taxonomy->labels->all_items,
|
263 |
-
'term_list' => $terms_array
|
264 |
-
);
|
265 |
}
|
|
|
|
|
|
|
|
|
266 |
}
|
267 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
268 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
269 |
wp_enqueue_script(
|
270 |
-
'wpuxss-eml-media-
|
271 |
-
$wpuxss_eml_dir . 'js/eml-media-
|
272 |
-
array('media
|
273 |
$wpuxss_eml_version,
|
274 |
true
|
275 |
);
|
|
|
|
|
|
|
|
|
276 |
|
277 |
wp_enqueue_script(
|
278 |
-
'wpuxss-eml-
|
279 |
-
$wpuxss_eml_dir . 'js/eml-
|
280 |
-
array('
|
281 |
$wpuxss_eml_version,
|
282 |
true
|
283 |
);
|
284 |
-
|
285 |
-
wp_localize_script(
|
286 |
-
'wpuxss-eml-media-views-script',
|
287 |
-
'wpuxss_eml_taxonomies',
|
288 |
-
$taxonomies_array
|
289 |
-
);
|
290 |
}
|
291 |
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
wp_enqueue_script(
|
305 |
-
'wpuxss-eml-custom-background-script',
|
306 |
-
$wpuxss_eml_dir . 'js/eml-custom-background.js',
|
307 |
-
array('custom-background'),
|
308 |
-
$wpuxss_eml_version,
|
309 |
-
true
|
310 |
-
);
|
311 |
-
}
|
312 |
|
313 |
|
314 |
// scripts for /wp-admin/customize.php
|
315 |
-
if ( 'customize
|
316 |
{
|
317 |
wp_enqueue_script(
|
318 |
'wpuxss-eml-customize-controls-script',
|
@@ -322,16 +329,6 @@ function wpuxss_eml_admin_enqueue_scripts()
|
|
322 |
true
|
323 |
);
|
324 |
}
|
325 |
-
|
326 |
-
|
327 |
-
// admin styles
|
328 |
-
wp_enqueue_style(
|
329 |
-
'wpuxss-eml-admin-custom-style',
|
330 |
-
$wpuxss_eml_dir . 'css/eml-admin.css',
|
331 |
-
array('media-views'),
|
332 |
-
$wpuxss_eml_version,
|
333 |
-
'all'
|
334 |
-
);
|
335 |
}
|
336 |
|
337 |
|
@@ -344,63 +341,67 @@ function wpuxss_eml_admin_enqueue_scripts()
|
|
344 |
* @created 28/09/13
|
345 |
*/
|
346 |
|
347 |
-
function wpuxss_eml_on_activation()
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
'mime' => $mime,
|
389 |
-
'singular' => $mime,
|
390 |
-
'plural' => $mime,
|
391 |
-
'filter' => 0,
|
392 |
-
'upload' => isset($allowed_mimes[$type]) ? 1 : 0
|
393 |
-
);
|
394 |
-
}
|
395 |
-
|
396 |
-
$wpuxss_eml_mimes['pdf']['singular'] = 'PDF';
|
397 |
-
$wpuxss_eml_mimes['pdf']['plural'] = 'PDFs';
|
398 |
-
$wpuxss_eml_mimes['pdf']['filter'] = 1;
|
399 |
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
404 |
}
|
405 |
|
406 |
?>
|
3 |
Plugin Name: Enhanced Media Library
|
4 |
Plugin URI: http://wordpressuxsolutions.com
|
5 |
Description: This plugin will be handy for those who need to manage a lot of media files.
|
6 |
+
Version: 2.0
|
7 |
Author: WordPress UX Solutions
|
8 |
Author URI: http://wordpressuxsolutions.com
|
|
|
9 |
Text Domain: eml
|
10 |
Domain Path: /languages
|
11 |
+
License: GPL version 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
12 |
|
13 |
Copyright 2013 WordPress UX Solutions (email : WordPressUXSolutions@gmail.com)
|
14 |
+
*/
|
15 |
|
|
|
|
|
|
|
16 |
|
|
|
|
|
|
|
|
|
17 |
|
|
|
|
|
|
|
18 |
|
19 |
+
global $wp_version;
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
+
$wpuxss_eml_version = '2.0';
|
25 |
$wpuxss_eml_old_version = get_option('wpuxss_eml_version', false);
|
26 |
+
$wpuxss_eml_dir = plugin_dir_url( __FILE__ );
|
27 |
+
$wpuxss_eml_path = plugin_dir_path( __FILE__ );
|
28 |
|
29 |
|
30 |
|
32 |
include_once( 'core/mime-types.php' );
|
33 |
include_once( 'core/taxonomies.php' );
|
34 |
|
35 |
+
if( is_admin() ) {
|
36 |
+
|
37 |
+
include_once( 'core/options-pages.php' );
|
38 |
}
|
39 |
|
40 |
|
43 |
/**
|
44 |
* Load plugin text domain
|
45 |
*
|
46 |
+
* @since 2.0
|
47 |
+
* @created 10/09/14
|
48 |
*/
|
49 |
|
50 |
+
load_textdomain( 'eml', $wpuxss_eml_path . 'languages/eml-' . get_locale() . '.mo' );
|
51 |
|
52 |
|
53 |
|
61 |
|
62 |
add_action('init', 'wpuxss_eml_on_init', 12);
|
63 |
|
64 |
+
function wpuxss_eml_on_init() {
|
|
|
65 |
|
66 |
+
// on activation
|
67 |
+
wpuxss_eml_on_activation();
|
68 |
+
|
69 |
+
$wpuxss_eml_taxonomies = get_option('wpuxss_eml_taxonomies');
|
70 |
+
if ( empty($wpuxss_eml_taxonomies) ) $wpuxss_eml_taxonomies = array();
|
71 |
+
|
72 |
+
// register eml taxonomies
|
73 |
+
foreach ( $wpuxss_eml_taxonomies as $taxonomy => $params )
|
74 |
+
{
|
75 |
+
if ( $params['eml_media'] && !empty($params['labels']['singular_name']) && !empty($params['labels']['name']) )
|
76 |
+
{
|
77 |
+
register_taxonomy(
|
78 |
+
$taxonomy,
|
79 |
+
'attachment',
|
80 |
+
array(
|
81 |
+
'labels' => $params['labels'],
|
82 |
+
'public' => true,
|
83 |
+
'show_admin_column' => $params['show_admin_column'],
|
84 |
+
'show_in_nav_menus' => $params['show_in_nav_menus'],
|
85 |
+
'hierarchical' => $params['hierarchical'],
|
86 |
+
'update_count_callback' => '_update_generic_term_count',
|
87 |
+
'sort' => $params['sort'],
|
88 |
+
'rewrite' => array( 'slug' => $params['rewrite']['slug'] )
|
89 |
+
)
|
90 |
+
);
|
91 |
+
}
|
92 |
+
}
|
93 |
}
|
94 |
|
95 |
|
103 |
*/
|
104 |
add_action( 'wp_loaded', 'wpuxss_eml_on_wp_loaded' );
|
105 |
|
106 |
+
function wpuxss_eml_on_wp_loaded() {
|
107 |
+
|
108 |
+
$wpuxss_eml_taxonomies = get_option('wpuxss_eml_taxonomies');
|
109 |
+
if ( empty($wpuxss_eml_taxonomies) ) $wpuxss_eml_taxonomies = array();
|
110 |
+
$taxonomies = get_taxonomies(array(),'object');
|
111 |
+
|
112 |
+
// discover 'foreign' taxonomies
|
113 |
+
foreach ( $taxonomies as $taxonomy => $params )
|
114 |
+
{
|
115 |
+
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' )
|
116 |
+
{
|
117 |
+
$wpuxss_eml_taxonomies[$taxonomy] = array(
|
118 |
+
'eml_media' => 0,
|
119 |
+
'admin_filter' => 0,
|
120 |
+
'media_uploader_filter' => 0,
|
121 |
+
'show_admin_column' => isset($params->show_admin_column) ? $params->show_admin_column : 0,
|
122 |
+
'show_in_nav_menus' => isset($params->show_in_nav_menus) ? $params->show_in_nav_menus : 0,
|
123 |
+
'hierarchical' => $params->hierarchical ? 1 : 0,
|
124 |
+
'sort' => isset($params->sort) ? $params->sort : 0
|
125 |
+
);
|
126 |
+
|
127 |
+
if ( in_array('attachment',$params->object_type) )
|
128 |
+
$wpuxss_eml_taxonomies[$taxonomy]['assigned'] = 1;
|
129 |
+
else
|
130 |
+
$wpuxss_eml_taxonomies[$taxonomy]['assigned'] = 0;
|
131 |
+
}
|
132 |
+
}
|
133 |
+
|
134 |
+
// assign/unassign taxonomies to atachment
|
135 |
+
foreach ( $wpuxss_eml_taxonomies as $taxonomy => $params )
|
136 |
+
{
|
137 |
+
if ( $params['assigned'] )
|
138 |
+
register_taxonomy_for_object_type( $taxonomy, 'attachment' );
|
139 |
+
|
140 |
+
if ( ! $params['assigned'] )
|
141 |
+
unregister_taxonomy_for_object_type( $taxonomy, 'attachment' );
|
142 |
+
}
|
143 |
|
144 |
+
// update_count_callback for attachment taxonomies if needed
|
145 |
+
foreach ( $taxonomies as $taxonomy => $params )
|
146 |
+
{
|
147 |
+
if ( in_array('attachment',$params->object_type) )
|
148 |
+
{
|
149 |
+
global $wp_taxonomies;
|
150 |
+
|
151 |
+
if ( !isset($wp_taxonomies[$taxonomy]->update_count_callback) || empty($wp_taxonomies[$taxonomy]->update_count_callback) )
|
152 |
+
$wp_taxonomies[$taxonomy]->update_count_callback = '_update_generic_term_count';
|
153 |
+
}
|
154 |
+
}
|
155 |
+
|
156 |
+
update_option( 'wpuxss_eml_taxonomies', $wpuxss_eml_taxonomies );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
157 |
}
|
158 |
|
159 |
|
160 |
|
161 |
|
162 |
+
|
163 |
/**
|
164 |
+
* wpuxss_eml_admin_enqueue_scripts
|
165 |
*
|
166 |
+
* @since 1.1.1
|
167 |
+
* @created 07/04/14
|
168 |
*/
|
169 |
|
170 |
+
add_action( 'admin_enqueue_scripts', 'wpuxss_eml_admin_enqueue_scripts' );
|
171 |
+
|
172 |
+
function wpuxss_eml_admin_enqueue_scripts() {
|
173 |
+
|
174 |
+
global $wpuxss_eml_version,
|
175 |
+
$wpuxss_eml_dir;
|
176 |
+
|
177 |
+
|
178 |
+
// admin styles
|
179 |
+
wp_enqueue_style(
|
180 |
+
'wpuxss-eml-admin-custom-style',
|
181 |
+
$wpuxss_eml_dir . 'css/eml-admin.css',
|
182 |
+
false,
|
183 |
+
$wpuxss_eml_version,
|
184 |
+
'all'
|
185 |
+
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
186 |
}
|
187 |
|
188 |
|
189 |
|
190 |
|
191 |
/**
|
192 |
+
* wpuxss_eml_enqueue_media
|
193 |
*
|
194 |
+
* @since 2.0
|
195 |
+
* @created 04/09/14
|
196 |
*/
|
197 |
|
198 |
+
add_action( 'wp_enqueue_media', 'wpuxss_eml_enqueue_media' );
|
199 |
|
200 |
+
function wpuxss_eml_enqueue_media() {
|
|
|
|
|
|
|
|
|
|
|
201 |
|
202 |
+
global $wpuxss_eml_version,
|
203 |
+
$wpuxss_eml_dir,
|
204 |
+
$wp_version;
|
205 |
+
|
206 |
+
|
207 |
+
$screen = get_current_screen();
|
208 |
+
$media_library_mode = get_user_option( 'media_library_mode', get_current_user_id() ) ? get_user_option( 'media_library_mode', get_current_user_id() ) : 'grid';
|
209 |
+
|
210 |
+
|
211 |
+
// taxonomies for passing to media uploader's filter
|
212 |
+
$wpuxss_eml_taxonomies = get_option('wpuxss_eml_taxonomies');
|
213 |
+
if ( empty($wpuxss_eml_taxonomies) ) $wpuxss_eml_taxonomies = array();
|
214 |
|
215 |
+
$taxonomies_array = array();
|
216 |
+
foreach ( get_object_taxonomies('attachment','object') as $taxonomy )
|
217 |
{
|
218 |
+
$terms_array = array();
|
219 |
+
$terms = array();
|
|
|
220 |
|
221 |
+
if ( $wpuxss_eml_taxonomies[$taxonomy->name]['media_uploader_filter'] )
|
|
|
222 |
{
|
223 |
+
|
224 |
+
ob_start();
|
225 |
|
226 |
+
wp_terms_checklist( 0, array( 'taxonomy' => $taxonomy->name, 'checked_ontop' => false, 'walker' => new Walker_Media_Taxonomy_Uploader_Filter() ) );
|
|
|
|
|
|
|
227 |
|
228 |
+
$html = '';
|
229 |
+
if ( ob_get_contents() != false )
|
230 |
+
$html = ob_get_contents();
|
231 |
+
|
232 |
+
ob_end_clean();
|
233 |
+
|
234 |
+
$terms = array_filter( explode('|', $html) );
|
235 |
+
|
236 |
+
if ( !empty($terms) )
|
237 |
+
{
|
238 |
+
foreach ($terms as $term)
|
239 |
{
|
240 |
+
$term = explode('>', $term);
|
241 |
+
array_push($terms_array, array('term_id' => $term[0], 'term_name' => $term[1]));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
242 |
}
|
243 |
+
$taxonomies_array[$taxonomy->name] = array(
|
244 |
+
'list_title' => $taxonomy->labels->all_items,
|
245 |
+
'term_list' => $terms_array
|
246 |
+
);
|
247 |
}
|
248 |
}
|
249 |
+
}
|
250 |
+
|
251 |
+
|
252 |
+
// generic scripts
|
253 |
+
|
254 |
+
wp_enqueue_script(
|
255 |
+
'wpuxss-eml-media-models-script',
|
256 |
+
$wpuxss_eml_dir . 'js/eml-media-models.js',
|
257 |
+
array('media-models'),
|
258 |
+
$wpuxss_eml_version,
|
259 |
+
true
|
260 |
+
);
|
261 |
+
|
262 |
+
wp_enqueue_script(
|
263 |
+
'wpuxss-eml-media-views-script',
|
264 |
+
$wpuxss_eml_dir . 'js/eml-media-views.js',
|
265 |
+
array('media-views'),
|
266 |
+
$wpuxss_eml_version,
|
267 |
+
true
|
268 |
+
);
|
269 |
+
|
270 |
|
271 |
+
wp_localize_script(
|
272 |
+
'wpuxss-eml-media-views-script',
|
273 |
+
'wpuxss_eml_taxonomies',
|
274 |
+
$taxonomies_array
|
275 |
+
);
|
276 |
+
|
277 |
+
wp_localize_script(
|
278 |
+
'wpuxss-eml-media-views-script',
|
279 |
+
'wp_version',
|
280 |
+
$wp_version
|
281 |
+
);
|
282 |
+
|
283 |
+
|
284 |
+
// scripts for grid view :: /wp-admin/upload.php
|
285 |
+
if ( isset( $screen ) && 'upload' === $screen->base && 'grid' === $media_library_mode )
|
286 |
+
{
|
287 |
wp_enqueue_script(
|
288 |
+
'wpuxss-eml-media-grid-script',
|
289 |
+
$wpuxss_eml_dir . 'js/eml-media-grid.js',
|
290 |
+
array('media'),
|
291 |
$wpuxss_eml_version,
|
292 |
true
|
293 |
);
|
294 |
+
}
|
295 |
+
|
296 |
+
// scripts for Appearance -> Header
|
297 |
+
if ( isset( $screen ) && 'appearance_page_custom-header' === $screen->base ) {
|
298 |
|
299 |
wp_enqueue_script(
|
300 |
+
'wpuxss-eml-custom-header-script',
|
301 |
+
$wpuxss_eml_dir . 'js/eml-custom-header.js',
|
302 |
+
array('custom-header'),
|
303 |
$wpuxss_eml_version,
|
304 |
true
|
305 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
306 |
}
|
307 |
|
308 |
+
// scripts for Appearance -> Background
|
309 |
+
if ( isset( $screen ) && 'appearance_page_custom-background' === $screen->base ) {
|
310 |
+
|
311 |
+
wp_enqueue_script(
|
312 |
+
'wpuxss-eml-custom-background-script',
|
313 |
+
$wpuxss_eml_dir . 'js/eml-custom-background.js',
|
314 |
+
array('custom-background'),
|
315 |
+
$wpuxss_eml_version,
|
316 |
+
true
|
317 |
+
);
|
318 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
319 |
|
320 |
|
321 |
// scripts for /wp-admin/customize.php
|
322 |
+
if ( isset( $screen ) && 'customize' === $screen->base )
|
323 |
{
|
324 |
wp_enqueue_script(
|
325 |
'wpuxss-eml-customize-controls-script',
|
329 |
true
|
330 |
);
|
331 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
332 |
}
|
333 |
|
334 |
|
341 |
* @created 28/09/13
|
342 |
*/
|
343 |
|
344 |
+
function wpuxss_eml_on_activation() {
|
345 |
+
|
346 |
+
global $wpuxss_eml_version,
|
347 |
+
$wpuxss_eml_old_version;
|
348 |
+
|
349 |
+
|
350 |
+
if ( version_compare( $wpuxss_eml_version, $wpuxss_eml_old_version, '<>' ) ) {
|
351 |
+
update_option('wpuxss_eml_version', $wpuxss_eml_version );
|
352 |
+
}
|
353 |
+
|
354 |
+
if ( empty($wpuxss_eml_old_version) ||
|
355 |
+
version_compare( $wpuxss_eml_old_version, '0.0.3', '==' ) )
|
356 |
+
{
|
357 |
+
$wpuxss_eml_taxonomies['media_category'] = array(
|
358 |
+
'assigned' => 1,
|
359 |
+
'eml_media' => 1,
|
360 |
+
'admin_filter' => 1,
|
361 |
+
'media_uploader_filter' => 1,
|
362 |
+
'labels' => array(
|
363 |
+
'name' => 'Media Categories',
|
364 |
+
'singular_name' => 'Media Category',
|
365 |
+
'menu_name' => 'Media Categories',
|
366 |
+
'all_items' => 'All Media Categories',
|
367 |
+
'edit_item' => 'Edit Media Category',
|
368 |
+
'view_item' => 'View Media Category',
|
369 |
+
'update_item' => 'Update Media Category',
|
370 |
+
'add_new_item' => 'Add New Media Category',
|
371 |
+
'new_item_name' => 'New Media Category Name',
|
372 |
+
'parent_item' => 'Parent Media Category',
|
373 |
+
'parent_item_colon' => 'Parent Media Category:',
|
374 |
+
'search_items' => 'Search Media Categories'
|
375 |
+
),
|
376 |
+
'public' => true,
|
377 |
+
'show_admin_column' => true,
|
378 |
+
'show_in_nav_menus' => true,
|
379 |
+
'hierarchical' => true,
|
380 |
+
'rewrite' => array( 'slug' => 'media_category' ),
|
381 |
+
'sort' => 0
|
382 |
+
);
|
383 |
+
|
384 |
+
$allowed_mimes = get_allowed_mime_types();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
385 |
|
386 |
+
foreach ( wp_get_mime_types() as $type => $mime )
|
387 |
+
{
|
388 |
+
$wpuxss_eml_mimes[$type] = array(
|
389 |
+
'mime' => $mime,
|
390 |
+
'singular' => $mime,
|
391 |
+
'plural' => $mime,
|
392 |
+
'filter' => 0,
|
393 |
+
'upload' => isset($allowed_mimes[$type]) ? 1 : 0
|
394 |
+
);
|
395 |
+
}
|
396 |
+
|
397 |
+
$wpuxss_eml_mimes['pdf']['singular'] = 'PDF';
|
398 |
+
$wpuxss_eml_mimes['pdf']['plural'] = 'PDFs';
|
399 |
+
$wpuxss_eml_mimes['pdf']['filter'] = 1;
|
400 |
+
|
401 |
+
update_option( 'wpuxss_eml_taxonomies', $wpuxss_eml_taxonomies );
|
402 |
+
update_option( 'wpuxss_eml_mimes', $wpuxss_eml_mimes );
|
403 |
+
update_option( 'wpuxss_eml_mimes_backup', $wpuxss_eml_mimes );
|
404 |
+
}
|
405 |
}
|
406 |
|
407 |
?>
|
js/eml-custom-background.js
CHANGED
@@ -1,63 +1,63 @@
|
|
1 |
-
(function($) {
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
})(jQuery);
|
1 |
+
( function( $ ) {
|
2 |
+
|
3 |
+
var frame;
|
4 |
+
|
5 |
+
$( document ).ready(function() {
|
6 |
+
|
7 |
+
$('#choose-from-library-link').unbind('click').click( function( event ) {
|
8 |
+
|
9 |
+
var $el = $(this);
|
10 |
+
|
11 |
+
event.preventDefault();
|
12 |
+
|
13 |
+
// If the media frame already exists, reopen it.
|
14 |
+
if ( frame ) {
|
15 |
+
frame.open();
|
16 |
+
return;
|
17 |
+
}
|
18 |
+
|
19 |
+
// Create the media frame.
|
20 |
+
frame = wp.media.frames.customBackground = wp.media({
|
21 |
+
|
22 |
+
// Customize the submit button.
|
23 |
+
button: {
|
24 |
+
// Set the text of the button.
|
25 |
+
text: $el.data('update'),
|
26 |
+
// Tell the button not to close the modal, since we're
|
27 |
+
// going to refresh the page when the image is selected.
|
28 |
+
close: false
|
29 |
+
},
|
30 |
+
|
31 |
+
states: [
|
32 |
+
new wp.media.controller.Library({
|
33 |
+
title: $el.data('choose'),
|
34 |
+
library: wp.media.query({ type: 'image' }),
|
35 |
+
multiple: false,
|
36 |
+
priority: 20,
|
37 |
+
filterable: 'eml' // turn on filters
|
38 |
+
})
|
39 |
+
]
|
40 |
+
});
|
41 |
+
|
42 |
+
// When an image is selected, run a callback.
|
43 |
+
frame.on( 'select', function() {
|
44 |
+
// Grab the selected attachment.
|
45 |
+
var attachment = frame.state().get('selection').first();
|
46 |
+
|
47 |
+
// Run an AJAX request to set the background image.
|
48 |
+
$.post( ajaxurl, {
|
49 |
+
action: 'set-background-image',
|
50 |
+
attachment_id: attachment.id,
|
51 |
+
size: 'full'
|
52 |
+
}).done( function() {
|
53 |
+
// When the request completes, reload the window.
|
54 |
+
window.location.reload();
|
55 |
+
});
|
56 |
+
});
|
57 |
+
|
58 |
+
// Finally, open the modal.
|
59 |
+
frame.open();
|
60 |
+
});
|
61 |
+
});
|
62 |
+
|
63 |
+
})( jQuery );
|
js/eml-custom-header.js
CHANGED
@@ -1,56 +1,56 @@
|
|
1 |
-
(function($) {
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
}(jQuery)
|
1 |
+
( function( $ ) {
|
2 |
+
|
3 |
+
var frame;
|
4 |
+
|
5 |
+
$( document ).ready(function() {
|
6 |
+
|
7 |
+
$("#choose-from-library-link").unbind('click').click( function( event ) {
|
8 |
+
|
9 |
+
var $el = $(this);
|
10 |
+
|
11 |
+
event.preventDefault();
|
12 |
+
|
13 |
+
// If the media frame already exists, reopen it.
|
14 |
+
if ( frame ) {
|
15 |
+
frame.open();
|
16 |
+
return;
|
17 |
+
}
|
18 |
+
|
19 |
+
// Create the media frame.
|
20 |
+
frame = wp.media.frames.customHeader = wp.media({
|
21 |
+
|
22 |
+
// Customize the submit button.
|
23 |
+
button: {
|
24 |
+
// Set the text of the button.
|
25 |
+
text: $el.data('update'),
|
26 |
+
// Tell the button not to close the modal, since we're
|
27 |
+
// going to refresh the page when the image is selected.
|
28 |
+
close: false
|
29 |
+
},
|
30 |
+
|
31 |
+
states: [
|
32 |
+
new wp.media.controller.Library({
|
33 |
+
title: $el.data('choose'),
|
34 |
+
library: wp.media.query({ type: 'image' }),
|
35 |
+
multiple: false,
|
36 |
+
priority: 20,
|
37 |
+
filterable: 'eml' // turn on filters
|
38 |
+
})
|
39 |
+
]
|
40 |
+
});
|
41 |
+
|
42 |
+
// When an image is selected, run a callback.
|
43 |
+
frame.on( 'select', function() {
|
44 |
+
// Grab the selected attachment.
|
45 |
+
var attachment = frame.state().get('selection').first(),
|
46 |
+
link = $el.data('updateLink');
|
47 |
+
|
48 |
+
// Tell the browser to navigate to the crop step.
|
49 |
+
window.location = link + '&file=' + attachment.id;
|
50 |
+
});
|
51 |
+
|
52 |
+
frame.open();
|
53 |
+
});
|
54 |
+
});
|
55 |
+
|
56 |
+
})( jQuery );
|
js/eml-customize-controls.js
CHANGED
@@ -1,46 +1,46 @@
|
|
1 |
-
window.wp = window.wp || {};
|
2 |
-
|
3 |
-
(function($){
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
}(jQuery)
|
1 |
+
window.wp = window.wp || {};
|
2 |
+
|
3 |
+
( function( $ ) {
|
4 |
+
|
5 |
+
wp.customize.HeaderControl = wp.customize.HeaderControl.extend({
|
6 |
+
|
7 |
+
openMedia: function(event) {
|
8 |
+
|
9 |
+
var l10n = _wpMediaViewsL10n;
|
10 |
+
|
11 |
+
event.preventDefault();
|
12 |
+
|
13 |
+
this.frame = wp.media({
|
14 |
+
button: {
|
15 |
+
text: l10n.selectAndCrop,
|
16 |
+
close: false
|
17 |
+
},
|
18 |
+
states: [
|
19 |
+
new wp.media.controller.Library({
|
20 |
+
title: l10n.chooseImage,
|
21 |
+
library: wp.media.query({ type: 'image' }),
|
22 |
+
multiple: false,
|
23 |
+
priority: 20,
|
24 |
+
suggestedWidth: _wpCustomizeHeader.data.width,
|
25 |
+
suggestedHeight: _wpCustomizeHeader.data.height,
|
26 |
+
filterable: 'eml' // turn on filters
|
27 |
+
}),
|
28 |
+
new wp.media.controller.Cropper({
|
29 |
+
imgSelectOptions: this.calculateImageSelectOptions
|
30 |
+
})
|
31 |
+
]
|
32 |
+
});
|
33 |
+
|
34 |
+
this.frame.on('select', this.onSelect, this);
|
35 |
+
this.frame.on('cropped', this.onCropped, this);
|
36 |
+
this.frame.on('skippedcrop', this.onSkippedCrop, this);
|
37 |
+
|
38 |
+
this.frame.open();
|
39 |
+
}
|
40 |
+
});
|
41 |
+
|
42 |
+
$.extend( wp.customize.controlConstructor, {
|
43 |
+
header: wp.customize.HeaderControl
|
44 |
+
});
|
45 |
+
|
46 |
+
})( jQuery );
|
js/eml-media-grid.js
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
( function( $ ) {
|
2 |
+
|
3 |
+
$( document ).ready( function() {
|
4 |
+
|
5 |
+
$('.media-toolbar.wp-filter .media-grid-view-switch').after( $('.media-toolbar.wp-filter .select-mode-toggle-button') );
|
6 |
+
});
|
7 |
+
|
8 |
+
})( jQuery );
|
js/eml-media-models.js
CHANGED
@@ -1,343 +1,149 @@
|
|
1 |
window.wp = window.wp || {};
|
2 |
|
3 |
-
(function(
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
if ( wp.Uploader && _( this.args ).chain().keys().difference( allowed ).isEmpty().value() ) {
|
151 |
-
this.observe( wp.Uploader.queue );
|
152 |
-
}
|
153 |
-
},
|
154 |
-
/**
|
155 |
-
* @returns {Boolean}
|
156 |
-
*/
|
157 |
-
hasMore: function() {
|
158 |
-
return this._hasMore;
|
159 |
-
},
|
160 |
-
/**
|
161 |
-
* @param {Object} [options={}]
|
162 |
-
* @returns {Promise}
|
163 |
-
*/
|
164 |
-
more: function( options ) {
|
165 |
-
var query = this;
|
166 |
-
|
167 |
-
if ( this._more && 'pending' === this._more.state() ) {
|
168 |
-
return this._more;
|
169 |
-
}
|
170 |
-
|
171 |
-
if ( ! this.hasMore() ) {
|
172 |
-
return $.Deferred().resolveWith( this ).promise();
|
173 |
-
}
|
174 |
-
|
175 |
-
options = options || {};
|
176 |
-
options.remove = false;
|
177 |
-
|
178 |
-
return this._more = this.fetch( options ).done( function( resp ) {
|
179 |
-
if ( _.isEmpty( resp ) || -1 === this.args.posts_per_page || resp.length < this.args.posts_per_page ) {
|
180 |
-
query._hasMore = false;
|
181 |
-
}
|
182 |
-
});
|
183 |
-
},
|
184 |
-
/**
|
185 |
-
* Overrides Backbone.Collection.sync
|
186 |
-
* Overrides wp.media.model.Attachments.sync
|
187 |
-
*
|
188 |
-
* @param {String} method
|
189 |
-
* @param {Backbone.Model} model
|
190 |
-
* @param {Object} [options={}]
|
191 |
-
* @returns {Promise}
|
192 |
-
*/
|
193 |
-
sync: function( method, model, options ) {
|
194 |
-
var args, fallback;
|
195 |
-
|
196 |
-
// Overload the read method so Attachment.fetch() functions correctly.
|
197 |
-
if ( 'read' === method ) {
|
198 |
-
options = options || {};
|
199 |
-
options.context = this;
|
200 |
-
options.data = _.extend( options.data || {}, {
|
201 |
-
action: 'query-attachments',
|
202 |
-
post_id: media.model.settings.post.id
|
203 |
-
});
|
204 |
-
|
205 |
-
// Clone the args so manipulation is non-destructive.
|
206 |
-
args = _.clone( this.args );
|
207 |
-
|
208 |
-
// Determine which page to query.
|
209 |
-
if ( -1 !== args.posts_per_page ) {
|
210 |
-
args.paged = Math.floor( this.length / args.posts_per_page ) + 1;
|
211 |
-
}
|
212 |
-
|
213 |
-
options.data.query = args;
|
214 |
-
return media.ajax( options );
|
215 |
-
|
216 |
-
// Otherwise, fall back to Backbone.sync()
|
217 |
-
} else {
|
218 |
-
/**
|
219 |
-
* Call wp.media.model.Attachments.sync or Backbone.sync
|
220 |
-
*/
|
221 |
-
fallback = media.model.Attachments.prototype.sync ? media.model.Attachments.prototype : Backbone;
|
222 |
-
return fallback.sync.apply( this, arguments );
|
223 |
-
}
|
224 |
-
}
|
225 |
-
}, {
|
226 |
-
/**
|
227 |
-
* @readonly
|
228 |
-
*/
|
229 |
-
defaultProps: {
|
230 |
-
orderby: 'date',
|
231 |
-
order: 'DESC'
|
232 |
-
},
|
233 |
-
/**
|
234 |
-
* @readonly
|
235 |
-
*/
|
236 |
-
defaultArgs: {
|
237 |
-
posts_per_page: 40
|
238 |
-
},
|
239 |
-
/**
|
240 |
-
* @readonly
|
241 |
-
*/
|
242 |
-
orderby: {
|
243 |
-
allowed: [ 'name', 'author', 'date', 'title', 'modified', 'uploadedTo', 'id', 'post__in', 'menuOrder' ],
|
244 |
-
valuemap: {
|
245 |
-
'id': 'ID',
|
246 |
-
'uploadedTo': 'parent',
|
247 |
-
'menuOrder': 'menu_order ID'
|
248 |
-
}
|
249 |
-
},
|
250 |
-
/**
|
251 |
-
* @readonly
|
252 |
-
*/
|
253 |
-
propmap: {
|
254 |
-
'search': 's',
|
255 |
-
'type': 'post_mime_type',
|
256 |
-
'perPage': 'posts_per_page',
|
257 |
-
'menuOrder': 'menu_order',
|
258 |
-
'uploadedTo': 'post_parent'
|
259 |
-
},
|
260 |
-
|
261 |
-
queries: [],
|
262 |
-
|
263 |
-
cleanQueries: function(){
|
264 |
-
|
265 |
-
this.queries = [];
|
266 |
-
},
|
267 |
-
|
268 |
-
/**
|
269 |
-
* @static
|
270 |
-
* @method
|
271 |
-
*
|
272 |
-
* @returns {wp.media.model.Query} A new query.
|
273 |
-
*/
|
274 |
-
// Caches query objects so queries can be easily reused.
|
275 |
-
get: (function(){
|
276 |
-
|
277 |
-
/**
|
278 |
-
* @param {Object} props
|
279 |
-
* @param {Object} options
|
280 |
-
* @returns {Query}
|
281 |
-
*/
|
282 |
-
return function( props, options ) {
|
283 |
-
var args = {},
|
284 |
-
orderby = media.model.Query.orderby,
|
285 |
-
defaults = media.model.Query.defaultProps,
|
286 |
-
query,
|
287 |
-
queries = this.queries;;
|
288 |
-
|
289 |
-
// Remove the `query` property. This isn't linked to a query,
|
290 |
-
// this *is* the query.
|
291 |
-
delete props.query;
|
292 |
-
|
293 |
-
// Fill default args.
|
294 |
-
_.defaults( props, defaults );
|
295 |
-
|
296 |
-
// Normalize the order.
|
297 |
-
props.order = props.order.toUpperCase();
|
298 |
-
if ( 'DESC' !== props.order && 'ASC' !== props.order ) {
|
299 |
-
props.order = defaults.order.toUpperCase();
|
300 |
-
}
|
301 |
-
|
302 |
-
// Ensure we have a valid orderby value.
|
303 |
-
if ( ! _.contains( orderby.allowed, props.orderby ) ) {
|
304 |
-
props.orderby = defaults.orderby;
|
305 |
-
}
|
306 |
-
|
307 |
-
// Generate the query `args` object.
|
308 |
-
// Correct any differing property names.
|
309 |
-
_.each( props, function( value, prop ) {
|
310 |
-
if ( _.isNull( value ) ) {
|
311 |
-
return;
|
312 |
-
}
|
313 |
-
|
314 |
-
args[ media.model.Query.propmap[ prop ] || prop ] = value;
|
315 |
-
});
|
316 |
-
|
317 |
-
// Fill any other default query args.
|
318 |
-
_.defaults( args, media.model.Query.defaultArgs );
|
319 |
-
|
320 |
-
// `props.orderby` does not always map directly to `args.orderby`.
|
321 |
-
// Substitute exceptions specified in orderby.keymap.
|
322 |
-
args.orderby = orderby.valuemap[ props.orderby ] || props.orderby;
|
323 |
-
|
324 |
-
// Search the query cache for matches.
|
325 |
-
query = _.find( queries, function( query ) {
|
326 |
-
return _.isEqual( query.args, args );
|
327 |
-
});
|
328 |
-
|
329 |
-
// Otherwise, create a new query and add it to the cache.
|
330 |
-
if ( ! query ) {
|
331 |
-
query = new media.model.Query( [], _.extend( options || {}, {
|
332 |
-
props: props,
|
333 |
-
args: args
|
334 |
-
} ) );
|
335 |
-
queries.push( query );
|
336 |
-
}
|
337 |
-
|
338 |
-
return query;
|
339 |
-
};
|
340 |
-
}())
|
341 |
-
});
|
342 |
-
|
343 |
-
}(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 |
+
|
12 |
+
_.extend( Query.prototype, {
|
13 |
+
|
14 |
+
initialize: function( models, options ) {
|
15 |
+
|
16 |
+
var allowed;
|
17 |
+
|
18 |
+
options = options || {};
|
19 |
+
Attachments.prototype.initialize.apply( this, arguments );
|
20 |
+
|
21 |
+
this.args = options.args;
|
22 |
+
this._hasMore = true;
|
23 |
+
this.created = new Date();
|
24 |
+
|
25 |
+
this.filters.order = function( attachment ) {
|
26 |
+
var orderby = this.props.get('orderby'),
|
27 |
+
order = this.props.get('order');
|
28 |
+
|
29 |
+
if ( ! this.comparator ) {
|
30 |
+
return true;
|
31 |
+
}
|
32 |
+
|
33 |
+
// We want any items that can be placed before the last
|
34 |
+
// item in the set. If we add any items after the last
|
35 |
+
// item, then we can't guarantee the set is complete.
|
36 |
+
if ( this.length ) {
|
37 |
+
return 1 !== this.comparator( attachment, this.last(), { ties: true });
|
38 |
+
|
39 |
+
// Handle the case where there are no items yet and
|
40 |
+
// we're sorting for recent items. In that case, we want
|
41 |
+
// changes that occurred after we created the query.
|
42 |
+
} else if ( 'DESC' === order && ( 'date' === orderby || 'modified' === orderby ) ) {
|
43 |
+
return attachment.get( orderby ) >= this.created;
|
44 |
+
|
45 |
+
// If we're sorting by menu order and we have no items,
|
46 |
+
// accept any items that have the default menu order (0).
|
47 |
+
} else if ( 'ASC' === order && 'menuOrder' === orderby ) {
|
48 |
+
return attachment.get( orderby ) === 0;
|
49 |
+
}
|
50 |
+
|
51 |
+
// Otherwise, we don't want any items yet.
|
52 |
+
return false;
|
53 |
+
};
|
54 |
+
|
55 |
+
// Observe the central `wp.Uploader.queue` collection to watch for
|
56 |
+
// new matches for the query.
|
57 |
+
//
|
58 |
+
// Only observe when a limited number of query args are set. There
|
59 |
+
// are no filters for other properties, so observing will result in
|
60 |
+
// false positives in those queries.
|
61 |
+
allowed = [ 's', 'order', 'orderby', 'posts_per_page', 'post_mime_type', 'post_parent', 'year', 'monthnum' ];
|
62 |
+
if ( wp.Uploader && _( this.args ).chain().keys().difference( allowed ).isEmpty().value() ) {
|
63 |
+
this.observe( wp.Uploader.queue );
|
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,
|
87 |
+
query,
|
88 |
+
cache = !! props.cache || _.isUndefined( props.cache );
|
89 |
+
|
90 |
+
delete props.query;
|
91 |
+
delete props.cache;
|
92 |
+
|
93 |
+
// Fill default args.
|
94 |
+
_.defaults( props, defaults );
|
95 |
+
|
96 |
+
// Normalize the order.
|
97 |
+
props.order = props.order.toUpperCase();
|
98 |
+
if ( 'DESC' !== props.order && 'ASC' !== props.order ) {
|
99 |
+
props.order = defaults.order.toUpperCase();
|
100 |
+
}
|
101 |
+
|
102 |
+
// Ensure we have a valid orderby value.
|
103 |
+
if ( ! _.contains( orderby.allowed, props.orderby ) ) {
|
104 |
+
props.orderby = defaults.orderby;
|
105 |
+
}
|
106 |
+
|
107 |
+
// Generate the query `args` object.
|
108 |
+
// Correct any differing property names.
|
109 |
+
_.each( props, function( value, prop ) {
|
110 |
+
if ( _.isNull( value ) ) {
|
111 |
+
return;
|
112 |
+
}
|
113 |
+
|
114 |
+
args[ Query.propmap[ prop ] || prop ] = value;
|
115 |
+
});
|
116 |
+
|
117 |
+
// Fill any other default query args.
|
118 |
+
_.defaults( args, Query.defaultArgs );
|
119 |
+
|
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 ) {
|
127 |
+
return _.isEqual( query.args, args );
|
128 |
+
});
|
129 |
+
} else {
|
130 |
+
this.queries = [];
|
131 |
+
}
|
132 |
+
|
133 |
+
// Otherwise, create a new query and add it to the cache.
|
134 |
+
if ( ! query ) {
|
135 |
+
query = new Query( [], _.extend( options || {}, {
|
136 |
+
props: props,
|
137 |
+
args: args
|
138 |
+
} ) );
|
139 |
+
this.queries.push( query );
|
140 |
+
}
|
141 |
+
|
142 |
+
return query;
|
143 |
+
};
|
144 |
+
}())
|
145 |
+
});
|
146 |
+
|
147 |
+
|
148 |
+
|
149 |
+
})( jQuery, _ );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
js/eml-media-views.js
CHANGED
@@ -1,120 +1,322 @@
|
|
1 |
window.wp = window.wp || {};
|
2 |
|
3 |
-
(function(
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
$(function()
|
116 |
-
{
|
117 |
-
$('.media-toolbar.wp-filter .media-grid-view-switch').after( $('.media-toolbar.wp-filter .select-mode-toggle-button') );
|
118 |
});
|
119 |
-
|
120 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
window.wp = window.wp || {};
|
2 |
|
3 |
+
( function( $, _ ) {
|
4 |
+
|
5 |
+
var media = wp.media,
|
6 |
+
l10n = media.view.l10n,
|
7 |
+
original = {};
|
8 |
+
|
9 |
+
|
10 |
+
|
11 |
+
|
12 |
+
_.extend( media.controller.Library.prototype, {
|
13 |
+
|
14 |
+
uploading: function( attachment ) {
|
15 |
+
|
16 |
+
var dateFilter, Filters, taxFilter,
|
17 |
+
content = this.frame.content,
|
18 |
+
selection = this.get('selection'),
|
19 |
+
library = this.get('library');
|
20 |
+
|
21 |
+
|
22 |
+
if ( 'upload' === content.mode() ) {
|
23 |
+
this.frame.content.mode('browse');
|
24 |
+
}
|
25 |
+
|
26 |
+
if ( wp.Uploader.queue.length == 1 ) {
|
27 |
+
|
28 |
+
dateFilter = content.get().toolbar.get( 'dateFilter' );
|
29 |
+
Filters = content.get().toolbar.get( 'filters' );
|
30 |
+
|
31 |
+
if ( ! _.isUndefined(dateFilter) && 'all' !== dateFilter.$el.val() ) {
|
32 |
+
dateFilter.$el.val( 'all' ).change();
|
33 |
+
}
|
34 |
+
|
35 |
+
if ( ! _.isUndefined(Filters) && 'all' !== Filters.$el.val() ) {
|
36 |
+
Filters.$el.val( 'all' ).change();
|
37 |
+
}
|
38 |
+
|
39 |
+
$.each( wpuxss_eml_taxonomies, function( taxonomy, values ) {
|
40 |
+
|
41 |
+
taxFilter = content.get().toolbar.get( taxonomy+'-filter' );
|
42 |
+
|
43 |
+
if ( 'all' !== taxFilter.$el.val() ) {
|
44 |
+
taxFilter.$el.val( 'all' ).change();
|
45 |
+
}
|
46 |
+
});
|
47 |
+
}
|
48 |
+
|
49 |
+
if ( wp_version < '4.0' || this.get( 'autoSelect' ) ) {
|
50 |
+
|
51 |
+
if ( wp.Uploader.queue.length == 1 && selection.length ) {
|
52 |
+
selection.reset();
|
53 |
+
}
|
54 |
+
selection.add( attachment );
|
55 |
+
selection.trigger( 'selection:unsingle' );
|
56 |
+
selection.trigger( 'selection:single' );
|
57 |
+
}
|
58 |
+
}
|
59 |
+
});
|
60 |
+
|
61 |
+
|
62 |
+
|
63 |
+
|
64 |
+
var newEvents = { 'click input' : 'preSave' };
|
65 |
+
_.extend( newEvents, media.view.AttachmentCompat.prototype.events );
|
66 |
+
|
67 |
+
_.extend( media.view.AttachmentCompat.prototype, {
|
68 |
+
|
69 |
+
events: newEvents,
|
70 |
+
|
71 |
+
preSave: function() {
|
72 |
+
|
73 |
+
this.noRender = true;
|
74 |
+
|
75 |
+
media.model.Query.cleanQueries();
|
76 |
+
},
|
77 |
+
|
78 |
+
render: function() {
|
79 |
+
|
80 |
+
var compat = this.model.get('compat');
|
81 |
+
|
82 |
+
if ( ! compat || ! compat.item ) {
|
83 |
+
return;
|
84 |
+
}
|
85 |
+
|
86 |
+
if ( this.noRender ) {
|
87 |
+
return this;
|
88 |
+
}
|
89 |
+
|
90 |
+
this.views.detach();
|
91 |
+
this.$el.html( compat.item );
|
92 |
+
this.views.render();
|
93 |
+
return this;
|
94 |
+
}
|
95 |
+
});
|
96 |
+
|
97 |
+
|
98 |
+
|
99 |
+
|
100 |
+
_.extend( media.view.AttachmentFilters.prototype, {
|
101 |
|
102 |
+
change: function() {
|
103 |
+
|
104 |
+
var filter = this.filters[ this.el.value ],
|
105 |
+
selection = this.controller.state().get( 'selection' );
|
106 |
+
|
107 |
+
if ( filter && selection.length && ! wp.Uploader.queue.length ) {
|
108 |
+
selection.reset();
|
109 |
+
}
|
110 |
+
|
111 |
+
if ( filter ) {
|
112 |
+
this.model.set( filter.props );
|
113 |
+
}
|
114 |
+
}
|
|
|
|
|
|
|
115 |
});
|
116 |
+
|
117 |
+
|
118 |
+
|
119 |
+
|
120 |
+
media.view.AttachmentFilters.Taxonomy = media.view.AttachmentFilters.extend({
|
121 |
+
|
122 |
+
id: function() {
|
123 |
+
|
124 |
+
return 'media-attachment-'+this.options.taxonomy+'-filters';
|
125 |
+
},
|
126 |
+
|
127 |
+
className: function() {
|
128 |
+
|
129 |
+
// TODO: get rid of excess class name that duplicates id
|
130 |
+
return 'attachment-filters eml-attachment-filters attachment-'+this.options.taxonomy+'-filter';
|
131 |
+
},
|
132 |
+
|
133 |
+
createFilters: function() {
|
134 |
+
|
135 |
+
var filters = {},
|
136 |
+
self = this;
|
137 |
+
|
138 |
+
_.each( self.options.termList || {}, function( term, key ) {
|
139 |
+
|
140 |
+
var term_id = term['term_id'],
|
141 |
+
term_name = $("<div/>").html(term['term_name']).text();
|
142 |
+
|
143 |
+
filters[ term_id ] = {
|
144 |
+
text: term_name,
|
145 |
+
priority: key+2
|
146 |
+
};
|
147 |
+
|
148 |
+
filters[term_id]['props'] = {};
|
149 |
+
filters[term_id]['props'][self.options.taxonomy] = term_id;
|
150 |
+
});
|
151 |
+
|
152 |
+
filters.all = {
|
153 |
+
text: self.options.termListTitle,
|
154 |
+
priority: 1
|
155 |
+
};
|
156 |
+
|
157 |
+
filters['all']['props'] = {};
|
158 |
+
filters['all']['props'][self.options.taxonomy] = null;
|
159 |
+
|
160 |
+
this.filters = filters;
|
161 |
+
}
|
162 |
+
});
|
163 |
+
|
164 |
+
|
165 |
+
|
166 |
+
original.AttachmentsBrowser = {
|
167 |
+
|
168 |
+
initialize: media.view.AttachmentsBrowser.prototype.initialize,
|
169 |
+
createToolbar: media.view.AttachmentsBrowser.prototype.createToolbar
|
170 |
+
};
|
171 |
+
|
172 |
+
_.extend( media.view.AttachmentsBrowser.prototype, {
|
173 |
+
|
174 |
+
initialize: function() {
|
175 |
+
|
176 |
+
original.AttachmentsBrowser.initialize.apply( this, arguments );
|
177 |
+
|
178 |
+
this.on( 'ready', this.fixLayout, this );
|
179 |
+
|
180 |
+
$( window ).on( 'resize', _.debounce( _.bind( this.fixLayout, this ), 15 ) );
|
181 |
+
|
182 |
+
// ACF compatibility
|
183 |
+
$( document ).on( 'click', '.acf-expand-details', _.debounce( _.bind( this.fixLayout, this ), 250 ) );
|
184 |
+
},
|
185 |
+
|
186 |
+
fixLayout: function() {
|
187 |
+
|
188 |
+
var $browser = this.$el,
|
189 |
+
$attachments = $browser.find('.attachments'),
|
190 |
+
$uploader = $browser.find('.uploader-inline'),
|
191 |
+
$toolbar = $browser.find('.media-toolbar');
|
192 |
+
|
193 |
+
|
194 |
+
if ( wp_version < '4.0' ) {
|
195 |
+
|
196 |
+
if ( 'absolute' == $attachments.css( 'position' ) &&
|
197 |
+
$browser.height() > $toolbar.height() + 20 ) {
|
198 |
+
|
199 |
+
$attachments.css( 'top', $toolbar.height() + 20 + 'px' );
|
200 |
+
$uploader.css( 'top', $toolbar.height() + 20 + 'px' );
|
201 |
+
}
|
202 |
+
else if ( 'absolute' == $attachments.css( 'position' ) ) {
|
203 |
+
$attachments.css( 'top', '50px' );
|
204 |
+
$uploader.css( 'top', '50px' );
|
205 |
+
}
|
206 |
+
else if ( 'relative' == $attachments.css( 'position' ) ) {
|
207 |
+
$attachments.css( 'top', '0' );
|
208 |
+
$uploader.css( 'top', '0' );
|
209 |
+
}
|
210 |
+
|
211 |
+
// TODO: find a better place for it, something like fixLayoutOnce
|
212 |
+
$toolbar.find('.media-toolbar-secondary').prepend( $toolbar.find('.instructions') );
|
213 |
+
|
214 |
+
return;
|
215 |
+
}
|
216 |
+
|
217 |
+
|
218 |
+
if ( ! this.controller.isModeActive( 'select' ) &&
|
219 |
+
! this.controller.isModeActive( 'eml-grid' ) ) {
|
220 |
+
return;
|
221 |
+
}
|
222 |
+
|
223 |
+
if ( this.controller.isModeActive( 'select' ) ) {
|
224 |
+
|
225 |
+
$attachments.css( 'top', $toolbar.height() + 10 + 'px' );
|
226 |
+
$uploader.css( 'top', $toolbar.height() + 10 + 'px' );
|
227 |
+
$browser.find('.eml-loader').css( 'top', $toolbar.height() + 10 + 'px' );
|
228 |
+
|
229 |
+
// TODO: find a better place for it, something like fixLayoutOnce
|
230 |
+
$toolbar.find('.media-toolbar-secondary').prepend( $toolbar.find('.instructions') );
|
231 |
+
}
|
232 |
+
|
233 |
+
if ( this.controller.isModeActive( 'eml-grid' ) ) {
|
234 |
+
|
235 |
+
$browser.css( 'top', $toolbar.outerHeight() + 20 + 'px' );
|
236 |
+
$toolbar.css( 'top', - $toolbar.outerHeight() - 30 + 'px' );
|
237 |
+
}
|
238 |
+
},
|
239 |
+
|
240 |
+
createToolbar: function() {
|
241 |
+
|
242 |
+
var filters = this.options.filters,
|
243 |
+
self = this,
|
244 |
+
i = 1;
|
245 |
+
|
246 |
+
original.AttachmentsBrowser.createToolbar.apply( this, arguments );
|
247 |
+
|
248 |
+
if ( -1 !== $.inArray( filters, [ 'uploaded', 'all', 'eml' ] ) ) {
|
249 |
+
|
250 |
+
if ( wp_version >= '4.0' && ! this.controller.isModeActive( 'grid' ) ) {
|
251 |
+
|
252 |
+
this.toolbar.set( 'dateFilterLabel', new media.view.Label({
|
253 |
+
value: l10n.filterByDate,
|
254 |
+
attributes: {
|
255 |
+
'for': 'media-attachment-date-filters'
|
256 |
+
},
|
257 |
+
priority: -75
|
258 |
+
}).render() );
|
259 |
+
this.toolbar.set( 'dateFilter', new media.view.DateFilter({
|
260 |
+
controller: this.controller,
|
261 |
+
model: this.collection.props,
|
262 |
+
priority: -75
|
263 |
+
}).render() );
|
264 |
+
}
|
265 |
+
}
|
266 |
+
|
267 |
+
$.each( wpuxss_eml_taxonomies, function( taxonomy, values ) {
|
268 |
+
|
269 |
+
if ( values.term_list && -1 !== $.inArray( filters, [ 'uploaded', 'all', 'eml' ] ) ) {
|
270 |
+
|
271 |
+
self.toolbar.set( taxonomy+'-filter', new media.view.AttachmentFilters.Taxonomy({
|
272 |
+
controller: self.controller,
|
273 |
+
model: self.collection.props,
|
274 |
+
priority: -80 + 10*i++,
|
275 |
+
taxonomy: taxonomy,
|
276 |
+
termList: values.term_list,
|
277 |
+
termListTitle: values.list_title,
|
278 |
+
}).render() );
|
279 |
+
}
|
280 |
+
});
|
281 |
+
}
|
282 |
+
});
|
283 |
+
|
284 |
+
|
285 |
+
|
286 |
+
|
287 |
+
// a copy from media-grid.js | temporary | until WP 4.1
|
288 |
+
media.view.DateFilter = media.view.AttachmentFilters.extend({
|
289 |
+
|
290 |
+
id: 'media-attachment-date-filters',
|
291 |
+
|
292 |
+
createFilters: function() {
|
293 |
+
var filters = {};
|
294 |
+
_.each( media.view.settings.months || {}, function( value, index ) {
|
295 |
+
filters[ index ] = {
|
296 |
+
text: value.text,
|
297 |
+
props: {
|
298 |
+
year: value.year,
|
299 |
+
monthnum: value.month
|
300 |
+
}
|
301 |
+
};
|
302 |
+
});
|
303 |
+
filters.all = {
|
304 |
+
text: l10n.allDates,
|
305 |
+
props: {
|
306 |
+
monthnum: false,
|
307 |
+
year: false
|
308 |
+
},
|
309 |
+
priority: 10
|
310 |
+
};
|
311 |
+
this.filters = filters;
|
312 |
+
}
|
313 |
+
});
|
314 |
+
|
315 |
+
|
316 |
+
|
317 |
+
|
318 |
+
// TODO: move to the PHP side
|
319 |
+
$('body').addClass('eml-media-css');
|
320 |
+
|
321 |
+
|
322 |
+
})( jQuery, _ );
|
js/eml-options.js
CHANGED
@@ -1,345 +1,345 @@
|
|
1 |
-
(function($){
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
})( jQuery );
|
1 |
+
( function( $ ) {
|
2 |
+
|
3 |
+
// remove taxonomy
|
4 |
+
$( document ).on('click', 'li .wpuxss-eml-button-remove', function() {
|
5 |
+
|
6 |
+
target = $(this).parent();
|
7 |
+
|
8 |
+
if ( target.hasClass('wpuxss-eml-clone-taxonomy') )
|
9 |
+
{
|
10 |
+
target.hide( 300, function() {
|
11 |
+
$(this).remove();
|
12 |
+
});
|
13 |
+
}
|
14 |
+
else
|
15 |
+
{
|
16 |
+
if ( confirm(wpuxss_eml_i18n_data.tax_deletion_confirm) )
|
17 |
+
{
|
18 |
+
target.hide( 300, function() {
|
19 |
+
$(this).remove();
|
20 |
+
});
|
21 |
+
}
|
22 |
+
}
|
23 |
+
|
24 |
+
return false;
|
25 |
+
});
|
26 |
+
|
27 |
+
// create new taxonomy
|
28 |
+
$(document).on('click', '.wpuxss-eml-button-create-taxonomy', function()
|
29 |
+
{
|
30 |
+
$('.wpuxss-eml-media-taxonomy-list').find('.wpuxss-eml-clone').clone().attr('class','wpuxss-eml-clone-taxonomy').appendTo('.wpuxss-eml-media-taxonomy-list').show(300);
|
31 |
+
|
32 |
+
return false;
|
33 |
+
});
|
34 |
+
|
35 |
+
// edit taxonomy parameters
|
36 |
+
$(document).on('click', '.wpuxss-eml-button-edit', function()
|
37 |
+
{
|
38 |
+
$(this).parent().find('.wpuxss-eml-taxonomy-edit').toggle(300);
|
39 |
+
|
40 |
+
$(this).html(function(i, html)
|
41 |
+
{
|
42 |
+
return html == wpuxss_eml_i18n_data.edit+' \u2193' ? wpuxss_eml_i18n_data.close+' \u2191' : wpuxss_eml_i18n_data.edit+' \u2193';
|
43 |
+
});
|
44 |
+
|
45 |
+
return false;
|
46 |
+
});
|
47 |
+
|
48 |
+
// on change of a singular taxonomy name during creation
|
49 |
+
$(document).on('blur', '.wpuxss-eml-clone-taxonomy .wpuxss-eml-singular_name', function()
|
50 |
+
{
|
51 |
+
var dictionary,
|
52 |
+
taxonomy_name = $(this).val().toLowerCase(),
|
53 |
+
taxonomy_edit_box = $(this).parents('.wpuxss-eml-taxonomy-edit');
|
54 |
+
|
55 |
+
taxonomy_name = taxonomy_name.replace(/(<([^>]+)>)/g,'');
|
56 |
+
|
57 |
+
if ( taxonomy_name != '' )
|
58 |
+
{
|
59 |
+
// thanks to
|
60 |
+
// https://github.com/borodean/jquery-translit
|
61 |
+
// https://gist.github.com/richardsweeney/5317392
|
62 |
+
// http://www.advancedcustomfields.com/
|
63 |
+
// for the 'dictionary' code!
|
64 |
+
dictionary = {
|
65 |
+
'а': 'a',
|
66 |
+
'б': 'b',
|
67 |
+
'в': 'v',
|
68 |
+
'г': 'g',
|
69 |
+
'д': 'd',
|
70 |
+
'е': 'e',
|
71 |
+
'ё': 'e',
|
72 |
+
'ж': 'zh',
|
73 |
+
'з': 'z',
|
74 |
+
'и': 'i',
|
75 |
+
'й': 'i',
|
76 |
+
'к': 'k',
|
77 |
+
'л': 'l',
|
78 |
+
'м': 'm',
|
79 |
+
'н': 'n',
|
80 |
+
'о': 'o',
|
81 |
+
'п': 'p',
|
82 |
+
'р': 'r',
|
83 |
+
'с': 's',
|
84 |
+
'т': 't',
|
85 |
+
'у': 'u',
|
86 |
+
'ф': 'f',
|
87 |
+
'х': 'kh',
|
88 |
+
'ц': 'tc',
|
89 |
+
'ч': 'ch',
|
90 |
+
'ш': 'sh',
|
91 |
+
'щ': 'shch',
|
92 |
+
'ъ': '',
|
93 |
+
'ы': 'y',
|
94 |
+
'ь': '',
|
95 |
+
'э': 'e',
|
96 |
+
'ю': 'iu',
|
97 |
+
'я': 'ia',
|
98 |
+
'ä': 'a',
|
99 |
+
'æ': 'a',
|
100 |
+
'å': 'a',
|
101 |
+
'ö': 'o',
|
102 |
+
'ø': 'o',
|
103 |
+
'é': 'e',
|
104 |
+
'ë': 'e',
|
105 |
+
'ü': 'u',
|
106 |
+
'ó': 'o',
|
107 |
+
'ő': 'o',
|
108 |
+
'ú': 'u',
|
109 |
+
'é': 'e',
|
110 |
+
'á': 'a',
|
111 |
+
'ű': 'u',
|
112 |
+
'í': 'i',
|
113 |
+
' ' : '_',
|
114 |
+
'-' : '_',
|
115 |
+
'\'' : '',
|
116 |
+
'&' : '_'
|
117 |
+
};
|
118 |
+
|
119 |
+
$.each( dictionary, function(k, v)
|
120 |
+
{
|
121 |
+
var regex = new RegExp( k, 'g' );
|
122 |
+
taxonomy_name = taxonomy_name.replace( regex, v );
|
123 |
+
});
|
124 |
+
|
125 |
+
taxonomy_name = taxonomy_name.replace(/[^a-z0-9_\s]/g, '');
|
126 |
+
|
127 |
+
$(this).closest('.wpuxss-eml-clone-taxonomy').attr('id',taxonomy_name);
|
128 |
+
|
129 |
+
if ( $('.wpuxss-eml-clone-taxonomy[id='+taxonomy_name+'], .wpuxss-eml-taxonomy[id='+taxonomy_name+'], .wpuxss-non-eml-taxonomy[id='+taxonomy_name+']').length > 1 )
|
130 |
+
{
|
131 |
+
alert(wpuxss_eml_i18n_data.tax_error_duplicate);
|
132 |
+
}
|
133 |
+
|
134 |
+
$(this).attr('name','wpuxss_eml_taxonomies['+taxonomy_name+'][labels][singular_name]');
|
135 |
+
taxonomy_edit_box.find('.wpuxss-eml-name').attr('name','wpuxss_eml_taxonomies['+taxonomy_name+'][labels][name]');
|
136 |
+
taxonomy_edit_box.find('.wpuxss-eml-menu_name').attr('name','wpuxss_eml_taxonomies['+taxonomy_name+'][labels][menu_name]');
|
137 |
+
taxonomy_edit_box.find('.wpuxss-eml-all_items').attr('name','wpuxss_eml_taxonomies['+taxonomy_name+'][labels][all_items]');
|
138 |
+
taxonomy_edit_box.find('.wpuxss-eml-edit_item').attr('name','wpuxss_eml_taxonomies['+taxonomy_name+'][labels][edit_item]');
|
139 |
+
taxonomy_edit_box.find('.wpuxss-eml-view_item').attr('name','wpuxss_eml_taxonomies['+taxonomy_name+'][labels][view_item]');
|
140 |
+
taxonomy_edit_box.find('.wpuxss-eml-update_item').attr('name','wpuxss_eml_taxonomies['+taxonomy_name+'][labels][update_item]');
|
141 |
+
taxonomy_edit_box.find('.wpuxss-eml-add_new_item').attr('name','wpuxss_eml_taxonomies['+taxonomy_name+'][labels][add_new_item]');
|
142 |
+
taxonomy_edit_box.find('.wpuxss-eml-new_item_name').attr('name','wpuxss_eml_taxonomies['+taxonomy_name+'][labels][new_item_name]');
|
143 |
+
taxonomy_edit_box.find('.wpuxss-eml-parent_item').attr('name','wpuxss_eml_taxonomies['+taxonomy_name+'][labels][parent_item]');
|
144 |
+
taxonomy_edit_box.find('.wpuxss-eml-search_items').attr('name','wpuxss_eml_taxonomies['+taxonomy_name+'][labels][search_items]');
|
145 |
+
|
146 |
+
if( taxonomy_edit_box.find('.wpuxss-eml-edit_item').val() == '' )
|
147 |
+
taxonomy_edit_box.find('.wpuxss-eml-edit_item').val(wpuxss_eml_i18n_data.edit+' '+$(this).val());
|
148 |
+
|
149 |
+
if( taxonomy_edit_box.find('.wpuxss-eml-view_item').val() == '' )
|
150 |
+
taxonomy_edit_box.find('.wpuxss-eml-view_item').val(wpuxss_eml_i18n_data.view+' '+$(this).val());
|
151 |
+
|
152 |
+
if( taxonomy_edit_box.find('.wpuxss-eml-update_item').val() == '' )
|
153 |
+
taxonomy_edit_box.find('.wpuxss-eml-update_item').val(wpuxss_eml_i18n_data.update+' '+$(this).val());
|
154 |
+
|
155 |
+
if( taxonomy_edit_box.find('.wpuxss-eml-add_new_item').val() == '' )
|
156 |
+
taxonomy_edit_box.find('.wpuxss-eml-add_new_item').val(wpuxss_eml_i18n_data.add_new+' '+$(this).val());
|
157 |
+
|
158 |
+
if( taxonomy_edit_box.find('.wpuxss-eml-new_item_name').val() == '' )
|
159 |
+
taxonomy_edit_box.find('.wpuxss-eml-new_item_name').val(wpuxss_eml_i18n_data.new+' '+$(this).val()+' '+wpuxss_eml_i18n_data.name);
|
160 |
+
|
161 |
+
if( taxonomy_edit_box.find('.wpuxss-eml-parent_item').val() == '' )
|
162 |
+
taxonomy_edit_box.find('.wpuxss-eml-parent_item').val(wpuxss_eml_i18n_data.parent+' '+$(this).val());
|
163 |
+
|
164 |
+
taxonomy_edit_box.find('.wpuxss-eml-hierarchical').attr('name','wpuxss_eml_taxonomies['+taxonomy_name+'][hierarchical]');
|
165 |
+
taxonomy_edit_box.find('.wpuxss-eml-public').attr('name','wpuxss_eml_taxonomies['+taxonomy_name+'][public]');
|
166 |
+
taxonomy_edit_box.find('.wpuxss-eml-show_admin_column').attr('name','wpuxss_eml_taxonomies['+taxonomy_name+'][show_admin_column]');
|
167 |
+
taxonomy_edit_box.find('.wpuxss-eml-show_in_nav_menus').attr('name','wpuxss_eml_taxonomies['+taxonomy_name+'][show_in_nav_menus]');
|
168 |
+
taxonomy_edit_box.find('.wpuxss-eml-sort').attr('name','wpuxss_eml_taxonomies['+taxonomy_name+'][sort]');
|
169 |
+
taxonomy_edit_box.find('.wpuxss-eml-slug').attr('name','wpuxss_eml_taxonomies['+taxonomy_name+'][rewrite][slug]').val(taxonomy_name);
|
170 |
+
|
171 |
+
taxonomy_edit_box.find('.wpuxss-eml-admin_filter').attr('name','wpuxss_eml_taxonomies['+taxonomy_name+'][admin_filter]');
|
172 |
+
taxonomy_edit_box.find('.wpuxss-eml-media_uploader_filter').attr('name','wpuxss_eml_taxonomies['+taxonomy_name+'][media_uploader_filter]');
|
173 |
+
|
174 |
+
$(this).closest('.wpuxss-eml-clone-taxonomy').find('.wpuxss-eml-assigned').attr('name','wpuxss_eml_taxonomies['+taxonomy_name+'][assigned]');
|
175 |
+
$(this).closest('.wpuxss-eml-clone-taxonomy').find('.wpuxss-eml-eml_media').attr('name','wpuxss_eml_taxonomies['+taxonomy_name+'][eml_media]');
|
176 |
+
}
|
177 |
+
else
|
178 |
+
{
|
179 |
+
$(this).val('');
|
180 |
+
taxonomy_edit_box.find('.wpuxss-eml-edit_item').val('');
|
181 |
+
taxonomy_edit_box.find('.wpuxss-eml-view_item').val('');
|
182 |
+
taxonomy_edit_box.find('.wpuxss-eml-update_item').val('');
|
183 |
+
taxonomy_edit_box.find('.wpuxss-eml-add_new_item').val('');
|
184 |
+
taxonomy_edit_box.find('.wpuxss-eml-new_item_name').val('');
|
185 |
+
taxonomy_edit_box.find('.wpuxss-eml-parent_item').val('');
|
186 |
+
taxonomy_edit_box.find('.wpuxss-eml-slug').val('');
|
187 |
+
}
|
188 |
+
});
|
189 |
+
|
190 |
+
// on change of a plural taxonomy name during creation
|
191 |
+
$(document).on('blur', '.wpuxss-eml-clone-taxonomy .wpuxss-eml-name', function()
|
192 |
+
{
|
193 |
+
var taxonomy_plural_name = $(this).val();
|
194 |
+
taxonomy_edit_box = $(this).parents('.wpuxss-eml-taxonomy-edit');
|
195 |
+
|
196 |
+
taxonomy_plural_name = taxonomy_plural_name.replace(/(<([^>]+)>)/g,'');
|
197 |
+
|
198 |
+
if ( taxonomy_plural_name != '' )
|
199 |
+
{
|
200 |
+
if( taxonomy_edit_box.find('.wpuxss-eml-menu_name').val() == '' )
|
201 |
+
taxonomy_edit_box.find('.wpuxss-eml-menu_name').val($(this).val());
|
202 |
+
|
203 |
+
if( taxonomy_edit_box.find('.wpuxss-eml-all_items').val() == '' )
|
204 |
+
taxonomy_edit_box.find('.wpuxss-eml-all_items').val(wpuxss_eml_i18n_data.all+' '+$(this).val());
|
205 |
+
|
206 |
+
if( taxonomy_edit_box.find('.wpuxss-eml-search_items').val() == '' )
|
207 |
+
taxonomy_edit_box.find('.wpuxss-eml-search_items').val(wpuxss_eml_i18n_data.search+' '+$(this).val());
|
208 |
+
|
209 |
+
$(this).closest('.wpuxss-eml-clone-taxonomy').find('.wpuxss-eml-taxonomy-label').text($(this).val());
|
210 |
+
}
|
211 |
+
else
|
212 |
+
{
|
213 |
+
$(this).val('');
|
214 |
+
taxonomy_edit_box.find('.wpuxss-eml-menu_name').val('');
|
215 |
+
taxonomy_edit_box.find('.wpuxss-eml-all_items').val('');
|
216 |
+
taxonomy_edit_box.find('.wpuxss-eml-search_items').val('');
|
217 |
+
$(this).closest('.wpuxss-eml-clone-taxonomy').find('.wpuxss-eml-taxonomy-label').text(wpuxss_eml_i18n_data.tax_new);
|
218 |
+
}
|
219 |
+
});
|
220 |
+
|
221 |
+
// on taxonomy form submit
|
222 |
+
$('#wpuxss-eml-form-taxonomies').submit(function( event )
|
223 |
+
{
|
224 |
+
submit_it = true;
|
225 |
+
alert_text = '';
|
226 |
+
|
227 |
+
$('.wpuxss-eml-clone-taxonomy, .wpuxss-eml-taxonomy').each(function( index )
|
228 |
+
{
|
229 |
+
current_taxonomy = $(this).attr('id');
|
230 |
+
|
231 |
+
if ( !$('.wpuxss-eml-singular_name',this).val() && !$('.wpuxss-eml-name',this).val() )
|
232 |
+
{
|
233 |
+
submit_it = false;
|
234 |
+
alert_text = wpuxss_eml_i18n_data.tax_error_empty_both;
|
235 |
+
}
|
236 |
+
else if ( !$('.wpuxss-eml-singular_name',this).val() )
|
237 |
+
{
|
238 |
+
submit_it = false;
|
239 |
+
alert_text = wpuxss_eml_i18n_data.tax_error_empty_singular;
|
240 |
+
}
|
241 |
+
else if ( !$('.wpuxss-eml-name',this).val() )
|
242 |
+
{
|
243 |
+
submit_it = false;
|
244 |
+
alert_text = wpuxss_eml_i18n_data.tax_error_empty_plural;
|
245 |
+
}
|
246 |
+
else if ( $('.wpuxss-eml-clone-taxonomy[id='+current_taxonomy+'], .wpuxss-eml-taxonomy[id='+current_taxonomy+'], .wpuxss-non-eml-taxonomy[id='+current_taxonomy+']').length > 1 )
|
247 |
+
{
|
248 |
+
submit_it = false;
|
249 |
+
alert_text = wpuxss_eml_i18n_data.tax_error_duplicate;
|
250 |
+
}
|
251 |
+
});
|
252 |
+
|
253 |
+
if ( !submit_it ) alert(alert_text);
|
254 |
+
|
255 |
+
return submit_it;
|
256 |
+
});
|
257 |
+
|
258 |
+
|
259 |
+
|
260 |
+
// create new mime type
|
261 |
+
$(document).on('click', '.wpuxss-eml-button-create-mime', function()
|
262 |
+
{
|
263 |
+
$('.wpuxss-eml-mime-type-list').find('.wpuxss-eml-clone').clone().attr('class','wpuxss-eml-clone-mime').prependTo('.wpuxss-eml-mime-type-list tbody').show(300);
|
264 |
+
|
265 |
+
return false;
|
266 |
+
});
|
267 |
+
|
268 |
+
// remove mime type
|
269 |
+
$(document).on('click', 'tr .wpuxss-eml-button-remove', function()
|
270 |
+
{
|
271 |
+
$(this).closest('tr').hide( 300, function() {
|
272 |
+
$(this).remove();
|
273 |
+
});
|
274 |
+
|
275 |
+
return false;
|
276 |
+
});
|
277 |
+
|
278 |
+
// on change of an extension during creation
|
279 |
+
$(document).on('blur', '.wpuxss-eml-clone-mime .wpuxss-eml-type', function()
|
280 |
+
{
|
281 |
+
var extension = $(this).val().toLowerCase(),
|
282 |
+
mime_type_tr = $(this).closest('tr');
|
283 |
+
|
284 |
+
$(this).val(extension);
|
285 |
+
|
286 |
+
mime_type_tr.find('.wpuxss-eml-mime').attr('name','wpuxss_eml_mimes['+extension+'][mime]');
|
287 |
+
mime_type_tr.find('.wpuxss-eml-singular').attr('name','wpuxss_eml_mimes['+extension+'][singular]');
|
288 |
+
mime_type_tr.find('.wpuxss-eml-plural').attr('name','wpuxss_eml_mimes['+extension+'][plural]');
|
289 |
+
mime_type_tr.find('.wpuxss-eml-filter').attr('name','wpuxss_eml_mimes['+extension+'][filter]');
|
290 |
+
mime_type_tr.find('.wpuxss-eml-upload').attr('name','wpuxss_eml_mimes['+extension+'][upload]');
|
291 |
+
});
|
292 |
+
|
293 |
+
|
294 |
+
// on change of a mime type during creation
|
295 |
+
$(document).on('blur', '.wpuxss-eml-clone-mime .wpuxss-eml-mime', function()
|
296 |
+
{
|
297 |
+
var mime_type = $(this).val().toLowerCase(),
|
298 |
+
mime_type_tr = $(this).closest('tr');
|
299 |
+
|
300 |
+
$(this).val(mime_type);
|
301 |
+
});
|
302 |
+
|
303 |
+
// mime types restoration warning
|
304 |
+
$(document).on('click', '#wpuxss_eml_restore_mimes_backup', function()
|
305 |
+
{
|
306 |
+
if ( confirm(wpuxss_eml_i18n_data.mime_deletion_confirm) )
|
307 |
+
{
|
308 |
+
return true;
|
309 |
+
}
|
310 |
+
|
311 |
+
return false;
|
312 |
+
});
|
313 |
+
|
314 |
+
// on mime types form submit
|
315 |
+
$('#wpuxss-eml-form-mimetypes').submit(function( event )
|
316 |
+
{
|
317 |
+
submit_it = true;
|
318 |
+
alert_text = '';
|
319 |
+
|
320 |
+
$('.wpuxss-eml-clone-mime').each(function( index )
|
321 |
+
{
|
322 |
+
if ( !$('.wpuxss-eml-type',this).val() || $('.wpuxss-eml-type',this).val() == '' || !$('.wpuxss-eml-mime',this).val() || $('.wpuxss-eml-mime',this).val() == '' )
|
323 |
+
{
|
324 |
+
submit_it = false;
|
325 |
+
alert_text = wpuxss_eml_i18n_data.mime_error_empty_fields;
|
326 |
+
}
|
327 |
+
else if ( $('[id="'+$('.wpuxss-eml-type',this).val()+'"]').length > 0 || $('.wpuxss-eml-mime[value="'+$('.wpuxss-eml-mime',this).val()+'"]').length > 0 )
|
328 |
+
{
|
329 |
+
submit_it = false;
|
330 |
+
alert_text = wpuxss_eml_i18n_data.mime_error_duplicate;
|
331 |
+
}
|
332 |
+
|
333 |
+
if ( !$('.wpuxss-eml-singular',this).val() || $('.wpuxss-eml-singular',this).val() == '' || !$('.wpuxss-eml-plural',this).val() || $('.wpuxss-eml-plural',this).val() == '' )
|
334 |
+
{
|
335 |
+
$('.wpuxss-eml-singular',this).val($('.wpuxss-eml-mime',this).val());
|
336 |
+
$('.wpuxss-eml-plural',this).val($('.wpuxss-eml-mime',this).val());
|
337 |
+
}
|
338 |
+
});
|
339 |
+
|
340 |
+
if ( !submit_it && alert_text != '' ) alert(alert_text);
|
341 |
+
|
342 |
+
return submit_it;
|
343 |
+
});
|
344 |
+
|
345 |
})( jQuery );
|
languages/eml-nl_NL.mo
ADDED
Binary file
|
languages/eml-nl_NL.po
ADDED
@@ -0,0 +1,329 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: Enhanced Media Library v1.0.4\n"
|
4 |
+
"Report-Msgid-Bugs-To: http://wordpress.org/tag/enhanced-media-library\n"
|
5 |
+
"POT-Creation-Date: 2014-09-04 18:35:44+00:00\n"
|
6 |
+
"PO-Revision-Date: 2014-09-11 14:35+0200\n"
|
7 |
+
"Last-Translator: WordPress UX Solutions <wordpressuxsolutions@gmail.com>\n"
|
8 |
+
"Language-Team: De B.A.A.T. <de_baat@de-baat.nl>\n"
|
9 |
+
"Language: nl_NL\n"
|
10 |
+
"MIME-Version: 1.0\n"
|
11 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
+
"Content-Transfer-Encoding: 8bit\n"
|
13 |
+
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
14 |
+
"X-Generator: Poedit 1.6.9\n"
|
15 |
+
"X-Poedit-SourceCharset: utf-8\n"
|
16 |
+
"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;"
|
17 |
+
"_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n"
|
18 |
+
"X-Poedit-Basepath: ../\n"
|
19 |
+
"X-Textdomain-Support: yes\n"
|
20 |
+
"X-Poedit-SearchPath-0: .\n"
|
21 |
+
|
22 |
+
# @ eml
|
23 |
+
#: core/options-pages.php:15
|
24 |
+
msgid "Enhanced Media Library Options"
|
25 |
+
msgstr "Enhanced Media Library Opties"
|
26 |
+
|
27 |
+
# @ eml
|
28 |
+
#: core/options-pages.php:16
|
29 |
+
msgid "Media Settings"
|
30 |
+
msgstr "Media Instellingen"
|
31 |
+
|
32 |
+
# @ eml
|
33 |
+
#: core/options-pages.php:24 core/options-pages.php:25
|
34 |
+
#: core/options-pages.php:119
|
35 |
+
msgid "Taxonomies"
|
36 |
+
msgstr "Taxonomies"
|
37 |
+
|
38 |
+
# @ eml
|
39 |
+
#: core/options-pages.php:32 core/options-pages.php:33
|
40 |
+
#: core/options-pages.php:388
|
41 |
+
msgid "MIME Types"
|
42 |
+
msgstr "MIME Types"
|
43 |
+
|
44 |
+
# @ eml
|
45 |
+
#: core/options-pages.php:67 core/options-pages.php:161
|
46 |
+
#: core/options-pages.php:175 core/options-pages.php:239
|
47 |
+
#: core/options-pages.php:312
|
48 |
+
msgid "Edit"
|
49 |
+
msgstr "Bewerk"
|
50 |
+
|
51 |
+
# @ eml
|
52 |
+
#: core/options-pages.php:68
|
53 |
+
msgid "Close"
|
54 |
+
msgstr "Sluit"
|
55 |
+
|
56 |
+
# @ eml
|
57 |
+
#: core/options-pages.php:69 core/options-pages.php:176
|
58 |
+
#: core/options-pages.php:240
|
59 |
+
msgid "View"
|
60 |
+
msgstr "Bekijk"
|
61 |
+
|
62 |
+
# @ eml
|
63 |
+
#: core/options-pages.php:70 core/options-pages.php:177
|
64 |
+
#: core/options-pages.php:241
|
65 |
+
msgid "Update"
|
66 |
+
msgstr "Werk bij"
|
67 |
+
|
68 |
+
# @ eml
|
69 |
+
#: core/options-pages.php:71 core/options-pages.php:178
|
70 |
+
#: core/options-pages.php:242
|
71 |
+
msgid "Add New"
|
72 |
+
msgstr "Voeg Nieuw Toe"
|
73 |
+
|
74 |
+
# @ eml
|
75 |
+
#: core/options-pages.php:72 core/options-pages.php:179
|
76 |
+
#: core/options-pages.php:243
|
77 |
+
msgid "New"
|
78 |
+
msgstr "Nieuw"
|
79 |
+
|
80 |
+
# @ eml
|
81 |
+
#: core/options-pages.php:73
|
82 |
+
msgid "Name"
|
83 |
+
msgstr "Naam"
|
84 |
+
|
85 |
+
# @ eml
|
86 |
+
#: core/options-pages.php:74 core/options-pages.php:180
|
87 |
+
#: core/options-pages.php:244
|
88 |
+
msgid "Parent"
|
89 |
+
msgstr "Parent"
|
90 |
+
|
91 |
+
# @ eml
|
92 |
+
#: core/options-pages.php:75 core/options-pages.php:174
|
93 |
+
#: core/options-pages.php:238
|
94 |
+
msgid "All"
|
95 |
+
msgstr "Allemaal"
|
96 |
+
|
97 |
+
# @ eml
|
98 |
+
#: core/options-pages.php:76 core/options-pages.php:181
|
99 |
+
#: core/options-pages.php:245
|
100 |
+
msgid "Search"
|
101 |
+
msgstr "Zoek"
|
102 |
+
|
103 |
+
# @ eml
|
104 |
+
#: core/options-pages.php:78
|
105 |
+
msgid ""
|
106 |
+
"Taxonomy will be deleted permanently! Your media files will remain intacted, "
|
107 |
+
"but all the connections with this taxonomy and its terms will be lost."
|
108 |
+
msgstr ""
|
109 |
+
"Taxonomy wordt voorgoed verwijderd! Je media bestanden blijven bestaan, maar "
|
110 |
+
"alle connecties met deze taxonomy en de termen zullen verdwenen zijn."
|
111 |
+
|
112 |
+
# @ eml
|
113 |
+
#: core/options-pages.php:79
|
114 |
+
msgid "There is already a taxonomy with the same name. Please chose other one."
|
115 |
+
msgstr "Er is al een taxonomy met deze naam. Kies aub een andere."
|
116 |
+
|
117 |
+
# @ eml
|
118 |
+
#: core/options-pages.php:80 core/options-pages.php:226
|
119 |
+
msgid "New Taxonomy"
|
120 |
+
msgstr "Nieuwe Taxonomy"
|
121 |
+
|
122 |
+
# @ eml
|
123 |
+
#: core/options-pages.php:81
|
124 |
+
msgid "Please choose Singular and Plural names for all your new taxomonies."
|
125 |
+
msgstr ""
|
126 |
+
"Kies aub Enkelvoudige en Meervoudige namen voor al je nieuwe taxonomies."
|
127 |
+
|
128 |
+
# @ eml
|
129 |
+
#: core/options-pages.php:82
|
130 |
+
msgid "Please choose Singilar name for all your new taxomonies."
|
131 |
+
msgstr "Kies aub Enkelvoudige naam voor al je nieuwe taxonomies."
|
132 |
+
|
133 |
+
# @ eml
|
134 |
+
#: core/options-pages.php:83
|
135 |
+
msgid "Please choose Plural Name for all your new taxomonies."
|
136 |
+
msgstr "Kies aub Meervoudige naam voor al je nieuwe taxonomies."
|
137 |
+
|
138 |
+
# @ eml
|
139 |
+
#: core/options-pages.php:85
|
140 |
+
msgid "Warning! All your custom MIME Types will be deleted by this operation."
|
141 |
+
msgstr ""
|
142 |
+
"Waarschuwing! Al je persoonlijke MIME Types zullen door deze operatie "
|
143 |
+
"verwijderd worden."
|
144 |
+
|
145 |
+
# @ eml
|
146 |
+
#: core/options-pages.php:86
|
147 |
+
msgid "Please fill into all fields."
|
148 |
+
msgstr "Vul aub alle velden in."
|
149 |
+
|
150 |
+
# @ eml
|
151 |
+
#: core/options-pages.php:87
|
152 |
+
msgid "Duplicate extensions or MIME types. Please chose other one."
|
153 |
+
msgstr "Dubbele extensies of MIME types. Kies aub een andere."
|
154 |
+
|
155 |
+
# @ eml
|
156 |
+
#: core/options-pages.php:111 core/options-pages.php:379
|
157 |
+
msgid "You do not have sufficient permissions to access this page."
|
158 |
+
msgstr "U hebt onvoldoende toegangsrechten voor deze pagina."
|
159 |
+
|
160 |
+
# @ eml
|
161 |
+
#: core/options-pages.php:135
|
162 |
+
msgid "Media Taxonomies"
|
163 |
+
msgstr "Media Taxonomies"
|
164 |
+
|
165 |
+
# @ eml
|
166 |
+
#: core/options-pages.php:139 core/options-pages.php:288
|
167 |
+
msgid "Assign following taxonomies to Media Library:"
|
168 |
+
msgstr "Ken de volgende taxonomies toe aan de Media Library:"
|
169 |
+
|
170 |
+
# @ eml
|
171 |
+
#: core/options-pages.php:158 core/options-pages.php:224
|
172 |
+
#: core/options-pages.php:305
|
173 |
+
msgid "Assign Taxonomy"
|
174 |
+
msgstr "Toekennen Taxonomie"
|
175 |
+
|
176 |
+
# @ eml
|
177 |
+
#: core/options-pages.php:161 core/options-pages.php:312
|
178 |
+
msgid "Edit Taxonomy"
|
179 |
+
msgstr "Bewerk Taxonomie"
|
180 |
+
|
181 |
+
# @ eml
|
182 |
+
#: core/options-pages.php:164 core/options-pages.php:228
|
183 |
+
msgid "Delete Taxonomy"
|
184 |
+
msgstr "Verwijder Taxonomie"
|
185 |
+
|
186 |
+
# @ eml
|
187 |
+
#: core/options-pages.php:169 core/options-pages.php:233
|
188 |
+
msgid "Labels"
|
189 |
+
msgstr "Labels"
|
190 |
+
|
191 |
+
# @ eml
|
192 |
+
#: core/options-pages.php:171 core/options-pages.php:235
|
193 |
+
msgid "Singular"
|
194 |
+
msgstr "Enkelvoud"
|
195 |
+
|
196 |
+
# @ eml
|
197 |
+
#: core/options-pages.php:172 core/options-pages.php:236
|
198 |
+
msgid "Plural"
|
199 |
+
msgstr "Meervoud"
|
200 |
+
|
201 |
+
# @ eml
|
202 |
+
#: core/options-pages.php:173 core/options-pages.php:237
|
203 |
+
msgid "Menu Name"
|
204 |
+
msgstr "Menu Naam"
|
205 |
+
|
206 |
+
# @ eml
|
207 |
+
#: core/options-pages.php:186 core/options-pages.php:205
|
208 |
+
#: core/options-pages.php:250 core/options-pages.php:315
|
209 |
+
msgid "Settings"
|
210 |
+
msgstr "Instellingen"
|
211 |
+
|
212 |
+
# @ eml
|
213 |
+
#: core/options-pages.php:188 core/options-pages.php:252
|
214 |
+
msgid "Hierarchical"
|
215 |
+
msgstr "Hiërarchisch"
|
216 |
+
|
217 |
+
# @ eml
|
218 |
+
#: core/options-pages.php:189 core/options-pages.php:253
|
219 |
+
msgid "Column in Media Library"
|
220 |
+
msgstr "Kolom in Media Library"
|
221 |
+
|
222 |
+
# @ eml
|
223 |
+
#: core/options-pages.php:190 core/options-pages.php:207
|
224 |
+
#: core/options-pages.php:254 core/options-pages.php:317
|
225 |
+
msgid "Filter in Media Library"
|
226 |
+
msgstr "Filter in Media Library"
|
227 |
+
|
228 |
+
# @ eml
|
229 |
+
#: core/options-pages.php:191 core/options-pages.php:208
|
230 |
+
#: core/options-pages.php:255 core/options-pages.php:318
|
231 |
+
#, fuzzy
|
232 |
+
msgid "Filter in Media Popup / Grid View"
|
233 |
+
msgstr "Filter in Media Uploader"
|
234 |
+
|
235 |
+
# @ eml
|
236 |
+
#: core/options-pages.php:192 core/options-pages.php:256
|
237 |
+
msgid "Show in Nav Menu"
|
238 |
+
msgstr "Toon in Nav Menu"
|
239 |
+
|
240 |
+
# @ eml
|
241 |
+
#: core/options-pages.php:193 core/options-pages.php:257
|
242 |
+
msgid "Remember terms order (sort)"
|
243 |
+
msgstr "Onthoudt termen volgorde (sorteer)"
|
244 |
+
|
245 |
+
# @ eml
|
246 |
+
#: core/options-pages.php:194 core/options-pages.php:258
|
247 |
+
msgid "Slug"
|
248 |
+
msgstr "Slug"
|
249 |
+
|
250 |
+
# @ eml
|
251 |
+
#: core/options-pages.php:271
|
252 |
+
msgid "Add New Taxonomy"
|
253 |
+
msgstr "Voeg Nieuwe Taxonomie Toe"
|
254 |
+
|
255 |
+
# @ eml
|
256 |
+
#: core/options-pages.php:284
|
257 |
+
msgid "Non-Media Taxonomies"
|
258 |
+
msgstr "Niet-Media Taxonomies"
|
259 |
+
|
260 |
+
# @ eml
|
261 |
+
#: core/options-pages.php:389
|
262 |
+
msgid "Add New MIME Type"
|
263 |
+
msgstr "Voeg Nieuw MIME Type Toe"
|
264 |
+
|
265 |
+
# @ eml
|
266 |
+
#: core/options-pages.php:407 core/options-pages.php:464
|
267 |
+
msgid "Extension"
|
268 |
+
msgstr "Extensie"
|
269 |
+
|
270 |
+
# @ eml
|
271 |
+
#: core/options-pages.php:408 core/options-pages.php:465
|
272 |
+
msgid "MIME Type"
|
273 |
+
msgstr "MIME Type"
|
274 |
+
|
275 |
+
# @ eml
|
276 |
+
#: core/options-pages.php:409 core/options-pages.php:466
|
277 |
+
msgid "Singular Label"
|
278 |
+
msgstr "Enkelvoud Label"
|
279 |
+
|
280 |
+
# @ eml
|
281 |
+
#: core/options-pages.php:410 core/options-pages.php:467
|
282 |
+
msgid "Plural Label"
|
283 |
+
msgstr "Meervoud Label"
|
284 |
+
|
285 |
+
# @ eml
|
286 |
+
#: core/options-pages.php:411 core/options-pages.php:441
|
287 |
+
#: core/options-pages.php:456 core/options-pages.php:468
|
288 |
+
msgid "Add Filter"
|
289 |
+
msgstr "Voeg Filter Toe"
|
290 |
+
|
291 |
+
# @ eml
|
292 |
+
#: core/options-pages.php:412 core/options-pages.php:442
|
293 |
+
#: core/options-pages.php:457 core/options-pages.php:469
|
294 |
+
msgid "Allow Upload"
|
295 |
+
msgstr "Sta Upload Toe"
|
296 |
+
|
297 |
+
# @ eml
|
298 |
+
#: core/options-pages.php:458
|
299 |
+
msgid "Delete MIME Type"
|
300 |
+
msgstr "Verwijder MIME Type"
|
301 |
+
|
302 |
+
# @ eml
|
303 |
+
#: core/options-pages.php:475
|
304 |
+
msgid "Restore default MIME Types"
|
305 |
+
msgstr "Herstel default MIME Types"
|
306 |
+
|
307 |
+
# @ eml
|
308 |
+
#. Plugin Name of the plugin/theme
|
309 |
+
msgid "Enhanced Media Library"
|
310 |
+
msgstr "Enhanced Media Library"
|
311 |
+
|
312 |
+
# @ eml
|
313 |
+
#. Description of the plugin/theme
|
314 |
+
msgid ""
|
315 |
+
"This plugin will be handy for those who need to manage a lot of media files."
|
316 |
+
msgstr ""
|
317 |
+
"Deze plug-in is handig voor iedereen die veel media bestanden moet beheren."
|
318 |
+
|
319 |
+
# @ eml
|
320 |
+
#~ msgid "http://wordpressuxsolutions.com"
|
321 |
+
#~ msgstr "http://wordpressuxsolutions.com"
|
322 |
+
|
323 |
+
# @ eml
|
324 |
+
#~ msgid "WordPress UX Solutions"
|
325 |
+
#~ msgstr "WordPress UX Solutions"
|
326 |
+
|
327 |
+
# @ eml
|
328 |
+
#~ msgid "1.0.4"
|
329 |
+
#~ msgstr "1.0.4"
|
languages/eml-pl_PL.mo
ADDED
Binary file
|
languages/eml-pl_PL.po
ADDED
@@ -0,0 +1,264 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (C) 2014 Enhanced Media Library
|
2 |
+
# This file is distributed under the same license as the Enhanced Media Library package.
|
3 |
+
msgid ""
|
4 |
+
msgstr ""
|
5 |
+
"Project-Id-Version: Enhanced Media Library 1.1.2\n"
|
6 |
+
"Report-Msgid-Bugs-To: http://wordpress.org/tag/enhanced-media-library\n"
|
7 |
+
"POT-Creation-Date: 2014-09-04 18:35:44+00:00\n"
|
8 |
+
"MIME-Version: 1.0\n"
|
9 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
+
"Content-Transfer-Encoding: 8bit\n"
|
11 |
+
"PO-Revision-Date: 2014-09-10 19:55+0100\n"
|
12 |
+
"Last-Translator: postermania.eu <justfake@icloud.com>\n"
|
13 |
+
"Language-Team: Paweł Krużel <pawel.kruzel@gmail.com>\n"
|
14 |
+
"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
|
15 |
+
"|| n%100>=20) ? 1 : 2);\n"
|
16 |
+
"Language: pl_PL\n"
|
17 |
+
"X-Generator: Poedit 1.6.7\n"
|
18 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
19 |
+
|
20 |
+
#: core/options-pages.php:15
|
21 |
+
msgid "Enhanced Media Library Options"
|
22 |
+
msgstr "Rozszerzona Biblioteka Mediów - Opcje"
|
23 |
+
|
24 |
+
#: core/options-pages.php:16
|
25 |
+
msgid "Media Settings"
|
26 |
+
msgstr "Ustawienia Mediów"
|
27 |
+
|
28 |
+
#: core/options-pages.php:24 core/options-pages.php:25
|
29 |
+
#: core/options-pages.php:119
|
30 |
+
msgid "Taxonomies"
|
31 |
+
msgstr "Taksonomie"
|
32 |
+
|
33 |
+
#: core/options-pages.php:32 core/options-pages.php:33
|
34 |
+
#: core/options-pages.php:388
|
35 |
+
msgid "MIME Types"
|
36 |
+
msgstr "Typy MIME"
|
37 |
+
|
38 |
+
#: core/options-pages.php:67 core/options-pages.php:161
|
39 |
+
#: core/options-pages.php:175 core/options-pages.php:239
|
40 |
+
#: core/options-pages.php:312
|
41 |
+
msgid "Edit"
|
42 |
+
msgstr "Edytuj"
|
43 |
+
|
44 |
+
#: core/options-pages.php:68
|
45 |
+
msgid "Close"
|
46 |
+
msgstr "Zamknij"
|
47 |
+
|
48 |
+
#: core/options-pages.php:69 core/options-pages.php:176
|
49 |
+
#: core/options-pages.php:240
|
50 |
+
msgid "View"
|
51 |
+
msgstr "Zobacz"
|
52 |
+
|
53 |
+
#: core/options-pages.php:70 core/options-pages.php:177
|
54 |
+
#: core/options-pages.php:241
|
55 |
+
msgid "Update"
|
56 |
+
msgstr "Aktualizuj"
|
57 |
+
|
58 |
+
#: core/options-pages.php:71 core/options-pages.php:178
|
59 |
+
#: core/options-pages.php:242
|
60 |
+
msgid "Add New"
|
61 |
+
msgstr "Dodaj nowy"
|
62 |
+
|
63 |
+
#: core/options-pages.php:72 core/options-pages.php:179
|
64 |
+
#: core/options-pages.php:243
|
65 |
+
msgid "New"
|
66 |
+
msgstr "Nowy"
|
67 |
+
|
68 |
+
#: core/options-pages.php:73
|
69 |
+
msgid "Name"
|
70 |
+
msgstr "Nazwa"
|
71 |
+
|
72 |
+
#: core/options-pages.php:74 core/options-pages.php:180
|
73 |
+
#: core/options-pages.php:244
|
74 |
+
msgid "Parent"
|
75 |
+
msgstr "Rodzic"
|
76 |
+
|
77 |
+
#: core/options-pages.php:75 core/options-pages.php:174
|
78 |
+
#: core/options-pages.php:238
|
79 |
+
msgid "All"
|
80 |
+
msgstr "Wszystkie"
|
81 |
+
|
82 |
+
#: core/options-pages.php:76 core/options-pages.php:181
|
83 |
+
#: core/options-pages.php:245
|
84 |
+
msgid "Search"
|
85 |
+
msgstr "Szukaj"
|
86 |
+
|
87 |
+
#: core/options-pages.php:78
|
88 |
+
msgid ""
|
89 |
+
"Taxonomy will be deleted permanently! Your media files will remain intacted, "
|
90 |
+
"but all the connections with this taxonomy and its terms will be lost."
|
91 |
+
msgstr ""
|
92 |
+
"Taksonomia zostanie trwale usunięta. Pliki mediów pozostaną nietknięte, ale "
|
93 |
+
"wszystkie ich połączenia z tą taksonomią i warunki zostaną utracone."
|
94 |
+
|
95 |
+
#: core/options-pages.php:79
|
96 |
+
msgid "There is already a taxonomy with the same name. Please chose other one."
|
97 |
+
msgstr "Istnieje już taksonomia o takiej nazwie. Wybierz inną nazwę."
|
98 |
+
|
99 |
+
#: core/options-pages.php:80 core/options-pages.php:226
|
100 |
+
msgid "New Taxonomy"
|
101 |
+
msgstr "Nowa taksonomia"
|
102 |
+
|
103 |
+
#: core/options-pages.php:81
|
104 |
+
msgid "Please choose Singular and Plural names for all your new taxomonies."
|
105 |
+
msgstr ""
|
106 |
+
"Proszę wybrać nazwy w liczbie pojedynczej oraz mnogiej dla nowej taksonomii"
|
107 |
+
|
108 |
+
#: core/options-pages.php:82
|
109 |
+
msgid "Please choose Singilar name for all your new taxomonies."
|
110 |
+
msgstr "Proszę wybrać nazwę w liczbie pojedynczej dla nowej taksonomii"
|
111 |
+
|
112 |
+
#: core/options-pages.php:83
|
113 |
+
msgid "Please choose Plural Name for all your new taxomonies."
|
114 |
+
msgstr "Prosze wybrać nazwę w liczbie mnogiej dla nowej taksonomii"
|
115 |
+
|
116 |
+
#: core/options-pages.php:85
|
117 |
+
msgid "Warning! All your custom MIME Types will be deleted by this operation."
|
118 |
+
msgstr ""
|
119 |
+
"Ostrzeżenie! Wszystkie niestandardowe typy MIME będą usunięte przez tę "
|
120 |
+
"operację. "
|
121 |
+
|
122 |
+
#: core/options-pages.php:86
|
123 |
+
msgid "Please fill into all fields."
|
124 |
+
msgstr "Proszę wypełnić wszystkie pola"
|
125 |
+
|
126 |
+
#: core/options-pages.php:87
|
127 |
+
msgid "Duplicate extensions or MIME types. Please chose other one."
|
128 |
+
msgstr ""
|
129 |
+
"Duplikat rozszerzeń lub typów MIME. Proszę wybrać inny typ lub rozszerzenie "
|
130 |
+
"pliku"
|
131 |
+
|
132 |
+
#: core/options-pages.php:111 core/options-pages.php:379
|
133 |
+
msgid "You do not have sufficient permissions to access this page."
|
134 |
+
msgstr "Nie masz wystarczających uprawnień dostępu do tej strony."
|
135 |
+
|
136 |
+
#: core/options-pages.php:135
|
137 |
+
msgid "Media Taxonomies"
|
138 |
+
msgstr "Taksonomie mediów"
|
139 |
+
|
140 |
+
#: core/options-pages.php:139 core/options-pages.php:288
|
141 |
+
msgid "Assign following taxonomies to Media Library:"
|
142 |
+
msgstr "Przypisz następujące taksonomie do biblioteki mediów:"
|
143 |
+
|
144 |
+
#: core/options-pages.php:158 core/options-pages.php:224
|
145 |
+
#: core/options-pages.php:305
|
146 |
+
msgid "Assign Taxonomy"
|
147 |
+
msgstr "Przypisz taksonomię"
|
148 |
+
|
149 |
+
#: core/options-pages.php:161 core/options-pages.php:312
|
150 |
+
msgid "Edit Taxonomy"
|
151 |
+
msgstr "Edytuj taksonomię"
|
152 |
+
|
153 |
+
#: core/options-pages.php:164 core/options-pages.php:228
|
154 |
+
msgid "Delete Taxonomy"
|
155 |
+
msgstr "Usuń taksonomię"
|
156 |
+
|
157 |
+
#: core/options-pages.php:169 core/options-pages.php:233
|
158 |
+
msgid "Labels"
|
159 |
+
msgstr "Etykiety"
|
160 |
+
|
161 |
+
#: core/options-pages.php:171 core/options-pages.php:235
|
162 |
+
msgid "Singular"
|
163 |
+
msgstr "Liczba pojedyncza"
|
164 |
+
|
165 |
+
#: core/options-pages.php:172 core/options-pages.php:236
|
166 |
+
msgid "Plural"
|
167 |
+
msgstr "Liczba mnoga"
|
168 |
+
|
169 |
+
#: core/options-pages.php:173 core/options-pages.php:237
|
170 |
+
msgid "Menu Name"
|
171 |
+
msgstr "Nazwa w menu"
|
172 |
+
|
173 |
+
#: core/options-pages.php:186 core/options-pages.php:205
|
174 |
+
#: core/options-pages.php:250 core/options-pages.php:315
|
175 |
+
msgid "Settings"
|
176 |
+
msgstr "Ustawienia"
|
177 |
+
|
178 |
+
#: core/options-pages.php:188 core/options-pages.php:252
|
179 |
+
msgid "Hierarchical"
|
180 |
+
msgstr "Hierachicznie"
|
181 |
+
|
182 |
+
#: core/options-pages.php:189 core/options-pages.php:253
|
183 |
+
msgid "Column in Media Library"
|
184 |
+
msgstr "Kolumna w bibliotece mediów"
|
185 |
+
|
186 |
+
#: core/options-pages.php:190 core/options-pages.php:207
|
187 |
+
#: core/options-pages.php:254 core/options-pages.php:317
|
188 |
+
msgid "Filter in Media Library"
|
189 |
+
msgstr "Filtr w bibliotece mediów"
|
190 |
+
|
191 |
+
#: core/options-pages.php:191 core/options-pages.php:208
|
192 |
+
#: core/options-pages.php:255 core/options-pages.php:318
|
193 |
+
msgid "Filter in Media Popup / Grid View"
|
194 |
+
msgstr "Filtr w wyskakującym oknie mediów / widoku siatki"
|
195 |
+
|
196 |
+
#: core/options-pages.php:192 core/options-pages.php:256
|
197 |
+
msgid "Show in Nav Menu"
|
198 |
+
msgstr "Pokaż w menu nawigacyjnym"
|
199 |
+
|
200 |
+
#: core/options-pages.php:193 core/options-pages.php:257
|
201 |
+
msgid "Remember terms order (sort)"
|
202 |
+
msgstr "Pamiętaj kolejność (sortowanie)"
|
203 |
+
|
204 |
+
#: core/options-pages.php:194 core/options-pages.php:258
|
205 |
+
#, fuzzy
|
206 |
+
msgid "Slug"
|
207 |
+
msgstr "Slug"
|
208 |
+
|
209 |
+
#: core/options-pages.php:271
|
210 |
+
msgid "Add New Taxonomy"
|
211 |
+
msgstr "Dodaj nową taksonomię"
|
212 |
+
|
213 |
+
#: core/options-pages.php:284
|
214 |
+
msgid "Non-Media Taxonomies"
|
215 |
+
msgstr "Pozostałe taksonomie"
|
216 |
+
|
217 |
+
#: core/options-pages.php:389
|
218 |
+
msgid "Add New MIME Type"
|
219 |
+
msgstr "Dodaj nowy typ MIME"
|
220 |
+
|
221 |
+
#: core/options-pages.php:407 core/options-pages.php:464
|
222 |
+
msgid "Extension"
|
223 |
+
msgstr "Rozszerzenie"
|
224 |
+
|
225 |
+
#: core/options-pages.php:408 core/options-pages.php:465
|
226 |
+
msgid "MIME Type"
|
227 |
+
msgstr "Typ MIME"
|
228 |
+
|
229 |
+
#: core/options-pages.php:409 core/options-pages.php:466
|
230 |
+
msgid "Singular Label"
|
231 |
+
msgstr "Etykieta dla liczby pojedynczej"
|
232 |
+
|
233 |
+
#: core/options-pages.php:410 core/options-pages.php:467
|
234 |
+
msgid "Plural Label"
|
235 |
+
msgstr "Etykieta dla liczby mnogiej"
|
236 |
+
|
237 |
+
#: core/options-pages.php:411 core/options-pages.php:441
|
238 |
+
#: core/options-pages.php:456 core/options-pages.php:468
|
239 |
+
msgid "Add Filter"
|
240 |
+
msgstr "Dodaj filtr"
|
241 |
+
|
242 |
+
#: core/options-pages.php:412 core/options-pages.php:442
|
243 |
+
#: core/options-pages.php:457 core/options-pages.php:469
|
244 |
+
msgid "Allow Upload"
|
245 |
+
msgstr "Zezwól na przesyłanie"
|
246 |
+
|
247 |
+
#: core/options-pages.php:458
|
248 |
+
msgid "Delete MIME Type"
|
249 |
+
msgstr "Usuń typ MIME"
|
250 |
+
|
251 |
+
#: core/options-pages.php:475
|
252 |
+
msgid "Restore default MIME Types"
|
253 |
+
msgstr "Przywróć domyślne typy MIME"
|
254 |
+
|
255 |
+
#. Plugin Name of the plugin/theme
|
256 |
+
msgid "Enhanced Media Library"
|
257 |
+
msgstr "Rozszerzona Biblioteka Mediów"
|
258 |
+
|
259 |
+
#. Description of the plugin/theme
|
260 |
+
msgid ""
|
261 |
+
"This plugin will be handy for those who need to manage a lot of media files."
|
262 |
+
msgstr ""
|
263 |
+
"Wtyczka ta będzie przydatna tym, którzy muszą zarządzać wieloma plikami "
|
264 |
+
"multimedialnymi."
|
languages/eml.pot
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
# This file is distributed under the same license as the Enhanced Media Library package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: Enhanced Media Library
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/enhanced-media-library\n"
|
7 |
-
"POT-Creation-Date: 2014-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -12,230 +12,238 @@ msgstr ""
|
|
12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
13 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14 |
|
15 |
-
#: core/options-pages.php:
|
16 |
-
msgid "Enhanced Media Library Options"
|
17 |
-
msgstr ""
|
18 |
-
|
19 |
-
#: core/options-pages.php:16
|
20 |
msgid "Media Settings"
|
21 |
msgstr ""
|
22 |
|
23 |
-
#: core/options-pages.php:
|
24 |
-
#: core/options-pages.php:
|
25 |
msgid "Taxonomies"
|
26 |
msgstr ""
|
27 |
|
28 |
-
#: core/options-pages.php:
|
29 |
-
#: core/options-pages.php:
|
30 |
msgid "MIME Types"
|
31 |
msgstr ""
|
32 |
|
33 |
-
#: core/options-pages.php:
|
34 |
-
#: core/options-pages.php:
|
35 |
-
#: core/options-pages.php:
|
36 |
msgid "Edit"
|
37 |
msgstr ""
|
38 |
|
39 |
-
#: core/options-pages.php:
|
40 |
msgid "Close"
|
41 |
msgstr ""
|
42 |
|
43 |
-
#: core/options-pages.php:
|
44 |
-
#: core/options-pages.php:
|
45 |
msgid "View"
|
46 |
msgstr ""
|
47 |
|
48 |
-
#: core/options-pages.php:
|
49 |
-
#: core/options-pages.php:
|
50 |
msgid "Update"
|
51 |
msgstr ""
|
52 |
|
53 |
-
#: core/options-pages.php:
|
54 |
-
#: core/options-pages.php:
|
55 |
msgid "Add New"
|
56 |
msgstr ""
|
57 |
|
58 |
-
#: core/options-pages.php:
|
59 |
-
#: core/options-pages.php:
|
60 |
msgid "New"
|
61 |
msgstr ""
|
62 |
|
63 |
-
#: core/options-pages.php:
|
64 |
msgid "Name"
|
65 |
msgstr ""
|
66 |
|
67 |
-
#: core/options-pages.php:
|
68 |
-
#: core/options-pages.php:
|
69 |
msgid "Parent"
|
70 |
msgstr ""
|
71 |
|
72 |
-
#: core/options-pages.php:
|
73 |
-
#: core/options-pages.php:
|
74 |
msgid "All"
|
75 |
msgstr ""
|
76 |
|
77 |
-
#: core/options-pages.php:
|
78 |
-
#: core/options-pages.php:
|
79 |
msgid "Search"
|
80 |
msgstr ""
|
81 |
|
82 |
-
#: core/options-pages.php:
|
83 |
msgid ""
|
84 |
"Taxonomy will be deleted permanently! Your media files will remain intacted, "
|
85 |
"but all the connections with this taxonomy and its terms will be lost."
|
86 |
msgstr ""
|
87 |
|
88 |
-
#: core/options-pages.php:
|
89 |
msgid "There is already a taxonomy with the same name. Please chose other one."
|
90 |
msgstr ""
|
91 |
|
92 |
-
#: core/options-pages.php:
|
93 |
msgid "New Taxonomy"
|
94 |
msgstr ""
|
95 |
|
96 |
-
#: core/options-pages.php:
|
97 |
msgid "Please choose Singular and Plural names for all your new taxomonies."
|
98 |
msgstr ""
|
99 |
|
100 |
-
#: core/options-pages.php:
|
101 |
msgid "Please choose Singilar name for all your new taxomonies."
|
102 |
msgstr ""
|
103 |
|
104 |
-
#: core/options-pages.php:
|
105 |
msgid "Please choose Plural Name for all your new taxomonies."
|
106 |
msgstr ""
|
107 |
|
108 |
-
#: core/options-pages.php:
|
109 |
msgid "Warning! All your custom MIME Types will be deleted by this operation."
|
110 |
msgstr ""
|
111 |
|
112 |
-
#: core/options-pages.php:
|
113 |
msgid "Please fill into all fields."
|
114 |
msgstr ""
|
115 |
|
116 |
-
#: core/options-pages.php:
|
117 |
msgid "Duplicate extensions or MIME types. Please chose other one."
|
118 |
msgstr ""
|
119 |
|
120 |
-
#: core/options-pages.php:
|
121 |
msgid "You do not have sufficient permissions to access this page."
|
122 |
msgstr ""
|
123 |
|
124 |
-
#: core/options-pages.php:
|
125 |
msgid "Media Taxonomies"
|
126 |
msgstr ""
|
127 |
|
128 |
-
#: core/options-pages.php:
|
129 |
msgid "Assign following taxonomies to Media Library:"
|
130 |
msgstr ""
|
131 |
|
132 |
-
#: core/options-pages.php:
|
133 |
-
#: core/options-pages.php:
|
134 |
msgid "Assign Taxonomy"
|
135 |
msgstr ""
|
136 |
|
137 |
-
#: core/options-pages.php:
|
138 |
msgid "Edit Taxonomy"
|
139 |
msgstr ""
|
140 |
|
141 |
-
#: core/options-pages.php:
|
142 |
msgid "Delete Taxonomy"
|
143 |
msgstr ""
|
144 |
|
145 |
-
#: core/options-pages.php:
|
146 |
msgid "Labels"
|
147 |
msgstr ""
|
148 |
|
149 |
-
#: core/options-pages.php:
|
150 |
msgid "Singular"
|
151 |
msgstr ""
|
152 |
|
153 |
-
#: core/options-pages.php:
|
154 |
msgid "Plural"
|
155 |
msgstr ""
|
156 |
|
157 |
-
#: core/options-pages.php:
|
158 |
msgid "Menu Name"
|
159 |
msgstr ""
|
160 |
|
161 |
-
#: core/options-pages.php:
|
162 |
-
#: core/options-pages.php:
|
163 |
msgid "Settings"
|
164 |
msgstr ""
|
165 |
|
166 |
-
#: core/options-pages.php:
|
167 |
msgid "Hierarchical"
|
168 |
msgstr ""
|
169 |
|
170 |
-
#: core/options-pages.php:
|
171 |
-
msgid "Column in
|
172 |
msgstr ""
|
173 |
|
174 |
-
#: core/options-pages.php:
|
175 |
-
|
176 |
-
msgid "Filter in Media Library"
|
177 |
msgstr ""
|
178 |
|
179 |
-
#: core/options-pages.php:
|
180 |
-
|
181 |
-
msgid "Filter in Media Popup / Grid View"
|
182 |
msgstr ""
|
183 |
|
184 |
-
#: core/options-pages.php:
|
185 |
msgid "Show in Nav Menu"
|
186 |
msgstr ""
|
187 |
|
188 |
-
#: core/options-pages.php:
|
189 |
msgid "Remember terms order (sort)"
|
190 |
msgstr ""
|
191 |
|
192 |
-
#: core/options-pages.php:
|
193 |
msgid "Slug"
|
194 |
msgstr ""
|
195 |
|
196 |
-
#: core/options-pages.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
197 |
msgid "Add New Taxonomy"
|
198 |
msgstr ""
|
199 |
|
200 |
-
#: core/options-pages.php:
|
201 |
msgid "Non-Media Taxonomies"
|
202 |
msgstr ""
|
203 |
|
204 |
-
#: core/options-pages.php:
|
205 |
msgid "Add New MIME Type"
|
206 |
msgstr ""
|
207 |
|
208 |
-
#: core/options-pages.php:
|
209 |
msgid "Extension"
|
210 |
msgstr ""
|
211 |
|
212 |
-
#: core/options-pages.php:
|
213 |
msgid "MIME Type"
|
214 |
msgstr ""
|
215 |
|
216 |
-
#: core/options-pages.php:
|
217 |
msgid "Singular Label"
|
218 |
msgstr ""
|
219 |
|
220 |
-
#: core/options-pages.php:
|
221 |
msgid "Plural Label"
|
222 |
msgstr ""
|
223 |
|
224 |
-
#: core/options-pages.php:
|
225 |
-
#: core/options-pages.php:
|
226 |
msgid "Add Filter"
|
227 |
msgstr ""
|
228 |
|
229 |
-
#: core/options-pages.php:
|
230 |
-
#: core/options-pages.php:
|
231 |
msgid "Allow Upload"
|
232 |
msgstr ""
|
233 |
|
234 |
-
#: core/options-pages.php:
|
235 |
msgid "Delete MIME Type"
|
236 |
msgstr ""
|
237 |
|
238 |
-
#: core/options-pages.php:
|
239 |
msgid "Restore default MIME Types"
|
240 |
msgstr ""
|
241 |
|
@@ -246,4 +254,4 @@ msgstr ""
|
|
246 |
#. Description of the plugin/theme
|
247 |
msgid ""
|
248 |
"This plugin will be handy for those who need to manage a lot of media files."
|
249 |
-
msgstr ""
|
2 |
# This file is distributed under the same license as the Enhanced Media Library package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: Enhanced Media Library 2.0\n"
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/enhanced-media-library\n"
|
7 |
+
"POT-Creation-Date: 2014-11-15 16:36:14+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
13 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14 |
|
15 |
+
#: core/options-pages.php:54 core/options-pages.php:55
|
|
|
|
|
|
|
|
|
16 |
msgid "Media Settings"
|
17 |
msgstr ""
|
18 |
|
19 |
+
#: core/options-pages.php:63 core/options-pages.php:64
|
20 |
+
#: core/options-pages.php:158
|
21 |
msgid "Taxonomies"
|
22 |
msgstr ""
|
23 |
|
24 |
+
#: core/options-pages.php:71 core/options-pages.php:72
|
25 |
+
#: core/options-pages.php:427
|
26 |
msgid "MIME Types"
|
27 |
msgstr ""
|
28 |
|
29 |
+
#: core/options-pages.php:106 core/options-pages.php:200
|
30 |
+
#: core/options-pages.php:214 core/options-pages.php:278
|
31 |
+
#: core/options-pages.php:351
|
32 |
msgid "Edit"
|
33 |
msgstr ""
|
34 |
|
35 |
+
#: core/options-pages.php:107
|
36 |
msgid "Close"
|
37 |
msgstr ""
|
38 |
|
39 |
+
#: core/options-pages.php:108 core/options-pages.php:215
|
40 |
+
#: core/options-pages.php:279
|
41 |
msgid "View"
|
42 |
msgstr ""
|
43 |
|
44 |
+
#: core/options-pages.php:109 core/options-pages.php:216
|
45 |
+
#: core/options-pages.php:280
|
46 |
msgid "Update"
|
47 |
msgstr ""
|
48 |
|
49 |
+
#: core/options-pages.php:110 core/options-pages.php:217
|
50 |
+
#: core/options-pages.php:281
|
51 |
msgid "Add New"
|
52 |
msgstr ""
|
53 |
|
54 |
+
#: core/options-pages.php:111 core/options-pages.php:218
|
55 |
+
#: core/options-pages.php:282
|
56 |
msgid "New"
|
57 |
msgstr ""
|
58 |
|
59 |
+
#: core/options-pages.php:112
|
60 |
msgid "Name"
|
61 |
msgstr ""
|
62 |
|
63 |
+
#: core/options-pages.php:113 core/options-pages.php:219
|
64 |
+
#: core/options-pages.php:283
|
65 |
msgid "Parent"
|
66 |
msgstr ""
|
67 |
|
68 |
+
#: core/options-pages.php:114 core/options-pages.php:213
|
69 |
+
#: core/options-pages.php:277
|
70 |
msgid "All"
|
71 |
msgstr ""
|
72 |
|
73 |
+
#: core/options-pages.php:115 core/options-pages.php:220
|
74 |
+
#: core/options-pages.php:284
|
75 |
msgid "Search"
|
76 |
msgstr ""
|
77 |
|
78 |
+
#: core/options-pages.php:117
|
79 |
msgid ""
|
80 |
"Taxonomy will be deleted permanently! Your media files will remain intacted, "
|
81 |
"but all the connections with this taxonomy and its terms will be lost."
|
82 |
msgstr ""
|
83 |
|
84 |
+
#: core/options-pages.php:118
|
85 |
msgid "There is already a taxonomy with the same name. Please chose other one."
|
86 |
msgstr ""
|
87 |
|
88 |
+
#: core/options-pages.php:119 core/options-pages.php:265
|
89 |
msgid "New Taxonomy"
|
90 |
msgstr ""
|
91 |
|
92 |
+
#: core/options-pages.php:120
|
93 |
msgid "Please choose Singular and Plural names for all your new taxomonies."
|
94 |
msgstr ""
|
95 |
|
96 |
+
#: core/options-pages.php:121
|
97 |
msgid "Please choose Singilar name for all your new taxomonies."
|
98 |
msgstr ""
|
99 |
|
100 |
+
#: core/options-pages.php:122
|
101 |
msgid "Please choose Plural Name for all your new taxomonies."
|
102 |
msgstr ""
|
103 |
|
104 |
+
#: core/options-pages.php:124
|
105 |
msgid "Warning! All your custom MIME Types will be deleted by this operation."
|
106 |
msgstr ""
|
107 |
|
108 |
+
#: core/options-pages.php:125
|
109 |
msgid "Please fill into all fields."
|
110 |
msgstr ""
|
111 |
|
112 |
+
#: core/options-pages.php:126
|
113 |
msgid "Duplicate extensions or MIME types. Please chose other one."
|
114 |
msgstr ""
|
115 |
|
116 |
+
#: core/options-pages.php:150 core/options-pages.php:418
|
117 |
msgid "You do not have sufficient permissions to access this page."
|
118 |
msgstr ""
|
119 |
|
120 |
+
#: core/options-pages.php:174
|
121 |
msgid "Media Taxonomies"
|
122 |
msgstr ""
|
123 |
|
124 |
+
#: core/options-pages.php:178 core/options-pages.php:327
|
125 |
msgid "Assign following taxonomies to Media Library:"
|
126 |
msgstr ""
|
127 |
|
128 |
+
#: core/options-pages.php:197 core/options-pages.php:263
|
129 |
+
#: core/options-pages.php:344
|
130 |
msgid "Assign Taxonomy"
|
131 |
msgstr ""
|
132 |
|
133 |
+
#: core/options-pages.php:200 core/options-pages.php:351
|
134 |
msgid "Edit Taxonomy"
|
135 |
msgstr ""
|
136 |
|
137 |
+
#: core/options-pages.php:203 core/options-pages.php:267
|
138 |
msgid "Delete Taxonomy"
|
139 |
msgstr ""
|
140 |
|
141 |
+
#: core/options-pages.php:208 core/options-pages.php:272
|
142 |
msgid "Labels"
|
143 |
msgstr ""
|
144 |
|
145 |
+
#: core/options-pages.php:210 core/options-pages.php:274
|
146 |
msgid "Singular"
|
147 |
msgstr ""
|
148 |
|
149 |
+
#: core/options-pages.php:211 core/options-pages.php:275
|
150 |
msgid "Plural"
|
151 |
msgstr ""
|
152 |
|
153 |
+
#: core/options-pages.php:212 core/options-pages.php:276
|
154 |
msgid "Menu Name"
|
155 |
msgstr ""
|
156 |
|
157 |
+
#: core/options-pages.php:225 core/options-pages.php:244
|
158 |
+
#: core/options-pages.php:289 core/options-pages.php:354
|
159 |
msgid "Settings"
|
160 |
msgstr ""
|
161 |
|
162 |
+
#: core/options-pages.php:227 core/options-pages.php:291
|
163 |
msgid "Hierarchical"
|
164 |
msgstr ""
|
165 |
|
166 |
+
#: core/options-pages.php:228
|
167 |
+
msgid "Column in List View"
|
168 |
msgstr ""
|
169 |
|
170 |
+
#: core/options-pages.php:229
|
171 |
+
msgid "Filter in List View"
|
|
|
172 |
msgstr ""
|
173 |
|
174 |
+
#: core/options-pages.php:230
|
175 |
+
msgid "Filter in Grid View / Media Popup"
|
|
|
176 |
msgstr ""
|
177 |
|
178 |
+
#: core/options-pages.php:231 core/options-pages.php:295
|
179 |
msgid "Show in Nav Menu"
|
180 |
msgstr ""
|
181 |
|
182 |
+
#: core/options-pages.php:232 core/options-pages.php:296
|
183 |
msgid "Remember terms order (sort)"
|
184 |
msgstr ""
|
185 |
|
186 |
+
#: core/options-pages.php:233 core/options-pages.php:297
|
187 |
msgid "Slug"
|
188 |
msgstr ""
|
189 |
|
190 |
+
#: core/options-pages.php:246 core/options-pages.php:293
|
191 |
+
#: core/options-pages.php:356
|
192 |
+
msgid "Filter in Media Library"
|
193 |
+
msgstr ""
|
194 |
+
|
195 |
+
#: core/options-pages.php:247 core/options-pages.php:294
|
196 |
+
#: core/options-pages.php:357
|
197 |
+
msgid "Filter in Media Popup / Grid View"
|
198 |
+
msgstr ""
|
199 |
+
|
200 |
+
#: core/options-pages.php:292
|
201 |
+
msgid "Column in Media Library"
|
202 |
+
msgstr ""
|
203 |
+
|
204 |
+
#: core/options-pages.php:310
|
205 |
msgid "Add New Taxonomy"
|
206 |
msgstr ""
|
207 |
|
208 |
+
#: core/options-pages.php:323
|
209 |
msgid "Non-Media Taxonomies"
|
210 |
msgstr ""
|
211 |
|
212 |
+
#: core/options-pages.php:428
|
213 |
msgid "Add New MIME Type"
|
214 |
msgstr ""
|
215 |
|
216 |
+
#: core/options-pages.php:446 core/options-pages.php:503
|
217 |
msgid "Extension"
|
218 |
msgstr ""
|
219 |
|
220 |
+
#: core/options-pages.php:447 core/options-pages.php:504
|
221 |
msgid "MIME Type"
|
222 |
msgstr ""
|
223 |
|
224 |
+
#: core/options-pages.php:448 core/options-pages.php:505
|
225 |
msgid "Singular Label"
|
226 |
msgstr ""
|
227 |
|
228 |
+
#: core/options-pages.php:449 core/options-pages.php:506
|
229 |
msgid "Plural Label"
|
230 |
msgstr ""
|
231 |
|
232 |
+
#: core/options-pages.php:450 core/options-pages.php:480
|
233 |
+
#: core/options-pages.php:495 core/options-pages.php:507
|
234 |
msgid "Add Filter"
|
235 |
msgstr ""
|
236 |
|
237 |
+
#: core/options-pages.php:451 core/options-pages.php:481
|
238 |
+
#: core/options-pages.php:496 core/options-pages.php:508
|
239 |
msgid "Allow Upload"
|
240 |
msgstr ""
|
241 |
|
242 |
+
#: core/options-pages.php:497
|
243 |
msgid "Delete MIME Type"
|
244 |
msgstr ""
|
245 |
|
246 |
+
#: core/options-pages.php:514
|
247 |
msgid "Restore default MIME Types"
|
248 |
msgstr ""
|
249 |
|
254 |
#. Description of the plugin/theme
|
255 |
msgid ""
|
256 |
"This plugin will be handy for those who need to manage a lot of media files."
|
257 |
+
msgstr ""
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: webbistro
|
|
3 |
Tags: media library, taxonomy, taxonomies, mime, mime type, attachment, media category, media categories, media tag, media tags, media taxonomy, media taxonomies, media filter, media organizer, file types, media types, media uploader, custom, media management, attachment management, files management, ux, user experience, wp-admin, admin
|
4 |
Requires at least: 3.5
|
5 |
Tested up to: 4.0
|
6 |
-
Stable tag:
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -20,13 +20,13 @@ This plugin will be handy for those who need to manage a lot of media files.
|
|
20 |
= Taxonomies =
|
21 |
|
22 |
* create unlimited amount of media taxonomies (like categories and tags),
|
23 |
-
* be in total control of your custom
|
24 |
* edit and delete your custom media taxonomies,
|
25 |
* assign existed taxonomies to Media Library (for example, you can use post categories as a taxonomy for your media files),
|
26 |
* unassign any media taxonomy from Media Library via admin,
|
27 |
* immediately set taxonomy term to any media file during upload via Media Uploader,
|
28 |
-
* filter media files in Media Library by your custom taxonomies,
|
29 |
-
* filter media files in Media
|
30 |
* have you attachment post type's archive page (front-end) working by default
|
31 |
|
32 |
= MIME Types =
|
@@ -37,6 +37,20 @@ This plugin will be handy for those who need to manage a lot of media files.
|
|
37 |
* filter media files by MIME types in Media Library / Media Uploader (for example, PDFs, Documents, V-Cards, etc),
|
38 |
* be in total control of the names of your MIME type filters
|
39 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
= Coming =
|
41 |
|
42 |
New features and improvements coming...
|
@@ -49,7 +63,7 @@ New features and improvements coming...
|
|
49 |
|
50 |
2. Activate the plugin through 'Plugins' menu in WordPress admin
|
51 |
|
52 |
-
3. Adjust plugin's settings on **Media Settings
|
53 |
|
54 |
4. Enjoy Enhanced Media Library!
|
55 |
|
@@ -59,13 +73,17 @@ New features and improvements coming...
|
|
59 |
|
60 |
= Why my custom media taxonomy's page is 404? =
|
61 |
|
62 |
-
Try to just re-save permalinks settings. Go to Settings
|
63 |
|
64 |
= Why Media Popup of some themes/plugins does not show taxonomy filters? =
|
65 |
|
66 |
-
EML adds its filters to
|
67 |
|
68 |
-
If you believe that a third-party plugin shoud have filters in its Media Popup please contact its author with a request to add
|
|
|
|
|
|
|
|
|
69 |
|
70 |
|
71 |
|
@@ -94,6 +112,27 @@ If you believe that a third-party plugin shoud have filters in its Media Popup p
|
|
94 |
== Changelog ==
|
95 |
|
96 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
97 |
= 1.1.2 =
|
98 |
|
99 |
= Improvements =
|
3 |
Tags: media library, taxonomy, taxonomies, mime, mime type, attachment, media category, media categories, media tag, media tags, media taxonomy, media taxonomies, media filter, media organizer, file types, media types, media uploader, custom, media management, attachment management, files management, ux, user experience, wp-admin, admin
|
4 |
Requires at least: 3.5
|
5 |
Tested up to: 4.0
|
6 |
+
Stable tag: 2.0
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
20 |
= Taxonomies =
|
21 |
|
22 |
* create unlimited amount of media taxonomies (like categories and tags),
|
23 |
+
* be in total control of your custom taxonomy parameters via admin,
|
24 |
* edit and delete your custom media taxonomies,
|
25 |
* assign existed taxonomies to Media Library (for example, you can use post categories as a taxonomy for your media files),
|
26 |
* unassign any media taxonomy from Media Library via admin,
|
27 |
* immediately set taxonomy term to any media file during upload via Media Uploader,
|
28 |
+
* filter media files in Media Library by your custom taxonomies,
|
29 |
+
* filter media files in Media Popup by your custom taxonomies,
|
30 |
* have you attachment post type's archive page (front-end) working by default
|
31 |
|
32 |
= MIME Types =
|
37 |
* filter media files by MIME types in Media Library / Media Uploader (for example, PDFs, Documents, V-Cards, etc),
|
38 |
* be in total control of the names of your MIME type filters
|
39 |
|
40 |
+
= Enhanced Media Library PRO =
|
41 |
+
|
42 |
+
**Bulk Edit**
|
43 |
+
|
44 |
+
* set/unset multiple taxonomies to multiple media files at a time:
|
45 |
+
* during uploading process
|
46 |
+
* in Media Popup during post/page editing
|
47 |
+
* in Media Library Grid View
|
48 |
+
* select/deselect multiple media files with a single click
|
49 |
+
* delete multiple media files right in media popup window
|
50 |
+
|
51 |
+
[Learn more about Enhanced Media Library PRO »](http://wordpressuxsolutions.com/plugins/enhanced-media-library/)
|
52 |
+
|
53 |
+
|
54 |
= Coming =
|
55 |
|
56 |
New features and improvements coming...
|
63 |
|
64 |
2. Activate the plugin through 'Plugins' menu in WordPress admin
|
65 |
|
66 |
+
3. Adjust plugin's settings on **Media Settings >> Taxonomies** or **Media Settings >> MIME Types**
|
67 |
|
68 |
4. Enjoy Enhanced Media Library!
|
69 |
|
73 |
|
74 |
= Why my custom media taxonomy's page is 404? =
|
75 |
|
76 |
+
Try to just re-save permalinks settings. Go to Settings >> Permalinks and push "Save Changes" button.
|
77 |
|
78 |
= Why Media Popup of some themes/plugins does not show taxonomy filters? =
|
79 |
|
80 |
+
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.
|
81 |
|
82 |
+
If you believe that a third-party plugin shoud 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).
|
83 |
+
|
84 |
+
= How to show images per media category on front-end =
|
85 |
+
|
86 |
+
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.
|
87 |
|
88 |
|
89 |
|
112 |
== Changelog ==
|
113 |
|
114 |
|
115 |
+
= 2.0 =
|
116 |
+
|
117 |
+
= New =
|
118 |
+
* [PRO vesrion](http://wordpressuxsolutions.com/plugins/enhanced-media-library/) with long-awaited bulk edit feature is finally released!
|
119 |
+
|
120 |
+
= Improvements =
|
121 |
+
* Media Popup: Filters reset automatically as soon as new media files upload process started
|
122 |
+
* Media Popup: Selection resets automatically as soon as filter is changed
|
123 |
+
* Media Popup: WordPress 4.0 date filter added
|
124 |
+
* Compatibility: general compatibility with other plugins improved, please [let me know](http://wordpressuxsolutions.com/support/create-new-ticket/) if you have any issue with EML and other plugins
|
125 |
+
|
126 |
+
= Bugfixes =
|
127 |
+
* Media Popup: No delay or glitches anymore when checking media taxonomy checkboxes [Support Request](https://wordpress.org/support/topic/any-way-to-bulk-edit-images/page/2#post-6051963)
|
128 |
+
* Media Popup: Fixed the bug with non-hierarchical taxonomies (accidentally, only in 1.1.2)
|
129 |
+
* Media Popup: Filters added to custom posts media popup
|
130 |
+
* Media Trash: Fixed the incorrect work with MEDIA_TRASH (WordPress 4.0)
|
131 |
+
* Advanced Custom Fields: Fixed the bug with ACF compatibility [Support Request](https://wordpress.org/support/topic/acf-file-field-conflict-with-eml) and some other minor bugs
|
132 |
+
|
133 |
+
|
134 |
+
|
135 |
+
|
136 |
= 1.1.2 =
|
137 |
|
138 |
= Improvements =
|