Code Embed - Version 2.2.2

Version Description

  • Maintenance: Updated README to work better with new plugin directory format. Also, now converting all text to US English, which is the WordPress standard. Snazzy.
  • Maintenance: Updated all links to artiss.blog and removed donation links. Clickable.
  • Maintenance: Minimum WordPress level is now 4.6 for this plugin, meaning I could remove various pieces of code. Strong and stable.
  • Maintenance: Lots of language updates, many of which are a consequence of the move to WordPress 4.6 (including removal of language files and links, etc). Verbacious.
Download this release

Release Info

Developer dartiss
Plugin Icon 128x128 Code Embed
Version 2.2.2
Comparing to
See all releases

Code changes from version 2.2.1 to 2.2.2

includes/add-embeds.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * Functions to add embed code to posts
6
  *
7
- * @package Code-Embed
8
  */
9
 
10
  /**
4
  *
5
  * Functions to add embed code to posts
6
  *
7
+ * @package simple-embed-code
8
  */
9
 
10
  /**
includes/add-scripts.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * Add CSS to the main theme
6
  *
7
- * @package Code-Embed
8
  */
9
 
10
  /**
4
  *
5
  * Add CSS to the main theme
6
  *
7
+ * @package simple-embed-code
8
  */
9
 
10
  /**
includes/admin-config.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * Add various adminstration menu options
6
  *
7
- * @package Code-Embed
8
  */
9
 
10
  /**
@@ -49,12 +49,7 @@ add_filter( 'plugin_action_links', 'ce_add_settings_link', 10, 2 );
49
 
50
  function ce_set_plugin_meta( $links, $file ) {
51
 
52
- if ( strpos( $file, 'code-embed.php' ) !== false ) {
53
-
54
- $links = array_merge( $links, array( '<a href="http://wordpress.org/support/plugin/simple-embed-code">' . __( 'Support', 'simple-embed-code' ) . '</a>' ) );
55
- $links = array_merge( $links, array( '<a href="http://www.artiss.co.uk/donate">' . __( 'Donate', 'simple-embed-code' ) . '</a>' ) );
56
-
57
- }
58
 
59
  return $links;
60
  }
@@ -174,7 +169,7 @@ function ce_search() {
174
  function ce_options_help() {
175
 
176
  $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>';
177
- $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>';
178
  $help_text .= '<p>' . __( 'The second option allows to specify whether code embed requests should work in excerpts.', 'simple-embed-code' ) . '</p>';
179
  $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>';
180
  $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>';
@@ -196,7 +191,7 @@ function ce_search_help() {
196
 
197
  $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>';
198
  $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>';
199
- $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>';
200
 
201
  return $help_text;
202
  }
4
  *
5
  * Add various adminstration menu options
6
  *
7
+ * @package simple-embed-code
8
  */
9
 
10
  /**
49
 
50
  function ce_set_plugin_meta( $links, $file ) {
51
 
52
+ if ( strpos( $file, 'code-embed.php' ) !== false ) { $links = array_merge( $links, array( '<a href="https://wordpress.org/plugins/simple-embed-code/">' . __( 'Support', 'simple-embed-code' ) . '</a>' ) ); }
 
 
 
 
 
53
 
54
  return $links;
55
  }
169
  function ce_options_help() {
170
 
171
  $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>';
172
+ $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 tick this option.', 'simple-embed-code' ) . '</p>';
173
  $help_text .= '<p>' . __( 'The second option allows to specify whether code embed requests should work in excerpts.', '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>';
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 color background.', 'simple-embed-code' ) . '</p>';
195
 
196
  return $help_text;
197
  }
includes/initialise.php CHANGED
@@ -4,18 +4,12 @@
4
  *
5
  * Run everytime the plugin is initialised
6
  *
7
- * @package Code-Embed
8
  * @since 2.2
9
  */
10
 
