Version Description
- Maintenance: Updated help text
- Maintenance: Modified admin screen headings so they're compatible with WP4.3
- Enhancement: Added options to suppress debug output
- Enhancement: Added donation link to plugin meta. Go on, you know you want to...
Download this release
Release Info
Developer | dartiss |
Plugin | Code Embed |
Version | 2.1.1 |
Comparing to | |
See all releases |
Code changes from version 2.1 to 2.1.1
- css/ace-video-container UNCOMPRESSED.css +0 -0
- css/ace-video-container.css +0 -0
- images/menu_icon.png +0 -0
- images/screen_icon.png +0 -0
- includes/ace-add-scripts.php +0 -0
- includes/ace-admin-config.php +6 -4
- includes/ace-filter.php +7 -4
- includes/ace-get-options.php +1 -1
- includes/ace-options.php +17 -6
- includes/ace-search.php +5 -2
- languages/simple-embed-code.mo +0 -0
- languages/simple-embed-code.po +59 -40
- languages/simple-embed-code.pot +0 -0
- readme.txt +27 -11
- screenshot-1.png +0 -0
- screenshot-2.png +0 -0
- screenshot-3.png +0 -0
- screenshot-4.png +0 -0
- screenshot-5.png +0 -0
- simple-code-embed.php +6 -4
- uninstall.php +0 -0
css/ace-video-container UNCOMPRESSED.css
CHANGED
File without changes
|
css/ace-video-container.css
CHANGED
File without changes
|
images/menu_icon.png
CHANGED
File without changes
|
images/screen_icon.png
CHANGED
File without changes
|
includes/ace-add-scripts.php
CHANGED
File without changes
|
includes/ace-admin-config.php
CHANGED
@@ -51,6 +51,7 @@ function ace_set_plugin_meta( $links, $file ) {
|
|
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;
|
@@ -73,7 +74,7 @@ function ace_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 |
|
@@ -105,7 +106,7 @@ function ace_add_options_help() {
|
|
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 |
/**
|
@@ -168,10 +169,11 @@ function ace_search() {
|
|
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
|
175 |
|
176 |
|
177 |
return $help_text;
|
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 |
+
$links = array_merge( $links, array( '<a href="http://www.artiss.co.uk/donate">' . __( 'Donate', 'simple-embed-code' ) . '</a>' ) );
|
55 |
}
|
56 |
|
57 |
return $links;
|
74 |
|
75 |
global $ace_search_hook;
|
76 |
|
77 |
+
$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' );
|
78 |
|
79 |
add_action('load-'.$ace_search_hook, 'ace_add_search_help');
|
80 |
|
106 |
|
107 |
if ( $screen->id != $ace_options_hook ) { return; }
|
108 |
|
109 |
+
$screen -> add_help_tab( array( 'id' => 'ace-options-help-tab', 'title' => __( 'Help', 'simple-embed-code' ), 'content' => ace_options_help() ) );
|
110 |
}
|
111 |
|
112 |
/**
|
169 |
|
170 |
function ace_options_help() {
|
171 |
|
172 |
+
$help_text = '<p>' . __( 'Use this screen to modify the various settings, including the identifiers and keyword used to specify your embedded code.', 'simple-embed-code' ) . '</p>';
|
173 |
+
$help_text .= '<p>' . __( 'The first option allows to suppress debug output. Normally this is an HTML comment in your page source - if you wish to hide this then simply ticket this option.', 'simple-embed-code' ) . '</p>';
|
174 |
$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>';
|
175 |
$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>';
|
176 |
+
$help_text .= '<p>' . sprintf( __( 'You are using Code Embed version %s. It was written by David Artiss.', 'simple-embed-code' ), artiss_code_embed_version ) . '</p>';
|
177 |
|
178 |
|
179 |
return $help_text;
|
includes/ace-filter.php
CHANGED
@@ -95,7 +95,7 @@ function ace_filter( $content ) {
|
|
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 |
|
@@ -164,12 +164,14 @@ function ace_quick_replace( $content = '', $options = '', $search = '' ) {
|
|
164 |
* @param $plugin_name string The name of the plugin (required)
|
165 |
* @param $responsive string Responsive output required? (optional)
|
166 |
* @param $max_width string Maximum width of responsive output (optional)
|
|
|
167 |
* @return string The embed code
|
168 |
*/
|
169 |
|
170 |
-
function ace_generate_code( $html, $plugin_name, $responsive = '', $max_width = '' ) {
|
171 |
|
172 |
-
$code = "\n
|
|
|
173 |
|
174 |
if ( $max_width !== false ) { $code .= '<div style="width: ' . $max_width . 'px; max-width: 100%">'; }
|
175 |
|
@@ -181,7 +183,8 @@ function ace_generate_code( $html, $plugin_name, $responsive = '', $max_width =
|
|
181 |
|
182 |
if ( $max_width !== false ) { $code .= '</div>'; }
|
183 |
|
184 |
-
$code .= "\n
|
|
|
185 |
|
186 |
return $code;
|
187 |
}
|
95 |
|
96 |
// Build the string of code to replace with
|
97 |
|
98 |
+
$replace = ace_generate_code( $html, 'Code Embed', $responsive, $max_width, $options[ 'debug' ] );
|
99 |
|
100 |
// Now modify all references
|
101 |
|
164 |
* @param $plugin_name string The name of the plugin (required)
|
165 |
* @param $responsive string Responsive output required? (optional)
|
166 |
* @param $max_width string Maximum width of responsive output (optional)
|
167 |
+
* @param $debug boolean Whether to suppress debug output (1) or not
|
168 |
* @return string The embed code
|
169 |
*/
|
170 |
|
171 |
+
function ace_generate_code( $html, $plugin_name, $responsive = '', $max_width = '', $debug = '' ) {
|
172 |
|
173 |
+
$code = "\n";
|
174 |
+
if ( $debug != 1 ) { $code .= '<!-- ' . $plugin_name . ' v' . artiss_code_embed_version . " -->\n"; }
|
175 |
|
176 |
if ( $max_width !== false ) { $code .= '<div style="width: ' . $max_width . 'px; max-width: 100%">'; }
|
177 |
|
183 |
|
184 |
if ( $max_width !== false ) { $code .= '</div>'; }
|
185 |
|
186 |
+
$code .= "\n";
|
187 |
+
if ( $debug != 1 ) { $code .= '<!-- End of ' . $plugin_name . " code -->\n"; }
|
188 |
|
189 |
return $code;
|
190 |
}
|
includes/ace-get-options.php
CHANGED
@@ -18,7 +18,7 @@ function ace_get_embed_paras() {
|
|
18 |
// If array doesn't exist, set defaults
|
19 |
|
20 |
if ( !is_array( $options ) ) {
|
21 |
-
$options = array( 'opening_ident' => '%', 'keyword_ident' => 'CODE', 'closing_ident' => '%' );
|
22 |
$changed = true;
|
23 |
}
|
24 |
|
18 |
// If array doesn't exist, set defaults
|
19 |
|
20 |
if ( !is_array( $options ) ) {
|
21 |
+
$options = array( 'opening_ident' => '%', 'keyword_ident' => 'CODE', 'closing_ident' => '%', 'debug' => '' );
|
22 |
$changed = true;
|
23 |
}
|
24 |
|
includes/ace-options.php
CHANGED
@@ -12,8 +12,11 @@
|
|
12 |
*/
|
13 |
?>
|
14 |
<div class="wrap">
|
15 |
-
|
16 |
-
|
|
|
|
|
|
|
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' ) ) ) {
|
@@ -22,6 +25,7 @@ if ( ( !empty( $_POST ) ) && ( check_admin_referer( 'code-embed-profile' , 'code
|
|
22 |
$options[ 'opening_ident' ] = strtoupper( trim( $_POST[ 'code_embed_opening' ], '[]<>' ) );
|
23 |
$options[ 'keyword_ident' ] = strtoupper( trim( $_POST[ 'code_embed_keyword' ], '[]<>' ) );
|
24 |
$options[ 'closing_ident' ] = strtoupper( trim( $_POST[ 'code_embed_closing' ], '[]<>' ) );
|
|
|
25 |
|
26 |
// If any fields are blank assign default values
|
27 |
if ( $options[ 'opening_ident' ] == '' ) { $options[ 'opening_ident' ] = '%'; }
|
@@ -37,22 +41,29 @@ $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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
|
12 |
*/
|
13 |
?>
|
14 |
<div class="wrap">
|
15 |
+
<?php
|
16 |
+
global $wp_version;
|
17 |
+
if ( ( float ) $wp_version >= 4.3 ) { $heading = '1'; } else { $heading = '2'; }
|
18 |
+
?>
|
19 |
+
<h<?php echo $heading; ?>><?php _e( 'Code Embed Options', 'simple-embed-code' ); ?></h<?php echo $heading; ?>>
|
20 |
<?php
|
21 |
// If options have been updated on screen, update the database
|
22 |
if ( ( !empty( $_POST ) ) && ( check_admin_referer( 'code-embed-profile' , 'code_embed_profile_nonce' ) ) ) {
|
25 |
$options[ 'opening_ident' ] = strtoupper( trim( $_POST[ 'code_embed_opening' ], '[]<>' ) );
|
26 |
$options[ 'keyword_ident' ] = strtoupper( trim( $_POST[ 'code_embed_keyword' ], '[]<>' ) );
|
27 |
$options[ 'closing_ident' ] = strtoupper( trim( $_POST[ 'code_embed_closing' ], '[]<>' ) );
|
28 |
+
$options[ 'debug' ] = $_POST[ 'code_embed_debug' ];
|
29 |
|
30 |
// If any fields are blank assign default values
|
31 |
if ( $options[ 'opening_ident' ] == '' ) { $options[ 'opening_ident' ] = '%'; }
|
41 |
|
42 |
<form method="post" action="<?php echo get_bloginfo( 'wpurl' ) . '/wp-admin/admin.php?page=ace-options&updated=true' ?>">
|
43 |
|
44 |
+
<table class="form-table">
|
45 |
+
<tr>
|
46 |
+
<th scope="row"><?php _e( 'Hide Debug', 'simple-embed-code' ); ?></th>
|
47 |
+
<td><input type="checkbox" name="code_embed_debug" value="1"<?php if ( $options[ 'debug' ] == "1" ) { echo ' checked="checked"'; } ?>/> <span class="description"><?php _e( 'Hide debug HTML comments in source.', 'simple-embed-code' ); ?></span></td>
|
48 |
+
</tr>
|
49 |
+
</table>
|
50 |
+
|
51 |
+
<?php echo '<h3>' . __( 'Identifier Format', 'simple-embed-code' ) . '</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' ); ?>
|
52 |
|
53 |
<table class="form-table">
|
54 |
|
55 |
<tr>
|
56 |
+
<th scope="row"><?php _e( 'Keyword', 'simple-embed-code' ); ?></th>
|
57 |
<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>
|
58 |
</tr>
|
59 |
|
60 |
<tr>
|
61 |
+
<th scope="row"><?php _e( 'Opening Identifier', 'simple-embed-code' ); ?></th>
|
62 |
<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>
|
63 |
</tr>
|
64 |
|
65 |
<tr>
|
66 |
+
<th scope="row"><?php _e( 'Closing Identifier', 'simple-embed-code' ); ?></th>
|
67 |
<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>
|
68 |
</tr>
|
69 |
|
includes/ace-search.php
CHANGED
@@ -11,8 +11,11 @@
|
|
11 |
*/
|
12 |
?>
|
13 |
<div class="wrap">
|
14 |
-
|
15 |
-
|
|
|
|
|
|
|
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>';
|
11 |
*/
|
12 |
?>
|
13 |
<div class="wrap">
|
14 |
+
<?php
|
15 |
+
global $wp_version;
|
16 |
+
if ( ( float ) $wp_version >= 4.3 ) { $heading = '1'; } else { $heading = '2'; }
|
17 |
+
?>
|
18 |
+
<h<?php echo $heading; ?>><?php _e( 'Code Embed Search', 'simple-embed-code' ); ?></h<?php echo $heading; ?>>
|
19 |
|
20 |
<?php
|
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.', 'simple-embed-code' ) . '</p>';
|
languages/simple-embed-code.mo
CHANGED
Binary file
|
languages/simple-embed-code.po
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
-
"Project-Id-Version:
|
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 |
"Language: en_GB\n"
|
@@ -13,7 +13,7 @@ msgstr ""
|
|
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.
|
17 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
18 |
"X-Poedit-SearchPath-0: .\n"
|
19 |
|
@@ -25,135 +25,154 @@ msgstr ""
|
|
25 |
msgid "Support"
|
26 |
msgstr ""
|
27 |
|
28 |
-
#: includes/ace-admin-config.php:
|
|
|
|
|
|
|
|
|
29 |
msgid "Code Embed Search"
|
30 |
msgstr ""
|
31 |
|
32 |
-
#: includes/ace-admin-config.php:
|
33 |
msgid "Code Search"
|
34 |
msgstr ""
|
35 |
|
36 |
-
#: includes/ace-admin-config.php:
|
37 |
msgid "Code Embed Settings"
|
38 |
msgstr ""
|
39 |
|
40 |
-
#: includes/ace-admin-config.php:
|
41 |
msgid "Code Embed"
|
42 |
msgstr ""
|
43 |
|
44 |
-
#: includes/ace-admin-config.php:
|
45 |
msgid "Help"
|
46 |
msgstr ""
|
47 |
|
48 |
-
#: includes/ace-admin-config.php:
|
49 |
msgid ""
|
50 |
-
"Use this screen to modify the
|
51 |
-
"embedded code."
|
52 |
msgstr ""
|
53 |
|
54 |
-
#: includes/ace-admin-config.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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:
|
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:
|
67 |
#, php-format
|
68 |
-
msgid "You are using Code Embed version %s. It was written by
|
69 |
msgstr ""
|
70 |
|
71 |
-
#: includes/ace-admin-config.php:
|
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:
|
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:
|
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:
|
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:
|
98 |
#, php-format
|
99 |
msgid "No embed code was found for %s"
|
100 |
msgstr ""
|
101 |
|
102 |
-
#: includes/ace-options.php:
|
103 |
msgid "Code Embed Options"
|
104 |
msgstr ""
|
105 |
|
106 |
-
#: includes/ace-options.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
107 |
msgid "Identifier Format"
|
108 |
msgstr ""
|
109 |
|
110 |
-
#: includes/ace-options.php:
|
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:
|
118 |
msgid "Keyword"
|
119 |
msgstr ""
|
120 |
|
121 |
-
#: includes/ace-options.php:
|
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:
|
129 |
msgid "Opening Identifier"
|
130 |
msgstr ""
|
131 |
|
132 |
-
#: includes/ace-options.php:
|
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:
|
139 |
msgid "Closing Identifier"
|
140 |
msgstr ""
|
141 |
|
142 |
-
#: includes/ace-options.php:
|
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:
|
149 |
msgid "Save Settings"
|
150 |
msgstr ""
|
151 |
|
152 |
-
#: includes/ace-options.php:
|
153 |
msgid "How to Embed"
|
154 |
msgstr ""
|
155 |
|
156 |
-
#: includes/ace-options.php:
|
157 |
#, php-format
|
158 |
msgid ""
|
159 |
"Based upon your current settings to embed some code simply add a custom "
|
@@ -161,14 +180,14 @@ msgid ""
|
|
161 |
"added as the field value."
|
162 |
msgstr ""
|
163 |
|
164 |
-
#: includes/ace-options.php:
|
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:
|
172 |
#, php-format
|
173 |
msgid ""
|
174 |
"For example, I may add a custom field named %s, where the value is the code "
|
@@ -176,29 +195,29 @@ msgid ""
|
|
176 |
"then appear."
|
177 |
msgstr ""
|
178 |
|
179 |
-
#: includes/ace-options.php:
|
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:
|
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:
|
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:
|
199 |
msgid "Search"
|
200 |
msgstr ""
|
201 |
|
202 |
-
#: includes/ace-search.php:
|
203 |
msgid "No posts were found containing that embed code."
|
204 |
msgstr ""
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
+
"Project-Id-Version: Code Embed\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2015-09-08 17:18-0000\n"
|
6 |
+
"PO-Revision-Date: 2015-09-08 17:18-0000\n"
|
7 |
"Last-Translator: David Artiss <david.artiss@artiss.co.uk>\n"
|
8 |
"Language-Team: \n"
|
9 |
"Language: en_GB\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.7.5\n"
|
17 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
18 |
"X-Poedit-SearchPath-0: .\n"
|
19 |
|
25 |
msgid "Support"
|
26 |
msgstr ""
|
27 |
|
28 |
+
#: includes/ace-admin-config.php:54
|
29 |
+
msgid "Donate"
|
30 |
+
msgstr ""
|
31 |
+
|
32 |
+
#: includes/ace-admin-config.php:77 includes/ace-search.php:18
|
33 |
msgid "Code Embed Search"
|
34 |
msgstr ""
|
35 |
|
36 |
+
#: includes/ace-admin-config.php:77
|
37 |
msgid "Code Search"
|
38 |
msgstr ""
|
39 |
|
40 |
+
#: includes/ace-admin-config.php:85
|
41 |
msgid "Code Embed Settings"
|
42 |
msgstr ""
|
43 |
|
44 |
+
#: includes/ace-admin-config.php:85
|
45 |
msgid "Code Embed"
|
46 |
msgstr ""
|
47 |
|
48 |
+
#: includes/ace-admin-config.php:109 includes/ace-admin-config.php:129
|
49 |
msgid "Help"
|
50 |
msgstr ""
|
51 |
|
52 |
+
#: includes/ace-admin-config.php:172
|
53 |
msgid ""
|
54 |
+
"Use this screen to modify the various settings, including the identifiers "
|
55 |
+
"and keyword used to specify your embedded code."
|
56 |
msgstr ""
|
57 |
|
58 |
+
#: includes/ace-admin-config.php:173
|
59 |
+
msgid ""
|
60 |
+
"The first option allows to suppress debug output. Normally this is an HTML "
|
61 |
+
"comment in your page source - if you wish to hide this then simply ticket "
|
62 |
+
"this option."
|
63 |
+
msgstr ""
|
64 |
+
|
65 |
+
#: includes/ace-admin-config.php:174
|
66 |
msgid ""
|
67 |
"The keyword is the name used for your custom field. The custom field's value "
|
68 |
"is the code that you wish to embed."
|
69 |
msgstr ""
|
70 |
|
71 |
+
#: includes/ace-admin-config.php:175
|
72 |
msgid ""
|
73 |
"The keyword, sandwiched with the identifier before and after, is what you "
|
74 |
"then need to add to your post or page to activate the embed code."
|
75 |
msgstr ""
|
76 |
|
77 |
+
#: includes/ace-admin-config.php:176
|
78 |
#, php-format
|
79 |
+
msgid "You are using Code Embed version %s. It was written by David Artiss."
|
80 |
msgstr ""
|
81 |
|
82 |
+
#: includes/ace-admin-config.php:194
|
83 |
msgid ""
|
84 |
"This screen allows you to search for the post and pages that a particular "
|
85 |
"code embed has been used in."
|
86 |
msgstr ""
|
87 |
|
88 |
+
#: includes/ace-admin-config.php:195
|
89 |
msgid ""
|
90 |
"Simply enter the code suffix that you wish to search for and press the "
|
91 |
"'Search' key to display a list of all the posts using it. In addition the "
|
92 |
"code will be shown alongside it. Click on the post name to edit the post."
|
93 |
msgstr ""
|
94 |
|
95 |
+
#: includes/ace-admin-config.php:196
|
96 |
msgid ""
|
97 |
"The search results are grouped together in matching code groups, so posts "
|
98 |
"with the same code will be shown together with the same colour background."
|
99 |
msgstr ""
|
100 |
|
101 |
+
#: includes/ace-filter.php:234
|
102 |
#, php-format
|
103 |
msgid ""
|
104 |
"Cannot use %s as a global code as it is being used to store %d unique pieces "
|
105 |
"of code in %d posts - <a href=\"%s\">click here</a> for more details"
|
106 |
msgstr ""
|
107 |
|
108 |
+
#: includes/ace-filter.php:241
|
109 |
#, php-format
|
110 |
msgid "No embed code was found for %s"
|
111 |
msgstr ""
|
112 |
|
113 |
+
#: includes/ace-options.php:19
|
114 |
msgid "Code Embed Options"
|
115 |
msgstr ""
|
116 |
|
117 |
+
#: includes/ace-options.php:46
|
118 |
+
msgid "Hide Debug"
|
119 |
+
msgstr ""
|
120 |
+
|
121 |
+
#: includes/ace-options.php:47
|
122 |
+
msgid "Hide debug HTML comments in source."
|
123 |
+
msgstr ""
|
124 |
+
|
125 |
+
#: includes/ace-options.php:51
|
126 |
msgid "Identifier Format"
|
127 |
msgstr ""
|
128 |
|
129 |
+
#: includes/ace-options.php:51
|
130 |
msgid ""
|
131 |
"Specify the format that will be used to define the way the code is embedded "
|
132 |
"in your post. The formats are case insensitive and characters < > [ ] "
|
133 |
"are invalid."
|
134 |
msgstr ""
|
135 |
|
136 |
+
#: includes/ace-options.php:56
|
137 |
msgid "Keyword"
|
138 |
msgstr ""
|
139 |
|
140 |
+
#: includes/ace-options.php:57
|
141 |
msgid ""
|
142 |
"The keyword that is used to name the custom field and then place in your "
|
143 |
"post where the code should be embedded. A suffix on any type can then be "
|
144 |
"placed on the end."
|
145 |
msgstr ""
|
146 |
|
147 |
+
#: includes/ace-options.php:61
|
148 |
msgid "Opening Identifier"
|
149 |
msgstr ""
|
150 |
|
151 |
+
#: includes/ace-options.php:62
|
152 |
msgid ""
|
153 |
"The character(s) that must be placed in the post before the keyword to "
|
154 |
"uniquely identify it."
|
155 |
msgstr ""
|
156 |
|
157 |
+
#: includes/ace-options.php:66
|
158 |
msgid "Closing Identifier"
|
159 |
msgstr ""
|
160 |
|
161 |
+
#: includes/ace-options.php:67
|
162 |
msgid ""
|
163 |
"The character(s) that must be placed in the post after the keyword to "
|
164 |
"uniquely identify it."
|
165 |
msgstr ""
|
166 |
|
167 |
+
#: includes/ace-options.php:74
|
168 |
msgid "Save Settings"
|
169 |
msgstr ""
|
170 |
|
171 |
+
#: includes/ace-options.php:82
|
172 |
msgid "How to Embed"
|
173 |
msgstr ""
|
174 |
|
175 |
+
#: includes/ace-options.php:83
|
176 |
#, php-format
|
177 |
msgid ""
|
178 |
"Based upon your current settings to embed some code simply add a custom "
|
180 |
"added as the field value."
|
181 |
msgstr ""
|
182 |
|
183 |
+
#: includes/ace-options.php:84
|
184 |
#, php-format
|
185 |
msgid ""
|
186 |
"Then, to add the code into your post simple add %s where you wish it to "
|
187 |
"appear. %s is the suffix you used for the custom field name."
|
188 |
msgstr ""
|
189 |
|
190 |
+
#: includes/ace-options.php:85
|
191 |
#, php-format
|
192 |
msgid ""
|
193 |
"For example, I may add a custom field named %s, where the value is the code "
|
195 |
"then appear."
|
196 |
msgstr ""
|
197 |
|
198 |
+
#: includes/ace-options.php:86
|
199 |
#, php-format
|
200 |
msgid ""
|
201 |
"To embed the same code but to make it responsive you would use %s. To set a "
|
202 |
"maximum width you would use %s, where %s is the maximum width in pixels."
|
203 |
msgstr ""
|
204 |
|
205 |
+
#: includes/ace-options.php:87
|
206 |
#, php-format
|
207 |
msgid "To embed an external URL you would type %s, where %s is the URL."
|
208 |
msgstr ""
|
209 |
|
210 |
+
#: includes/ace-search.php:21
|
211 |
msgid ""
|
212 |
"Enter the suffix to search for below and press the 'Search' button to view "
|
213 |
"the results. Further help can be found by clicking on the Help tab at the "
|
214 |
"top right-hand of the screen."
|
215 |
msgstr ""
|
216 |
|
217 |
+
#: includes/ace-search.php:50
|
218 |
msgid "Search"
|
219 |
msgstr ""
|
220 |
|
221 |
+
#: includes/ace-search.php:90
|
222 |
msgid "No posts were found containing that embed code."
|
223 |
msgstr ""
|
languages/simple-embed-code.pot
CHANGED
File without changes
|
readme.txt
CHANGED
@@ -1,9 +1,12 @@
|
|
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.
|
6 |
-
Stable tag: 2.
|
|
|
|
|
7 |
|
8 |
Code Embed provides a very easy and efficient way to embed code (JavaScript and HTML) in your posts and pages.
|
9 |
|
@@ -122,10 +125,15 @@ This WordPress plugin is licensed under the [GPLv2 (or later)](http://wordpress.
|
|
122 |
|
123 |
== Installation ==
|
124 |
|
|
|
|
|
125 |
1. Upload the entire `simple-code-embed` folder to your wp-content/plugins/ directory.
|
126 |
2. Activate the plugin through the 'Plugins' menu in WordPress.
|
127 |
-
|
128 |
-
|
|
|
|
|
|
|
129 |
|
130 |
== Frequently Asked Questions ==
|
131 |
|
@@ -133,16 +141,12 @@ This WordPress plugin is licensed under the [GPLv2 (or later)](http://wordpress.
|
|
133 |
|
134 |
If your code contains the characters `]]>` then you'll find that it doesn't - WordPress modifies this itself.
|
135 |
|
|
|
|
|
136 |
= What's the maximum size of the embed code that I can save in a custom field? =
|
137 |
|
138 |
WordPress stores the custom field contents in a MySQL table using the `longtext` format. This can hold over 4 billion characters.
|
139 |
|
140 |
-
= Which version of PHP does this plugin work with? =
|
141 |
-
|
142 |
-
It has been tested and been found valid from PHP 4 upwards.
|
143 |
-
|
144 |
-
Please note, however, that the minimum for WordPress is now PHP 5.2.4. Even though this plugin supports a lower version, I am not coding specifically to achieve this - therefore this minimum may change in the future.
|
145 |
-
|
146 |
== Screenshots ==
|
147 |
|
148 |
1. The custom field meta box with a Code Embed field set up to show some YouTube embed code
|
@@ -153,6 +157,12 @@ Please note, however, that the minimum for WordPress is now PHP 5.2.4. Even thou
|
|
153 |
|
154 |
== Changelog ==
|
155 |
|
|
|
|
|
|
|
|
|
|
|
|
|
156 |
= 2.1 =
|
157 |
* Maintenance: Updated plugin branding
|
158 |
* Maintenance: Removed feature pointer - no longer required
|
@@ -181,7 +191,7 @@ Please note, however, that the minimum for WordPress is now PHP 5.2.4. Even thou
|
|
181 |
* Bug: Fixed bug where name of plugin folder was incorrect
|
182 |
|
183 |
= 1.6 =
|
184 |
-
* Maintenance: Improved code further from 1.5, including
|
185 |
* Enhancement: Added global embeds option
|
186 |
* Enhancement: New tools option in the administration menu which allows you to search for code embeds
|
187 |
|
@@ -217,6 +227,12 @@ versions of this plugin
|
|
217 |
|
218 |
== Upgrade Notice ==
|
219 |
|
|
|
|
|
|
|
|
|
|
|
|
|
220 |
= 2.0.2 =
|
221 |
* Upgrade to fix a [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")
|
222 |
|
1 |
=== Code Embed ===
|
2 |
Contributors: dartiss
|
3 |
+
Donate link: http://artiss.co.uk/donate
|
4 |
Tags: artiss, embed, code, html, javascript, script, simple, video, xhtml, youtube
|
5 |
Requires at least: 3.3
|
6 |
+
Tested up to: 4.3
|
7 |
+
Stable tag: 2.2
|
8 |
+
License: GPLv2 or later
|
9 |
+
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
11 |
Code Embed provides a very easy and efficient way to embed code (JavaScript and HTML) in your posts and pages.
|
12 |
|
125 |
|
126 |
== Installation ==
|
127 |
|
128 |
+
Code Embed can be found and installed via the Plugin menu within WordPress administration. Alternatively, it can be downloaded and installed manually...
|
129 |
+
|
130 |
1. Upload the entire `simple-code-embed` folder to your wp-content/plugins/ directory.
|
131 |
2. Activate the plugin through the 'Plugins' menu in WordPress.
|
132 |
+
|
133 |
+
Once installed, no matter which method you use, you'll then need to do the following...
|
134 |
+
|
135 |
+
1. Under the Settings section of the administration menu there should now be a new option named "Code Embed". Select this option to set the default options.
|
136 |
+
2. Add the identifier code to the appropriate posts and pages where you wish the code to be embedded.
|
137 |
|
138 |
== Frequently Asked Questions ==
|
139 |
|
141 |
|
142 |
If your code contains the characters `]]>` then you'll find that it doesn't - WordPress modifies this itself.
|
143 |
|
144 |
+
Otherwise, it's likely to be your code and not this plugin. The best way to confirm this is to look at the source of the page and compare the code output with what you embedded. Does it match? If it does, then your code is at fault.
|
145 |
+
|
146 |
= What's the maximum size of the embed code that I can save in a custom field? =
|
147 |
|
148 |
WordPress stores the custom field contents in a MySQL table using the `longtext` format. This can hold over 4 billion characters.
|
149 |
|
|
|
|
|
|
|
|
|
|
|
|
|
150 |
== Screenshots ==
|
151 |
|
152 |
1. The custom field meta box with a Code Embed field set up to show some YouTube embed code
|
157 |
|
158 |
== Changelog ==
|
159 |
|
160 |
+
= 2.1.1 =
|
161 |
+
* Maintenance: Updated help text
|
162 |
+
* Maintenance: Modified admin screen headings so they're compatible with WP4.3
|
163 |
+
* Enhancement: Added options to suppress debug output
|
164 |
+
* Enhancement: Added donation link to plugin meta. Go on, you know you want to...
|
165 |
+
|
166 |
= 2.1 =
|
167 |
* Maintenance: Updated plugin branding
|
168 |
* Maintenance: Removed feature pointer - no longer required
|
191 |
* Bug: Fixed bug where name of plugin folder was incorrect
|
192 |
|
193 |
= 1.6 =
|
194 |
+
* Maintenance: Improved code further from 1.5, including separating code into separate includes
|
195 |
* Enhancement: Added global embeds option
|
196 |
* Enhancement: New tools option in the administration menu which allows you to search for code embeds
|
197 |
|
227 |
|
228 |
== Upgrade Notice ==
|
229 |
|
230 |
+
= 2.1.1 =
|
231 |
+
* Various minor fixes and updates
|
232 |
+
|
233 |
+
= 2.1 =
|
234 |
+
* Upgrade for change of branding and removal of redundant features
|
235 |
+
|
236 |
= 2.0.2 =
|
237 |
* Upgrade to fix a [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")
|
238 |
|
screenshot-1.png
CHANGED
File without changes
|
screenshot-2.png
CHANGED
File without changes
|
screenshot-3.png
CHANGED
File without changes
|
screenshot-4.png
CHANGED
Binary file
|
screenshot-5.png
CHANGED
Binary file
|
simple-code-embed.php
CHANGED
@@ -1,9 +1,11 @@
|
|
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:
|
|
|
7 |
*/
|
8 |
|
9 |
/**
|
@@ -15,11 +17,11 @@ Author: dartiss
|
|
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' );
|
22 |
-
}
|
23 |
add_action( 'init', 'ace_load_plugin_textdomain' );
|
24 |
|
25 |
$functions_dir = WP_PLUGIN_DIR . '/simple-embed-code/includes/';
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Code Embed
|
4 |
+
Plugin URI: https://wordpress.org/plugins/simple-code-embed/
|
5 |
Description: Allows you to embed code into your posts & pages
|
6 |
+
Version: 2.1.1
|
7 |
+
Author: David Artiss
|
8 |
+
Author URI: http://www.artiss.co.uk
|
9 |
*/
|
10 |
|
11 |
/**
|
17 |
* @since 1.6
|
18 |
*/
|
19 |
|
20 |
+
define( 'artiss_code_embed_version', '2.1.1' );
|
21 |
|
22 |
function ace_load_plugin_textdomain() {
|
23 |
load_plugin_textdomain( 'simple-embed-code', false, 'simple-embed-code/languages' );
|
24 |
+
}
|
25 |
add_action( 'init', 'ace_load_plugin_textdomain' );
|
26 |
|
27 |
$functions_dir = WP_PLUGIN_DIR . '/simple-embed-code/includes/';
|
uninstall.php
CHANGED
File without changes
|