Version Description
- Maintenance: Updated plugin branding
- Maintenance: Removed feature pointer - no longer required
- Enhancement: Removed support screen and moved remaining admin screens
- Bug: Fixed issues with translations
Download this release
Release Info
Developer | dartiss |
Plugin | Code Embed |
Version | 2.1 |
Comparing to | |
See all releases |
Code changes from version 2.0.2 to 2.1
- includes/ace-admin-config.php +19 -183
- includes/ace-filter.php +6 -10
- includes/ace-options.php +18 -6
- includes/ace-readme.php +0 -24
- includes/ace-search.php +5 -9
- includes/ace-support.php +0 -51
- languages/simple-embed-code.mo +0 -0
- languages/simple-embed-code.po +94 -110
- readme.txt +20 -27
- screenshot-4.png +0 -0
- screenshot-5.png +0 -0
- screenshot-6.png +0 -0
- simple-code-embed.php +4 -6
- uninstall.php +1 -0
includes/ace-admin-config.php
CHANGED
@@ -26,7 +26,7 @@ function ace_add_settings_link( $links, $file ) {
|
|
26 |
if ( !$this_plugin ) { $this_plugin = plugin_basename( __FILE__ ); }
|
27 |
|
28 |
if ( strpos( $file, 'code-embed.php' ) !== false ) {
|
29 |
-
$settings_link = '<a href="admin.php?page=ace-options">' . __( 'Settings' ) . '</a>';
|
30 |
array_unshift( $links, $settings_link );
|
31 |
}
|
32 |
|
@@ -50,8 +50,7 @@ function ace_set_plugin_meta( $links, $file ) {
|
|
50 |
|
51 |
if ( strpos( $file, 'code-embed.php' ) !== false ) {
|
52 |
|
53 |
-
$links = array_merge( $links, array( '<a href="http://
|
54 |
-
$links = array_merge( $links, array( '<a href="http://www.artiss.co.uk/donate">' . __( 'Donate' ) . '</a>' ) );
|
55 |
}
|
56 |
|
57 |
return $links;
|
@@ -70,75 +69,25 @@ add_filter( 'plugin_row_meta', 'ace_set_plugin_meta', 10, 2 );
|
|
70 |
|
71 |
function ace_menu() {
|
72 |
|
73 |
-
// Depending on WordPress version and available functions decide which (if any) contextual help system to use
|
74 |
-
|
75 |
-
$contextual_help = ace_contextual_help_type();
|
76 |
-
|
77 |
-
// Add main admin option
|
78 |
-
|
79 |
-
add_menu_page( 'Artiss Code Embed Settings', 'Code Embed', 'edit_posts', 'ace-search', 'ace_search', plugins_url() . '/simple-embed-code/images/menu_icon.png' );
|
80 |
-
|
81 |
// Add search sub-menu
|
82 |
|
83 |
-
|
84 |
-
|
85 |
-
$ace_search_hook = add_submenu_page( 'ace-search', 'Artiss Code Embed Search', 'Search', 'edit_posts', 'ace-search', 'ace_search' );
|
86 |
|
87 |
-
|
88 |
|
89 |
-
|
90 |
-
|
91 |
// Add options sub-menu
|
92 |
|
93 |
-
|
94 |
-
|
95 |
-
$ace_options_hook = add_submenu_page( 'ace-search', 'Artiss Code Embed Settings', 'Options', 'manage_options', 'ace-options', 'ace_options' );
|
96 |
-
|
97 |
-
if ( $contextual_help == 'new' ) { add_action('load-'.$ace_options_hook, 'ace_add_options_help'); }
|
98 |
|
99 |
-
|
100 |
-
|
101 |
-
// Add readme sub-menu
|
102 |
|
103 |
-
|
104 |
-
add_submenu_page( 'ace-search', 'Artiss Code Embed README', 'README', 'edit_posts', 'ace-readme', 'ace_readme' );
|
105 |
-
}
|
106 |
-
|
107 |
-
// Add support sub-menu
|
108 |
-
|
109 |
-
add_submenu_page( 'ace-search', 'Artiss Code Embed Support', 'Support', 'edit_posts', 'ace-support', 'ace_support' );
|
110 |
|
111 |
}
|
112 |
add_action( 'admin_menu','ace_menu' );
|
113 |
|
114 |
-
/**
|
115 |
-
* Get contextual help type
|
116 |
-
*
|
117 |
-
* Return whether this WP installtion requires the new or old contextual help type, or none at all
|
118 |
-
*
|
119 |
-
* @since 2.0
|
120 |
-
*
|
121 |
-
* @return string Contextual help type - 'new', 'old' or false
|
122 |
-
*/
|
123 |
-
|
124 |
-
function ace_contextual_help_type() {
|
125 |
-
|
126 |
-
global $wp_version;
|
127 |
-
|
128 |
-
$type = false;
|
129 |
-
|
130 |
-
if ( ( float ) $wp_version >= 3.3 ) {
|
131 |
-
$type = 'new';
|
132 |
-
} else {
|
133 |
-
if ( function_exists( 'add_contextual_help' ) ) {
|
134 |
-
$type = 'old';
|
135 |
-
}
|
136 |
-
}
|
137 |
-
|
138 |
-
return $type;
|
139 |
-
|
140 |
-
}
|
141 |
-
|
142 |
/**
|
143 |
* Add Options Help
|
144 |
*
|
@@ -156,7 +105,7 @@ function ace_add_options_help() {
|
|
156 |
|
157 |
if ( $screen->id != $ace_options_hook ) { return; }
|
158 |
|
159 |
-
$screen -> add_help_tab( array( 'id' => 'ace-options-help-tab', 'title' => __( 'Help' ), 'content' => ace_options_help() ) );
|
160 |
}
|
161 |
|
162 |
/**
|
@@ -176,7 +125,7 @@ function ace_add_search_help() {
|
|
176 |
|
177 |
if ( $screen->id != $ace_search_hook ) { return; }
|
178 |
|
179 |
-
$screen -> add_help_tab( array( 'id' => 'ace-search-help-tab', 'title' => __( 'Help' ), 'content' => ace_search_help() ) );
|
180 |
}
|
181 |
|
182 |
/**
|
@@ -207,34 +156,6 @@ function ace_search() {
|
|
207 |
|
208 |
}
|
209 |
|
210 |
-
/**
|
211 |
-
* Code Embed README
|
212 |
-
*
|
213 |
-
* Define the README screen
|
214 |
-
*
|
215 |
-
* @since 2.0
|
216 |
-
*/
|
217 |
-
|
218 |
-
function ace_readme() {
|
219 |
-
|
220 |
-
include_once( WP_PLUGIN_DIR . '/' . str_replace( basename( __FILE__ ), '', plugin_basename( __FILE__ ) ) . 'ace-readme.php' );
|
221 |
-
|
222 |
-
}
|
223 |
-
|
224 |
-
/**
|
225 |
-
* Code Embed Support
|
226 |
-
*
|
227 |
-
* Define the support screen
|
228 |
-
*
|
229 |
-
* @since 2.0
|
230 |
-
*/
|
231 |
-
|
232 |
-
function ace_support() {
|
233 |
-
|
234 |
-
include_once( WP_PLUGIN_DIR . '/' . str_replace( basename( __FILE__ ), '', plugin_basename( __FILE__ ) ) . 'ace-support.php' );
|
235 |
-
|
236 |
-
}
|
237 |
-
|
238 |
/**
|
239 |
* Code Embed Options Help
|
240 |
*
|
@@ -247,10 +168,11 @@ function ace_support() {
|
|
247 |
|
248 |
function ace_options_help() {
|
249 |
|
250 |
-
$help_text = '<p>' . __( 'Use this screen to modify the identifiers and keyword used to specify your embedded code.' ) . '</p>';
|
251 |
-
$help_text .= '<p>' . __( 'The keyword is the name used for your custom field. The custom field\'s value is the code that you wish to embed.' ) . '</p>';
|
252 |
-
$help_text .= '<p>' . __( 'The keyword, sandwiched with the identifier before and after, is what you then need to add to your post or page to activate the embed code.' ) . '</p>';
|
253 |
-
$help_text .= '<
|
|
|
254 |
|
255 |
return $help_text;
|
256 |
}
|
@@ -267,96 +189,10 @@ function ace_options_help() {
|
|
267 |
|
268 |
function ace_search_help() {
|
269 |
|
270 |
-
$help_text = '<p>' . __( 'This screen allows you to search for the post and pages that a particular code embed has been used in.' ) . '</p>';
|
271 |
-
$help_text .= '<p>' . __( 'Simply enter the code suffix that you wish to search for and press the \'Search\' key to display a list of all the posts using it. In addition the code will be shown alongside it. Click on the post name to edit the post.' ) . '</p>';
|
272 |
-
$help_text .= '<p>' . __( 'The search results are grouped together in matching code groups, so posts with the same code will be shown together with the same colour background.' ) . '</p>';
|
273 |
-
$help_text .= '<h4>' . __( 'This plugin, and all support, is supplied for free, but <a title="Donate" href="http://artiss.co.uk/donate" target="_blank">donations</a> are always welcome.' ) . '</h4>';
|
274 |
|
275 |
return $help_text;
|
276 |
}
|
277 |
-
|
278 |
-
/**
|
279 |
-
* Detect plugin activation
|
280 |
-
*
|
281 |
-
* Upon detection of activation set an option
|
282 |
-
*
|
283 |
-
* @since 2.0
|
284 |
-
*/
|
285 |
-
|
286 |
-
function ace_plugin_activate() {
|
287 |
-
|
288 |
-
update_option( 'artiss_code_embed_activated', true );
|
289 |
-
|
290 |
-
}
|
291 |
-
register_activation_hook( WP_PLUGIN_DIR . "/simple-embed-code/simple-code-embed.php", 'ace_plugin_activate' );
|
292 |
-
|
293 |
-
// If plugin activated, run activation commands and delete option
|
294 |
-
|
295 |
-
global $wp_version;
|
296 |
-
|
297 |
-
if ( get_option( 'artiss_code_embed_activated' ) ) {
|
298 |
-
|
299 |
-
if ( ( float ) $wp_version >= 3.3 ) {
|
300 |
-
|
301 |
-
add_action( 'admin_enqueue_scripts', 'ace_admin_enqueue_scripts' );
|
302 |
-
|
303 |
-
}
|
304 |
-
|
305 |
-
delete_option( 'artiss_code_embed_activated' );
|
306 |
-
}
|
307 |
-
|
308 |
-
/**
|
309 |
-
* Enqueue Feature Pointer files
|
310 |
-
*
|
311 |
-
* Add the required feature pointer files
|
312 |
-
*
|
313 |
-
* @since 2.0
|
314 |
-
*/
|
315 |
-
|
316 |
-
function ace_admin_enqueue_scripts() {
|
317 |
-
|
318 |
-
wp_enqueue_style( 'wp-pointer' );
|
319 |
-
wp_enqueue_script( 'wp-pointer' );
|
320 |
-
|
321 |
-
add_action( 'admin_print_footer_scripts', 'ace_admin_print_footer_scripts' );
|
322 |
-
}
|
323 |
-
|
324 |
-
/**
|
325 |
-
* Show Feature Pointer
|
326 |
-
*
|
327 |
-
* Display feature pointer
|
328 |
-
*
|
329 |
-
* @since 2.0
|
330 |
-
*/
|
331 |
-
|
332 |
-
function ace_admin_print_footer_scripts() {
|
333 |
-
|
334 |
-
$pointer_content = '<h3>' . __( 'Welcome to Artiss Code Embed' ) . '</h3>';
|
335 |
-
$pointer_content .= '<p style="font-style:italic;">' . __( 'Thank you for installing this plugin.' ) . '</p>';
|
336 |
-
$pointer_content .= '<p>' . __( 'A new menu has been added to the sidebar. This will allow you to change the keywords and identifiers used for embedding as well as providing a method for searching for code embeds.' );
|
337 |
-
?>
|
338 |
-
<script>
|
339 |
-
jQuery(function () {
|
340 |
-
var body = jQuery(document.body),
|
341 |
-
menu = jQuery('#toplevel_page_ace-options'),
|
342 |
-
collapse = jQuery('#collapse-menu'),
|
343 |
-
pluginmenu = menu.find("a[href='admin.php?page=ace-options']"),
|
344 |
-
options = {
|
345 |
-
content: '<?php echo $pointer_content; ?>',
|
346 |
-
position: {
|
347 |
-
edge: 'left',
|
348 |
-
align: 'center',
|
349 |
-
of: menu.is('.wp-menu-open') && !menu.is('.folded *') ? pluginmenu : menu
|
350 |
-
},
|
351 |
-
close: function() {
|
352 |
-
}};
|
353 |
-
|
354 |
-
if ( !pluginmenu.length )
|
355 |
-
return;
|
356 |
-
|
357 |
-
body.pointer(options).pointer('open');
|
358 |
-
});
|
359 |
-
</script>
|
360 |
-
<?php
|
361 |
-
}
|
362 |
?>
|
26 |
if ( !$this_plugin ) { $this_plugin = plugin_basename( __FILE__ ); }
|
27 |
|
28 |
if ( strpos( $file, 'code-embed.php' ) !== false ) {
|
29 |
+
$settings_link = '<a href="admin.php?page=ace-options">' . __( 'Settings', 'simple-embed-code' ) . '</a>';
|
30 |
array_unshift( $links, $settings_link );
|
31 |
}
|
32 |
|
50 |
|
51 |
if ( strpos( $file, 'code-embed.php' ) !== false ) {
|
52 |
|
53 |
+
$links = array_merge( $links, array( '<a href="http://wordpress.org/support/plugin/simple-embed-code">' . __( 'Support', 'simple-embed-code' ) . '</a>' ) );
|
|
|
54 |
}
|
55 |
|
56 |
return $links;
|
69 |
|
70 |
function ace_menu() {
|
71 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
// Add search sub-menu
|
73 |
|
74 |
+
global $ace_search_hook;
|
|
|
|
|
75 |
|
76 |
+
$ace_search_hook = add_submenu_page( 'tools.php', __( 'Code Embed Search', 'simple-embed-code' ), __( 'Code Search', 'simple-embed-code' ), 'edit_posts', 'ace-search', 'ace_search' );
|
77 |
|
78 |
+
add_action('load-'.$ace_search_hook, 'ace_add_search_help');
|
79 |
+
|
80 |
// Add options sub-menu
|
81 |
|
82 |
+
global $ace_options_hook;
|
|
|
|
|
|
|
|
|
83 |
|
84 |
+
$ace_options_hook = add_submenu_page( 'options-general.php', __( 'Code Embed Settings', 'simple-embed-code' ), __( 'Code Embed', 'simple-embed-code' ), 'manage_options', 'ace-options', 'ace_options' );
|
|
|
|
|
85 |
|
86 |
+
add_action('load-'.$ace_options_hook, 'ace_add_options_help');
|
|
|
|
|
|
|
|
|
|
|
|
|
87 |
|
88 |
}
|
89 |
add_action( 'admin_menu','ace_menu' );
|
90 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
/**
|
92 |
* Add Options Help
|
93 |
*
|
105 |
|
106 |
if ( $screen->id != $ace_options_hook ) { return; }
|
107 |
|
108 |
+
$screen -> add_help_tab( array( 'id' => 'ace-options-help-tab', 'title' => __( 'Help', 'simple-embed-code' ), 'content' => ace_options_help() ) );
|
109 |
}
|
110 |
|
111 |
/**
|
125 |
|
126 |
if ( $screen->id != $ace_search_hook ) { return; }
|
127 |
|
128 |
+
$screen -> add_help_tab( array( 'id' => 'ace-search-help-tab', 'title' => __( 'Help', 'simple-embed-code' ), 'content' => ace_search_help() ) );
|
129 |
}
|
130 |
|
131 |
/**
|
156 |
|
157 |
}
|
158 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
159 |
/**
|
160 |
* Code Embed Options Help
|
161 |
*
|
168 |
|
169 |
function ace_options_help() {
|
170 |
|
171 |
+
$help_text = '<p>' . __( 'Use this screen to modify the identifiers and keyword used to specify your embedded code.', 'simple-embed-code' ) . '</p>';
|
172 |
+
$help_text .= '<p>' . __( 'The keyword is the name used for your custom field. The custom field\'s value is the code that you wish to embed.', 'simple-embed-code' ) . '</p>';
|
173 |
+
$help_text .= '<p>' . __( 'The keyword, sandwiched with the identifier before and after, is what you then need to add to your post or page to activate the embed code.', 'simple-embed-code' ) . '</p>';
|
174 |
+
$help_text .= '<p>' . sprintf( __( 'You are using Code Embed version %s. It was written by Dark Designs.', 'simple-embed-code' ), artiss_code_embed_version ) . '</p>';
|
175 |
+
|
176 |
|
177 |
return $help_text;
|
178 |
}
|
189 |
|
190 |
function ace_search_help() {
|
191 |
|
192 |
+
$help_text = '<p>' . __( 'This screen allows you to search for the post and pages that a particular code embed has been used in.', 'simple-embed-code' ) . '</p>';
|
193 |
+
$help_text .= '<p>' . __( 'Simply enter the code suffix that you wish to search for and press the \'Search\' key to display a list of all the posts using it. In addition the code will be shown alongside it. Click on the post name to edit the post.', 'simple-embed-code' ) . '</p>';
|
194 |
+
$help_text .= '<p>' . __( 'The search results are grouped together in matching code groups, so posts with the same code will be shown together with the same colour background.', 'simple-embed-code' ) . '</p>';
|
|
|
195 |
|
196 |
return $help_text;
|
197 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
198 |
?>
|
includes/ace-filter.php
CHANGED
@@ -78,11 +78,9 @@ function ace_filter( $content ) {
|
|
78 |
// Get the custom field data and replace in the post
|
79 |
|
80 |
$search = $options[ 'opening_ident' ] . $options[ 'keyword_ident' ] . $suffix . $options[ 'closing_ident' ];
|
81 |
-
|
82 |
-
|
83 |
-
///////////////////////// Place the following section in a seperate routine - can be shared with new SEO functions
|
84 |
|
85 |
// Get the meta for the current post
|
|
|
86 |
$post_meta = get_post_meta( $post -> ID, $options[ 'keyword_ident' ].$suffix, false );
|
87 |
if ( isset( $post_meta[ 0 ] ) ) {
|
88 |
$html = $post_meta[ 0 ];
|
@@ -90,8 +88,6 @@ function ace_filter( $content ) {
|
|
90 |
// No meta found, so look for it elsewhere
|
91 |
$html = ace_get_embed_code( $options[ 'keyword_ident' ], $suffix );
|
92 |
}
|
93 |
-
|
94 |
-
/////////////////////////////
|
95 |
|
96 |
// Build the string to search for
|
97 |
|
@@ -99,7 +95,7 @@ function ace_filter( $content ) {
|
|
99 |
|
100 |
// Build the string of code to replace with
|
101 |
|
102 |
-
$replace = ace_generate_code( $html, '
|
103 |
|
104 |
// Now modify all references
|
105 |
|
@@ -173,7 +169,7 @@ function ace_quick_replace( $content = '', $options = '', $search = '' ) {
|
|
173 |
|
174 |
function ace_generate_code( $html, $plugin_name, $responsive = '', $max_width = '' ) {
|
175 |
|
176 |
-
$code = "\n<!-- " . $plugin_name . ' v' . artiss_code_embed_version . "
|
177 |
|
178 |
if ( $max_width !== false ) { $code .= '<div style="width: ' . $max_width . 'px; max-width: 100%">'; }
|
179 |
|
@@ -232,14 +228,14 @@ function ace_get_embed_code( $ident, $suffix ) {
|
|
232 |
|
233 |
// More than one unique code result returned, so output the list of posts
|
234 |
|
235 |
-
$error = sprintf( __( 'Cannot use %s as a global code as it is being used to store %d unique pieces of code in %d posts - <a href="%s">click here</a> for more details' ), $meta_name, $records, $total_records, get_bloginfo( 'wpurl' ) . '/wp-admin/admin.php?page=ace-search&suffix=' . $suffix );
|
236 |
-
$html = ace_report_error( $error, '
|
237 |
}
|
238 |
} else {
|
239 |
|
240 |
// No meta code was found so write out an error
|
241 |
|
242 |
-
$html = ace_report_error( sprintf( __( 'No embed code was found for %s' ), $meta_name ), '
|
243 |
|
244 |
}
|
245 |
return $html;
|
78 |
// Get the custom field data and replace in the post
|
79 |
|
80 |
$search = $options[ 'opening_ident' ] . $options[ 'keyword_ident' ] . $suffix . $options[ 'closing_ident' ];
|
|
|
|
|
|
|
81 |
|
82 |
// Get the meta for the current post
|
83 |
+
|
84 |
$post_meta = get_post_meta( $post -> ID, $options[ 'keyword_ident' ].$suffix, false );
|
85 |
if ( isset( $post_meta[ 0 ] ) ) {
|
86 |
$html = $post_meta[ 0 ];
|
88 |
// No meta found, so look for it elsewhere
|
89 |
$html = ace_get_embed_code( $options[ 'keyword_ident' ], $suffix );
|
90 |
}
|
|
|
|
|
91 |
|
92 |
// Build the string to search for
|
93 |
|
95 |
|
96 |
// Build the string of code to replace with
|
97 |
|
98 |
+
$replace = ace_generate_code( $html, 'Code Embed', $responsive, $max_width );
|
99 |
|
100 |
// Now modify all references
|
101 |
|
169 |
|
170 |
function ace_generate_code( $html, $plugin_name, $responsive = '', $max_width = '' ) {
|
171 |
|
172 |
+
$code = "\n<!-- " . $plugin_name . ' v' . artiss_code_embed_version . " -->\n";
|
173 |
|
174 |
if ( $max_width !== false ) { $code .= '<div style="width: ' . $max_width . 'px; max-width: 100%">'; }
|
175 |
|
228 |
|
229 |
// More than one unique code result returned, so output the list of posts
|
230 |
|
231 |
+
$error = sprintf( __( 'Cannot use %s as a global code as it is being used to store %d unique pieces of code in %d posts - <a href="%s">click here</a> for more details', 'simple-embed-code' ), $meta_name, $records, $total_records, get_bloginfo( 'wpurl' ) . '/wp-admin/admin.php?page=ace-search&suffix=' . $suffix );
|
232 |
+
$html = ace_report_error( $error, 'Code Embed', false );
|
233 |
}
|
234 |
} else {
|
235 |
|
236 |
// No meta code was found so write out an error
|
237 |
|
238 |
+
$html = ace_report_error( sprintf( __( 'No embed code was found for %s', 'simple-embed-code' ), $meta_name ), 'Code Embed', false );
|
239 |
|
240 |
}
|
241 |
return $html;
|
includes/ace-options.php
CHANGED
@@ -13,7 +13,7 @@
|
|
13 |
?>
|
14 |
<div class="wrap">
|
15 |
<div class="icon32"><img src="<?php echo plugins_url(); ?>/simple-embed-code/images/screen_icon.png" alt="" title="" height="32px" width="32px"/><br /></div>
|
16 |
-
<h2><?php _e( '
|
17 |
<?php
|
18 |
// If options have been updated on screen, update the database
|
19 |
if ( ( !empty( $_POST ) ) && ( check_admin_referer( 'code-embed-profile' , 'code_embed_profile_nonce' ) ) ) {
|
@@ -37,31 +37,43 @@ $options = ace_get_embed_paras();
|
|
37 |
|
38 |
<form method="post" action="<?php echo get_bloginfo( 'wpurl' ) . '/wp-admin/admin.php?page=ace-options&updated=true' ?>">
|
39 |
|
40 |
-
<?php echo '<h3>' . __( 'Identifier Format' ) . '</h3>' . __( 'Specify the format that will be used to define the way the code is embedded in your post. The formats are case insensitive and characters < > [ ] are invalid.' ); ?>
|
41 |
|
42 |
<table class="form-table">
|
43 |
|
44 |
<tr>
|
45 |
<th scope="row"><?php _e( 'Keyword' ); ?></th>
|
46 |
-
<td><input type="text" size="12" maxlength="12" name="code_embed_keyword" value="<?php echo $options[ 'keyword_ident' ] ; ?>"/> <span class="description"><?php _e( 'The keyword that is used to name the custom field and then place in your post where the code should be embedded. A suffix on any type can then be placed on the end.' ); ?></span></td>
|
47 |
</tr>
|
48 |
|
49 |
<tr>
|
50 |
<th scope="row"><?php _e( 'Opening Identifier' ); ?></th>
|
51 |
-
<td><input type="text" size="4" maxlength="4" name="code_embed_opening" value="<?php echo $options[ 'opening_ident' ]; ?>"/> <span class="description"><?php _e( 'The character(s) that must be placed in the post before the keyword to uniquely identify it.' ); ?></span></td>
|
52 |
</tr>
|
53 |
|
54 |
<tr>
|
55 |
<th scope="row"><?php _e( 'Closing Identifier' ); ?></th>
|
56 |
-
<td><input type="text" size="4" maxlength="4" name="code_embed_closing" value="<?php echo $options[ 'closing_ident' ]; ?>"/> <span class="description"><?php _e( 'The character(s) that must be placed in the post after the keyword to uniquely identify it.' ); ?></span></td>
|
57 |
</tr>
|
58 |
|
59 |
</table>
|
60 |
|
61 |
<?php wp_nonce_field( 'code-embed-profile', 'code_embed_profile_nonce', true, true ); ?>
|
62 |
|
63 |
-
<br/><input type="submit" name="Submit" class="button-primary" value="<?php _e( 'Save Settings' ); ?>"/>
|
64 |
|
65 |
</form>
|
66 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
</div>
|
13 |
?>
|
14 |
<div class="wrap">
|
15 |
<div class="icon32"><img src="<?php echo plugins_url(); ?>/simple-embed-code/images/screen_icon.png" alt="" title="" height="32px" width="32px"/><br /></div>
|
16 |
+
<h2><?php _e( 'Code Embed Options', 'simple-embed-code' ); ?></h2>
|
17 |
<?php
|
18 |
// If options have been updated on screen, update the database
|
19 |
if ( ( !empty( $_POST ) ) && ( check_admin_referer( 'code-embed-profile' , 'code_embed_profile_nonce' ) ) ) {
|
37 |
|
38 |
<form method="post" action="<?php echo get_bloginfo( 'wpurl' ) . '/wp-admin/admin.php?page=ace-options&updated=true' ?>">
|
39 |
|
40 |
+
<?php echo '<h3>' . __( 'Identifier Format' ) . '</h3>' . __( 'Specify the format that will be used to define the way the code is embedded in your post. The formats are case insensitive and characters < > [ ] are invalid.', 'simple-embed-code' ); ?>
|
41 |
|
42 |
<table class="form-table">
|
43 |
|
44 |
<tr>
|
45 |
<th scope="row"><?php _e( 'Keyword' ); ?></th>
|
46 |
+
<td><input type="text" size="12" maxlength="12" name="code_embed_keyword" value="<?php echo $options[ 'keyword_ident' ] ; ?>"/> <span class="description"><?php _e( 'The keyword that is used to name the custom field and then place in your post where the code should be embedded. A suffix on any type can then be placed on the end.', 'simple-embed-code' ); ?></span></td>
|
47 |
</tr>
|
48 |
|
49 |
<tr>
|
50 |
<th scope="row"><?php _e( 'Opening Identifier' ); ?></th>
|
51 |
+
<td><input type="text" size="4" maxlength="4" name="code_embed_opening" value="<?php echo $options[ 'opening_ident' ]; ?>"/> <span class="description"><?php _e( 'The character(s) that must be placed in the post before the keyword to uniquely identify it.', 'simple-embed-code' ); ?></span></td>
|
52 |
</tr>
|
53 |
|
54 |
<tr>
|
55 |
<th scope="row"><?php _e( 'Closing Identifier' ); ?></th>
|
56 |
+
<td><input type="text" size="4" maxlength="4" name="code_embed_closing" value="<?php echo $options[ 'closing_ident' ]; ?>"/> <span class="description"><?php _e( 'The character(s) that must be placed in the post after the keyword to uniquely identify it.', 'simple-embed-code' ); ?></span></td>
|
57 |
</tr>
|
58 |
|
59 |
</table>
|
60 |
|
61 |
<?php wp_nonce_field( 'code-embed-profile', 'code_embed_profile_nonce', true, true ); ?>
|
62 |
|
63 |
+
<br/><input type="submit" name="Submit" class="button-primary" value="<?php _e( 'Save Settings', 'simple-embed-code' ); ?>"/>
|
64 |
|
65 |
</form>
|
66 |
|
67 |
+
<?php
|
68 |
+
|
69 |
+
// How to embed
|
70 |
+
|
71 |
+
echo "<br/><h3>" . __( 'How to Embed', 'simple-embed-code' ) . "</h3>\n";
|
72 |
+
echo '<p>' . sprintf ( __( 'Based upon your current settings to embed some code simply add a custom field named %s, where %s is any suffix you wish. The code to embed is then added as the field value.', 'simple-embed-code' ), '<strong>' . $options[ 'keyword_ident' ] . 'x</strong>', '<strong>x</strong>' ) . "</p>\n";
|
73 |
+
echo '<p>' . sprintf ( __( 'Then, to add the code into your post simple add %s where you wish it to appear. %s is the suffix you used for the custom field name.', 'simple-embed-code' ), '<strong>' . $options[ 'opening_ident' ] . $options[ 'keyword_ident' ] . "x" . $options[ 'closing_ident' ] . '</strong>', '<strong>x</strong>' ) . "</p>\n";
|
74 |
+
echo '<p>' . sprintf ( __( 'For example, I may add a custom field named %s, where the value is the code I wish to embed. I would then in my post add %s where I wish the code to then appear.', 'simple-embed-code' ), '<strong>' . $options[ 'keyword_ident' ].'1</strong>', '<strong>' . $options[ 'opening_ident' ] . $options[ 'keyword_ident' ] . "1" . $options[ 'closing_ident' ] . '</strong>' ) . "</p>\n";
|
75 |
+
echo '<p>' . sprintf ( __( 'To embed the same code but to make it responsive you would use %s. To set a maximum width you would use %s, where %s is the maximum width in pixels.', 'simple-embed-code' ), '<strong>' . $options[ 'opening_ident' ] . $options[ 'keyword_ident' ] . "x_RES" . $options[ 'closing_ident' ] . '</strong>', '<strong>' . $options[ 'opening_ident' ] . $options[ 'keyword_ident' ] . "x_RES_y" . $options[ 'closing_ident' ] . '</strong>', '<strong>y</strong>' ) . "</p>\n";
|
76 |
+
echo '<p>' . sprintf ( __( 'To embed an external URL you would type %s, where %s is the URL.', 'simple-embed-code' ), '<strong>' . $options[ 'opening_ident' ] . 'url' . $options[ 'closing_ident' ] . '</strong>', '<strong>url</strong>' ) . "</p>\n";
|
77 |
+
?>
|
78 |
+
|
79 |
</div>
|
includes/ace-readme.php
DELETED
@@ -1,24 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* README Page
|
4 |
-
*
|
5 |
-
* Display the README instructions
|
6 |
-
*
|
7 |
-
* @package Artiss-Code-Embed
|
8 |
-
* @since 2.0
|
9 |
-
*/
|
10 |
-
?>
|
11 |
-
<div class="wrap">
|
12 |
-
<div class="icon32" id="icon-edit-pages"></div>
|
13 |
-
|
14 |
-
<h2><?php _e( 'Artiss Code Embed README'); ?></h2>
|
15 |
-
|
16 |
-
<?php
|
17 |
-
if ( !function_exists( 'wp_readme_parser' ) ) {
|
18 |
-
echo '<p>You shouldn\'t be able to see this but I guess that odd things can happen!<p>';
|
19 |
-
echo '<p>To display the README you must install the <a href="http://wordpress.org/extend/plugins/wp-readme-parser/">README Parser plugin</a>.</p>';
|
20 |
-
} else {
|
21 |
-
echo wp_readme_parser( array( 'exclude' => 'meta,upgrade notice,screenshots,support,changelog,links,installation,licence,reviews & mentions', 'ignore' => 'For help with this plugin,,for more information and advanced options ' ), 'http://plugins.svn.wordpress.org/simple-embed-code/tags/' . artiss_code_embed_version . '/readme.txt' );
|
22 |
-
}
|
23 |
-
?>
|
24 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/ace-search.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* Code Embed
|
4 |
*
|
5 |
* Allow the user to change the default options
|
6 |
*
|
@@ -12,14 +12,10 @@
|
|
12 |
?>
|
13 |
<div class="wrap">
|
14 |
<div class="icon32"><img src="<?php echo plugins_url(); ?>/simple-embed-code/images/screen_icon.png" alt="" title="" height="32px" width="32px"/><br /></div>
|
15 |
-
<h2
|
16 |
|
17 |
<?php
|
18 |
-
|
19 |
-
_e( ace_search_help() );
|
20 |
-
} else {
|
21 |
-
echo '<p>' . __( 'Enter the suffix to search for below and press the \'Search\' button to view the results. Further help can be found by clicking on the Help tab at the top right-hand of the screen.' ) . '</p>';
|
22 |
-
}
|
23 |
?>
|
24 |
|
25 |
<?php
|
@@ -48,7 +44,7 @@ $options = ace_get_embed_paras();
|
|
48 |
|
49 |
<?php wp_nonce_field( 'code-embed-search', 'code_embed_search_nonce', true, true ); ?>
|
50 |
|
51 |
-
<input type="submit" name="Submit" class="button-primary" value="<?php _e( 'Search' ); ?>"/>
|
52 |
|
53 |
</form>
|
54 |
|
@@ -88,7 +84,7 @@ if ( $suffix != '' ) {
|
|
88 |
|
89 |
} else {
|
90 |
|
91 |
-
echo "<p style=\"color: #f00\">" . __( 'No posts were found containing that embed code.') . "</p>\n";
|
92 |
|
93 |
}
|
94 |
}
|
1 |
<?php
|
2 |
/**
|
3 |
+
* Code Embed Search
|
4 |
*
|
5 |
* Allow the user to change the default options
|
6 |
*
|
12 |
?>
|
13 |
<div class="wrap">
|
14 |
<div class="icon32"><img src="<?php echo plugins_url(); ?>/simple-embed-code/images/screen_icon.png" alt="" title="" height="32px" width="32px"/><br /></div>
|
15 |
+
<h2><?php _e( 'Code Embed Search', 'simple-embed-code' ); ?></h2>
|
16 |
|
17 |
<?php
|
18 |
+
echo '<p>' . __( 'Enter the suffix to search for below and press the \'Search\' button to view the results. Further help can be found by clicking on the Help tab at the top right-hand of the screen.', 'simple-embed-code' ) . '</p>';
|
|
|
|
|
|
|
|
|
19 |
?>
|
20 |
|
21 |
<?php
|
44 |
|
45 |
<?php wp_nonce_field( 'code-embed-search', 'code_embed_search_nonce', true, true ); ?>
|
46 |
|
47 |
+
<input type="submit" name="Submit" class="button-primary" value="<?php _e( 'Search', 'simple-embed-code' ); ?>"/>
|
48 |
|
49 |
</form>
|
50 |
|
84 |
|
85 |
} else {
|
86 |
|
87 |
+
echo "<p style=\"color: #f00\">" . __( 'No posts were found containing that embed code.', 'simple-embed-code' ) . "</p>\n";
|
88 |
|
89 |
}
|
90 |
}
|
includes/ace-support.php
DELETED
@@ -1,51 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Support Page
|
4 |
-
*
|
5 |
-
* Support for the plugin
|
6 |
-
*
|
7 |
-
* @package Artiss-Code-Embed
|
8 |
-
* @since 2.0
|
9 |
-
*/
|
10 |
-
?>
|
11 |
-
<div class="wrap">
|
12 |
-
<div class="icon32"><img src="<?php echo plugins_url(); ?>/simple-embed-code/images/screen_icon.png" alt="" title="" height="32px" width="32px"/><br /></div>
|
13 |
-
|
14 |
-
<h2><?php _e( 'Artiss Code Embed Support'); ?></h2>
|
15 |
-
|
16 |
-
<p><?php echo sprintf( __( 'You are using Artiss Code Embed version %s. It was written by David Artiss.' ), artiss_code_embed_version ); ?></p>
|
17 |
-
|
18 |
-
<?php
|
19 |
-
$options = ace_get_embed_paras();
|
20 |
-
|
21 |
-
// How to embed
|
22 |
-
|
23 |
-
echo "<h3>" . __( 'How to Embed' ) . "</h3>\n";
|
24 |
-
echo '<p>' . sprintf ( __( 'Based upon your current settings to embed some code simply add a custom field named %s, where %s is any suffix you wish. The code to embed is then added as the field value.' ), '<strong>' . $options[ 'keyword_ident' ] . 'x</strong>', '<strong>x</strong>' ) . "</p>\n";
|
25 |
-
echo '<p>' . sprintf ( __( 'Then, to add the code into your post simple add %s where you wish it to appear. %s is the suffix you used for the custom field name.' ), '<strong>' . $options[ 'opening_ident' ] . $options[ 'keyword_ident' ] . "x" . $options[ 'closing_ident' ] . '</strong>', '<strong>x</strong>' ) . "</p>\n";
|
26 |
-
echo '<p>' . sprintf ( __( 'For example, I may add a custom field named %s, where the value is the code I wish to embed. I would then in my post add %s where I wish the code to then appear.' ), '<strong>' . $options[ 'keyword_ident' ].'1</strong>', '<strong>' . $options[ 'opening_ident' ] . $options[ 'keyword_ident' ] . "1" . $options[ 'closing_ident' ] . '</strong>' ) . "</p>\n";
|
27 |
-
echo '<p>' . sprintf ( __( 'To embed the same code but to make it responsive you would use %s. To set a maximum width you would use %s, where %s is the maximum width in pixels.' ), '<strong>' . $options[ 'opening_ident' ] . $options[ 'keyword_ident' ] . "x_RES" . $options[ 'closing_ident' ] . '</strong>', '<strong>' . $options[ 'opening_ident' ] . $options[ 'keyword_ident' ] . "x_RES_y" . $options[ 'closing_ident' ] . '</strong>', '<strong>y</strong>' ) . "</p>\n";
|
28 |
-
echo '<p>' . sprintf ( __( 'To embed an external URL you would type %s, where %s is the URL.' ), '<strong>' . $options[ 'opening_ident' ] . 'url' . $options[ 'closing_ident' ] . '</strong>', '<strong>url</strong>' ) . "</p>\n";
|
29 |
-
|
30 |
-
// Support information
|
31 |
-
|
32 |
-
echo '<h3>' . __( 'Support Information' ) . "</h3>\n";
|
33 |
-
echo '<p><a href="http://www.artiss.co.uk/code-embed">' . __( 'Artiss Code Embed Plugin Documentation' ) . "</a></p>\n";
|
34 |
-
echo '<p><a href="http://www.artiss.co.uk/forum/specific-plugins-group2/artiss-code-embed-forum3">' . __( 'Artiss Code Embed Support Forum' ) . "</a></p>\n";
|
35 |
-
echo '<h4>' . __( 'This plugin, and all support, is supplied for free, but <a title="Donate" href="http://artiss.co.uk/donate" target="_blank">donations</a> are always welcome.' ) . "</h4>\n";
|
36 |
-
|
37 |
-
// Acknowledgements
|
38 |
-
|
39 |
-
echo '<h3>' . __( 'Acknowledgements' ) . "</h3>\n";
|
40 |
-
echo '<p>' . sprintf( __( 'Images have been compressed with %s.' ), '<a href="http://www.smushit.com/ysmush.it/">Smush.it</a>' ) . "</p>\n";
|
41 |
-
echo '<p>' . sprintf( __( 'CSS has been compressed with %s.' ), '<a href="http://www.artiss.co.uk/css-compression">Artiss.co.uk CSS Compressor</a>' ) . "</p>\n";
|
42 |
-
|
43 |
-
// Stay in touch
|
44 |
-
|
45 |
-
echo '<h3>' . __( 'Stay in Touch' ) . "</h3>\n";
|
46 |
-
echo '<p>' . __( '<a href="http://www.artiss.co.uk/wp-plugins">See the full list</a> of Artiss plugins, including beta releases.' ) . "</p>\n";
|
47 |
-
echo '<p>' . __( '<a href="http://www.twitter.com/artiss_tech">Follow Artiss.co.uk</a> on Twitter.' ) . "</p>\n";
|
48 |
-
echo '<p>' . __( '<a href="http://www.artiss.co.uk/feed">Subscribe</a> to the Artiss.co.uk news feed.' ) . "</p>\n";
|
49 |
-
|
50 |
-
?>
|
51 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
languages/simple-embed-code.mo
CHANGED
Binary file
|
languages/simple-embed-code.po
CHANGED
@@ -2,15 +2,19 @@ msgid ""
|
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Artiss Code Embed\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date:
|
6 |
-
"PO-Revision-Date:
|
7 |
"Last-Translator: David Artiss <david.artiss@artiss.co.uk>\n"
|
8 |
"Language-Team: \n"
|
|
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"X-Poedit-KeywordsList: __;_e;esc_attr__;esc_attr_e;esc_html__;esc_html_e;_x;
|
|
|
13 |
"X-Poedit-Basepath: ../\n"
|
|
|
|
|
14 |
"X-Poedit-SearchPath-0: .\n"
|
15 |
|
16 |
#: includes/ace-admin-config.php:29
|
@@ -21,69 +25,82 @@ msgstr ""
|
|
21 |
msgid "Support"
|
22 |
msgstr ""
|
23 |
|
24 |
-
#: includes/ace-admin-config.php:
|
25 |
-
msgid "
|
26 |
msgstr ""
|
27 |
|
28 |
-
#: includes/ace-admin-config.php:
|
29 |
-
|
30 |
-
msgid "Help"
|
31 |
msgstr ""
|
32 |
|
33 |
-
#: includes/ace-admin-config.php:
|
34 |
-
msgid "
|
35 |
msgstr ""
|
36 |
|
37 |
-
#: includes/ace-admin-config.php:
|
38 |
-
msgid "
|
39 |
msgstr ""
|
40 |
|
41 |
-
#: includes/ace-admin-config.php:
|
42 |
-
msgid "
|
43 |
msgstr ""
|
44 |
|
45 |
-
#: includes/ace-admin-config.php:
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
msgstr ""
|
50 |
|
51 |
-
#: includes/ace-admin-config.php:
|
52 |
-
msgid "
|
|
|
|
|
53 |
msgstr ""
|
54 |
|
55 |
-
#: includes/ace-admin-config.php:
|
56 |
-
msgid "
|
|
|
|
|
57 |
msgstr ""
|
58 |
|
59 |
-
#: includes/ace-admin-config.php:
|
60 |
-
|
|
|
61 |
msgstr ""
|
62 |
|
63 |
-
#: includes/ace-admin-config.php:
|
64 |
-
msgid "
|
|
|
|
|
65 |
msgstr ""
|
66 |
|
67 |
-
#: includes/ace-admin-config.php:
|
68 |
-
msgid "
|
|
|
|
|
|
|
69 |
msgstr ""
|
70 |
|
71 |
-
#: includes/ace-admin-config.php:
|
72 |
-
msgid "
|
|
|
|
|
73 |
msgstr ""
|
74 |
|
75 |
-
#: includes/ace-filter.php:
|
76 |
#, php-format
|
77 |
-
msgid "
|
|
|
|
|
78 |
msgstr ""
|
79 |
|
80 |
-
#: includes/ace-filter.php:
|
81 |
#, php-format
|
82 |
msgid "No embed code was found for %s"
|
83 |
msgstr ""
|
84 |
|
85 |
#: includes/ace-options.php:16
|
86 |
-
msgid "
|
87 |
msgstr ""
|
88 |
|
89 |
#: includes/ace-options.php:40
|
@@ -91,7 +108,10 @@ msgid "Identifier Format"
|
|
91 |
msgstr ""
|
92 |
|
93 |
#: includes/ace-options.php:40
|
94 |
-
msgid "
|
|
|
|
|
|
|
95 |
msgstr ""
|
96 |
|
97 |
#: includes/ace-options.php:45
|
@@ -99,7 +119,10 @@ msgid "Keyword"
|
|
99 |
msgstr ""
|
100 |
|
101 |
#: includes/ace-options.php:46
|
102 |
-
msgid "
|
|
|
|
|
|
|
103 |
msgstr ""
|
104 |
|
105 |
#: includes/ace-options.php:50
|
@@ -107,7 +130,9 @@ msgid "Opening Identifier"
|
|
107 |
msgstr ""
|
108 |
|
109 |
#: includes/ace-options.php:51
|
110 |
-
msgid "
|
|
|
|
|
111 |
msgstr ""
|
112 |
|
113 |
#: includes/ace-options.php:55
|
@@ -115,106 +140,65 @@ msgid "Closing Identifier"
|
|
115 |
msgstr ""
|
116 |
|
117 |
#: includes/ace-options.php:56
|
118 |
-
msgid "
|
|
|
|
|
119 |
msgstr ""
|
120 |
|
121 |
#: includes/ace-options.php:63
|
122 |
msgid "Save Settings"
|
123 |
msgstr ""
|
124 |
|
125 |
-
#: includes/ace-
|
126 |
-
msgid "Artiss Code Embed README"
|
127 |
-
msgstr ""
|
128 |
-
|
129 |
-
#: includes/ace-search.php:21
|
130 |
-
msgid "Enter the suffix to search for below and press the 'Search' button to view the results. Further help can be found by clicking on the Help tab at the top right-hand of the screen."
|
131 |
-
msgstr ""
|
132 |
-
|
133 |
-
#: includes/ace-search.php:51
|
134 |
-
msgid "Search"
|
135 |
-
msgstr ""
|
136 |
-
|
137 |
-
#: includes/ace-search.php:91
|
138 |
-
msgid "No posts were found containing that embed code."
|
139 |
-
msgstr ""
|
140 |
-
|
141 |
-
#: includes/ace-support.php:14
|
142 |
-
msgid "Artiss Code Embed Support"
|
143 |
-
msgstr ""
|
144 |
-
|
145 |
-
#: includes/ace-support.php:16
|
146 |
-
#, php-format
|
147 |
-
msgid "You are using Artiss Code Embed version %s. It was written by David Artiss."
|
148 |
-
msgstr ""
|
149 |
-
|
150 |
-
#: includes/ace-support.php:23
|
151 |
msgid "How to Embed"
|
152 |
msgstr ""
|
153 |
|
154 |
-
#: includes/ace-
|
155 |
#, php-format
|
156 |
-
msgid "
|
|
|
|
|
|
|
157 |
msgstr ""
|
158 |
|
159 |
-
#: includes/ace-
|
160 |
#, php-format
|
161 |
-
msgid "
|
|
|
|
|
162 |
msgstr ""
|
163 |
|
164 |
-
#: includes/ace-
|
165 |
#, php-format
|
166 |
-
msgid "
|
|
|
|
|
|
|
167 |
msgstr ""
|
168 |
|
169 |
-
#: includes/ace-
|
170 |
#, php-format
|
171 |
-
msgid "
|
|
|
|
|
172 |
msgstr ""
|
173 |
|
174 |
-
#: includes/ace-
|
175 |
#, php-format
|
176 |
msgid "To embed an external URL you would type %s, where %s is the URL."
|
177 |
msgstr ""
|
178 |
|
179 |
-
#: includes/ace-
|
180 |
-
msgid "
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
msgid "Artiss Code Embed Plugin Documentation"
|
185 |
-
msgstr ""
|
186 |
-
|
187 |
-
#: includes/ace-support.php:34
|
188 |
-
msgid "Artiss Code Embed Support Forum"
|
189 |
-
msgstr ""
|
190 |
-
|
191 |
-
#: includes/ace-support.php:39
|
192 |
-
msgid "Acknowledgements"
|
193 |
-
msgstr ""
|
194 |
-
|
195 |
-
#: includes/ace-support.php:40
|
196 |
-
#, php-format
|
197 |
-
msgid "Images have been compressed with %s."
|
198 |
-
msgstr ""
|
199 |
-
|
200 |
-
#: includes/ace-support.php:41
|
201 |
-
#, php-format
|
202 |
-
msgid "CSS has been compressed with %s."
|
203 |
-
msgstr ""
|
204 |
-
|
205 |
-
#: includes/ace-support.php:45
|
206 |
-
msgid "Stay in Touch"
|
207 |
-
msgstr ""
|
208 |
-
|
209 |
-
#: includes/ace-support.php:46
|
210 |
-
msgid "<a href=\"http://www.artiss.co.uk/wp-plugins\">See the full list</a> of Artiss plugins, including beta releases."
|
211 |
msgstr ""
|
212 |
|
213 |
-
#: includes/ace-
|
214 |
-
msgid "
|
215 |
msgstr ""
|
216 |
|
217 |
-
#: includes/ace-
|
218 |
-
msgid "
|
219 |
msgstr ""
|
220 |
-
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Artiss Code Embed\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2014-04-03 10:26-0000\n"
|
6 |
+
"PO-Revision-Date: 2014-04-03 10:26-0000\n"
|
7 |
"Last-Translator: David Artiss <david.artiss@artiss.co.uk>\n"
|
8 |
"Language-Team: \n"
|
9 |
+
"Language: en_GB\n"
|
10 |
"MIME-Version: 1.0\n"
|
11 |
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
"Content-Transfer-Encoding: 8bit\n"
|
13 |
+
"X-Poedit-KeywordsList: __;_e;esc_attr__;esc_attr_e;esc_html__;esc_html_e;_x;"
|
14 |
+
"_ex;esc_attr_x;esc_html_x;_n;_nx;_n_noop;_nx_noop\n"
|
15 |
"X-Poedit-Basepath: ../\n"
|
16 |
+
"X-Generator: Poedit 1.6.4\n"
|
17 |
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
18 |
"X-Poedit-SearchPath-0: .\n"
|
19 |
|
20 |
#: includes/ace-admin-config.php:29
|
25 |
msgid "Support"
|
26 |
msgstr ""
|
27 |
|
28 |
+
#: includes/ace-admin-config.php:76 includes/ace-search.php:15
|
29 |
+
msgid "Code Embed Search"
|
30 |
msgstr ""
|
31 |
|
32 |
+
#: includes/ace-admin-config.php:76
|
33 |
+
msgid "Code Search"
|
|
|
34 |
msgstr ""
|
35 |
|
36 |
+
#: includes/ace-admin-config.php:84
|
37 |
+
msgid "Code Embed Settings"
|
38 |
msgstr ""
|
39 |
|
40 |
+
#: includes/ace-admin-config.php:84
|
41 |
+
msgid "Code Embed"
|
42 |
msgstr ""
|
43 |
|
44 |
+
#: includes/ace-admin-config.php:108 includes/ace-admin-config.php:128
|
45 |
+
msgid "Help"
|
46 |
msgstr ""
|
47 |
|
48 |
+
#: includes/ace-admin-config.php:171
|
49 |
+
msgid ""
|
50 |
+
"Use this screen to modify the identifiers and keyword used to specify your "
|
51 |
+
"embedded code."
|
52 |
msgstr ""
|
53 |
|
54 |
+
#: includes/ace-admin-config.php:172
|
55 |
+
msgid ""
|
56 |
+
"The keyword is the name used for your custom field. The custom field's value "
|
57 |
+
"is the code that you wish to embed."
|
58 |
msgstr ""
|
59 |
|
60 |
+
#: includes/ace-admin-config.php:173
|
61 |
+
msgid ""
|
62 |
+
"The keyword, sandwiched with the identifier before and after, is what you "
|
63 |
+
"then need to add to your post or page to activate the embed code."
|
64 |
msgstr ""
|
65 |
|
66 |
+
#: includes/ace-admin-config.php:174
|
67 |
+
#, php-format
|
68 |
+
msgid "You are using Code Embed version %s. It was written by Dark Designs."
|
69 |
msgstr ""
|
70 |
|
71 |
+
#: includes/ace-admin-config.php:192
|
72 |
+
msgid ""
|
73 |
+
"This screen allows you to search for the post and pages that a particular "
|
74 |
+
"code embed has been used in."
|
75 |
msgstr ""
|
76 |
|
77 |
+
#: includes/ace-admin-config.php:193
|
78 |
+
msgid ""
|
79 |
+
"Simply enter the code suffix that you wish to search for and press the "
|
80 |
+
"'Search' key to display a list of all the posts using it. In addition the "
|
81 |
+
"code will be shown alongside it. Click on the post name to edit the post."
|
82 |
msgstr ""
|
83 |
|
84 |
+
#: includes/ace-admin-config.php:194
|
85 |
+
msgid ""
|
86 |
+
"The search results are grouped together in matching code groups, so posts "
|
87 |
+
"with the same code will be shown together with the same colour background."
|
88 |
msgstr ""
|
89 |
|
90 |
+
#: includes/ace-filter.php:231
|
91 |
#, php-format
|
92 |
+
msgid ""
|
93 |
+
"Cannot use %s as a global code as it is being used to store %d unique pieces "
|
94 |
+
"of code in %d posts - <a href=\"%s\">click here</a> for more details"
|
95 |
msgstr ""
|
96 |
|
97 |
+
#: includes/ace-filter.php:238
|
98 |
#, php-format
|
99 |
msgid "No embed code was found for %s"
|
100 |
msgstr ""
|
101 |
|
102 |
#: includes/ace-options.php:16
|
103 |
+
msgid "Code Embed Options"
|
104 |
msgstr ""
|
105 |
|
106 |
#: includes/ace-options.php:40
|
108 |
msgstr ""
|
109 |
|
110 |
#: includes/ace-options.php:40
|
111 |
+
msgid ""
|
112 |
+
"Specify the format that will be used to define the way the code is embedded "
|
113 |
+
"in your post. The formats are case insensitive and characters < > [ ] "
|
114 |
+
"are invalid."
|
115 |
msgstr ""
|
116 |
|
117 |
#: includes/ace-options.php:45
|
119 |
msgstr ""
|
120 |
|
121 |
#: includes/ace-options.php:46
|
122 |
+
msgid ""
|
123 |
+
"The keyword that is used to name the custom field and then place in your "
|
124 |
+
"post where the code should be embedded. A suffix on any type can then be "
|
125 |
+
"placed on the end."
|
126 |
msgstr ""
|
127 |
|
128 |
#: includes/ace-options.php:50
|
130 |
msgstr ""
|
131 |
|
132 |
#: includes/ace-options.php:51
|
133 |
+
msgid ""
|
134 |
+
"The character(s) that must be placed in the post before the keyword to "
|
135 |
+
"uniquely identify it."
|
136 |
msgstr ""
|
137 |
|
138 |
#: includes/ace-options.php:55
|
140 |
msgstr ""
|
141 |
|
142 |
#: includes/ace-options.php:56
|
143 |
+
msgid ""
|
144 |
+
"The character(s) that must be placed in the post after the keyword to "
|
145 |
+
"uniquely identify it."
|
146 |
msgstr ""
|
147 |
|
148 |
#: includes/ace-options.php:63
|
149 |
msgid "Save Settings"
|
150 |
msgstr ""
|
151 |
|
152 |
+
#: includes/ace-options.php:71
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
153 |
msgid "How to Embed"
|
154 |
msgstr ""
|
155 |
|
156 |
+
#: includes/ace-options.php:72
|
157 |
#, php-format
|
158 |
+
msgid ""
|
159 |
+
"Based upon your current settings to embed some code simply add a custom "
|
160 |
+
"field named %s, where %s is any suffix you wish. The code to embed is then "
|
161 |
+
"added as the field value."
|
162 |
msgstr ""
|
163 |
|
164 |
+
#: includes/ace-options.php:73
|
165 |
#, php-format
|
166 |
+
msgid ""
|
167 |
+
"Then, to add the code into your post simple add %s where you wish it to "
|
168 |
+
"appear. %s is the suffix you used for the custom field name."
|
169 |
msgstr ""
|
170 |
|
171 |
+
#: includes/ace-options.php:74
|
172 |
#, php-format
|
173 |
+
msgid ""
|
174 |
+
"For example, I may add a custom field named %s, where the value is the code "
|
175 |
+
"I wish to embed. I would then in my post add %s where I wish the code to "
|
176 |
+
"then appear."
|
177 |
msgstr ""
|
178 |
|
179 |
+
#: includes/ace-options.php:75
|
180 |
#, php-format
|
181 |
+
msgid ""
|
182 |
+
"To embed the same code but to make it responsive you would use %s. To set a "
|
183 |
+
"maximum width you would use %s, where %s is the maximum width in pixels."
|
184 |
msgstr ""
|
185 |
|
186 |
+
#: includes/ace-options.php:76
|
187 |
#, php-format
|
188 |
msgid "To embed an external URL you would type %s, where %s is the URL."
|
189 |
msgstr ""
|
190 |
|
191 |
+
#: includes/ace-search.php:18
|
192 |
+
msgid ""
|
193 |
+
"Enter the suffix to search for below and press the 'Search' button to view "
|
194 |
+
"the results. Further help can be found by clicking on the Help tab at the "
|
195 |
+
"top right-hand of the screen."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
196 |
msgstr ""
|
197 |
|
198 |
+
#: includes/ace-search.php:47
|
199 |
+
msgid "Search"
|
200 |
msgstr ""
|
201 |
|
202 |
+
#: includes/ace-search.php:87
|
203 |
+
msgid "No posts were found containing that embed code."
|
204 |
msgstr ""
|
|
readme.txt
CHANGED
@@ -1,15 +1,15 @@
|
|
1 |
-
===
|
2 |
-
Contributors:
|
3 |
Tags: artiss, embed, code, html, javascript, script, simple, video, xhtml, youtube
|
4 |
-
Requires at least:
|
5 |
-
Tested up to:
|
6 |
-
Stable tag: 2.
|
7 |
|
8 |
-
|
9 |
|
10 |
== Description ==
|
11 |
|
12 |
-
|
13 |
|
14 |
Features include..
|
15 |
|
@@ -20,7 +20,7 @@ Features include..
|
|
20 |
* Search for embedding code via a simple search option
|
21 |
* Add a simple suffix to the embed code to convert videos to responsive output
|
22 |
* Embed an external script directly using just the URL
|
23 |
-
* Fully internationalized ready for translations. **If you would like to add a translation to his plugin then please [
|
24 |
|
25 |
Here's how easy it is...
|
26 |
|
@@ -34,11 +34,9 @@ This should get you started - for more information and advanced options please r
|
|
34 |
|
35 |
Although this plugin works for both posts and pages for simplicity I will simply refer to posts - bear in mind that pages work in the same way.
|
36 |
|
37 |
-
**For help with this plugin, or simply to comment or get in touch, please read the appropriate section in "Other Notes" for details. This plugin, and all support, is supplied for free, but [donations](http://artiss.co.uk/donate "Donate") are always welcome.**
|
38 |
-
|
39 |
== Options Screen ==
|
40 |
|
41 |
-
In the administration menu there is a new
|
42 |
|
43 |
Code embedding is performed via a special keyword that you must use to uniquely identify where you wish the code to appear. This consist of an opening identifier (some that that goes at the beginning), a keyword and then a closing identifier. You may also add a suffix to the end of the keyword if you wish to embed multiple pieces of code within the same post.
|
44 |
|
@@ -82,11 +80,11 @@ So, let's say in one post you define a custom field named `CODE1`. You can, if y
|
|
82 |
|
83 |
However, bear in mind that the embed code name must be unique - you can't have defined it in multiple posts otherwise the plugin won't know which one you're referring to (although it will report this and list the posts that it has been used in).
|
84 |
|
85 |
-
In the administration menu there is a sidebar menu named "
|
86 |
|
87 |
== Embedding in Widgets ==
|
88 |
|
89 |
-
Natively you cannot use the embed facilities within sidebar widgets. However, if you install the plugin [Widget Logic](http://wordpress.org/extend/plugins/widget-logic/ "Widget Logic") then
|
90 |
|
91 |
* Install [Widget Logic](http://wordpress.org/extend/plugins/widget-logic/ "Widget Logic") and activate.
|
92 |
* In Administration, select the Widgets page from the Appearance menu. At the bottom there will be a set of Widget Logic options.
|
@@ -98,7 +96,7 @@ Although you cannot set up embed code within a widget you can make reference to
|
|
98 |
|
99 |
Responsive output is where an element on a web page dynamically resizes depending upon the current available size. Most video embeds, for instance, will be a fixed size. This is fine if your website is also of a fixed size, however if you have a responsive site then this is not suitable.
|
100 |
|
101 |
-
|
102 |
|
103 |
To use, when adding the embed code onto the page, simply add `_RES` to the end, before the final identifier. For example, `%CODE1_RES%`. The `_RES` should not be added to the custom fields definition.
|
104 |
|
@@ -112,16 +110,6 @@ If you don't wish the output to be full width you can specify a maximum width by
|
|
112 |
|
113 |
This WordPress plugin is licensed under the [GPLv2 (or later)](http://wordpress.org/about/gpl/ "GNU General Public License").
|
114 |
|
115 |
-
== Support ==
|
116 |
-
|
117 |
-
All of my plugins are supported via [my website](http://www.artiss.co.uk "Artiss.co.uk").
|
118 |
-
|
119 |
-
Please feel free to visit the site for plugin updates and development news - either visit the site regularly, follow [my news feed](http://www.artiss.co.uk/feed "RSS News Feed") or [follow me on Twitter](http://www.twitter.com/artiss_tech "Artiss.co.uk on Twitter") (@artiss_tech).
|
120 |
-
|
121 |
-
For problems, suggestions or enhancements for this plugin, there is [a dedicated page](http://www.artiss.co.uk/code-embed "Artiss Code Embed") and [a forum](http://www.artiss.co.uk/forum "WordPress Plugins Forum"). The dedicated page will also list any known issues and planned enhancements.
|
122 |
-
|
123 |
-
**This plugin, and all support, is supplied for free, but [donations](http://artiss.co.uk/donate "Donate") are always welcome.**
|
124 |
-
|
125 |
== Reviews & Mentions ==
|
126 |
|
127 |
"Works like a dream. Fantastic!" - Anita.
|
@@ -160,12 +148,17 @@ Please note, however, that the minimum for WordPress is now PHP 5.2.4. Even thou
|
|
160 |
1. The custom field meta box with a Code Embed field set up to show some YouTube embed code
|
161 |
2. Example embed code in a post
|
162 |
3. The resultant video from the previous example code
|
163 |
-
4. The
|
164 |
-
5. The
|
165 |
-
6. The search screen, showing search results
|
166 |
|
167 |
== Changelog ==
|
168 |
|
|
|
|
|
|
|
|
|
|
|
|
|
169 |
= 2.0.2 =
|
170 |
* Enhancement: Fixed [minor XSS vulnerability](https://bugzilla.mozilla.org/show_bug.cgi?id=771315 "Bug 771315 - WP Plugin Simple-embed-Code - Fix XSS Before Adding to Hacks Blog") (kindly reported by Mozilla)
|
171 |
* Enhancement: Shows README appropriate to the current installed version, instead of the latest
|
1 |
+
=== Code Embed ===
|
2 |
+
Contributors: dartiss
|
3 |
Tags: artiss, embed, code, html, javascript, script, simple, video, xhtml, youtube
|
4 |
+
Requires at least: 3.3
|
5 |
+
Tested up to: 4.2.2
|
6 |
+
Stable tag: 2.1
|
7 |
|
8 |
+
Code Embed provides a very easy and efficient way to embed code (JavaScript and HTML) in your posts and pages.
|
9 |
|
10 |
== Description ==
|
11 |
|
12 |
+
Code Embed allows you to embed code - JavaScript and HTML primarily - in a post. This is incredibly useful for embedding video, etc, when required and is used, amongst other, by Mozilla. It cannot be used for server side code, such as PHP.
|
13 |
|
14 |
Features include..
|
15 |
|
20 |
* Search for embedding code via a simple search option
|
21 |
* Add a simple suffix to the embed code to convert videos to responsive output
|
22 |
* Embed an external script directly using just the URL
|
23 |
+
* Fully internationalized ready for translations. **If you would like to add a translation to his plugin then please let us know via the plugins' [forum](http://wordpress.org/support/plugin/simple-embed-code "Plugin Forums")**
|
24 |
|
25 |
Here's how easy it is...
|
26 |
|
34 |
|
35 |
Although this plugin works for both posts and pages for simplicity I will simply refer to posts - bear in mind that pages work in the same way.
|
36 |
|
|
|
|
|
37 |
== Options Screen ==
|
38 |
|
39 |
+
In the administration menu there is a new settings option named "Code Embed".
|
40 |
|
41 |
Code embedding is performed via a special keyword that you must use to uniquely identify where you wish the code to appear. This consist of an opening identifier (some that that goes at the beginning), a keyword and then a closing identifier. You may also add a suffix to the end of the keyword if you wish to embed multiple pieces of code within the same post.
|
42 |
|
80 |
|
81 |
However, bear in mind that the embed code name must be unique - you can't have defined it in multiple posts otherwise the plugin won't know which one you're referring to (although it will report this and list the posts that it has been used in).
|
82 |
|
83 |
+
In the administration menu there is a sidebar menu named "Tools". Under this is a sub-menu named "Code Search". Use this to search for specific embed names and it will list all the posts/pages that they're used on, along with the code for each.
|
84 |
|
85 |
== Embedding in Widgets ==
|
86 |
|
87 |
+
Natively you cannot use the embed facilities within sidebar widgets. However, if you install the plugin [Widget Logic](http://wordpress.org/extend/plugins/widget-logic/ "Widget Logic") then Code Embed has been set up to make use of this and add the ability.
|
88 |
|
89 |
* Install [Widget Logic](http://wordpress.org/extend/plugins/widget-logic/ "Widget Logic") and activate.
|
90 |
* In Administration, select the Widgets page from the Appearance menu. At the bottom there will be a set of Widget Logic options.
|
96 |
|
97 |
Responsive output is where an element on a web page dynamically resizes depending upon the current available size. Most video embeds, for instance, will be a fixed size. This is fine if your website is also of a fixed size, however if you have a responsive site then this is not suitable.
|
98 |
|
99 |
+
Code Embed provides a simple suffix that can be added to an embed code and will convert the output to being responsive. This works best with videos.
|
100 |
|
101 |
To use, when adding the embed code onto the page, simply add `_RES` to the end, before the final identifier. For example, `%CODE1_RES%`. The `_RES` should not be added to the custom fields definition.
|
102 |
|
110 |
|
111 |
This WordPress plugin is licensed under the [GPLv2 (or later)](http://wordpress.org/about/gpl/ "GNU General Public License").
|
112 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
113 |
== Reviews & Mentions ==
|
114 |
|
115 |
"Works like a dream. Fantastic!" - Anita.
|
148 |
1. The custom field meta box with a Code Embed field set up to show some YouTube embed code
|
149 |
2. Example embed code in a post
|
150 |
3. The resultant video from the previous example code
|
151 |
+
4. The options screen
|
152 |
+
5. The search screen, showing search results
|
|
|
153 |
|
154 |
== Changelog ==
|
155 |
|
156 |
+
= 2.1 =
|
157 |
+
* Maintenance: Updated plugin branding
|
158 |
+
* Maintenance: Removed feature pointer - no longer required
|
159 |
+
* Enhancement: Removed support screen and moved remaining admin screens
|
160 |
+
* Bug: Fixed issues with translations
|
161 |
+
|
162 |
= 2.0.2 =
|
163 |
* Enhancement: Fixed [minor XSS vulnerability](https://bugzilla.mozilla.org/show_bug.cgi?id=771315 "Bug 771315 - WP Plugin Simple-embed-Code - Fix XSS Before Adding to Hacks Blog") (kindly reported by Mozilla)
|
164 |
* Enhancement: Shows README appropriate to the current installed version, instead of the latest
|
screenshot-4.png
CHANGED
Binary file
|
screenshot-5.png
CHANGED
Binary file
|
screenshot-6.png
DELETED
Binary file
|
simple-code-embed.php
CHANGED
@@ -1,11 +1,9 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
-
Plugin Name:
|
4 |
-
Plugin URI: http://www.artiss.co.uk/code-embed
|
5 |
Description: Allows you to embed code into your posts & pages
|
6 |
-
Version: 2.
|
7 |
-
Author:
|
8 |
-
Author URI: http://www.artiss.co.uk
|
9 |
*/
|
10 |
|
11 |
/**
|
@@ -17,7 +15,7 @@ Author URI: http://www.artiss.co.uk
|
|
17 |
* @since 1.6
|
18 |
*/
|
19 |
|
20 |
-
define( 'artiss_code_embed_version', '2.
|
21 |
|
22 |
function ace_load_plugin_textdomain() {
|
23 |
load_plugin_textdomain( 'simple-embed-code', false, 'simple-embed-code/languages' );
|
1 |
<?php
|
2 |
/*
|
3 |
+
Plugin Name: Code Embed
|
|
|
4 |
Description: Allows you to embed code into your posts & pages
|
5 |
+
Version: 2.1
|
6 |
+
Author: dartiss
|
|
|
7 |
*/
|
8 |
|
9 |
/**
|
15 |
* @since 1.6
|
16 |
*/
|
17 |
|
18 |
+
define( 'artiss_code_embed_version', '2.1' );
|
19 |
|
20 |
function ace_load_plugin_textdomain() {
|
21 |
load_plugin_textdomain( 'simple-embed-code', false, 'simple-embed-code/languages' );
|
uninstall.php
CHANGED
@@ -16,4 +16,5 @@ if ( !defined( 'WP_UNINSTALL_PLUGIN' ) ) {
|
|
16 |
// Delete any options
|
17 |
delete_option( 'artiss_code_embed' );
|
18 |
delete_option( 'simple_code_embed' );
|
|
|
19 |
?>
|
16 |
// Delete any options
|
17 |
delete_option( 'artiss_code_embed' );
|
18 |
delete_option( 'simple_code_embed' );
|
19 |
+
delete_option( 'artiss_code_embed_activated' );
|
20 |
?>
|