11
  function ce_initialisation() {
12
 
13
- // Load text domain for translations
14
-
15
- $language_dir = plugin_basename( dirname( __FILE__ ) ) . '/languages/';
16
-
17
- load_plugin_textdomain( 'simple-embed-code', false, $language_dir );
18
-
19
  // Add exerpt filter, if required
20
 
21
  $options = get_option( 'artiss_code_embed' );
4
  *
5
  * Run everytime the plugin is initialised
6
  *
7
+ * @package simple-embed-code
8
  * @since 2.2
9
  */
10
 
11
  function ce_initialisation() {
12
 
 
 
 
 
 
 
13
  // Add exerpt filter, if required
14
 
15
  $options = get_option( 'artiss_code_embed' );
includes/options-screen.php CHANGED
@@ -4,18 +4,14 @@
4
  *
5
  * Allow the user to change the default options
6
  *
7
- * @package Code-Embed
8
  * @since 1.4
9
  *
10
  * @uses ce_help Return help text
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 Options', 'simple-embed-code' ); ?></h<?php echo $heading; ?>>
19
  <?php
20
 
21
  // If options have been updated on screen, update the database
@@ -27,6 +23,7 @@ if ( ( !empty( $_POST ) ) && ( check_admin_referer( 'code-embed-profile' , 'code
27
  $options[ 'opening_ident' ] = sanitize_text_field( strtoupper( trim( $_POST[ 'code_embed_opening' ], '[]<>' ) ) );
28
  $options[ 'keyword_ident' ] = sanitize_text_field( strtoupper( trim( $_POST[ 'code_embed_keyword' ], '[]<>' ) ) );
29
  $options[ 'closing_ident' ] = sanitize_text_field( strtoupper( trim( $_POST[ 'code_embed_closing' ], '[]<>' ) ) );
 
30
  if ( isset( $_POST[ 'code_embed_debug' ] ) ) { $options[ 'debug' ] = sanitize_text_field( $_POST[ 'code_embed_debug' ] ); } else { $options[ 'debug' ] = ''; }
31
  if ( isset( $_POST[ 'code_embed_excerpt' ] ) ) { $options[ 'excerpt' ] = sanitize_text_field( $_POST[ 'code_embed_excerpt' ] ); } else { $options[ 'excerpt' ] = ''; }
32
 
4
  *
5
  * Allow the user to change the default options
6
  *
7
+ * @package simple-embed-code
8
  * @since 1.4
9
  *
10
  * @uses ce_help Return help text
11
  */
12
  ?>
13
  <div class="wrap">
14
+ <h1><?php _e( 'Code Embed Options', 'simple-embed-code' ); ?></h1>
 
 
 
 
15
  <?php
16
 
17
  // If options have been updated on screen, update the database
23
  $options[ 'opening_ident' ] = sanitize_text_field( strtoupper( trim( $_POST[ 'code_embed_opening' ], '[]<>' ) ) );
24
  $options[ 'keyword_ident' ] = sanitize_text_field( strtoupper( trim( $_POST[ 'code_embed_keyword' ], '[]<>' ) ) );
25
  $options[ 'closing_ident' ] = sanitize_text_field( strtoupper( trim( $_POST[ 'code_embed_closing' ], '[]<>' ) ) );
26
+
27
  if ( isset( $_POST[ 'code_embed_debug' ] ) ) { $options[ 'debug' ] = sanitize_text_field( $_POST[ 'code_embed_debug' ] ); } else { $options[ 'debug' ] = ''; }
28
  if ( isset( $_POST[ 'code_embed_excerpt' ] ) ) { $options[ 'excerpt' ] = sanitize_text_field( $_POST[ 'code_embed_excerpt' ] ); } else { $options[ 'excerpt' ] = ''; }
29
 
includes/search-screen.php CHANGED
@@ -4,16 +4,12 @@
4
  *
5
  * Allow the user to change the default options
6
  *
7
- * @package Code-Embed
8
  * @since 1.6
9
  */
10
  ?>
11
  <div class="wrap">
12
- <?php
13
- global $wp_version;
14
- if ( ( float ) $wp_version >= 4.3 ) { $heading = '1'; } else { $heading = '2'; }
15
- ?>
16
- <h<?php echo $heading; ?>><?php _e( 'Code Embed Search', 'simple-embed-code' ); ?></h<?php echo $heading; ?>>
17
 
18
  <?php
19
  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>';
4
  *
5
  * Allow the user to change the default options
6
  *
7
+ * @package simple-embed-code
8
  * @since 1.6
9
  */
10
  ?>
11
  <div class="wrap">
12
+ <h1><?php _e( 'Code Embed Search', 'simple-embed-code' ); ?></h1>
 
 
 
 
13
 
14
  <?php
15
  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 DELETED
Binary file
languages/simple-embed-code.po DELETED
@@ -1,232 +0,0 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: Code Embed\n"
4
- "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2016-04-14 13:36-0000\n"
6
- "PO-Revision-Date: 2016-04-14 13:36-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.7.5\n"
17
- "Plural-Forms: nplurals=2; plural=(n != 1);\n"
18
- "X-Poedit-SearchPath-0: .\n"
19
-
20
- #: includes/add-embeds.php:233
21
- #, php-format
22
- msgid ""
23
- "Cannot use %s as a global code as it is being used to store %d unique pieces "
24
- "of code in %d posts - <a href=\"%s\">click here</a> for more details"
25
- msgstr ""
26
-
27
- #: includes/add-embeds.php:240
28
- #, php-format
29
- msgid "No embed code was found for %s"
30
- msgstr ""
31
-
32
- #: includes/admin-config.php:29
33
- msgid "Settings"
34
- msgstr ""
35
-
36
- #: includes/admin-config.php:54
37
- msgid "Support"
38
- msgstr ""
39
-
40
- #: includes/admin-config.php:55
41
- msgid "Donate"
42
- msgstr ""
43
-
44
- #: includes/admin-config.php:80 includes/search-screen.php:16
45
- msgid "Code Embed Search"
46
- msgstr ""
47
-
48
- #: includes/admin-config.php:80
49
- msgid "Code Search"
50
- msgstr ""
51
-
52
- #: includes/admin-config.php:88
53
- msgid "Code Embed Settings"
54
- msgstr ""
55
-
56
- #: includes/admin-config.php:88
57
- msgid "Code Embed"
58
- msgstr ""
59
-
60
- #: includes/admin-config.php:113 includes/admin-config.php:133
61
- msgid "Help"
62
- msgstr ""
63
-
64
- #: includes/admin-config.php:176
65
- msgid ""
66
- "Use this screen to modify the various settings, including the identifiers "
67
- "and keyword used to specify your embedded code."
68
- msgstr ""
69
-
70
- #: includes/admin-config.php:177
71
- msgid ""
72
- "The first option allows to suppress debug output. Normally this is an HTML "
73
- "comment in your page source - if you wish to hide this then simply ticket "
74
- "this option."
75
- msgstr ""
76
-
77
- #: includes/admin-config.php:178
78
- msgid ""
79
- "The second option allows to specify whether code embed requests should work "
80
- "in excerpts."
81
- msgstr ""
82
-
83
- #: includes/admin-config.php:179
84
- msgid ""
85
- "The keyword is the name used for your custom field. The custom field's value "
86
- "is the code that you wish to embed."
87
- msgstr ""
88
-
89
- #: includes/admin-config.php:180
90
- msgid ""
91
- "The keyword, sandwiched with the identifier before and after, is what you "
92
- "then need to add to your post or page to activate the embed code."
93
- msgstr ""
94
-
95
- #: includes/admin-config.php:197
96
- msgid ""
97
- "This screen allows you to search for the post and pages that a particular "
98
- "code embed has been used in."
99
- msgstr ""
100
-
101
- #: includes/admin-config.php:198
102
- msgid ""
103
- "Simply enter the code suffix that you wish to search for and press the "
104
- "'Search' key to display a list of all the posts using it. In addition the "
105
- "code will be shown alongside it. Click on the post name to edit the post."
106
- msgstr ""
107
-
108
- #: includes/admin-config.php:199
109
- msgid ""
110
- "The search results are grouped together in matching code groups, so posts "
111
- "with the same code will be shown together with the same colour background."
112
- msgstr ""
113
-
114
- #: includes/options-screen.php:18
115
- msgid "Code Embed Options"
116
- msgstr ""
117
-
118
- #: includes/options-screen.php:51
119
- msgid "Hide Debug"
120
- msgstr ""
121
-
122
- #: includes/options-screen.php:52
123
- msgid "Hide debug HTML comments in source"
124
- msgstr ""
125
-
126
- #: includes/options-screen.php:56
127
- msgid "Allow in Excerpts"
128
- msgstr ""
129
-
130
- #: includes/options-screen.php:57
131
- msgid "Allow embedded code to be shown in excerpts"
132
- msgstr ""
133
-
134
- #: includes/options-screen.php:61
135
- msgid "Identifier Format"
136
- msgstr ""
137
-
138
- #: includes/options-screen.php:61
139
- msgid ""
140
- "Specify the format that will be used to define the way the code is embedded "
141
- "in your post. The formats are case insensitive and characters &lt; &gt [ ] "
142
- "are invalid."
143
- msgstr ""
144
-
145
- #: includes/options-screen.php:66
146
- msgid "Keyword"
147
- msgstr ""
148
-
149
- #: includes/options-screen.php:67
150
- msgid ""
151
- "The keyword that is used to name the custom field and then place in your "
152
- "post where the code should be embedded. A suffix on any type can then be "
153
- "placed on the end."
154
- msgstr ""
155
-
156
- #: includes/options-screen.php:71
157
- msgid "Opening Identifier"
158
- msgstr ""
159
-
160
- #: includes/options-screen.php:72
161
- msgid ""
162
- "The character(s) that must be placed in the post before the keyword to "
163
- "uniquely identify it."
164
- msgstr ""
165
-
166
- #: includes/options-screen.php:76
167
- msgid "Closing Identifier"
168
- msgstr ""
169
-
170
- #: includes/options-screen.php:77
171
- msgid ""
172
- "The character(s) that must be placed in the post after the keyword to "
173
- "uniquely identify it."
174
- msgstr ""
175
-
176
- #: includes/options-screen.php:84
177
- msgid "Save Changes"
178
- msgstr ""
179
-
180
- #: includes/options-screen.php:92
181
- msgid "How to Embed"
182
- msgstr ""
183
-
184
- #: includes/options-screen.php:93
185
- #, php-format
186
- msgid ""
187
- "Based upon your current settings to embed some code simply add a custom "
188
- "field named %s, where %s is any suffix you wish. The code to embed is then "
189
- "added as the field value."
190
- msgstr ""
191
-
192
- #: includes/options-screen.php:94
193
- #, php-format
194
- msgid ""
195
- "Then, to add the code into your post simple add %s where you wish it to "
196
- "appear. %s is the suffix you used for the custom field name."
197
- msgstr ""
198
-
199
- #: includes/options-screen.php:95
200
- #, php-format
201
- msgid ""
202
- "For example, I may add a custom field named %s, where the value is the code "
203
- "I wish to embed. I would then in my post add %s where I wish the code to "
204
- "then appear."
205
- msgstr ""
206
-
207
- #: includes/options-screen.php:96
208
- #, php-format
209
- msgid ""
210
- "To embed the same code but to make it responsive you would use %s. To set a "
211
- "maximum width you would use %s, where %s is the maximum width in pixels."
212
- msgstr ""
213
-
214
- #: includes/options-screen.php:97
215
- #, php-format
216
- msgid "To embed an external URL you would type %s, where %s is the URL."
217
- msgstr ""
218
-
219
- #: includes/search-screen.php:19
220
- msgid ""
221
- "Enter the suffix to search for below and press the 'Search' button to view "
222
- "the results. Further help can be found by clicking on the Help tab at the "
223
- "top right-hand of the screen."
224
- msgstr ""
225
-
226
- #: includes/search-screen.php:51
227
- msgid "Search"
228
- msgstr ""
229
-
230
- #: includes/search-screen.php:91
231
- msgid "No posts were found containing that embed code."
232
- msgstr ""
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
languages/simple-embed-code.pot DELETED
@@ -1,228 +0,0 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: Code Embed\n"
4
- "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2016-01-30 10:14-0000\n"
6
- "PO-Revision-Date: 2016-01-30 10:14-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
- "Plural-Forms: nplurals=2; plural=(n != 1);\n"
17
- "X-Generator: Poedit 1.7.5\n"
18
- "X-Poedit-SearchPath-0: .\n"
19
-
20
- #: includes/add-embeds.php:233
21
- #, php-format
22
- msgid ""
23
- "Cannot use %s as a global code as it is being used to store %d unique pieces "
24
- "of code in %d posts - <a href=\"%s\">click here</a> for more details"
25
- msgstr ""
26
-
27
- #: includes/add-embeds.php:240
28
- #, php-format
29
- msgid "No embed code was found for %s"
30
- msgstr ""
31
-
32
- #: includes/admin-config.php:29
33
- msgid "Settings"
34
- msgstr ""
35
-
36
- #: includes/admin-config.php:54
37
- msgid "Support"
38
- msgstr ""
39
-
40
- #: includes/admin-config.php:79 includes/search-screen.php:16
41
- msgid "Code Embed Search"
42
- msgstr ""
43
-
44
- #: includes/admin-config.php:79
45
- msgid "Code Search"
46
- msgstr ""
47
-
48
- #: includes/admin-config.php:87
49
- msgid "Code Embed Settings"
50
- msgstr ""
51
-
52
- #: includes/admin-config.php:87
53
- msgid "Code Embed"
54
- msgstr ""
55
-
56
- #: includes/admin-config.php:112 includes/admin-config.php:132
57
- msgid "Help"
58
- msgstr ""
59
-
60
- #: includes/admin-config.php:175
61
- msgid ""
62
- "Use this screen to modify the various settings, including the identifiers "
63
- "and keyword used to specify your embedded code."
64
- msgstr ""
65
-
66
- #: includes/admin-config.php:176
67
- msgid ""
68
- "The first option allows to suppress debug output. Normally this is an HTML "
69
- "comment in your page source - if you wish to hide this then simply ticket "
70
- "this option."
71
- msgstr ""
72
-
73
- #: includes/admin-config.php:177
74
- msgid ""
75
- "The second option allows to specify whether code embed requests should work "
76
- "in excerpts."
77
- msgstr ""
78
-
79
- #: includes/admin-config.php:178
80
- msgid ""
81
- "The keyword is the name used for your custom field. The custom field's value "
82
- "is the code that you wish to embed."
83
- msgstr ""
84
-
85
- #: includes/admin-config.php:179
86
- msgid ""
87
- "The keyword, sandwiched with the identifier before and after, is what you "
88
- "then need to add to your post or page to activate the embed code."
89
- msgstr ""
90
-
91
- #: includes/admin-config.php:196
92
- msgid ""
93
- "This screen allows you to search for the post and pages that a particular "
94
- "code embed has been used in."
95
- msgstr ""
96
-
97
- #: includes/admin-config.php:197
98
- msgid ""
99
- "Simply enter the code suffix that you wish to search for and press the "
100
- "'Search' key to display a list of all the posts using it. In addition the "
101
- "code will be shown alongside it. Click on the post name to edit the post."
102
- msgstr ""
103
-
104
- #: includes/admin-config.php:198
105
- msgid ""
106
- "The search results are grouped together in matching code groups, so posts "
107
- "with the same code will be shown together with the same colour background."
108
- msgstr ""
109
-
110
- #: includes/options-screen.php:18
111
- msgid "Code Embed Options"
112
- msgstr ""
113
-
114
- #: includes/options-screen.php:51
115
- msgid "Hide Debug"
116
- msgstr ""
117
-
118
- #: includes/options-screen.php:52
119
- msgid "Hide debug HTML comments in source"
120
- msgstr ""
121
-
122
- #: includes/options-screen.php:56
123
- msgid "Allow in Excerpts"
124
- msgstr ""
125
-
126
- #: includes/options-screen.php:57
127
- msgid "Allow embedded code to be shown in excerpts"
128
- msgstr ""
129
-
130
- #: includes/options-screen.php:61
131
- msgid "Identifier Format"
132
- msgstr ""
133
-
134
- #: includes/options-screen.php:61
135
- msgid ""
136
- "Specify the format that will be used to define the way the code is embedded "
137
- "in your post. The formats are case insensitive and characters &lt; &gt [ ] "
138
- "are invalid."
139
- msgstr ""
140
-
141
- #: includes/options-screen.php:66
142
- msgid "Keyword"
143
- msgstr ""
144
-
145
- #: includes/options-screen.php:67
146
- msgid ""
147
- "The keyword that is used to name the custom field and then place in your "
148
- "post where the code should be embedded. A suffix on any type can then be "
149
- "placed on the end."
150
- msgstr ""
151
-
152
- #: includes/options-screen.php:71
153
- msgid "Opening Identifier"
154
- msgstr ""
155
-
156
- #: includes/options-screen.php:72
157
- msgid ""
158
- "The character(s) that must be placed in the post before the keyword to "
159
- "uniquely identify it."
160
- msgstr ""
161
-
162
- #: includes/options-screen.php:76
163
- msgid "Closing Identifier"
164
- msgstr ""
165
-
166
- #: includes/options-screen.php:77
167
- msgid ""
168
- "The character(s) that must be placed in the post after the keyword to "
169
- "uniquely identify it."
170
- msgstr ""
171
-
172
- #: includes/options-screen.php:84
173
- msgid "Save Changes"
174
- msgstr ""
175
-
176
- #: includes/options-screen.php:92
177
- msgid "How to Embed"
178
- msgstr ""
179
-
180
- #: includes/options-screen.php:93
181
- #, php-format
182
- msgid ""
183
- "Based upon your current settings to embed some code simply add a custom "
184
- "field named %s, where %s is any suffix you wish. The code to embed is then "
185
- "added as the field value."
186
- msgstr ""
187
-
188
- #: includes/options-screen.php:94
189
- #, php-format
190
- msgid ""
191
- "Then, to add the code into your post simple add %s where you wish it to "
192
- "appear. %s is the suffix you used for the custom field name."
193
- msgstr ""
194
-
195
- #: includes/options-screen.php:95
196
- #, php-format
197
- msgid ""
198
- "For example, I may add a custom field named %s, where the value is the code "
199
- "I wish to embed. I would then in my post add %s where I wish the code to "
200
- "then appear."
201
- msgstr ""
202
-
203
- #: includes/options-screen.php:96
204
- #, php-format
205
- msgid ""
206
- "To embed the same code but to make it responsive you would use %s. To set a "
207
- "maximum width you would use %s, where %s is the maximum width in pixels."
208
- msgstr ""
209
-
210
- #: includes/options-screen.php:97
211
- #, php-format
212
- msgid "To embed an external URL you would type %s, where %s is the URL."
213
- msgstr ""
214
-
215
- #: includes/search-screen.php:19
216
- msgid ""
217
- "Enter the suffix to search for below and press the 'Search' button to view "
218
- "the results. Further help can be found by clicking on the Help tab at the "
219
- "top right-hand of the screen."
220
- msgstr ""
221
-
222
- #: includes/search-screen.php:51
223
- msgid "Search"
224
- msgstr ""
225
-
226
- #: includes/search-screen.php:91
227
- msgid "No posts were found containing that embed code."
228
- msgstr ""
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
- === Code Embed ===
2
  Contributors: dartiss
3
- Donate link: https://artiss.blog/donate
4
- Tags: code, embed, html, javascript, script, simple, video, xhtml, youtube
5
- Requires at least: 3.3
6
- Tested up to: 4.7.2
7
- Stable tag: 2.2.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -14,7 +14,7 @@ Code Embed provides a very easy and efficient way to embed code (JavaScript and
14
 
15
  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.
16
 
17
- Features include..
18
 
19
  * Add HTML or JavaScript to posts or pages - particularly useful for embedding videos!
20
  * Embed in widgets using the [Widget Logic](http://wordpress.org/extend/plugins/widget-logic/ "Widget Logic") plugin
@@ -23,9 +23,20 @@ Features include..
23
  * Search for embedding code via a simple search option
24
  * Add a simple suffix to the embed code to convert videos to responsive output
25
  * Embed an external script directly using just the URL
26
- * 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")**
27
-
28
- Here's how easy it is...
 
 
 
 
 
 
 
 
 
 
 
29
 
30
  1. Once you have the plugin installed start a new post or page.
31
  2. In the `Custom Fields` meta box enter a name of CODE1 and your embed code as the value. Save this.
@@ -35,7 +46,7 @@ And that's it - when the post or page is viewed `%CODE1%` will be replaced with
35
 
36
  **If you cannot find the location of the `Custom Fields` meta box on your post editor screen, please see the FAQ section for more information**
37
 
38
- This should get you started - for more information and advanced options please read the "Other Notes" tab. Alternatively, there's a fantastic guide at [Elftronix](http://www.elftronix.com/free-easy-plugin-add-javascript-to-wordpress-posts-pages/ "Free Easy Plugin! Add Javascript to WordPress Posts & Pages") which I would recommend.
39
 
40
  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.
41
 
@@ -107,7 +118,7 @@ To use, when adding the embed code onto the page, simply add `_RES` to the end,
107
 
108
  This will now output the embedded code full width, but a width that is dynamic and will resize when required.
109
 
110
- If you don't wish the output to be full width you can specify a maximum width by adding an additonal `_x` on the end, where `x` is the required width in pixels. For example, `%CODE1_RES_500%` this will output `CODE1` as responsive but with a maximum width of 500 pixels.
111
 
112
  **It should be noted that this is an experimental addition and will not work in all circumstances.**
113
 
@@ -127,15 +138,12 @@ By default embed code will not appear in excerpts. However, you can switch this
127
 
128
  == Installation ==
129
 
130
- Code Embed can be found and installed via the Plugin menu within WordPress administration. Alternatively, it can be downloaded and installed manually...
131
-
132
- 1. Upload the entire `simple-code-embed` folder to your wp-content/plugins/ directory.
133
- 2. Activate the plugin through the 'Plugins' menu in WordPress.
134
-
135
- Once installed, no matter which method you use, you'll then need to do the following...
136
-
137
- 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.
138
- 2. Add the identifier code to the appropriate posts and pages where you wish the code to be embedded.
139
 
140
  == Frequently Asked Questions ==
141
 
@@ -164,14 +172,22 @@ WordPress stores the custom field contents in a MySQL table using the `longtext`
164
  5. The search screen, showing search results
165
  6. The Custom Fields meta-box and the screen switch - both highlighted in red
166
 
167
- == Changelog ==
 
 
 
 
 
 
 
 
168
 
169
  = 2.2.1 =
170
  * Maintenance: Updated branding, inc. adding donation links
171
 
172
  = 2.2 =
173
  * Enhancement: Added support for embedding code in excerpts
174
- * Enhancement: Validated, sanitised and escaped the admin screen data
175
  * Maintenance: Overhauled the way default options are fetched and/or generated. Now a lot more efficient
176
  * Maintenance: Updated the admin screens so they are formatted in a similar way to the default WordPress screens
177
  * Maintenance: Removed hardcoding of plugin folder
@@ -225,7 +241,7 @@ WordPress stores the custom field contents in a MySQL table using the `longtext`
225
 
226
  = 1.5 =
227
  * Maintenance: Renamed plugin to bring in line with new plugin conventions
228
- * Maintenance: Plugin re-write to create more efficient code - can now also completely personalise the embed code used in the post
229
  * Maintenance: PHPDoc used throughout for documentation purposes, plus new coding standards
230
  * Maintenance: Instructions completely re-written
231
  * Enhancement: Support information improved, including contextual help on the settings screen (if supported)
@@ -252,5 +268,5 @@ versions of this plugin
252
 
253
  == Upgrade Notice ==
254
 
255
- = 2.2.1 =
256
- * Minor update to change branding
1
+ === Code Embed ===
2
  Contributors: dartiss
3
+ Tags: code, embed, html, javascript, script
4
+ Requires at least: 4.6
5
+ Tested up to: 4.9
6
+ Requires PHP: 5.3
7
+ Stable tag: 2.2.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
14
 
15
  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.
16
 
17
+ Key features include...
18
 
19
  * Add HTML or JavaScript to posts or pages - particularly useful for embedding videos!
20
  * Embed in widgets using the [Widget Logic](http://wordpress.org/extend/plugins/widget-logic/ "Widget Logic") plugin
23
  * Search for embedding code via a simple search option
24
  * Add a simple suffix to the embed code to convert videos to responsive output
25
  * Embed an external script directly using just the URL
26
+ * And much, much more!
27
+
28
+ Technical specification...
29
+
30
+ * Licensed under [GPLv2 (or later)](http://wordpress.org/about/gpl/ "GNU General Public License")
31
+ * Designed for both single and multi-site installations
32
+ * PHP7 compatible
33
+ * Fully internationalized, ready for translations **If you would like to add a translation to this plugin then please head to our [Translating WordPress](https://translate.wordpress.org/projects/wp-plugins/simple-embed-code "Translating WordPress") page**
34
+
35
+ Please visit the [Github page](https://github.com/dartiss/code-embed "Github") for the latest code development, planned enhancements and known issues.
36
+
37
+ == Getting Started ==
38
+
39
+ Here's how easy it is to use…
40
 
41
  1. Once you have the plugin installed start a new post or page.
42
  2. In the `Custom Fields` meta box enter a name of CODE1 and your embed code as the value. Save this.
46
 
47
  **If you cannot find the location of the `Custom Fields` meta box on your post editor screen, please see the FAQ section for more information**
48
 
49
+ This should get you started - for more information and advanced options please see below.. Alternatively, there's a fantastic guide at [Elftronix](http://www.elftronix.com/free-easy-plugin-add-javascript-to-wordpress-posts-pages/ "Free Easy Plugin! Add Javascript to WordPress Posts & Pages") which I would recommend.
50
 
51
  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.
52
 
118
 
119
  This will now output the embedded code full width, but a width that is dynamic and will resize when required.
120
 
121
+ If you don't wish the output to be full width you can specify a maximum width by adding an additional `_x` on the end, where `x` is the required width in pixels. For example, `%CODE1_RES_500%` this will output `CODE1` as responsive but with a maximum width of 500 pixels.
122
 
123
  **It should be noted that this is an experimental addition and will not work in all circumstances.**
124
 
138
 
139
  == Installation ==
140
 
141
+ Code Embed can be found and installed via the Plugin menu within WordPress administration (Plugins -> Add New). Alternatively, it can be downloaded from WordPress.org and installed manually...
142
+
143
+ 1. Upload the entire `simple-embed-code` folder to your `wp-content/plugins/` directory.
144
+ 2. Activate the plugin through the 'Plugins' menu in WordPress administration.
145
+
146
+ Voila! It's ready to go.
 
 
 
147
 
148
  == Frequently Asked Questions ==
149
 
172
  5. The search screen, showing search results
173
  6. The Custom Fields meta-box and the screen switch - both highlighted in red
174
 
175
+ == Changelog ==
176
+
177
+ [Learn more about my version numbering methodology](https://artiss.blog/2016/09/wordpress-plugin-versioning/ "WordPress Plugin Versioning")
178
+
179
+ = 2.2.2 =
180
+ * Maintenance: Updated README to work better with new plugin directory format. Also, now converting all text to US English, which is the WordPress standard. Snazzy.
181
+ * Maintenance: Updated all links to artiss.blog and removed donation links. Clickable.
182
+ * Maintenance: Minimum WordPress level is now 4.6 for this plugin, meaning I could remove various pieces of code. Strong and stable.
183
+ * Maintenance: Lots of language updates, many of which are a consequence of the move to WordPress 4.6 (including removal of language files and links, etc). Verbacious.
184
 
185
  = 2.2.1 =
186
  * Maintenance: Updated branding, inc. adding donation links
187
 
188
  = 2.2 =
189
  * Enhancement: Added support for embedding code in excerpts
190
+ * Enhancement: Validated, sanitized and escaped the admin screen data
191
  * Maintenance: Overhauled the way default options are fetched and/or generated. Now a lot more efficient
192
  * Maintenance: Updated the admin screens so they are formatted in a similar way to the default WordPress screens
193
  * Maintenance: Removed hardcoding of plugin folder
241
 
242
  = 1.5 =
243
  * Maintenance: Renamed plugin to bring in line with new plugin conventions
244
+ * Maintenance: Plugin re-write to create more efficient code - can now also completely personalize the embed code used in the post
245
  * Maintenance: PHPDoc used throughout for documentation purposes, plus new coding standards
246
  * Maintenance: Instructions completely re-written
247
  * Enhancement: Support information improved, including contextual help on the settings screen (if supported)
268
 
269
  == Upgrade Notice ==
270
 
271
+ = 2.2.2 =
272
+ * Maintenance updates
simple-code-embed.php CHANGED
@@ -1,13 +1,12 @@
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.2.1
7
  Author: David Artiss
8
- Author URI: http://www.artiss.co.uk
9
  Text Domain: simple-embed-code
10
- Domain Path: /languages
11
  */
12
 
13
  /**
@@ -19,7 +18,7 @@ Domain Path: /languages
19
  * @since 1.6
20
  */
21
 
22
- define( 'code_embed_version', '2.2.1' );
23
 
24
  // Include all the various functions
25
 
1
  <?php
2
  /*
3
  Plugin Name: Code Embed
4
+ Plugin URI: https://wordpress.org/plugins/simple-embed-code/
5
+ Description: Code Embed provides a very easy and efficient way to embed code (JavaScript and HTML) in your posts and pages.
6
+ Version: 2.2.2
7
  Author: David Artiss
8
+ Author URI: https://artiss.blog
9
  Text Domain: simple-embed-code
 
10
  */
11
 
12
  /**
18
  * @since 1.6
19
  */
20
 
21
+ define( 'code_embed_version', '2.2.2' );
22
 
23
  // Include all the various functions
24
 
uninstall.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * Uninstall the plugin by removing any options from the database
6
  *
7
- * @package Code-Embed
8
  * @since 1.6
9
  */
10
 
4
  *
5
  * Uninstall the plugin by removing any options from the database
6
  *
7
+ * @package simple-embed-code
8
  * @since 1.6
9
  */
10